@mapcatch/util 1.0.7 → 1.0.8-a

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.
@@ -1,48 +1,50 @@
1
- (function(ir,ui){typeof exports=="object"&&typeof module<"u"?ui(exports):typeof define=="function"&&define.amd?define(["exports"],ui):(ir=typeof globalThis<"u"?globalThis:ir||self,ui(ir.catchUtil={}))})(this,function(ir){"use strict";const ui={imageHasData(t){return!!t.exifdata},getStringFromDB(t,n,i){for(var o="",f=n;f<n+i;f++)o+=String.fromCharCode(t.getUint8(f));return o},xml2Object(t){try{var n={};if(t.children.length>0)for(var i=0;i<t.children.length;i++){var o=t.children.item(i),f=o.attributes;for(var s in f){var l=f[s],d=l.nodeName,v=l.nodeValue;d!==void 0&&(n[d]=v)}var M=o.nodeName;if(typeof n[M]>"u")n[M]=this.xml2json(o);else{if(typeof n[M].push>"u"){var B=n[M];n[M]=[],n[M].push(B)}n[M].push(this.xml2json(o))}}else n=t.textContent;return n}catch(p){console.log(p.message)}},xml2json(t){var n={};if(t.nodeType==1){if(t.attributes.length>0){n["@attributes"]={};for(var i=0;i<t.attributes.length;i++){var o=t.attributes.item(i);n["@attributes"][o.nodeName]=o.nodeValue}}}else if(t.nodeType==3)return t.nodeValue;if(t.hasChildNodes())for(var f=0;f<t.childNodes.length;f++){var s=t.childNodes.item(f),l=s.nodeName;if(n[l]==null)n[l]=this.xml2json(s);else{if(n[l].push==null){var d=n[l];n[l]=[],n[l].push(d)}n[l].push(this.xml2json(s))}}return n},objectURLToBlob(t,n){var i=new XMLHttpRequest;i.open("GET",t,!0),i.responseType="blob",i.onload=function(o){(this.status==200||this.status===0)&&n(this.response)},i.send()},base64ToArrayBuffer(t,n){n=n||t.match(/^data\:([^\;]+)\;base64,/mi)[1]||"",t=t.replace(/^data\:([^\;]+)\;base64,/gmi,"");for(var i=atob(t),o=i.length,f=new ArrayBuffer(o),s=new Uint8Array(f),l=0;l<o;l++)s[l]=i.charCodeAt(l);return f}},x_={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},w_={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},Pf={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}},S_={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"};var A_=!1;const T_=function(t,n){return(self.Image&&t instanceof self.Image||self.HTMLImageElement&&t instanceof self.HTMLImageElement)&&!t.complete?(n(null,new Error("\u4E0D\u652F\u6301\u7684\u683C\u5F0F")),!1):(ui.imageHasData(t)?n&&n(t):E_(t,n),!0)};function E_(t,n){function i(l){try{var d=D_(l);t.exifdata=d||{};var v;n&&n(t)}catch(M){n(null,M)}}if(t.src)if(/^data\:/i.test(t.src)){var o=ui.base64ToArrayBuffer(t.src);i(o)}else if(/^blob\:/i.test(t.src)){var f=new FileReader;f.onload=function(l){i(l.target.result)},ui.objectURLToBlob(t.src,function(l){f.readAsArrayBuffer(l)})}else{var s=new XMLHttpRequest;s.onload=function(){if(this.status==200||this.status===0)i(s.response);else throw"Could not load image";s=null},s.open("GET",t.src,!0),s.responseType="arraybuffer",s.send(null)}else if(self.FileReader&&(t instanceof self.Blob||t instanceof self.File)){var f=new FileReader;f.onload=function(d){i(d.target.result)},f.readAsArrayBuffer(t)}}function D_(t){var n=new DataView(t);let i={};if(n.getUint8(0)!=255||n.getUint8(1)!=216)return!1;for(var o=2,f=t.byteLength,s;o<f&&n.getUint8(o)==255;){if(s=n.getUint8(o+1),s==225)Object.assign(i,L_(n,o+4,n.getUint16(o+2)-2));else if(s===192){let l=n.getUint16(o+7),d=n.getUint16(o+5);return l&&d&&Object.assign(i,{PixelXDimension:l,PixelYDimension:d}),i}o+=2+n.getUint16(o+2)}return i}function gw(t){if("DOMParser"in self){var n=new DataView(t);if(n.getUint8(0)!=255||n.getUint8(1)!=216)return!1;for(var i=2,o=t.byteLength,f=new DOMParser;i<o-4;)if(ui.getStringFromDB(n,i,4)=="http"){var s=i-1,l=n.getUint16(i-2)-1,d=ui.getStringFromDB(n,s,l),v=d.indexOf("xmpmeta>")+8;d=d.substring(d.indexOf("<x:xmpmeta"),v);var M=d.indexOf("x:xmpmeta")+10;d=d.slice(0,M)+'xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tiff="http://ns.adobe.com/tiff/1.0/" xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus" xmlns:ext="http://www.gettyimages.com/xsltExtension/1.0" xmlns:exif="http://ns.adobe.com/exif/1.0/" xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/" xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/" xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/" '+d.slice(M);var B=f.parseFromString(d,"text/xml");return ui.xml2Object(B)}else i++}}function L_(t,n){if(ui.getStringFromDB(t,n,4)!="Exif")return!1;var i,o,f,s,l,d=n+6;if(t.getUint16(d)==18761)i=!1;else if(t.getUint16(d)==19789)i=!0;else return!1;if(t.getUint16(d+2,!i)!=42)return!1;var v=t.getUint32(d+4,!i);if(v<8)return!1;if(o=Nc(t,d,d+v,x_,i),o.ExifIFDPointer){s=Nc(t,d,d+o.ExifIFDPointer,w_,i);for(f in s){switch(f){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":s[f]=Pf[f][s[f]];break;case"ExifVersion":case"FlashpixVersion":s[f]=String.fromCharCode(s[f][0],s[f][1],s[f][2],s[f][3]);break;case"ComponentsConfiguration":s[f]=Pf.Components[s[f][0]]+Pf.Components[s[f][1]]+Pf.Components[s[f][2]]+Pf.Components[s[f][3]];break}o[f]=s[f]}}if(o.GPSInfoIFDPointer){l=Nc(t,d,d+o.GPSInfoIFDPointer,S_,i);for(f in l){switch(f){case"GPSVersionID":l[f]=l[f][0]+"."+l[f][1]+"."+l[f][2]+"."+l[f][3];break}o[f]=l[f]}}return o}function Nc(t,n,i,o,f){var s=t.getUint16(i,!f),l={},d,v,M;for(M=0;M<s;M++)d=i+M*12+2,v=o[t.getUint16(d,!f)],l[v]=R_(t,d,n,i,f);return l}function R_(t,n,i,o,f){var s=t.getUint16(n+2,!f),l=t.getUint32(n+4,!f),d=t.getUint32(n+8,!f)+i,v,M,B,p,U,q;switch(s){case 1:case 7:if(l==1)return t.getUint8(n+8,!f);for(v=l>4?d:n+8,M=[],p=0;p<l;p++)M[p]=t.getUint8(v+p);return M;case 2:return v=l>4?d:n+8,ui.getStringFromDB(t,v,l-1);case 3:if(l==1)return t.getUint16(n+8,!f);for(v=l>2?d:n+8,M=[],p=0;p<l;p++)M[p]=t.getUint16(v+2*p,!f);return M;case 4:if(l==1)return t.getUint32(n+8,!f);for(M=[],p=0;p<l;p++)M[p]=t.getUint32(d+4*p,!f);return M;case 5:if(l==1)return U=t.getUint32(d,!f),q=t.getUint32(d+4,!f),B=new Number(U/q),B.numerator=U,B.denominator=q,B;for(M=[],p=0;p<l;p++)U=t.getUint32(d+8*p,!f),q=t.getUint32(d+4+8*p,!f),M[p]=new Number(U/q),M[p].numerator=U,M[p].denominator=q;return M;case 9:if(l==1)return t.getInt32(n+8,!f);for(M=[],p=0;p<l;p++)M[p]=t.getInt32(d+4*p,!f);return M;case 10:if(l==1)return t.getInt32(d,!f)/t.getInt32(d+4,!f);for(M=[],p=0;p<l;p++)M[p]=t.getInt32(d+8*p,!f)/t.getInt32(d+4+8*p,!f);return M}}const C_=function(t){if(!ui.imageHasData(t))return{};var n,i=t.exifdata,o={};for(n in i)i.hasOwnProperty(n)&&(o[n]=i[n]);return o},Bc=t=>new Promise((n,i)=>{T_(t,function(o,f){if(f){i(f);return}let s=C_(o),l=JSON.parse(JSON.stringify(s).replaceAll("\\u0000",""))||{};n(l)})});let eu;const O_=new Uint8Array(16);function M_(){if(!eu&&(eu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!eu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return eu(O_)}const Pn=[];for(let t=0;t<256;++t)Pn.push((t+256).toString(16).slice(1));function I_(t,n=0){return(Pn[t[n+0]]+Pn[t[n+1]]+Pn[t[n+2]]+Pn[t[n+3]]+"-"+Pn[t[n+4]]+Pn[t[n+5]]+"-"+Pn[t[n+6]]+Pn[t[n+7]]+"-"+Pn[t[n+8]]+Pn[t[n+9]]+"-"+Pn[t[n+10]]+Pn[t[n+11]]+Pn[t[n+12]]+Pn[t[n+13]]+Pn[t[n+14]]+Pn[t[n+15]]).toLowerCase()}const u0={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function F_(t,n,i){if(u0.randomUUID&&!n&&!t)return u0.randomUUID();t=t||{};const o=t.random||(t.rng||M_)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,n){i=i||0;for(let f=0;f<16;++f)n[i+f]=o[f];return n}return I_(o)}//! moment.js
1
+ (function(ir,di){typeof exports=="object"&&typeof module<"u"?di(exports):typeof define=="function"&&define.amd?define(["exports"],di):(ir=typeof globalThis<"u"?globalThis:ir||self,di(ir.catchUtil={}))})(this,function(ir){"use strict";const di={imageHasData(t){return!!t.exifdata},getStringFromDB(t,n,i){for(var a="",f=n;f<n+i;f++)a+=String.fromCharCode(t.getUint8(f));return a},xml2Object(t){try{var n={};if(t.children.length>0)for(var i=0;i<t.children.length;i++){var a=t.children.item(i),f=a.attributes;for(var s in f){var l=f[s],d=l.nodeName,v=l.nodeValue;d!==void 0&&(n[d]=v)}var I=a.nodeName;if(typeof n[I]>"u")n[I]=this.xml2json(a);else{if(typeof n[I].push>"u"){var B=n[I];n[I]=[],n[I].push(B)}n[I].push(this.xml2json(a))}}else n=t.textContent;return n}catch(p){console.log(p.message)}},xml2json(t){var n={};if(t.nodeType==1){if(t.attributes.length>0){n["@attributes"]={};for(var i=0;i<t.attributes.length;i++){var a=t.attributes.item(i);n["@attributes"][a.nodeName]=a.nodeValue}}}else if(t.nodeType==3)return t.nodeValue;if(t.hasChildNodes())for(var f=0;f<t.childNodes.length;f++){var s=t.childNodes.item(f),l=s.nodeName;if(n[l]==null)n[l]=this.xml2json(s);else{if(n[l].push==null){var d=n[l];n[l]=[],n[l].push(d)}n[l].push(this.xml2json(s))}}return n},objectURLToBlob(t,n){var i=new XMLHttpRequest;i.open("GET",t,!0),i.responseType="blob",i.onload=function(a){(this.status==200||this.status===0)&&n(this.response)},i.send()},base64ToArrayBuffer(t,n){n=n||t.match(/^data\:([^\;]+)\;base64,/mi)[1]||"",t=t.replace(/^data\:([^\;]+)\;base64,/gmi,"");for(var i=atob(t),a=i.length,f=new ArrayBuffer(a),s=new Uint8Array(f),l=0;l<a;l++)s[l]=i.charCodeAt(l);return f}},Z_={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},X_={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},zf={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}},q_={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},K_=new TextDecoder,$r=(t,n=0,i=t.length)=>K_.decode(t.slice(n,i)),Bs=(t,n=0,i=t.length)=>t.slice(n,i).reduce((a,f)=>a+("0"+f.toString(16)).slice(-2),""),S0=(t,n=0)=>{const i=t[n]+t[n+1]*256;return i|(i&2**15)*131070},su=(t,n=0)=>t[n]*2**8+t[n+1],ti=(t,n=0)=>t[n]+t[n+1]*2**8,A0=(t,n=0)=>t[n]+t[n+1]*2**8+t[n+2]*2**16,j_=(t,n=0)=>t[n]+t[n+1]*2**8+t[n+2]*2**16+(t[n+3]<<24),bn=(t,n=0)=>t[n]*2**24+t[n+1]*2**16+t[n+2]*2**8+t[n+3],Ko=(t,n=0)=>t[n]+t[n+1]*2**8+t[n+2]*2**16+t[n+3]*2**24,Q_={readUInt16BE:su,readUInt16LE:ti,readUInt32BE:bn,readUInt32LE:Ko};function Ui(t,n,i,a){i=i||0;const f=a?"BE":"LE",s="readUInt"+n+f;return Q_[s](t,i)}function J_(t,n){if(t.length-n<4)return;const i=bn(t,n);if(!(t.length-n<i))return{name:$r(t,4+n,8+n),offset:n,size:i}}function jo(t,n,i){for(;i<t.length;){const a=J_(t,i);if(!a)break;if(a.name===n)return a;i+=a.size}}const ep={validate:t=>$r(t,0,2)==="BM",calculate:t=>({height:Math.abs(j_(t,22)),width:Ko(t,18)})},tp=1,rp=2+2+2,np=1+1+1+1+2+2+4+4;function T0(t,n){const i=t[n];return i===0?256:i}function E0(t,n){const i=rp+n*np;return{height:T0(t,i+1),width:T0(t,i)}}const D0={validate(t){const n=ti(t,0),i=ti(t,4);return n!==0||i===0?!1:ti(t,2)===tp},calculate(t){const n=ti(t,4),i=E0(t,0);if(n===1)return i;const a=[i];for(let f=1;f<n;f+=1)a.push(E0(t,f));return{height:i.height,images:a,width:i.width}}},ip=2,ap={validate(t){const n=ti(t,0),i=ti(t,4);return n!==0||i===0?!1:ti(t,2)===ip},calculate:t=>D0.calculate(t)},op={validate:t=>Ko(t,0)===542327876,calculate:t=>({height:Ko(t,12),width:Ko(t,16)})},sp=/^GIF8[79]a/,fp={validate:t=>sp.test($r(t,0,6)),calculate:t=>({height:ti(t,8),width:ti(t,6)})},lp={avif:"avif",mif1:"heif",msf1:"heif",heic:"heic",heix:"heic",hevc:"heic",hevx:"heic"},up={validate(t){const n=$r(t,4,8),i=$r(t,8,12);return n==="ftyp"&&i in lp},calculate(t){const n=jo(t,"meta",0),i=n&&jo(t,"iprp",n.offset+12),a=i&&jo(t,"ipco",i.offset+8),f=a&&jo(t,"ispe",a.offset+8);if(f)return{height:bn(t,f.offset+16),width:bn(t,f.offset+12),type:$r(t,8,12)};throw new TypeError("Invalid HEIF, no size found")}},cp=4+4,hp=4,dp=4,vp={ICON:32,"ICN#":32,"icm#":16,icm4:16,icm8:16,"ics#":16,ics4:16,ics8:16,is32:16,s8mk:16,icp4:16,icl4:32,icl8:32,il32:32,l8mk:32,icp5:32,ic11:32,ich4:48,ich8:48,ih32:48,h8mk:48,icp6:64,ic12:32,it32:128,t8mk:128,ic07:128,ic08:256,ic13:256,ic09:512,ic14:512,ic10:1024};function L0(t,n){const i=n+dp;return[$r(t,n,i),bn(t,i)]}function R0(t){const n=vp[t];return{width:n,height:n,type:t}}const _p={validate:t=>$r(t,0,4)==="icns",calculate(t){const n=t.length,i=bn(t,hp);let a=cp,f=L0(t,a),s=R0(f[0]);if(a+=f[1],a===i)return s;const l={height:s.height,images:[s],width:s.width};for(;a<i&&a<n;)f=L0(t,a),s=R0(f[0]),a+=f[1],l.images.push(s);return l}},pp={validate:t=>Bs(t,0,4)==="ff4fff51",calculate:t=>({height:bn(t,12),width:bn(t,8)})},mp={validate(t){if(bn(t,4)!==1783636e3||bn(t,0)<1)return!1;const n=jo(t,"ftyp",0);return n?bn(t,n.offset+4)===1718909296:!1},calculate(t){const n=jo(t,"jp2h",0),i=n&&jo(t,"ihdr",n.offset+8);if(i)return{height:bn(t,i.offset+8),width:bn(t,i.offset+12)};throw new TypeError("Unsupported JPEG 2000 format")}},gp="45786966",yp=2,Xc=6,xp=2,bp="4d4d",wp="4949",C0=12,Sp=2;function Ap(t){return Bs(t,2,6)===gp}function Tp(t,n){return{height:su(t,n),width:su(t,n+2)}}function Ep(t,n){const a=Xc+8,f=Ui(t,16,a,n);for(let s=0;s<f;s++){const l=a+Sp+s*C0,d=l+C0;if(l>t.length)return;const v=t.slice(l,d);if(Ui(v,16,0,n)===274)return Ui(v,16,2,n)!==3||Ui(v,32,4,n)!==1?void 0:Ui(v,16,8,n)}}function Dp(t,n){const i=t.slice(yp,n),a=Bs(i,Xc,Xc+xp),f=a===bp;if(f||a===wp)return Ep(i,f)}function Lp(t,n){if(n>t.length)throw new TypeError("Corrupt JPG, exceeded buffer limits");if(t[n]!==255)throw new TypeError("Invalid JPG, marker table corrupted")}const Rp={validate:t=>Bs(t,0,2)==="ffd8",calculate(t){t=t.slice(4);let n,i;for(;t.length;){const a=su(t,0);if(Ap(t)&&(n=Dp(t,a)),Lp(t,a),i=t[a+1],i===192||i===193||i===194){const f=Tp(t,a+5);return n?{height:f.height,orientation:n,width:f.width}:f}t=t.slice(a+2)}throw new TypeError("Invalid JPG, no size found")}},Cp={validate:t=>{const n=$r(t,1,7);return["KTX 11","KTX 20"].includes(n)},calculate:t=>{const n=t[5]===49?"ktx":"ktx2",i=n==="ktx"?36:20;return{height:Ko(t,i+4),width:Ko(t,i),type:n}}},Op=`PNG\r
2
+ 
3
+ `,Ip="IHDR",O0="CgBI",Mp={validate(t){if(Op===$r(t,1,8)){let n=$r(t,12,16);if(n===O0&&(n=$r(t,28,32)),n!==Ip)throw new TypeError("Invalid PNG");return!0}return!1},calculate(t){return $r(t,12,16)===O0?{height:bn(t,36),width:bn(t,32)}:{height:bn(t,20),width:bn(t,16)}}},I0={P1:"pbm/ascii",P2:"pgm/ascii",P3:"ppm/ascii",P4:"pbm",P5:"pgm",P6:"ppm",P7:"pam",PF:"pfm"},M0={default:t=>{let n=[];for(;t.length>0;){const i=t.shift();if(i[0]!=="#"){n=i.split(" ");break}}if(n.length===2)return{height:parseInt(n[1],10),width:parseInt(n[0],10)};throw new TypeError("Invalid PNM")},pam:t=>{const n={};for(;t.length>0;){const i=t.shift();if(i.length>16||i.charCodeAt(0)>128)continue;const[a,f]=i.split(" ");if(a&&f&&(n[a.toLowerCase()]=parseInt(f,10)),n.height&&n.width)break}if(n.height&&n.width)return{height:n.height,width:n.width};throw new TypeError("Invalid PAM")}},Fp={validate:t=>$r(t,0,2)in I0,calculate(t){const n=$r(t,0,2),i=I0[n],a=$r(t,3).split(/[\r\n]+/);return(M0[i]||M0.default)(a)}},kp={validate:t=>$r(t,0,4)==="8BPS",calculate:t=>({height:bn(t,14),width:bn(t,18)})},F0=/<svg\s([^>"']|"[^"]*"|'[^']*')*>/,fu={height:/\sheight=(['"])([^%]+?)\1/,root:F0,viewbox:/\sviewBox=(['"])(.+?)\1/i,width:/\swidth=(['"])([^%]+?)\1/},qc=2.54,k0={in:96,cm:96/qc,em:16,ex:8,m:96/qc*100,mm:96/qc/10,pc:96/72/12,pt:96/72,px:1},Pp=new RegExp(`^([0-9.]+(?:e\\d+)?)(${Object.keys(k0).join("|")})?$`);function lu(t){const n=Pp.exec(t);if(!!n)return Math.round(Number(n[1])*(k0[n[2]]||1))}function Np(t){const n=t.split(" ");return{height:lu(n[3]),width:lu(n[2])}}function Bp(t){const n=t.match(fu.width),i=t.match(fu.height),a=t.match(fu.viewbox);return{height:i&&lu(i[2]),viewbox:a&&Np(a[2]),width:n&&lu(n[2])}}function Gp(t){return{height:t.height,width:t.width}}function Up(t,n){const i=n.width/n.height;return t.width?{height:Math.floor(t.width/i),width:t.width}:t.height?{height:t.height,width:Math.floor(t.height*i)}:{height:n.height,width:n.width}}const Yp={validate:t=>F0.test($r(t,0,1e3)),calculate(t){const n=$r(t).match(fu.root);if(n){const i=Bp(n[0]);if(i.width&&i.height)return Gp(i);if(i.viewbox)return Up(i,i.viewbox)}throw new TypeError("Invalid SVG")}},Hp={validate(t){return ti(t,0)===0&&ti(t,4)===0},calculate(t){return{height:ti(t,14),width:ti(t,12)}}};function zp(t,n){const i=Ui(t,32,4,n);return t.slice(i+2)}function Wp(t,n){const i=Ui(t,16,8,n);return(Ui(t,16,10,n)<<16)+i}function Vp(t){if(t.length>24)return t.slice(12)}function $p(t,n){const i={};let a=t;for(;a&&a.length;){const f=Ui(a,16,0,n),s=Ui(a,16,2,n),l=Ui(a,32,4,n);if(f===0)break;l===1&&(s===3||s===4)&&(i[f]=Wp(a,n)),a=Vp(a)}return i}function Zp(t){const n=$r(t,0,2);if(n==="II")return"LE";if(n==="MM")return"BE"}const Xp=["49492a00","4d4d002a"],qp={validate:t=>Xp.includes(Bs(t,0,4)),calculate(t){const n=Zp(t)==="BE",i=zp(t,n),a=$p(i,n),f=a[256],s=a[257];if(!f||!s)throw new TypeError("Invalid Tiff. Missing tags");return{height:s,width:f}}};function Kp(t){return{height:1+A0(t,7),width:1+A0(t,4)}}function jp(t){return{height:1+((t[4]&15)<<10|t[3]<<2|(t[2]&192)>>6),width:1+((t[2]&63)<<8|t[1])}}function Qp(t){return{height:S0(t,8)&16383,width:S0(t,6)&16383}}const Jp={validate(t){const n=$r(t,0,4)==="RIFF",i=$r(t,8,12)==="WEBP",a=$r(t,12,15)==="VP8";return n&&i&&a},calculate(t){const n=$r(t,12,16);if(t=t.slice(20,30),n==="VP8X"){const a=t[0],f=(a&192)===0,s=(a&1)===0;if(f&&s)return Kp(t);throw new TypeError("Invalid WebP")}if(n==="VP8 "&&t[0]!==47)return Qp(t);const i=Bs(t,3,6);if(n==="VP8L"&&i!=="9d012a")return jp(t);throw new TypeError("Invalid WebP")}},uu=new Map([["bmp",ep],["cur",ap],["dds",op],["gif",fp],["heif",up],["icns",_p],["ico",D0],["j2c",pp],["jp2",mp],["jpg",Rp],["ktx",Cp],["png",Mp],["pnm",Fp],["psd",kp],["svg",Yp],["tga",Hp],["tiff",qp],["webp",Jp]]),em=Array.from(uu.keys()),tm=new Map([[56,"psd"],[66,"bmp"],[68,"dds"],[71,"gif"],[73,"tiff"],[77,"tiff"],[82,"webp"],[105,"icns"],[137,"png"],[255,"jpg"]]);function rm(t){const n=t[0],i=tm.get(n);return i&&uu.get(i).validate(t)?i:em.find(a=>uu.get(a).validate(t))}const nm={disabledTypes:[]};function im(t){var i;const n=rm(t);if(typeof n<"u"){if(nm.disabledTypes.indexOf(n)>-1)throw new TypeError("disabled file type: "+n);const a=uu.get(n).calculate(t);if(a!==void 0)return a.type=(i=a.type)!=null?i:n,a}throw new TypeError("unsupported file type: "+n)}var am=!1;const om=function(t,n){return(self.Image&&t instanceof self.Image||self.HTMLImageElement&&t instanceof self.HTMLImageElement)&&!t.complete?(n(null,new Error("\u4E0D\u652F\u6301\u7684\u683C\u5F0F")),!1):(di.imageHasData(t)?n&&n(t):sm(t,n),!0)};function sm(t,n){function i(l){try{var d=fm(l);t.exifdata=d||{};var v;n&&n(t)}catch(I){n(null,I)}}if(t.src)if(/^data\:/i.test(t.src)){var a=di.base64ToArrayBuffer(t.src);i(a)}else if(/^blob\:/i.test(t.src)){var f=new FileReader;f.onload=function(l){i(l.target.result)},di.objectURLToBlob(t.src,function(l){f.readAsArrayBuffer(l)})}else{var s=new XMLHttpRequest;s.onload=function(){if(this.status==200||this.status===0)i(s.response);else throw"Could not load image";s=null},s.open("GET",t.src,!0),s.responseType="arraybuffer",s.send(null)}else if(self.FileReader&&(t instanceof self.Blob||t instanceof self.File)){var f=new FileReader;f.onload=function(d){i(d.target.result)},f.readAsArrayBuffer(t)}}function fm(t){var n=new DataView(t);let i={};for(var a=2,f=t.byteLength,s;a<f&&n.getUint8(a)==255;){if(s=n.getUint8(a+1),s==225){i=lm(n,a+4,n.getUint16(a+2)-2);break}a+=2+n.getUint16(a+2)}let l=im(new Uint8Array(t));return Object.assign(i,{PixelXDimension:l.width,PixelYDimension:l.height}),i}function JS(t){if("DOMParser"in self){var n=new DataView(t);if(n.getUint8(0)!=255||n.getUint8(1)!=216)return!1;for(var i=2,a=t.byteLength,f=new DOMParser;i<a-4;)if(di.getStringFromDB(n,i,4)=="http"){var s=i-1,l=n.getUint16(i-2)-1,d=di.getStringFromDB(n,s,l),v=d.indexOf("xmpmeta>")+8;d=d.substring(d.indexOf("<x:xmpmeta"),v);var I=d.indexOf("x:xmpmeta")+10;d=d.slice(0,I)+'xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tiff="http://ns.adobe.com/tiff/1.0/" xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus" xmlns:ext="http://www.gettyimages.com/xsltExtension/1.0" xmlns:exif="http://ns.adobe.com/exif/1.0/" xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/" xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/" xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/" '+d.slice(I);var B=f.parseFromString(d,"text/xml");return di.xml2Object(B)}else i++}}function lm(t,n){if(di.getStringFromDB(t,n,4)!="Exif")return!1;var i,a,f,s,l,d=n+6;if(t.getUint16(d)==18761)i=!1;else if(t.getUint16(d)==19789)i=!0;else return!1;if(t.getUint16(d+2,!i)!=42)return!1;var v=t.getUint32(d+4,!i);if(v<8)return!1;if(a=Kc(t,d,d+v,Z_,i),a.ExifIFDPointer){s=Kc(t,d,d+a.ExifIFDPointer,X_,i);for(f in s){switch(f){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":s[f]=zf[f][s[f]];break;case"ExifVersion":case"FlashpixVersion":s[f]=String.fromCharCode(s[f][0],s[f][1],s[f][2],s[f][3]);break;case"ComponentsConfiguration":s[f]=zf.Components[s[f][0]]+zf.Components[s[f][1]]+zf.Components[s[f][2]]+zf.Components[s[f][3]];break}a[f]=s[f]}}if(a.GPSInfoIFDPointer){l=Kc(t,d,d+a.GPSInfoIFDPointer,q_,i);for(f in l){switch(f){case"GPSVersionID":l[f]=l[f][0]+"."+l[f][1]+"."+l[f][2]+"."+l[f][3];break}a[f]=l[f]}}return a}function Kc(t,n,i,a,f){var s=t.getUint16(i,!f),l={},d,v,I;for(I=0;I<s;I++)d=i+I*12+2,v=a[t.getUint16(d,!f)],l[v]=um(t,d,n,i,f);return l}function um(t,n,i,a,f){var s=t.getUint16(n+2,!f),l=t.getUint32(n+4,!f),d=t.getUint32(n+8,!f)+i,v,I,B,p,U,q;switch(s){case 1:case 7:if(l==1)return t.getUint8(n+8,!f);for(v=l>4?d:n+8,I=[],p=0;p<l;p++)I[p]=t.getUint8(v+p);return I;case 2:return v=l>4?d:n+8,di.getStringFromDB(t,v,l-1);case 3:if(l==1)return t.getUint16(n+8,!f);for(v=l>2?d:n+8,I=[],p=0;p<l;p++)I[p]=t.getUint16(v+2*p,!f);return I;case 4:if(l==1)return t.getUint32(n+8,!f);for(I=[],p=0;p<l;p++)I[p]=t.getUint32(d+4*p,!f);return I;case 5:if(l==1)return U=t.getUint32(d,!f),q=t.getUint32(d+4,!f),B=new Number(U/q),B.numerator=U,B.denominator=q,B;for(I=[],p=0;p<l;p++)U=t.getUint32(d+8*p,!f),q=t.getUint32(d+4+8*p,!f),I[p]=new Number(U/q),I[p].numerator=U,I[p].denominator=q;return I;case 9:if(l==1)return t.getInt32(n+8,!f);for(I=[],p=0;p<l;p++)I[p]=t.getInt32(d+4*p,!f);return I;case 10:if(l==1)return t.getInt32(d,!f)/t.getInt32(d+4,!f);for(I=[],p=0;p<l;p++)I[p]=t.getInt32(d+8*p,!f)/t.getInt32(d+4+8*p,!f);return I}}const cm=function(t){if(!di.imageHasData(t))return{};var n,i=t.exifdata,a={};for(n in i)i.hasOwnProperty(n)&&(a[n]=i[n]);return a},jc=t=>new Promise((n,i)=>{om(t,function(a,f){if(f){i(f);return}let s=cm(a),l=JSON.parse(JSON.stringify(s).replaceAll("\\u0000",""))||{};n(l)})});let cu;const hm=new Uint8Array(16);function dm(){if(!cu&&(cu=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!cu))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return cu(hm)}const Bn=[];for(let t=0;t<256;++t)Bn.push((t+256).toString(16).slice(1));function vm(t,n=0){return(Bn[t[n+0]]+Bn[t[n+1]]+Bn[t[n+2]]+Bn[t[n+3]]+"-"+Bn[t[n+4]]+Bn[t[n+5]]+"-"+Bn[t[n+6]]+Bn[t[n+7]]+"-"+Bn[t[n+8]]+Bn[t[n+9]]+"-"+Bn[t[n+10]]+Bn[t[n+11]]+Bn[t[n+12]]+Bn[t[n+13]]+Bn[t[n+14]]+Bn[t[n+15]]).toLowerCase()}const P0={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function _m(t,n,i){if(P0.randomUUID&&!n&&!t)return P0.randomUUID();t=t||{};const a=t.random||(t.rng||dm)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,n){i=i||0;for(let f=0;f<16;++f)n[i+f]=a[f];return n}return vm(a)}//! moment.js
2
4
  //! version : 2.29.4
3
5
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
4
6
  //! license : MIT
5
7
  //! momentjs.com
6
- var c0;function _t(){return c0.apply(null,arguments)}function k_(t){c0=t}function Ni(t){return t instanceof Array||Object.prototype.toString.call(t)==="[object Array]"}function $o(t){return t!=null&&Object.prototype.toString.call(t)==="[object Object]"}function Sr(t,n){return Object.prototype.hasOwnProperty.call(t,n)}function Gc(t){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(t).length===0;var n;for(n in t)if(Sr(t,n))return!1;return!0}function Jn(t){return t===void 0}function Ta(t){return typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]"}function Nf(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function h0(t,n){var i=[],o,f=t.length;for(o=0;o<f;++o)i.push(n(t[o],o));return i}function vo(t,n){for(var i in n)Sr(n,i)&&(t[i]=n[i]);return Sr(n,"toString")&&(t.toString=n.toString),Sr(n,"valueOf")&&(t.valueOf=n.valueOf),t}function ia(t,n,i,o){return G0(t,n,i,o,!0).utc()}function P_(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function tr(t){return t._pf==null&&(t._pf=P_()),t._pf}var Uc;Array.prototype.some?Uc=Array.prototype.some:Uc=function(t){var n=Object(this),i=n.length>>>0,o;for(o=0;o<i;o++)if(o in n&&t.call(this,n[o],o,n))return!0;return!1};function Yc(t){if(t._isValid==null){var n=tr(t),i=Uc.call(n.parsedDateParts,function(f){return f!=null}),o=!isNaN(t._d.getTime())&&n.overflow<0&&!n.empty&&!n.invalidEra&&!n.invalidMonth&&!n.invalidWeekday&&!n.weekdayMismatch&&!n.nullInput&&!n.invalidFormat&&!n.userInvalidated&&(!n.meridiem||n.meridiem&&i);if(t._strict&&(o=o&&n.charsLeftOver===0&&n.unusedTokens.length===0&&n.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(t))t._isValid=o;else return o}return t._isValid}function tu(t){var n=ia(NaN);return t!=null?vo(tr(n),t):tr(n).userInvalidated=!0,n}var d0=_t.momentProperties=[],Hc=!1;function zc(t,n){var i,o,f,s=d0.length;if(Jn(n._isAMomentObject)||(t._isAMomentObject=n._isAMomentObject),Jn(n._i)||(t._i=n._i),Jn(n._f)||(t._f=n._f),Jn(n._l)||(t._l=n._l),Jn(n._strict)||(t._strict=n._strict),Jn(n._tzm)||(t._tzm=n._tzm),Jn(n._isUTC)||(t._isUTC=n._isUTC),Jn(n._offset)||(t._offset=n._offset),Jn(n._pf)||(t._pf=tr(n)),Jn(n._locale)||(t._locale=n._locale),s>0)for(i=0;i<s;i++)o=d0[i],f=n[o],Jn(f)||(t[o]=f);return t}function Bf(t){zc(this,t),this._d=new Date(t._d!=null?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Hc===!1&&(Hc=!0,_t.updateOffset(this),Hc=!1)}function Bi(t){return t instanceof Bf||t!=null&&t._isAMomentObject!=null}function v0(t){_t.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+t)}function Di(t,n){var i=!0;return vo(function(){if(_t.deprecationHandler!=null&&_t.deprecationHandler(null,t),i){var o=[],f,s,l,d=arguments.length;for(s=0;s<d;s++){if(f="",typeof arguments[s]=="object"){f+=`
7
- [`+s+"] ";for(l in arguments[0])Sr(arguments[0],l)&&(f+=l+": "+arguments[0][l]+", ");f=f.slice(0,-2)}else f=arguments[s];o.push(f)}v0(t+`
8
- Arguments: `+Array.prototype.slice.call(o).join("")+`
9
- `+new Error().stack),i=!1}return n.apply(this,arguments)},n)}var _0={};function p0(t,n){_t.deprecationHandler!=null&&_t.deprecationHandler(t,n),_0[t]||(v0(n),_0[t]=!0)}_t.suppressDeprecationWarnings=!1,_t.deprecationHandler=null;function aa(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function N_(t){var n,i;for(i in t)Sr(t,i)&&(n=t[i],aa(n)?this[i]=n:this["_"+i]=n);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Wc(t,n){var i=vo({},t),o;for(o in n)Sr(n,o)&&($o(t[o])&&$o(n[o])?(i[o]={},vo(i[o],t[o]),vo(i[o],n[o])):n[o]!=null?i[o]=n[o]:delete i[o]);for(o in t)Sr(t,o)&&!Sr(n,o)&&$o(t[o])&&(i[o]=vo({},i[o]));return i}function Vc(t){t!=null&&this.set(t)}var $c;Object.keys?$c=Object.keys:$c=function(t){var n,i=[];for(n in t)Sr(t,n)&&i.push(n);return i};var B_={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function G_(t,n,i){var o=this._calendar[t]||this._calendar.sameElse;return aa(o)?o.call(n,i):o}function oa(t,n,i){var o=""+Math.abs(t),f=n-o.length,s=t>=0;return(s?i?"+":"":"-")+Math.pow(10,Math.max(0,f)).toString().substr(1)+o}var Zc=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ru=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Xc={},Ms={};function Ft(t,n,i,o){var f=o;typeof o=="string"&&(f=function(){return this[o]()}),t&&(Ms[t]=f),n&&(Ms[n[0]]=function(){return oa(f.apply(this,arguments),n[1],n[2])}),i&&(Ms[i]=function(){return this.localeData().ordinal(f.apply(this,arguments),t)})}function U_(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function Y_(t){var n=t.match(Zc),i,o;for(i=0,o=n.length;i<o;i++)Ms[n[i]]?n[i]=Ms[n[i]]:n[i]=U_(n[i]);return function(f){var s="",l;for(l=0;l<o;l++)s+=aa(n[l])?n[l].call(f,t):n[l];return s}}function nu(t,n){return t.isValid()?(n=m0(n,t.localeData()),Xc[n]=Xc[n]||Y_(n),Xc[n](t)):t.localeData().invalidDate()}function m0(t,n){var i=5;function o(f){return n.longDateFormat(f)||f}for(ru.lastIndex=0;i>=0&&ru.test(t);)t=t.replace(ru,o),ru.lastIndex=0,i-=1;return t}var H_={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function z_(t){var n=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return n||!i?n:(this._longDateFormat[t]=i.match(Zc).map(function(o){return o==="MMMM"||o==="MM"||o==="DD"||o==="dddd"?o.slice(1):o}).join(""),this._longDateFormat[t])}var W_="Invalid date";function V_(){return this._invalidDate}var $_="%d",Z_=/\d{1,2}/;function X_(t){return this._ordinal.replace("%d",t)}var q_={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function K_(t,n,i,o){var f=this._relativeTime[i];return aa(f)?f(t,n,i,o):f.replace(/%d/i,t)}function j_(t,n){var i=this._relativeTime[t>0?"future":"past"];return aa(i)?i(n):i.replace(/%s/i,n)}var Gf={};function Yn(t,n){var i=t.toLowerCase();Gf[i]=Gf[i+"s"]=Gf[n]=t}function Li(t){return typeof t=="string"?Gf[t]||Gf[t.toLowerCase()]:void 0}function qc(t){var n={},i,o;for(o in t)Sr(t,o)&&(i=Li(o),i&&(n[i]=t[o]));return n}var g0={};function Hn(t,n){g0[t]=n}function Q_(t){var n=[],i;for(i in t)Sr(t,i)&&n.push({unit:i,priority:g0[i]});return n.sort(function(o,f){return o.priority-f.priority}),n}function iu(t){return t%4===0&&t%100!==0||t%400===0}function Ri(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function fr(t){var n=+t,i=0;return n!==0&&isFinite(n)&&(i=Ri(n)),i}function Is(t,n){return function(i){return i!=null?(y0(this,t,i),_t.updateOffset(this,n),this):au(this,t)}}function au(t,n){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+n]():NaN}function y0(t,n,i){t.isValid()&&!isNaN(i)&&(n==="FullYear"&&iu(t.year())&&t.month()===1&&t.date()===29?(i=fr(i),t._d["set"+(t._isUTC?"UTC":"")+n](i,t.month(),hu(i,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+n](i))}function J_(t){return t=Li(t),aa(this[t])?this[t]():this}function ep(t,n){if(typeof t=="object"){t=qc(t);var i=Q_(t),o,f=i.length;for(o=0;o<f;o++)this[i[o].unit](t[i[o].unit])}else if(t=Li(t),aa(this[t]))return this[t](n);return this}var b0=/\d/,ci=/\d\d/,x0=/\d{3}/,Kc=/\d{4}/,ou=/[+-]?\d{6}/,Gr=/\d\d?/,w0=/\d\d\d\d?/,S0=/\d\d\d\d\d\d?/,su=/\d{1,3}/,jc=/\d{1,4}/,fu=/[+-]?\d{1,6}/,Fs=/\d+/,lu=/[+-]?\d+/,tp=/Z|[+-]\d\d:?\d\d/gi,uu=/Z|[+-]\d\d(?::?\d\d)?/gi,rp=/[+-]?\d+(\.\d{1,3})?/,Uf=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,cu;cu={};function xt(t,n,i){cu[t]=aa(n)?n:function(o,f){return o&&i?i:n}}function np(t,n){return Sr(cu,t)?cu[t](n._strict,n._locale):new RegExp(ip(t))}function ip(t){return hi(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,i,o,f,s){return i||o||f||s}))}function hi(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var Qc={};function Ir(t,n){var i,o=n,f;for(typeof t=="string"&&(t=[t]),Ta(n)&&(o=function(s,l){l[n]=fr(s)}),f=t.length,i=0;i<f;i++)Qc[t[i]]=o}function Yf(t,n){Ir(t,function(i,o,f,s){f._w=f._w||{},n(i,f._w,f,s)})}function ap(t,n,i){n!=null&&Sr(Qc,t)&&Qc[t](n,i._a,i,t)}var zn=0,Ea=1,sa=2,bn=3,Gi=4,Da=5,Zo=6,op=7,sp=8;function fp(t,n){return(t%n+n)%n}var nn;Array.prototype.indexOf?nn=Array.prototype.indexOf:nn=function(t){var n;for(n=0;n<this.length;++n)if(this[n]===t)return n;return-1};function hu(t,n){if(isNaN(t)||isNaN(n))return NaN;var i=fp(n,12);return t+=(n-i)/12,i===1?iu(t)?29:28:31-i%7%2}Ft("M",["MM",2],"Mo",function(){return this.month()+1}),Ft("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),Ft("MMMM",0,0,function(t){return this.localeData().months(this,t)}),Yn("month","M"),Hn("month",8),xt("M",Gr),xt("MM",Gr,ci),xt("MMM",function(t,n){return n.monthsShortRegex(t)}),xt("MMMM",function(t,n){return n.monthsRegex(t)}),Ir(["M","MM"],function(t,n){n[Ea]=fr(t)-1}),Ir(["MMM","MMMM"],function(t,n,i,o){var f=i._locale.monthsParse(t,o,i._strict);f!=null?n[Ea]=f:tr(i).invalidMonth=t});var lp="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),A0="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),T0=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,up=Uf,cp=Uf;function hp(t,n){return t?Ni(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||T0).test(n)?"format":"standalone"][t.month()]:Ni(this._months)?this._months:this._months.standalone}function dp(t,n){return t?Ni(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[T0.test(n)?"format":"standalone"][t.month()]:Ni(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function vp(t,n,i){var o,f,s,l=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],o=0;o<12;++o)s=ia([2e3,o]),this._shortMonthsParse[o]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[o]=this.months(s,"").toLocaleLowerCase();return i?n==="MMM"?(f=nn.call(this._shortMonthsParse,l),f!==-1?f:null):(f=nn.call(this._longMonthsParse,l),f!==-1?f:null):n==="MMM"?(f=nn.call(this._shortMonthsParse,l),f!==-1?f:(f=nn.call(this._longMonthsParse,l),f!==-1?f:null)):(f=nn.call(this._longMonthsParse,l),f!==-1?f:(f=nn.call(this._shortMonthsParse,l),f!==-1?f:null))}function _p(t,n,i){var o,f,s;if(this._monthsParseExact)return vp.call(this,t,n,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),o=0;o<12;o++){if(f=ia([2e3,o]),i&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(f,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(f,"").replace(".","")+"$","i")),!i&&!this._monthsParse[o]&&(s="^"+this.months(f,"")+"|^"+this.monthsShort(f,""),this._monthsParse[o]=new RegExp(s.replace(".",""),"i")),i&&n==="MMMM"&&this._longMonthsParse[o].test(t))return o;if(i&&n==="MMM"&&this._shortMonthsParse[o].test(t))return o;if(!i&&this._monthsParse[o].test(t))return o}}function E0(t,n){var i;if(!t.isValid())return t;if(typeof n=="string"){if(/^\d+$/.test(n))n=fr(n);else if(n=t.localeData().monthsParse(n),!Ta(n))return t}return i=Math.min(t.date(),hu(t.year(),n)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](n,i),t}function D0(t){return t!=null?(E0(this,t),_t.updateOffset(this,!0),this):au(this,"Month")}function pp(){return hu(this.year(),this.month())}function mp(t){return this._monthsParseExact?(Sr(this,"_monthsRegex")||L0.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(Sr(this,"_monthsShortRegex")||(this._monthsShortRegex=up),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function gp(t){return this._monthsParseExact?(Sr(this,"_monthsRegex")||L0.call(this),t?this._monthsStrictRegex:this._monthsRegex):(Sr(this,"_monthsRegex")||(this._monthsRegex=cp),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function L0(){function t(l,d){return d.length-l.length}var n=[],i=[],o=[],f,s;for(f=0;f<12;f++)s=ia([2e3,f]),n.push(this.monthsShort(s,"")),i.push(this.months(s,"")),o.push(this.months(s,"")),o.push(this.monthsShort(s,""));for(n.sort(t),i.sort(t),o.sort(t),f=0;f<12;f++)n[f]=hi(n[f]),i[f]=hi(i[f]);for(f=0;f<24;f++)o[f]=hi(o[f]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}Ft("Y",0,0,function(){var t=this.year();return t<=9999?oa(t,4):"+"+t}),Ft(0,["YY",2],0,function(){return this.year()%100}),Ft(0,["YYYY",4],0,"year"),Ft(0,["YYYYY",5],0,"year"),Ft(0,["YYYYYY",6,!0],0,"year"),Yn("year","y"),Hn("year",1),xt("Y",lu),xt("YY",Gr,ci),xt("YYYY",jc,Kc),xt("YYYYY",fu,ou),xt("YYYYYY",fu,ou),Ir(["YYYYY","YYYYYY"],zn),Ir("YYYY",function(t,n){n[zn]=t.length===2?_t.parseTwoDigitYear(t):fr(t)}),Ir("YY",function(t,n){n[zn]=_t.parseTwoDigitYear(t)}),Ir("Y",function(t,n){n[zn]=parseInt(t,10)});function Hf(t){return iu(t)?366:365}_t.parseTwoDigitYear=function(t){return fr(t)+(fr(t)>68?1900:2e3)};var R0=Is("FullYear",!0);function yp(){return iu(this.year())}function bp(t,n,i,o,f,s,l){var d;return t<100&&t>=0?(d=new Date(t+400,n,i,o,f,s,l),isFinite(d.getFullYear())&&d.setFullYear(t)):d=new Date(t,n,i,o,f,s,l),d}function zf(t){var n,i;return t<100&&t>=0?(i=Array.prototype.slice.call(arguments),i[0]=t+400,n=new Date(Date.UTC.apply(null,i)),isFinite(n.getUTCFullYear())&&n.setUTCFullYear(t)):n=new Date(Date.UTC.apply(null,arguments)),n}function du(t,n,i){var o=7+n-i,f=(7+zf(t,0,o).getUTCDay()-n)%7;return-f+o-1}function C0(t,n,i,o,f){var s=(7+i-o)%7,l=du(t,o,f),d=1+7*(n-1)+s+l,v,M;return d<=0?(v=t-1,M=Hf(v)+d):d>Hf(t)?(v=t+1,M=d-Hf(t)):(v=t,M=d),{year:v,dayOfYear:M}}function Wf(t,n,i){var o=du(t.year(),n,i),f=Math.floor((t.dayOfYear()-o-1)/7)+1,s,l;return f<1?(l=t.year()-1,s=f+La(l,n,i)):f>La(t.year(),n,i)?(s=f-La(t.year(),n,i),l=t.year()+1):(l=t.year(),s=f),{week:s,year:l}}function La(t,n,i){var o=du(t,n,i),f=du(t+1,n,i);return(Hf(t)-o+f)/7}Ft("w",["ww",2],"wo","week"),Ft("W",["WW",2],"Wo","isoWeek"),Yn("week","w"),Yn("isoWeek","W"),Hn("week",5),Hn("isoWeek",5),xt("w",Gr),xt("ww",Gr,ci),xt("W",Gr),xt("WW",Gr,ci),Yf(["w","ww","W","WW"],function(t,n,i,o){n[o.substr(0,1)]=fr(t)});function xp(t){return Wf(t,this._week.dow,this._week.doy).week}var wp={dow:0,doy:6};function Sp(){return this._week.dow}function Ap(){return this._week.doy}function Tp(t){var n=this.localeData().week(this);return t==null?n:this.add((t-n)*7,"d")}function Ep(t){var n=Wf(this,1,4).week;return t==null?n:this.add((t-n)*7,"d")}Ft("d",0,"do","day"),Ft("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),Ft("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),Ft("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),Ft("e",0,0,"weekday"),Ft("E",0,0,"isoWeekday"),Yn("day","d"),Yn("weekday","e"),Yn("isoWeekday","E"),Hn("day",11),Hn("weekday",11),Hn("isoWeekday",11),xt("d",Gr),xt("e",Gr),xt("E",Gr),xt("dd",function(t,n){return n.weekdaysMinRegex(t)}),xt("ddd",function(t,n){return n.weekdaysShortRegex(t)}),xt("dddd",function(t,n){return n.weekdaysRegex(t)}),Yf(["dd","ddd","dddd"],function(t,n,i,o){var f=i._locale.weekdaysParse(t,o,i._strict);f!=null?n.d=f:tr(i).invalidWeekday=t}),Yf(["d","e","E"],function(t,n,i,o){n[o]=fr(t)});function Dp(t,n){return typeof t!="string"?t:isNaN(t)?(t=n.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function Lp(t,n){return typeof t=="string"?n.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Jc(t,n){return t.slice(n,7).concat(t.slice(0,n))}var Rp="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),O0="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Cp="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Op=Uf,Mp=Uf,Ip=Uf;function Fp(t,n){var i=Ni(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(n)?"format":"standalone"];return t===!0?Jc(i,this._week.dow):t?i[t.day()]:i}function kp(t){return t===!0?Jc(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function Pp(t){return t===!0?Jc(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Np(t,n,i){var o,f,s,l=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;o<7;++o)s=ia([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(s,"").toLocaleLowerCase();return i?n==="dddd"?(f=nn.call(this._weekdaysParse,l),f!==-1?f:null):n==="ddd"?(f=nn.call(this._shortWeekdaysParse,l),f!==-1?f:null):(f=nn.call(this._minWeekdaysParse,l),f!==-1?f:null):n==="dddd"?(f=nn.call(this._weekdaysParse,l),f!==-1||(f=nn.call(this._shortWeekdaysParse,l),f!==-1)?f:(f=nn.call(this._minWeekdaysParse,l),f!==-1?f:null)):n==="ddd"?(f=nn.call(this._shortWeekdaysParse,l),f!==-1||(f=nn.call(this._weekdaysParse,l),f!==-1)?f:(f=nn.call(this._minWeekdaysParse,l),f!==-1?f:null)):(f=nn.call(this._minWeekdaysParse,l),f!==-1||(f=nn.call(this._weekdaysParse,l),f!==-1)?f:(f=nn.call(this._shortWeekdaysParse,l),f!==-1?f:null))}function Bp(t,n,i){var o,f,s;if(this._weekdaysParseExact)return Np.call(this,t,n,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;o<7;o++){if(f=ia([2e3,1]).day(o),i&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(f,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(f,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(f,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[o]||(s="^"+this.weekdays(f,"")+"|^"+this.weekdaysShort(f,"")+"|^"+this.weekdaysMin(f,""),this._weekdaysParse[o]=new RegExp(s.replace(".",""),"i")),i&&n==="dddd"&&this._fullWeekdaysParse[o].test(t))return o;if(i&&n==="ddd"&&this._shortWeekdaysParse[o].test(t))return o;if(i&&n==="dd"&&this._minWeekdaysParse[o].test(t))return o;if(!i&&this._weekdaysParse[o].test(t))return o}}function Gp(t){if(!this.isValid())return t!=null?this:NaN;var n=this._isUTC?this._d.getUTCDay():this._d.getDay();return t!=null?(t=Dp(t,this.localeData()),this.add(t-n,"d")):n}function Up(t){if(!this.isValid())return t!=null?this:NaN;var n=(this.day()+7-this.localeData()._week.dow)%7;return t==null?n:this.add(t-n,"d")}function Yp(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var n=Lp(t,this.localeData());return this.day(this.day()%7?n:n-7)}else return this.day()||7}function Hp(t){return this._weekdaysParseExact?(Sr(this,"_weekdaysRegex")||eh.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(Sr(this,"_weekdaysRegex")||(this._weekdaysRegex=Op),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function zp(t){return this._weekdaysParseExact?(Sr(this,"_weekdaysRegex")||eh.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Sr(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Mp),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Wp(t){return this._weekdaysParseExact?(Sr(this,"_weekdaysRegex")||eh.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Sr(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ip),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function eh(){function t(B,p){return p.length-B.length}var n=[],i=[],o=[],f=[],s,l,d,v,M;for(s=0;s<7;s++)l=ia([2e3,1]).day(s),d=hi(this.weekdaysMin(l,"")),v=hi(this.weekdaysShort(l,"")),M=hi(this.weekdays(l,"")),n.push(d),i.push(v),o.push(M),f.push(d),f.push(v),f.push(M);n.sort(t),i.sort(t),o.sort(t),f.sort(t),this._weekdaysRegex=new RegExp("^("+f.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+n.join("|")+")","i")}function th(){return this.hours()%12||12}function Vp(){return this.hours()||24}Ft("H",["HH",2],0,"hour"),Ft("h",["hh",2],0,th),Ft("k",["kk",2],0,Vp),Ft("hmm",0,0,function(){return""+th.apply(this)+oa(this.minutes(),2)}),Ft("hmmss",0,0,function(){return""+th.apply(this)+oa(this.minutes(),2)+oa(this.seconds(),2)}),Ft("Hmm",0,0,function(){return""+this.hours()+oa(this.minutes(),2)}),Ft("Hmmss",0,0,function(){return""+this.hours()+oa(this.minutes(),2)+oa(this.seconds(),2)});function M0(t,n){Ft(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),n)})}M0("a",!0),M0("A",!1),Yn("hour","h"),Hn("hour",13);function I0(t,n){return n._meridiemParse}xt("a",I0),xt("A",I0),xt("H",Gr),xt("h",Gr),xt("k",Gr),xt("HH",Gr,ci),xt("hh",Gr,ci),xt("kk",Gr,ci),xt("hmm",w0),xt("hmmss",S0),xt("Hmm",w0),xt("Hmmss",S0),Ir(["H","HH"],bn),Ir(["k","kk"],function(t,n,i){var o=fr(t);n[bn]=o===24?0:o}),Ir(["a","A"],function(t,n,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),Ir(["h","hh"],function(t,n,i){n[bn]=fr(t),tr(i).bigHour=!0}),Ir("hmm",function(t,n,i){var o=t.length-2;n[bn]=fr(t.substr(0,o)),n[Gi]=fr(t.substr(o)),tr(i).bigHour=!0}),Ir("hmmss",function(t,n,i){var o=t.length-4,f=t.length-2;n[bn]=fr(t.substr(0,o)),n[Gi]=fr(t.substr(o,2)),n[Da]=fr(t.substr(f)),tr(i).bigHour=!0}),Ir("Hmm",function(t,n,i){var o=t.length-2;n[bn]=fr(t.substr(0,o)),n[Gi]=fr(t.substr(o))}),Ir("Hmmss",function(t,n,i){var o=t.length-4,f=t.length-2;n[bn]=fr(t.substr(0,o)),n[Gi]=fr(t.substr(o,2)),n[Da]=fr(t.substr(f))});function $p(t){return(t+"").toLowerCase().charAt(0)==="p"}var Zp=/[ap]\.?m?\.?/i,Xp=Is("Hours",!0);function qp(t,n,i){return t>11?i?"pm":"PM":i?"am":"AM"}var F0={calendar:B_,longDateFormat:H_,invalidDate:W_,ordinal:$_,dayOfMonthOrdinalParse:Z_,relativeTime:q_,months:lp,monthsShort:A0,week:wp,weekdays:Rp,weekdaysMin:Cp,weekdaysShort:O0,meridiemParse:Zp},$r={},Vf={},$f;function Kp(t,n){var i,o=Math.min(t.length,n.length);for(i=0;i<o;i+=1)if(t[i]!==n[i])return i;return o}function k0(t){return t&&t.toLowerCase().replace("_","-")}function jp(t){for(var n=0,i,o,f,s;n<t.length;){for(s=k0(t[n]).split("-"),i=s.length,o=k0(t[n+1]),o=o?o.split("-"):null;i>0;){if(f=vu(s.slice(0,i).join("-")),f)return f;if(o&&o.length>=i&&Kp(s,o)>=i-1)break;i--}n++}return $f}function Qp(t){return t.match("^[^/\\\\]*$")!=null}function vu(t){var n=null,i;if($r[t]===void 0&&typeof module<"u"&&module&&module.exports&&Qp(t))try{n=$f._abbr,i=require,i("./locale/"+t),_o(n)}catch{$r[t]=null}return $r[t]}function _o(t,n){var i;return t&&(Jn(n)?i=Ra(t):i=rh(t,n),i?$f=i:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),$f._abbr}function rh(t,n){if(n!==null){var i,o=F0;if(n.abbr=t,$r[t]!=null)p0("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),o=$r[t]._config;else if(n.parentLocale!=null)if($r[n.parentLocale]!=null)o=$r[n.parentLocale]._config;else if(i=vu(n.parentLocale),i!=null)o=i._config;else return Vf[n.parentLocale]||(Vf[n.parentLocale]=[]),Vf[n.parentLocale].push({name:t,config:n}),null;return $r[t]=new Vc(Wc(o,n)),Vf[t]&&Vf[t].forEach(function(f){rh(f.name,f.config)}),_o(t),$r[t]}else return delete $r[t],null}function Jp(t,n){if(n!=null){var i,o,f=F0;$r[t]!=null&&$r[t].parentLocale!=null?$r[t].set(Wc($r[t]._config,n)):(o=vu(t),o!=null&&(f=o._config),n=Wc(f,n),o==null&&(n.abbr=t),i=new Vc(n),i.parentLocale=$r[t],$r[t]=i),_o(t)}else $r[t]!=null&&($r[t].parentLocale!=null?($r[t]=$r[t].parentLocale,t===_o()&&_o(t)):$r[t]!=null&&delete $r[t]);return $r[t]}function Ra(t){var n;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return $f;if(!Ni(t)){if(n=vu(t),n)return n;t=[t]}return jp(t)}function em(){return $c($r)}function nh(t){var n,i=t._a;return i&&tr(t).overflow===-2&&(n=i[Ea]<0||i[Ea]>11?Ea:i[sa]<1||i[sa]>hu(i[zn],i[Ea])?sa:i[bn]<0||i[bn]>24||i[bn]===24&&(i[Gi]!==0||i[Da]!==0||i[Zo]!==0)?bn:i[Gi]<0||i[Gi]>59?Gi:i[Da]<0||i[Da]>59?Da:i[Zo]<0||i[Zo]>999?Zo:-1,tr(t)._overflowDayOfYear&&(n<zn||n>sa)&&(n=sa),tr(t)._overflowWeeks&&n===-1&&(n=op),tr(t)._overflowWeekday&&n===-1&&(n=sp),tr(t).overflow=n),t}var tm=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,rm=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,nm=/Z|[+-]\d\d(?::?\d\d)?/,_u=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ih=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],im=/^\/?Date\((-?\d+)/i,am=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,om={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function P0(t){var n,i,o=t._i,f=tm.exec(o)||rm.exec(o),s,l,d,v,M=_u.length,B=ih.length;if(f){for(tr(t).iso=!0,n=0,i=M;n<i;n++)if(_u[n][1].exec(f[1])){l=_u[n][0],s=_u[n][2]!==!1;break}if(l==null){t._isValid=!1;return}if(f[3]){for(n=0,i=B;n<i;n++)if(ih[n][1].exec(f[3])){d=(f[2]||" ")+ih[n][0];break}if(d==null){t._isValid=!1;return}}if(!s&&d!=null){t._isValid=!1;return}if(f[4])if(nm.exec(f[4]))v="Z";else{t._isValid=!1;return}t._f=l+(d||"")+(v||""),oh(t)}else t._isValid=!1}function sm(t,n,i,o,f,s){var l=[fm(t),A0.indexOf(n),parseInt(i,10),parseInt(o,10),parseInt(f,10)];return s&&l.push(parseInt(s,10)),l}function fm(t){var n=parseInt(t,10);return n<=49?2e3+n:n<=999?1900+n:n}function lm(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function um(t,n,i){if(t){var o=O0.indexOf(t),f=new Date(n[0],n[1],n[2]).getDay();if(o!==f)return tr(i).weekdayMismatch=!0,i._isValid=!1,!1}return!0}function cm(t,n,i){if(t)return om[t];if(n)return 0;var o=parseInt(i,10),f=o%100,s=(o-f)/100;return s*60+f}function N0(t){var n=am.exec(lm(t._i)),i;if(n){if(i=sm(n[4],n[3],n[2],n[5],n[6],n[7]),!um(n[1],i,t))return;t._a=i,t._tzm=cm(n[8],n[9],n[10]),t._d=zf.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),tr(t).rfc2822=!0}else t._isValid=!1}function hm(t){var n=im.exec(t._i);if(n!==null){t._d=new Date(+n[1]);return}if(P0(t),t._isValid===!1)delete t._isValid;else return;if(N0(t),t._isValid===!1)delete t._isValid;else return;t._strict?t._isValid=!1:_t.createFromInputFallback(t)}_t.createFromInputFallback=Di("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))});function ks(t,n,i){return t!=null?t:n!=null?n:i}function dm(t){var n=new Date(_t.now());return t._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function ah(t){var n,i,o=[],f,s,l;if(!t._d){for(f=dm(t),t._w&&t._a[sa]==null&&t._a[Ea]==null&&vm(t),t._dayOfYear!=null&&(l=ks(t._a[zn],f[zn]),(t._dayOfYear>Hf(l)||t._dayOfYear===0)&&(tr(t)._overflowDayOfYear=!0),i=zf(l,0,t._dayOfYear),t._a[Ea]=i.getUTCMonth(),t._a[sa]=i.getUTCDate()),n=0;n<3&&t._a[n]==null;++n)t._a[n]=o[n]=f[n];for(;n<7;n++)t._a[n]=o[n]=t._a[n]==null?n===2?1:0:t._a[n];t._a[bn]===24&&t._a[Gi]===0&&t._a[Da]===0&&t._a[Zo]===0&&(t._nextDay=!0,t._a[bn]=0),t._d=(t._useUTC?zf:bp).apply(null,o),s=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[bn]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==s&&(tr(t).weekdayMismatch=!0)}}function vm(t){var n,i,o,f,s,l,d,v,M;n=t._w,n.GG!=null||n.W!=null||n.E!=null?(s=1,l=4,i=ks(n.GG,t._a[zn],Wf(Ur(),1,4).year),o=ks(n.W,1),f=ks(n.E,1),(f<1||f>7)&&(v=!0)):(s=t._locale._week.dow,l=t._locale._week.doy,M=Wf(Ur(),s,l),i=ks(n.gg,t._a[zn],M.year),o=ks(n.w,M.week),n.d!=null?(f=n.d,(f<0||f>6)&&(v=!0)):n.e!=null?(f=n.e+s,(n.e<0||n.e>6)&&(v=!0)):f=s),o<1||o>La(i,s,l)?tr(t)._overflowWeeks=!0:v!=null?tr(t)._overflowWeekday=!0:(d=C0(i,o,f,s,l),t._a[zn]=d.year,t._dayOfYear=d.dayOfYear)}_t.ISO_8601=function(){},_t.RFC_2822=function(){};function oh(t){if(t._f===_t.ISO_8601){P0(t);return}if(t._f===_t.RFC_2822){N0(t);return}t._a=[],tr(t).empty=!0;var n=""+t._i,i,o,f,s,l,d=n.length,v=0,M,B;for(f=m0(t._f,t._locale).match(Zc)||[],B=f.length,i=0;i<B;i++)s=f[i],o=(n.match(np(s,t))||[])[0],o&&(l=n.substr(0,n.indexOf(o)),l.length>0&&tr(t).unusedInput.push(l),n=n.slice(n.indexOf(o)+o.length),v+=o.length),Ms[s]?(o?tr(t).empty=!1:tr(t).unusedTokens.push(s),ap(s,o,t)):t._strict&&!o&&tr(t).unusedTokens.push(s);tr(t).charsLeftOver=d-v,n.length>0&&tr(t).unusedInput.push(n),t._a[bn]<=12&&tr(t).bigHour===!0&&t._a[bn]>0&&(tr(t).bigHour=void 0),tr(t).parsedDateParts=t._a.slice(0),tr(t).meridiem=t._meridiem,t._a[bn]=_m(t._locale,t._a[bn],t._meridiem),M=tr(t).era,M!==null&&(t._a[zn]=t._locale.erasConvertYear(M,t._a[zn])),ah(t),nh(t)}function _m(t,n,i){var o;return i==null?n:t.meridiemHour!=null?t.meridiemHour(n,i):(t.isPM!=null&&(o=t.isPM(i),o&&n<12&&(n+=12),!o&&n===12&&(n=0)),n)}function pm(t){var n,i,o,f,s,l,d=!1,v=t._f.length;if(v===0){tr(t).invalidFormat=!0,t._d=new Date(NaN);return}for(f=0;f<v;f++)s=0,l=!1,n=zc({},t),t._useUTC!=null&&(n._useUTC=t._useUTC),n._f=t._f[f],oh(n),Yc(n)&&(l=!0),s+=tr(n).charsLeftOver,s+=tr(n).unusedTokens.length*10,tr(n).score=s,d?s<o&&(o=s,i=n):(o==null||s<o||l)&&(o=s,i=n,l&&(d=!0));vo(t,i||n)}function mm(t){if(!t._d){var n=qc(t._i),i=n.day===void 0?n.date:n.day;t._a=h0([n.year,n.month,i,n.hour,n.minute,n.second,n.millisecond],function(o){return o&&parseInt(o,10)}),ah(t)}}function gm(t){var n=new Bf(nh(B0(t)));return n._nextDay&&(n.add(1,"d"),n._nextDay=void 0),n}function B0(t){var n=t._i,i=t._f;return t._locale=t._locale||Ra(t._l),n===null||i===void 0&&n===""?tu({nullInput:!0}):(typeof n=="string"&&(t._i=n=t._locale.preparse(n)),Bi(n)?new Bf(nh(n)):(Nf(n)?t._d=n:Ni(i)?pm(t):i?oh(t):ym(t),Yc(t)||(t._d=null),t))}function ym(t){var n=t._i;Jn(n)?t._d=new Date(_t.now()):Nf(n)?t._d=new Date(n.valueOf()):typeof n=="string"?hm(t):Ni(n)?(t._a=h0(n.slice(0),function(i){return parseInt(i,10)}),ah(t)):$o(n)?mm(t):Ta(n)?t._d=new Date(n):_t.createFromInputFallback(t)}function G0(t,n,i,o,f){var s={};return(n===!0||n===!1)&&(o=n,n=void 0),(i===!0||i===!1)&&(o=i,i=void 0),($o(t)&&Gc(t)||Ni(t)&&t.length===0)&&(t=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=f,s._l=i,s._i=t,s._f=n,s._strict=o,gm(s)}function Ur(t,n,i,o){return G0(t,n,i,o,!1)}var bm=Di("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Ur.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:tu()}),xm=Di("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Ur.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:tu()});function U0(t,n){var i,o;if(n.length===1&&Ni(n[0])&&(n=n[0]),!n.length)return Ur();for(i=n[0],o=1;o<n.length;++o)(!n[o].isValid()||n[o][t](i))&&(i=n[o]);return i}function wm(){var t=[].slice.call(arguments,0);return U0("isBefore",t)}function Sm(){var t=[].slice.call(arguments,0);return U0("isAfter",t)}var Am=function(){return Date.now?Date.now():+new Date},Zf=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Tm(t){var n,i=!1,o,f=Zf.length;for(n in t)if(Sr(t,n)&&!(nn.call(Zf,n)!==-1&&(t[n]==null||!isNaN(t[n]))))return!1;for(o=0;o<f;++o)if(t[Zf[o]]){if(i)return!1;parseFloat(t[Zf[o]])!==fr(t[Zf[o]])&&(i=!0)}return!0}function Em(){return this._isValid}function Dm(){return Ui(NaN)}function pu(t){var n=qc(t),i=n.year||0,o=n.quarter||0,f=n.month||0,s=n.week||n.isoWeek||0,l=n.day||0,d=n.hour||0,v=n.minute||0,M=n.second||0,B=n.millisecond||0;this._isValid=Tm(n),this._milliseconds=+B+M*1e3+v*6e4+d*1e3*60*60,this._days=+l+s*7,this._months=+f+o*3+i*12,this._data={},this._locale=Ra(),this._bubble()}function mu(t){return t instanceof pu}function sh(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function Lm(t,n,i){var o=Math.min(t.length,n.length),f=Math.abs(t.length-n.length),s=0,l;for(l=0;l<o;l++)(i&&t[l]!==n[l]||!i&&fr(t[l])!==fr(n[l]))&&s++;return s+f}function Y0(t,n){Ft(t,0,0,function(){var i=this.utcOffset(),o="+";return i<0&&(i=-i,o="-"),o+oa(~~(i/60),2)+n+oa(~~i%60,2)})}Y0("Z",":"),Y0("ZZ",""),xt("Z",uu),xt("ZZ",uu),Ir(["Z","ZZ"],function(t,n,i){i._useUTC=!0,i._tzm=fh(uu,t)});var Rm=/([\+\-]|\d\d)/gi;function fh(t,n){var i=(n||"").match(t),o,f,s;return i===null?null:(o=i[i.length-1]||[],f=(o+"").match(Rm)||["-",0,0],s=+(f[1]*60)+fr(f[2]),s===0?0:f[0]==="+"?s:-s)}function lh(t,n){var i,o;return n._isUTC?(i=n.clone(),o=(Bi(t)||Nf(t)?t.valueOf():Ur(t).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+o),_t.updateOffset(i,!1),i):Ur(t).local()}function uh(t){return-Math.round(t._d.getTimezoneOffset())}_t.updateOffset=function(){};function Cm(t,n,i){var o=this._offset||0,f;if(!this.isValid())return t!=null?this:NaN;if(t!=null){if(typeof t=="string"){if(t=fh(uu,t),t===null)return this}else Math.abs(t)<16&&!i&&(t=t*60);return!this._isUTC&&n&&(f=uh(this)),this._offset=t,this._isUTC=!0,f!=null&&this.add(f,"m"),o!==t&&(!n||this._changeInProgress?V0(this,Ui(t-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,_t.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?o:uh(this)}function Om(t,n){return t!=null?(typeof t!="string"&&(t=-t),this.utcOffset(t,n),this):-this.utcOffset()}function Mm(t){return this.utcOffset(0,t)}function Im(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(uh(this),"m")),this}function Fm(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var t=fh(tp,this._i);t!=null?this.utcOffset(t):this.utcOffset(0,!0)}return this}function km(t){return this.isValid()?(t=t?Ur(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function Pm(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Nm(){if(!Jn(this._isDSTShifted))return this._isDSTShifted;var t={},n;return zc(t,this),t=B0(t),t._a?(n=t._isUTC?ia(t._a):Ur(t._a),this._isDSTShifted=this.isValid()&&Lm(t._a,n.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Bm(){return this.isValid()?!this._isUTC:!1}function Gm(){return this.isValid()?this._isUTC:!1}function H0(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Um=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Ym=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ui(t,n){var i=t,o=null,f,s,l;return mu(t)?i={ms:t._milliseconds,d:t._days,M:t._months}:Ta(t)||!isNaN(+t)?(i={},n?i[n]=+t:i.milliseconds=+t):(o=Um.exec(t))?(f=o[1]==="-"?-1:1,i={y:0,d:fr(o[sa])*f,h:fr(o[bn])*f,m:fr(o[Gi])*f,s:fr(o[Da])*f,ms:fr(sh(o[Zo]*1e3))*f}):(o=Ym.exec(t))?(f=o[1]==="-"?-1:1,i={y:Xo(o[2],f),M:Xo(o[3],f),w:Xo(o[4],f),d:Xo(o[5],f),h:Xo(o[6],f),m:Xo(o[7],f),s:Xo(o[8],f)}):i==null?i={}:typeof i=="object"&&("from"in i||"to"in i)&&(l=Hm(Ur(i.from),Ur(i.to)),i={},i.ms=l.milliseconds,i.M=l.months),s=new pu(i),mu(t)&&Sr(t,"_locale")&&(s._locale=t._locale),mu(t)&&Sr(t,"_isValid")&&(s._isValid=t._isValid),s}Ui.fn=pu.prototype,Ui.invalid=Dm;function Xo(t,n){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*n}function z0(t,n){var i={};return i.months=n.month()-t.month()+(n.year()-t.year())*12,t.clone().add(i.months,"M").isAfter(n)&&--i.months,i.milliseconds=+n-+t.clone().add(i.months,"M"),i}function Hm(t,n){var i;return t.isValid()&&n.isValid()?(n=lh(n,t),t.isBefore(n)?i=z0(t,n):(i=z0(n,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function W0(t,n){return function(i,o){var f,s;return o!==null&&!isNaN(+o)&&(p0(n,"moment()."+n+"(period, number) is deprecated. Please use moment()."+n+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=i,i=o,o=s),f=Ui(i,o),V0(this,f,t),this}}function V0(t,n,i,o){var f=n._milliseconds,s=sh(n._days),l=sh(n._months);!t.isValid()||(o=o==null?!0:o,l&&E0(t,au(t,"Month")+l*i),s&&y0(t,"Date",au(t,"Date")+s*i),f&&t._d.setTime(t._d.valueOf()+f*i),o&&_t.updateOffset(t,s||l))}var zm=W0(1,"add"),Wm=W0(-1,"subtract");function $0(t){return typeof t=="string"||t instanceof String}function Vm(t){return Bi(t)||Nf(t)||$0(t)||Ta(t)||Zm(t)||$m(t)||t===null||t===void 0}function $m(t){var n=$o(t)&&!Gc(t),i=!1,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],f,s,l=o.length;for(f=0;f<l;f+=1)s=o[f],i=i||Sr(t,s);return n&&i}function Zm(t){var n=Ni(t),i=!1;return n&&(i=t.filter(function(o){return!Ta(o)&&$0(t)}).length===0),n&&i}function Xm(t){var n=$o(t)&&!Gc(t),i=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],f,s;for(f=0;f<o.length;f+=1)s=o[f],i=i||Sr(t,s);return n&&i}function qm(t,n){var i=t.diff(n,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function Km(t,n){arguments.length===1&&(arguments[0]?Vm(arguments[0])?(t=arguments[0],n=void 0):Xm(arguments[0])&&(n=arguments[0],t=void 0):(t=void 0,n=void 0));var i=t||Ur(),o=lh(i,this).startOf("day"),f=_t.calendarFormat(this,o)||"sameElse",s=n&&(aa(n[f])?n[f].call(this,i):n[f]);return this.format(s||this.localeData().calendar(f,this,Ur(i)))}function jm(){return new Bf(this)}function Qm(t,n){var i=Bi(t)?t:Ur(t);return this.isValid()&&i.isValid()?(n=Li(n)||"millisecond",n==="millisecond"?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(n).valueOf()):!1}function Jm(t,n){var i=Bi(t)?t:Ur(t);return this.isValid()&&i.isValid()?(n=Li(n)||"millisecond",n==="millisecond"?this.valueOf()<i.valueOf():this.clone().endOf(n).valueOf()<i.valueOf()):!1}function e1(t,n,i,o){var f=Bi(t)?t:Ur(t),s=Bi(n)?n:Ur(n);return this.isValid()&&f.isValid()&&s.isValid()?(o=o||"()",(o[0]==="("?this.isAfter(f,i):!this.isBefore(f,i))&&(o[1]===")"?this.isBefore(s,i):!this.isAfter(s,i))):!1}function t1(t,n){var i=Bi(t)?t:Ur(t),o;return this.isValid()&&i.isValid()?(n=Li(n)||"millisecond",n==="millisecond"?this.valueOf()===i.valueOf():(o=i.valueOf(),this.clone().startOf(n).valueOf()<=o&&o<=this.clone().endOf(n).valueOf())):!1}function r1(t,n){return this.isSame(t,n)||this.isAfter(t,n)}function n1(t,n){return this.isSame(t,n)||this.isBefore(t,n)}function i1(t,n,i){var o,f,s;if(!this.isValid())return NaN;if(o=lh(t,this),!o.isValid())return NaN;switch(f=(o.utcOffset()-this.utcOffset())*6e4,n=Li(n),n){case"year":s=gu(this,o)/12;break;case"month":s=gu(this,o);break;case"quarter":s=gu(this,o)/3;break;case"second":s=(this-o)/1e3;break;case"minute":s=(this-o)/6e4;break;case"hour":s=(this-o)/36e5;break;case"day":s=(this-o-f)/864e5;break;case"week":s=(this-o-f)/6048e5;break;default:s=this-o}return i?s:Ri(s)}function gu(t,n){if(t.date()<n.date())return-gu(n,t);var i=(n.year()-t.year())*12+(n.month()-t.month()),o=t.clone().add(i,"months"),f,s;return n-o<0?(f=t.clone().add(i-1,"months"),s=(n-o)/(o-f)):(f=t.clone().add(i+1,"months"),s=(n-o)/(f-o)),-(i+s)||0}_t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",_t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function a1(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function o1(t){if(!this.isValid())return null;var n=t!==!0,i=n?this.clone().utc():this;return i.year()<0||i.year()>9999?nu(i,n?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):aa(Date.prototype.toISOString)?n?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",nu(i,"Z")):nu(i,n?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function s1(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",n="",i,o,f,s;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",n="Z"),i="["+t+'("]',o=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",f="-MM-DD[T]HH:mm:ss.SSS",s=n+'[")]',this.format(i+o+f+s)}function f1(t){t||(t=this.isUtc()?_t.defaultFormatUtc:_t.defaultFormat);var n=nu(this,t);return this.localeData().postformat(n)}function l1(t,n){return this.isValid()&&(Bi(t)&&t.isValid()||Ur(t).isValid())?Ui({to:this,from:t}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function u1(t){return this.from(Ur(),t)}function c1(t,n){return this.isValid()&&(Bi(t)&&t.isValid()||Ur(t).isValid())?Ui({from:this,to:t}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function h1(t){return this.to(Ur(),t)}function Z0(t){var n;return t===void 0?this._locale._abbr:(n=Ra(t),n!=null&&(this._locale=n),this)}var X0=Di("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function q0(){return this._locale}var yu=1e3,Ps=60*yu,bu=60*Ps,K0=(365*400+97)*24*bu;function Ns(t,n){return(t%n+n)%n}function j0(t,n,i){return t<100&&t>=0?new Date(t+400,n,i)-K0:new Date(t,n,i).valueOf()}function Q0(t,n,i){return t<100&&t>=0?Date.UTC(t+400,n,i)-K0:Date.UTC(t,n,i)}function d1(t){var n,i;if(t=Li(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(i=this._isUTC?Q0:j0,t){case"year":n=i(this.year(),0,1);break;case"quarter":n=i(this.year(),this.month()-this.month()%3,1);break;case"month":n=i(this.year(),this.month(),1);break;case"week":n=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":n=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":n=i(this.year(),this.month(),this.date());break;case"hour":n=this._d.valueOf(),n-=Ns(n+(this._isUTC?0:this.utcOffset()*Ps),bu);break;case"minute":n=this._d.valueOf(),n-=Ns(n,Ps);break;case"second":n=this._d.valueOf(),n-=Ns(n,yu);break}return this._d.setTime(n),_t.updateOffset(this,!0),this}function v1(t){var n,i;if(t=Li(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(i=this._isUTC?Q0:j0,t){case"year":n=i(this.year()+1,0,1)-1;break;case"quarter":n=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":n=i(this.year(),this.month()+1,1)-1;break;case"week":n=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":n=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":n=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":n=this._d.valueOf(),n+=bu-Ns(n+(this._isUTC?0:this.utcOffset()*Ps),bu)-1;break;case"minute":n=this._d.valueOf(),n+=Ps-Ns(n,Ps)-1;break;case"second":n=this._d.valueOf(),n+=yu-Ns(n,yu)-1;break}return this._d.setTime(n),_t.updateOffset(this,!0),this}function _1(){return this._d.valueOf()-(this._offset||0)*6e4}function p1(){return Math.floor(this.valueOf()/1e3)}function m1(){return new Date(this.valueOf())}function g1(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function y1(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function b1(){return this.isValid()?this.toISOString():null}function x1(){return Yc(this)}function w1(){return vo({},tr(this))}function S1(){return tr(this).overflow}function A1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Ft("N",0,0,"eraAbbr"),Ft("NN",0,0,"eraAbbr"),Ft("NNN",0,0,"eraAbbr"),Ft("NNNN",0,0,"eraName"),Ft("NNNNN",0,0,"eraNarrow"),Ft("y",["y",1],"yo","eraYear"),Ft("y",["yy",2],0,"eraYear"),Ft("y",["yyy",3],0,"eraYear"),Ft("y",["yyyy",4],0,"eraYear"),xt("N",ch),xt("NN",ch),xt("NNN",ch),xt("NNNN",k1),xt("NNNNN",P1),Ir(["N","NN","NNN","NNNN","NNNNN"],function(t,n,i,o){var f=i._locale.erasParse(t,o,i._strict);f?tr(i).era=f:tr(i).invalidEra=t}),xt("y",Fs),xt("yy",Fs),xt("yyy",Fs),xt("yyyy",Fs),xt("yo",N1),Ir(["y","yy","yyy","yyyy"],zn),Ir(["yo"],function(t,n,i,o){var f;i._locale._eraYearOrdinalRegex&&(f=t.match(i._locale._eraYearOrdinalRegex)),i._locale.eraYearOrdinalParse?n[zn]=i._locale.eraYearOrdinalParse(t,f):n[zn]=parseInt(t,10)});function T1(t,n){var i,o,f,s=this._eras||Ra("en")._eras;for(i=0,o=s.length;i<o;++i){switch(typeof s[i].since){case"string":f=_t(s[i].since).startOf("day"),s[i].since=f.valueOf();break}switch(typeof s[i].until){case"undefined":s[i].until=1/0;break;case"string":f=_t(s[i].until).startOf("day").valueOf(),s[i].until=f.valueOf();break}}return s}function E1(t,n,i){var o,f,s=this.eras(),l,d,v;for(t=t.toUpperCase(),o=0,f=s.length;o<f;++o)if(l=s[o].name.toUpperCase(),d=s[o].abbr.toUpperCase(),v=s[o].narrow.toUpperCase(),i)switch(n){case"N":case"NN":case"NNN":if(d===t)return s[o];break;case"NNNN":if(l===t)return s[o];break;case"NNNNN":if(v===t)return s[o];break}else if([l,d,v].indexOf(t)>=0)return s[o]}function D1(t,n){var i=t.since<=t.until?1:-1;return n===void 0?_t(t.since).year():_t(t.since).year()+(n-t.offset)*i}function L1(){var t,n,i,o=this.localeData().eras();for(t=0,n=o.length;t<n;++t)if(i=this.clone().startOf("day").valueOf(),o[t].since<=i&&i<=o[t].until||o[t].until<=i&&i<=o[t].since)return o[t].name;return""}function R1(){var t,n,i,o=this.localeData().eras();for(t=0,n=o.length;t<n;++t)if(i=this.clone().startOf("day").valueOf(),o[t].since<=i&&i<=o[t].until||o[t].until<=i&&i<=o[t].since)return o[t].narrow;return""}function C1(){var t,n,i,o=this.localeData().eras();for(t=0,n=o.length;t<n;++t)if(i=this.clone().startOf("day").valueOf(),o[t].since<=i&&i<=o[t].until||o[t].until<=i&&i<=o[t].since)return o[t].abbr;return""}function O1(){var t,n,i,o,f=this.localeData().eras();for(t=0,n=f.length;t<n;++t)if(i=f[t].since<=f[t].until?1:-1,o=this.clone().startOf("day").valueOf(),f[t].since<=o&&o<=f[t].until||f[t].until<=o&&o<=f[t].since)return(this.year()-_t(f[t].since).year())*i+f[t].offset;return this.year()}function M1(t){return Sr(this,"_erasNameRegex")||hh.call(this),t?this._erasNameRegex:this._erasRegex}function I1(t){return Sr(this,"_erasAbbrRegex")||hh.call(this),t?this._erasAbbrRegex:this._erasRegex}function F1(t){return Sr(this,"_erasNarrowRegex")||hh.call(this),t?this._erasNarrowRegex:this._erasRegex}function ch(t,n){return n.erasAbbrRegex(t)}function k1(t,n){return n.erasNameRegex(t)}function P1(t,n){return n.erasNarrowRegex(t)}function N1(t,n){return n._eraYearOrdinalRegex||Fs}function hh(){var t=[],n=[],i=[],o=[],f,s,l=this.eras();for(f=0,s=l.length;f<s;++f)n.push(hi(l[f].name)),t.push(hi(l[f].abbr)),i.push(hi(l[f].narrow)),o.push(hi(l[f].name)),o.push(hi(l[f].abbr)),o.push(hi(l[f].narrow));this._erasRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+n.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+i.join("|")+")","i")}Ft(0,["gg",2],0,function(){return this.weekYear()%100}),Ft(0,["GG",2],0,function(){return this.isoWeekYear()%100});function xu(t,n){Ft(0,[t,t.length],0,n)}xu("gggg","weekYear"),xu("ggggg","weekYear"),xu("GGGG","isoWeekYear"),xu("GGGGG","isoWeekYear"),Yn("weekYear","gg"),Yn("isoWeekYear","GG"),Hn("weekYear",1),Hn("isoWeekYear",1),xt("G",lu),xt("g",lu),xt("GG",Gr,ci),xt("gg",Gr,ci),xt("GGGG",jc,Kc),xt("gggg",jc,Kc),xt("GGGGG",fu,ou),xt("ggggg",fu,ou),Yf(["gggg","ggggg","GGGG","GGGGG"],function(t,n,i,o){n[o.substr(0,2)]=fr(t)}),Yf(["gg","GG"],function(t,n,i,o){n[o]=_t.parseTwoDigitYear(t)});function B1(t){return J0.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function G1(t){return J0.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function U1(){return La(this.year(),1,4)}function Y1(){return La(this.isoWeekYear(),1,4)}function H1(){var t=this.localeData()._week;return La(this.year(),t.dow,t.doy)}function z1(){var t=this.localeData()._week;return La(this.weekYear(),t.dow,t.doy)}function J0(t,n,i,o,f){var s;return t==null?Wf(this,o,f).year:(s=La(t,o,f),n>s&&(n=s),W1.call(this,t,n,i,o,f))}function W1(t,n,i,o,f){var s=C0(t,n,i,o,f),l=zf(s.year,0,s.dayOfYear);return this.year(l.getUTCFullYear()),this.month(l.getUTCMonth()),this.date(l.getUTCDate()),this}Ft("Q",0,"Qo","quarter"),Yn("quarter","Q"),Hn("quarter",7),xt("Q",b0),Ir("Q",function(t,n){n[Ea]=(fr(t)-1)*3});function V1(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}Ft("D",["DD",2],"Do","date"),Yn("date","D"),Hn("date",9),xt("D",Gr),xt("DD",Gr,ci),xt("Do",function(t,n){return t?n._dayOfMonthOrdinalParse||n._ordinalParse:n._dayOfMonthOrdinalParseLenient}),Ir(["D","DD"],sa),Ir("Do",function(t,n){n[sa]=fr(t.match(Gr)[0])});var ev=Is("Date",!0);Ft("DDD",["DDDD",3],"DDDo","dayOfYear"),Yn("dayOfYear","DDD"),Hn("dayOfYear",4),xt("DDD",su),xt("DDDD",x0),Ir(["DDD","DDDD"],function(t,n,i){i._dayOfYear=fr(t)});function $1(t){var n=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?n:this.add(t-n,"d")}Ft("m",["mm",2],0,"minute"),Yn("minute","m"),Hn("minute",14),xt("m",Gr),xt("mm",Gr,ci),Ir(["m","mm"],Gi);var Z1=Is("Minutes",!1);Ft("s",["ss",2],0,"second"),Yn("second","s"),Hn("second",15),xt("s",Gr),xt("ss",Gr,ci),Ir(["s","ss"],Da);var X1=Is("Seconds",!1);Ft("S",0,0,function(){return~~(this.millisecond()/100)}),Ft(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Ft(0,["SSS",3],0,"millisecond"),Ft(0,["SSSS",4],0,function(){return this.millisecond()*10}),Ft(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Ft(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),Ft(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Ft(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Ft(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),Yn("millisecond","ms"),Hn("millisecond",16),xt("S",su,b0),xt("SS",su,ci),xt("SSS",su,x0);var po,tv;for(po="SSSS";po.length<=9;po+="S")xt(po,Fs);function q1(t,n){n[Zo]=fr(("0."+t)*1e3)}for(po="S";po.length<=9;po+="S")Ir(po,q1);tv=Is("Milliseconds",!1),Ft("z",0,0,"zoneAbbr"),Ft("zz",0,0,"zoneName");function K1(){return this._isUTC?"UTC":""}function j1(){return this._isUTC?"Coordinated Universal Time":""}var et=Bf.prototype;et.add=zm,et.calendar=Km,et.clone=jm,et.diff=i1,et.endOf=v1,et.format=f1,et.from=l1,et.fromNow=u1,et.to=c1,et.toNow=h1,et.get=J_,et.invalidAt=S1,et.isAfter=Qm,et.isBefore=Jm,et.isBetween=e1,et.isSame=t1,et.isSameOrAfter=r1,et.isSameOrBefore=n1,et.isValid=x1,et.lang=X0,et.locale=Z0,et.localeData=q0,et.max=xm,et.min=bm,et.parsingFlags=w1,et.set=ep,et.startOf=d1,et.subtract=Wm,et.toArray=g1,et.toObject=y1,et.toDate=m1,et.toISOString=o1,et.inspect=s1,typeof Symbol<"u"&&Symbol.for!=null&&(et[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),et.toJSON=b1,et.toString=a1,et.unix=p1,et.valueOf=_1,et.creationData=A1,et.eraName=L1,et.eraNarrow=R1,et.eraAbbr=C1,et.eraYear=O1,et.year=R0,et.isLeapYear=yp,et.weekYear=B1,et.isoWeekYear=G1,et.quarter=et.quarters=V1,et.month=D0,et.daysInMonth=pp,et.week=et.weeks=Tp,et.isoWeek=et.isoWeeks=Ep,et.weeksInYear=H1,et.weeksInWeekYear=z1,et.isoWeeksInYear=U1,et.isoWeeksInISOWeekYear=Y1,et.date=ev,et.day=et.days=Gp,et.weekday=Up,et.isoWeekday=Yp,et.dayOfYear=$1,et.hour=et.hours=Xp,et.minute=et.minutes=Z1,et.second=et.seconds=X1,et.millisecond=et.milliseconds=tv,et.utcOffset=Cm,et.utc=Mm,et.local=Im,et.parseZone=Fm,et.hasAlignedHourOffset=km,et.isDST=Pm,et.isLocal=Bm,et.isUtcOffset=Gm,et.isUtc=H0,et.isUTC=H0,et.zoneAbbr=K1,et.zoneName=j1,et.dates=Di("dates accessor is deprecated. Use date instead.",ev),et.months=Di("months accessor is deprecated. Use month instead",D0),et.years=Di("years accessor is deprecated. Use year instead",R0),et.zone=Di("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Om),et.isDSTShifted=Di("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Nm);function Q1(t){return Ur(t*1e3)}function J1(){return Ur.apply(null,arguments).parseZone()}function rv(t){return t}var Ar=Vc.prototype;Ar.calendar=G_,Ar.longDateFormat=z_,Ar.invalidDate=V_,Ar.ordinal=X_,Ar.preparse=rv,Ar.postformat=rv,Ar.relativeTime=K_,Ar.pastFuture=j_,Ar.set=N_,Ar.eras=T1,Ar.erasParse=E1,Ar.erasConvertYear=D1,Ar.erasAbbrRegex=I1,Ar.erasNameRegex=M1,Ar.erasNarrowRegex=F1,Ar.months=hp,Ar.monthsShort=dp,Ar.monthsParse=_p,Ar.monthsRegex=gp,Ar.monthsShortRegex=mp,Ar.week=xp,Ar.firstDayOfYear=Ap,Ar.firstDayOfWeek=Sp,Ar.weekdays=Fp,Ar.weekdaysMin=Pp,Ar.weekdaysShort=kp,Ar.weekdaysParse=Bp,Ar.weekdaysRegex=Hp,Ar.weekdaysShortRegex=zp,Ar.weekdaysMinRegex=Wp,Ar.isPM=$p,Ar.meridiem=qp;function wu(t,n,i,o){var f=Ra(),s=ia().set(o,n);return f[i](s,t)}function nv(t,n,i){if(Ta(t)&&(n=t,t=void 0),t=t||"",n!=null)return wu(t,n,i,"month");var o,f=[];for(o=0;o<12;o++)f[o]=wu(t,o,i,"month");return f}function dh(t,n,i,o){typeof t=="boolean"?(Ta(n)&&(i=n,n=void 0),n=n||""):(n=t,i=n,t=!1,Ta(n)&&(i=n,n=void 0),n=n||"");var f=Ra(),s=t?f._week.dow:0,l,d=[];if(i!=null)return wu(n,(i+s)%7,o,"day");for(l=0;l<7;l++)d[l]=wu(n,(l+s)%7,o,"day");return d}function eg(t,n){return nv(t,n,"months")}function tg(t,n){return nv(t,n,"monthsShort")}function rg(t,n,i){return dh(t,n,i,"weekdays")}function ng(t,n,i){return dh(t,n,i,"weekdaysShort")}function ig(t,n,i){return dh(t,n,i,"weekdaysMin")}_o("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var n=t%10,i=fr(t%100/10)===1?"th":n===1?"st":n===2?"nd":n===3?"rd":"th";return t+i}}),_t.lang=Di("moment.lang is deprecated. Use moment.locale instead.",_o),_t.langData=Di("moment.langData is deprecated. Use moment.localeData instead.",Ra);var Ca=Math.abs;function ag(){var t=this._data;return this._milliseconds=Ca(this._milliseconds),this._days=Ca(this._days),this._months=Ca(this._months),t.milliseconds=Ca(t.milliseconds),t.seconds=Ca(t.seconds),t.minutes=Ca(t.minutes),t.hours=Ca(t.hours),t.months=Ca(t.months),t.years=Ca(t.years),this}function iv(t,n,i,o){var f=Ui(n,i);return t._milliseconds+=o*f._milliseconds,t._days+=o*f._days,t._months+=o*f._months,t._bubble()}function og(t,n){return iv(this,t,n,1)}function sg(t,n){return iv(this,t,n,-1)}function av(t){return t<0?Math.floor(t):Math.ceil(t)}function fg(){var t=this._milliseconds,n=this._days,i=this._months,o=this._data,f,s,l,d,v;return t>=0&&n>=0&&i>=0||t<=0&&n<=0&&i<=0||(t+=av(vh(i)+n)*864e5,n=0,i=0),o.milliseconds=t%1e3,f=Ri(t/1e3),o.seconds=f%60,s=Ri(f/60),o.minutes=s%60,l=Ri(s/60),o.hours=l%24,n+=Ri(l/24),v=Ri(ov(n)),i+=v,n-=av(vh(v)),d=Ri(i/12),i%=12,o.days=n,o.months=i,o.years=d,this}function ov(t){return t*4800/146097}function vh(t){return t*146097/4800}function lg(t){if(!this.isValid())return NaN;var n,i,o=this._milliseconds;if(t=Li(t),t==="month"||t==="quarter"||t==="year")switch(n=this._days+o/864e5,i=this._months+ov(n),t){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(n=this._days+Math.round(vh(this._months)),t){case"week":return n/7+o/6048e5;case"day":return n+o/864e5;case"hour":return n*24+o/36e5;case"minute":return n*1440+o/6e4;case"second":return n*86400+o/1e3;case"millisecond":return Math.floor(n*864e5)+o;default:throw new Error("Unknown unit "+t)}}function ug(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+fr(this._months/12)*31536e6:NaN}function Oa(t){return function(){return this.as(t)}}var cg=Oa("ms"),hg=Oa("s"),dg=Oa("m"),vg=Oa("h"),_g=Oa("d"),pg=Oa("w"),mg=Oa("M"),gg=Oa("Q"),yg=Oa("y");function bg(){return Ui(this)}function xg(t){return t=Li(t),this.isValid()?this[t+"s"]():NaN}function qo(t){return function(){return this.isValid()?this._data[t]:NaN}}var wg=qo("milliseconds"),Sg=qo("seconds"),Ag=qo("minutes"),Tg=qo("hours"),Eg=qo("days"),Dg=qo("months"),Lg=qo("years");function Rg(){return Ri(this.days()/7)}var Ma=Math.round,Bs={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Cg(t,n,i,o,f){return f.relativeTime(n||1,!!i,t,o)}function Og(t,n,i,o){var f=Ui(t).abs(),s=Ma(f.as("s")),l=Ma(f.as("m")),d=Ma(f.as("h")),v=Ma(f.as("d")),M=Ma(f.as("M")),B=Ma(f.as("w")),p=Ma(f.as("y")),U=s<=i.ss&&["s",s]||s<i.s&&["ss",s]||l<=1&&["m"]||l<i.m&&["mm",l]||d<=1&&["h"]||d<i.h&&["hh",d]||v<=1&&["d"]||v<i.d&&["dd",v];return i.w!=null&&(U=U||B<=1&&["w"]||B<i.w&&["ww",B]),U=U||M<=1&&["M"]||M<i.M&&["MM",M]||p<=1&&["y"]||["yy",p],U[2]=n,U[3]=+t>0,U[4]=o,Cg.apply(null,U)}function Mg(t){return t===void 0?Ma:typeof t=="function"?(Ma=t,!0):!1}function Ig(t,n){return Bs[t]===void 0?!1:n===void 0?Bs[t]:(Bs[t]=n,t==="s"&&(Bs.ss=n-1),!0)}function Fg(t,n){if(!this.isValid())return this.localeData().invalidDate();var i=!1,o=Bs,f,s;return typeof t=="object"&&(n=t,t=!1),typeof t=="boolean"&&(i=t),typeof n=="object"&&(o=Object.assign({},Bs,n),n.s!=null&&n.ss==null&&(o.ss=n.s-1)),f=this.localeData(),s=Og(this,!i,o,f),i&&(s=f.pastFuture(+this,s)),f.postformat(s)}var _h=Math.abs;function Gs(t){return(t>0)-(t<0)||+t}function Su(){if(!this.isValid())return this.localeData().invalidDate();var t=_h(this._milliseconds)/1e3,n=_h(this._days),i=_h(this._months),o,f,s,l,d=this.asSeconds(),v,M,B,p;return d?(o=Ri(t/60),f=Ri(o/60),t%=60,o%=60,s=Ri(i/12),i%=12,l=t?t.toFixed(3).replace(/\.?0+$/,""):"",v=d<0?"-":"",M=Gs(this._months)!==Gs(d)?"-":"",B=Gs(this._days)!==Gs(d)?"-":"",p=Gs(this._milliseconds)!==Gs(d)?"-":"",v+"P"+(s?M+s+"Y":"")+(i?M+i+"M":"")+(n?B+n+"D":"")+(f||o||t?"T":"")+(f?p+f+"H":"")+(o?p+o+"M":"")+(t?p+l+"S":"")):"P0D"}var br=pu.prototype;br.isValid=Em,br.abs=ag,br.add=og,br.subtract=sg,br.as=lg,br.asMilliseconds=cg,br.asSeconds=hg,br.asMinutes=dg,br.asHours=vg,br.asDays=_g,br.asWeeks=pg,br.asMonths=mg,br.asQuarters=gg,br.asYears=yg,br.valueOf=ug,br._bubble=fg,br.clone=bg,br.get=xg,br.milliseconds=wg,br.seconds=Sg,br.minutes=Ag,br.hours=Tg,br.days=Eg,br.weeks=Rg,br.months=Dg,br.years=Lg,br.humanize=Fg,br.toISOString=Su,br.toString=Su,br.toJSON=Su,br.locale=Z0,br.localeData=q0,br.toIsoString=Di("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Su),br.lang=X0,Ft("X",0,0,"unix"),Ft("x",0,0,"valueOf"),xt("x",lu),xt("X",rp),Ir("X",function(t,n,i){i._d=new Date(parseFloat(t)*1e3)}),Ir("x",function(t,n,i){i._d=new Date(fr(t))});//! moment.js
10
- _t.version="2.29.4",k_(Ur),_t.fn=et,_t.min=wm,_t.max=Sm,_t.now=Am,_t.utc=ia,_t.unix=Q1,_t.months=eg,_t.isDate=Nf,_t.locale=_o,_t.invalid=tu,_t.duration=Ui,_t.isMoment=Bi,_t.weekdays=rg,_t.parseZone=J1,_t.localeData=Ra,_t.isDuration=mu,_t.monthsShort=tg,_t.weekdaysMin=ig,_t.defineLocale=rh,_t.updateLocale=Jp,_t.locales=em,_t.weekdaysShort=ng,_t.normalizeUnits=Li,_t.relativeTimeRounding=Mg,_t.relativeTimeThreshold=Ig,_t.calendarFormat=qm,_t.prototype=et,_t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var Us=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},sv={exports:{}};(function(t,n){(function(i){t.exports=i()})(function(i){var o=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function f(b,A){var g=b[0],x=b[1],P=b[2],F=b[3];g+=(x&P|~x&F)+A[0]-680876936|0,g=(g<<7|g>>>25)+x|0,F+=(g&x|~g&P)+A[1]-389564586|0,F=(F<<12|F>>>20)+g|0,P+=(F&g|~F&x)+A[2]+606105819|0,P=(P<<17|P>>>15)+F|0,x+=(P&F|~P&g)+A[3]-1044525330|0,x=(x<<22|x>>>10)+P|0,g+=(x&P|~x&F)+A[4]-176418897|0,g=(g<<7|g>>>25)+x|0,F+=(g&x|~g&P)+A[5]+1200080426|0,F=(F<<12|F>>>20)+g|0,P+=(F&g|~F&x)+A[6]-1473231341|0,P=(P<<17|P>>>15)+F|0,x+=(P&F|~P&g)+A[7]-45705983|0,x=(x<<22|x>>>10)+P|0,g+=(x&P|~x&F)+A[8]+1770035416|0,g=(g<<7|g>>>25)+x|0,F+=(g&x|~g&P)+A[9]-1958414417|0,F=(F<<12|F>>>20)+g|0,P+=(F&g|~F&x)+A[10]-42063|0,P=(P<<17|P>>>15)+F|0,x+=(P&F|~P&g)+A[11]-1990404162|0,x=(x<<22|x>>>10)+P|0,g+=(x&P|~x&F)+A[12]+1804603682|0,g=(g<<7|g>>>25)+x|0,F+=(g&x|~g&P)+A[13]-40341101|0,F=(F<<12|F>>>20)+g|0,P+=(F&g|~F&x)+A[14]-1502002290|0,P=(P<<17|P>>>15)+F|0,x+=(P&F|~P&g)+A[15]+1236535329|0,x=(x<<22|x>>>10)+P|0,g+=(x&F|P&~F)+A[1]-165796510|0,g=(g<<5|g>>>27)+x|0,F+=(g&P|x&~P)+A[6]-1069501632|0,F=(F<<9|F>>>23)+g|0,P+=(F&x|g&~x)+A[11]+643717713|0,P=(P<<14|P>>>18)+F|0,x+=(P&g|F&~g)+A[0]-373897302|0,x=(x<<20|x>>>12)+P|0,g+=(x&F|P&~F)+A[5]-701558691|0,g=(g<<5|g>>>27)+x|0,F+=(g&P|x&~P)+A[10]+38016083|0,F=(F<<9|F>>>23)+g|0,P+=(F&x|g&~x)+A[15]-660478335|0,P=(P<<14|P>>>18)+F|0,x+=(P&g|F&~g)+A[4]-405537848|0,x=(x<<20|x>>>12)+P|0,g+=(x&F|P&~F)+A[9]+568446438|0,g=(g<<5|g>>>27)+x|0,F+=(g&P|x&~P)+A[14]-1019803690|0,F=(F<<9|F>>>23)+g|0,P+=(F&x|g&~x)+A[3]-187363961|0,P=(P<<14|P>>>18)+F|0,x+=(P&g|F&~g)+A[8]+1163531501|0,x=(x<<20|x>>>12)+P|0,g+=(x&F|P&~F)+A[13]-1444681467|0,g=(g<<5|g>>>27)+x|0,F+=(g&P|x&~P)+A[2]-51403784|0,F=(F<<9|F>>>23)+g|0,P+=(F&x|g&~x)+A[7]+1735328473|0,P=(P<<14|P>>>18)+F|0,x+=(P&g|F&~g)+A[12]-1926607734|0,x=(x<<20|x>>>12)+P|0,g+=(x^P^F)+A[5]-378558|0,g=(g<<4|g>>>28)+x|0,F+=(g^x^P)+A[8]-2022574463|0,F=(F<<11|F>>>21)+g|0,P+=(F^g^x)+A[11]+1839030562|0,P=(P<<16|P>>>16)+F|0,x+=(P^F^g)+A[14]-35309556|0,x=(x<<23|x>>>9)+P|0,g+=(x^P^F)+A[1]-1530992060|0,g=(g<<4|g>>>28)+x|0,F+=(g^x^P)+A[4]+1272893353|0,F=(F<<11|F>>>21)+g|0,P+=(F^g^x)+A[7]-155497632|0,P=(P<<16|P>>>16)+F|0,x+=(P^F^g)+A[10]-1094730640|0,x=(x<<23|x>>>9)+P|0,g+=(x^P^F)+A[13]+681279174|0,g=(g<<4|g>>>28)+x|0,F+=(g^x^P)+A[0]-358537222|0,F=(F<<11|F>>>21)+g|0,P+=(F^g^x)+A[3]-722521979|0,P=(P<<16|P>>>16)+F|0,x+=(P^F^g)+A[6]+76029189|0,x=(x<<23|x>>>9)+P|0,g+=(x^P^F)+A[9]-640364487|0,g=(g<<4|g>>>28)+x|0,F+=(g^x^P)+A[12]-421815835|0,F=(F<<11|F>>>21)+g|0,P+=(F^g^x)+A[15]+530742520|0,P=(P<<16|P>>>16)+F|0,x+=(P^F^g)+A[2]-995338651|0,x=(x<<23|x>>>9)+P|0,g+=(P^(x|~F))+A[0]-198630844|0,g=(g<<6|g>>>26)+x|0,F+=(x^(g|~P))+A[7]+1126891415|0,F=(F<<10|F>>>22)+g|0,P+=(g^(F|~x))+A[14]-1416354905|0,P=(P<<15|P>>>17)+F|0,x+=(F^(P|~g))+A[5]-57434055|0,x=(x<<21|x>>>11)+P|0,g+=(P^(x|~F))+A[12]+1700485571|0,g=(g<<6|g>>>26)+x|0,F+=(x^(g|~P))+A[3]-1894986606|0,F=(F<<10|F>>>22)+g|0,P+=(g^(F|~x))+A[10]-1051523|0,P=(P<<15|P>>>17)+F|0,x+=(F^(P|~g))+A[1]-2054922799|0,x=(x<<21|x>>>11)+P|0,g+=(P^(x|~F))+A[8]+1873313359|0,g=(g<<6|g>>>26)+x|0,F+=(x^(g|~P))+A[15]-30611744|0,F=(F<<10|F>>>22)+g|0,P+=(g^(F|~x))+A[6]-1560198380|0,P=(P<<15|P>>>17)+F|0,x+=(F^(P|~g))+A[13]+1309151649|0,x=(x<<21|x>>>11)+P|0,g+=(P^(x|~F))+A[4]-145523070|0,g=(g<<6|g>>>26)+x|0,F+=(x^(g|~P))+A[11]-1120210379|0,F=(F<<10|F>>>22)+g|0,P+=(g^(F|~x))+A[2]+718787259|0,P=(P<<15|P>>>17)+F|0,x+=(F^(P|~g))+A[9]-343485551|0,x=(x<<21|x>>>11)+P|0,b[0]=g+b[0]|0,b[1]=x+b[1]|0,b[2]=P+b[2]|0,b[3]=F+b[3]|0}function s(b){var A=[],g;for(g=0;g<64;g+=4)A[g>>2]=b.charCodeAt(g)+(b.charCodeAt(g+1)<<8)+(b.charCodeAt(g+2)<<16)+(b.charCodeAt(g+3)<<24);return A}function l(b){var A=[],g;for(g=0;g<64;g+=4)A[g>>2]=b[g]+(b[g+1]<<8)+(b[g+2]<<16)+(b[g+3]<<24);return A}function d(b){var A=b.length,g=[1732584193,-271733879,-1732584194,271733878],x,P,F,J,Te,nt;for(x=64;x<=A;x+=64)f(g,s(b.substring(x-64,x)));for(b=b.substring(x-64),P=b.length,F=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x=0;x<P;x+=1)F[x>>2]|=b.charCodeAt(x)<<(x%4<<3);if(F[x>>2]|=128<<(x%4<<3),x>55)for(f(g,F),x=0;x<16;x+=1)F[x]=0;return J=A*8,J=J.toString(16).match(/(.*?)(.{0,8})$/),Te=parseInt(J[2],16),nt=parseInt(J[1],16)||0,F[14]=Te,F[15]=nt,f(g,F),g}function v(b){var A=b.length,g=[1732584193,-271733879,-1732584194,271733878],x,P,F,J,Te,nt;for(x=64;x<=A;x+=64)f(g,l(b.subarray(x-64,x)));for(b=x-64<A?b.subarray(x-64):new Uint8Array(0),P=b.length,F=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x=0;x<P;x+=1)F[x>>2]|=b[x]<<(x%4<<3);if(F[x>>2]|=128<<(x%4<<3),x>55)for(f(g,F),x=0;x<16;x+=1)F[x]=0;return J=A*8,J=J.toString(16).match(/(.*?)(.{0,8})$/),Te=parseInt(J[2],16),nt=parseInt(J[1],16)||0,F[14]=Te,F[15]=nt,f(g,F),g}function M(b){var A="",g;for(g=0;g<4;g+=1)A+=o[b>>g*8+4&15]+o[b>>g*8&15];return A}function B(b){var A;for(A=0;A<b.length;A+=1)b[A]=M(b[A]);return b.join("")}B(d("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function b(A,g){return A=A|0||0,A<0?Math.max(A+g,0):Math.min(A,g)}ArrayBuffer.prototype.slice=function(A,g){var x=this.byteLength,P=b(A,x),F=x,J,Te,nt,ut;return g!==i&&(F=b(g,x)),P>F?new ArrayBuffer(0):(J=F-P,Te=new ArrayBuffer(J),nt=new Uint8Array(Te),ut=new Uint8Array(this,P,J),nt.set(ut),Te)}}();function p(b){return/[\u0080-\uFFFF]/.test(b)&&(b=unescape(encodeURIComponent(b))),b}function U(b,A){var g=b.length,x=new ArrayBuffer(g),P=new Uint8Array(x),F;for(F=0;F<g;F+=1)P[F]=b.charCodeAt(F);return A?P:x}function q(b){return String.fromCharCode.apply(null,new Uint8Array(b))}function D(b,A,g){var x=new Uint8Array(b.byteLength+A.byteLength);return x.set(new Uint8Array(b)),x.set(new Uint8Array(A),b.byteLength),g?x:x.buffer}function pe(b){var A=[],g=b.length,x;for(x=0;x<g-1;x+=2)A.push(parseInt(b.substr(x,2),16));return String.fromCharCode.apply(String,A)}function ue(){this.reset()}return ue.prototype.append=function(b){return this.appendBinary(p(b)),this},ue.prototype.appendBinary=function(b){this._buff+=b,this._length+=b.length;var A=this._buff.length,g;for(g=64;g<=A;g+=64)f(this._hash,s(this._buff.substring(g-64,g)));return this._buff=this._buff.substring(g-64),this},ue.prototype.end=function(b){var A=this._buff,g=A.length,x,P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],F;for(x=0;x<g;x+=1)P[x>>2]|=A.charCodeAt(x)<<(x%4<<3);return this._finish(P,g),F=B(this._hash),b&&(F=pe(F)),this.reset(),F},ue.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},ue.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},ue.prototype.setState=function(b){return this._buff=b.buff,this._length=b.length,this._hash=b.hash,this},ue.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},ue.prototype._finish=function(b,A){var g=A,x,P,F;if(b[g>>2]|=128<<(g%4<<3),g>55)for(f(this._hash,b),g=0;g<16;g+=1)b[g]=0;x=this._length*8,x=x.toString(16).match(/(.*?)(.{0,8})$/),P=parseInt(x[2],16),F=parseInt(x[1],16)||0,b[14]=P,b[15]=F,f(this._hash,b)},ue.hash=function(b,A){return ue.hashBinary(p(b),A)},ue.hashBinary=function(b,A){var g=d(b),x=B(g);return A?pe(x):x},ue.ArrayBuffer=function(){this.reset()},ue.ArrayBuffer.prototype.append=function(b){var A=D(this._buff.buffer,b,!0),g=A.length,x;for(this._length+=b.byteLength,x=64;x<=g;x+=64)f(this._hash,l(A.subarray(x-64,x)));return this._buff=x-64<g?new Uint8Array(A.buffer.slice(x-64)):new Uint8Array(0),this},ue.ArrayBuffer.prototype.end=function(b){var A=this._buff,g=A.length,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],P,F;for(P=0;P<g;P+=1)x[P>>2]|=A[P]<<(P%4<<3);return this._finish(x,g),F=B(this._hash),b&&(F=pe(F)),this.reset(),F},ue.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},ue.ArrayBuffer.prototype.getState=function(){var b=ue.prototype.getState.call(this);return b.buff=q(b.buff),b},ue.ArrayBuffer.prototype.setState=function(b){return b.buff=U(b.buff,!0),ue.prototype.setState.call(this,b)},ue.ArrayBuffer.prototype.destroy=ue.prototype.destroy,ue.ArrayBuffer.prototype._finish=ue.prototype._finish,ue.ArrayBuffer.hash=function(b,A){var g=v(new Uint8Array(b)),x=B(g);return A?pe(x):x},ue})})(sv);const kg=sv.exports;var Ys={exports:{}};/**
8
+ var N0;function _t(){return N0.apply(null,arguments)}function pm(t){N0=t}function Yi(t){return t instanceof Array||Object.prototype.toString.call(t)==="[object Array]"}function Qo(t){return t!=null&&Object.prototype.toString.call(t)==="[object Object]"}function Sr(t,n){return Object.prototype.hasOwnProperty.call(t,n)}function Qc(t){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(t).length===0;var n;for(n in t)if(Sr(t,n))return!1;return!0}function ri(t){return t===void 0}function Ra(t){return typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]"}function Wf(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function B0(t,n){var i=[],a,f=t.length;for(a=0;a<f;++a)i.push(n(t[a],a));return i}function go(t,n){for(var i in n)Sr(n,i)&&(t[i]=n[i]);return Sr(n,"toString")&&(t.toString=n.toString),Sr(n,"valueOf")&&(t.valueOf=n.valueOf),t}function fa(t,n,i,a){return cv(t,n,i,a,!0).utc()}function mm(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function tr(t){return t._pf==null&&(t._pf=mm()),t._pf}var Jc;Array.prototype.some?Jc=Array.prototype.some:Jc=function(t){var n=Object(this),i=n.length>>>0,a;for(a=0;a<i;a++)if(a in n&&t.call(this,n[a],a,n))return!0;return!1};function eh(t){if(t._isValid==null){var n=tr(t),i=Jc.call(n.parsedDateParts,function(f){return f!=null}),a=!isNaN(t._d.getTime())&&n.overflow<0&&!n.empty&&!n.invalidEra&&!n.invalidMonth&&!n.invalidWeekday&&!n.weekdayMismatch&&!n.nullInput&&!n.invalidFormat&&!n.userInvalidated&&(!n.meridiem||n.meridiem&&i);if(t._strict&&(a=a&&n.charsLeftOver===0&&n.unusedTokens.length===0&&n.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(t))t._isValid=a;else return a}return t._isValid}function hu(t){var n=fa(NaN);return t!=null?go(tr(n),t):tr(n).userInvalidated=!0,n}var G0=_t.momentProperties=[],th=!1;function rh(t,n){var i,a,f,s=G0.length;if(ri(n._isAMomentObject)||(t._isAMomentObject=n._isAMomentObject),ri(n._i)||(t._i=n._i),ri(n._f)||(t._f=n._f),ri(n._l)||(t._l=n._l),ri(n._strict)||(t._strict=n._strict),ri(n._tzm)||(t._tzm=n._tzm),ri(n._isUTC)||(t._isUTC=n._isUTC),ri(n._offset)||(t._offset=n._offset),ri(n._pf)||(t._pf=tr(n)),ri(n._locale)||(t._locale=n._locale),s>0)for(i=0;i<s;i++)a=G0[i],f=n[a],ri(f)||(t[a]=f);return t}function Vf(t){rh(this,t),this._d=new Date(t._d!=null?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),th===!1&&(th=!0,_t.updateOffset(this),th=!1)}function Hi(t){return t instanceof Vf||t!=null&&t._isAMomentObject!=null}function U0(t){_t.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+t)}function Ci(t,n){var i=!0;return go(function(){if(_t.deprecationHandler!=null&&_t.deprecationHandler(null,t),i){var a=[],f,s,l,d=arguments.length;for(s=0;s<d;s++){if(f="",typeof arguments[s]=="object"){f+=`
9
+ [`+s+"] ";for(l in arguments[0])Sr(arguments[0],l)&&(f+=l+": "+arguments[0][l]+", ");f=f.slice(0,-2)}else f=arguments[s];a.push(f)}U0(t+`
10
+ Arguments: `+Array.prototype.slice.call(a).join("")+`
11
+ `+new Error().stack),i=!1}return n.apply(this,arguments)},n)}var Y0={};function H0(t,n){_t.deprecationHandler!=null&&_t.deprecationHandler(t,n),Y0[t]||(U0(n),Y0[t]=!0)}_t.suppressDeprecationWarnings=!1,_t.deprecationHandler=null;function la(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function gm(t){var n,i;for(i in t)Sr(t,i)&&(n=t[i],la(n)?this[i]=n:this["_"+i]=n);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function nh(t,n){var i=go({},t),a;for(a in n)Sr(n,a)&&(Qo(t[a])&&Qo(n[a])?(i[a]={},go(i[a],t[a]),go(i[a],n[a])):n[a]!=null?i[a]=n[a]:delete i[a]);for(a in t)Sr(t,a)&&!Sr(n,a)&&Qo(t[a])&&(i[a]=go({},i[a]));return i}function ih(t){t!=null&&this.set(t)}var ah;Object.keys?ah=Object.keys:ah=function(t){var n,i=[];for(n in t)Sr(t,n)&&i.push(n);return i};var ym={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function xm(t,n,i){var a=this._calendar[t]||this._calendar.sameElse;return la(a)?a.call(n,i):a}function ua(t,n,i){var a=""+Math.abs(t),f=n-a.length,s=t>=0;return(s?i?"+":"":"-")+Math.pow(10,Math.max(0,f)).toString().substr(1)+a}var oh=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,du=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,sh={},Gs={};function Ft(t,n,i,a){var f=a;typeof a=="string"&&(f=function(){return this[a]()}),t&&(Gs[t]=f),n&&(Gs[n[0]]=function(){return ua(f.apply(this,arguments),n[1],n[2])}),i&&(Gs[i]=function(){return this.localeData().ordinal(f.apply(this,arguments),t)})}function bm(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function wm(t){var n=t.match(oh),i,a;for(i=0,a=n.length;i<a;i++)Gs[n[i]]?n[i]=Gs[n[i]]:n[i]=bm(n[i]);return function(f){var s="",l;for(l=0;l<a;l++)s+=la(n[l])?n[l].call(f,t):n[l];return s}}function vu(t,n){return t.isValid()?(n=z0(n,t.localeData()),sh[n]=sh[n]||wm(n),sh[n](t)):t.localeData().invalidDate()}function z0(t,n){var i=5;function a(f){return n.longDateFormat(f)||f}for(du.lastIndex=0;i>=0&&du.test(t);)t=t.replace(du,a),du.lastIndex=0,i-=1;return t}var Sm={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Am(t){var n=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return n||!i?n:(this._longDateFormat[t]=i.match(oh).map(function(a){return a==="MMMM"||a==="MM"||a==="DD"||a==="dddd"?a.slice(1):a}).join(""),this._longDateFormat[t])}var Tm="Invalid date";function Em(){return this._invalidDate}var Dm="%d",Lm=/\d{1,2}/;function Rm(t){return this._ordinal.replace("%d",t)}var Cm={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Om(t,n,i,a){var f=this._relativeTime[i];return la(f)?f(t,n,i,a):f.replace(/%d/i,t)}function Im(t,n){var i=this._relativeTime[t>0?"future":"past"];return la(i)?i(n):i.replace(/%s/i,n)}var $f={};function zn(t,n){var i=t.toLowerCase();$f[i]=$f[i+"s"]=$f[n]=t}function Oi(t){return typeof t=="string"?$f[t]||$f[t.toLowerCase()]:void 0}function fh(t){var n={},i,a;for(a in t)Sr(t,a)&&(i=Oi(a),i&&(n[i]=t[a]));return n}var W0={};function Wn(t,n){W0[t]=n}function Mm(t){var n=[],i;for(i in t)Sr(t,i)&&n.push({unit:i,priority:W0[i]});return n.sort(function(a,f){return a.priority-f.priority}),n}function _u(t){return t%4===0&&t%100!==0||t%400===0}function Ii(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function fr(t){var n=+t,i=0;return n!==0&&isFinite(n)&&(i=Ii(n)),i}function Us(t,n){return function(i){return i!=null?(V0(this,t,i),_t.updateOffset(this,n),this):pu(this,t)}}function pu(t,n){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+n]():NaN}function V0(t,n,i){t.isValid()&&!isNaN(i)&&(n==="FullYear"&&_u(t.year())&&t.month()===1&&t.date()===29?(i=fr(i),t._d["set"+(t._isUTC?"UTC":"")+n](i,t.month(),Su(i,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+n](i))}function Fm(t){return t=Oi(t),la(this[t])?this[t]():this}function km(t,n){if(typeof t=="object"){t=fh(t);var i=Mm(t),a,f=i.length;for(a=0;a<f;a++)this[i[a].unit](t[i[a].unit])}else if(t=Oi(t),la(this[t]))return this[t](n);return this}var $0=/\d/,vi=/\d\d/,Z0=/\d{3}/,lh=/\d{4}/,mu=/[+-]?\d{6}/,Gr=/\d\d?/,X0=/\d\d\d\d?/,q0=/\d\d\d\d\d\d?/,gu=/\d{1,3}/,uh=/\d{1,4}/,yu=/[+-]?\d{1,6}/,Ys=/\d+/,xu=/[+-]?\d+/,Pm=/Z|[+-]\d\d:?\d\d/gi,bu=/Z|[+-]\d\d(?::?\d\d)?/gi,Nm=/[+-]?\d+(\.\d{1,3})?/,Zf=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,wu;wu={};function bt(t,n,i){wu[t]=la(n)?n:function(a,f){return a&&i?i:n}}function Bm(t,n){return Sr(wu,t)?wu[t](n._strict,n._locale):new RegExp(Gm(t))}function Gm(t){return _i(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,i,a,f,s){return i||a||f||s}))}function _i(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ch={};function Mr(t,n){var i,a=n,f;for(typeof t=="string"&&(t=[t]),Ra(n)&&(a=function(s,l){l[n]=fr(s)}),f=t.length,i=0;i<f;i++)ch[t[i]]=a}function Xf(t,n){Mr(t,function(i,a,f,s){f._w=f._w||{},n(i,f._w,f,s)})}function Um(t,n,i){n!=null&&Sr(ch,t)&&ch[t](n,i._a,i,t)}var Vn=0,Ca=1,ca=2,wn=3,zi=4,Oa=5,Jo=6,Ym=7,Hm=8;function zm(t,n){return(t%n+n)%n}var an;Array.prototype.indexOf?an=Array.prototype.indexOf:an=function(t){var n;for(n=0;n<this.length;++n)if(this[n]===t)return n;return-1};function Su(t,n){if(isNaN(t)||isNaN(n))return NaN;var i=zm(n,12);return t+=(n-i)/12,i===1?_u(t)?29:28:31-i%7%2}Ft("M",["MM",2],"Mo",function(){return this.month()+1}),Ft("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),Ft("MMMM",0,0,function(t){return this.localeData().months(this,t)}),zn("month","M"),Wn("month",8),bt("M",Gr),bt("MM",Gr,vi),bt("MMM",function(t,n){return n.monthsShortRegex(t)}),bt("MMMM",function(t,n){return n.monthsRegex(t)}),Mr(["M","MM"],function(t,n){n[Ca]=fr(t)-1}),Mr(["MMM","MMMM"],function(t,n,i,a){var f=i._locale.monthsParse(t,a,i._strict);f!=null?n[Ca]=f:tr(i).invalidMonth=t});var Wm="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),K0="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),j0=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Vm=Zf,$m=Zf;function Zm(t,n){return t?Yi(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||j0).test(n)?"format":"standalone"][t.month()]:Yi(this._months)?this._months:this._months.standalone}function Xm(t,n){return t?Yi(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[j0.test(n)?"format":"standalone"][t.month()]:Yi(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function qm(t,n,i){var a,f,s,l=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],a=0;a<12;++a)s=fa([2e3,a]),this._shortMonthsParse[a]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[a]=this.months(s,"").toLocaleLowerCase();return i?n==="MMM"?(f=an.call(this._shortMonthsParse,l),f!==-1?f:null):(f=an.call(this._longMonthsParse,l),f!==-1?f:null):n==="MMM"?(f=an.call(this._shortMonthsParse,l),f!==-1?f:(f=an.call(this._longMonthsParse,l),f!==-1?f:null)):(f=an.call(this._longMonthsParse,l),f!==-1?f:(f=an.call(this._shortMonthsParse,l),f!==-1?f:null))}function Km(t,n,i){var a,f,s;if(this._monthsParseExact)return qm.call(this,t,n,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),a=0;a<12;a++){if(f=fa([2e3,a]),i&&!this._longMonthsParse[a]&&(this._longMonthsParse[a]=new RegExp("^"+this.months(f,"").replace(".","")+"$","i"),this._shortMonthsParse[a]=new RegExp("^"+this.monthsShort(f,"").replace(".","")+"$","i")),!i&&!this._monthsParse[a]&&(s="^"+this.months(f,"")+"|^"+this.monthsShort(f,""),this._monthsParse[a]=new RegExp(s.replace(".",""),"i")),i&&n==="MMMM"&&this._longMonthsParse[a].test(t))return a;if(i&&n==="MMM"&&this._shortMonthsParse[a].test(t))return a;if(!i&&this._monthsParse[a].test(t))return a}}function Q0(t,n){var i;if(!t.isValid())return t;if(typeof n=="string"){if(/^\d+$/.test(n))n=fr(n);else if(n=t.localeData().monthsParse(n),!Ra(n))return t}return i=Math.min(t.date(),Su(t.year(),n)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](n,i),t}function J0(t){return t!=null?(Q0(this,t),_t.updateOffset(this,!0),this):pu(this,"Month")}function jm(){return Su(this.year(),this.month())}function Qm(t){return this._monthsParseExact?(Sr(this,"_monthsRegex")||ev.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(Sr(this,"_monthsShortRegex")||(this._monthsShortRegex=Vm),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function Jm(t){return this._monthsParseExact?(Sr(this,"_monthsRegex")||ev.call(this),t?this._monthsStrictRegex:this._monthsRegex):(Sr(this,"_monthsRegex")||(this._monthsRegex=$m),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function ev(){function t(l,d){return d.length-l.length}var n=[],i=[],a=[],f,s;for(f=0;f<12;f++)s=fa([2e3,f]),n.push(this.monthsShort(s,"")),i.push(this.months(s,"")),a.push(this.months(s,"")),a.push(this.monthsShort(s,""));for(n.sort(t),i.sort(t),a.sort(t),f=0;f<12;f++)n[f]=_i(n[f]),i[f]=_i(i[f]);for(f=0;f<24;f++)a[f]=_i(a[f]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}Ft("Y",0,0,function(){var t=this.year();return t<=9999?ua(t,4):"+"+t}),Ft(0,["YY",2],0,function(){return this.year()%100}),Ft(0,["YYYY",4],0,"year"),Ft(0,["YYYYY",5],0,"year"),Ft(0,["YYYYYY",6,!0],0,"year"),zn("year","y"),Wn("year",1),bt("Y",xu),bt("YY",Gr,vi),bt("YYYY",uh,lh),bt("YYYYY",yu,mu),bt("YYYYYY",yu,mu),Mr(["YYYYY","YYYYYY"],Vn),Mr("YYYY",function(t,n){n[Vn]=t.length===2?_t.parseTwoDigitYear(t):fr(t)}),Mr("YY",function(t,n){n[Vn]=_t.parseTwoDigitYear(t)}),Mr("Y",function(t,n){n[Vn]=parseInt(t,10)});function qf(t){return _u(t)?366:365}_t.parseTwoDigitYear=function(t){return fr(t)+(fr(t)>68?1900:2e3)};var tv=Us("FullYear",!0);function e1(){return _u(this.year())}function t1(t,n,i,a,f,s,l){var d;return t<100&&t>=0?(d=new Date(t+400,n,i,a,f,s,l),isFinite(d.getFullYear())&&d.setFullYear(t)):d=new Date(t,n,i,a,f,s,l),d}function Kf(t){var n,i;return t<100&&t>=0?(i=Array.prototype.slice.call(arguments),i[0]=t+400,n=new Date(Date.UTC.apply(null,i)),isFinite(n.getUTCFullYear())&&n.setUTCFullYear(t)):n=new Date(Date.UTC.apply(null,arguments)),n}function Au(t,n,i){var a=7+n-i,f=(7+Kf(t,0,a).getUTCDay()-n)%7;return-f+a-1}function rv(t,n,i,a,f){var s=(7+i-a)%7,l=Au(t,a,f),d=1+7*(n-1)+s+l,v,I;return d<=0?(v=t-1,I=qf(v)+d):d>qf(t)?(v=t+1,I=d-qf(t)):(v=t,I=d),{year:v,dayOfYear:I}}function jf(t,n,i){var a=Au(t.year(),n,i),f=Math.floor((t.dayOfYear()-a-1)/7)+1,s,l;return f<1?(l=t.year()-1,s=f+Ia(l,n,i)):f>Ia(t.year(),n,i)?(s=f-Ia(t.year(),n,i),l=t.year()+1):(l=t.year(),s=f),{week:s,year:l}}function Ia(t,n,i){var a=Au(t,n,i),f=Au(t+1,n,i);return(qf(t)-a+f)/7}Ft("w",["ww",2],"wo","week"),Ft("W",["WW",2],"Wo","isoWeek"),zn("week","w"),zn("isoWeek","W"),Wn("week",5),Wn("isoWeek",5),bt("w",Gr),bt("ww",Gr,vi),bt("W",Gr),bt("WW",Gr,vi),Xf(["w","ww","W","WW"],function(t,n,i,a){n[a.substr(0,1)]=fr(t)});function r1(t){return jf(t,this._week.dow,this._week.doy).week}var n1={dow:0,doy:6};function i1(){return this._week.dow}function a1(){return this._week.doy}function o1(t){var n=this.localeData().week(this);return t==null?n:this.add((t-n)*7,"d")}function s1(t){var n=jf(this,1,4).week;return t==null?n:this.add((t-n)*7,"d")}Ft("d",0,"do","day"),Ft("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),Ft("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),Ft("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),Ft("e",0,0,"weekday"),Ft("E",0,0,"isoWeekday"),zn("day","d"),zn("weekday","e"),zn("isoWeekday","E"),Wn("day",11),Wn("weekday",11),Wn("isoWeekday",11),bt("d",Gr),bt("e",Gr),bt("E",Gr),bt("dd",function(t,n){return n.weekdaysMinRegex(t)}),bt("ddd",function(t,n){return n.weekdaysShortRegex(t)}),bt("dddd",function(t,n){return n.weekdaysRegex(t)}),Xf(["dd","ddd","dddd"],function(t,n,i,a){var f=i._locale.weekdaysParse(t,a,i._strict);f!=null?n.d=f:tr(i).invalidWeekday=t}),Xf(["d","e","E"],function(t,n,i,a){n[a]=fr(t)});function f1(t,n){return typeof t!="string"?t:isNaN(t)?(t=n.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function l1(t,n){return typeof t=="string"?n.weekdaysParse(t)%7||7:isNaN(t)?null:t}function hh(t,n){return t.slice(n,7).concat(t.slice(0,n))}var u1="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),nv="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),c1="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),h1=Zf,d1=Zf,v1=Zf;function _1(t,n){var i=Yi(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(n)?"format":"standalone"];return t===!0?hh(i,this._week.dow):t?i[t.day()]:i}function p1(t){return t===!0?hh(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function m1(t){return t===!0?hh(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function g1(t,n,i){var a,f,s,l=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],a=0;a<7;++a)s=fa([2e3,1]).day(a),this._minWeekdaysParse[a]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[a]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[a]=this.weekdays(s,"").toLocaleLowerCase();return i?n==="dddd"?(f=an.call(this._weekdaysParse,l),f!==-1?f:null):n==="ddd"?(f=an.call(this._shortWeekdaysParse,l),f!==-1?f:null):(f=an.call(this._minWeekdaysParse,l),f!==-1?f:null):n==="dddd"?(f=an.call(this._weekdaysParse,l),f!==-1||(f=an.call(this._shortWeekdaysParse,l),f!==-1)?f:(f=an.call(this._minWeekdaysParse,l),f!==-1?f:null)):n==="ddd"?(f=an.call(this._shortWeekdaysParse,l),f!==-1||(f=an.call(this._weekdaysParse,l),f!==-1)?f:(f=an.call(this._minWeekdaysParse,l),f!==-1?f:null)):(f=an.call(this._minWeekdaysParse,l),f!==-1||(f=an.call(this._weekdaysParse,l),f!==-1)?f:(f=an.call(this._shortWeekdaysParse,l),f!==-1?f:null))}function y1(t,n,i){var a,f,s;if(this._weekdaysParseExact)return g1.call(this,t,n,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),a=0;a<7;a++){if(f=fa([2e3,1]).day(a),i&&!this._fullWeekdaysParse[a]&&(this._fullWeekdaysParse[a]=new RegExp("^"+this.weekdays(f,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[a]=new RegExp("^"+this.weekdaysShort(f,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[a]=new RegExp("^"+this.weekdaysMin(f,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[a]||(s="^"+this.weekdays(f,"")+"|^"+this.weekdaysShort(f,"")+"|^"+this.weekdaysMin(f,""),this._weekdaysParse[a]=new RegExp(s.replace(".",""),"i")),i&&n==="dddd"&&this._fullWeekdaysParse[a].test(t))return a;if(i&&n==="ddd"&&this._shortWeekdaysParse[a].test(t))return a;if(i&&n==="dd"&&this._minWeekdaysParse[a].test(t))return a;if(!i&&this._weekdaysParse[a].test(t))return a}}function x1(t){if(!this.isValid())return t!=null?this:NaN;var n=this._isUTC?this._d.getUTCDay():this._d.getDay();return t!=null?(t=f1(t,this.localeData()),this.add(t-n,"d")):n}function b1(t){if(!this.isValid())return t!=null?this:NaN;var n=(this.day()+7-this.localeData()._week.dow)%7;return t==null?n:this.add(t-n,"d")}function w1(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var n=l1(t,this.localeData());return this.day(this.day()%7?n:n-7)}else return this.day()||7}function S1(t){return this._weekdaysParseExact?(Sr(this,"_weekdaysRegex")||dh.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(Sr(this,"_weekdaysRegex")||(this._weekdaysRegex=h1),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function A1(t){return this._weekdaysParseExact?(Sr(this,"_weekdaysRegex")||dh.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Sr(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=d1),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function T1(t){return this._weekdaysParseExact?(Sr(this,"_weekdaysRegex")||dh.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Sr(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=v1),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function dh(){function t(B,p){return p.length-B.length}var n=[],i=[],a=[],f=[],s,l,d,v,I;for(s=0;s<7;s++)l=fa([2e3,1]).day(s),d=_i(this.weekdaysMin(l,"")),v=_i(this.weekdaysShort(l,"")),I=_i(this.weekdays(l,"")),n.push(d),i.push(v),a.push(I),f.push(d),f.push(v),f.push(I);n.sort(t),i.sort(t),a.sort(t),f.sort(t),this._weekdaysRegex=new RegExp("^("+f.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+n.join("|")+")","i")}function vh(){return this.hours()%12||12}function E1(){return this.hours()||24}Ft("H",["HH",2],0,"hour"),Ft("h",["hh",2],0,vh),Ft("k",["kk",2],0,E1),Ft("hmm",0,0,function(){return""+vh.apply(this)+ua(this.minutes(),2)}),Ft("hmmss",0,0,function(){return""+vh.apply(this)+ua(this.minutes(),2)+ua(this.seconds(),2)}),Ft("Hmm",0,0,function(){return""+this.hours()+ua(this.minutes(),2)}),Ft("Hmmss",0,0,function(){return""+this.hours()+ua(this.minutes(),2)+ua(this.seconds(),2)});function iv(t,n){Ft(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),n)})}iv("a",!0),iv("A",!1),zn("hour","h"),Wn("hour",13);function av(t,n){return n._meridiemParse}bt("a",av),bt("A",av),bt("H",Gr),bt("h",Gr),bt("k",Gr),bt("HH",Gr,vi),bt("hh",Gr,vi),bt("kk",Gr,vi),bt("hmm",X0),bt("hmmss",q0),bt("Hmm",X0),bt("Hmmss",q0),Mr(["H","HH"],wn),Mr(["k","kk"],function(t,n,i){var a=fr(t);n[wn]=a===24?0:a}),Mr(["a","A"],function(t,n,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),Mr(["h","hh"],function(t,n,i){n[wn]=fr(t),tr(i).bigHour=!0}),Mr("hmm",function(t,n,i){var a=t.length-2;n[wn]=fr(t.substr(0,a)),n[zi]=fr(t.substr(a)),tr(i).bigHour=!0}),Mr("hmmss",function(t,n,i){var a=t.length-4,f=t.length-2;n[wn]=fr(t.substr(0,a)),n[zi]=fr(t.substr(a,2)),n[Oa]=fr(t.substr(f)),tr(i).bigHour=!0}),Mr("Hmm",function(t,n,i){var a=t.length-2;n[wn]=fr(t.substr(0,a)),n[zi]=fr(t.substr(a))}),Mr("Hmmss",function(t,n,i){var a=t.length-4,f=t.length-2;n[wn]=fr(t.substr(0,a)),n[zi]=fr(t.substr(a,2)),n[Oa]=fr(t.substr(f))});function D1(t){return(t+"").toLowerCase().charAt(0)==="p"}var L1=/[ap]\.?m?\.?/i,R1=Us("Hours",!0);function C1(t,n,i){return t>11?i?"pm":"PM":i?"am":"AM"}var ov={calendar:ym,longDateFormat:Sm,invalidDate:Tm,ordinal:Dm,dayOfMonthOrdinalParse:Lm,relativeTime:Cm,months:Wm,monthsShort:K0,week:n1,weekdays:u1,weekdaysMin:c1,weekdaysShort:nv,meridiemParse:L1},Zr={},Qf={},Jf;function O1(t,n){var i,a=Math.min(t.length,n.length);for(i=0;i<a;i+=1)if(t[i]!==n[i])return i;return a}function sv(t){return t&&t.toLowerCase().replace("_","-")}function I1(t){for(var n=0,i,a,f,s;n<t.length;){for(s=sv(t[n]).split("-"),i=s.length,a=sv(t[n+1]),a=a?a.split("-"):null;i>0;){if(f=Tu(s.slice(0,i).join("-")),f)return f;if(a&&a.length>=i&&O1(s,a)>=i-1)break;i--}n++}return Jf}function M1(t){return t.match("^[^/\\\\]*$")!=null}function Tu(t){var n=null,i;if(Zr[t]===void 0&&typeof module<"u"&&module&&module.exports&&M1(t))try{n=Jf._abbr,i=require,i("./locale/"+t),yo(n)}catch{Zr[t]=null}return Zr[t]}function yo(t,n){var i;return t&&(ri(n)?i=Ma(t):i=_h(t,n),i?Jf=i:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Jf._abbr}function _h(t,n){if(n!==null){var i,a=ov;if(n.abbr=t,Zr[t]!=null)H0("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),a=Zr[t]._config;else if(n.parentLocale!=null)if(Zr[n.parentLocale]!=null)a=Zr[n.parentLocale]._config;else if(i=Tu(n.parentLocale),i!=null)a=i._config;else return Qf[n.parentLocale]||(Qf[n.parentLocale]=[]),Qf[n.parentLocale].push({name:t,config:n}),null;return Zr[t]=new ih(nh(a,n)),Qf[t]&&Qf[t].forEach(function(f){_h(f.name,f.config)}),yo(t),Zr[t]}else return delete Zr[t],null}function F1(t,n){if(n!=null){var i,a,f=ov;Zr[t]!=null&&Zr[t].parentLocale!=null?Zr[t].set(nh(Zr[t]._config,n)):(a=Tu(t),a!=null&&(f=a._config),n=nh(f,n),a==null&&(n.abbr=t),i=new ih(n),i.parentLocale=Zr[t],Zr[t]=i),yo(t)}else Zr[t]!=null&&(Zr[t].parentLocale!=null?(Zr[t]=Zr[t].parentLocale,t===yo()&&yo(t)):Zr[t]!=null&&delete Zr[t]);return Zr[t]}function Ma(t){var n;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Jf;if(!Yi(t)){if(n=Tu(t),n)return n;t=[t]}return I1(t)}function k1(){return ah(Zr)}function ph(t){var n,i=t._a;return i&&tr(t).overflow===-2&&(n=i[Ca]<0||i[Ca]>11?Ca:i[ca]<1||i[ca]>Su(i[Vn],i[Ca])?ca:i[wn]<0||i[wn]>24||i[wn]===24&&(i[zi]!==0||i[Oa]!==0||i[Jo]!==0)?wn:i[zi]<0||i[zi]>59?zi:i[Oa]<0||i[Oa]>59?Oa:i[Jo]<0||i[Jo]>999?Jo:-1,tr(t)._overflowDayOfYear&&(n<Vn||n>ca)&&(n=ca),tr(t)._overflowWeeks&&n===-1&&(n=Ym),tr(t)._overflowWeekday&&n===-1&&(n=Hm),tr(t).overflow=n),t}var P1=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,N1=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,B1=/Z|[+-]\d\d(?::?\d\d)?/,Eu=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],mh=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],G1=/^\/?Date\((-?\d+)/i,U1=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Y1={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function fv(t){var n,i,a=t._i,f=P1.exec(a)||N1.exec(a),s,l,d,v,I=Eu.length,B=mh.length;if(f){for(tr(t).iso=!0,n=0,i=I;n<i;n++)if(Eu[n][1].exec(f[1])){l=Eu[n][0],s=Eu[n][2]!==!1;break}if(l==null){t._isValid=!1;return}if(f[3]){for(n=0,i=B;n<i;n++)if(mh[n][1].exec(f[3])){d=(f[2]||" ")+mh[n][0];break}if(d==null){t._isValid=!1;return}}if(!s&&d!=null){t._isValid=!1;return}if(f[4])if(B1.exec(f[4]))v="Z";else{t._isValid=!1;return}t._f=l+(d||"")+(v||""),yh(t)}else t._isValid=!1}function H1(t,n,i,a,f,s){var l=[z1(t),K0.indexOf(n),parseInt(i,10),parseInt(a,10),parseInt(f,10)];return s&&l.push(parseInt(s,10)),l}function z1(t){var n=parseInt(t,10);return n<=49?2e3+n:n<=999?1900+n:n}function W1(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function V1(t,n,i){if(t){var a=nv.indexOf(t),f=new Date(n[0],n[1],n[2]).getDay();if(a!==f)return tr(i).weekdayMismatch=!0,i._isValid=!1,!1}return!0}function $1(t,n,i){if(t)return Y1[t];if(n)return 0;var a=parseInt(i,10),f=a%100,s=(a-f)/100;return s*60+f}function lv(t){var n=U1.exec(W1(t._i)),i;if(n){if(i=H1(n[4],n[3],n[2],n[5],n[6],n[7]),!V1(n[1],i,t))return;t._a=i,t._tzm=$1(n[8],n[9],n[10]),t._d=Kf.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),tr(t).rfc2822=!0}else t._isValid=!1}function Z1(t){var n=G1.exec(t._i);if(n!==null){t._d=new Date(+n[1]);return}if(fv(t),t._isValid===!1)delete t._isValid;else return;if(lv(t),t._isValid===!1)delete t._isValid;else return;t._strict?t._isValid=!1:_t.createFromInputFallback(t)}_t.createFromInputFallback=Ci("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))});function Hs(t,n,i){return t!=null?t:n!=null?n:i}function X1(t){var n=new Date(_t.now());return t._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function gh(t){var n,i,a=[],f,s,l;if(!t._d){for(f=X1(t),t._w&&t._a[ca]==null&&t._a[Ca]==null&&q1(t),t._dayOfYear!=null&&(l=Hs(t._a[Vn],f[Vn]),(t._dayOfYear>qf(l)||t._dayOfYear===0)&&(tr(t)._overflowDayOfYear=!0),i=Kf(l,0,t._dayOfYear),t._a[Ca]=i.getUTCMonth(),t._a[ca]=i.getUTCDate()),n=0;n<3&&t._a[n]==null;++n)t._a[n]=a[n]=f[n];for(;n<7;n++)t._a[n]=a[n]=t._a[n]==null?n===2?1:0:t._a[n];t._a[wn]===24&&t._a[zi]===0&&t._a[Oa]===0&&t._a[Jo]===0&&(t._nextDay=!0,t._a[wn]=0),t._d=(t._useUTC?Kf:t1).apply(null,a),s=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[wn]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==s&&(tr(t).weekdayMismatch=!0)}}function q1(t){var n,i,a,f,s,l,d,v,I;n=t._w,n.GG!=null||n.W!=null||n.E!=null?(s=1,l=4,i=Hs(n.GG,t._a[Vn],jf(Ur(),1,4).year),a=Hs(n.W,1),f=Hs(n.E,1),(f<1||f>7)&&(v=!0)):(s=t._locale._week.dow,l=t._locale._week.doy,I=jf(Ur(),s,l),i=Hs(n.gg,t._a[Vn],I.year),a=Hs(n.w,I.week),n.d!=null?(f=n.d,(f<0||f>6)&&(v=!0)):n.e!=null?(f=n.e+s,(n.e<0||n.e>6)&&(v=!0)):f=s),a<1||a>Ia(i,s,l)?tr(t)._overflowWeeks=!0:v!=null?tr(t)._overflowWeekday=!0:(d=rv(i,a,f,s,l),t._a[Vn]=d.year,t._dayOfYear=d.dayOfYear)}_t.ISO_8601=function(){},_t.RFC_2822=function(){};function yh(t){if(t._f===_t.ISO_8601){fv(t);return}if(t._f===_t.RFC_2822){lv(t);return}t._a=[],tr(t).empty=!0;var n=""+t._i,i,a,f,s,l,d=n.length,v=0,I,B;for(f=z0(t._f,t._locale).match(oh)||[],B=f.length,i=0;i<B;i++)s=f[i],a=(n.match(Bm(s,t))||[])[0],a&&(l=n.substr(0,n.indexOf(a)),l.length>0&&tr(t).unusedInput.push(l),n=n.slice(n.indexOf(a)+a.length),v+=a.length),Gs[s]?(a?tr(t).empty=!1:tr(t).unusedTokens.push(s),Um(s,a,t)):t._strict&&!a&&tr(t).unusedTokens.push(s);tr(t).charsLeftOver=d-v,n.length>0&&tr(t).unusedInput.push(n),t._a[wn]<=12&&tr(t).bigHour===!0&&t._a[wn]>0&&(tr(t).bigHour=void 0),tr(t).parsedDateParts=t._a.slice(0),tr(t).meridiem=t._meridiem,t._a[wn]=K1(t._locale,t._a[wn],t._meridiem),I=tr(t).era,I!==null&&(t._a[Vn]=t._locale.erasConvertYear(I,t._a[Vn])),gh(t),ph(t)}function K1(t,n,i){var a;return i==null?n:t.meridiemHour!=null?t.meridiemHour(n,i):(t.isPM!=null&&(a=t.isPM(i),a&&n<12&&(n+=12),!a&&n===12&&(n=0)),n)}function j1(t){var n,i,a,f,s,l,d=!1,v=t._f.length;if(v===0){tr(t).invalidFormat=!0,t._d=new Date(NaN);return}for(f=0;f<v;f++)s=0,l=!1,n=rh({},t),t._useUTC!=null&&(n._useUTC=t._useUTC),n._f=t._f[f],yh(n),eh(n)&&(l=!0),s+=tr(n).charsLeftOver,s+=tr(n).unusedTokens.length*10,tr(n).score=s,d?s<a&&(a=s,i=n):(a==null||s<a||l)&&(a=s,i=n,l&&(d=!0));go(t,i||n)}function Q1(t){if(!t._d){var n=fh(t._i),i=n.day===void 0?n.date:n.day;t._a=B0([n.year,n.month,i,n.hour,n.minute,n.second,n.millisecond],function(a){return a&&parseInt(a,10)}),gh(t)}}function J1(t){var n=new Vf(ph(uv(t)));return n._nextDay&&(n.add(1,"d"),n._nextDay=void 0),n}function uv(t){var n=t._i,i=t._f;return t._locale=t._locale||Ma(t._l),n===null||i===void 0&&n===""?hu({nullInput:!0}):(typeof n=="string"&&(t._i=n=t._locale.preparse(n)),Hi(n)?new Vf(ph(n)):(Wf(n)?t._d=n:Yi(i)?j1(t):i?yh(t):eg(t),eh(t)||(t._d=null),t))}function eg(t){var n=t._i;ri(n)?t._d=new Date(_t.now()):Wf(n)?t._d=new Date(n.valueOf()):typeof n=="string"?Z1(t):Yi(n)?(t._a=B0(n.slice(0),function(i){return parseInt(i,10)}),gh(t)):Qo(n)?Q1(t):Ra(n)?t._d=new Date(n):_t.createFromInputFallback(t)}function cv(t,n,i,a,f){var s={};return(n===!0||n===!1)&&(a=n,n=void 0),(i===!0||i===!1)&&(a=i,i=void 0),(Qo(t)&&Qc(t)||Yi(t)&&t.length===0)&&(t=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=f,s._l=i,s._i=t,s._f=n,s._strict=a,J1(s)}function Ur(t,n,i,a){return cv(t,n,i,a,!1)}var tg=Ci("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Ur.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:hu()}),rg=Ci("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Ur.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:hu()});function hv(t,n){var i,a;if(n.length===1&&Yi(n[0])&&(n=n[0]),!n.length)return Ur();for(i=n[0],a=1;a<n.length;++a)(!n[a].isValid()||n[a][t](i))&&(i=n[a]);return i}function ng(){var t=[].slice.call(arguments,0);return hv("isBefore",t)}function ig(){var t=[].slice.call(arguments,0);return hv("isAfter",t)}var ag=function(){return Date.now?Date.now():+new Date},el=["year","quarter","month","week","day","hour","minute","second","millisecond"];function og(t){var n,i=!1,a,f=el.length;for(n in t)if(Sr(t,n)&&!(an.call(el,n)!==-1&&(t[n]==null||!isNaN(t[n]))))return!1;for(a=0;a<f;++a)if(t[el[a]]){if(i)return!1;parseFloat(t[el[a]])!==fr(t[el[a]])&&(i=!0)}return!0}function sg(){return this._isValid}function fg(){return Wi(NaN)}function Du(t){var n=fh(t),i=n.year||0,a=n.quarter||0,f=n.month||0,s=n.week||n.isoWeek||0,l=n.day||0,d=n.hour||0,v=n.minute||0,I=n.second||0,B=n.millisecond||0;this._isValid=og(n),this._milliseconds=+B+I*1e3+v*6e4+d*1e3*60*60,this._days=+l+s*7,this._months=+f+a*3+i*12,this._data={},this._locale=Ma(),this._bubble()}function Lu(t){return t instanceof Du}function xh(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function lg(t,n,i){var a=Math.min(t.length,n.length),f=Math.abs(t.length-n.length),s=0,l;for(l=0;l<a;l++)(i&&t[l]!==n[l]||!i&&fr(t[l])!==fr(n[l]))&&s++;return s+f}function dv(t,n){Ft(t,0,0,function(){var i=this.utcOffset(),a="+";return i<0&&(i=-i,a="-"),a+ua(~~(i/60),2)+n+ua(~~i%60,2)})}dv("Z",":"),dv("ZZ",""),bt("Z",bu),bt("ZZ",bu),Mr(["Z","ZZ"],function(t,n,i){i._useUTC=!0,i._tzm=bh(bu,t)});var ug=/([\+\-]|\d\d)/gi;function bh(t,n){var i=(n||"").match(t),a,f,s;return i===null?null:(a=i[i.length-1]||[],f=(a+"").match(ug)||["-",0,0],s=+(f[1]*60)+fr(f[2]),s===0?0:f[0]==="+"?s:-s)}function wh(t,n){var i,a;return n._isUTC?(i=n.clone(),a=(Hi(t)||Wf(t)?t.valueOf():Ur(t).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+a),_t.updateOffset(i,!1),i):Ur(t).local()}function Sh(t){return-Math.round(t._d.getTimezoneOffset())}_t.updateOffset=function(){};function cg(t,n,i){var a=this._offset||0,f;if(!this.isValid())return t!=null?this:NaN;if(t!=null){if(typeof t=="string"){if(t=bh(bu,t),t===null)return this}else Math.abs(t)<16&&!i&&(t=t*60);return!this._isUTC&&n&&(f=Sh(this)),this._offset=t,this._isUTC=!0,f!=null&&this.add(f,"m"),a!==t&&(!n||this._changeInProgress?mv(this,Wi(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,_t.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?a:Sh(this)}function hg(t,n){return t!=null?(typeof t!="string"&&(t=-t),this.utcOffset(t,n),this):-this.utcOffset()}function dg(t){return this.utcOffset(0,t)}function vg(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Sh(this),"m")),this}function _g(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var t=bh(Pm,this._i);t!=null?this.utcOffset(t):this.utcOffset(0,!0)}return this}function pg(t){return this.isValid()?(t=t?Ur(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function mg(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function gg(){if(!ri(this._isDSTShifted))return this._isDSTShifted;var t={},n;return rh(t,this),t=uv(t),t._a?(n=t._isUTC?fa(t._a):Ur(t._a),this._isDSTShifted=this.isValid()&&lg(t._a,n.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function yg(){return this.isValid()?!this._isUTC:!1}function xg(){return this.isValid()?this._isUTC:!1}function vv(){return this.isValid()?this._isUTC&&this._offset===0:!1}var bg=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,wg=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Wi(t,n){var i=t,a=null,f,s,l;return Lu(t)?i={ms:t._milliseconds,d:t._days,M:t._months}:Ra(t)||!isNaN(+t)?(i={},n?i[n]=+t:i.milliseconds=+t):(a=bg.exec(t))?(f=a[1]==="-"?-1:1,i={y:0,d:fr(a[ca])*f,h:fr(a[wn])*f,m:fr(a[zi])*f,s:fr(a[Oa])*f,ms:fr(xh(a[Jo]*1e3))*f}):(a=wg.exec(t))?(f=a[1]==="-"?-1:1,i={y:es(a[2],f),M:es(a[3],f),w:es(a[4],f),d:es(a[5],f),h:es(a[6],f),m:es(a[7],f),s:es(a[8],f)}):i==null?i={}:typeof i=="object"&&("from"in i||"to"in i)&&(l=Sg(Ur(i.from),Ur(i.to)),i={},i.ms=l.milliseconds,i.M=l.months),s=new Du(i),Lu(t)&&Sr(t,"_locale")&&(s._locale=t._locale),Lu(t)&&Sr(t,"_isValid")&&(s._isValid=t._isValid),s}Wi.fn=Du.prototype,Wi.invalid=fg;function es(t,n){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*n}function _v(t,n){var i={};return i.months=n.month()-t.month()+(n.year()-t.year())*12,t.clone().add(i.months,"M").isAfter(n)&&--i.months,i.milliseconds=+n-+t.clone().add(i.months,"M"),i}function Sg(t,n){var i;return t.isValid()&&n.isValid()?(n=wh(n,t),t.isBefore(n)?i=_v(t,n):(i=_v(n,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function pv(t,n){return function(i,a){var f,s;return a!==null&&!isNaN(+a)&&(H0(n,"moment()."+n+"(period, number) is deprecated. Please use moment()."+n+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=i,i=a,a=s),f=Wi(i,a),mv(this,f,t),this}}function mv(t,n,i,a){var f=n._milliseconds,s=xh(n._days),l=xh(n._months);!t.isValid()||(a=a==null?!0:a,l&&Q0(t,pu(t,"Month")+l*i),s&&V0(t,"Date",pu(t,"Date")+s*i),f&&t._d.setTime(t._d.valueOf()+f*i),a&&_t.updateOffset(t,s||l))}var Ag=pv(1,"add"),Tg=pv(-1,"subtract");function gv(t){return typeof t=="string"||t instanceof String}function Eg(t){return Hi(t)||Wf(t)||gv(t)||Ra(t)||Lg(t)||Dg(t)||t===null||t===void 0}function Dg(t){var n=Qo(t)&&!Qc(t),i=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],f,s,l=a.length;for(f=0;f<l;f+=1)s=a[f],i=i||Sr(t,s);return n&&i}function Lg(t){var n=Yi(t),i=!1;return n&&(i=t.filter(function(a){return!Ra(a)&&gv(t)}).length===0),n&&i}function Rg(t){var n=Qo(t)&&!Qc(t),i=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],f,s;for(f=0;f<a.length;f+=1)s=a[f],i=i||Sr(t,s);return n&&i}function Cg(t,n){var i=t.diff(n,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function Og(t,n){arguments.length===1&&(arguments[0]?Eg(arguments[0])?(t=arguments[0],n=void 0):Rg(arguments[0])&&(n=arguments[0],t=void 0):(t=void 0,n=void 0));var i=t||Ur(),a=wh(i,this).startOf("day"),f=_t.calendarFormat(this,a)||"sameElse",s=n&&(la(n[f])?n[f].call(this,i):n[f]);return this.format(s||this.localeData().calendar(f,this,Ur(i)))}function Ig(){return new Vf(this)}function Mg(t,n){var i=Hi(t)?t:Ur(t);return this.isValid()&&i.isValid()?(n=Oi(n)||"millisecond",n==="millisecond"?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(n).valueOf()):!1}function Fg(t,n){var i=Hi(t)?t:Ur(t);return this.isValid()&&i.isValid()?(n=Oi(n)||"millisecond",n==="millisecond"?this.valueOf()<i.valueOf():this.clone().endOf(n).valueOf()<i.valueOf()):!1}function kg(t,n,i,a){var f=Hi(t)?t:Ur(t),s=Hi(n)?n:Ur(n);return this.isValid()&&f.isValid()&&s.isValid()?(a=a||"()",(a[0]==="("?this.isAfter(f,i):!this.isBefore(f,i))&&(a[1]===")"?this.isBefore(s,i):!this.isAfter(s,i))):!1}function Pg(t,n){var i=Hi(t)?t:Ur(t),a;return this.isValid()&&i.isValid()?(n=Oi(n)||"millisecond",n==="millisecond"?this.valueOf()===i.valueOf():(a=i.valueOf(),this.clone().startOf(n).valueOf()<=a&&a<=this.clone().endOf(n).valueOf())):!1}function Ng(t,n){return this.isSame(t,n)||this.isAfter(t,n)}function Bg(t,n){return this.isSame(t,n)||this.isBefore(t,n)}function Gg(t,n,i){var a,f,s;if(!this.isValid())return NaN;if(a=wh(t,this),!a.isValid())return NaN;switch(f=(a.utcOffset()-this.utcOffset())*6e4,n=Oi(n),n){case"year":s=Ru(this,a)/12;break;case"month":s=Ru(this,a);break;case"quarter":s=Ru(this,a)/3;break;case"second":s=(this-a)/1e3;break;case"minute":s=(this-a)/6e4;break;case"hour":s=(this-a)/36e5;break;case"day":s=(this-a-f)/864e5;break;case"week":s=(this-a-f)/6048e5;break;default:s=this-a}return i?s:Ii(s)}function Ru(t,n){if(t.date()<n.date())return-Ru(n,t);var i=(n.year()-t.year())*12+(n.month()-t.month()),a=t.clone().add(i,"months"),f,s;return n-a<0?(f=t.clone().add(i-1,"months"),s=(n-a)/(a-f)):(f=t.clone().add(i+1,"months"),s=(n-a)/(f-a)),-(i+s)||0}_t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",_t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Ug(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Yg(t){if(!this.isValid())return null;var n=t!==!0,i=n?this.clone().utc():this;return i.year()<0||i.year()>9999?vu(i,n?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):la(Date.prototype.toISOString)?n?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",vu(i,"Z")):vu(i,n?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Hg(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",n="",i,a,f,s;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",n="Z"),i="["+t+'("]',a=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",f="-MM-DD[T]HH:mm:ss.SSS",s=n+'[")]',this.format(i+a+f+s)}function zg(t){t||(t=this.isUtc()?_t.defaultFormatUtc:_t.defaultFormat);var n=vu(this,t);return this.localeData().postformat(n)}function Wg(t,n){return this.isValid()&&(Hi(t)&&t.isValid()||Ur(t).isValid())?Wi({to:this,from:t}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function Vg(t){return this.from(Ur(),t)}function $g(t,n){return this.isValid()&&(Hi(t)&&t.isValid()||Ur(t).isValid())?Wi({from:this,to:t}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function Zg(t){return this.to(Ur(),t)}function yv(t){var n;return t===void 0?this._locale._abbr:(n=Ma(t),n!=null&&(this._locale=n),this)}var xv=Ci("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function bv(){return this._locale}var Cu=1e3,zs=60*Cu,Ou=60*zs,wv=(365*400+97)*24*Ou;function Ws(t,n){return(t%n+n)%n}function Sv(t,n,i){return t<100&&t>=0?new Date(t+400,n,i)-wv:new Date(t,n,i).valueOf()}function Av(t,n,i){return t<100&&t>=0?Date.UTC(t+400,n,i)-wv:Date.UTC(t,n,i)}function Xg(t){var n,i;if(t=Oi(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(i=this._isUTC?Av:Sv,t){case"year":n=i(this.year(),0,1);break;case"quarter":n=i(this.year(),this.month()-this.month()%3,1);break;case"month":n=i(this.year(),this.month(),1);break;case"week":n=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":n=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":n=i(this.year(),this.month(),this.date());break;case"hour":n=this._d.valueOf(),n-=Ws(n+(this._isUTC?0:this.utcOffset()*zs),Ou);break;case"minute":n=this._d.valueOf(),n-=Ws(n,zs);break;case"second":n=this._d.valueOf(),n-=Ws(n,Cu);break}return this._d.setTime(n),_t.updateOffset(this,!0),this}function qg(t){var n,i;if(t=Oi(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(i=this._isUTC?Av:Sv,t){case"year":n=i(this.year()+1,0,1)-1;break;case"quarter":n=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":n=i(this.year(),this.month()+1,1)-1;break;case"week":n=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":n=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":n=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":n=this._d.valueOf(),n+=Ou-Ws(n+(this._isUTC?0:this.utcOffset()*zs),Ou)-1;break;case"minute":n=this._d.valueOf(),n+=zs-Ws(n,zs)-1;break;case"second":n=this._d.valueOf(),n+=Cu-Ws(n,Cu)-1;break}return this._d.setTime(n),_t.updateOffset(this,!0),this}function Kg(){return this._d.valueOf()-(this._offset||0)*6e4}function jg(){return Math.floor(this.valueOf()/1e3)}function Qg(){return new Date(this.valueOf())}function Jg(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function ey(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function ty(){return this.isValid()?this.toISOString():null}function ry(){return eh(this)}function ny(){return go({},tr(this))}function iy(){return tr(this).overflow}function ay(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Ft("N",0,0,"eraAbbr"),Ft("NN",0,0,"eraAbbr"),Ft("NNN",0,0,"eraAbbr"),Ft("NNNN",0,0,"eraName"),Ft("NNNNN",0,0,"eraNarrow"),Ft("y",["y",1],"yo","eraYear"),Ft("y",["yy",2],0,"eraYear"),Ft("y",["yyy",3],0,"eraYear"),Ft("y",["yyyy",4],0,"eraYear"),bt("N",Ah),bt("NN",Ah),bt("NNN",Ah),bt("NNNN",py),bt("NNNNN",my),Mr(["N","NN","NNN","NNNN","NNNNN"],function(t,n,i,a){var f=i._locale.erasParse(t,a,i._strict);f?tr(i).era=f:tr(i).invalidEra=t}),bt("y",Ys),bt("yy",Ys),bt("yyy",Ys),bt("yyyy",Ys),bt("yo",gy),Mr(["y","yy","yyy","yyyy"],Vn),Mr(["yo"],function(t,n,i,a){var f;i._locale._eraYearOrdinalRegex&&(f=t.match(i._locale._eraYearOrdinalRegex)),i._locale.eraYearOrdinalParse?n[Vn]=i._locale.eraYearOrdinalParse(t,f):n[Vn]=parseInt(t,10)});function oy(t,n){var i,a,f,s=this._eras||Ma("en")._eras;for(i=0,a=s.length;i<a;++i){switch(typeof s[i].since){case"string":f=_t(s[i].since).startOf("day"),s[i].since=f.valueOf();break}switch(typeof s[i].until){case"undefined":s[i].until=1/0;break;case"string":f=_t(s[i].until).startOf("day").valueOf(),s[i].until=f.valueOf();break}}return s}function sy(t,n,i){var a,f,s=this.eras(),l,d,v;for(t=t.toUpperCase(),a=0,f=s.length;a<f;++a)if(l=s[a].name.toUpperCase(),d=s[a].abbr.toUpperCase(),v=s[a].narrow.toUpperCase(),i)switch(n){case"N":case"NN":case"NNN":if(d===t)return s[a];break;case"NNNN":if(l===t)return s[a];break;case"NNNNN":if(v===t)return s[a];break}else if([l,d,v].indexOf(t)>=0)return s[a]}function fy(t,n){var i=t.since<=t.until?1:-1;return n===void 0?_t(t.since).year():_t(t.since).year()+(n-t.offset)*i}function ly(){var t,n,i,a=this.localeData().eras();for(t=0,n=a.length;t<n;++t)if(i=this.clone().startOf("day").valueOf(),a[t].since<=i&&i<=a[t].until||a[t].until<=i&&i<=a[t].since)return a[t].name;return""}function uy(){var t,n,i,a=this.localeData().eras();for(t=0,n=a.length;t<n;++t)if(i=this.clone().startOf("day").valueOf(),a[t].since<=i&&i<=a[t].until||a[t].until<=i&&i<=a[t].since)return a[t].narrow;return""}function cy(){var t,n,i,a=this.localeData().eras();for(t=0,n=a.length;t<n;++t)if(i=this.clone().startOf("day").valueOf(),a[t].since<=i&&i<=a[t].until||a[t].until<=i&&i<=a[t].since)return a[t].abbr;return""}function hy(){var t,n,i,a,f=this.localeData().eras();for(t=0,n=f.length;t<n;++t)if(i=f[t].since<=f[t].until?1:-1,a=this.clone().startOf("day").valueOf(),f[t].since<=a&&a<=f[t].until||f[t].until<=a&&a<=f[t].since)return(this.year()-_t(f[t].since).year())*i+f[t].offset;return this.year()}function dy(t){return Sr(this,"_erasNameRegex")||Th.call(this),t?this._erasNameRegex:this._erasRegex}function vy(t){return Sr(this,"_erasAbbrRegex")||Th.call(this),t?this._erasAbbrRegex:this._erasRegex}function _y(t){return Sr(this,"_erasNarrowRegex")||Th.call(this),t?this._erasNarrowRegex:this._erasRegex}function Ah(t,n){return n.erasAbbrRegex(t)}function py(t,n){return n.erasNameRegex(t)}function my(t,n){return n.erasNarrowRegex(t)}function gy(t,n){return n._eraYearOrdinalRegex||Ys}function Th(){var t=[],n=[],i=[],a=[],f,s,l=this.eras();for(f=0,s=l.length;f<s;++f)n.push(_i(l[f].name)),t.push(_i(l[f].abbr)),i.push(_i(l[f].narrow)),a.push(_i(l[f].name)),a.push(_i(l[f].abbr)),a.push(_i(l[f].narrow));this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+n.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+i.join("|")+")","i")}Ft(0,["gg",2],0,function(){return this.weekYear()%100}),Ft(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Iu(t,n){Ft(0,[t,t.length],0,n)}Iu("gggg","weekYear"),Iu("ggggg","weekYear"),Iu("GGGG","isoWeekYear"),Iu("GGGGG","isoWeekYear"),zn("weekYear","gg"),zn("isoWeekYear","GG"),Wn("weekYear",1),Wn("isoWeekYear",1),bt("G",xu),bt("g",xu),bt("GG",Gr,vi),bt("gg",Gr,vi),bt("GGGG",uh,lh),bt("gggg",uh,lh),bt("GGGGG",yu,mu),bt("ggggg",yu,mu),Xf(["gggg","ggggg","GGGG","GGGGG"],function(t,n,i,a){n[a.substr(0,2)]=fr(t)}),Xf(["gg","GG"],function(t,n,i,a){n[a]=_t.parseTwoDigitYear(t)});function yy(t){return Tv.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function xy(t){return Tv.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function by(){return Ia(this.year(),1,4)}function wy(){return Ia(this.isoWeekYear(),1,4)}function Sy(){var t=this.localeData()._week;return Ia(this.year(),t.dow,t.doy)}function Ay(){var t=this.localeData()._week;return Ia(this.weekYear(),t.dow,t.doy)}function Tv(t,n,i,a,f){var s;return t==null?jf(this,a,f).year:(s=Ia(t,a,f),n>s&&(n=s),Ty.call(this,t,n,i,a,f))}function Ty(t,n,i,a,f){var s=rv(t,n,i,a,f),l=Kf(s.year,0,s.dayOfYear);return this.year(l.getUTCFullYear()),this.month(l.getUTCMonth()),this.date(l.getUTCDate()),this}Ft("Q",0,"Qo","quarter"),zn("quarter","Q"),Wn("quarter",7),bt("Q",$0),Mr("Q",function(t,n){n[Ca]=(fr(t)-1)*3});function Ey(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}Ft("D",["DD",2],"Do","date"),zn("date","D"),Wn("date",9),bt("D",Gr),bt("DD",Gr,vi),bt("Do",function(t,n){return t?n._dayOfMonthOrdinalParse||n._ordinalParse:n._dayOfMonthOrdinalParseLenient}),Mr(["D","DD"],ca),Mr("Do",function(t,n){n[ca]=fr(t.match(Gr)[0])});var Ev=Us("Date",!0);Ft("DDD",["DDDD",3],"DDDo","dayOfYear"),zn("dayOfYear","DDD"),Wn("dayOfYear",4),bt("DDD",gu),bt("DDDD",Z0),Mr(["DDD","DDDD"],function(t,n,i){i._dayOfYear=fr(t)});function Dy(t){var n=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?n:this.add(t-n,"d")}Ft("m",["mm",2],0,"minute"),zn("minute","m"),Wn("minute",14),bt("m",Gr),bt("mm",Gr,vi),Mr(["m","mm"],zi);var Ly=Us("Minutes",!1);Ft("s",["ss",2],0,"second"),zn("second","s"),Wn("second",15),bt("s",Gr),bt("ss",Gr,vi),Mr(["s","ss"],Oa);var Ry=Us("Seconds",!1);Ft("S",0,0,function(){return~~(this.millisecond()/100)}),Ft(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Ft(0,["SSS",3],0,"millisecond"),Ft(0,["SSSS",4],0,function(){return this.millisecond()*10}),Ft(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Ft(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),Ft(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Ft(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Ft(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),zn("millisecond","ms"),Wn("millisecond",16),bt("S",gu,$0),bt("SS",gu,vi),bt("SSS",gu,Z0);var xo,Dv;for(xo="SSSS";xo.length<=9;xo+="S")bt(xo,Ys);function Cy(t,n){n[Jo]=fr(("0."+t)*1e3)}for(xo="S";xo.length<=9;xo+="S")Mr(xo,Cy);Dv=Us("Milliseconds",!1),Ft("z",0,0,"zoneAbbr"),Ft("zz",0,0,"zoneName");function Oy(){return this._isUTC?"UTC":""}function Iy(){return this._isUTC?"Coordinated Universal Time":""}var et=Vf.prototype;et.add=Ag,et.calendar=Og,et.clone=Ig,et.diff=Gg,et.endOf=qg,et.format=zg,et.from=Wg,et.fromNow=Vg,et.to=$g,et.toNow=Zg,et.get=Fm,et.invalidAt=iy,et.isAfter=Mg,et.isBefore=Fg,et.isBetween=kg,et.isSame=Pg,et.isSameOrAfter=Ng,et.isSameOrBefore=Bg,et.isValid=ry,et.lang=xv,et.locale=yv,et.localeData=bv,et.max=rg,et.min=tg,et.parsingFlags=ny,et.set=km,et.startOf=Xg,et.subtract=Tg,et.toArray=Jg,et.toObject=ey,et.toDate=Qg,et.toISOString=Yg,et.inspect=Hg,typeof Symbol<"u"&&Symbol.for!=null&&(et[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),et.toJSON=ty,et.toString=Ug,et.unix=jg,et.valueOf=Kg,et.creationData=ay,et.eraName=ly,et.eraNarrow=uy,et.eraAbbr=cy,et.eraYear=hy,et.year=tv,et.isLeapYear=e1,et.weekYear=yy,et.isoWeekYear=xy,et.quarter=et.quarters=Ey,et.month=J0,et.daysInMonth=jm,et.week=et.weeks=o1,et.isoWeek=et.isoWeeks=s1,et.weeksInYear=Sy,et.weeksInWeekYear=Ay,et.isoWeeksInYear=by,et.isoWeeksInISOWeekYear=wy,et.date=Ev,et.day=et.days=x1,et.weekday=b1,et.isoWeekday=w1,et.dayOfYear=Dy,et.hour=et.hours=R1,et.minute=et.minutes=Ly,et.second=et.seconds=Ry,et.millisecond=et.milliseconds=Dv,et.utcOffset=cg,et.utc=dg,et.local=vg,et.parseZone=_g,et.hasAlignedHourOffset=pg,et.isDST=mg,et.isLocal=yg,et.isUtcOffset=xg,et.isUtc=vv,et.isUTC=vv,et.zoneAbbr=Oy,et.zoneName=Iy,et.dates=Ci("dates accessor is deprecated. Use date instead.",Ev),et.months=Ci("months accessor is deprecated. Use month instead",J0),et.years=Ci("years accessor is deprecated. Use year instead",tv),et.zone=Ci("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",hg),et.isDSTShifted=Ci("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",gg);function My(t){return Ur(t*1e3)}function Fy(){return Ur.apply(null,arguments).parseZone()}function Lv(t){return t}var Ar=ih.prototype;Ar.calendar=xm,Ar.longDateFormat=Am,Ar.invalidDate=Em,Ar.ordinal=Rm,Ar.preparse=Lv,Ar.postformat=Lv,Ar.relativeTime=Om,Ar.pastFuture=Im,Ar.set=gm,Ar.eras=oy,Ar.erasParse=sy,Ar.erasConvertYear=fy,Ar.erasAbbrRegex=vy,Ar.erasNameRegex=dy,Ar.erasNarrowRegex=_y,Ar.months=Zm,Ar.monthsShort=Xm,Ar.monthsParse=Km,Ar.monthsRegex=Jm,Ar.monthsShortRegex=Qm,Ar.week=r1,Ar.firstDayOfYear=a1,Ar.firstDayOfWeek=i1,Ar.weekdays=_1,Ar.weekdaysMin=m1,Ar.weekdaysShort=p1,Ar.weekdaysParse=y1,Ar.weekdaysRegex=S1,Ar.weekdaysShortRegex=A1,Ar.weekdaysMinRegex=T1,Ar.isPM=D1,Ar.meridiem=C1;function Mu(t,n,i,a){var f=Ma(),s=fa().set(a,n);return f[i](s,t)}function Rv(t,n,i){if(Ra(t)&&(n=t,t=void 0),t=t||"",n!=null)return Mu(t,n,i,"month");var a,f=[];for(a=0;a<12;a++)f[a]=Mu(t,a,i,"month");return f}function Eh(t,n,i,a){typeof t=="boolean"?(Ra(n)&&(i=n,n=void 0),n=n||""):(n=t,i=n,t=!1,Ra(n)&&(i=n,n=void 0),n=n||"");var f=Ma(),s=t?f._week.dow:0,l,d=[];if(i!=null)return Mu(n,(i+s)%7,a,"day");for(l=0;l<7;l++)d[l]=Mu(n,(l+s)%7,a,"day");return d}function ky(t,n){return Rv(t,n,"months")}function Py(t,n){return Rv(t,n,"monthsShort")}function Ny(t,n,i){return Eh(t,n,i,"weekdays")}function By(t,n,i){return Eh(t,n,i,"weekdaysShort")}function Gy(t,n,i){return Eh(t,n,i,"weekdaysMin")}yo("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var n=t%10,i=fr(t%100/10)===1?"th":n===1?"st":n===2?"nd":n===3?"rd":"th";return t+i}}),_t.lang=Ci("moment.lang is deprecated. Use moment.locale instead.",yo),_t.langData=Ci("moment.langData is deprecated. Use moment.localeData instead.",Ma);var Fa=Math.abs;function Uy(){var t=this._data;return this._milliseconds=Fa(this._milliseconds),this._days=Fa(this._days),this._months=Fa(this._months),t.milliseconds=Fa(t.milliseconds),t.seconds=Fa(t.seconds),t.minutes=Fa(t.minutes),t.hours=Fa(t.hours),t.months=Fa(t.months),t.years=Fa(t.years),this}function Cv(t,n,i,a){var f=Wi(n,i);return t._milliseconds+=a*f._milliseconds,t._days+=a*f._days,t._months+=a*f._months,t._bubble()}function Yy(t,n){return Cv(this,t,n,1)}function Hy(t,n){return Cv(this,t,n,-1)}function Ov(t){return t<0?Math.floor(t):Math.ceil(t)}function zy(){var t=this._milliseconds,n=this._days,i=this._months,a=this._data,f,s,l,d,v;return t>=0&&n>=0&&i>=0||t<=0&&n<=0&&i<=0||(t+=Ov(Dh(i)+n)*864e5,n=0,i=0),a.milliseconds=t%1e3,f=Ii(t/1e3),a.seconds=f%60,s=Ii(f/60),a.minutes=s%60,l=Ii(s/60),a.hours=l%24,n+=Ii(l/24),v=Ii(Iv(n)),i+=v,n-=Ov(Dh(v)),d=Ii(i/12),i%=12,a.days=n,a.months=i,a.years=d,this}function Iv(t){return t*4800/146097}function Dh(t){return t*146097/4800}function Wy(t){if(!this.isValid())return NaN;var n,i,a=this._milliseconds;if(t=Oi(t),t==="month"||t==="quarter"||t==="year")switch(n=this._days+a/864e5,i=this._months+Iv(n),t){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(n=this._days+Math.round(Dh(this._months)),t){case"week":return n/7+a/6048e5;case"day":return n+a/864e5;case"hour":return n*24+a/36e5;case"minute":return n*1440+a/6e4;case"second":return n*86400+a/1e3;case"millisecond":return Math.floor(n*864e5)+a;default:throw new Error("Unknown unit "+t)}}function Vy(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+fr(this._months/12)*31536e6:NaN}function ka(t){return function(){return this.as(t)}}var $y=ka("ms"),Zy=ka("s"),Xy=ka("m"),qy=ka("h"),Ky=ka("d"),jy=ka("w"),Qy=ka("M"),Jy=ka("Q"),ex=ka("y");function tx(){return Wi(this)}function rx(t){return t=Oi(t),this.isValid()?this[t+"s"]():NaN}function ts(t){return function(){return this.isValid()?this._data[t]:NaN}}var nx=ts("milliseconds"),ix=ts("seconds"),ax=ts("minutes"),ox=ts("hours"),sx=ts("days"),fx=ts("months"),lx=ts("years");function ux(){return Ii(this.days()/7)}var Pa=Math.round,Vs={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function cx(t,n,i,a,f){return f.relativeTime(n||1,!!i,t,a)}function hx(t,n,i,a){var f=Wi(t).abs(),s=Pa(f.as("s")),l=Pa(f.as("m")),d=Pa(f.as("h")),v=Pa(f.as("d")),I=Pa(f.as("M")),B=Pa(f.as("w")),p=Pa(f.as("y")),U=s<=i.ss&&["s",s]||s<i.s&&["ss",s]||l<=1&&["m"]||l<i.m&&["mm",l]||d<=1&&["h"]||d<i.h&&["hh",d]||v<=1&&["d"]||v<i.d&&["dd",v];return i.w!=null&&(U=U||B<=1&&["w"]||B<i.w&&["ww",B]),U=U||I<=1&&["M"]||I<i.M&&["MM",I]||p<=1&&["y"]||["yy",p],U[2]=n,U[3]=+t>0,U[4]=a,cx.apply(null,U)}function dx(t){return t===void 0?Pa:typeof t=="function"?(Pa=t,!0):!1}function vx(t,n){return Vs[t]===void 0?!1:n===void 0?Vs[t]:(Vs[t]=n,t==="s"&&(Vs.ss=n-1),!0)}function _x(t,n){if(!this.isValid())return this.localeData().invalidDate();var i=!1,a=Vs,f,s;return typeof t=="object"&&(n=t,t=!1),typeof t=="boolean"&&(i=t),typeof n=="object"&&(a=Object.assign({},Vs,n),n.s!=null&&n.ss==null&&(a.ss=n.s-1)),f=this.localeData(),s=hx(this,!i,a,f),i&&(s=f.pastFuture(+this,s)),f.postformat(s)}var Lh=Math.abs;function $s(t){return(t>0)-(t<0)||+t}function Fu(){if(!this.isValid())return this.localeData().invalidDate();var t=Lh(this._milliseconds)/1e3,n=Lh(this._days),i=Lh(this._months),a,f,s,l,d=this.asSeconds(),v,I,B,p;return d?(a=Ii(t/60),f=Ii(a/60),t%=60,a%=60,s=Ii(i/12),i%=12,l=t?t.toFixed(3).replace(/\.?0+$/,""):"",v=d<0?"-":"",I=$s(this._months)!==$s(d)?"-":"",B=$s(this._days)!==$s(d)?"-":"",p=$s(this._milliseconds)!==$s(d)?"-":"",v+"P"+(s?I+s+"Y":"")+(i?I+i+"M":"")+(n?B+n+"D":"")+(f||a||t?"T":"")+(f?p+f+"H":"")+(a?p+a+"M":"")+(t?p+l+"S":"")):"P0D"}var xr=Du.prototype;xr.isValid=sg,xr.abs=Uy,xr.add=Yy,xr.subtract=Hy,xr.as=Wy,xr.asMilliseconds=$y,xr.asSeconds=Zy,xr.asMinutes=Xy,xr.asHours=qy,xr.asDays=Ky,xr.asWeeks=jy,xr.asMonths=Qy,xr.asQuarters=Jy,xr.asYears=ex,xr.valueOf=Vy,xr._bubble=zy,xr.clone=tx,xr.get=rx,xr.milliseconds=nx,xr.seconds=ix,xr.minutes=ax,xr.hours=ox,xr.days=sx,xr.weeks=ux,xr.months=fx,xr.years=lx,xr.humanize=_x,xr.toISOString=Fu,xr.toString=Fu,xr.toJSON=Fu,xr.locale=yv,xr.localeData=bv,xr.toIsoString=Ci("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Fu),xr.lang=xv,Ft("X",0,0,"unix"),Ft("x",0,0,"valueOf"),bt("x",xu),bt("X",Nm),Mr("X",function(t,n,i){i._d=new Date(parseFloat(t)*1e3)}),Mr("x",function(t,n,i){i._d=new Date(fr(t))});//! moment.js
12
+ _t.version="2.29.4",pm(Ur),_t.fn=et,_t.min=ng,_t.max=ig,_t.now=ag,_t.utc=fa,_t.unix=My,_t.months=ky,_t.isDate=Wf,_t.locale=yo,_t.invalid=hu,_t.duration=Wi,_t.isMoment=Hi,_t.weekdays=Ny,_t.parseZone=Fy,_t.localeData=Ma,_t.isDuration=Lu,_t.monthsShort=Py,_t.weekdaysMin=Gy,_t.defineLocale=_h,_t.updateLocale=F1,_t.locales=k1,_t.weekdaysShort=By,_t.normalizeUnits=Oi,_t.relativeTimeRounding=dx,_t.relativeTimeThreshold=vx,_t.calendarFormat=Cg,_t.prototype=et,_t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var Zs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Mv={exports:{}};(function(t,n){(function(i){t.exports=i()})(function(i){var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function f(x,A){var g=x[0],b=x[1],P=x[2],F=x[3];g+=(b&P|~b&F)+A[0]-680876936|0,g=(g<<7|g>>>25)+b|0,F+=(g&b|~g&P)+A[1]-389564586|0,F=(F<<12|F>>>20)+g|0,P+=(F&g|~F&b)+A[2]+606105819|0,P=(P<<17|P>>>15)+F|0,b+=(P&F|~P&g)+A[3]-1044525330|0,b=(b<<22|b>>>10)+P|0,g+=(b&P|~b&F)+A[4]-176418897|0,g=(g<<7|g>>>25)+b|0,F+=(g&b|~g&P)+A[5]+1200080426|0,F=(F<<12|F>>>20)+g|0,P+=(F&g|~F&b)+A[6]-1473231341|0,P=(P<<17|P>>>15)+F|0,b+=(P&F|~P&g)+A[7]-45705983|0,b=(b<<22|b>>>10)+P|0,g+=(b&P|~b&F)+A[8]+1770035416|0,g=(g<<7|g>>>25)+b|0,F+=(g&b|~g&P)+A[9]-1958414417|0,F=(F<<12|F>>>20)+g|0,P+=(F&g|~F&b)+A[10]-42063|0,P=(P<<17|P>>>15)+F|0,b+=(P&F|~P&g)+A[11]-1990404162|0,b=(b<<22|b>>>10)+P|0,g+=(b&P|~b&F)+A[12]+1804603682|0,g=(g<<7|g>>>25)+b|0,F+=(g&b|~g&P)+A[13]-40341101|0,F=(F<<12|F>>>20)+g|0,P+=(F&g|~F&b)+A[14]-1502002290|0,P=(P<<17|P>>>15)+F|0,b+=(P&F|~P&g)+A[15]+1236535329|0,b=(b<<22|b>>>10)+P|0,g+=(b&F|P&~F)+A[1]-165796510|0,g=(g<<5|g>>>27)+b|0,F+=(g&P|b&~P)+A[6]-1069501632|0,F=(F<<9|F>>>23)+g|0,P+=(F&b|g&~b)+A[11]+643717713|0,P=(P<<14|P>>>18)+F|0,b+=(P&g|F&~g)+A[0]-373897302|0,b=(b<<20|b>>>12)+P|0,g+=(b&F|P&~F)+A[5]-701558691|0,g=(g<<5|g>>>27)+b|0,F+=(g&P|b&~P)+A[10]+38016083|0,F=(F<<9|F>>>23)+g|0,P+=(F&b|g&~b)+A[15]-660478335|0,P=(P<<14|P>>>18)+F|0,b+=(P&g|F&~g)+A[4]-405537848|0,b=(b<<20|b>>>12)+P|0,g+=(b&F|P&~F)+A[9]+568446438|0,g=(g<<5|g>>>27)+b|0,F+=(g&P|b&~P)+A[14]-1019803690|0,F=(F<<9|F>>>23)+g|0,P+=(F&b|g&~b)+A[3]-187363961|0,P=(P<<14|P>>>18)+F|0,b+=(P&g|F&~g)+A[8]+1163531501|0,b=(b<<20|b>>>12)+P|0,g+=(b&F|P&~F)+A[13]-1444681467|0,g=(g<<5|g>>>27)+b|0,F+=(g&P|b&~P)+A[2]-51403784|0,F=(F<<9|F>>>23)+g|0,P+=(F&b|g&~b)+A[7]+1735328473|0,P=(P<<14|P>>>18)+F|0,b+=(P&g|F&~g)+A[12]-1926607734|0,b=(b<<20|b>>>12)+P|0,g+=(b^P^F)+A[5]-378558|0,g=(g<<4|g>>>28)+b|0,F+=(g^b^P)+A[8]-2022574463|0,F=(F<<11|F>>>21)+g|0,P+=(F^g^b)+A[11]+1839030562|0,P=(P<<16|P>>>16)+F|0,b+=(P^F^g)+A[14]-35309556|0,b=(b<<23|b>>>9)+P|0,g+=(b^P^F)+A[1]-1530992060|0,g=(g<<4|g>>>28)+b|0,F+=(g^b^P)+A[4]+1272893353|0,F=(F<<11|F>>>21)+g|0,P+=(F^g^b)+A[7]-155497632|0,P=(P<<16|P>>>16)+F|0,b+=(P^F^g)+A[10]-1094730640|0,b=(b<<23|b>>>9)+P|0,g+=(b^P^F)+A[13]+681279174|0,g=(g<<4|g>>>28)+b|0,F+=(g^b^P)+A[0]-358537222|0,F=(F<<11|F>>>21)+g|0,P+=(F^g^b)+A[3]-722521979|0,P=(P<<16|P>>>16)+F|0,b+=(P^F^g)+A[6]+76029189|0,b=(b<<23|b>>>9)+P|0,g+=(b^P^F)+A[9]-640364487|0,g=(g<<4|g>>>28)+b|0,F+=(g^b^P)+A[12]-421815835|0,F=(F<<11|F>>>21)+g|0,P+=(F^g^b)+A[15]+530742520|0,P=(P<<16|P>>>16)+F|0,b+=(P^F^g)+A[2]-995338651|0,b=(b<<23|b>>>9)+P|0,g+=(P^(b|~F))+A[0]-198630844|0,g=(g<<6|g>>>26)+b|0,F+=(b^(g|~P))+A[7]+1126891415|0,F=(F<<10|F>>>22)+g|0,P+=(g^(F|~b))+A[14]-1416354905|0,P=(P<<15|P>>>17)+F|0,b+=(F^(P|~g))+A[5]-57434055|0,b=(b<<21|b>>>11)+P|0,g+=(P^(b|~F))+A[12]+1700485571|0,g=(g<<6|g>>>26)+b|0,F+=(b^(g|~P))+A[3]-1894986606|0,F=(F<<10|F>>>22)+g|0,P+=(g^(F|~b))+A[10]-1051523|0,P=(P<<15|P>>>17)+F|0,b+=(F^(P|~g))+A[1]-2054922799|0,b=(b<<21|b>>>11)+P|0,g+=(P^(b|~F))+A[8]+1873313359|0,g=(g<<6|g>>>26)+b|0,F+=(b^(g|~P))+A[15]-30611744|0,F=(F<<10|F>>>22)+g|0,P+=(g^(F|~b))+A[6]-1560198380|0,P=(P<<15|P>>>17)+F|0,b+=(F^(P|~g))+A[13]+1309151649|0,b=(b<<21|b>>>11)+P|0,g+=(P^(b|~F))+A[4]-145523070|0,g=(g<<6|g>>>26)+b|0,F+=(b^(g|~P))+A[11]-1120210379|0,F=(F<<10|F>>>22)+g|0,P+=(g^(F|~b))+A[2]+718787259|0,P=(P<<15|P>>>17)+F|0,b+=(F^(P|~g))+A[9]-343485551|0,b=(b<<21|b>>>11)+P|0,x[0]=g+x[0]|0,x[1]=b+x[1]|0,x[2]=P+x[2]|0,x[3]=F+x[3]|0}function s(x){var A=[],g;for(g=0;g<64;g+=4)A[g>>2]=x.charCodeAt(g)+(x.charCodeAt(g+1)<<8)+(x.charCodeAt(g+2)<<16)+(x.charCodeAt(g+3)<<24);return A}function l(x){var A=[],g;for(g=0;g<64;g+=4)A[g>>2]=x[g]+(x[g+1]<<8)+(x[g+2]<<16)+(x[g+3]<<24);return A}function d(x){var A=x.length,g=[1732584193,-271733879,-1732584194,271733878],b,P,F,J,Te,nt;for(b=64;b<=A;b+=64)f(g,s(x.substring(b-64,b)));for(x=x.substring(b-64),P=x.length,F=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],b=0;b<P;b+=1)F[b>>2]|=x.charCodeAt(b)<<(b%4<<3);if(F[b>>2]|=128<<(b%4<<3),b>55)for(f(g,F),b=0;b<16;b+=1)F[b]=0;return J=A*8,J=J.toString(16).match(/(.*?)(.{0,8})$/),Te=parseInt(J[2],16),nt=parseInt(J[1],16)||0,F[14]=Te,F[15]=nt,f(g,F),g}function v(x){var A=x.length,g=[1732584193,-271733879,-1732584194,271733878],b,P,F,J,Te,nt;for(b=64;b<=A;b+=64)f(g,l(x.subarray(b-64,b)));for(x=b-64<A?x.subarray(b-64):new Uint8Array(0),P=x.length,F=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],b=0;b<P;b+=1)F[b>>2]|=x[b]<<(b%4<<3);if(F[b>>2]|=128<<(b%4<<3),b>55)for(f(g,F),b=0;b<16;b+=1)F[b]=0;return J=A*8,J=J.toString(16).match(/(.*?)(.{0,8})$/),Te=parseInt(J[2],16),nt=parseInt(J[1],16)||0,F[14]=Te,F[15]=nt,f(g,F),g}function I(x){var A="",g;for(g=0;g<4;g+=1)A+=a[x>>g*8+4&15]+a[x>>g*8&15];return A}function B(x){var A;for(A=0;A<x.length;A+=1)x[A]=I(x[A]);return x.join("")}B(d("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function x(A,g){return A=A|0||0,A<0?Math.max(A+g,0):Math.min(A,g)}ArrayBuffer.prototype.slice=function(A,g){var b=this.byteLength,P=x(A,b),F=b,J,Te,nt,ut;return g!==i&&(F=x(g,b)),P>F?new ArrayBuffer(0):(J=F-P,Te=new ArrayBuffer(J),nt=new Uint8Array(Te),ut=new Uint8Array(this,P,J),nt.set(ut),Te)}}();function p(x){return/[\u0080-\uFFFF]/.test(x)&&(x=unescape(encodeURIComponent(x))),x}function U(x,A){var g=x.length,b=new ArrayBuffer(g),P=new Uint8Array(b),F;for(F=0;F<g;F+=1)P[F]=x.charCodeAt(F);return A?P:b}function q(x){return String.fromCharCode.apply(null,new Uint8Array(x))}function D(x,A,g){var b=new Uint8Array(x.byteLength+A.byteLength);return b.set(new Uint8Array(x)),b.set(new Uint8Array(A),x.byteLength),g?b:b.buffer}function pe(x){var A=[],g=x.length,b;for(b=0;b<g-1;b+=2)A.push(parseInt(x.substr(b,2),16));return String.fromCharCode.apply(String,A)}function ue(){this.reset()}return ue.prototype.append=function(x){return this.appendBinary(p(x)),this},ue.prototype.appendBinary=function(x){this._buff+=x,this._length+=x.length;var A=this._buff.length,g;for(g=64;g<=A;g+=64)f(this._hash,s(this._buff.substring(g-64,g)));return this._buff=this._buff.substring(g-64),this},ue.prototype.end=function(x){var A=this._buff,g=A.length,b,P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],F;for(b=0;b<g;b+=1)P[b>>2]|=A.charCodeAt(b)<<(b%4<<3);return this._finish(P,g),F=B(this._hash),x&&(F=pe(F)),this.reset(),F},ue.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},ue.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},ue.prototype.setState=function(x){return this._buff=x.buff,this._length=x.length,this._hash=x.hash,this},ue.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},ue.prototype._finish=function(x,A){var g=A,b,P,F;if(x[g>>2]|=128<<(g%4<<3),g>55)for(f(this._hash,x),g=0;g<16;g+=1)x[g]=0;b=this._length*8,b=b.toString(16).match(/(.*?)(.{0,8})$/),P=parseInt(b[2],16),F=parseInt(b[1],16)||0,x[14]=P,x[15]=F,f(this._hash,x)},ue.hash=function(x,A){return ue.hashBinary(p(x),A)},ue.hashBinary=function(x,A){var g=d(x),b=B(g);return A?pe(b):b},ue.ArrayBuffer=function(){this.reset()},ue.ArrayBuffer.prototype.append=function(x){var A=D(this._buff.buffer,x,!0),g=A.length,b;for(this._length+=x.byteLength,b=64;b<=g;b+=64)f(this._hash,l(A.subarray(b-64,b)));return this._buff=b-64<g?new Uint8Array(A.buffer.slice(b-64)):new Uint8Array(0),this},ue.ArrayBuffer.prototype.end=function(x){var A=this._buff,g=A.length,b=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],P,F;for(P=0;P<g;P+=1)b[P>>2]|=A[P]<<(P%4<<3);return this._finish(b,g),F=B(this._hash),x&&(F=pe(F)),this.reset(),F},ue.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},ue.ArrayBuffer.prototype.getState=function(){var x=ue.prototype.getState.call(this);return x.buff=q(x.buff),x},ue.ArrayBuffer.prototype.setState=function(x){return x.buff=U(x.buff,!0),ue.prototype.setState.call(this,x)},ue.ArrayBuffer.prototype.destroy=ue.prototype.destroy,ue.ArrayBuffer.prototype._finish=ue.prototype._finish,ue.ArrayBuffer.hash=function(x,A){var g=v(new Uint8Array(x)),b=B(g);return A?pe(b):b},ue})})(Mv);const px=Mv.exports;var Xs={exports:{}};/**
11
13
  * @license
12
14
  * Lodash <https://lodash.com/>
13
15
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
14
16
  * Released under MIT license <https://lodash.com/license>
15
17
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
16
18
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
17
- */(function(t,n){(function(){var i,o="4.17.21",f=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",d="Invalid `variable` option passed into `_.template`",v="__lodash_hash_undefined__",M=500,B="__lodash_placeholder__",p=1,U=2,q=4,D=1,pe=2,ue=1,b=2,A=4,g=8,x=16,P=32,F=64,J=128,Te=256,nt=512,ut=30,it="...",st=800,tt=16,Re=1,Ot=2,bt=3,Me=1/0,Ze=9007199254740991,St=17976931348623157e292,$t=0/0,Wt=4294967295,Qt=Wt-1,sr=Wt>>>1,xr=[["ary",J],["bind",ue],["bindKey",b],["curry",g],["curryRight",x],["flip",nt],["partial",P],["partialRight",F],["rearg",Te]],lr="[object Arguments]",Kt="[object Array]",wr="[object AsyncFunction]",Gt="[object Boolean]",It="[object Date]",hn="[object DOMException]",jr="[object Error]",kt="[object Function]",Nr="[object GeneratorFunction]",Fr="[object Map]",Zr="[object Number]",Qr="[object Null]",ar="[object Object]",Pt="[object Promise]",Tn="[object Proxy]",En="[object RegExp]",Jr="[object Set]",an="[object String]",E="[object Symbol]",di="[object Undefined]",dn="[object WeakMap]",zi="[object WeakSet]",Nn="[object ArrayBuffer]",Tr="[object DataView]",Dn="[object Float32Array]",Bn="[object Float64Array]",C="[object Int8Array]",Ue="[object Int16Array]",Xe="[object Int32Array]",dt="[object Uint8Array]",Z="[object Uint8ClampedArray]",we="[object Uint16Array]",m="[object Uint32Array]",He=/\b__p \+= '';/g,Nt=/\b(__p \+=) '' \+/g,u=/(__e\(.*?\)|\b__t\)) \+\n'';/g,de=/&(?:amp|lt|gt|quot|#39);/g,ye=/[&<>"']/g,w=RegExp(de.source),V=RegExp(ye.source),ce=/<%-([\s\S]+?)%>/g,Et=/<%([\s\S]+?)%>/g,at=/<%=([\s\S]+?)%>/g,mt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ur=/^\w*$/,vi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kr=/[\\^$.*+?()[\]{}|]/g,dr=RegExp(kr.source),Yr=/^\s+/,vn=/\s/,Ln=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ia=/\{\n\/\* \[wrapped with (.+)\] \*/,Fa=/,? & /,jt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Wn=/[()=,{}\[\]\/\s]/,on=/\\(\\)?/g,_i=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Xn=/\w*$/,Ws=/^[-+]0x[0-9a-f]+$/i,kh=/^0b[01]+$/i,Ph=/^\[object .+?Constructor\]$/,Nh=/^0o[0-7]+$/i,Bh=/^(?:0|[1-9]\d*)$/,Gh=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Vs=/($^)/,Uh=/['\n\r\u2028\u2029\\]/g,$s="\\ud800-\\udfff",Yh="\\u0300-\\u036f",Hh="\\ufe20-\\ufe2f",zh="\\u20d0-\\u20ff",Eu=Yh+Hh+zh,Du="\\u2700-\\u27bf",Lu="a-z\\xdf-\\xf6\\xf8-\\xff",Wh="\\xac\\xb1\\xd7\\xf7",Vh="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",$h="\\u2000-\\u206f",Zh=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ru="A-Z\\xc0-\\xd6\\xd8-\\xde",Cu="\\ufe0e\\ufe0f",Ou=Wh+Vh+$h+Zh,qf="['\u2019]",Zs="["+$s+"]",Kf="["+Ou+"]",Xs="["+Eu+"]",Mu="\\d+",Jo="["+Du+"]",qs="["+Lu+"]",jf="[^"+$s+Ou+Mu+Du+Lu+Ru+"]",es="\\ud83c[\\udffb-\\udfff]",Xh="(?:"+Xs+"|"+es+")",Iu="[^"+$s+"]",Qf="(?:\\ud83c[\\udde6-\\uddff]){2}",Jf="[\\ud800-\\udbff][\\udc00-\\udfff]",Rn="["+Ru+"]",Vn="\\u200d",ts="(?:"+qs+"|"+jf+")",qh="(?:"+Rn+"|"+jf+")",Fu="(?:"+qf+"(?:d|ll|m|re|s|t|ve))?",el="(?:"+qf+"(?:D|LL|M|RE|S|T|VE))?",tl=Xh+"?",ku="["+Cu+"]?",Kh="(?:"+Vn+"(?:"+[Iu,Qf,Jf].join("|")+")"+ku+tl+")*",rl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jh="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Pu=ku+tl+Kh,Qh="(?:"+[Jo,Qf,Jf].join("|")+")"+Pu,Jh="(?:"+[Iu+Xs+"?",Xs,Qf,Jf,Zs].join("|")+")",ed=RegExp(qf,"g"),td=RegExp(Xs,"g"),nl=RegExp(es+"(?="+es+")|"+Jh+Pu,"g"),rd=RegExp([Rn+"?"+qs+"+"+Fu+"(?="+[Kf,Rn,"$"].join("|")+")",qh+"+"+el+"(?="+[Kf,Rn+ts,"$"].join("|")+")",Rn+"?"+ts+"+"+Fu,Rn+"+"+el,jh,rl,Mu,Qh].join("|"),"g"),ka=RegExp("["+Vn+$s+Eu+Cu+"]"),nd=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,id=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ks=-1,Cr={};Cr[Dn]=Cr[Bn]=Cr[C]=Cr[Ue]=Cr[Xe]=Cr[dt]=Cr[Z]=Cr[we]=Cr[m]=!0,Cr[lr]=Cr[Kt]=Cr[Nn]=Cr[Gt]=Cr[Tr]=Cr[It]=Cr[jr]=Cr[kt]=Cr[Fr]=Cr[Zr]=Cr[ar]=Cr[En]=Cr[Jr]=Cr[an]=Cr[dn]=!1;var Or={};Or[lr]=Or[Kt]=Or[Nn]=Or[Tr]=Or[Gt]=Or[It]=Or[Dn]=Or[Bn]=Or[C]=Or[Ue]=Or[Xe]=Or[Fr]=Or[Zr]=Or[ar]=Or[En]=Or[Jr]=Or[an]=Or[E]=Or[dt]=Or[Z]=Or[we]=Or[m]=!0,Or[jr]=Or[kt]=Or[dn]=!1;var Nu={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},ad={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},il={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},al={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},fa=parseFloat,js=parseInt,ol=typeof Us=="object"&&Us&&Us.Object===Object&&Us,Bu=typeof self=="object"&&self&&self.Object===Object&&self,xn=ol||Bu||Function("return this")(),sl=n&&!n.nodeType&&n,Pa=sl&&!0&&t&&!t.nodeType&&t,Gu=Pa&&Pa.exports===sl,fl=Gu&&ol.process,ti=function(){try{var te=Pa&&Pa.require&&Pa.require("util").types;return te||fl&&fl.binding&&fl.binding("util")}catch{}}(),Uu=ti&&ti.isArrayBuffer,Wi=ti&&ti.isDate,Yu=ti&&ti.isMap,Hu=ti&&ti.isRegExp,bo=ti&&ti.isSet,zu=ti&&ti.isTypedArray;function _n(te,Ee,ve){switch(ve.length){case 0:return te.call(Ee);case 1:return te.call(Ee,ve[0]);case 2:return te.call(Ee,ve[0],ve[1]);case 3:return te.call(Ee,ve[0],ve[1],ve[2])}return te.apply(Ee,ve)}function Wu(te,Ee,ve,gt){for(var Zt=-1,mr=te==null?0:te.length;++Zt<mr;){var sn=te[Zt];Ee(gt,sn,ve(sn),te)}return gt}function wn(te,Ee){for(var ve=-1,gt=te==null?0:te.length;++ve<gt&&Ee(te[ve],ve,te)!==!1;);return te}function Vu(te,Ee){for(var ve=te==null?0:te.length;ve--&&Ee(te[ve],ve,te)!==!1;);return te}function la(te,Ee){for(var ve=-1,gt=te==null?0:te.length;++ve<gt;)if(!Ee(te[ve],ve,te))return!1;return!0}function Oi(te,Ee){for(var ve=-1,gt=te==null?0:te.length,Zt=0,mr=[];++ve<gt;){var sn=te[ve];Ee(sn,ve,te)&&(mr[Zt++]=sn)}return mr}function Qs(te,Ee){var ve=te==null?0:te.length;return!!ve&&$i(te,Ee,0)>-1}function ll(te,Ee,ve){for(var gt=-1,Zt=te==null?0:te.length;++gt<Zt;)if(ve(Ee,te[gt]))return!0;return!1}function Br(te,Ee){for(var ve=-1,gt=te==null?0:te.length,Zt=Array(gt);++ve<gt;)Zt[ve]=Ee(te[ve],ve,te);return Zt}function Vi(te,Ee){for(var ve=-1,gt=Ee.length,Zt=te.length;++ve<gt;)te[Zt+ve]=Ee[ve];return te}function ul(te,Ee,ve,gt){var Zt=-1,mr=te==null?0:te.length;for(gt&&mr&&(ve=te[++Zt]);++Zt<mr;)ve=Ee(ve,te[Zt],Zt,te);return ve}function od(te,Ee,ve,gt){var Zt=te==null?0:te.length;for(gt&&Zt&&(ve=te[--Zt]);Zt--;)ve=Ee(ve,te[Zt],Zt,te);return ve}function Js(te,Ee){for(var ve=-1,gt=te==null?0:te.length;++ve<gt;)if(Ee(te[ve],ve,te))return!0;return!1}var Pr=Ba("length");function $u(te){return te.split("")}function sd(te){return te.match(jt)||[]}function pi(te,Ee,ve){var gt;return ve(te,function(Zt,mr,sn){if(Ee(Zt,mr,sn))return gt=mr,!1}),gt}function xo(te,Ee,ve,gt){for(var Zt=te.length,mr=ve+(gt?1:-1);gt?mr--:++mr<Zt;)if(Ee(te[mr],mr,te))return mr;return-1}function $i(te,Ee,ve){return Ee===Ee?Ao(te,Ee,ve):xo(te,ef,ve)}function Na(te,Ee,ve,gt){for(var Zt=ve-1,mr=te.length;++Zt<mr;)if(gt(te[Zt],Ee))return Zt;return-1}function ef(te){return te!==te}function rs(te,Ee){var ve=te==null?0:te.length;return ve?tf(te,Ee)/ve:$t}function Ba(te){return function(Ee){return Ee==null?i:Ee[te]}}function wo(te){return function(Ee){return te==null?i:te[Ee]}}function cl(te,Ee,ve,gt,Zt){return Zt(te,function(mr,sn,Er){ve=gt?(gt=!1,mr):Ee(ve,mr,sn,Er)}),ve}function hl(te,Ee){var ve=te.length;for(te.sort(Ee);ve--;)te[ve]=te[ve].value;return te}function tf(te,Ee){for(var ve,gt=-1,Zt=te.length;++gt<Zt;){var mr=Ee(te[gt]);mr!==i&&(ve=ve===i?mr:ve+mr)}return ve}function dl(te,Ee){for(var ve=-1,gt=Array(te);++ve<te;)gt[ve]=Ee(ve);return gt}function fd(te,Ee){return Br(Ee,function(ve){return[ve,te[ve]]})}function Zu(te){return te&&te.slice(0,ju(te)+1).replace(Yr,"")}function qn(te){return function(Ee){return te(Ee)}}function ns(te,Ee){return Br(Ee,function(ve){return te[ve]})}function ua(te,Ee){return te.has(Ee)}function rf(te,Ee){for(var ve=-1,gt=te.length;++ve<gt&&$i(Ee,te[ve],0)>-1;);return ve}function nf(te,Ee){for(var ve=te.length;ve--&&$i(Ee,te[ve],0)>-1;);return ve}function So(te,Ee){for(var ve=te.length,gt=0;ve--;)te[ve]===Ee&&++gt;return gt}var vl=wo(Nu),_l=wo(ad);function pl(te){return"\\"+al[te]}function ml(te,Ee){return te==null?i:te[Ee]}function Ga(te){return ka.test(te)}function Xu(te){return nd.test(te)}function qu(te){for(var Ee,ve=[];!(Ee=te.next()).done;)ve.push(Ee.value);return ve}function af(te){var Ee=-1,ve=Array(te.size);return te.forEach(function(gt,Zt){ve[++Ee]=[Zt,gt]}),ve}function gl(te,Ee){return function(ve){return te(Ee(ve))}}function Zi(te,Ee){for(var ve=-1,gt=te.length,Zt=0,mr=[];++ve<gt;){var sn=te[ve];(sn===Ee||sn===B)&&(te[ve]=B,mr[Zt++]=ve)}return mr}function is(te){var Ee=-1,ve=Array(te.size);return te.forEach(function(gt){ve[++Ee]=gt}),ve}function Ku(te){var Ee=-1,ve=Array(te.size);return te.forEach(function(gt){ve[++Ee]=[gt,gt]}),ve}function Ao(te,Ee,ve){for(var gt=ve-1,Zt=te.length;++gt<Zt;)if(te[gt]===Ee)return gt;return-1}function yl(te,Ee,ve){for(var gt=ve+1;gt--;)if(te[gt]===Ee)return gt;return gt}function ca(te){return Ga(te)?ud(te):Pr(te)}function Gn(te){return Ga(te)?bl(te):$u(te)}function ju(te){for(var Ee=te.length;Ee--&&vn.test(te.charAt(Ee)););return Ee}var ld=wo(il);function ud(te){for(var Ee=nl.lastIndex=0;nl.test(te);)++Ee;return Ee}function bl(te){return te.match(nl)||[]}function cd(te){return te.match(rd)||[]}var hd=function te(Ee){Ee=Ee==null?xn:To.defaults(xn.Object(),Ee,To.pick(xn,id));var ve=Ee.Array,gt=Ee.Date,Zt=Ee.Error,mr=Ee.Function,sn=Ee.Math,Er=Ee.Object,xl=Ee.RegExp,dd=Ee.String,ri=Ee.TypeError,of=ve.prototype,vd=mr.prototype,Eo=Er.prototype,sf=Ee["__core-js_shared__"],as=vd.toString,gr=Eo.hasOwnProperty,_d=0,os=function(){var e=/[^.]+$/.exec(sf&&sf.keys&&sf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Un=Eo.toString,Do=as.call(Er),Qu=xn._,Ju=xl("^"+as.call(gr).replace(kr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ss=Gu?Ee.Buffer:i,Xi=Ee.Symbol,fs=Ee.Uint8Array,wl=ss?ss.allocUnsafe:i,ff=gl(Er.getPrototypeOf,Er),Ua=Er.create,fn=Eo.propertyIsEnumerable,ls=of.splice,Sl=Xi?Xi.isConcatSpreadable:i,mi=Xi?Xi.iterator:i,ha=Xi?Xi.toStringTag:i,us=function(){try{var e=G(Er,"defineProperty");return e({},"",{}),e}catch{}}(),pd=Ee.clearTimeout!==xn.clearTimeout&&Ee.clearTimeout,md=gt&&gt.now!==xn.Date.now&&gt.now,gd=Ee.setTimeout!==xn.setTimeout&&Ee.setTimeout,lf=sn.ceil,Lo=sn.floor,uf=Er.getOwnPropertySymbols,yd=ss?ss.isBuffer:i,Al=Ee.isFinite,ec=of.join,bd=gl(Er.keys,Er),Xr=sn.max,Cn=sn.min,da=gt.now,cf=Ee.parseInt,Tl=sn.random,tc=of.reverse,hf=G(Ee,"DataView"),Ro=G(Ee,"Map"),df=G(Ee,"Promise"),Ya=G(Ee,"Set"),Co=G(Ee,"WeakMap"),Oo=G(Er,"create"),cs=Co&&new Co,On={},rc=pr(hf),xd=pr(Ro),qi=pr(df),El=pr(Ya),Ha=pr(Co),za=Xi?Xi.prototype:i,Mo=za?za.valueOf:i,Dl=za?za.toString:i;function S(e){if(rn(e)&&!Jt(e)&&!(e instanceof cr)){if(e instanceof ni)return e;if(gr.call(e,"__wrapped__"))return Kr(e)}return new ni(e)}var Wa=function(){function e(){}return function(r){if(!tn(r))return{};if(Ua)return Ua(r);e.prototype=r;var a=new e;return e.prototype=i,a}}();function hs(){}function ni(e,r){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!r,this.__index__=0,this.__values__=i}S.templateSettings={escape:ce,evaluate:Et,interpolate:at,variable:"",imports:{_:S}},S.prototype=hs.prototype,S.prototype.constructor=S,ni.prototype=Wa(hs.prototype),ni.prototype.constructor=ni;function cr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Wt,this.__views__=[]}function wd(){var e=new cr(this.__wrapped__);return e.__actions__=In(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=In(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=In(this.__views__),e}function Sd(){if(this.__filtered__){var e=new cr(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Ad(){var e=this.__wrapped__.value(),r=this.__dir__,a=Jt(e),c=r<0,_=a?e.length:0,L=Le(0,_,this.__views__),z=L.start,$=L.end,ie=$-z,Fe=c?$:z-1,Pe=this.__iteratees__,ze=Pe.length,vt=0,Rt=Cn(ie,this.__takeCount__);if(!a||!c&&_==ie&&Rt==ie)return ws(e,this.__actions__);var Yt=[];e:for(;ie--&&vt<Rt;){Fe+=r;for(var or=-1,Ht=e[Fe];++or<ze;){var _r=Pe[or],yr=_r.iteratee,Ti=_r.type,Qn=yr(Ht);if(Ti==Ot)Ht=Qn;else if(!Qn){if(Ti==Re)continue e;break e}}Yt[vt++]=Ht}return Yt}cr.prototype=Wa(hs.prototype),cr.prototype.constructor=cr;function Va(e){var r=-1,a=e==null?0:e.length;for(this.clear();++r<a;){var c=e[r];this.set(c[0],c[1])}}function Td(){this.__data__=Oo?Oo(null):{},this.size=0}function nc(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}function ic(e){var r=this.__data__;if(Oo){var a=r[e];return a===v?i:a}return gr.call(r,e)?r[e]:i}function Ed(e){var r=this.__data__;return Oo?r[e]!==i:gr.call(r,e)}function Dd(e,r){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=Oo&&r===i?v:r,this}Va.prototype.clear=Td,Va.prototype.delete=nc,Va.prototype.get=ic,Va.prototype.has=Ed,Va.prototype.set=Dd;function gi(e){var r=-1,a=e==null?0:e.length;for(this.clear();++r<a;){var c=e[r];this.set(c[0],c[1])}}function vf(){this.__data__=[],this.size=0}function Ld(e){var r=this.__data__,a=va(r,e);if(a<0)return!1;var c=r.length-1;return a==c?r.pop():ls.call(r,a,1),--this.size,!0}function Rd(e){var r=this.__data__,a=va(r,e);return a<0?i:r[a][1]}function Cd(e){return va(this.__data__,e)>-1}function Od(e,r){var a=this.__data__,c=va(a,e);return c<0?(++this.size,a.push([e,r])):a[c][1]=r,this}gi.prototype.clear=vf,gi.prototype.delete=Ld,gi.prototype.get=Rd,gi.prototype.has=Cd,gi.prototype.set=Od;function Ki(e){var r=-1,a=e==null?0:e.length;for(this.clear();++r<a;){var c=e[r];this.set(c[0],c[1])}}function ac(){this.size=0,this.__data__={hash:new Va,map:new(Ro||gi),string:new Va}}function Md(e){var r=h(this,e).delete(e);return this.size-=r?1:0,r}function Id(e){return h(this,e).get(e)}function Fd(e){return h(this,e).has(e)}function kd(e,r){var a=h(this,e),c=a.size;return a.set(e,r),this.size+=a.size==c?0:1,this}Ki.prototype.clear=ac,Ki.prototype.delete=Md,Ki.prototype.get=Id,Ki.prototype.has=Fd,Ki.prototype.set=kd;function $a(e){var r=-1,a=e==null?0:e.length;for(this.__data__=new Ki;++r<a;)this.add(e[r])}function Io(e){return this.__data__.set(e,v),this}function Pd(e){return this.__data__.has(e)}$a.prototype.add=$a.prototype.push=Io,$a.prototype.has=Pd;function yi(e){var r=this.__data__=new gi(e);this.size=r.size}function oc(){this.__data__=new gi,this.size=0}function _f(e){var r=this.__data__,a=r.delete(e);return this.size=r.size,a}function sc(e){return this.__data__.get(e)}function Ll(e){return this.__data__.has(e)}function Nd(e,r){var a=this.__data__;if(a instanceof gi){var c=a.__data__;if(!Ro||c.length<f-1)return c.push([e,r]),this.size=++a.size,this;a=this.__data__=new Ki(c)}return a.set(e,r),this.size=a.size,this}yi.prototype.clear=oc,yi.prototype.delete=_f,yi.prototype.get=sc,yi.prototype.has=Ll,yi.prototype.set=Nd;function Rl(e,r){var a=Jt(e),c=!a&&Os(e),_=!a&&!c&&Vo(e),L=!a&&!c&&!_&&Ff(e),z=a||c||_||L,$=z?dl(e.length,dd):[],ie=$.length;for(var Fe in e)(r||gr.call(e,Fe))&&!(z&&(Fe=="length"||_&&(Fe=="offset"||Fe=="parent")||L&&(Fe=="buffer"||Fe=="byteLength"||Fe=="byteOffset")||K(Fe,ie)))&&$.push(Fe);return $}function fc(e){var r=e.length;return r?e[wf(0,r-1)]:i}function Bd(e,r){return Lr(In(e),Za(r,0,e.length))}function Gd(e){return Lr(In(e))}function Cl(e,r,a){(a!==i&&!ra(e[r],a)||a===i&&!(r in e))&&$n(e,r,a)}function ds(e,r,a){var c=e[r];(!(gr.call(e,r)&&ra(c,a))||a===i&&!(r in e))&&$n(e,r,a)}function va(e,r){for(var a=e.length;a--;)if(ra(e[a][0],r))return a;return-1}function Ud(e,r,a,c){return Mi(e,function(_,L,z){r(c,_,a(_),z)}),c}function vs(e,r){return e&&Ii(r,kn(r),e)}function Yd(e,r){return e&&Ii(r,fi(r),e)}function $n(e,r,a){r=="__proto__"&&us?us(e,r,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[r]=a}function _a(e,r){for(var a=-1,c=r.length,_=ve(c),L=e==null;++a<c;)_[a]=L?i:t0(e,r[a]);return _}function Za(e,r,a){return e===e&&(a!==i&&(e=e<=a?e:a),r!==i&&(e=e>=r?e:r)),e}function Sn(e,r,a,c,_,L){var z,$=r&p,ie=r&U,Fe=r&q;if(a&&(z=_?a(e,c,_,L):a(e)),z!==i)return z;if(!tn(e))return e;var Pe=Jt(e);if(Pe){if(z=Ge(e),!$)return In(e,z)}else{var ze=fe(e),vt=ze==kt||ze==Nr;if(Vo(e))return As(e,$);if(ze==ar||ze==lr||vt&&!_){if(z=ie||vt?{}:Be(e),!$)return ie?Vd(e,Yd(z,e)):Wd(e,vs(z,e))}else{if(!Or[ze])return _?e:{};z=We(e,ze,$)}}L||(L=new yi);var Rt=L.get(e);if(Rt)return Rt;L.set(e,z),o_(e)?e.forEach(function(Ht){z.add(Sn(Ht,r,a,Ht,e,L))}):i_(e)&&e.forEach(function(Ht,_r){z.set(_r,Sn(Ht,r,a,_r,e,L))});var Yt=Fe?ie?Of:Cf:ie?fi:kn,or=Pe?i:Yt(e);return wn(or||e,function(Ht,_r){or&&(_r=Ht,Ht=e[_r]),ds(z,_r,Sn(Ht,r,a,_r,e,L))}),z}function lc(e){var r=kn(e);return function(a){return Xa(a,e,r)}}function Xa(e,r,a){var c=a.length;if(e==null)return!c;for(e=Er(e);c--;){var _=a[c],L=r[_],z=e[_];if(z===i&&!(_ in e)||!L(z))return!1}return!0}function pf(e,r,a){if(typeof e!="function")throw new ri(l);return wt(function(){e.apply(i,a)},r)}function qa(e,r,a,c){var _=-1,L=Qs,z=!0,$=e.length,ie=[],Fe=r.length;if(!$)return ie;a&&(r=Br(r,qn(a))),c?(L=ll,z=!1):r.length>=f&&(L=ua,z=!1,r=new $a(r));e:for(;++_<$;){var Pe=e[_],ze=a==null?Pe:a(Pe);if(Pe=c||Pe!==0?Pe:0,z&&ze===ze){for(var vt=Fe;vt--;)if(r[vt]===ze)continue e;ie.push(Pe)}else L(r,ze,c)||ie.push(Pe)}return ie}var Mi=$l(ii),mf=$l(_s,!0);function Ol(e,r){var a=!0;return Mi(e,function(c,_,L){return a=!!r(c,_,L),a}),a}function Ka(e,r,a){for(var c=-1,_=e.length;++c<_;){var L=e[c],z=r(L);if(z!=null&&($===i?z===z&&!Ai(z):a(z,$)))var $=z,ie=L}return ie}function uc(e,r,a,c){var _=e.length;for(a=nr(a),a<0&&(a=-a>_?0:_+a),c=c===i||c>_?_:nr(c),c<0&&(c+=_),c=a>c?0:f_(c);a<c;)e[a++]=r;return e}function Ml(e,r){var a=[];return Mi(e,function(c,_,L){r(c,_,L)&&a.push(c)}),a}function pn(e,r,a,c,_){var L=-1,z=e.length;for(a||(a=ke),_||(_=[]);++L<z;){var $=e[L];r>0&&a($)?r>1?pn($,r-1,a,c,_):Vi(_,$):c||(_[_.length]=$)}return _}var gf=Zl(),Il=Zl(!0);function ii(e,r){return e&&gf(e,r,kn)}function _s(e,r){return e&&Il(e,r,kn)}function ps(e,r){return Oi(r,function(a){return uo(e[a])})}function pa(e,r){r=bi(r,e);for(var a=0,c=r.length;e!=null&&a<c;)e=e[Dr(r[a++])];return a&&a==c?e:i}function Fl(e,r,a){var c=r(e);return Jt(e)?c:Vi(c,a(e))}function Mn(e){return e==null?e===i?di:Qr:ha&&ha in Er(e)?se(e):$e(e)}function ms(e,r){return e>r}function cc(e,r){return e!=null&&gr.call(e,r)}function hc(e,r){return e!=null&&r in Er(e)}function kl(e,r,a){return e>=Cn(r,a)&&e<Xr(r,a)}function gs(e,r,a){for(var c=a?ll:Qs,_=e[0].length,L=e.length,z=L,$=ve(L),ie=1/0,Fe=[];z--;){var Pe=e[z];z&&r&&(Pe=Br(Pe,qn(r))),ie=Cn(Pe.length,ie),$[z]=!a&&(r||_>=120&&Pe.length>=120)?new $a(z&&Pe):i}Pe=e[0];var ze=-1,vt=$[0];e:for(;++ze<_&&Fe.length<ie;){var Rt=Pe[ze],Yt=r?r(Rt):Rt;if(Rt=a||Rt!==0?Rt:0,!(vt?ua(vt,Yt):c(Fe,Yt,a))){for(z=L;--z;){var or=$[z];if(!(or?ua(or,Yt):c(e[z],Yt,a)))continue e}vt&&vt.push(Yt),Fe.push(Rt)}}return Fe}function dc(e,r,a,c){return ii(e,function(_,L,z){r(c,a(_),L,z)}),c}function ja(e,r,a){r=bi(r,e),e=Mt(e,r);var c=e==null?e:e[Dr(Y(r))];return c==null?i:_n(c,e,a)}function Pl(e){return rn(e)&&Mn(e)==lr}function vc(e){return rn(e)&&Mn(e)==Nn}function Nl(e){return rn(e)&&Mn(e)==It}function Fo(e,r,a,c,_){return e===r?!0:e==null||r==null||!rn(e)&&!rn(r)?e!==e&&r!==r:_c(e,r,a,c,Fo,_)}function _c(e,r,a,c,_,L){var z=Jt(e),$=Jt(r),ie=z?Kt:fe(e),Fe=$?Kt:fe(r);ie=ie==lr?ar:ie,Fe=Fe==lr?ar:Fe;var Pe=ie==ar,ze=Fe==ar,vt=ie==Fe;if(vt&&Vo(e)){if(!Vo(r))return!1;z=!0,Pe=!1}if(vt&&!Pe)return L||(L=new yi),z||Ff(e)?Ec(e,r,a,c,_,L):qd(e,r,ie,a,c,_,L);if(!(a&D)){var Rt=Pe&&gr.call(e,"__wrapped__"),Yt=ze&&gr.call(r,"__wrapped__");if(Rt||Yt){var or=Rt?e.value():e,Ht=Yt?r.value():r;return L||(L=new yi),_(or,Ht,a,c,L)}}return vt?(L||(L=new yi),Kd(e,r,a,c,_,L)):!1}function Bl(e){return rn(e)&&fe(e)==Fr}function ys(e,r,a,c){var _=a.length,L=_,z=!c;if(e==null)return!L;for(e=Er(e);_--;){var $=a[_];if(z&&$[2]?$[1]!==e[$[0]]:!($[0]in e))return!1}for(;++_<L;){$=a[_];var ie=$[0],Fe=e[ie],Pe=$[1];if(z&&$[2]){if(Fe===i&&!(ie in e))return!1}else{var ze=new yi;if(c)var vt=c(Fe,Pe,ie,e,r,ze);if(!(vt===i?Fo(Pe,Fe,D|pe,c,ze):vt))return!1}}return!0}function ko(e){if(!tn(e)||Qe(e))return!1;var r=uo(e)?Ju:Ph;return r.test(pr(e))}function pc(e){return rn(e)&&Mn(e)==En}function yf(e){return rn(e)&&fe(e)==Jr}function ji(e){return rn(e)&&Fc(e.length)&&!!Cr[Mn(e)]}function Po(e){return typeof e=="function"?e:e==null?li:typeof e=="object"?Jt(e)?ya(e[0],e[1]):ga(e):y_(e)}function Qi(e){if(!pt(e))return bd(e);var r=[];for(var a in Er(e))gr.call(e,a)&&a!="constructor"&&r.push(a);return r}function bs(e){if(!tn(e))return Ie(e);var r=pt(e),a=[];for(var c in e)c=="constructor"&&(r||!gr.call(e,c))||a.push(c);return a}function Qa(e,r){return e<r}function ma(e,r){var a=-1,c=si(e)?ve(e.length):[];return Mi(e,function(_,L,z){c[++a]=r(_,L,z)}),c}function ga(e){var r=T(e);return r.length==1&&r[0][2]?ge(r[0][0],r[0][1]):function(a){return a===e||ys(a,e,r)}}function ya(e,r){return Oe(e)&&be(r)?ge(Dr(e),r):function(a){var c=t0(a,e);return c===i&&c===r?r0(a,e):Fo(r,c,D|pe)}}function Ja(e,r,a,c,_){e!==r&&gf(r,function(L,z){if(_||(_=new yi),tn(L))bf(e,r,z,a,Ja,c,_);else{var $=c?c(Ke(e,z),L,z+"",e,r,_):i;$===i&&($=L),Cl(e,z,$)}},fi)}function bf(e,r,a,c,_,L,z){var $=Ke(e,a),ie=Ke(r,a),Fe=z.get(ie);if(Fe){Cl(e,a,Fe);return}var Pe=L?L($,ie,a+"",e,r,z):i,ze=Pe===i;if(ze){var vt=Jt(ie),Rt=!vt&&Vo(ie),Yt=!vt&&!Rt&&Ff(ie);Pe=ie,vt||Rt||Yt?Jt($)?Pe=$:un($)?Pe=In($):Rt?(ze=!1,Pe=As(ie,!0)):Yt?(ze=!1,Pe=zo(ie,!0)):Pe=[]:Jl(ie)||Os(ie)?(Pe=$,Os($)?Pe=l_($):(!tn($)||uo($))&&(Pe=Be(ie))):ze=!1}ze&&(z.set(ie,Pe),_(Pe,ie,c,L,z),z.delete(ie)),Cl(e,a,Pe)}function No(e,r){var a=e.length;if(!!a)return r+=r<0?a:0,K(r,a)?e[r]:i}function xf(e,r,a){r.length?r=Br(r,function(L){return Jt(L)?function(z){return pa(z,L.length===1?L[0]:L)}:L}):r=[li];var c=-1;r=Br(r,qn(Bt()));var _=ma(e,function(L,z,$){var ie=Br(r,function(Fe){return Fe(L)});return{criteria:ie,index:++c,value:L}});return hl(_,function(L,z){return Ls(L,z,a)})}function Gl(e,r){return eo(e,r,function(a,c){return r0(e,c)})}function eo(e,r,a){for(var c=-1,_=r.length,L={};++c<_;){var z=r[c],$=pa(e,z);a($,z)&&xs(L,bi(z,e),$)}return L}function Bo(e){return function(r){return pa(r,e)}}function Ul(e,r,a,c){var _=c?Na:$i,L=-1,z=r.length,$=e;for(e===r&&(r=In(r)),a&&($=Br(e,qn(a)));++L<z;)for(var ie=0,Fe=r[L],Pe=a?a(Fe):Fe;(ie=_($,Pe,ie,c))>-1;)$!==e&&ls.call($,ie,1),ls.call(e,ie,1);return e}function mc(e,r){for(var a=e?r.length:0,c=a-1;a--;){var _=r[a];if(a==c||_!==L){var L=_;K(_)?ls.call(e,_,1):zl(e,_)}}return e}function wf(e,r){return e+Lo(Tl()*(r-e+1))}function gc(e,r,a,c){for(var _=-1,L=Xr(lf((r-e)/(a||1)),0),z=ve(L);L--;)z[c?L:++_]=e,e+=a;return z}function Sf(e,r){var a="";if(!e||r<1||r>Ze)return a;do r%2&&(a+=e),r=Lo(r/2),r&&(e+=e);while(r);return a}function rr(e,r){return Ct(qe(e,r,li),e+"")}function Go(e){return fc(kf(e))}function Yl(e,r){var a=kf(e);return Lr(a,Za(r,0,a.length))}function xs(e,r,a,c){if(!tn(e))return e;r=bi(r,e);for(var _=-1,L=r.length,z=L-1,$=e;$!=null&&++_<L;){var ie=Dr(r[_]),Fe=a;if(ie==="__proto__"||ie==="constructor"||ie==="prototype")return e;if(_!=z){var Pe=$[ie];Fe=c?c(Pe,ie,$):i,Fe===i&&(Fe=tn(Pe)?Pe:K(r[_+1])?[]:{})}ds($,ie,Fe),$=$[ie]}return e}var yc=cs?function(e,r){return cs.set(e,r),e}:li,bc=us?function(e,r){return us(e,"toString",{configurable:!0,enumerable:!1,value:i0(r),writable:!0})}:li;function Hd(e){return Lr(kf(e))}function ai(e,r,a){var c=-1,_=e.length;r<0&&(r=-r>_?0:_+r),a=a>_?_:a,a<0&&(a+=_),_=r>a?0:a-r>>>0,r>>>=0;for(var L=ve(_);++c<_;)L[c]=e[c+r];return L}function zd(e,r){var a;return Mi(e,function(c,_,L){return a=r(c,_,L),!a}),!!a}function Af(e,r,a){var c=0,_=e==null?c:e.length;if(typeof r=="number"&&r===r&&_<=sr){for(;c<_;){var L=c+_>>>1,z=e[L];z!==null&&!Ai(z)&&(a?z<=r:z<r)?c=L+1:_=L}return _}return Hl(e,r,li,a)}function Hl(e,r,a,c){var _=0,L=e==null?0:e.length;if(L===0)return 0;r=a(r);for(var z=r!==r,$=r===null,ie=Ai(r),Fe=r===i;_<L;){var Pe=Lo((_+L)/2),ze=a(e[Pe]),vt=ze!==i,Rt=ze===null,Yt=ze===ze,or=Ai(ze);if(z)var Ht=c||Yt;else Fe?Ht=Yt&&(c||vt):$?Ht=Yt&&vt&&(c||!Rt):ie?Ht=Yt&&vt&&!Rt&&(c||!or):Rt||or?Ht=!1:Ht=c?ze<=r:ze<r;Ht?_=Pe+1:L=Pe}return Cn(L,Qt)}function xc(e,r){for(var a=-1,c=e.length,_=0,L=[];++a<c;){var z=e[a],$=r?r(z):z;if(!a||!ra($,ie)){var ie=$;L[_++]=z===0?0:z}}return L}function wc(e){return typeof e=="number"?e:Ai(e)?$t:+e}function Kn(e){if(typeof e=="string")return e;if(Jt(e))return Br(e,Kn)+"";if(Ai(e))return Dl?Dl.call(e):"";var r=e+"";return r=="0"&&1/e==-Me?"-0":r}function ba(e,r,a){var c=-1,_=Qs,L=e.length,z=!0,$=[],ie=$;if(a)z=!1,_=ll;else if(L>=f){var Fe=r?null:Zd(e);if(Fe)return is(Fe);z=!1,_=ua,ie=new $a}else ie=r?[]:$;e:for(;++c<L;){var Pe=e[c],ze=r?r(Pe):Pe;if(Pe=a||Pe!==0?Pe:0,z&&ze===ze){for(var vt=ie.length;vt--;)if(ie[vt]===ze)continue e;r&&ie.push(ze),$.push(Pe)}else _(ie,ze,a)||(ie!==$&&ie.push(ze),$.push(Pe))}return $}function zl(e,r){return r=bi(r,e),e=Mt(e,r),e==null||delete e[Dr(Y(r))]}function Tf(e,r,a,c){return xs(e,r,a(pa(e,r)),c)}function to(e,r,a,c){for(var _=e.length,L=c?_:-1;(c?L--:++L<_)&&r(e[L],L,e););return a?ai(e,c?0:L,c?L+1:_):ai(e,c?L+1:0,c?_:L)}function ws(e,r){var a=e;return a instanceof cr&&(a=a.value()),ul(r,function(c,_){return _.func.apply(_.thisArg,Vi([c],_.args))},a)}function Uo(e,r,a){var c=e.length;if(c<2)return c?ba(e[0]):[];for(var _=-1,L=ve(c);++_<c;)for(var z=e[_],$=-1;++$<c;)$!=_&&(L[_]=qa(L[_]||z,e[$],r,a));return ba(pn(L,1),r,a)}function Ef(e,r,a){for(var c=-1,_=e.length,L=r.length,z={};++c<_;){var $=c<L?r[c]:i;a(z,e[c],$)}return z}function Yo(e){return un(e)?e:[]}function Ho(e){return typeof e=="function"?e:li}function bi(e,r){return Jt(e)?e:Oe(e,r)?[e]:Xt(Rr(e))}var Wl=rr;function xi(e,r,a){var c=e.length;return a=a===i?c:a,!r&&a>=c?e:ai(e,r,a)}var Ss=pd||function(e){return xn.clearTimeout(e)};function As(e,r){if(r)return e.slice();var a=e.length,c=wl?wl(a):new e.constructor(a);return e.copy(c),c}function ro(e){var r=new e.constructor(e.byteLength);return new fs(r).set(new fs(e)),r}function Ts(e,r){var a=r?ro(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.byteLength)}function Es(e){var r=new e.constructor(e.source,Xn.exec(e));return r.lastIndex=e.lastIndex,r}function Ds(e){return Mo?Er(Mo.call(e)):{}}function zo(e,r){var a=r?ro(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.length)}function Df(e,r){if(e!==r){var a=e!==i,c=e===null,_=e===e,L=Ai(e),z=r!==i,$=r===null,ie=r===r,Fe=Ai(r);if(!$&&!Fe&&!L&&e>r||L&&z&&ie&&!$&&!Fe||c&&z&&ie||!a&&ie||!_)return 1;if(!c&&!L&&!Fe&&e<r||Fe&&a&&_&&!c&&!L||$&&a&&_||!z&&_||!ie)return-1}return 0}function Ls(e,r,a){for(var c=-1,_=e.criteria,L=r.criteria,z=_.length,$=a.length;++c<z;){var ie=Df(_[c],L[c]);if(ie){if(c>=$)return ie;var Fe=a[c];return ie*(Fe=="desc"?-1:1)}}return e.index-r.index}function xa(e,r,a,c){for(var _=-1,L=e.length,z=a.length,$=-1,ie=r.length,Fe=Xr(L-z,0),Pe=ve(ie+Fe),ze=!c;++$<ie;)Pe[$]=r[$];for(;++_<z;)(ze||_<L)&&(Pe[a[_]]=e[_]);for(;Fe--;)Pe[$++]=e[_++];return Pe}function Vl(e,r,a,c){for(var _=-1,L=e.length,z=-1,$=a.length,ie=-1,Fe=r.length,Pe=Xr(L-$,0),ze=ve(Pe+Fe),vt=!c;++_<Pe;)ze[_]=e[_];for(var Rt=_;++ie<Fe;)ze[Rt+ie]=r[ie];for(;++z<$;)(vt||_<L)&&(ze[Rt+a[z]]=e[_++]);return ze}function In(e,r){var a=-1,c=e.length;for(r||(r=ve(c));++a<c;)r[a]=e[a];return r}function Ii(e,r,a,c){var _=!a;a||(a={});for(var L=-1,z=r.length;++L<z;){var $=r[L],ie=c?c(a[$],e[$],$,a,e):i;ie===i&&(ie=e[$]),_?$n(a,$,ie):ds(a,$,ie)}return a}function Wd(e,r){return Ii(e,me(e),r)}function Vd(e,r){return Ii(e,ae(e),r)}function wi(e,r){return function(a,c){var _=Jt(a)?Wu:Ud,L=r?r():{};return _(a,e,Bt(c,2),L)}}function no(e){return rr(function(r,a){var c=-1,_=a.length,L=_>1?a[_-1]:i,z=_>2?a[2]:i;for(L=e.length>3&&typeof L=="function"?(_--,L):i,z&&oe(a[0],a[1],z)&&(L=_<3?i:L,_=1),r=Er(r);++c<_;){var $=a[c];$&&e(r,$,c,L)}return r})}function $l(e,r){return function(a,c){if(a==null)return a;if(!si(a))return e(a,c);for(var _=a.length,L=r?_:-1,z=Er(a);(r?L--:++L<_)&&c(z[L],L,z)!==!1;);return a}}function Zl(e){return function(r,a,c){for(var _=-1,L=Er(r),z=c(r),$=z.length;$--;){var ie=z[e?$:++_];if(a(L[ie],ie,L)===!1)break}return r}}function $d(e,r,a){var c=r&ue,_=Zn(e);function L(){var z=this&&this!==xn&&this instanceof L?_:e;return z.apply(c?a:this,arguments)}return L}function Xl(e){return function(r){r=Rr(r);var a=Ga(r)?Gn(r):i,c=a?a[0]:r.charAt(0),_=a?xi(a,1).join(""):r.slice(1);return c[e]()+_}}function Wo(e){return function(r){return ul(m_(p_(r).replace(ed,"")),e,"")}}function Zn(e){return function(){var r=arguments;switch(r.length){case 0:return new e;case 1:return new e(r[0]);case 2:return new e(r[0],r[1]);case 3:return new e(r[0],r[1],r[2]);case 4:return new e(r[0],r[1],r[2],r[3]);case 5:return new e(r[0],r[1],r[2],r[3],r[4]);case 6:return new e(r[0],r[1],r[2],r[3],r[4],r[5]);case 7:return new e(r[0],r[1],r[2],r[3],r[4],r[5],r[6])}var a=Wa(e.prototype),c=e.apply(a,r);return tn(c)?c:a}}function Sc(e,r,a){var c=Zn(e);function _(){for(var L=arguments.length,z=ve(L),$=L,ie=oo(_);$--;)z[$]=arguments[$];var Fe=L<3&&z[0]!==ie&&z[L-1]!==ie?[]:Zi(z,ie);if(L-=Fe.length,L<a)return ql(e,r,Rs,_.placeholder,i,z,Fe,i,i,a-L);var Pe=this&&this!==xn&&this instanceof _?c:e;return _n(Pe,this,z)}return _}function io(e){return function(r,a,c){var _=Er(r);if(!si(r)){var L=Bt(a,3);r=kn(r),a=function($){return L(_[$],$,_)}}var z=e(r,a,c);return z>-1?_[L?r[z]:z]:i}}function Ji(e){return Fi(function(r){var a=r.length,c=a,_=ni.prototype.thru;for(e&&r.reverse();c--;){var L=r[c];if(typeof L!="function")throw new ri(l);if(_&&!z&&Mf(L)=="wrapper")var z=new ni([],!0)}for(c=z?c:a;++c<a;){L=r[c];var $=Mf(L),ie=$=="wrapper"?Ql(L):i;ie&&Se(ie[0])&&ie[1]==(J|g|P|Te)&&!ie[4].length&&ie[9]==1?z=z[Mf(ie[0])].apply(z,ie[3]):z=L.length==1&&Se(L)?z[$]():z.thru(L)}return function(){var Fe=arguments,Pe=Fe[0];if(z&&Fe.length==1&&Jt(Pe))return z.plant(Pe).value();for(var ze=0,vt=a?r[ze].apply(this,Fe):Pe;++ze<a;)vt=r[ze].call(this,vt);return vt}})}function Rs(e,r,a,c,_,L,z,$,ie,Fe){var Pe=r&J,ze=r&ue,vt=r&b,Rt=r&(g|x),Yt=r&nt,or=vt?i:Zn(e);function Ht(){for(var _r=arguments.length,yr=ve(_r),Ti=_r;Ti--;)yr[Ti]=arguments[Ti];if(Rt)var Qn=oo(Ht),Ei=So(yr,Qn);if(c&&(yr=xa(yr,c,_,Rt)),L&&(yr=Vl(yr,L,z,Rt)),_r-=Ei,Rt&&_r<Fe){var cn=Zi(yr,Qn);return ql(e,r,Rs,Ht.placeholder,a,yr,cn,$,ie,Fe-_r)}var na=ze?a:this,ho=vt?na[e]:e;return _r=yr.length,$?yr=Lt(yr,$):Yt&&_r>1&&yr.reverse(),Pe&&ie<_r&&(yr.length=ie),this&&this!==xn&&this instanceof Ht&&(ho=or||Zn(ho)),ho.apply(na,yr)}return Ht}function Lf(e,r){return function(a,c){return dc(a,e,r(c),{})}}function ao(e,r){return function(a,c){var _;if(a===i&&c===i)return r;if(a!==i&&(_=a),c!==i){if(_===i)return c;typeof a=="string"||typeof c=="string"?(a=Kn(a),c=Kn(c)):(a=wc(a),c=wc(c)),_=e(a,c)}return _}}function Rf(e){return Fi(function(r){return r=Br(r,qn(Bt())),rr(function(a){var c=this;return e(r,function(_){return _n(_,c,a)})})})}function Hr(e,r){r=r===i?" ":Kn(r);var a=r.length;if(a<2)return a?Sf(r,e):r;var c=Sf(r,lf(e/ca(r)));return Ga(r)?xi(Gn(c),0,e).join(""):c.slice(0,e)}function wa(e,r,a,c){var _=r&ue,L=Zn(e);function z(){for(var $=-1,ie=arguments.length,Fe=-1,Pe=c.length,ze=ve(Pe+ie),vt=this&&this!==xn&&this instanceof z?L:e;++Fe<Pe;)ze[Fe]=c[Fe];for(;ie--;)ze[Fe++]=arguments[++$];return _n(vt,_?a:this,ze)}return z}function zr(e){return function(r,a,c){return c&&typeof c!="number"&&oe(r,a,c)&&(a=c=i),r=co(r),a===i?(a=r,r=0):a=co(a),c=c===i?r<a?1:-1:co(c),gc(r,a,c,e)}}function An(e){return function(r,a){return typeof r=="string"&&typeof a=="string"||(r=Pi(r),a=Pi(a)),e(r,a)}}function ql(e,r,a,c,_,L,z,$,ie,Fe){var Pe=r&g,ze=Pe?z:i,vt=Pe?i:z,Rt=Pe?L:i,Yt=Pe?i:L;r|=Pe?P:F,r&=~(Pe?F:P),r&A||(r&=~(ue|b));var or=[e,r,_,Rt,ze,Yt,vt,$,ie,Fe],Ht=a.apply(i,or);return Se(e)&&Je(Ht,or),Ht.placeholder=c,Vt(Ht,e,r)}function Kl(e){var r=sn[e];return function(a,c){if(a=Pi(a),c=c==null?0:Cn(nr(c),292),c&&Al(a)){var _=(Rr(a)+"e").split("e"),L=r(_[0]+"e"+(+_[1]+c));return _=(Rr(L)+"e").split("e"),+(_[0]+"e"+(+_[1]-c))}return r(a)}}var Zd=Ya&&1/is(new Ya([,-0]))[1]==Me?function(e){return new Ya(e)}:s0;function Ac(e){return function(r){var a=fe(r);return a==Fr?af(r):a==Jr?Ku(r):fd(r,e(r))}}function ea(e,r,a,c,_,L,z,$){var ie=r&b;if(!ie&&typeof e!="function")throw new ri(l);var Fe=c?c.length:0;if(Fe||(r&=~(P|F),c=_=i),z=z===i?z:Xr(nr(z),0),$=$===i?$:nr($),Fe-=_?_.length:0,r&F){var Pe=c,ze=_;c=_=i}var vt=ie?i:Ql(e),Rt=[e,r,a,c,_,Pe,ze,L,z,$];if(vt&&Ve(Rt,vt),e=Rt[0],r=Rt[1],a=Rt[2],c=Rt[3],_=Rt[4],$=Rt[9]=Rt[9]===i?ie?0:e.length:Xr(Rt[9]-Fe,0),!$&&r&(g|x)&&(r&=~(g|x)),!r||r==ue)var Yt=$d(e,r,a);else r==g||r==x?Yt=Sc(e,r,$):(r==P||r==(ue|P))&&!_.length?Yt=wa(e,r,a,c):Yt=Rs.apply(i,Rt);var or=vt?yc:Je;return Vt(or(Yt,Rt),e,r)}function jl(e,r,a,c){return e===i||ra(e,Eo[a])&&!gr.call(c,a)?r:e}function Tc(e,r,a,c,_,L){return tn(e)&&tn(r)&&(L.set(r,e),Ja(e,r,i,Tc,L),L.delete(r)),e}function Xd(e){return Jl(e)?i:e}function Ec(e,r,a,c,_,L){var z=a&D,$=e.length,ie=r.length;if($!=ie&&!(z&&ie>$))return!1;var Fe=L.get(e),Pe=L.get(r);if(Fe&&Pe)return Fe==r&&Pe==e;var ze=-1,vt=!0,Rt=a&pe?new $a:i;for(L.set(e,r),L.set(r,e);++ze<$;){var Yt=e[ze],or=r[ze];if(c)var Ht=z?c(or,Yt,ze,r,e,L):c(Yt,or,ze,e,r,L);if(Ht!==i){if(Ht)continue;vt=!1;break}if(Rt){if(!Js(r,function(_r,yr){if(!ua(Rt,yr)&&(Yt===_r||_(Yt,_r,a,c,L)))return Rt.push(yr)})){vt=!1;break}}else if(!(Yt===or||_(Yt,or,a,c,L))){vt=!1;break}}return L.delete(e),L.delete(r),vt}function qd(e,r,a,c,_,L,z){switch(a){case Tr:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case Nn:return!(e.byteLength!=r.byteLength||!L(new fs(e),new fs(r)));case Gt:case It:case Zr:return ra(+e,+r);case jr:return e.name==r.name&&e.message==r.message;case En:case an:return e==r+"";case Fr:var $=af;case Jr:var ie=c&D;if($||($=is),e.size!=r.size&&!ie)return!1;var Fe=z.get(e);if(Fe)return Fe==r;c|=pe,z.set(e,r);var Pe=Ec($(e),$(r),c,_,L,z);return z.delete(e),Pe;case E:if(Mo)return Mo.call(e)==Mo.call(r)}return!1}function Kd(e,r,a,c,_,L){var z=a&D,$=Cf(e),ie=$.length,Fe=Cf(r),Pe=Fe.length;if(ie!=Pe&&!z)return!1;for(var ze=ie;ze--;){var vt=$[ze];if(!(z?vt in r:gr.call(r,vt)))return!1}var Rt=L.get(e),Yt=L.get(r);if(Rt&&Yt)return Rt==r&&Yt==e;var or=!0;L.set(e,r),L.set(r,e);for(var Ht=z;++ze<ie;){vt=$[ze];var _r=e[vt],yr=r[vt];if(c)var Ti=z?c(yr,_r,vt,r,e,L):c(_r,yr,vt,e,r,L);if(!(Ti===i?_r===yr||_(_r,yr,a,c,L):Ti)){or=!1;break}Ht||(Ht=vt=="constructor")}if(or&&!Ht){var Qn=e.constructor,Ei=r.constructor;Qn!=Ei&&"constructor"in e&&"constructor"in r&&!(typeof Qn=="function"&&Qn instanceof Qn&&typeof Ei=="function"&&Ei instanceof Ei)&&(or=!1)}return L.delete(e),L.delete(r),or}function Fi(e){return Ct(qe(e,i,k),e+"")}function Cf(e){return Fl(e,kn,me)}function Of(e){return Fl(e,fi,ae)}var Ql=cs?function(e){return cs.get(e)}:s0;function Mf(e){for(var r=e.name+"",a=On[r],c=gr.call(On,r)?a.length:0;c--;){var _=a[c],L=_.func;if(L==null||L==e)return _.name}return r}function oo(e){var r=gr.call(S,"placeholder")?S:e;return r.placeholder}function Bt(){var e=S.iteratee||a0;return e=e===a0?Po:e,arguments.length?e(arguments[0],arguments[1]):e}function h(e,r){var a=e.__data__;return rt(r)?a[typeof r=="string"?"string":"hash"]:a.map}function T(e){for(var r=kn(e),a=r.length;a--;){var c=r[a],_=e[c];r[a]=[c,_,be(_)]}return r}function G(e,r){var a=ml(e,r);return ko(a)?a:i}function se(e){var r=gr.call(e,ha),a=e[ha];try{e[ha]=i;var c=!0}catch{}var _=Un.call(e);return c&&(r?e[ha]=a:delete e[ha]),_}var me=uf?function(e){return e==null?[]:(e=Er(e),Oi(uf(e),function(r){return fn.call(e,r)}))}:f0,ae=uf?function(e){for(var r=[];e;)Vi(r,me(e)),e=ff(e);return r}:f0,fe=Mn;(hf&&fe(new hf(new ArrayBuffer(1)))!=Tr||Ro&&fe(new Ro)!=Fr||df&&fe(df.resolve())!=Pt||Ya&&fe(new Ya)!=Jr||Co&&fe(new Co)!=dn)&&(fe=function(e){var r=Mn(e),a=r==ar?e.constructor:i,c=a?pr(a):"";if(c)switch(c){case rc:return Tr;case xd:return Fr;case qi:return Pt;case El:return Jr;case Ha:return dn}return r});function Le(e,r,a){for(var c=-1,_=a.length;++c<_;){var L=a[c],z=L.size;switch(L.type){case"drop":e+=z;break;case"dropRight":r-=z;break;case"take":r=Cn(r,e+z);break;case"takeRight":e=Xr(e,r-z);break}}return{start:e,end:r}}function De(e){var r=e.match(Ia);return r?r[1].split(Fa):[]}function Ne(e,r,a){r=bi(r,e);for(var c=-1,_=r.length,L=!1;++c<_;){var z=Dr(r[c]);if(!(L=e!=null&&a(e,z)))break;e=e[z]}return L||++c!=_?L:(_=e==null?0:e.length,!!_&&Fc(_)&&K(z,_)&&(Jt(e)||Os(e)))}function Ge(e){var r=e.length,a=new e.constructor(r);return r&&typeof e[0]=="string"&&gr.call(e,"index")&&(a.index=e.index,a.input=e.input),a}function Be(e){return typeof e.constructor=="function"&&!pt(e)?Wa(ff(e)):{}}function We(e,r,a){var c=e.constructor;switch(r){case Nn:return ro(e);case Gt:case It:return new c(+e);case Tr:return Ts(e,a);case Dn:case Bn:case C:case Ue:case Xe:case dt:case Z:case we:case m:return zo(e,a);case Fr:return new c;case Zr:case an:return new c(e);case En:return Es(e);case Jr:return new c;case E:return Ds(e)}}function Ce(e,r){var a=r.length;if(!a)return e;var c=a-1;return r[c]=(a>1?"& ":"")+r[c],r=r.join(a>2?", ":" "),e.replace(Ln,`{
19
+ */(function(t,n){(function(){var i,a="4.17.21",f=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",d="Invalid `variable` option passed into `_.template`",v="__lodash_hash_undefined__",I=500,B="__lodash_placeholder__",p=1,U=2,q=4,D=1,pe=2,ue=1,x=2,A=4,g=8,b=16,P=32,F=64,J=128,Te=256,nt=512,ut=30,it="...",st=800,tt=16,Re=1,Ot=2,xt=3,Ie=1/0,Ze=9007199254740991,St=17976931348623157e292,$t=0/0,Wt=4294967295,Qt=Wt-1,sr=Wt>>>1,br=[["ary",J],["bind",ue],["bindKey",x],["curry",g],["curryRight",b],["flip",nt],["partial",P],["partialRight",F],["rearg",Te]],lr="[object Arguments]",Kt="[object Array]",wr="[object AsyncFunction]",Gt="[object Boolean]",Mt="[object Date]",dn="[object DOMException]",Qr="[object Error]",kt="[object Function]",Nr="[object GeneratorFunction]",Fr="[object Map]",Xr="[object Number]",Jr="[object Null]",ar="[object Object]",Pt="[object Promise]",Dn="[object Proxy]",Ln="[object RegExp]",en="[object Set]",on="[object String]",E="[object Symbol]",pi="[object Undefined]",vn="[object WeakMap]",Zi="[object WeakSet]",Gn="[object ArrayBuffer]",Tr="[object DataView]",Rn="[object Float32Array]",Un="[object Float64Array]",C="[object Int8Array]",Ue="[object Int16Array]",Xe="[object Int32Array]",dt="[object Uint8Array]",Z="[object Uint8ClampedArray]",we="[object Uint16Array]",m="[object Uint32Array]",He=/\b__p \+= '';/g,Nt=/\b(__p \+=) '' \+/g,u=/(__e\(.*?\)|\b__t\)) \+\n'';/g,de=/&(?:amp|lt|gt|quot|#39);/g,ye=/[&<>"']/g,w=RegExp(de.source),V=RegExp(ye.source),ce=/<%-([\s\S]+?)%>/g,Et=/<%([\s\S]+?)%>/g,at=/<%=([\s\S]+?)%>/g,mt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ur=/^\w*$/,mi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kr=/[\\^$.*+?()[\]{}|]/g,dr=RegExp(kr.source),Yr=/^\s+/,_n=/\s/,Cn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Na=/\{\n\/\* \[wrapped with (.+)\] \*/,Ba=/,? & /,jt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,$n=/[()=,{}\[\]\/\s]/,sn=/\\(\\)?/g,gi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Kn=/\w*$/,js=/^[-+]0x[0-9a-f]+$/i,Xh=/^0b[01]+$/i,qh=/^\[object .+?Constructor\]$/,Kh=/^0o[0-7]+$/i,jh=/^(?:0|[1-9]\d*)$/,Qh=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qs=/($^)/,Jh=/['\n\r\u2028\u2029\\]/g,Js="\\ud800-\\udfff",ed="\\u0300-\\u036f",td="\\ufe20-\\ufe2f",rd="\\u20d0-\\u20ff",Nu=ed+td+rd,Bu="\\u2700-\\u27bf",Gu="a-z\\xdf-\\xf6\\xf8-\\xff",nd="\\xac\\xb1\\xd7\\xf7",id="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ad="\\u2000-\\u206f",od=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Uu="A-Z\\xc0-\\xd6\\xd8-\\xde",Yu="\\ufe0e\\ufe0f",Hu=nd+id+ad+od,rl="['\u2019]",ef="["+Js+"]",nl="["+Hu+"]",tf="["+Nu+"]",zu="\\d+",as="["+Bu+"]",rf="["+Gu+"]",il="[^"+Js+Hu+zu+Bu+Gu+Uu+"]",os="\\ud83c[\\udffb-\\udfff]",sd="(?:"+tf+"|"+os+")",Wu="[^"+Js+"]",al="(?:\\ud83c[\\udde6-\\uddff]){2}",ol="[\\ud800-\\udbff][\\udc00-\\udfff]",On="["+Uu+"]",Zn="\\u200d",ss="(?:"+rf+"|"+il+")",fd="(?:"+On+"|"+il+")",Vu="(?:"+rl+"(?:d|ll|m|re|s|t|ve))?",sl="(?:"+rl+"(?:D|LL|M|RE|S|T|VE))?",fl=sd+"?",$u="["+Yu+"]?",ld="(?:"+Zn+"(?:"+[Wu,al,ol].join("|")+")"+$u+fl+")*",ll="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ud="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Zu=$u+fl+ld,cd="(?:"+[as,al,ol].join("|")+")"+Zu,hd="(?:"+[Wu+tf+"?",tf,al,ol,ef].join("|")+")",dd=RegExp(rl,"g"),vd=RegExp(tf,"g"),ul=RegExp(os+"(?="+os+")|"+hd+Zu,"g"),_d=RegExp([On+"?"+rf+"+"+Vu+"(?="+[nl,On,"$"].join("|")+")",fd+"+"+sl+"(?="+[nl,On+ss,"$"].join("|")+")",On+"?"+ss+"+"+Vu,On+"+"+sl,ud,ll,zu,cd].join("|"),"g"),Ga=RegExp("["+Zn+Js+Nu+Yu+"]"),pd=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,md=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nf=-1,Cr={};Cr[Rn]=Cr[Un]=Cr[C]=Cr[Ue]=Cr[Xe]=Cr[dt]=Cr[Z]=Cr[we]=Cr[m]=!0,Cr[lr]=Cr[Kt]=Cr[Gn]=Cr[Gt]=Cr[Tr]=Cr[Mt]=Cr[Qr]=Cr[kt]=Cr[Fr]=Cr[Xr]=Cr[ar]=Cr[Ln]=Cr[en]=Cr[on]=Cr[vn]=!1;var Or={};Or[lr]=Or[Kt]=Or[Gn]=Or[Tr]=Or[Gt]=Or[Mt]=Or[Rn]=Or[Un]=Or[C]=Or[Ue]=Or[Xe]=Or[Fr]=Or[Xr]=Or[ar]=Or[Ln]=Or[en]=Or[on]=Or[E]=Or[dt]=Or[Z]=Or[we]=Or[m]=!0,Or[Qr]=Or[kt]=Or[vn]=!1;var Xu={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},gd={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},cl={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},hl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ha=parseFloat,af=parseInt,dl=typeof Zs=="object"&&Zs&&Zs.Object===Object&&Zs,qu=typeof self=="object"&&self&&self.Object===Object&&self,Sn=dl||qu||Function("return this")(),vl=n&&!n.nodeType&&n,Ua=vl&&!0&&t&&!t.nodeType&&t,Ku=Ua&&Ua.exports===vl,_l=Ku&&dl.process,ii=function(){try{var te=Ua&&Ua.require&&Ua.require("util").types;return te||_l&&_l.binding&&_l.binding("util")}catch{}}(),ju=ii&&ii.isArrayBuffer,Xi=ii&&ii.isDate,Qu=ii&&ii.isMap,Ju=ii&&ii.isRegExp,Ao=ii&&ii.isSet,ec=ii&&ii.isTypedArray;function pn(te,Ee,ve){switch(ve.length){case 0:return te.call(Ee);case 1:return te.call(Ee,ve[0]);case 2:return te.call(Ee,ve[0],ve[1]);case 3:return te.call(Ee,ve[0],ve[1],ve[2])}return te.apply(Ee,ve)}function tc(te,Ee,ve,gt){for(var Zt=-1,mr=te==null?0:te.length;++Zt<mr;){var fn=te[Zt];Ee(gt,fn,ve(fn),te)}return gt}function An(te,Ee){for(var ve=-1,gt=te==null?0:te.length;++ve<gt&&Ee(te[ve],ve,te)!==!1;);return te}function rc(te,Ee){for(var ve=te==null?0:te.length;ve--&&Ee(te[ve],ve,te)!==!1;);return te}function da(te,Ee){for(var ve=-1,gt=te==null?0:te.length;++ve<gt;)if(!Ee(te[ve],ve,te))return!1;return!0}function Fi(te,Ee){for(var ve=-1,gt=te==null?0:te.length,Zt=0,mr=[];++ve<gt;){var fn=te[ve];Ee(fn,ve,te)&&(mr[Zt++]=fn)}return mr}function of(te,Ee){var ve=te==null?0:te.length;return!!ve&&Ki(te,Ee,0)>-1}function pl(te,Ee,ve){for(var gt=-1,Zt=te==null?0:te.length;++gt<Zt;)if(ve(Ee,te[gt]))return!0;return!1}function Br(te,Ee){for(var ve=-1,gt=te==null?0:te.length,Zt=Array(gt);++ve<gt;)Zt[ve]=Ee(te[ve],ve,te);return Zt}function qi(te,Ee){for(var ve=-1,gt=Ee.length,Zt=te.length;++ve<gt;)te[Zt+ve]=Ee[ve];return te}function ml(te,Ee,ve,gt){var Zt=-1,mr=te==null?0:te.length;for(gt&&mr&&(ve=te[++Zt]);++Zt<mr;)ve=Ee(ve,te[Zt],Zt,te);return ve}function yd(te,Ee,ve,gt){var Zt=te==null?0:te.length;for(gt&&Zt&&(ve=te[--Zt]);Zt--;)ve=Ee(ve,te[Zt],Zt,te);return ve}function sf(te,Ee){for(var ve=-1,gt=te==null?0:te.length;++ve<gt;)if(Ee(te[ve],ve,te))return!0;return!1}var Pr=Ha("length");function nc(te){return te.split("")}function xd(te){return te.match(jt)||[]}function yi(te,Ee,ve){var gt;return ve(te,function(Zt,mr,fn){if(Ee(Zt,mr,fn))return gt=mr,!1}),gt}function To(te,Ee,ve,gt){for(var Zt=te.length,mr=ve+(gt?1:-1);gt?mr--:++mr<Zt;)if(Ee(te[mr],mr,te))return mr;return-1}function Ki(te,Ee,ve){return Ee===Ee?Lo(te,Ee,ve):To(te,ff,ve)}function Ya(te,Ee,ve,gt){for(var Zt=ve-1,mr=te.length;++Zt<mr;)if(gt(te[Zt],Ee))return Zt;return-1}function ff(te){return te!==te}function fs(te,Ee){var ve=te==null?0:te.length;return ve?lf(te,Ee)/ve:$t}function Ha(te){return function(Ee){return Ee==null?i:Ee[te]}}function Eo(te){return function(Ee){return te==null?i:te[Ee]}}function gl(te,Ee,ve,gt,Zt){return Zt(te,function(mr,fn,Er){ve=gt?(gt=!1,mr):Ee(ve,mr,fn,Er)}),ve}function yl(te,Ee){var ve=te.length;for(te.sort(Ee);ve--;)te[ve]=te[ve].value;return te}function lf(te,Ee){for(var ve,gt=-1,Zt=te.length;++gt<Zt;){var mr=Ee(te[gt]);mr!==i&&(ve=ve===i?mr:ve+mr)}return ve}function xl(te,Ee){for(var ve=-1,gt=Array(te);++ve<te;)gt[ve]=Ee(ve);return gt}function bd(te,Ee){return Br(Ee,function(ve){return[ve,te[ve]]})}function ic(te){return te&&te.slice(0,fc(te)+1).replace(Yr,"")}function jn(te){return function(Ee){return te(Ee)}}function ls(te,Ee){return Br(Ee,function(ve){return te[ve]})}function va(te,Ee){return te.has(Ee)}function uf(te,Ee){for(var ve=-1,gt=te.length;++ve<gt&&Ki(Ee,te[ve],0)>-1;);return ve}function cf(te,Ee){for(var ve=te.length;ve--&&Ki(Ee,te[ve],0)>-1;);return ve}function Do(te,Ee){for(var ve=te.length,gt=0;ve--;)te[ve]===Ee&&++gt;return gt}var bl=Eo(Xu),wl=Eo(gd);function Sl(te){return"\\"+hl[te]}function Al(te,Ee){return te==null?i:te[Ee]}function za(te){return Ga.test(te)}function ac(te){return pd.test(te)}function oc(te){for(var Ee,ve=[];!(Ee=te.next()).done;)ve.push(Ee.value);return ve}function hf(te){var Ee=-1,ve=Array(te.size);return te.forEach(function(gt,Zt){ve[++Ee]=[Zt,gt]}),ve}function Tl(te,Ee){return function(ve){return te(Ee(ve))}}function ji(te,Ee){for(var ve=-1,gt=te.length,Zt=0,mr=[];++ve<gt;){var fn=te[ve];(fn===Ee||fn===B)&&(te[ve]=B,mr[Zt++]=ve)}return mr}function us(te){var Ee=-1,ve=Array(te.size);return te.forEach(function(gt){ve[++Ee]=gt}),ve}function sc(te){var Ee=-1,ve=Array(te.size);return te.forEach(function(gt){ve[++Ee]=[gt,gt]}),ve}function Lo(te,Ee,ve){for(var gt=ve-1,Zt=te.length;++gt<Zt;)if(te[gt]===Ee)return gt;return-1}function El(te,Ee,ve){for(var gt=ve+1;gt--;)if(te[gt]===Ee)return gt;return gt}function _a(te){return za(te)?Sd(te):Pr(te)}function Yn(te){return za(te)?Dl(te):nc(te)}function fc(te){for(var Ee=te.length;Ee--&&_n.test(te.charAt(Ee)););return Ee}var wd=Eo(cl);function Sd(te){for(var Ee=ul.lastIndex=0;ul.test(te);)++Ee;return Ee}function Dl(te){return te.match(ul)||[]}function Ad(te){return te.match(_d)||[]}var Td=function te(Ee){Ee=Ee==null?Sn:Ro.defaults(Sn.Object(),Ee,Ro.pick(Sn,md));var ve=Ee.Array,gt=Ee.Date,Zt=Ee.Error,mr=Ee.Function,fn=Ee.Math,Er=Ee.Object,Ll=Ee.RegExp,Ed=Ee.String,ai=Ee.TypeError,df=ve.prototype,Dd=mr.prototype,Co=Er.prototype,vf=Ee["__core-js_shared__"],cs=Dd.toString,gr=Co.hasOwnProperty,Ld=0,hs=function(){var e=/[^.]+$/.exec(vf&&vf.keys&&vf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Hn=Co.toString,Oo=cs.call(Er),lc=Sn._,uc=Ll("^"+cs.call(gr).replace(kr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ds=Ku?Ee.Buffer:i,Qi=Ee.Symbol,vs=Ee.Uint8Array,Rl=ds?ds.allocUnsafe:i,_f=Tl(Er.getPrototypeOf,Er),Wa=Er.create,ln=Co.propertyIsEnumerable,_s=df.splice,Cl=Qi?Qi.isConcatSpreadable:i,xi=Qi?Qi.iterator:i,pa=Qi?Qi.toStringTag:i,ps=function(){try{var e=G(Er,"defineProperty");return e({},"",{}),e}catch{}}(),Rd=Ee.clearTimeout!==Sn.clearTimeout&&Ee.clearTimeout,Cd=gt&&gt.now!==Sn.Date.now&&gt.now,Od=Ee.setTimeout!==Sn.setTimeout&&Ee.setTimeout,pf=fn.ceil,Io=fn.floor,mf=Er.getOwnPropertySymbols,Id=ds?ds.isBuffer:i,Ol=Ee.isFinite,cc=df.join,Md=Tl(Er.keys,Er),qr=fn.max,In=fn.min,ma=gt.now,gf=Ee.parseInt,Il=fn.random,hc=df.reverse,yf=G(Ee,"DataView"),Mo=G(Ee,"Map"),xf=G(Ee,"Promise"),Va=G(Ee,"Set"),Fo=G(Ee,"WeakMap"),ko=G(Er,"create"),ms=Fo&&new Fo,Mn={},dc=pr(yf),Fd=pr(Mo),Ji=pr(xf),Ml=pr(Va),$a=pr(Fo),Za=Qi?Qi.prototype:i,Po=Za?Za.valueOf:i,Fl=Za?Za.toString:i;function S(e){if(nn(e)&&!Jt(e)&&!(e instanceof cr)){if(e instanceof oi)return e;if(gr.call(e,"__wrapped__"))return jr(e)}return new oi(e)}var Xa=function(){function e(){}return function(r){if(!rn(r))return{};if(Wa)return Wa(r);e.prototype=r;var o=new e;return e.prototype=i,o}}();function gs(){}function oi(e,r){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!r,this.__index__=0,this.__values__=i}S.templateSettings={escape:ce,evaluate:Et,interpolate:at,variable:"",imports:{_:S}},S.prototype=gs.prototype,S.prototype.constructor=S,oi.prototype=Xa(gs.prototype),oi.prototype.constructor=oi;function cr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Wt,this.__views__=[]}function kd(){var e=new cr(this.__wrapped__);return e.__actions__=kn(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=kn(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=kn(this.__views__),e}function Pd(){if(this.__filtered__){var e=new cr(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Nd(){var e=this.__wrapped__.value(),r=this.__dir__,o=Jt(e),c=r<0,_=o?e.length:0,L=Le(0,_,this.__views__),z=L.start,$=L.end,ie=$-z,Fe=c?$:z-1,Pe=this.__iteratees__,ze=Pe.length,vt=0,Rt=In(ie,this.__takeCount__);if(!o||!c&&_==ie&&Rt==ie)return Ls(e,this.__actions__);var Yt=[];e:for(;ie--&&vt<Rt;){Fe+=r;for(var or=-1,Ht=e[Fe];++or<ze;){var _r=Pe[or],yr=_r.iteratee,Li=_r.type,ei=yr(Ht);if(Li==Ot)Ht=ei;else if(!ei){if(Li==Re)continue e;break e}}Yt[vt++]=Ht}return Yt}cr.prototype=Xa(gs.prototype),cr.prototype.constructor=cr;function qa(e){var r=-1,o=e==null?0:e.length;for(this.clear();++r<o;){var c=e[r];this.set(c[0],c[1])}}function Bd(){this.__data__=ko?ko(null):{},this.size=0}function vc(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}function _c(e){var r=this.__data__;if(ko){var o=r[e];return o===v?i:o}return gr.call(r,e)?r[e]:i}function Gd(e){var r=this.__data__;return ko?r[e]!==i:gr.call(r,e)}function Ud(e,r){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=ko&&r===i?v:r,this}qa.prototype.clear=Bd,qa.prototype.delete=vc,qa.prototype.get=_c,qa.prototype.has=Gd,qa.prototype.set=Ud;function bi(e){var r=-1,o=e==null?0:e.length;for(this.clear();++r<o;){var c=e[r];this.set(c[0],c[1])}}function bf(){this.__data__=[],this.size=0}function Yd(e){var r=this.__data__,o=ga(r,e);if(o<0)return!1;var c=r.length-1;return o==c?r.pop():_s.call(r,o,1),--this.size,!0}function Hd(e){var r=this.__data__,o=ga(r,e);return o<0?i:r[o][1]}function zd(e){return ga(this.__data__,e)>-1}function Wd(e,r){var o=this.__data__,c=ga(o,e);return c<0?(++this.size,o.push([e,r])):o[c][1]=r,this}bi.prototype.clear=bf,bi.prototype.delete=Yd,bi.prototype.get=Hd,bi.prototype.has=zd,bi.prototype.set=Wd;function ea(e){var r=-1,o=e==null?0:e.length;for(this.clear();++r<o;){var c=e[r];this.set(c[0],c[1])}}function pc(){this.size=0,this.__data__={hash:new qa,map:new(Mo||bi),string:new qa}}function Vd(e){var r=h(this,e).delete(e);return this.size-=r?1:0,r}function $d(e){return h(this,e).get(e)}function Zd(e){return h(this,e).has(e)}function Xd(e,r){var o=h(this,e),c=o.size;return o.set(e,r),this.size+=o.size==c?0:1,this}ea.prototype.clear=pc,ea.prototype.delete=Vd,ea.prototype.get=$d,ea.prototype.has=Zd,ea.prototype.set=Xd;function Ka(e){var r=-1,o=e==null?0:e.length;for(this.__data__=new ea;++r<o;)this.add(e[r])}function No(e){return this.__data__.set(e,v),this}function qd(e){return this.__data__.has(e)}Ka.prototype.add=Ka.prototype.push=No,Ka.prototype.has=qd;function wi(e){var r=this.__data__=new bi(e);this.size=r.size}function mc(){this.__data__=new bi,this.size=0}function wf(e){var r=this.__data__,o=r.delete(e);return this.size=r.size,o}function gc(e){return this.__data__.get(e)}function kl(e){return this.__data__.has(e)}function Kd(e,r){var o=this.__data__;if(o instanceof bi){var c=o.__data__;if(!Mo||c.length<f-1)return c.push([e,r]),this.size=++o.size,this;o=this.__data__=new ea(c)}return o.set(e,r),this.size=o.size,this}wi.prototype.clear=mc,wi.prototype.delete=wf,wi.prototype.get=gc,wi.prototype.has=kl,wi.prototype.set=Kd;function Pl(e,r){var o=Jt(e),c=!o&&Ns(e),_=!o&&!c&&qo(e),L=!o&&!c&&!_&&Yf(e),z=o||c||_||L,$=z?xl(e.length,Ed):[],ie=$.length;for(var Fe in e)(r||gr.call(e,Fe))&&!(z&&(Fe=="length"||_&&(Fe=="offset"||Fe=="parent")||L&&(Fe=="buffer"||Fe=="byteLength"||Fe=="byteOffset")||K(Fe,ie)))&&$.push(Fe);return $}function yc(e){var r=e.length;return r?e[Rf(0,r-1)]:i}function jd(e,r){return Lr(kn(e),ja(r,0,e.length))}function Qd(e){return Lr(kn(e))}function Nl(e,r,o){(o!==i&&!oa(e[r],o)||o===i&&!(r in e))&&Xn(e,r,o)}function ys(e,r,o){var c=e[r];(!(gr.call(e,r)&&oa(c,o))||o===i&&!(r in e))&&Xn(e,r,o)}function ga(e,r){for(var o=e.length;o--;)if(oa(e[o][0],r))return o;return-1}function Jd(e,r,o,c){return ki(e,function(_,L,z){r(c,_,o(_),z)}),c}function xs(e,r){return e&&Pi(r,Nn(r),e)}function e0(e,r){return e&&Pi(r,ci(r),e)}function Xn(e,r,o){r=="__proto__"&&ps?ps(e,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[r]=o}function ya(e,r){for(var o=-1,c=r.length,_=ve(c),L=e==null;++o<c;)_[o]=L?i:v0(e,r[o]);return _}function ja(e,r,o){return e===e&&(o!==i&&(e=e<=o?e:o),r!==i&&(e=e>=r?e:r)),e}function Tn(e,r,o,c,_,L){var z,$=r&p,ie=r&U,Fe=r&q;if(o&&(z=_?o(e,c,_,L):o(e)),z!==i)return z;if(!rn(e))return e;var Pe=Jt(e);if(Pe){if(z=Ge(e),!$)return kn(e,z)}else{var ze=fe(e),vt=ze==kt||ze==Nr;if(qo(e))return Cs(e,$);if(ze==ar||ze==lr||vt&&!_){if(z=ie||vt?{}:Be(e),!$)return ie?i0(e,e0(z,e)):n0(e,xs(z,e))}else{if(!Or[ze])return _?e:{};z=We(e,ze,$)}}L||(L=new wi);var Rt=L.get(e);if(Rt)return Rt;L.set(e,z),I_(e)?e.forEach(function(Ht){z.add(Tn(Ht,r,o,Ht,e,L))}):C_(e)&&e.forEach(function(Ht,_r){z.set(_r,Tn(Ht,r,o,_r,e,L))});var Yt=Fe?ie?Bf:Nf:ie?ci:Nn,or=Pe?i:Yt(e);return An(or||e,function(Ht,_r){or&&(_r=Ht,Ht=e[_r]),ys(z,_r,Tn(Ht,r,o,_r,e,L))}),z}function xc(e){var r=Nn(e);return function(o){return Qa(o,e,r)}}function Qa(e,r,o){var c=o.length;if(e==null)return!c;for(e=Er(e);c--;){var _=o[c],L=r[_],z=e[_];if(z===i&&!(_ in e)||!L(z))return!1}return!0}function Sf(e,r,o){if(typeof e!="function")throw new ai(l);return wt(function(){e.apply(i,o)},r)}function Ja(e,r,o,c){var _=-1,L=of,z=!0,$=e.length,ie=[],Fe=r.length;if(!$)return ie;o&&(r=Br(r,jn(o))),c?(L=pl,z=!1):r.length>=f&&(L=va,z=!1,r=new Ka(r));e:for(;++_<$;){var Pe=e[_],ze=o==null?Pe:o(Pe);if(Pe=c||Pe!==0?Pe:0,z&&ze===ze){for(var vt=Fe;vt--;)if(r[vt]===ze)continue e;ie.push(Pe)}else L(r,ze,c)||ie.push(Pe)}return ie}var ki=Jl(si),Af=Jl(bs,!0);function Bl(e,r){var o=!0;return ki(e,function(c,_,L){return o=!!r(c,_,L),o}),o}function eo(e,r,o){for(var c=-1,_=e.length;++c<_;){var L=e[c],z=r(L);if(z!=null&&($===i?z===z&&!Di(z):o(z,$)))var $=z,ie=L}return ie}function bc(e,r,o,c){var _=e.length;for(o=nr(o),o<0&&(o=-o>_?0:_+o),c=c===i||c>_?_:nr(c),c<0&&(c+=_),c=o>c?0:F_(c);o<c;)e[o++]=r;return e}function Gl(e,r){var o=[];return ki(e,function(c,_,L){r(c,_,L)&&o.push(c)}),o}function mn(e,r,o,c,_){var L=-1,z=e.length;for(o||(o=ke),_||(_=[]);++L<z;){var $=e[L];r>0&&o($)?r>1?mn($,r-1,o,c,_):qi(_,$):c||(_[_.length]=$)}return _}var Tf=eu(),Ul=eu(!0);function si(e,r){return e&&Tf(e,r,Nn)}function bs(e,r){return e&&Ul(e,r,Nn)}function ws(e,r){return Fi(r,function(o){return _o(e[o])})}function xa(e,r){r=Si(r,e);for(var o=0,c=r.length;e!=null&&o<c;)e=e[Dr(r[o++])];return o&&o==c?e:i}function Yl(e,r,o){var c=r(e);return Jt(e)?c:qi(c,o(e))}function Fn(e){return e==null?e===i?pi:Jr:pa&&pa in Er(e)?se(e):$e(e)}function Ss(e,r){return e>r}function wc(e,r){return e!=null&&gr.call(e,r)}function Sc(e,r){return e!=null&&r in Er(e)}function Hl(e,r,o){return e>=In(r,o)&&e<qr(r,o)}function As(e,r,o){for(var c=o?pl:of,_=e[0].length,L=e.length,z=L,$=ve(L),ie=1/0,Fe=[];z--;){var Pe=e[z];z&&r&&(Pe=Br(Pe,jn(r))),ie=In(Pe.length,ie),$[z]=!o&&(r||_>=120&&Pe.length>=120)?new Ka(z&&Pe):i}Pe=e[0];var ze=-1,vt=$[0];e:for(;++ze<_&&Fe.length<ie;){var Rt=Pe[ze],Yt=r?r(Rt):Rt;if(Rt=o||Rt!==0?Rt:0,!(vt?va(vt,Yt):c(Fe,Yt,o))){for(z=L;--z;){var or=$[z];if(!(or?va(or,Yt):c(e[z],Yt,o)))continue e}vt&&vt.push(Yt),Fe.push(Rt)}}return Fe}function Ac(e,r,o,c){return si(e,function(_,L,z){r(c,o(_),L,z)}),c}function to(e,r,o){r=Si(r,e),e=It(e,r);var c=e==null?e:e[Dr(Y(r))];return c==null?i:pn(c,e,o)}function zl(e){return nn(e)&&Fn(e)==lr}function Tc(e){return nn(e)&&Fn(e)==Gn}function Wl(e){return nn(e)&&Fn(e)==Mt}function Bo(e,r,o,c,_){return e===r?!0:e==null||r==null||!nn(e)&&!nn(r)?e!==e&&r!==r:Ec(e,r,o,c,Bo,_)}function Ec(e,r,o,c,_,L){var z=Jt(e),$=Jt(r),ie=z?Kt:fe(e),Fe=$?Kt:fe(r);ie=ie==lr?ar:ie,Fe=Fe==lr?ar:Fe;var Pe=ie==ar,ze=Fe==ar,vt=ie==Fe;if(vt&&qo(e)){if(!qo(r))return!1;z=!0,Pe=!1}if(vt&&!Pe)return L||(L=new wi),z||Yf(e)?Nc(e,r,o,c,_,L):f0(e,r,ie,o,c,_,L);if(!(o&D)){var Rt=Pe&&gr.call(e,"__wrapped__"),Yt=ze&&gr.call(r,"__wrapped__");if(Rt||Yt){var or=Rt?e.value():e,Ht=Yt?r.value():r;return L||(L=new wi),_(or,Ht,o,c,L)}}return vt?(L||(L=new wi),l0(e,r,o,c,_,L)):!1}function Vl(e){return nn(e)&&fe(e)==Fr}function Ts(e,r,o,c){var _=o.length,L=_,z=!c;if(e==null)return!L;for(e=Er(e);_--;){var $=o[_];if(z&&$[2]?$[1]!==e[$[0]]:!($[0]in e))return!1}for(;++_<L;){$=o[_];var ie=$[0],Fe=e[ie],Pe=$[1];if(z&&$[2]){if(Fe===i&&!(ie in e))return!1}else{var ze=new wi;if(c)var vt=c(Fe,Pe,ie,e,r,ze);if(!(vt===i?Bo(Pe,Fe,D|pe,c,ze):vt))return!1}}return!0}function Go(e){if(!rn(e)||Qe(e))return!1;var r=_o(e)?uc:qh;return r.test(pr(e))}function Dc(e){return nn(e)&&Fn(e)==Ln}function Ef(e){return nn(e)&&fe(e)==en}function ta(e){return nn(e)&&Vc(e.length)&&!!Cr[Fn(e)]}function Uo(e){return typeof e=="function"?e:e==null?hi:typeof e=="object"?Jt(e)?Sa(e[0],e[1]):wa(e):V_(e)}function ra(e){if(!pt(e))return Md(e);var r=[];for(var o in Er(e))gr.call(e,o)&&o!="constructor"&&r.push(o);return r}function Es(e){if(!rn(e))return Me(e);var r=pt(e),o=[];for(var c in e)c=="constructor"&&(r||!gr.call(e,c))||o.push(c);return o}function ro(e,r){return e<r}function ba(e,r){var o=-1,c=ui(e)?ve(e.length):[];return ki(e,function(_,L,z){c[++o]=r(_,L,z)}),c}function wa(e){var r=T(e);return r.length==1&&r[0][2]?ge(r[0][0],r[0][1]):function(o){return o===e||Ts(o,e,r)}}function Sa(e,r){return Oe(e)&&xe(r)?ge(Dr(e),r):function(o){var c=v0(o,e);return c===i&&c===r?_0(o,e):Bo(r,c,D|pe)}}function no(e,r,o,c,_){e!==r&&Tf(r,function(L,z){if(_||(_=new wi),rn(L))Df(e,r,z,o,no,c,_);else{var $=c?c(Ke(e,z),L,z+"",e,r,_):i;$===i&&($=L),Nl(e,z,$)}},ci)}function Df(e,r,o,c,_,L,z){var $=Ke(e,o),ie=Ke(r,o),Fe=z.get(ie);if(Fe){Nl(e,o,Fe);return}var Pe=L?L($,ie,o+"",e,r,z):i,ze=Pe===i;if(ze){var vt=Jt(ie),Rt=!vt&&qo(ie),Yt=!vt&&!Rt&&Yf(ie);Pe=ie,vt||Rt||Yt?Jt($)?Pe=$:cn($)?Pe=kn($):Rt?(ze=!1,Pe=Cs(ie,!0)):Yt?(ze=!1,Pe=Zo(ie,!0)):Pe=[]:ou(ie)||Ns(ie)?(Pe=$,Ns($)?Pe=k_($):(!rn($)||_o($))&&(Pe=Be(ie))):ze=!1}ze&&(z.set(ie,Pe),_(Pe,ie,c,L,z),z.delete(ie)),Nl(e,o,Pe)}function Yo(e,r){var o=e.length;if(!!o)return r+=r<0?o:0,K(r,o)?e[r]:i}function Lf(e,r,o){r.length?r=Br(r,function(L){return Jt(L)?function(z){return xa(z,L.length===1?L[0]:L)}:L}):r=[hi];var c=-1;r=Br(r,jn(Bt()));var _=ba(e,function(L,z,$){var ie=Br(r,function(Fe){return Fe(L)});return{criteria:ie,index:++c,value:L}});return yl(_,function(L,z){return Fs(L,z,o)})}function $l(e,r){return io(e,r,function(o,c){return _0(e,c)})}function io(e,r,o){for(var c=-1,_=r.length,L={};++c<_;){var z=r[c],$=xa(e,z);o($,z)&&Ds(L,Si(z,e),$)}return L}function Ho(e){return function(r){return xa(r,e)}}function Zl(e,r,o,c){var _=c?Ya:Ki,L=-1,z=r.length,$=e;for(e===r&&(r=kn(r)),o&&($=Br(e,jn(o)));++L<z;)for(var ie=0,Fe=r[L],Pe=o?o(Fe):Fe;(ie=_($,Pe,ie,c))>-1;)$!==e&&_s.call($,ie,1),_s.call(e,ie,1);return e}function Lc(e,r){for(var o=e?r.length:0,c=o-1;o--;){var _=r[o];if(o==c||_!==L){var L=_;K(_)?_s.call(e,_,1):Kl(e,_)}}return e}function Rf(e,r){return e+Io(Il()*(r-e+1))}function Rc(e,r,o,c){for(var _=-1,L=qr(pf((r-e)/(o||1)),0),z=ve(L);L--;)z[c?L:++_]=e,e+=o;return z}function Cf(e,r){var o="";if(!e||r<1||r>Ze)return o;do r%2&&(o+=e),r=Io(r/2),r&&(e+=e);while(r);return o}function rr(e,r){return Ct(qe(e,r,hi),e+"")}function zo(e){return yc(Hf(e))}function Xl(e,r){var o=Hf(e);return Lr(o,ja(r,0,o.length))}function Ds(e,r,o,c){if(!rn(e))return e;r=Si(r,e);for(var _=-1,L=r.length,z=L-1,$=e;$!=null&&++_<L;){var ie=Dr(r[_]),Fe=o;if(ie==="__proto__"||ie==="constructor"||ie==="prototype")return e;if(_!=z){var Pe=$[ie];Fe=c?c(Pe,ie,$):i,Fe===i&&(Fe=rn(Pe)?Pe:K(r[_+1])?[]:{})}ys($,ie,Fe),$=$[ie]}return e}var Cc=ms?function(e,r){return ms.set(e,r),e}:hi,Oc=ps?function(e,r){return ps(e,"toString",{configurable:!0,enumerable:!1,value:m0(r),writable:!0})}:hi;function t0(e){return Lr(Hf(e))}function fi(e,r,o){var c=-1,_=e.length;r<0&&(r=-r>_?0:_+r),o=o>_?_:o,o<0&&(o+=_),_=r>o?0:o-r>>>0,r>>>=0;for(var L=ve(_);++c<_;)L[c]=e[c+r];return L}function r0(e,r){var o;return ki(e,function(c,_,L){return o=r(c,_,L),!o}),!!o}function Of(e,r,o){var c=0,_=e==null?c:e.length;if(typeof r=="number"&&r===r&&_<=sr){for(;c<_;){var L=c+_>>>1,z=e[L];z!==null&&!Di(z)&&(o?z<=r:z<r)?c=L+1:_=L}return _}return ql(e,r,hi,o)}function ql(e,r,o,c){var _=0,L=e==null?0:e.length;if(L===0)return 0;r=o(r);for(var z=r!==r,$=r===null,ie=Di(r),Fe=r===i;_<L;){var Pe=Io((_+L)/2),ze=o(e[Pe]),vt=ze!==i,Rt=ze===null,Yt=ze===ze,or=Di(ze);if(z)var Ht=c||Yt;else Fe?Ht=Yt&&(c||vt):$?Ht=Yt&&vt&&(c||!Rt):ie?Ht=Yt&&vt&&!Rt&&(c||!or):Rt||or?Ht=!1:Ht=c?ze<=r:ze<r;Ht?_=Pe+1:L=Pe}return In(L,Qt)}function Ic(e,r){for(var o=-1,c=e.length,_=0,L=[];++o<c;){var z=e[o],$=r?r(z):z;if(!o||!oa($,ie)){var ie=$;L[_++]=z===0?0:z}}return L}function Mc(e){return typeof e=="number"?e:Di(e)?$t:+e}function Qn(e){if(typeof e=="string")return e;if(Jt(e))return Br(e,Qn)+"";if(Di(e))return Fl?Fl.call(e):"";var r=e+"";return r=="0"&&1/e==-Ie?"-0":r}function Aa(e,r,o){var c=-1,_=of,L=e.length,z=!0,$=[],ie=$;if(o)z=!1,_=pl;else if(L>=f){var Fe=r?null:o0(e);if(Fe)return us(Fe);z=!1,_=va,ie=new Ka}else ie=r?[]:$;e:for(;++c<L;){var Pe=e[c],ze=r?r(Pe):Pe;if(Pe=o||Pe!==0?Pe:0,z&&ze===ze){for(var vt=ie.length;vt--;)if(ie[vt]===ze)continue e;r&&ie.push(ze),$.push(Pe)}else _(ie,ze,o)||(ie!==$&&ie.push(ze),$.push(Pe))}return $}function Kl(e,r){return r=Si(r,e),e=It(e,r),e==null||delete e[Dr(Y(r))]}function If(e,r,o,c){return Ds(e,r,o(xa(e,r)),c)}function ao(e,r,o,c){for(var _=e.length,L=c?_:-1;(c?L--:++L<_)&&r(e[L],L,e););return o?fi(e,c?0:L,c?L+1:_):fi(e,c?L+1:0,c?_:L)}function Ls(e,r){var o=e;return o instanceof cr&&(o=o.value()),ml(r,function(c,_){return _.func.apply(_.thisArg,qi([c],_.args))},o)}function Wo(e,r,o){var c=e.length;if(c<2)return c?Aa(e[0]):[];for(var _=-1,L=ve(c);++_<c;)for(var z=e[_],$=-1;++$<c;)$!=_&&(L[_]=Ja(L[_]||z,e[$],r,o));return Aa(mn(L,1),r,o)}function Mf(e,r,o){for(var c=-1,_=e.length,L=r.length,z={};++c<_;){var $=c<L?r[c]:i;o(z,e[c],$)}return z}function Vo(e){return cn(e)?e:[]}function $o(e){return typeof e=="function"?e:hi}function Si(e,r){return Jt(e)?e:Oe(e,r)?[e]:Xt(Rr(e))}var jl=rr;function Ai(e,r,o){var c=e.length;return o=o===i?c:o,!r&&o>=c?e:fi(e,r,o)}var Rs=Rd||function(e){return Sn.clearTimeout(e)};function Cs(e,r){if(r)return e.slice();var o=e.length,c=Rl?Rl(o):new e.constructor(o);return e.copy(c),c}function oo(e){var r=new e.constructor(e.byteLength);return new vs(r).set(new vs(e)),r}function Os(e,r){var o=r?oo(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}function Is(e){var r=new e.constructor(e.source,Kn.exec(e));return r.lastIndex=e.lastIndex,r}function Ms(e){return Po?Er(Po.call(e)):{}}function Zo(e,r){var o=r?oo(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function Ff(e,r){if(e!==r){var o=e!==i,c=e===null,_=e===e,L=Di(e),z=r!==i,$=r===null,ie=r===r,Fe=Di(r);if(!$&&!Fe&&!L&&e>r||L&&z&&ie&&!$&&!Fe||c&&z&&ie||!o&&ie||!_)return 1;if(!c&&!L&&!Fe&&e<r||Fe&&o&&_&&!c&&!L||$&&o&&_||!z&&_||!ie)return-1}return 0}function Fs(e,r,o){for(var c=-1,_=e.criteria,L=r.criteria,z=_.length,$=o.length;++c<z;){var ie=Ff(_[c],L[c]);if(ie){if(c>=$)return ie;var Fe=o[c];return ie*(Fe=="desc"?-1:1)}}return e.index-r.index}function Ta(e,r,o,c){for(var _=-1,L=e.length,z=o.length,$=-1,ie=r.length,Fe=qr(L-z,0),Pe=ve(ie+Fe),ze=!c;++$<ie;)Pe[$]=r[$];for(;++_<z;)(ze||_<L)&&(Pe[o[_]]=e[_]);for(;Fe--;)Pe[$++]=e[_++];return Pe}function Ql(e,r,o,c){for(var _=-1,L=e.length,z=-1,$=o.length,ie=-1,Fe=r.length,Pe=qr(L-$,0),ze=ve(Pe+Fe),vt=!c;++_<Pe;)ze[_]=e[_];for(var Rt=_;++ie<Fe;)ze[Rt+ie]=r[ie];for(;++z<$;)(vt||_<L)&&(ze[Rt+o[z]]=e[_++]);return ze}function kn(e,r){var o=-1,c=e.length;for(r||(r=ve(c));++o<c;)r[o]=e[o];return r}function Pi(e,r,o,c){var _=!o;o||(o={});for(var L=-1,z=r.length;++L<z;){var $=r[L],ie=c?c(o[$],e[$],$,o,e):i;ie===i&&(ie=e[$]),_?Xn(o,$,ie):ys(o,$,ie)}return o}function n0(e,r){return Pi(e,me(e),r)}function i0(e,r){return Pi(e,ae(e),r)}function Ti(e,r){return function(o,c){var _=Jt(o)?tc:Jd,L=r?r():{};return _(o,e,Bt(c,2),L)}}function so(e){return rr(function(r,o){var c=-1,_=o.length,L=_>1?o[_-1]:i,z=_>2?o[2]:i;for(L=e.length>3&&typeof L=="function"?(_--,L):i,z&&oe(o[0],o[1],z)&&(L=_<3?i:L,_=1),r=Er(r);++c<_;){var $=o[c];$&&e(r,$,c,L)}return r})}function Jl(e,r){return function(o,c){if(o==null)return o;if(!ui(o))return e(o,c);for(var _=o.length,L=r?_:-1,z=Er(o);(r?L--:++L<_)&&c(z[L],L,z)!==!1;);return o}}function eu(e){return function(r,o,c){for(var _=-1,L=Er(r),z=c(r),$=z.length;$--;){var ie=z[e?$:++_];if(o(L[ie],ie,L)===!1)break}return r}}function a0(e,r,o){var c=r&ue,_=qn(e);function L(){var z=this&&this!==Sn&&this instanceof L?_:e;return z.apply(c?o:this,arguments)}return L}function tu(e){return function(r){r=Rr(r);var o=za(r)?Yn(r):i,c=o?o[0]:r.charAt(0),_=o?Ai(o,1).join(""):r.slice(1);return c[e]()+_}}function Xo(e){return function(r){return ml(z_(H_(r).replace(dd,"")),e,"")}}function qn(e){return function(){var r=arguments;switch(r.length){case 0:return new e;case 1:return new e(r[0]);case 2:return new e(r[0],r[1]);case 3:return new e(r[0],r[1],r[2]);case 4:return new e(r[0],r[1],r[2],r[3]);case 5:return new e(r[0],r[1],r[2],r[3],r[4]);case 6:return new e(r[0],r[1],r[2],r[3],r[4],r[5]);case 7:return new e(r[0],r[1],r[2],r[3],r[4],r[5],r[6])}var o=Xa(e.prototype),c=e.apply(o,r);return rn(c)?c:o}}function Fc(e,r,o){var c=qn(e);function _(){for(var L=arguments.length,z=ve(L),$=L,ie=uo(_);$--;)z[$]=arguments[$];var Fe=L<3&&z[0]!==ie&&z[L-1]!==ie?[]:ji(z,ie);if(L-=Fe.length,L<o)return ru(e,r,ks,_.placeholder,i,z,Fe,i,i,o-L);var Pe=this&&this!==Sn&&this instanceof _?c:e;return pn(Pe,this,z)}return _}function fo(e){return function(r,o,c){var _=Er(r);if(!ui(r)){var L=Bt(o,3);r=Nn(r),o=function($){return L(_[$],$,_)}}var z=e(r,o,c);return z>-1?_[L?r[z]:z]:i}}function na(e){return Ni(function(r){var o=r.length,c=o,_=oi.prototype.thru;for(e&&r.reverse();c--;){var L=r[c];if(typeof L!="function")throw new ai(l);if(_&&!z&&Gf(L)=="wrapper")var z=new oi([],!0)}for(c=z?c:o;++c<o;){L=r[c];var $=Gf(L),ie=$=="wrapper"?au(L):i;ie&&Se(ie[0])&&ie[1]==(J|g|P|Te)&&!ie[4].length&&ie[9]==1?z=z[Gf(ie[0])].apply(z,ie[3]):z=L.length==1&&Se(L)?z[$]():z.thru(L)}return function(){var Fe=arguments,Pe=Fe[0];if(z&&Fe.length==1&&Jt(Pe))return z.plant(Pe).value();for(var ze=0,vt=o?r[ze].apply(this,Fe):Pe;++ze<o;)vt=r[ze].call(this,vt);return vt}})}function ks(e,r,o,c,_,L,z,$,ie,Fe){var Pe=r&J,ze=r&ue,vt=r&x,Rt=r&(g|b),Yt=r&nt,or=vt?i:qn(e);function Ht(){for(var _r=arguments.length,yr=ve(_r),Li=_r;Li--;)yr[Li]=arguments[Li];if(Rt)var ei=uo(Ht),Ri=Do(yr,ei);if(c&&(yr=Ta(yr,c,_,Rt)),L&&(yr=Ql(yr,L,z,Rt)),_r-=Ri,Rt&&_r<Fe){var hn=ji(yr,ei);return ru(e,r,ks,Ht.placeholder,o,yr,hn,$,ie,Fe-_r)}var sa=ze?o:this,mo=vt?sa[e]:e;return _r=yr.length,$?yr=Lt(yr,$):Yt&&_r>1&&yr.reverse(),Pe&&ie<_r&&(yr.length=ie),this&&this!==Sn&&this instanceof Ht&&(mo=or||qn(mo)),mo.apply(sa,yr)}return Ht}function kf(e,r){return function(o,c){return Ac(o,e,r(c),{})}}function lo(e,r){return function(o,c){var _;if(o===i&&c===i)return r;if(o!==i&&(_=o),c!==i){if(_===i)return c;typeof o=="string"||typeof c=="string"?(o=Qn(o),c=Qn(c)):(o=Mc(o),c=Mc(c)),_=e(o,c)}return _}}function Pf(e){return Ni(function(r){return r=Br(r,jn(Bt())),rr(function(o){var c=this;return e(r,function(_){return pn(_,c,o)})})})}function Hr(e,r){r=r===i?" ":Qn(r);var o=r.length;if(o<2)return o?Cf(r,e):r;var c=Cf(r,pf(e/_a(r)));return za(r)?Ai(Yn(c),0,e).join(""):c.slice(0,e)}function Ea(e,r,o,c){var _=r&ue,L=qn(e);function z(){for(var $=-1,ie=arguments.length,Fe=-1,Pe=c.length,ze=ve(Pe+ie),vt=this&&this!==Sn&&this instanceof z?L:e;++Fe<Pe;)ze[Fe]=c[Fe];for(;ie--;)ze[Fe++]=arguments[++$];return pn(vt,_?o:this,ze)}return z}function zr(e){return function(r,o,c){return c&&typeof c!="number"&&oe(r,o,c)&&(o=c=i),r=po(r),o===i?(o=r,r=0):o=po(o),c=c===i?r<o?1:-1:po(c),Rc(r,o,c,e)}}function En(e){return function(r,o){return typeof r=="string"&&typeof o=="string"||(r=Gi(r),o=Gi(o)),e(r,o)}}function ru(e,r,o,c,_,L,z,$,ie,Fe){var Pe=r&g,ze=Pe?z:i,vt=Pe?i:z,Rt=Pe?L:i,Yt=Pe?i:L;r|=Pe?P:F,r&=~(Pe?F:P),r&A||(r&=~(ue|x));var or=[e,r,_,Rt,ze,Yt,vt,$,ie,Fe],Ht=o.apply(i,or);return Se(e)&&Je(Ht,or),Ht.placeholder=c,Vt(Ht,e,r)}function nu(e){var r=fn[e];return function(o,c){if(o=Gi(o),c=c==null?0:In(nr(c),292),c&&Ol(o)){var _=(Rr(o)+"e").split("e"),L=r(_[0]+"e"+(+_[1]+c));return _=(Rr(L)+"e").split("e"),+(_[0]+"e"+(+_[1]-c))}return r(o)}}var o0=Va&&1/us(new Va([,-0]))[1]==Ie?function(e){return new Va(e)}:x0;function kc(e){return function(r){var o=fe(r);return o==Fr?hf(r):o==en?sc(r):bd(r,e(r))}}function ia(e,r,o,c,_,L,z,$){var ie=r&x;if(!ie&&typeof e!="function")throw new ai(l);var Fe=c?c.length:0;if(Fe||(r&=~(P|F),c=_=i),z=z===i?z:qr(nr(z),0),$=$===i?$:nr($),Fe-=_?_.length:0,r&F){var Pe=c,ze=_;c=_=i}var vt=ie?i:au(e),Rt=[e,r,o,c,_,Pe,ze,L,z,$];if(vt&&Ve(Rt,vt),e=Rt[0],r=Rt[1],o=Rt[2],c=Rt[3],_=Rt[4],$=Rt[9]=Rt[9]===i?ie?0:e.length:qr(Rt[9]-Fe,0),!$&&r&(g|b)&&(r&=~(g|b)),!r||r==ue)var Yt=a0(e,r,o);else r==g||r==b?Yt=Fc(e,r,$):(r==P||r==(ue|P))&&!_.length?Yt=Ea(e,r,o,c):Yt=ks.apply(i,Rt);var or=vt?Cc:Je;return Vt(or(Yt,Rt),e,r)}function iu(e,r,o,c){return e===i||oa(e,Co[o])&&!gr.call(c,o)?r:e}function Pc(e,r,o,c,_,L){return rn(e)&&rn(r)&&(L.set(r,e),no(e,r,i,Pc,L),L.delete(r)),e}function s0(e){return ou(e)?i:e}function Nc(e,r,o,c,_,L){var z=o&D,$=e.length,ie=r.length;if($!=ie&&!(z&&ie>$))return!1;var Fe=L.get(e),Pe=L.get(r);if(Fe&&Pe)return Fe==r&&Pe==e;var ze=-1,vt=!0,Rt=o&pe?new Ka:i;for(L.set(e,r),L.set(r,e);++ze<$;){var Yt=e[ze],or=r[ze];if(c)var Ht=z?c(or,Yt,ze,r,e,L):c(Yt,or,ze,e,r,L);if(Ht!==i){if(Ht)continue;vt=!1;break}if(Rt){if(!sf(r,function(_r,yr){if(!va(Rt,yr)&&(Yt===_r||_(Yt,_r,o,c,L)))return Rt.push(yr)})){vt=!1;break}}else if(!(Yt===or||_(Yt,or,o,c,L))){vt=!1;break}}return L.delete(e),L.delete(r),vt}function f0(e,r,o,c,_,L,z){switch(o){case Tr:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case Gn:return!(e.byteLength!=r.byteLength||!L(new vs(e),new vs(r)));case Gt:case Mt:case Xr:return oa(+e,+r);case Qr:return e.name==r.name&&e.message==r.message;case Ln:case on:return e==r+"";case Fr:var $=hf;case en:var ie=c&D;if($||($=us),e.size!=r.size&&!ie)return!1;var Fe=z.get(e);if(Fe)return Fe==r;c|=pe,z.set(e,r);var Pe=Nc($(e),$(r),c,_,L,z);return z.delete(e),Pe;case E:if(Po)return Po.call(e)==Po.call(r)}return!1}function l0(e,r,o,c,_,L){var z=o&D,$=Nf(e),ie=$.length,Fe=Nf(r),Pe=Fe.length;if(ie!=Pe&&!z)return!1;for(var ze=ie;ze--;){var vt=$[ze];if(!(z?vt in r:gr.call(r,vt)))return!1}var Rt=L.get(e),Yt=L.get(r);if(Rt&&Yt)return Rt==r&&Yt==e;var or=!0;L.set(e,r),L.set(r,e);for(var Ht=z;++ze<ie;){vt=$[ze];var _r=e[vt],yr=r[vt];if(c)var Li=z?c(yr,_r,vt,r,e,L):c(_r,yr,vt,e,r,L);if(!(Li===i?_r===yr||_(_r,yr,o,c,L):Li)){or=!1;break}Ht||(Ht=vt=="constructor")}if(or&&!Ht){var ei=e.constructor,Ri=r.constructor;ei!=Ri&&"constructor"in e&&"constructor"in r&&!(typeof ei=="function"&&ei instanceof ei&&typeof Ri=="function"&&Ri instanceof Ri)&&(or=!1)}return L.delete(e),L.delete(r),or}function Ni(e){return Ct(qe(e,i,k),e+"")}function Nf(e){return Yl(e,Nn,me)}function Bf(e){return Yl(e,ci,ae)}var au=ms?function(e){return ms.get(e)}:x0;function Gf(e){for(var r=e.name+"",o=Mn[r],c=gr.call(Mn,r)?o.length:0;c--;){var _=o[c],L=_.func;if(L==null||L==e)return _.name}return r}function uo(e){var r=gr.call(S,"placeholder")?S:e;return r.placeholder}function Bt(){var e=S.iteratee||g0;return e=e===g0?Uo:e,arguments.length?e(arguments[0],arguments[1]):e}function h(e,r){var o=e.__data__;return rt(r)?o[typeof r=="string"?"string":"hash"]:o.map}function T(e){for(var r=Nn(e),o=r.length;o--;){var c=r[o],_=e[c];r[o]=[c,_,xe(_)]}return r}function G(e,r){var o=Al(e,r);return Go(o)?o:i}function se(e){var r=gr.call(e,pa),o=e[pa];try{e[pa]=i;var c=!0}catch{}var _=Hn.call(e);return c&&(r?e[pa]=o:delete e[pa]),_}var me=mf?function(e){return e==null?[]:(e=Er(e),Fi(mf(e),function(r){return ln.call(e,r)}))}:b0,ae=mf?function(e){for(var r=[];e;)qi(r,me(e)),e=_f(e);return r}:b0,fe=Fn;(yf&&fe(new yf(new ArrayBuffer(1)))!=Tr||Mo&&fe(new Mo)!=Fr||xf&&fe(xf.resolve())!=Pt||Va&&fe(new Va)!=en||Fo&&fe(new Fo)!=vn)&&(fe=function(e){var r=Fn(e),o=r==ar?e.constructor:i,c=o?pr(o):"";if(c)switch(c){case dc:return Tr;case Fd:return Fr;case Ji:return Pt;case Ml:return en;case $a:return vn}return r});function Le(e,r,o){for(var c=-1,_=o.length;++c<_;){var L=o[c],z=L.size;switch(L.type){case"drop":e+=z;break;case"dropRight":r-=z;break;case"take":r=In(r,e+z);break;case"takeRight":e=qr(e,r-z);break}}return{start:e,end:r}}function De(e){var r=e.match(Na);return r?r[1].split(Ba):[]}function Ne(e,r,o){r=Si(r,e);for(var c=-1,_=r.length,L=!1;++c<_;){var z=Dr(r[c]);if(!(L=e!=null&&o(e,z)))break;e=e[z]}return L||++c!=_?L:(_=e==null?0:e.length,!!_&&Vc(_)&&K(z,_)&&(Jt(e)||Ns(e)))}function Ge(e){var r=e.length,o=new e.constructor(r);return r&&typeof e[0]=="string"&&gr.call(e,"index")&&(o.index=e.index,o.input=e.input),o}function Be(e){return typeof e.constructor=="function"&&!pt(e)?Xa(_f(e)):{}}function We(e,r,o){var c=e.constructor;switch(r){case Gn:return oo(e);case Gt:case Mt:return new c(+e);case Tr:return Os(e,o);case Rn:case Un:case C:case Ue:case Xe:case dt:case Z:case we:case m:return Zo(e,o);case Fr:return new c;case Xr:case on:return new c(e);case Ln:return Is(e);case en:return new c;case E:return Ms(e)}}function Ce(e,r){var o=r.length;if(!o)return e;var c=o-1;return r[c]=(o>1?"& ":"")+r[c],r=r.join(o>2?", ":" "),e.replace(Cn,`{
18
20
  /* [wrapped with `+r+`] */
19
- `)}function ke(e){return Jt(e)||Os(e)||!!(Sl&&e&&e[Sl])}function K(e,r){var a=typeof e;return r=r==null?Ze:r,!!r&&(a=="number"||a!="symbol"&&Bh.test(e))&&e>-1&&e%1==0&&e<r}function oe(e,r,a){if(!tn(a))return!1;var c=typeof r;return(c=="number"?si(a)&&K(r,a.length):c=="string"&&r in a)?ra(a[r],e):!1}function Oe(e,r){if(Jt(e))return!1;var a=typeof e;return a=="number"||a=="symbol"||a=="boolean"||e==null||Ai(e)?!0:ur.test(e)||!mt.test(e)||r!=null&&e in Er(r)}function rt(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function Se(e){var r=Mf(e),a=S[r];if(typeof a!="function"||!(r in cr.prototype))return!1;if(e===a)return!0;var c=Ql(a);return!!c&&e===c[0]}function Qe(e){return!!os&&os in e}var je=sf?uo:l0;function pt(e){var r=e&&e.constructor,a=typeof r=="function"&&r.prototype||Eo;return e===a}function be(e){return e===e&&!tn(e)}function ge(e,r){return function(a){return a==null?!1:a[e]===r&&(r!==i||e in Er(a))}}function lt(e){var r=Mc(e,function(c){return a.size===M&&a.clear(),c}),a=r.cache;return r}function Ve(e,r){var a=e[1],c=r[1],_=a|c,L=_<(ue|b|J),z=c==J&&a==g||c==J&&a==Te&&e[7].length<=r[8]||c==(J|Te)&&r[7].length<=r[8]&&a==g;if(!(L||z))return e;c&ue&&(e[2]=r[2],_|=a&ue?0:A);var $=r[3];if($){var ie=e[3];e[3]=ie?xa(ie,$,r[4]):$,e[4]=ie?Zi(e[3],B):r[4]}return $=r[5],$&&(ie=e[5],e[5]=ie?Vl(ie,$,r[6]):$,e[6]=ie?Zi(e[5],B):r[6]),$=r[7],$&&(e[7]=$),c&J&&(e[8]=e[8]==null?r[8]:Cn(e[8],r[8])),e[9]==null&&(e[9]=r[9]),e[0]=r[0],e[1]=_,e}function Ie(e){var r=[];if(e!=null)for(var a in Er(e))r.push(a);return r}function $e(e){return Un.call(e)}function qe(e,r,a){return r=Xr(r===i?e.length-1:r,0),function(){for(var c=arguments,_=-1,L=Xr(c.length-r,0),z=ve(L);++_<L;)z[_]=c[r+_];_=-1;for(var $=ve(r+1);++_<r;)$[_]=c[_];return $[r]=a(z),_n(e,this,$)}}function Mt(e,r){return r.length<2?e:pa(e,ai(r,0,-1))}function Lt(e,r){for(var a=e.length,c=Cn(r.length,a),_=In(e);c--;){var L=r[c];e[c]=K(L,a)?_[L]:i}return e}function Ke(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}var Je=Mr(yc),wt=gd||function(e,r){return xn.setTimeout(e,r)},Ct=Mr(bc);function Vt(e,r,a){var c=r+"";return Ct(e,Ce(c,qr(De(c),a)))}function Mr(e){var r=0,a=0;return function(){var c=da(),_=tt-(c-a);if(a=c,_>0){if(++r>=st)return arguments[0]}else r=0;return e.apply(i,arguments)}}function Lr(e,r){var a=-1,c=e.length,_=c-1;for(r=r===i?c:r;++a<r;){var L=wf(a,_),z=e[L];e[L]=e[a],e[a]=z}return e.length=r,e}var Xt=lt(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(vi,function(a,c,_,L){r.push(_?L.replace(on,"$1"):c||a)}),r});function Dr(e){if(typeof e=="string"||Ai(e))return e;var r=e+"";return r=="0"&&1/e==-Me?"-0":r}function pr(e){if(e!=null){try{return as.call(e)}catch{}try{return e+""}catch{}}return""}function qr(e,r){return wn(xr,function(a){var c="_."+a[0];r&a[1]&&!Qs(e,c)&&e.push(c)}),e.sort()}function Kr(e){if(e instanceof cr)return e.clone();var r=new ni(e.__wrapped__,e.__chain__);return r.__actions__=In(e.__actions__),r.__index__=e.__index__,r.__values__=e.__values__,r}function en(e,r,a){(a?oe(e,r,a):r===i)?r=1:r=Xr(nr(r),0);var c=e==null?0:e.length;if(!c||r<1)return[];for(var _=0,L=0,z=ve(lf(c/r));_<c;)z[L++]=ai(e,_,_+=r);return z}function ln(e){for(var r=-1,a=e==null?0:e.length,c=0,_=[];++r<a;){var L=e[r];L&&(_[c++]=L)}return _}function mn(){var e=arguments.length;if(!e)return[];for(var r=ve(e-1),a=arguments[0],c=e;c--;)r[c-1]=arguments[c];return Vi(Jt(a)?In(a):[a],pn(r,1))}var Wr=rr(function(e,r){return un(e)?qa(e,pn(r,1,un,!0)):[]}),Ut=rr(function(e,r){var a=Y(r);return un(a)&&(a=i),un(e)?qa(e,pn(r,1,un,!0),Bt(a,2)):[]}),gn=rr(function(e,r){var a=Y(r);return un(a)&&(a=i),un(e)?qa(e,pn(r,1,un,!0),i,a):[]});function hr(e,r,a){var c=e==null?0:e.length;return c?(r=a||r===i?1:nr(r),ai(e,r<0?0:r,c)):[]}function At(e,r,a){var c=e==null?0:e.length;return c?(r=a||r===i?1:nr(r),r=c-r,ai(e,0,r<0?0:r)):[]}function qt(e,r){return e&&e.length?to(e,Bt(r,3),!0,!0):[]}function er(e,r){return e&&e.length?to(e,Bt(r,3),!0):[]}function Vr(e,r,a,c){var _=e==null?0:e.length;return _?(a&&typeof a!="number"&&oe(e,r,a)&&(a=0,c=_),uc(e,r,a,c)):[]}function Si(e,r,a){var c=e==null?0:e.length;if(!c)return-1;var _=a==null?0:nr(a);return _<0&&(_=Xr(c+_,0)),xo(e,Bt(r,3),_)}function Sa(e,r,a){var c=e==null?0:e.length;if(!c)return-1;var _=c-1;return a!==i&&(_=nr(a),_=a<0?Xr(c+_,0):Cn(_,c-1)),xo(e,Bt(r,3),_,!0)}function k(e){var r=e==null?0:e.length;return r?pn(e,1):[]}function le(e){var r=e==null?0:e.length;return r?pn(e,Me):[]}function ne(e,r){var a=e==null?0:e.length;return a?(r=r===i?1:nr(r),pn(e,r)):[]}function ft(e){for(var r=-1,a=e==null?0:e.length,c={};++r<a;){var _=e[r];c[_[0]]=_[1]}return c}function zt(e){return e&&e.length?e[0]:i}function R(e,r,a){var c=e==null?0:e.length;if(!c)return-1;var _=a==null?0:nr(a);return _<0&&(_=Xr(c+_,0)),$i(e,r,_)}function y(e){var r=e==null?0:e.length;return r?ai(e,0,-1):[]}var H=rr(function(e){var r=Br(e,Yo);return r.length&&r[0]===e[0]?gs(r):[]}),j=rr(function(e){var r=Y(e),a=Br(e,Yo);return r===Y(a)?r=i:a.pop(),a.length&&a[0]===e[0]?gs(a,Bt(r,2)):[]}),Q=rr(function(e){var r=Y(e),a=Br(e,Yo);return r=typeof r=="function"?r:i,r&&a.pop(),a.length&&a[0]===e[0]?gs(a,i,r):[]});function W(e,r){return e==null?"":ec.call(e,r)}function Y(e){var r=e==null?0:e.length;return r?e[r-1]:i}function X(e,r,a){var c=e==null?0:e.length;if(!c)return-1;var _=c;return a!==i&&(_=nr(a),_=_<0?Xr(c+_,0):Cn(_,c-1)),r===r?yl(e,r,_):xo(e,ef,_,!0)}function O(e,r){return e&&e.length?No(e,nr(r)):i}var N=rr(I);function I(e,r){return e&&e.length&&r&&r.length?Ul(e,r):e}function re(e,r,a){return e&&e.length&&r&&r.length?Ul(e,r,Bt(a,2)):e}function ee(e,r,a){return e&&e.length&&r&&r.length?Ul(e,r,i,a):e}var _e=Fi(function(e,r){var a=e==null?0:e.length,c=_a(e,r);return mc(e,Br(r,function(_){return K(_,a)?+_:_}).sort(Df)),c});function xe(e,r){var a=[];if(!(e&&e.length))return a;var c=-1,_=[],L=e.length;for(r=Bt(r,3);++c<L;){var z=e[c];r(z,c,e)&&(a.push(z),_.push(c))}return mc(e,_),a}function Ye(e){return e==null?e:tc.call(e)}function Dt(e,r,a){var c=e==null?0:e.length;return c?(a&&typeof a!="number"&&oe(e,r,a)?(r=0,a=c):(r=r==null?0:nr(r),a=a===i?c:nr(a)),ai(e,r,a)):[]}function yt(e,r){return Af(e,r)}function ot(e,r,a){return Hl(e,r,Bt(a,2))}function Ae(e,r){var a=e==null?0:e.length;if(a){var c=Af(e,r);if(c<a&&ra(e[c],r))return c}return-1}function he(e,r){return Af(e,r,!0)}function ht(e,r,a){return Hl(e,r,Bt(a,2),!0)}function ct(e,r){var a=e==null?0:e.length;if(a){var c=Af(e,r,!0)-1;if(ra(e[c],r))return c}return-1}function Tt(e){return e&&e.length?xc(e):[]}function vr(e,r){return e&&e.length?xc(e,Bt(r,2)):[]}function yn(e){var r=e==null?0:e.length;return r?ai(e,1,r):[]}function so(e,r,a){return e&&e.length?(r=a||r===i?1:nr(r),ai(e,0,r<0?0:r)):[]}function ta(e,r,a){var c=e==null?0:e.length;return c?(r=a||r===i?1:nr(r),r=c-r,ai(e,r<0?0:r,c)):[]}function ki(e,r){return e&&e.length?to(e,Bt(r,3),!1,!0):[]}function Aa(e,r){return e&&e.length?to(e,Bt(r,3)):[]}var fo=rr(function(e){return ba(pn(e,1,un,!0))}),Dc=rr(function(e){var r=Y(e);return un(r)&&(r=i),ba(pn(e,1,un,!0),Bt(r,2))}),jn=rr(function(e){var r=Y(e);return r=typeof r=="function"?r:i,ba(pn(e,1,un,!0),i,r)});function lo(e){return e&&e.length?ba(e):[]}function oi(e,r){return e&&e.length?ba(e,Bt(r,2)):[]}function Lc(e,r){return r=typeof r=="function"?r:i,e&&e.length?ba(e,i,r):[]}function Fn(e){if(!(e&&e.length))return[];var r=0;return e=Oi(e,function(a){if(un(a))return r=Xr(a.length,r),!0}),dl(r,function(a){return Br(e,Ba(a))})}function Cs(e,r){if(!(e&&e.length))return[];var a=Fn(e);return r==null?a:Br(a,function(c){return _n(r,i,c)})}var If=rr(function(e,r){return un(e)?qa(e,r):[]}),eb=rr(function(e){return Uo(Oi(e,un))}),tb=rr(function(e){var r=Y(e);return un(r)&&(r=i),Uo(Oi(e,un),Bt(r,2))}),rb=rr(function(e){var r=Y(e);return r=typeof r=="function"?r:i,Uo(Oi(e,un),i,r)}),nb=rr(Fn);function ib(e,r){return Ef(e||[],r||[],ds)}function ab(e,r){return Ef(e||[],r||[],xs)}var ob=rr(function(e){var r=e.length,a=r>1?e[r-1]:i;return a=typeof a=="function"?(e.pop(),a):i,Cs(e,a)});function Zv(e){var r=S(e);return r.__chain__=!0,r}function sb(e,r){return r(e),e}function Rc(e,r){return r(e)}var fb=Fi(function(e){var r=e.length,a=r?e[0]:0,c=this.__wrapped__,_=function(L){return _a(L,e)};return r>1||this.__actions__.length||!(c instanceof cr)||!K(a)?this.thru(_):(c=c.slice(a,+a+(r?1:0)),c.__actions__.push({func:Rc,args:[_],thisArg:i}),new ni(c,this.__chain__).thru(function(L){return r&&!L.length&&L.push(i),L}))});function lb(){return Zv(this)}function ub(){return new ni(this.value(),this.__chain__)}function cb(){this.__values__===i&&(this.__values__=s_(this.value()));var e=this.__index__>=this.__values__.length,r=e?i:this.__values__[this.__index__++];return{done:e,value:r}}function hb(){return this}function db(e){for(var r,a=this;a instanceof hs;){var c=Kr(a);c.__index__=0,c.__values__=i,r?_.__wrapped__=c:r=c;var _=c;a=a.__wrapped__}return _.__wrapped__=e,r}function vb(){var e=this.__wrapped__;if(e instanceof cr){var r=e;return this.__actions__.length&&(r=new cr(this)),r=r.reverse(),r.__actions__.push({func:Rc,args:[Ye],thisArg:i}),new ni(r,this.__chain__)}return this.thru(Ye)}function _b(){return ws(this.__wrapped__,this.__actions__)}var pb=wi(function(e,r,a){gr.call(e,a)?++e[a]:$n(e,a,1)});function mb(e,r,a){var c=Jt(e)?la:Ol;return a&&oe(e,r,a)&&(r=i),c(e,Bt(r,3))}function gb(e,r){var a=Jt(e)?Oi:Ml;return a(e,Bt(r,3))}var yb=io(Si),bb=io(Sa);function xb(e,r){return pn(Cc(e,r),1)}function wb(e,r){return pn(Cc(e,r),Me)}function Sb(e,r,a){return a=a===i?1:nr(a),pn(Cc(e,r),a)}function Xv(e,r){var a=Jt(e)?wn:Mi;return a(e,Bt(r,3))}function qv(e,r){var a=Jt(e)?Vu:mf;return a(e,Bt(r,3))}var Ab=wi(function(e,r,a){gr.call(e,a)?e[a].push(r):$n(e,a,[r])});function Tb(e,r,a,c){e=si(e)?e:kf(e),a=a&&!c?nr(a):0;var _=e.length;return a<0&&(a=Xr(_+a,0)),kc(e)?a<=_&&e.indexOf(r,a)>-1:!!_&&$i(e,r,a)>-1}var Eb=rr(function(e,r,a){var c=-1,_=typeof r=="function",L=si(e)?ve(e.length):[];return Mi(e,function(z){L[++c]=_?_n(r,z,a):ja(z,r,a)}),L}),Db=wi(function(e,r,a){$n(e,a,r)});function Cc(e,r){var a=Jt(e)?Br:ma;return a(e,Bt(r,3))}function Lb(e,r,a,c){return e==null?[]:(Jt(r)||(r=r==null?[]:[r]),a=c?i:a,Jt(a)||(a=a==null?[]:[a]),xf(e,r,a))}var Rb=wi(function(e,r,a){e[a?0:1].push(r)},function(){return[[],[]]});function Cb(e,r,a){var c=Jt(e)?ul:cl,_=arguments.length<3;return c(e,Bt(r,4),a,_,Mi)}function Ob(e,r,a){var c=Jt(e)?od:cl,_=arguments.length<3;return c(e,Bt(r,4),a,_,mf)}function Mb(e,r){var a=Jt(e)?Oi:Ml;return a(e,Ic(Bt(r,3)))}function Ib(e){var r=Jt(e)?fc:Go;return r(e)}function Fb(e,r,a){(a?oe(e,r,a):r===i)?r=1:r=nr(r);var c=Jt(e)?Bd:Yl;return c(e,r)}function kb(e){var r=Jt(e)?Gd:Hd;return r(e)}function Pb(e){if(e==null)return 0;if(si(e))return kc(e)?ca(e):e.length;var r=fe(e);return r==Fr||r==Jr?e.size:Qi(e).length}function Nb(e,r,a){var c=Jt(e)?Js:zd;return a&&oe(e,r,a)&&(r=i),c(e,Bt(r,3))}var Bb=rr(function(e,r){if(e==null)return[];var a=r.length;return a>1&&oe(e,r[0],r[1])?r=[]:a>2&&oe(r[0],r[1],r[2])&&(r=[r[0]]),xf(e,pn(r,1),[])}),Oc=md||function(){return xn.Date.now()};function Gb(e,r){if(typeof r!="function")throw new ri(l);return e=nr(e),function(){if(--e<1)return r.apply(this,arguments)}}function Kv(e,r,a){return r=a?i:r,r=e&&r==null?e.length:r,ea(e,J,i,i,i,i,r)}function jv(e,r){var a;if(typeof r!="function")throw new ri(l);return e=nr(e),function(){return--e>0&&(a=r.apply(this,arguments)),e<=1&&(r=i),a}}var jd=rr(function(e,r,a){var c=ue;if(a.length){var _=Zi(a,oo(jd));c|=P}return ea(e,c,r,a,_)}),Qv=rr(function(e,r,a){var c=ue|b;if(a.length){var _=Zi(a,oo(Qv));c|=P}return ea(r,c,e,a,_)});function Jv(e,r,a){r=a?i:r;var c=ea(e,g,i,i,i,i,i,r);return c.placeholder=Jv.placeholder,c}function e_(e,r,a){r=a?i:r;var c=ea(e,x,i,i,i,i,i,r);return c.placeholder=e_.placeholder,c}function t_(e,r,a){var c,_,L,z,$,ie,Fe=0,Pe=!1,ze=!1,vt=!0;if(typeof e!="function")throw new ri(l);r=Pi(r)||0,tn(a)&&(Pe=!!a.leading,ze="maxWait"in a,L=ze?Xr(Pi(a.maxWait)||0,r):L,vt="trailing"in a?!!a.trailing:vt);function Rt(cn){var na=c,ho=_;return c=_=i,Fe=cn,z=e.apply(ho,na),z}function Yt(cn){return Fe=cn,$=wt(_r,r),Pe?Rt(cn):z}function or(cn){var na=cn-ie,ho=cn-Fe,b_=r-na;return ze?Cn(b_,L-ho):b_}function Ht(cn){var na=cn-ie,ho=cn-Fe;return ie===i||na>=r||na<0||ze&&ho>=L}function _r(){var cn=Oc();if(Ht(cn))return yr(cn);$=wt(_r,or(cn))}function yr(cn){return $=i,vt&&c?Rt(cn):(c=_=i,z)}function Ti(){$!==i&&Ss($),Fe=0,c=ie=_=$=i}function Qn(){return $===i?z:yr(Oc())}function Ei(){var cn=Oc(),na=Ht(cn);if(c=arguments,_=this,ie=cn,na){if($===i)return Yt(ie);if(ze)return Ss($),$=wt(_r,r),Rt(ie)}return $===i&&($=wt(_r,r)),z}return Ei.cancel=Ti,Ei.flush=Qn,Ei}var Ub=rr(function(e,r){return pf(e,1,r)}),Yb=rr(function(e,r,a){return pf(e,Pi(r)||0,a)});function Hb(e){return ea(e,nt)}function Mc(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new ri(l);var a=function(){var c=arguments,_=r?r.apply(this,c):c[0],L=a.cache;if(L.has(_))return L.get(_);var z=e.apply(this,c);return a.cache=L.set(_,z)||L,z};return a.cache=new(Mc.Cache||Ki),a}Mc.Cache=Ki;function Ic(e){if(typeof e!="function")throw new ri(l);return function(){var r=arguments;switch(r.length){case 0:return!e.call(this);case 1:return!e.call(this,r[0]);case 2:return!e.call(this,r[0],r[1]);case 3:return!e.call(this,r[0],r[1],r[2])}return!e.apply(this,r)}}function zb(e){return jv(2,e)}var Wb=Wl(function(e,r){r=r.length==1&&Jt(r[0])?Br(r[0],qn(Bt())):Br(pn(r,1),qn(Bt()));var a=r.length;return rr(function(c){for(var _=-1,L=Cn(c.length,a);++_<L;)c[_]=r[_].call(this,c[_]);return _n(e,this,c)})}),Qd=rr(function(e,r){var a=Zi(r,oo(Qd));return ea(e,P,i,r,a)}),r_=rr(function(e,r){var a=Zi(r,oo(r_));return ea(e,F,i,r,a)}),Vb=Fi(function(e,r){return ea(e,Te,i,i,i,r)});function $b(e,r){if(typeof e!="function")throw new ri(l);return r=r===i?r:nr(r),rr(e,r)}function Zb(e,r){if(typeof e!="function")throw new ri(l);return r=r==null?0:Xr(nr(r),0),rr(function(a){var c=a[r],_=xi(a,0,r);return c&&Vi(_,c),_n(e,this,_)})}function Xb(e,r,a){var c=!0,_=!0;if(typeof e!="function")throw new ri(l);return tn(a)&&(c="leading"in a?!!a.leading:c,_="trailing"in a?!!a.trailing:_),t_(e,r,{leading:c,maxWait:r,trailing:_})}function qb(e){return Kv(e,1)}function Kb(e,r){return Qd(Ho(r),e)}function jb(){if(!arguments.length)return[];var e=arguments[0];return Jt(e)?e:[e]}function Qb(e){return Sn(e,q)}function Jb(e,r){return r=typeof r=="function"?r:i,Sn(e,q,r)}function ex(e){return Sn(e,p|q)}function tx(e,r){return r=typeof r=="function"?r:i,Sn(e,p|q,r)}function rx(e,r){return r==null||Xa(e,r,kn(r))}function ra(e,r){return e===r||e!==e&&r!==r}var nx=An(ms),ix=An(function(e,r){return e>=r}),Os=Pl(function(){return arguments}())?Pl:function(e){return rn(e)&&gr.call(e,"callee")&&!fn.call(e,"callee")},Jt=ve.isArray,ax=Uu?qn(Uu):vc;function si(e){return e!=null&&Fc(e.length)&&!uo(e)}function un(e){return rn(e)&&si(e)}function ox(e){return e===!0||e===!1||rn(e)&&Mn(e)==Gt}var Vo=yd||l0,sx=Wi?qn(Wi):Nl;function fx(e){return rn(e)&&e.nodeType===1&&!Jl(e)}function lx(e){if(e==null)return!0;if(si(e)&&(Jt(e)||typeof e=="string"||typeof e.splice=="function"||Vo(e)||Ff(e)||Os(e)))return!e.length;var r=fe(e);if(r==Fr||r==Jr)return!e.size;if(pt(e))return!Qi(e).length;for(var a in e)if(gr.call(e,a))return!1;return!0}function ux(e,r){return Fo(e,r)}function cx(e,r,a){a=typeof a=="function"?a:i;var c=a?a(e,r):i;return c===i?Fo(e,r,i,a):!!c}function Jd(e){if(!rn(e))return!1;var r=Mn(e);return r==jr||r==hn||typeof e.message=="string"&&typeof e.name=="string"&&!Jl(e)}function hx(e){return typeof e=="number"&&Al(e)}function uo(e){if(!tn(e))return!1;var r=Mn(e);return r==kt||r==Nr||r==wr||r==Tn}function n_(e){return typeof e=="number"&&e==nr(e)}function Fc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ze}function tn(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}function rn(e){return e!=null&&typeof e=="object"}var i_=Yu?qn(Yu):Bl;function dx(e,r){return e===r||ys(e,r,T(r))}function vx(e,r,a){return a=typeof a=="function"?a:i,ys(e,r,T(r),a)}function _x(e){return a_(e)&&e!=+e}function px(e){if(je(e))throw new Zt(s);return ko(e)}function mx(e){return e===null}function gx(e){return e==null}function a_(e){return typeof e=="number"||rn(e)&&Mn(e)==Zr}function Jl(e){if(!rn(e)||Mn(e)!=ar)return!1;var r=ff(e);if(r===null)return!0;var a=gr.call(r,"constructor")&&r.constructor;return typeof a=="function"&&a instanceof a&&as.call(a)==Do}var e0=Hu?qn(Hu):pc;function yx(e){return n_(e)&&e>=-Ze&&e<=Ze}var o_=bo?qn(bo):yf;function kc(e){return typeof e=="string"||!Jt(e)&&rn(e)&&Mn(e)==an}function Ai(e){return typeof e=="symbol"||rn(e)&&Mn(e)==E}var Ff=zu?qn(zu):ji;function bx(e){return e===i}function xx(e){return rn(e)&&fe(e)==dn}function wx(e){return rn(e)&&Mn(e)==zi}var Sx=An(Qa),Ax=An(function(e,r){return e<=r});function s_(e){if(!e)return[];if(si(e))return kc(e)?Gn(e):In(e);if(mi&&e[mi])return qu(e[mi]());var r=fe(e),a=r==Fr?af:r==Jr?is:kf;return a(e)}function co(e){if(!e)return e===0?e:0;if(e=Pi(e),e===Me||e===-Me){var r=e<0?-1:1;return r*St}return e===e?e:0}function nr(e){var r=co(e),a=r%1;return r===r?a?r-a:r:0}function f_(e){return e?Za(nr(e),0,Wt):0}function Pi(e){if(typeof e=="number")return e;if(Ai(e))return $t;if(tn(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=tn(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=Zu(e);var a=kh.test(e);return a||Nh.test(e)?js(e.slice(2),a?2:8):Ws.test(e)?$t:+e}function l_(e){return Ii(e,fi(e))}function Tx(e){return e?Za(nr(e),-Ze,Ze):e===0?e:0}function Rr(e){return e==null?"":Kn(e)}var Ex=no(function(e,r){if(pt(r)||si(r)){Ii(r,kn(r),e);return}for(var a in r)gr.call(r,a)&&ds(e,a,r[a])}),u_=no(function(e,r){Ii(r,fi(r),e)}),Pc=no(function(e,r,a,c){Ii(r,fi(r),e,c)}),Dx=no(function(e,r,a,c){Ii(r,kn(r),e,c)}),Lx=Fi(_a);function Rx(e,r){var a=Wa(e);return r==null?a:vs(a,r)}var Cx=rr(function(e,r){e=Er(e);var a=-1,c=r.length,_=c>2?r[2]:i;for(_&&oe(r[0],r[1],_)&&(c=1);++a<c;)for(var L=r[a],z=fi(L),$=-1,ie=z.length;++$<ie;){var Fe=z[$],Pe=e[Fe];(Pe===i||ra(Pe,Eo[Fe])&&!gr.call(e,Fe))&&(e[Fe]=L[Fe])}return e}),Ox=rr(function(e){return e.push(i,Tc),_n(c_,i,e)});function Mx(e,r){return pi(e,Bt(r,3),ii)}function Ix(e,r){return pi(e,Bt(r,3),_s)}function Fx(e,r){return e==null?e:gf(e,Bt(r,3),fi)}function kx(e,r){return e==null?e:Il(e,Bt(r,3),fi)}function Px(e,r){return e&&ii(e,Bt(r,3))}function Nx(e,r){return e&&_s(e,Bt(r,3))}function Bx(e){return e==null?[]:ps(e,kn(e))}function Gx(e){return e==null?[]:ps(e,fi(e))}function t0(e,r,a){var c=e==null?i:pa(e,r);return c===i?a:c}function Ux(e,r){return e!=null&&Ne(e,r,cc)}function r0(e,r){return e!=null&&Ne(e,r,hc)}var Yx=Lf(function(e,r,a){r!=null&&typeof r.toString!="function"&&(r=Un.call(r)),e[r]=a},i0(li)),Hx=Lf(function(e,r,a){r!=null&&typeof r.toString!="function"&&(r=Un.call(r)),gr.call(e,r)?e[r].push(a):e[r]=[a]},Bt),zx=rr(ja);function kn(e){return si(e)?Rl(e):Qi(e)}function fi(e){return si(e)?Rl(e,!0):bs(e)}function Wx(e,r){var a={};return r=Bt(r,3),ii(e,function(c,_,L){$n(a,r(c,_,L),c)}),a}function Vx(e,r){var a={};return r=Bt(r,3),ii(e,function(c,_,L){$n(a,_,r(c,_,L))}),a}var $x=no(function(e,r,a){Ja(e,r,a)}),c_=no(function(e,r,a,c){Ja(e,r,a,c)}),Zx=Fi(function(e,r){var a={};if(e==null)return a;var c=!1;r=Br(r,function(L){return L=bi(L,e),c||(c=L.length>1),L}),Ii(e,Of(e),a),c&&(a=Sn(a,p|U|q,Xd));for(var _=r.length;_--;)zl(a,r[_]);return a});function Xx(e,r){return h_(e,Ic(Bt(r)))}var qx=Fi(function(e,r){return e==null?{}:Gl(e,r)});function h_(e,r){if(e==null)return{};var a=Br(Of(e),function(c){return[c]});return r=Bt(r),eo(e,a,function(c,_){return r(c,_[0])})}function Kx(e,r,a){r=bi(r,e);var c=-1,_=r.length;for(_||(_=1,e=i);++c<_;){var L=e==null?i:e[Dr(r[c])];L===i&&(c=_,L=a),e=uo(L)?L.call(e):L}return e}function jx(e,r,a){return e==null?e:xs(e,r,a)}function Qx(e,r,a,c){return c=typeof c=="function"?c:i,e==null?e:xs(e,r,a,c)}var d_=Ac(kn),v_=Ac(fi);function Jx(e,r,a){var c=Jt(e),_=c||Vo(e)||Ff(e);if(r=Bt(r,4),a==null){var L=e&&e.constructor;_?a=c?new L:[]:tn(e)?a=uo(L)?Wa(ff(e)):{}:a={}}return(_?wn:ii)(e,function(z,$,ie){return r(a,z,$,ie)}),a}function e2(e,r){return e==null?!0:zl(e,r)}function t2(e,r,a){return e==null?e:Tf(e,r,Ho(a))}function r2(e,r,a,c){return c=typeof c=="function"?c:i,e==null?e:Tf(e,r,Ho(a),c)}function kf(e){return e==null?[]:ns(e,kn(e))}function n2(e){return e==null?[]:ns(e,fi(e))}function i2(e,r,a){return a===i&&(a=r,r=i),a!==i&&(a=Pi(a),a=a===a?a:0),r!==i&&(r=Pi(r),r=r===r?r:0),Za(Pi(e),r,a)}function a2(e,r,a){return r=co(r),a===i?(a=r,r=0):a=co(a),e=Pi(e),kl(e,r,a)}function o2(e,r,a){if(a&&typeof a!="boolean"&&oe(e,r,a)&&(r=a=i),a===i&&(typeof r=="boolean"?(a=r,r=i):typeof e=="boolean"&&(a=e,e=i)),e===i&&r===i?(e=0,r=1):(e=co(e),r===i?(r=e,e=0):r=co(r)),e>r){var c=e;e=r,r=c}if(a||e%1||r%1){var _=Tl();return Cn(e+_*(r-e+fa("1e-"+((_+"").length-1))),r)}return wf(e,r)}var s2=Wo(function(e,r,a){return r=r.toLowerCase(),e+(a?__(r):r)});function __(e){return n0(Rr(e).toLowerCase())}function p_(e){return e=Rr(e),e&&e.replace(Gh,vl).replace(td,"")}function f2(e,r,a){e=Rr(e),r=Kn(r);var c=e.length;a=a===i?c:Za(nr(a),0,c);var _=a;return a-=r.length,a>=0&&e.slice(a,_)==r}function l2(e){return e=Rr(e),e&&V.test(e)?e.replace(ye,_l):e}function u2(e){return e=Rr(e),e&&dr.test(e)?e.replace(kr,"\\$&"):e}var c2=Wo(function(e,r,a){return e+(a?"-":"")+r.toLowerCase()}),h2=Wo(function(e,r,a){return e+(a?" ":"")+r.toLowerCase()}),d2=Xl("toLowerCase");function v2(e,r,a){e=Rr(e),r=nr(r);var c=r?ca(e):0;if(!r||c>=r)return e;var _=(r-c)/2;return Hr(Lo(_),a)+e+Hr(lf(_),a)}function _2(e,r,a){e=Rr(e),r=nr(r);var c=r?ca(e):0;return r&&c<r?e+Hr(r-c,a):e}function p2(e,r,a){e=Rr(e),r=nr(r);var c=r?ca(e):0;return r&&c<r?Hr(r-c,a)+e:e}function m2(e,r,a){return a||r==null?r=0:r&&(r=+r),cf(Rr(e).replace(Yr,""),r||0)}function g2(e,r,a){return(a?oe(e,r,a):r===i)?r=1:r=nr(r),Sf(Rr(e),r)}function y2(){var e=arguments,r=Rr(e[0]);return e.length<3?r:r.replace(e[1],e[2])}var b2=Wo(function(e,r,a){return e+(a?"_":"")+r.toLowerCase()});function x2(e,r,a){return a&&typeof a!="number"&&oe(e,r,a)&&(r=a=i),a=a===i?Wt:a>>>0,a?(e=Rr(e),e&&(typeof r=="string"||r!=null&&!e0(r))&&(r=Kn(r),!r&&Ga(e))?xi(Gn(e),0,a):e.split(r,a)):[]}var w2=Wo(function(e,r,a){return e+(a?" ":"")+n0(r)});function S2(e,r,a){return e=Rr(e),a=a==null?0:Za(nr(a),0,e.length),r=Kn(r),e.slice(a,a+r.length)==r}function A2(e,r,a){var c=S.templateSettings;a&&oe(e,r,a)&&(r=i),e=Rr(e),r=Pc({},r,c,jl);var _=Pc({},r.imports,c.imports,jl),L=kn(_),z=ns(_,L),$,ie,Fe=0,Pe=r.interpolate||Vs,ze="__p += '",vt=xl((r.escape||Vs).source+"|"+Pe.source+"|"+(Pe===at?_i:Vs).source+"|"+(r.evaluate||Vs).source+"|$","g"),Rt="//# sourceURL="+(gr.call(r,"sourceURL")?(r.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ks+"]")+`
20
- `;e.replace(vt,function(Ht,_r,yr,Ti,Qn,Ei){return yr||(yr=Ti),ze+=e.slice(Fe,Ei).replace(Uh,pl),_r&&($=!0,ze+=`' +
21
+ `)}function ke(e){return Jt(e)||Ns(e)||!!(Cl&&e&&e[Cl])}function K(e,r){var o=typeof e;return r=r==null?Ze:r,!!r&&(o=="number"||o!="symbol"&&jh.test(e))&&e>-1&&e%1==0&&e<r}function oe(e,r,o){if(!rn(o))return!1;var c=typeof r;return(c=="number"?ui(o)&&K(r,o.length):c=="string"&&r in o)?oa(o[r],e):!1}function Oe(e,r){if(Jt(e))return!1;var o=typeof e;return o=="number"||o=="symbol"||o=="boolean"||e==null||Di(e)?!0:ur.test(e)||!mt.test(e)||r!=null&&e in Er(r)}function rt(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function Se(e){var r=Gf(e),o=S[r];if(typeof o!="function"||!(r in cr.prototype))return!1;if(e===o)return!0;var c=au(o);return!!c&&e===c[0]}function Qe(e){return!!hs&&hs in e}var je=vf?_o:w0;function pt(e){var r=e&&e.constructor,o=typeof r=="function"&&r.prototype||Co;return e===o}function xe(e){return e===e&&!rn(e)}function ge(e,r){return function(o){return o==null?!1:o[e]===r&&(r!==i||e in Er(o))}}function lt(e){var r=zc(e,function(c){return o.size===I&&o.clear(),c}),o=r.cache;return r}function Ve(e,r){var o=e[1],c=r[1],_=o|c,L=_<(ue|x|J),z=c==J&&o==g||c==J&&o==Te&&e[7].length<=r[8]||c==(J|Te)&&r[7].length<=r[8]&&o==g;if(!(L||z))return e;c&ue&&(e[2]=r[2],_|=o&ue?0:A);var $=r[3];if($){var ie=e[3];e[3]=ie?Ta(ie,$,r[4]):$,e[4]=ie?ji(e[3],B):r[4]}return $=r[5],$&&(ie=e[5],e[5]=ie?Ql(ie,$,r[6]):$,e[6]=ie?ji(e[5],B):r[6]),$=r[7],$&&(e[7]=$),c&J&&(e[8]=e[8]==null?r[8]:In(e[8],r[8])),e[9]==null&&(e[9]=r[9]),e[0]=r[0],e[1]=_,e}function Me(e){var r=[];if(e!=null)for(var o in Er(e))r.push(o);return r}function $e(e){return Hn.call(e)}function qe(e,r,o){return r=qr(r===i?e.length-1:r,0),function(){for(var c=arguments,_=-1,L=qr(c.length-r,0),z=ve(L);++_<L;)z[_]=c[r+_];_=-1;for(var $=ve(r+1);++_<r;)$[_]=c[_];return $[r]=o(z),pn(e,this,$)}}function It(e,r){return r.length<2?e:xa(e,fi(r,0,-1))}function Lt(e,r){for(var o=e.length,c=In(r.length,o),_=kn(e);c--;){var L=r[c];e[c]=K(L,o)?_[L]:i}return e}function Ke(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}var Je=Ir(Cc),wt=Od||function(e,r){return Sn.setTimeout(e,r)},Ct=Ir(Oc);function Vt(e,r,o){var c=r+"";return Ct(e,Ce(c,Kr(De(c),o)))}function Ir(e){var r=0,o=0;return function(){var c=ma(),_=tt-(c-o);if(o=c,_>0){if(++r>=st)return arguments[0]}else r=0;return e.apply(i,arguments)}}function Lr(e,r){var o=-1,c=e.length,_=c-1;for(r=r===i?c:r;++o<r;){var L=Rf(o,_),z=e[L];e[L]=e[o],e[o]=z}return e.length=r,e}var Xt=lt(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(mi,function(o,c,_,L){r.push(_?L.replace(sn,"$1"):c||o)}),r});function Dr(e){if(typeof e=="string"||Di(e))return e;var r=e+"";return r=="0"&&1/e==-Ie?"-0":r}function pr(e){if(e!=null){try{return cs.call(e)}catch{}try{return e+""}catch{}}return""}function Kr(e,r){return An(br,function(o){var c="_."+o[0];r&o[1]&&!of(e,c)&&e.push(c)}),e.sort()}function jr(e){if(e instanceof cr)return e.clone();var r=new oi(e.__wrapped__,e.__chain__);return r.__actions__=kn(e.__actions__),r.__index__=e.__index__,r.__values__=e.__values__,r}function tn(e,r,o){(o?oe(e,r,o):r===i)?r=1:r=qr(nr(r),0);var c=e==null?0:e.length;if(!c||r<1)return[];for(var _=0,L=0,z=ve(pf(c/r));_<c;)z[L++]=fi(e,_,_+=r);return z}function un(e){for(var r=-1,o=e==null?0:e.length,c=0,_=[];++r<o;){var L=e[r];L&&(_[c++]=L)}return _}function gn(){var e=arguments.length;if(!e)return[];for(var r=ve(e-1),o=arguments[0],c=e;c--;)r[c-1]=arguments[c];return qi(Jt(o)?kn(o):[o],mn(r,1))}var Wr=rr(function(e,r){return cn(e)?Ja(e,mn(r,1,cn,!0)):[]}),Ut=rr(function(e,r){var o=Y(r);return cn(o)&&(o=i),cn(e)?Ja(e,mn(r,1,cn,!0),Bt(o,2)):[]}),yn=rr(function(e,r){var o=Y(r);return cn(o)&&(o=i),cn(e)?Ja(e,mn(r,1,cn,!0),i,o):[]});function hr(e,r,o){var c=e==null?0:e.length;return c?(r=o||r===i?1:nr(r),fi(e,r<0?0:r,c)):[]}function At(e,r,o){var c=e==null?0:e.length;return c?(r=o||r===i?1:nr(r),r=c-r,fi(e,0,r<0?0:r)):[]}function qt(e,r){return e&&e.length?ao(e,Bt(r,3),!0,!0):[]}function er(e,r){return e&&e.length?ao(e,Bt(r,3),!0):[]}function Vr(e,r,o,c){var _=e==null?0:e.length;return _?(o&&typeof o!="number"&&oe(e,r,o)&&(o=0,c=_),bc(e,r,o,c)):[]}function Ei(e,r,o){var c=e==null?0:e.length;if(!c)return-1;var _=o==null?0:nr(o);return _<0&&(_=qr(c+_,0)),To(e,Bt(r,3),_)}function Da(e,r,o){var c=e==null?0:e.length;if(!c)return-1;var _=c-1;return o!==i&&(_=nr(o),_=o<0?qr(c+_,0):In(_,c-1)),To(e,Bt(r,3),_,!0)}function k(e){var r=e==null?0:e.length;return r?mn(e,1):[]}function le(e){var r=e==null?0:e.length;return r?mn(e,Ie):[]}function ne(e,r){var o=e==null?0:e.length;return o?(r=r===i?1:nr(r),mn(e,r)):[]}function ft(e){for(var r=-1,o=e==null?0:e.length,c={};++r<o;){var _=e[r];c[_[0]]=_[1]}return c}function zt(e){return e&&e.length?e[0]:i}function R(e,r,o){var c=e==null?0:e.length;if(!c)return-1;var _=o==null?0:nr(o);return _<0&&(_=qr(c+_,0)),Ki(e,r,_)}function y(e){var r=e==null?0:e.length;return r?fi(e,0,-1):[]}var H=rr(function(e){var r=Br(e,Vo);return r.length&&r[0]===e[0]?As(r):[]}),j=rr(function(e){var r=Y(e),o=Br(e,Vo);return r===Y(o)?r=i:o.pop(),o.length&&o[0]===e[0]?As(o,Bt(r,2)):[]}),Q=rr(function(e){var r=Y(e),o=Br(e,Vo);return r=typeof r=="function"?r:i,r&&o.pop(),o.length&&o[0]===e[0]?As(o,i,r):[]});function W(e,r){return e==null?"":cc.call(e,r)}function Y(e){var r=e==null?0:e.length;return r?e[r-1]:i}function X(e,r,o){var c=e==null?0:e.length;if(!c)return-1;var _=c;return o!==i&&(_=nr(o),_=_<0?qr(c+_,0):In(_,c-1)),r===r?El(e,r,_):To(e,ff,_,!0)}function O(e,r){return e&&e.length?Yo(e,nr(r)):i}var N=rr(M);function M(e,r){return e&&e.length&&r&&r.length?Zl(e,r):e}function re(e,r,o){return e&&e.length&&r&&r.length?Zl(e,r,Bt(o,2)):e}function ee(e,r,o){return e&&e.length&&r&&r.length?Zl(e,r,i,o):e}var _e=Ni(function(e,r){var o=e==null?0:e.length,c=ya(e,r);return Lc(e,Br(r,function(_){return K(_,o)?+_:_}).sort(Ff)),c});function be(e,r){var o=[];if(!(e&&e.length))return o;var c=-1,_=[],L=e.length;for(r=Bt(r,3);++c<L;){var z=e[c];r(z,c,e)&&(o.push(z),_.push(c))}return Lc(e,_),o}function Ye(e){return e==null?e:hc.call(e)}function Dt(e,r,o){var c=e==null?0:e.length;return c?(o&&typeof o!="number"&&oe(e,r,o)?(r=0,o=c):(r=r==null?0:nr(r),o=o===i?c:nr(o)),fi(e,r,o)):[]}function yt(e,r){return Of(e,r)}function ot(e,r,o){return ql(e,r,Bt(o,2))}function Ae(e,r){var o=e==null?0:e.length;if(o){var c=Of(e,r);if(c<o&&oa(e[c],r))return c}return-1}function he(e,r){return Of(e,r,!0)}function ht(e,r,o){return ql(e,r,Bt(o,2),!0)}function ct(e,r){var o=e==null?0:e.length;if(o){var c=Of(e,r,!0)-1;if(oa(e[c],r))return c}return-1}function Tt(e){return e&&e.length?Ic(e):[]}function vr(e,r){return e&&e.length?Ic(e,Bt(r,2)):[]}function xn(e){var r=e==null?0:e.length;return r?fi(e,1,r):[]}function co(e,r,o){return e&&e.length?(r=o||r===i?1:nr(r),fi(e,0,r<0?0:r)):[]}function aa(e,r,o){var c=e==null?0:e.length;return c?(r=o||r===i?1:nr(r),r=c-r,fi(e,r<0?0:r,c)):[]}function Bi(e,r){return e&&e.length?ao(e,Bt(r,3),!1,!0):[]}function La(e,r){return e&&e.length?ao(e,Bt(r,3)):[]}var ho=rr(function(e){return Aa(mn(e,1,cn,!0))}),Bc=rr(function(e){var r=Y(e);return cn(r)&&(r=i),Aa(mn(e,1,cn,!0),Bt(r,2))}),Jn=rr(function(e){var r=Y(e);return r=typeof r=="function"?r:i,Aa(mn(e,1,cn,!0),i,r)});function vo(e){return e&&e.length?Aa(e):[]}function li(e,r){return e&&e.length?Aa(e,Bt(r,2)):[]}function Gc(e,r){return r=typeof r=="function"?r:i,e&&e.length?Aa(e,i,r):[]}function Pn(e){if(!(e&&e.length))return[];var r=0;return e=Fi(e,function(o){if(cn(o))return r=qr(o.length,r),!0}),xl(r,function(o){return Br(e,Ha(o))})}function Ps(e,r){if(!(e&&e.length))return[];var o=Pn(e);return r==null?o:Br(o,function(c){return pn(r,i,c)})}var Uf=rr(function(e,r){return cn(e)?Ja(e,r):[]}),kb=rr(function(e){return Wo(Fi(e,cn))}),Pb=rr(function(e){var r=Y(e);return cn(r)&&(r=i),Wo(Fi(e,cn),Bt(r,2))}),Nb=rr(function(e){var r=Y(e);return r=typeof r=="function"?r:i,Wo(Fi(e,cn),i,r)}),Bb=rr(Pn);function Gb(e,r){return Mf(e||[],r||[],ys)}function Ub(e,r){return Mf(e||[],r||[],Ds)}var Yb=rr(function(e){var r=e.length,o=r>1?e[r-1]:i;return o=typeof o=="function"?(e.pop(),o):i,Ps(e,o)});function y_(e){var r=S(e);return r.__chain__=!0,r}function Hb(e,r){return r(e),e}function Uc(e,r){return r(e)}var zb=Ni(function(e){var r=e.length,o=r?e[0]:0,c=this.__wrapped__,_=function(L){return ya(L,e)};return r>1||this.__actions__.length||!(c instanceof cr)||!K(o)?this.thru(_):(c=c.slice(o,+o+(r?1:0)),c.__actions__.push({func:Uc,args:[_],thisArg:i}),new oi(c,this.__chain__).thru(function(L){return r&&!L.length&&L.push(i),L}))});function Wb(){return y_(this)}function Vb(){return new oi(this.value(),this.__chain__)}function $b(){this.__values__===i&&(this.__values__=M_(this.value()));var e=this.__index__>=this.__values__.length,r=e?i:this.__values__[this.__index__++];return{done:e,value:r}}function Zb(){return this}function Xb(e){for(var r,o=this;o instanceof gs;){var c=jr(o);c.__index__=0,c.__values__=i,r?_.__wrapped__=c:r=c;var _=c;o=o.__wrapped__}return _.__wrapped__=e,r}function qb(){var e=this.__wrapped__;if(e instanceof cr){var r=e;return this.__actions__.length&&(r=new cr(this)),r=r.reverse(),r.__actions__.push({func:Uc,args:[Ye],thisArg:i}),new oi(r,this.__chain__)}return this.thru(Ye)}function Kb(){return Ls(this.__wrapped__,this.__actions__)}var jb=Ti(function(e,r,o){gr.call(e,o)?++e[o]:Xn(e,o,1)});function Qb(e,r,o){var c=Jt(e)?da:Bl;return o&&oe(e,r,o)&&(r=i),c(e,Bt(r,3))}function Jb(e,r){var o=Jt(e)?Fi:Gl;return o(e,Bt(r,3))}var e2=fo(Ei),t2=fo(Da);function r2(e,r){return mn(Yc(e,r),1)}function n2(e,r){return mn(Yc(e,r),Ie)}function i2(e,r,o){return o=o===i?1:nr(o),mn(Yc(e,r),o)}function x_(e,r){var o=Jt(e)?An:ki;return o(e,Bt(r,3))}function b_(e,r){var o=Jt(e)?rc:Af;return o(e,Bt(r,3))}var a2=Ti(function(e,r,o){gr.call(e,o)?e[o].push(r):Xn(e,o,[r])});function o2(e,r,o,c){e=ui(e)?e:Hf(e),o=o&&!c?nr(o):0;var _=e.length;return o<0&&(o=qr(_+o,0)),$c(e)?o<=_&&e.indexOf(r,o)>-1:!!_&&Ki(e,r,o)>-1}var s2=rr(function(e,r,o){var c=-1,_=typeof r=="function",L=ui(e)?ve(e.length):[];return ki(e,function(z){L[++c]=_?pn(r,z,o):to(z,r,o)}),L}),f2=Ti(function(e,r,o){Xn(e,o,r)});function Yc(e,r){var o=Jt(e)?Br:ba;return o(e,Bt(r,3))}function l2(e,r,o,c){return e==null?[]:(Jt(r)||(r=r==null?[]:[r]),o=c?i:o,Jt(o)||(o=o==null?[]:[o]),Lf(e,r,o))}var u2=Ti(function(e,r,o){e[o?0:1].push(r)},function(){return[[],[]]});function c2(e,r,o){var c=Jt(e)?ml:gl,_=arguments.length<3;return c(e,Bt(r,4),o,_,ki)}function h2(e,r,o){var c=Jt(e)?yd:gl,_=arguments.length<3;return c(e,Bt(r,4),o,_,Af)}function d2(e,r){var o=Jt(e)?Fi:Gl;return o(e,Wc(Bt(r,3)))}function v2(e){var r=Jt(e)?yc:zo;return r(e)}function _2(e,r,o){(o?oe(e,r,o):r===i)?r=1:r=nr(r);var c=Jt(e)?jd:Xl;return c(e,r)}function p2(e){var r=Jt(e)?Qd:t0;return r(e)}function m2(e){if(e==null)return 0;if(ui(e))return $c(e)?_a(e):e.length;var r=fe(e);return r==Fr||r==en?e.size:ra(e).length}function g2(e,r,o){var c=Jt(e)?sf:r0;return o&&oe(e,r,o)&&(r=i),c(e,Bt(r,3))}var y2=rr(function(e,r){if(e==null)return[];var o=r.length;return o>1&&oe(e,r[0],r[1])?r=[]:o>2&&oe(r[0],r[1],r[2])&&(r=[r[0]]),Lf(e,mn(r,1),[])}),Hc=Cd||function(){return Sn.Date.now()};function x2(e,r){if(typeof r!="function")throw new ai(l);return e=nr(e),function(){if(--e<1)return r.apply(this,arguments)}}function w_(e,r,o){return r=o?i:r,r=e&&r==null?e.length:r,ia(e,J,i,i,i,i,r)}function S_(e,r){var o;if(typeof r!="function")throw new ai(l);return e=nr(e),function(){return--e>0&&(o=r.apply(this,arguments)),e<=1&&(r=i),o}}var u0=rr(function(e,r,o){var c=ue;if(o.length){var _=ji(o,uo(u0));c|=P}return ia(e,c,r,o,_)}),A_=rr(function(e,r,o){var c=ue|x;if(o.length){var _=ji(o,uo(A_));c|=P}return ia(r,c,e,o,_)});function T_(e,r,o){r=o?i:r;var c=ia(e,g,i,i,i,i,i,r);return c.placeholder=T_.placeholder,c}function E_(e,r,o){r=o?i:r;var c=ia(e,b,i,i,i,i,i,r);return c.placeholder=E_.placeholder,c}function D_(e,r,o){var c,_,L,z,$,ie,Fe=0,Pe=!1,ze=!1,vt=!0;if(typeof e!="function")throw new ai(l);r=Gi(r)||0,rn(o)&&(Pe=!!o.leading,ze="maxWait"in o,L=ze?qr(Gi(o.maxWait)||0,r):L,vt="trailing"in o?!!o.trailing:vt);function Rt(hn){var sa=c,mo=_;return c=_=i,Fe=hn,z=e.apply(mo,sa),z}function Yt(hn){return Fe=hn,$=wt(_r,r),Pe?Rt(hn):z}function or(hn){var sa=hn-ie,mo=hn-Fe,$_=r-sa;return ze?In($_,L-mo):$_}function Ht(hn){var sa=hn-ie,mo=hn-Fe;return ie===i||sa>=r||sa<0||ze&&mo>=L}function _r(){var hn=Hc();if(Ht(hn))return yr(hn);$=wt(_r,or(hn))}function yr(hn){return $=i,vt&&c?Rt(hn):(c=_=i,z)}function Li(){$!==i&&Rs($),Fe=0,c=ie=_=$=i}function ei(){return $===i?z:yr(Hc())}function Ri(){var hn=Hc(),sa=Ht(hn);if(c=arguments,_=this,ie=hn,sa){if($===i)return Yt(ie);if(ze)return Rs($),$=wt(_r,r),Rt(ie)}return $===i&&($=wt(_r,r)),z}return Ri.cancel=Li,Ri.flush=ei,Ri}var b2=rr(function(e,r){return Sf(e,1,r)}),w2=rr(function(e,r,o){return Sf(e,Gi(r)||0,o)});function S2(e){return ia(e,nt)}function zc(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new ai(l);var o=function(){var c=arguments,_=r?r.apply(this,c):c[0],L=o.cache;if(L.has(_))return L.get(_);var z=e.apply(this,c);return o.cache=L.set(_,z)||L,z};return o.cache=new(zc.Cache||ea),o}zc.Cache=ea;function Wc(e){if(typeof e!="function")throw new ai(l);return function(){var r=arguments;switch(r.length){case 0:return!e.call(this);case 1:return!e.call(this,r[0]);case 2:return!e.call(this,r[0],r[1]);case 3:return!e.call(this,r[0],r[1],r[2])}return!e.apply(this,r)}}function A2(e){return S_(2,e)}var T2=jl(function(e,r){r=r.length==1&&Jt(r[0])?Br(r[0],jn(Bt())):Br(mn(r,1),jn(Bt()));var o=r.length;return rr(function(c){for(var _=-1,L=In(c.length,o);++_<L;)c[_]=r[_].call(this,c[_]);return pn(e,this,c)})}),c0=rr(function(e,r){var o=ji(r,uo(c0));return ia(e,P,i,r,o)}),L_=rr(function(e,r){var o=ji(r,uo(L_));return ia(e,F,i,r,o)}),E2=Ni(function(e,r){return ia(e,Te,i,i,i,r)});function D2(e,r){if(typeof e!="function")throw new ai(l);return r=r===i?r:nr(r),rr(e,r)}function L2(e,r){if(typeof e!="function")throw new ai(l);return r=r==null?0:qr(nr(r),0),rr(function(o){var c=o[r],_=Ai(o,0,r);return c&&qi(_,c),pn(e,this,_)})}function R2(e,r,o){var c=!0,_=!0;if(typeof e!="function")throw new ai(l);return rn(o)&&(c="leading"in o?!!o.leading:c,_="trailing"in o?!!o.trailing:_),D_(e,r,{leading:c,maxWait:r,trailing:_})}function C2(e){return w_(e,1)}function O2(e,r){return c0($o(r),e)}function I2(){if(!arguments.length)return[];var e=arguments[0];return Jt(e)?e:[e]}function M2(e){return Tn(e,q)}function F2(e,r){return r=typeof r=="function"?r:i,Tn(e,q,r)}function k2(e){return Tn(e,p|q)}function P2(e,r){return r=typeof r=="function"?r:i,Tn(e,p|q,r)}function N2(e,r){return r==null||Qa(e,r,Nn(r))}function oa(e,r){return e===r||e!==e&&r!==r}var B2=En(Ss),G2=En(function(e,r){return e>=r}),Ns=zl(function(){return arguments}())?zl:function(e){return nn(e)&&gr.call(e,"callee")&&!ln.call(e,"callee")},Jt=ve.isArray,U2=ju?jn(ju):Tc;function ui(e){return e!=null&&Vc(e.length)&&!_o(e)}function cn(e){return nn(e)&&ui(e)}function Y2(e){return e===!0||e===!1||nn(e)&&Fn(e)==Gt}var qo=Id||w0,H2=Xi?jn(Xi):Wl;function z2(e){return nn(e)&&e.nodeType===1&&!ou(e)}function W2(e){if(e==null)return!0;if(ui(e)&&(Jt(e)||typeof e=="string"||typeof e.splice=="function"||qo(e)||Yf(e)||Ns(e)))return!e.length;var r=fe(e);if(r==Fr||r==en)return!e.size;if(pt(e))return!ra(e).length;for(var o in e)if(gr.call(e,o))return!1;return!0}function V2(e,r){return Bo(e,r)}function $2(e,r,o){o=typeof o=="function"?o:i;var c=o?o(e,r):i;return c===i?Bo(e,r,i,o):!!c}function h0(e){if(!nn(e))return!1;var r=Fn(e);return r==Qr||r==dn||typeof e.message=="string"&&typeof e.name=="string"&&!ou(e)}function Z2(e){return typeof e=="number"&&Ol(e)}function _o(e){if(!rn(e))return!1;var r=Fn(e);return r==kt||r==Nr||r==wr||r==Dn}function R_(e){return typeof e=="number"&&e==nr(e)}function Vc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ze}function rn(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}function nn(e){return e!=null&&typeof e=="object"}var C_=Qu?jn(Qu):Vl;function X2(e,r){return e===r||Ts(e,r,T(r))}function q2(e,r,o){return o=typeof o=="function"?o:i,Ts(e,r,T(r),o)}function K2(e){return O_(e)&&e!=+e}function j2(e){if(je(e))throw new Zt(s);return Go(e)}function Q2(e){return e===null}function J2(e){return e==null}function O_(e){return typeof e=="number"||nn(e)&&Fn(e)==Xr}function ou(e){if(!nn(e)||Fn(e)!=ar)return!1;var r=_f(e);if(r===null)return!0;var o=gr.call(r,"constructor")&&r.constructor;return typeof o=="function"&&o instanceof o&&cs.call(o)==Oo}var d0=Ju?jn(Ju):Dc;function ew(e){return R_(e)&&e>=-Ze&&e<=Ze}var I_=Ao?jn(Ao):Ef;function $c(e){return typeof e=="string"||!Jt(e)&&nn(e)&&Fn(e)==on}function Di(e){return typeof e=="symbol"||nn(e)&&Fn(e)==E}var Yf=ec?jn(ec):ta;function tw(e){return e===i}function rw(e){return nn(e)&&fe(e)==vn}function nw(e){return nn(e)&&Fn(e)==Zi}var iw=En(ro),aw=En(function(e,r){return e<=r});function M_(e){if(!e)return[];if(ui(e))return $c(e)?Yn(e):kn(e);if(xi&&e[xi])return oc(e[xi]());var r=fe(e),o=r==Fr?hf:r==en?us:Hf;return o(e)}function po(e){if(!e)return e===0?e:0;if(e=Gi(e),e===Ie||e===-Ie){var r=e<0?-1:1;return r*St}return e===e?e:0}function nr(e){var r=po(e),o=r%1;return r===r?o?r-o:r:0}function F_(e){return e?ja(nr(e),0,Wt):0}function Gi(e){if(typeof e=="number")return e;if(Di(e))return $t;if(rn(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=rn(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=ic(e);var o=Xh.test(e);return o||Kh.test(e)?af(e.slice(2),o?2:8):js.test(e)?$t:+e}function k_(e){return Pi(e,ci(e))}function ow(e){return e?ja(nr(e),-Ze,Ze):e===0?e:0}function Rr(e){return e==null?"":Qn(e)}var sw=so(function(e,r){if(pt(r)||ui(r)){Pi(r,Nn(r),e);return}for(var o in r)gr.call(r,o)&&ys(e,o,r[o])}),P_=so(function(e,r){Pi(r,ci(r),e)}),Zc=so(function(e,r,o,c){Pi(r,ci(r),e,c)}),fw=so(function(e,r,o,c){Pi(r,Nn(r),e,c)}),lw=Ni(ya);function uw(e,r){var o=Xa(e);return r==null?o:xs(o,r)}var cw=rr(function(e,r){e=Er(e);var o=-1,c=r.length,_=c>2?r[2]:i;for(_&&oe(r[0],r[1],_)&&(c=1);++o<c;)for(var L=r[o],z=ci(L),$=-1,ie=z.length;++$<ie;){var Fe=z[$],Pe=e[Fe];(Pe===i||oa(Pe,Co[Fe])&&!gr.call(e,Fe))&&(e[Fe]=L[Fe])}return e}),hw=rr(function(e){return e.push(i,Pc),pn(N_,i,e)});function dw(e,r){return yi(e,Bt(r,3),si)}function vw(e,r){return yi(e,Bt(r,3),bs)}function _w(e,r){return e==null?e:Tf(e,Bt(r,3),ci)}function pw(e,r){return e==null?e:Ul(e,Bt(r,3),ci)}function mw(e,r){return e&&si(e,Bt(r,3))}function gw(e,r){return e&&bs(e,Bt(r,3))}function yw(e){return e==null?[]:ws(e,Nn(e))}function xw(e){return e==null?[]:ws(e,ci(e))}function v0(e,r,o){var c=e==null?i:xa(e,r);return c===i?o:c}function bw(e,r){return e!=null&&Ne(e,r,wc)}function _0(e,r){return e!=null&&Ne(e,r,Sc)}var ww=kf(function(e,r,o){r!=null&&typeof r.toString!="function"&&(r=Hn.call(r)),e[r]=o},m0(hi)),Sw=kf(function(e,r,o){r!=null&&typeof r.toString!="function"&&(r=Hn.call(r)),gr.call(e,r)?e[r].push(o):e[r]=[o]},Bt),Aw=rr(to);function Nn(e){return ui(e)?Pl(e):ra(e)}function ci(e){return ui(e)?Pl(e,!0):Es(e)}function Tw(e,r){var o={};return r=Bt(r,3),si(e,function(c,_,L){Xn(o,r(c,_,L),c)}),o}function Ew(e,r){var o={};return r=Bt(r,3),si(e,function(c,_,L){Xn(o,_,r(c,_,L))}),o}var Dw=so(function(e,r,o){no(e,r,o)}),N_=so(function(e,r,o,c){no(e,r,o,c)}),Lw=Ni(function(e,r){var o={};if(e==null)return o;var c=!1;r=Br(r,function(L){return L=Si(L,e),c||(c=L.length>1),L}),Pi(e,Bf(e),o),c&&(o=Tn(o,p|U|q,s0));for(var _=r.length;_--;)Kl(o,r[_]);return o});function Rw(e,r){return B_(e,Wc(Bt(r)))}var Cw=Ni(function(e,r){return e==null?{}:$l(e,r)});function B_(e,r){if(e==null)return{};var o=Br(Bf(e),function(c){return[c]});return r=Bt(r),io(e,o,function(c,_){return r(c,_[0])})}function Ow(e,r,o){r=Si(r,e);var c=-1,_=r.length;for(_||(_=1,e=i);++c<_;){var L=e==null?i:e[Dr(r[c])];L===i&&(c=_,L=o),e=_o(L)?L.call(e):L}return e}function Iw(e,r,o){return e==null?e:Ds(e,r,o)}function Mw(e,r,o,c){return c=typeof c=="function"?c:i,e==null?e:Ds(e,r,o,c)}var G_=kc(Nn),U_=kc(ci);function Fw(e,r,o){var c=Jt(e),_=c||qo(e)||Yf(e);if(r=Bt(r,4),o==null){var L=e&&e.constructor;_?o=c?new L:[]:rn(e)?o=_o(L)?Xa(_f(e)):{}:o={}}return(_?An:si)(e,function(z,$,ie){return r(o,z,$,ie)}),o}function kw(e,r){return e==null?!0:Kl(e,r)}function Pw(e,r,o){return e==null?e:If(e,r,$o(o))}function Nw(e,r,o,c){return c=typeof c=="function"?c:i,e==null?e:If(e,r,$o(o),c)}function Hf(e){return e==null?[]:ls(e,Nn(e))}function Bw(e){return e==null?[]:ls(e,ci(e))}function Gw(e,r,o){return o===i&&(o=r,r=i),o!==i&&(o=Gi(o),o=o===o?o:0),r!==i&&(r=Gi(r),r=r===r?r:0),ja(Gi(e),r,o)}function Uw(e,r,o){return r=po(r),o===i?(o=r,r=0):o=po(o),e=Gi(e),Hl(e,r,o)}function Yw(e,r,o){if(o&&typeof o!="boolean"&&oe(e,r,o)&&(r=o=i),o===i&&(typeof r=="boolean"?(o=r,r=i):typeof e=="boolean"&&(o=e,e=i)),e===i&&r===i?(e=0,r=1):(e=po(e),r===i?(r=e,e=0):r=po(r)),e>r){var c=e;e=r,r=c}if(o||e%1||r%1){var _=Il();return In(e+_*(r-e+ha("1e-"+((_+"").length-1))),r)}return Rf(e,r)}var Hw=Xo(function(e,r,o){return r=r.toLowerCase(),e+(o?Y_(r):r)});function Y_(e){return p0(Rr(e).toLowerCase())}function H_(e){return e=Rr(e),e&&e.replace(Qh,bl).replace(vd,"")}function zw(e,r,o){e=Rr(e),r=Qn(r);var c=e.length;o=o===i?c:ja(nr(o),0,c);var _=o;return o-=r.length,o>=0&&e.slice(o,_)==r}function Ww(e){return e=Rr(e),e&&V.test(e)?e.replace(ye,wl):e}function Vw(e){return e=Rr(e),e&&dr.test(e)?e.replace(kr,"\\$&"):e}var $w=Xo(function(e,r,o){return e+(o?"-":"")+r.toLowerCase()}),Zw=Xo(function(e,r,o){return e+(o?" ":"")+r.toLowerCase()}),Xw=tu("toLowerCase");function qw(e,r,o){e=Rr(e),r=nr(r);var c=r?_a(e):0;if(!r||c>=r)return e;var _=(r-c)/2;return Hr(Io(_),o)+e+Hr(pf(_),o)}function Kw(e,r,o){e=Rr(e),r=nr(r);var c=r?_a(e):0;return r&&c<r?e+Hr(r-c,o):e}function jw(e,r,o){e=Rr(e),r=nr(r);var c=r?_a(e):0;return r&&c<r?Hr(r-c,o)+e:e}function Qw(e,r,o){return o||r==null?r=0:r&&(r=+r),gf(Rr(e).replace(Yr,""),r||0)}function Jw(e,r,o){return(o?oe(e,r,o):r===i)?r=1:r=nr(r),Cf(Rr(e),r)}function eS(){var e=arguments,r=Rr(e[0]);return e.length<3?r:r.replace(e[1],e[2])}var tS=Xo(function(e,r,o){return e+(o?"_":"")+r.toLowerCase()});function rS(e,r,o){return o&&typeof o!="number"&&oe(e,r,o)&&(r=o=i),o=o===i?Wt:o>>>0,o?(e=Rr(e),e&&(typeof r=="string"||r!=null&&!d0(r))&&(r=Qn(r),!r&&za(e))?Ai(Yn(e),0,o):e.split(r,o)):[]}var nS=Xo(function(e,r,o){return e+(o?" ":"")+p0(r)});function iS(e,r,o){return e=Rr(e),o=o==null?0:ja(nr(o),0,e.length),r=Qn(r),e.slice(o,o+r.length)==r}function aS(e,r,o){var c=S.templateSettings;o&&oe(e,r,o)&&(r=i),e=Rr(e),r=Zc({},r,c,iu);var _=Zc({},r.imports,c.imports,iu),L=Nn(_),z=ls(_,L),$,ie,Fe=0,Pe=r.interpolate||Qs,ze="__p += '",vt=Ll((r.escape||Qs).source+"|"+Pe.source+"|"+(Pe===at?gi:Qs).source+"|"+(r.evaluate||Qs).source+"|$","g"),Rt="//# sourceURL="+(gr.call(r,"sourceURL")?(r.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nf+"]")+`
22
+ `;e.replace(vt,function(Ht,_r,yr,Li,ei,Ri){return yr||(yr=Li),ze+=e.slice(Fe,Ri).replace(Jh,Sl),_r&&($=!0,ze+=`' +
21
23
  __e(`+_r+`) +
22
- '`),Qn&&(ie=!0,ze+=`';
23
- `+Qn+`;
24
+ '`),ei&&(ie=!0,ze+=`';
25
+ `+ei+`;
24
26
  __p += '`),yr&&(ze+=`' +
25
27
  ((__t = (`+yr+`)) == null ? '' : __t) +
26
- '`),Fe=Ei+Ht.length,Ht}),ze+=`';
28
+ '`),Fe=Ri+Ht.length,Ht}),ze+=`';
27
29
  `;var Yt=gr.call(r,"variable")&&r.variable;if(!Yt)ze=`with (obj) {
28
30
  `+ze+`
29
31
  }
30
- `;else if(Wn.test(Yt))throw new Zt(d);ze=(ie?ze.replace(He,""):ze).replace(Nt,"$1").replace(u,"$1;"),ze="function("+(Yt||"obj")+`) {
32
+ `;else if($n.test(Yt))throw new Zt(d);ze=(ie?ze.replace(He,""):ze).replace(Nt,"$1").replace(u,"$1;"),ze="function("+(Yt||"obj")+`) {
31
33
  `+(Yt?"":`obj || (obj = {});
32
34
  `)+"var __t, __p = ''"+($?", __e = _.escape":"")+(ie?`, __j = Array.prototype.join;
33
35
  function print() { __p += __j.call(arguments, '') }
34
36
  `:`;
35
37
  `)+ze+`return __p
36
- }`;var or=g_(function(){return mr(L,Rt+"return "+ze).apply(i,z)});if(or.source=ze,Jd(or))throw or;return or}function T2(e){return Rr(e).toLowerCase()}function E2(e){return Rr(e).toUpperCase()}function D2(e,r,a){if(e=Rr(e),e&&(a||r===i))return Zu(e);if(!e||!(r=Kn(r)))return e;var c=Gn(e),_=Gn(r),L=rf(c,_),z=nf(c,_)+1;return xi(c,L,z).join("")}function L2(e,r,a){if(e=Rr(e),e&&(a||r===i))return e.slice(0,ju(e)+1);if(!e||!(r=Kn(r)))return e;var c=Gn(e),_=nf(c,Gn(r))+1;return xi(c,0,_).join("")}function R2(e,r,a){if(e=Rr(e),e&&(a||r===i))return e.replace(Yr,"");if(!e||!(r=Kn(r)))return e;var c=Gn(e),_=rf(c,Gn(r));return xi(c,_).join("")}function C2(e,r){var a=ut,c=it;if(tn(r)){var _="separator"in r?r.separator:_;a="length"in r?nr(r.length):a,c="omission"in r?Kn(r.omission):c}e=Rr(e);var L=e.length;if(Ga(e)){var z=Gn(e);L=z.length}if(a>=L)return e;var $=a-ca(c);if($<1)return c;var ie=z?xi(z,0,$).join(""):e.slice(0,$);if(_===i)return ie+c;if(z&&($+=ie.length-$),e0(_)){if(e.slice($).search(_)){var Fe,Pe=ie;for(_.global||(_=xl(_.source,Rr(Xn.exec(_))+"g")),_.lastIndex=0;Fe=_.exec(Pe);)var ze=Fe.index;ie=ie.slice(0,ze===i?$:ze)}}else if(e.indexOf(Kn(_),$)!=$){var vt=ie.lastIndexOf(_);vt>-1&&(ie=ie.slice(0,vt))}return ie+c}function O2(e){return e=Rr(e),e&&w.test(e)?e.replace(de,ld):e}var M2=Wo(function(e,r,a){return e+(a?" ":"")+r.toUpperCase()}),n0=Xl("toUpperCase");function m_(e,r,a){return e=Rr(e),r=a?i:r,r===i?Xu(e)?cd(e):sd(e):e.match(r)||[]}var g_=rr(function(e,r){try{return _n(e,i,r)}catch(a){return Jd(a)?a:new Zt(a)}}),I2=Fi(function(e,r){return wn(r,function(a){a=Dr(a),$n(e,a,jd(e[a],e))}),e});function F2(e){var r=e==null?0:e.length,a=Bt();return e=r?Br(e,function(c){if(typeof c[1]!="function")throw new ri(l);return[a(c[0]),c[1]]}):[],rr(function(c){for(var _=-1;++_<r;){var L=e[_];if(_n(L[0],this,c))return _n(L[1],this,c)}})}function k2(e){return lc(Sn(e,p))}function i0(e){return function(){return e}}function P2(e,r){return e==null||e!==e?r:e}var N2=Ji(),B2=Ji(!0);function li(e){return e}function a0(e){return Po(typeof e=="function"?e:Sn(e,p))}function G2(e){return ga(Sn(e,p))}function U2(e,r){return ya(e,Sn(r,p))}var Y2=rr(function(e,r){return function(a){return ja(a,e,r)}}),H2=rr(function(e,r){return function(a){return ja(e,a,r)}});function o0(e,r,a){var c=kn(r),_=ps(r,c);a==null&&!(tn(r)&&(_.length||!c.length))&&(a=r,r=e,e=this,_=ps(r,kn(r)));var L=!(tn(a)&&"chain"in a)||!!a.chain,z=uo(e);return wn(_,function($){var ie=r[$];e[$]=ie,z&&(e.prototype[$]=function(){var Fe=this.__chain__;if(L||Fe){var Pe=e(this.__wrapped__),ze=Pe.__actions__=In(this.__actions__);return ze.push({func:ie,args:arguments,thisArg:e}),Pe.__chain__=Fe,Pe}return ie.apply(e,Vi([this.value()],arguments))})}),e}function z2(){return xn._===this&&(xn._=Qu),this}function s0(){}function W2(e){return e=nr(e),rr(function(r){return No(r,e)})}var V2=Rf(Br),$2=Rf(la),Z2=Rf(Js);function y_(e){return Oe(e)?Ba(Dr(e)):Bo(e)}function X2(e){return function(r){return e==null?i:pa(e,r)}}var q2=zr(),K2=zr(!0);function f0(){return[]}function l0(){return!1}function j2(){return{}}function Q2(){return""}function J2(){return!0}function ew(e,r){if(e=nr(e),e<1||e>Ze)return[];var a=Wt,c=Cn(e,Wt);r=Bt(r),e-=Wt;for(var _=dl(c,r);++a<e;)r(a);return _}function tw(e){return Jt(e)?Br(e,Dr):Ai(e)?[e]:In(Xt(Rr(e)))}function rw(e){var r=++_d;return Rr(e)+r}var nw=ao(function(e,r){return e+r},0),iw=Kl("ceil"),aw=ao(function(e,r){return e/r},1),ow=Kl("floor");function sw(e){return e&&e.length?Ka(e,li,ms):i}function fw(e,r){return e&&e.length?Ka(e,Bt(r,2),ms):i}function lw(e){return rs(e,li)}function uw(e,r){return rs(e,Bt(r,2))}function cw(e){return e&&e.length?Ka(e,li,Qa):i}function hw(e,r){return e&&e.length?Ka(e,Bt(r,2),Qa):i}var dw=ao(function(e,r){return e*r},1),vw=Kl("round"),_w=ao(function(e,r){return e-r},0);function pw(e){return e&&e.length?tf(e,li):0}function mw(e,r){return e&&e.length?tf(e,Bt(r,2)):0}return S.after=Gb,S.ary=Kv,S.assign=Ex,S.assignIn=u_,S.assignInWith=Pc,S.assignWith=Dx,S.at=Lx,S.before=jv,S.bind=jd,S.bindAll=I2,S.bindKey=Qv,S.castArray=jb,S.chain=Zv,S.chunk=en,S.compact=ln,S.concat=mn,S.cond=F2,S.conforms=k2,S.constant=i0,S.countBy=pb,S.create=Rx,S.curry=Jv,S.curryRight=e_,S.debounce=t_,S.defaults=Cx,S.defaultsDeep=Ox,S.defer=Ub,S.delay=Yb,S.difference=Wr,S.differenceBy=Ut,S.differenceWith=gn,S.drop=hr,S.dropRight=At,S.dropRightWhile=qt,S.dropWhile=er,S.fill=Vr,S.filter=gb,S.flatMap=xb,S.flatMapDeep=wb,S.flatMapDepth=Sb,S.flatten=k,S.flattenDeep=le,S.flattenDepth=ne,S.flip=Hb,S.flow=N2,S.flowRight=B2,S.fromPairs=ft,S.functions=Bx,S.functionsIn=Gx,S.groupBy=Ab,S.initial=y,S.intersection=H,S.intersectionBy=j,S.intersectionWith=Q,S.invert=Yx,S.invertBy=Hx,S.invokeMap=Eb,S.iteratee=a0,S.keyBy=Db,S.keys=kn,S.keysIn=fi,S.map=Cc,S.mapKeys=Wx,S.mapValues=Vx,S.matches=G2,S.matchesProperty=U2,S.memoize=Mc,S.merge=$x,S.mergeWith=c_,S.method=Y2,S.methodOf=H2,S.mixin=o0,S.negate=Ic,S.nthArg=W2,S.omit=Zx,S.omitBy=Xx,S.once=zb,S.orderBy=Lb,S.over=V2,S.overArgs=Wb,S.overEvery=$2,S.overSome=Z2,S.partial=Qd,S.partialRight=r_,S.partition=Rb,S.pick=qx,S.pickBy=h_,S.property=y_,S.propertyOf=X2,S.pull=N,S.pullAll=I,S.pullAllBy=re,S.pullAllWith=ee,S.pullAt=_e,S.range=q2,S.rangeRight=K2,S.rearg=Vb,S.reject=Mb,S.remove=xe,S.rest=$b,S.reverse=Ye,S.sampleSize=Fb,S.set=jx,S.setWith=Qx,S.shuffle=kb,S.slice=Dt,S.sortBy=Bb,S.sortedUniq=Tt,S.sortedUniqBy=vr,S.split=x2,S.spread=Zb,S.tail=yn,S.take=so,S.takeRight=ta,S.takeRightWhile=ki,S.takeWhile=Aa,S.tap=sb,S.throttle=Xb,S.thru=Rc,S.toArray=s_,S.toPairs=d_,S.toPairsIn=v_,S.toPath=tw,S.toPlainObject=l_,S.transform=Jx,S.unary=qb,S.union=fo,S.unionBy=Dc,S.unionWith=jn,S.uniq=lo,S.uniqBy=oi,S.uniqWith=Lc,S.unset=e2,S.unzip=Fn,S.unzipWith=Cs,S.update=t2,S.updateWith=r2,S.values=kf,S.valuesIn=n2,S.without=If,S.words=m_,S.wrap=Kb,S.xor=eb,S.xorBy=tb,S.xorWith=rb,S.zip=nb,S.zipObject=ib,S.zipObjectDeep=ab,S.zipWith=ob,S.entries=d_,S.entriesIn=v_,S.extend=u_,S.extendWith=Pc,o0(S,S),S.add=nw,S.attempt=g_,S.camelCase=s2,S.capitalize=__,S.ceil=iw,S.clamp=i2,S.clone=Qb,S.cloneDeep=ex,S.cloneDeepWith=tx,S.cloneWith=Jb,S.conformsTo=rx,S.deburr=p_,S.defaultTo=P2,S.divide=aw,S.endsWith=f2,S.eq=ra,S.escape=l2,S.escapeRegExp=u2,S.every=mb,S.find=yb,S.findIndex=Si,S.findKey=Mx,S.findLast=bb,S.findLastIndex=Sa,S.findLastKey=Ix,S.floor=ow,S.forEach=Xv,S.forEachRight=qv,S.forIn=Fx,S.forInRight=kx,S.forOwn=Px,S.forOwnRight=Nx,S.get=t0,S.gt=nx,S.gte=ix,S.has=Ux,S.hasIn=r0,S.head=zt,S.identity=li,S.includes=Tb,S.indexOf=R,S.inRange=a2,S.invoke=zx,S.isArguments=Os,S.isArray=Jt,S.isArrayBuffer=ax,S.isArrayLike=si,S.isArrayLikeObject=un,S.isBoolean=ox,S.isBuffer=Vo,S.isDate=sx,S.isElement=fx,S.isEmpty=lx,S.isEqual=ux,S.isEqualWith=cx,S.isError=Jd,S.isFinite=hx,S.isFunction=uo,S.isInteger=n_,S.isLength=Fc,S.isMap=i_,S.isMatch=dx,S.isMatchWith=vx,S.isNaN=_x,S.isNative=px,S.isNil=gx,S.isNull=mx,S.isNumber=a_,S.isObject=tn,S.isObjectLike=rn,S.isPlainObject=Jl,S.isRegExp=e0,S.isSafeInteger=yx,S.isSet=o_,S.isString=kc,S.isSymbol=Ai,S.isTypedArray=Ff,S.isUndefined=bx,S.isWeakMap=xx,S.isWeakSet=wx,S.join=W,S.kebabCase=c2,S.last=Y,S.lastIndexOf=X,S.lowerCase=h2,S.lowerFirst=d2,S.lt=Sx,S.lte=Ax,S.max=sw,S.maxBy=fw,S.mean=lw,S.meanBy=uw,S.min=cw,S.minBy=hw,S.stubArray=f0,S.stubFalse=l0,S.stubObject=j2,S.stubString=Q2,S.stubTrue=J2,S.multiply=dw,S.nth=O,S.noConflict=z2,S.noop=s0,S.now=Oc,S.pad=v2,S.padEnd=_2,S.padStart=p2,S.parseInt=m2,S.random=o2,S.reduce=Cb,S.reduceRight=Ob,S.repeat=g2,S.replace=y2,S.result=Kx,S.round=vw,S.runInContext=te,S.sample=Ib,S.size=Pb,S.snakeCase=b2,S.some=Nb,S.sortedIndex=yt,S.sortedIndexBy=ot,S.sortedIndexOf=Ae,S.sortedLastIndex=he,S.sortedLastIndexBy=ht,S.sortedLastIndexOf=ct,S.startCase=w2,S.startsWith=S2,S.subtract=_w,S.sum=pw,S.sumBy=mw,S.template=A2,S.times=ew,S.toFinite=co,S.toInteger=nr,S.toLength=f_,S.toLower=T2,S.toNumber=Pi,S.toSafeInteger=Tx,S.toString=Rr,S.toUpper=E2,S.trim=D2,S.trimEnd=L2,S.trimStart=R2,S.truncate=C2,S.unescape=O2,S.uniqueId=rw,S.upperCase=M2,S.upperFirst=n0,S.each=Xv,S.eachRight=qv,S.first=zt,o0(S,function(){var e={};return ii(S,function(r,a){gr.call(S.prototype,a)||(e[a]=r)}),e}(),{chain:!1}),S.VERSION=o,wn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){S[e].placeholder=S}),wn(["drop","take"],function(e,r){cr.prototype[e]=function(a){a=a===i?1:Xr(nr(a),0);var c=this.__filtered__&&!r?new cr(this):this.clone();return c.__filtered__?c.__takeCount__=Cn(a,c.__takeCount__):c.__views__.push({size:Cn(a,Wt),type:e+(c.__dir__<0?"Right":"")}),c},cr.prototype[e+"Right"]=function(a){return this.reverse()[e](a).reverse()}}),wn(["filter","map","takeWhile"],function(e,r){var a=r+1,c=a==Re||a==bt;cr.prototype[e]=function(_){var L=this.clone();return L.__iteratees__.push({iteratee:Bt(_,3),type:a}),L.__filtered__=L.__filtered__||c,L}}),wn(["head","last"],function(e,r){var a="take"+(r?"Right":"");cr.prototype[e]=function(){return this[a](1).value()[0]}}),wn(["initial","tail"],function(e,r){var a="drop"+(r?"":"Right");cr.prototype[e]=function(){return this.__filtered__?new cr(this):this[a](1)}}),cr.prototype.compact=function(){return this.filter(li)},cr.prototype.find=function(e){return this.filter(e).head()},cr.prototype.findLast=function(e){return this.reverse().find(e)},cr.prototype.invokeMap=rr(function(e,r){return typeof e=="function"?new cr(this):this.map(function(a){return ja(a,e,r)})}),cr.prototype.reject=function(e){return this.filter(Ic(Bt(e)))},cr.prototype.slice=function(e,r){e=nr(e);var a=this;return a.__filtered__&&(e>0||r<0)?new cr(a):(e<0?a=a.takeRight(-e):e&&(a=a.drop(e)),r!==i&&(r=nr(r),a=r<0?a.dropRight(-r):a.take(r-e)),a)},cr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},cr.prototype.toArray=function(){return this.take(Wt)},ii(cr.prototype,function(e,r){var a=/^(?:filter|find|map|reject)|While$/.test(r),c=/^(?:head|last)$/.test(r),_=S[c?"take"+(r=="last"?"Right":""):r],L=c||/^find/.test(r);!_||(S.prototype[r]=function(){var z=this.__wrapped__,$=c?[1]:arguments,ie=z instanceof cr,Fe=$[0],Pe=ie||Jt(z),ze=function(_r){var yr=_.apply(S,Vi([_r],$));return c&&vt?yr[0]:yr};Pe&&a&&typeof Fe=="function"&&Fe.length!=1&&(ie=Pe=!1);var vt=this.__chain__,Rt=!!this.__actions__.length,Yt=L&&!vt,or=ie&&!Rt;if(!L&&Pe){z=or?z:new cr(this);var Ht=e.apply(z,$);return Ht.__actions__.push({func:Rc,args:[ze],thisArg:i}),new ni(Ht,vt)}return Yt&&or?e.apply(this,$):(Ht=this.thru(ze),Yt?c?Ht.value()[0]:Ht.value():Ht)})}),wn(["pop","push","shift","sort","splice","unshift"],function(e){var r=of[e],a=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",c=/^(?:pop|shift)$/.test(e);S.prototype[e]=function(){var _=arguments;if(c&&!this.__chain__){var L=this.value();return r.apply(Jt(L)?L:[],_)}return this[a](function(z){return r.apply(Jt(z)?z:[],_)})}}),ii(cr.prototype,function(e,r){var a=S[r];if(a){var c=a.name+"";gr.call(On,c)||(On[c]=[]),On[c].push({name:r,func:a})}}),On[Rs(i,b).name]=[{name:"wrapper",func:i}],cr.prototype.clone=wd,cr.prototype.reverse=Sd,cr.prototype.value=Ad,S.prototype.at=fb,S.prototype.chain=lb,S.prototype.commit=ub,S.prototype.next=cb,S.prototype.plant=db,S.prototype.reverse=vb,S.prototype.toJSON=S.prototype.valueOf=S.prototype.value=_b,S.prototype.first=S.prototype.head,mi&&(S.prototype[mi]=hb),S},To=hd();Pa?((Pa.exports=To)._=To,sl._=To):xn._=To}).call(Us)})(Ys,Ys.exports);const mo=Ys.exports,ph={normal:["FC6310R","FC6310"],infrared:["M3T"],multispectral:["FC6360"]};var ei=63710088e-1,fv={centimeters:ei*100,centimetres:ei*100,degrees:ei/111325,feet:ei*3.28084,inches:ei*39.37,kilometers:ei/1e3,kilometres:ei/1e3,meters:ei,metres:ei,miles:ei/1609.344,millimeters:ei*1e3,millimetres:ei*1e3,nauticalmiles:ei/1852,radians:1,yards:ei*1.0936};function Pg(t,n,i){i===void 0&&(i={});var o={type:"Feature"};return(i.id===0||i.id)&&(o.id=i.id),i.bbox&&(o.bbox=i.bbox),o.properties=n||{},o.geometry=t,o}function Ng(t,n,i){if(i===void 0&&(i={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!lv(t[0])||!lv(t[1]))throw new Error("coordinates must contain numbers");var o={type:"Point",coordinates:t};return Pg(o,n,i)}function Bg(t,n){n===void 0&&(n="kilometers");var i=fv[n];if(!i)throw new Error(n+" units is invalid");return t*i}function Gg(t,n){n===void 0&&(n="kilometers");var i=fv[n];if(!i)throw new Error(n+" units is invalid");return t/i}function mh(t){var n=t%(2*Math.PI);return n*180/Math.PI}function Yi(t){var n=t%360;return n*Math.PI/180}function lv(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function Xf(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return t.geometry.coordinates;if(t.type==="Point")return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Ug(t,n){return t.type==="FeatureCollection"?"FeatureCollection":t.type==="GeometryCollection"?"GeometryCollection":t.type==="Feature"&&t.geometry!==null?t.geometry.type:t.type}function uv(t,n,i){i===void 0&&(i={});var o=Xf(t),f=Xf(n),s=Yi(f[1]-o[1]),l=Yi(f[0]-o[0]),d=Yi(o[1]),v=Yi(f[1]),M=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(l/2),2)*Math.cos(d)*Math.cos(v);return Bg(2*Math.atan2(Math.sqrt(M),Math.sqrt(1-M)),i.units)}function Yg(t,n,i,o){o===void 0&&(o={});var f=Xf(t),s=Yi(f[0]),l=Yi(f[1]),d=Yi(i),v=Gg(n,o.units),M=Math.asin(Math.sin(l)*Math.cos(v)+Math.cos(l)*Math.sin(v)*Math.cos(d)),B=s+Math.atan2(Math.sin(d)*Math.sin(v)*Math.cos(l),Math.cos(v)-Math.sin(l)*Math.sin(M)),p=mh(B),U=mh(M);return Ng([p,U],o.properties)}function cv(t,n,i){if(i===void 0&&(i={}),i.final===!0)return Hg(t,n);var o=Xf(t),f=Xf(n),s=Yi(o[0]),l=Yi(f[0]),d=Yi(o[1]),v=Yi(f[1]),M=Math.sin(l-s)*Math.cos(v),B=Math.cos(d)*Math.sin(v)-Math.sin(d)*Math.cos(v)*Math.cos(l-s);return mh(Math.atan2(M,B))}function Hg(t,n){var i=cv(n,t);return i=(i+180)%360,i}function zg(t,n){var i=uv(t,n),o=cv(t,n),f=Yg(t,i/2,o);return f}const hv=[{id:"annotation",type:"annotation",name:"\u6807\u6CE8",collapsed:!1,visible:!0,opacity:1},{id:"output",type:"output",name:"\u6210\u679C\u56FE\u5C42",collapsed:!1,visible:!0,opacity:1},{id:"dataset",type:"dataset",name:"\u6570\u636E\u96C6",collapsed:!1,visible:!0,opacity:1},{id:"overlay",type:"overlay",name:"\u8986\u76D6\u7269",collapsed:!1,visible:!0,opacity:1}],Wg=[{type:"image",img:"satellite",name:"\u5F71\u50CF\u5730\u56FE",items:[{type:"raster",tileSize:256,tiles:["https://t0.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0"],maxzoom:18,layerType:"bmap"},{type:"raster",tileSize:256,tiles:["https://t0.tianditu.gov.cn/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0"],maxzoom:18,layerType:"bmap"}]},{type:"vector_standard",img:"vector_standard",name:"\u77E2\u91CF\u5730\u56FE",items:[{type:"raster",tileSize:256,tiles:["https://t0.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0"],maxzoom:18,layerType:"bmap"},{type:"raster",tileSize:256,tiles:["https://t0.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0"],maxzoom:18,layerType:"bmap"}]}],Vg=["#321644","#455dd1","#2eb4f2","#26eda6","#c3f134","#f8bd39","#e14209","#7a0403"],$g=[{type:"dom",name:"\u6B63\u5C04\u5F71\u50CF\uFF08DOM\uFF09",group:"output",visible:!0,opacity:1,class:"image2d"},{type:"tmp",name:"\u6E29\u5EA6\u56FE",group:"output",visible:!0,opacity:1,class:"tmp"},{type:"dsm",name:"\u6570\u5B57\u8868\u9762\u6A21\u578B\uFF08DSM\uFF09",group:"output",visible:!1,opacity:.5,class:"image2d"},{type:"mesh3d",name:"\u4E09\u7EF4\u6A21\u578B",group:"output",visible:!0,opacity:1,class:"mesh3d"},{type:"ndvi",name:"\u690D\u88AB\u6307\u6570\uFF08NDVI\uFF09",group:"output",visible:!0,opacity:1,class:"ndvi"},{type:"photos",name:"\u7167\u7247",group:"dataset",visible:!1,opacity:1,class:"photos"}],Zg={dom:"tile",dsm:"dsm_tile",ndvi:"ndvi_tile",tmp:"tem_tile"},Xg={annotation:"icon-biaozhu",output:"icon-chengguo",dataset:"icon-photos",overlay:"icon-dataset",geojson:"icon-vector",raster:"icon-tuxiang",object:"icon-cube",dom:"icon-tuxiang",dsm:"icon-moxing",ndvi:"icon-zhishu",mesh3d:"icon-mesh",point_cloud:"icon-dianyun",photos:"icon-24gf-photoAlbum",point:"icon-locate",line:"icon-line",polygon:"icon-polygon"},qg=[{name:"2d",icon:"icon-view_d"},{name:"3d",icon:"icon-view_d1"}],Kg={quality:"medium",output:{normal:[{type:"image2d",name:"\u4E8C\u7EF4\u6B63\u5C04\uFF08DOM+DSM\uFF09"},{type:"mesh3d",name:"\u4E09\u7EF4\u6A21\u578B\uFF083DTiles\uFF09"}],infrared:[{type:"tmp",name:"\u6E29\u5EA6\u56FE",required:!0}],multispectral:[{type:"image2d",name:"\u4E8C\u7EF4\u6B63\u5C04\uFF08DOM+DSM\uFF09"},{type:"ndvi",name:"\u690D\u88AB\u6307\u6570\uFF08NDVI\uFF09",required:!0}]}},jg=[{type:"draw_point",mode:"draw_point",name:"\u6807\u70B9",icon:"icon-locate"},{type:"draw_line_string",mode:"draw_line_string",name:"\u6807\u7EBF",icon:"icon-line"},{type:"draw_polygon",mode:"draw_polygon",name:"\u6807\u9762",icon:"icon-polygon"}];function Qg(){return F_()}function Jg(t){return t?_t(t).format("YYYY-MM-DD HH:mm:ss"):"-"}function ey(){return _t().format("YYYY/M/D HH:mm:ss")}function ty(t){return t=parseInt(t),t=t.toString(),t.length>6?(t=(Number(t)/1e6).toFixed(2),t+" MB"):(t=(Number(t)/1e3).toFixed(2),t+" KB")}async function ry(t){let n=t.slice(0,131072);n.name=t.name;let i=await Bc(n),{GPSAltitude:o,GPSLatitude:f,GPSLatitudeRef:s,GPSLongitude:l,GPSLongitudeRef:d,DateTimeOriginal:v,Model:M,PixelXDimension:B,PixelYDimension:p}=i,U=null;return l&&f&&(U={lng:gh(d)*yh(l),lat:gh(s)*yh(f),alt:+o}),{date:v&&v.split(" ")[0].replaceAll(":","-"),Model:M,width:B,height:p,position:U}}function ny(t){return new Promise((n,i)=>{let o,f,s=t.slice(0,131072);s.name=t.name,Bc(s).then(M=>{f=M,v()});let l=new FileReader,d=new kg.ArrayBuffer;l.readAsArrayBuffer(s),l.onload=M=>{d.append(M.target.result),o=d.end(),v()};function v(){!o||!f||(n({md5:o,exif:f}),l=null,d=null)}})}function gh(t){return t==="N"||t==="E"?1:-1}function yh(t){return t[0]+t[1]/60+t[2]/3600}function iy(t,n=[]){t=dv(t),n=dv(n);let i=[];for(let o of t){let{visible:f}=o;for(let s of o.items||[]){let{id:l,type:d,opacity:v,visible:M,color:B,geometry:p}=s;if(f||(M=!1),["point","line","polygon"].includes(d)&&i.find(pe=>pe[0]==="updateAnnotations"))continue;let U=Au(l,n);if(!U&&!M)continue;if(!U){["point","line","polygon"].includes(d)?i.push(["updateAnnotations",s]):i.push(["addLayer",s]);continue}let{opacity:q,visible:D}=U;mo.isEqual(s,U)||(["point","line","polygon"].includes(d)?i.push(["updateAnnotations",s]):v!==q||d==="geojson"&&!mo.isEqual(s.metadata,U.metadata)?i.push(["updateLayer",s]):M!==D&&i.push([M?"addLayer":"removeLayer",s]))}}for(let o of n)for(let f of o.items||[]){let{id:s,type:l}=f;Au(s,t)||(["point","line","polygon"].includes(l)?i.find(v=>v[0]==="updateAnnotations")||i.push(["updateAnnotations",f]):i.push(["removeLayer",f]))}return i}function Au(t,n){var i;for(let o of n){if(o.id===t)return o;if((i=o.items)!=null&&i.length){let f=Au(t,o.items);if(f)return f}}return null}function dv(t){let n=mo.cloneDeep(t);for(let i of n)for(let o of i.items||[])i.visible||(o.visible=!1);return n}function ay(t,n){let i=t.style._layers,o=t.style.order,{layerType:f}=n.metadata;return o.find(d=>{let v=i[d].metadata;return mo.isEmpty(v)&&(v={layerType:"dsm"}),l(f,n.id)<l(v.layerType,d)})||"";function l(d,v){const M=[["bmap"],["dom"],["ndvi"],["dsm"],["circle"],["annotation"],["label"]];let B=-1;return v.startsWith("gl-draw")?B=5:B=M.findIndex(p=>p.includes(d)),B===-1?100:B}}function oy(t){if(!t)return!1;let{message:n="",msg:i=""}=t.data;return t.status==401&&(i.toLowerCase().includes("expired")||n.toLowerCase().includes("expired"))}function sy(t){for(let n in ph)if(ph[n].includes(t))return n;return"normal"}function fy(t){let n=`\u5FEB\u7167${_t().format("YYYYMMDD")}${new Date().getTime()}.png`,i=document.createElement("a");i.href=t,i.download=n,document.body.appendChild(i),i.click(),document.body.removeChild(i)}function ly(t){let n=Ug(t);return["Point","MultiPoint"].includes(n)?"point":["LineString","MultiLineString"].includes(n)?"line":"polygon"}function uy(t){let n=t[3]>128?0:1,i=-1*(1-n)+n,o=Math.floor((t[3]+.1)%128)*2+Math.floor((t[2]+.1)/128)-127,f=t[0]+t[1]*256+Math.floor((t[2]+.1)%128)*256*256;return i*(1+f/8388607)*Math.pow(2,o)}function cy(t){let{geometry:n}=t,i=mo.cloneDeep(t);return delete i.geometry,{id:i.id,type:"Feature",properties:i,geometry:mo.cloneDeep(n)}}function hy(t,n){let i=[],o=n==="point"?"\u70B9\u6CE8\u8BB0":n==="line"?"\u7EBF\u6CE8\u8BB0":"\u9762\u6CE8\u8BB0";t.forEach(f=>{if(f.name===o){i.push(0);return}if(f.name.startsWith(`${o} `)){let s=Number(f.name.split(" ").pop());Number.isNaN(s)||i.push(s)}}),i=i.sort((f,s)=>f-s);for(let f=0;f<i.length;f++)if(i[f]!==f)return f===0?o:`${o} ${f}`;return i.length===0?o:`${o} ${i.length}`}function dy(t){let n=t.geometry.coordinates,i=[];for(let v=1;v<n.length;v++)uv(n[v-1],n[v],{units:"meters"})>30&&i.push([n[v-1],n[v]]);let o=[];if(i.length){let v=Math.floor(i.length/2);o=i[v]}else{let v=Math.floor(n.length/2-1);o=[n[v],n[v+1]]}let f=bh(o[0]),s=bh(o[1]),l=360-Math.atan((f.y-s.y)/(s.x-f.x))*180/Math.PI,d=zg(o[0],o[1]);return d.properties=t.properties,d.properties.angle=l,d.geometry.coordinates.push(((o[0][2]||0)+(o[1][2]||0))/2),d}function bh(t,n=12){let[i,o]=t,f=(180+i)/360,s=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+o*Math.PI/360)))/360;return{x:f*Math.pow(2,n)*512,y:s*Math.pow(2,n)*512}}function vy(t,n){n.forEach(i=>{t.loadImage(i,(o,f)=>{let s=i.split("/").pop().split(".")[0];if(!t.hasImage(s)){if(o)throw o;t.addImage(s,f)}})})}function _y(t,n,i){var s;let o=mo.cloneDeep(((s=t.metadata)==null?void 0:s.groups)||hv);return o.forEach(l=>l.items=[]),n.forEach(l=>{let d=mo.cloneDeep(l);d.group||d.group,o.find(M=>M.id===d.group).items.push(d)}),(t.status==="complete"?i:[]).forEach(l=>{let{group:d}=l,v=o.find(M=>M.id===d);!v||v.items.push(l)}),o}let go=null;function vv(t,n,i){i[t]=i[t]||[],i[t].push(n)}function xh(t,n,i){if(i&&i[t]){const o=i[t].indexOf(n);o!==-1&&i[t].splice(o,1)}}function _v(t,...n){for(const i of n)for(const o in i)t[o]=i[o];return t}function py(t,n){return t.indexOf(n,t.length-n.length)!==-1}class my{constructor(){this._listeners=[],this._oneTimeListeners=[],this._eventedParent=null,this._eventedParentData=null}on(n,i){return this._listeners=this._listeners||{},vv(n,i,this._listeners),this}off(n,i){if(!i){this._listeners={},this._oneTimeListeners={};return}return xh(n,i,this._listeners),xh(n,i,this._oneTimeListeners),this}once(n,i){return this._oneTimeListeners=this._oneTimeListeners||{},vv(n,i,this._oneTimeListeners),this}fire(n,i){if(this.listens(n)){if(i=_v({},i,{type:n,target:this}),go){if(i.point&&go===i.point.x+i.point.y){if(go===i.point.x+i.point.y)return;go=i.point.x+i.point.y}else if(i.feature){if(go===i.x+i.y)return;go=i.x+i.y}}else i.point?go=i.point.x+i.point.y:i.feature&&(go=i.x+i.y);const o=this._listeners&&this._listeners[n]?this._listeners[n].slice():[];for(let s=0;s<o.length;s++)o[s].call(this,i);const f=this._oneTimeListeners&&this._oneTimeListeners[n]?this._oneTimeListeners[n].slice():[];for(let s=0;s<f.length;s++)f[s].call(this,i),xh(n,f[s],this._oneTimeListeners);this._eventedParent&&this._eventedParent.fire(n,_v({},i,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData))}else py(n,"error")&&console.error(i&&i.error||i||"Empty error event");return this}listens(n){return this._listeners&&this._listeners[n]&&this._listeners[n].length>0||this._oneTimeListeners&&this._oneTimeListeners[n]&&this._oneTimeListeners[n].length>0||this._eventedParent&&this._eventedParent.listens(n)}setEventedParent(n,i){return this._eventedParent=n,this._eventedParentData=i,this}}const gy={tileFormat:"float32",tileSize:256,colorScale:[],sentinelValues:[],transitions:!1,transitionTimeMs:800,debug:!1,extraPixelLayers:0,colorscaleMaxLength:16,sentinelMaxLength:16,minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,glOperation:"none",multiLayers:0,operationUrlA:"",operationUrlB:"",operationUrlC:"",operationUrlD:"",operationUrlE:"",operationUrlF:"",filterLowA:0,filterHighA:1e5,filterLowB:0,filterHighB:1e5,filterLowC:0,filterHighC:1e5,filterLowD:0,filterHighD:1e5,filterLowE:0,filterHighE:1e5,filterLowF:0,filterHighF:1e5,multiplierA:1,multiplierB:1,multiplierC:1,multiplierD:1,multiplierE:1,multiplierF:1,hillshadeType:"none",hsSimpleZoomdelta:0,hsSimpleSlopescale:3,hsSimpleAzimuth:315,hsSimpleAltitude:70,hsAdvValueScale:1,hsAdvPixelScale:"auto",hsAdvSoftIterations:10,hsAdvAmbientIterations:10,hsAdvSunRadiusMultiplier:100,hsAdvFinalSoftMultiplier:1,hsAdvFinalAmbientMultiplier:.25,hsAdvBaselayerUrl:"",hsAdvSmoothInput:!1,hsAdvSmoothInputKernel:3,hsPregenUrl:"",_hillshadeOptions:{hillshadeType:"none"},contourType:"none",contourSmoothLines:!1,contourSmoothInput:!1,contourSmoothInputKernel:7,contourScaleFactor:1,contourInterval:25,contourIndexInterval:100,contourLineColor:"#000000",contourIlluminatedHighlightColor:"rgba(177,174,164,.5)",contourIlluminatedShadowColor:"#5b5143",contourIlluminatedShadowSize:2,contourLineWeight:.5,contourLineIndexWeight:2,contourIndexLabels:!1,contourLabelFont:"12px Arial",contourLabelDistance:250,contourHypso:!1,contourHypsoDomain:[0,1e3,2e3],contourHypsoColors:["#486341","#e5d9c9","#dddddd"],contourBathy:!1,contourBathyDomain:[-2e3,0],contourBathyColors:["#315d9b","#d5f2ff"],contourBathyShadowColor:"#4e5c66",contourBathyHighlightColor:"rgba(224, 242, 255, .5)"};function yy(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var wh={exports:{}},Sh={},pv;function yo(){return pv||(pv=1,function(t){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function i(s,l){return Object.prototype.hasOwnProperty.call(s,l)}t.assign=function(s){for(var l=Array.prototype.slice.call(arguments,1);l.length;){var d=l.shift();if(!!d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var v in d)i(d,v)&&(s[v]=d[v])}}return s},t.shrinkBuf=function(s,l){return s.length===l?s:s.subarray?s.subarray(0,l):(s.length=l,s)};var o={arraySet:function(s,l,d,v,M){if(l.subarray&&s.subarray){s.set(l.subarray(d,d+v),M);return}for(var B=0;B<v;B++)s[M+B]=l[d+B]},flattenChunks:function(s){var l,d,v,M,B,p;for(v=0,l=0,d=s.length;l<d;l++)v+=s[l].length;for(p=new Uint8Array(v),M=0,l=0,d=s.length;l<d;l++)B=s[l],p.set(B,M),M+=B.length;return p}},f={arraySet:function(s,l,d,v,M){for(var B=0;B<v;B++)s[M+B]=l[d+B]},flattenChunks:function(s){return[].concat.apply([],s)}};t.setTyped=function(s){s?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,o)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,f))},t.setTyped(n)}(Sh)),Sh}var Hs={},Hi={},Ko={},mv;function by(){if(mv)return Ko;mv=1;var t=yo(),n=4,i=0,o=1,f=2;function s(C){for(var Ue=C.length;--Ue>=0;)C[Ue]=0}var l=0,d=1,v=2,M=3,B=258,p=29,U=256,q=U+1+p,D=30,pe=19,ue=2*q+1,b=15,A=16,g=7,x=256,P=16,F=17,J=18,Te=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],nt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ut=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],it=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],st=512,tt=new Array((q+2)*2);s(tt);var Re=new Array(D*2);s(Re);var Ot=new Array(st);s(Ot);var bt=new Array(B-M+1);s(bt);var Me=new Array(p);s(Me);var Ze=new Array(D);s(Ze);function St(C,Ue,Xe,dt,Z){this.static_tree=C,this.extra_bits=Ue,this.extra_base=Xe,this.elems=dt,this.max_length=Z,this.has_stree=C&&C.length}var $t,Wt,Qt;function sr(C,Ue){this.dyn_tree=C,this.max_code=0,this.stat_desc=Ue}function xr(C){return C<256?Ot[C]:Ot[256+(C>>>7)]}function lr(C,Ue){C.pending_buf[C.pending++]=Ue&255,C.pending_buf[C.pending++]=Ue>>>8&255}function Kt(C,Ue,Xe){C.bi_valid>A-Xe?(C.bi_buf|=Ue<<C.bi_valid&65535,lr(C,C.bi_buf),C.bi_buf=Ue>>A-C.bi_valid,C.bi_valid+=Xe-A):(C.bi_buf|=Ue<<C.bi_valid&65535,C.bi_valid+=Xe)}function wr(C,Ue,Xe){Kt(C,Xe[Ue*2],Xe[Ue*2+1])}function Gt(C,Ue){var Xe=0;do Xe|=C&1,C>>>=1,Xe<<=1;while(--Ue>0);return Xe>>>1}function It(C){C.bi_valid===16?(lr(C,C.bi_buf),C.bi_buf=0,C.bi_valid=0):C.bi_valid>=8&&(C.pending_buf[C.pending++]=C.bi_buf&255,C.bi_buf>>=8,C.bi_valid-=8)}function hn(C,Ue){var Xe=Ue.dyn_tree,dt=Ue.max_code,Z=Ue.stat_desc.static_tree,we=Ue.stat_desc.has_stree,m=Ue.stat_desc.extra_bits,He=Ue.stat_desc.extra_base,Nt=Ue.stat_desc.max_length,u,de,ye,w,V,ce,Et=0;for(w=0;w<=b;w++)C.bl_count[w]=0;for(Xe[C.heap[C.heap_max]*2+1]=0,u=C.heap_max+1;u<ue;u++)de=C.heap[u],w=Xe[Xe[de*2+1]*2+1]+1,w>Nt&&(w=Nt,Et++),Xe[de*2+1]=w,!(de>dt)&&(C.bl_count[w]++,V=0,de>=He&&(V=m[de-He]),ce=Xe[de*2],C.opt_len+=ce*(w+V),we&&(C.static_len+=ce*(Z[de*2+1]+V)));if(Et!==0){do{for(w=Nt-1;C.bl_count[w]===0;)w--;C.bl_count[w]--,C.bl_count[w+1]+=2,C.bl_count[Nt]--,Et-=2}while(Et>0);for(w=Nt;w!==0;w--)for(de=C.bl_count[w];de!==0;)ye=C.heap[--u],!(ye>dt)&&(Xe[ye*2+1]!==w&&(C.opt_len+=(w-Xe[ye*2+1])*Xe[ye*2],Xe[ye*2+1]=w),de--)}}function jr(C,Ue,Xe){var dt=new Array(b+1),Z=0,we,m;for(we=1;we<=b;we++)dt[we]=Z=Z+Xe[we-1]<<1;for(m=0;m<=Ue;m++){var He=C[m*2+1];He!==0&&(C[m*2]=Gt(dt[He]++,He))}}function kt(){var C,Ue,Xe,dt,Z,we=new Array(b+1);for(Xe=0,dt=0;dt<p-1;dt++)for(Me[dt]=Xe,C=0;C<1<<Te[dt];C++)bt[Xe++]=dt;for(bt[Xe-1]=dt,Z=0,dt=0;dt<16;dt++)for(Ze[dt]=Z,C=0;C<1<<nt[dt];C++)Ot[Z++]=dt;for(Z>>=7;dt<D;dt++)for(Ze[dt]=Z<<7,C=0;C<1<<nt[dt]-7;C++)Ot[256+Z++]=dt;for(Ue=0;Ue<=b;Ue++)we[Ue]=0;for(C=0;C<=143;)tt[C*2+1]=8,C++,we[8]++;for(;C<=255;)tt[C*2+1]=9,C++,we[9]++;for(;C<=279;)tt[C*2+1]=7,C++,we[7]++;for(;C<=287;)tt[C*2+1]=8,C++,we[8]++;for(jr(tt,q+1,we),C=0;C<D;C++)Re[C*2+1]=5,Re[C*2]=Gt(C,5);$t=new St(tt,Te,U+1,q,b),Wt=new St(Re,nt,0,D,b),Qt=new St(new Array(0),ut,0,pe,g)}function Nr(C){var Ue;for(Ue=0;Ue<q;Ue++)C.dyn_ltree[Ue*2]=0;for(Ue=0;Ue<D;Ue++)C.dyn_dtree[Ue*2]=0;for(Ue=0;Ue<pe;Ue++)C.bl_tree[Ue*2]=0;C.dyn_ltree[x*2]=1,C.opt_len=C.static_len=0,C.last_lit=C.matches=0}function Fr(C){C.bi_valid>8?lr(C,C.bi_buf):C.bi_valid>0&&(C.pending_buf[C.pending++]=C.bi_buf),C.bi_buf=0,C.bi_valid=0}function Zr(C,Ue,Xe,dt){Fr(C),dt&&(lr(C,Xe),lr(C,~Xe)),t.arraySet(C.pending_buf,C.window,Ue,Xe,C.pending),C.pending+=Xe}function Qr(C,Ue,Xe,dt){var Z=Ue*2,we=Xe*2;return C[Z]<C[we]||C[Z]===C[we]&&dt[Ue]<=dt[Xe]}function ar(C,Ue,Xe){for(var dt=C.heap[Xe],Z=Xe<<1;Z<=C.heap_len&&(Z<C.heap_len&&Qr(Ue,C.heap[Z+1],C.heap[Z],C.depth)&&Z++,!Qr(Ue,dt,C.heap[Z],C.depth));)C.heap[Xe]=C.heap[Z],Xe=Z,Z<<=1;C.heap[Xe]=dt}function Pt(C,Ue,Xe){var dt,Z,we=0,m,He;if(C.last_lit!==0)do dt=C.pending_buf[C.d_buf+we*2]<<8|C.pending_buf[C.d_buf+we*2+1],Z=C.pending_buf[C.l_buf+we],we++,dt===0?wr(C,Z,Ue):(m=bt[Z],wr(C,m+U+1,Ue),He=Te[m],He!==0&&(Z-=Me[m],Kt(C,Z,He)),dt--,m=xr(dt),wr(C,m,Xe),He=nt[m],He!==0&&(dt-=Ze[m],Kt(C,dt,He)));while(we<C.last_lit);wr(C,x,Ue)}function Tn(C,Ue){var Xe=Ue.dyn_tree,dt=Ue.stat_desc.static_tree,Z=Ue.stat_desc.has_stree,we=Ue.stat_desc.elems,m,He,Nt=-1,u;for(C.heap_len=0,C.heap_max=ue,m=0;m<we;m++)Xe[m*2]!==0?(C.heap[++C.heap_len]=Nt=m,C.depth[m]=0):Xe[m*2+1]=0;for(;C.heap_len<2;)u=C.heap[++C.heap_len]=Nt<2?++Nt:0,Xe[u*2]=1,C.depth[u]=0,C.opt_len--,Z&&(C.static_len-=dt[u*2+1]);for(Ue.max_code=Nt,m=C.heap_len>>1;m>=1;m--)ar(C,Xe,m);u=we;do m=C.heap[1],C.heap[1]=C.heap[C.heap_len--],ar(C,Xe,1),He=C.heap[1],C.heap[--C.heap_max]=m,C.heap[--C.heap_max]=He,Xe[u*2]=Xe[m*2]+Xe[He*2],C.depth[u]=(C.depth[m]>=C.depth[He]?C.depth[m]:C.depth[He])+1,Xe[m*2+1]=Xe[He*2+1]=u,C.heap[1]=u++,ar(C,Xe,1);while(C.heap_len>=2);C.heap[--C.heap_max]=C.heap[1],hn(C,Ue),jr(Xe,Nt,C.bl_count)}function En(C,Ue,Xe){var dt,Z=-1,we,m=Ue[0*2+1],He=0,Nt=7,u=4;for(m===0&&(Nt=138,u=3),Ue[(Xe+1)*2+1]=65535,dt=0;dt<=Xe;dt++)we=m,m=Ue[(dt+1)*2+1],!(++He<Nt&&we===m)&&(He<u?C.bl_tree[we*2]+=He:we!==0?(we!==Z&&C.bl_tree[we*2]++,C.bl_tree[P*2]++):He<=10?C.bl_tree[F*2]++:C.bl_tree[J*2]++,He=0,Z=we,m===0?(Nt=138,u=3):we===m?(Nt=6,u=3):(Nt=7,u=4))}function Jr(C,Ue,Xe){var dt,Z=-1,we,m=Ue[0*2+1],He=0,Nt=7,u=4;for(m===0&&(Nt=138,u=3),dt=0;dt<=Xe;dt++)if(we=m,m=Ue[(dt+1)*2+1],!(++He<Nt&&we===m)){if(He<u)do wr(C,we,C.bl_tree);while(--He!==0);else we!==0?(we!==Z&&(wr(C,we,C.bl_tree),He--),wr(C,P,C.bl_tree),Kt(C,He-3,2)):He<=10?(wr(C,F,C.bl_tree),Kt(C,He-3,3)):(wr(C,J,C.bl_tree),Kt(C,He-11,7));He=0,Z=we,m===0?(Nt=138,u=3):we===m?(Nt=6,u=3):(Nt=7,u=4)}}function an(C){var Ue;for(En(C,C.dyn_ltree,C.l_desc.max_code),En(C,C.dyn_dtree,C.d_desc.max_code),Tn(C,C.bl_desc),Ue=pe-1;Ue>=3&&C.bl_tree[it[Ue]*2+1]===0;Ue--);return C.opt_len+=3*(Ue+1)+5+5+4,Ue}function E(C,Ue,Xe,dt){var Z;for(Kt(C,Ue-257,5),Kt(C,Xe-1,5),Kt(C,dt-4,4),Z=0;Z<dt;Z++)Kt(C,C.bl_tree[it[Z]*2+1],3);Jr(C,C.dyn_ltree,Ue-1),Jr(C,C.dyn_dtree,Xe-1)}function di(C){var Ue=4093624447,Xe;for(Xe=0;Xe<=31;Xe++,Ue>>>=1)if(Ue&1&&C.dyn_ltree[Xe*2]!==0)return i;if(C.dyn_ltree[9*2]!==0||C.dyn_ltree[10*2]!==0||C.dyn_ltree[13*2]!==0)return o;for(Xe=32;Xe<U;Xe++)if(C.dyn_ltree[Xe*2]!==0)return o;return i}var dn=!1;function zi(C){dn||(kt(),dn=!0),C.l_desc=new sr(C.dyn_ltree,$t),C.d_desc=new sr(C.dyn_dtree,Wt),C.bl_desc=new sr(C.bl_tree,Qt),C.bi_buf=0,C.bi_valid=0,Nr(C)}function Nn(C,Ue,Xe,dt){Kt(C,(l<<1)+(dt?1:0),3),Zr(C,Ue,Xe,!0)}function Tr(C){Kt(C,d<<1,3),wr(C,x,tt),It(C)}function Dn(C,Ue,Xe,dt){var Z,we,m=0;C.level>0?(C.strm.data_type===f&&(C.strm.data_type=di(C)),Tn(C,C.l_desc),Tn(C,C.d_desc),m=an(C),Z=C.opt_len+3+7>>>3,we=C.static_len+3+7>>>3,we<=Z&&(Z=we)):Z=we=Xe+5,Xe+4<=Z&&Ue!==-1?Nn(C,Ue,Xe,dt):C.strategy===n||we===Z?(Kt(C,(d<<1)+(dt?1:0),3),Pt(C,tt,Re)):(Kt(C,(v<<1)+(dt?1:0),3),E(C,C.l_desc.max_code+1,C.d_desc.max_code+1,m+1),Pt(C,C.dyn_ltree,C.dyn_dtree)),Nr(C),dt&&Fr(C)}function Bn(C,Ue,Xe){return C.pending_buf[C.d_buf+C.last_lit*2]=Ue>>>8&255,C.pending_buf[C.d_buf+C.last_lit*2+1]=Ue&255,C.pending_buf[C.l_buf+C.last_lit]=Xe&255,C.last_lit++,Ue===0?C.dyn_ltree[Xe*2]++:(C.matches++,Ue--,C.dyn_ltree[(bt[Xe]+U+1)*2]++,C.dyn_dtree[xr(Ue)*2]++),C.last_lit===C.lit_bufsize-1}return Ko._tr_init=zi,Ko._tr_stored_block=Nn,Ko._tr_flush_block=Dn,Ko._tr_tally=Bn,Ko._tr_align=Tr,Ko}var Ah,gv;function yv(){if(gv)return Ah;gv=1;function t(n,i,o,f){for(var s=n&65535|0,l=n>>>16&65535|0,d=0;o!==0;){d=o>2e3?2e3:o,o-=d;do s=s+i[f++]|0,l=l+s|0;while(--d);s%=65521,l%=65521}return s|l<<16|0}return Ah=t,Ah}var Th,bv;function xv(){if(bv)return Th;bv=1;function t(){for(var o,f=[],s=0;s<256;s++){o=s;for(var l=0;l<8;l++)o=o&1?3988292384^o>>>1:o>>>1;f[s]=o}return f}var n=t();function i(o,f,s,l){var d=n,v=l+s;o^=-1;for(var M=l;M<v;M++)o=o>>>8^d[(o^f[M])&255];return o^-1}return Th=i,Th}var Eh,wv;function Dh(){return wv||(wv=1,Eh={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"}),Eh}var Sv;function xy(){if(Sv)return Hi;Sv=1;var t=yo(),n=by(),i=yv(),o=xv(),f=Dh(),s=0,l=1,d=3,v=4,M=5,B=0,p=1,U=-2,q=-3,D=-5,pe=-1,ue=1,b=2,A=3,g=4,x=0,P=2,F=8,J=9,Te=15,nt=8,ut=29,it=256,st=it+1+ut,tt=30,Re=19,Ot=2*st+1,bt=15,Me=3,Ze=258,St=Ze+Me+1,$t=32,Wt=42,Qt=69,sr=73,xr=91,lr=103,Kt=113,wr=666,Gt=1,It=2,hn=3,jr=4,kt=3;function Nr(u,de){return u.msg=f[de],de}function Fr(u){return(u<<1)-(u>4?9:0)}function Zr(u){for(var de=u.length;--de>=0;)u[de]=0}function Qr(u){var de=u.state,ye=de.pending;ye>u.avail_out&&(ye=u.avail_out),ye!==0&&(t.arraySet(u.output,de.pending_buf,de.pending_out,ye,u.next_out),u.next_out+=ye,de.pending_out+=ye,u.total_out+=ye,u.avail_out-=ye,de.pending-=ye,de.pending===0&&(de.pending_out=0))}function ar(u,de){n._tr_flush_block(u,u.block_start>=0?u.block_start:-1,u.strstart-u.block_start,de),u.block_start=u.strstart,Qr(u.strm)}function Pt(u,de){u.pending_buf[u.pending++]=de}function Tn(u,de){u.pending_buf[u.pending++]=de>>>8&255,u.pending_buf[u.pending++]=de&255}function En(u,de,ye,w){var V=u.avail_in;return V>w&&(V=w),V===0?0:(u.avail_in-=V,t.arraySet(de,u.input,u.next_in,V,ye),u.state.wrap===1?u.adler=i(u.adler,de,V,ye):u.state.wrap===2&&(u.adler=o(u.adler,de,V,ye)),u.next_in+=V,u.total_in+=V,V)}function Jr(u,de){var ye=u.max_chain_length,w=u.strstart,V,ce,Et=u.prev_length,at=u.nice_match,mt=u.strstart>u.w_size-St?u.strstart-(u.w_size-St):0,ur=u.window,vi=u.w_mask,kr=u.prev,dr=u.strstart+Ze,Yr=ur[w+Et-1],vn=ur[w+Et];u.prev_length>=u.good_match&&(ye>>=2),at>u.lookahead&&(at=u.lookahead);do if(V=de,!(ur[V+Et]!==vn||ur[V+Et-1]!==Yr||ur[V]!==ur[w]||ur[++V]!==ur[w+1])){w+=2,V++;do;while(ur[++w]===ur[++V]&&ur[++w]===ur[++V]&&ur[++w]===ur[++V]&&ur[++w]===ur[++V]&&ur[++w]===ur[++V]&&ur[++w]===ur[++V]&&ur[++w]===ur[++V]&&ur[++w]===ur[++V]&&w<dr);if(ce=Ze-(dr-w),w=dr-Ze,ce>Et){if(u.match_start=de,Et=ce,ce>=at)break;Yr=ur[w+Et-1],vn=ur[w+Et]}}while((de=kr[de&vi])>mt&&--ye!==0);return Et<=u.lookahead?Et:u.lookahead}function an(u){var de=u.w_size,ye,w,V,ce,Et;do{if(ce=u.window_size-u.lookahead-u.strstart,u.strstart>=de+(de-St)){t.arraySet(u.window,u.window,de,de,0),u.match_start-=de,u.strstart-=de,u.block_start-=de,w=u.hash_size,ye=w;do V=u.head[--ye],u.head[ye]=V>=de?V-de:0;while(--w);w=de,ye=w;do V=u.prev[--ye],u.prev[ye]=V>=de?V-de:0;while(--w);ce+=de}if(u.strm.avail_in===0)break;if(w=En(u.strm,u.window,u.strstart+u.lookahead,ce),u.lookahead+=w,u.lookahead+u.insert>=Me)for(Et=u.strstart-u.insert,u.ins_h=u.window[Et],u.ins_h=(u.ins_h<<u.hash_shift^u.window[Et+1])&u.hash_mask;u.insert&&(u.ins_h=(u.ins_h<<u.hash_shift^u.window[Et+Me-1])&u.hash_mask,u.prev[Et&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=Et,Et++,u.insert--,!(u.lookahead+u.insert<Me)););}while(u.lookahead<St&&u.strm.avail_in!==0)}function E(u,de){var ye=65535;for(ye>u.pending_buf_size-5&&(ye=u.pending_buf_size-5);;){if(u.lookahead<=1){if(an(u),u.lookahead===0&&de===s)return Gt;if(u.lookahead===0)break}u.strstart+=u.lookahead,u.lookahead=0;var w=u.block_start+ye;if((u.strstart===0||u.strstart>=w)&&(u.lookahead=u.strstart-w,u.strstart=w,ar(u,!1),u.strm.avail_out===0)||u.strstart-u.block_start>=u.w_size-St&&(ar(u,!1),u.strm.avail_out===0))return Gt}return u.insert=0,de===v?(ar(u,!0),u.strm.avail_out===0?hn:jr):(u.strstart>u.block_start&&(ar(u,!1),u.strm.avail_out===0),Gt)}function di(u,de){for(var ye,w;;){if(u.lookahead<St){if(an(u),u.lookahead<St&&de===s)return Gt;if(u.lookahead===0)break}if(ye=0,u.lookahead>=Me&&(u.ins_h=(u.ins_h<<u.hash_shift^u.window[u.strstart+Me-1])&u.hash_mask,ye=u.prev[u.strstart&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=u.strstart),ye!==0&&u.strstart-ye<=u.w_size-St&&(u.match_length=Jr(u,ye)),u.match_length>=Me)if(w=n._tr_tally(u,u.strstart-u.match_start,u.match_length-Me),u.lookahead-=u.match_length,u.match_length<=u.max_lazy_match&&u.lookahead>=Me){u.match_length--;do u.strstart++,u.ins_h=(u.ins_h<<u.hash_shift^u.window[u.strstart+Me-1])&u.hash_mask,ye=u.prev[u.strstart&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=u.strstart;while(--u.match_length!==0);u.strstart++}else u.strstart+=u.match_length,u.match_length=0,u.ins_h=u.window[u.strstart],u.ins_h=(u.ins_h<<u.hash_shift^u.window[u.strstart+1])&u.hash_mask;else w=n._tr_tally(u,0,u.window[u.strstart]),u.lookahead--,u.strstart++;if(w&&(ar(u,!1),u.strm.avail_out===0))return Gt}return u.insert=u.strstart<Me-1?u.strstart:Me-1,de===v?(ar(u,!0),u.strm.avail_out===0?hn:jr):u.last_lit&&(ar(u,!1),u.strm.avail_out===0)?Gt:It}function dn(u,de){for(var ye,w,V;;){if(u.lookahead<St){if(an(u),u.lookahead<St&&de===s)return Gt;if(u.lookahead===0)break}if(ye=0,u.lookahead>=Me&&(u.ins_h=(u.ins_h<<u.hash_shift^u.window[u.strstart+Me-1])&u.hash_mask,ye=u.prev[u.strstart&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=u.strstart),u.prev_length=u.match_length,u.prev_match=u.match_start,u.match_length=Me-1,ye!==0&&u.prev_length<u.max_lazy_match&&u.strstart-ye<=u.w_size-St&&(u.match_length=Jr(u,ye),u.match_length<=5&&(u.strategy===ue||u.match_length===Me&&u.strstart-u.match_start>4096)&&(u.match_length=Me-1)),u.prev_length>=Me&&u.match_length<=u.prev_length){V=u.strstart+u.lookahead-Me,w=n._tr_tally(u,u.strstart-1-u.prev_match,u.prev_length-Me),u.lookahead-=u.prev_length-1,u.prev_length-=2;do++u.strstart<=V&&(u.ins_h=(u.ins_h<<u.hash_shift^u.window[u.strstart+Me-1])&u.hash_mask,ye=u.prev[u.strstart&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=u.strstart);while(--u.prev_length!==0);if(u.match_available=0,u.match_length=Me-1,u.strstart++,w&&(ar(u,!1),u.strm.avail_out===0))return Gt}else if(u.match_available){if(w=n._tr_tally(u,0,u.window[u.strstart-1]),w&&ar(u,!1),u.strstart++,u.lookahead--,u.strm.avail_out===0)return Gt}else u.match_available=1,u.strstart++,u.lookahead--}return u.match_available&&(w=n._tr_tally(u,0,u.window[u.strstart-1]),u.match_available=0),u.insert=u.strstart<Me-1?u.strstart:Me-1,de===v?(ar(u,!0),u.strm.avail_out===0?hn:jr):u.last_lit&&(ar(u,!1),u.strm.avail_out===0)?Gt:It}function zi(u,de){for(var ye,w,V,ce,Et=u.window;;){if(u.lookahead<=Ze){if(an(u),u.lookahead<=Ze&&de===s)return Gt;if(u.lookahead===0)break}if(u.match_length=0,u.lookahead>=Me&&u.strstart>0&&(V=u.strstart-1,w=Et[V],w===Et[++V]&&w===Et[++V]&&w===Et[++V])){ce=u.strstart+Ze;do;while(w===Et[++V]&&w===Et[++V]&&w===Et[++V]&&w===Et[++V]&&w===Et[++V]&&w===Et[++V]&&w===Et[++V]&&w===Et[++V]&&V<ce);u.match_length=Ze-(ce-V),u.match_length>u.lookahead&&(u.match_length=u.lookahead)}if(u.match_length>=Me?(ye=n._tr_tally(u,1,u.match_length-Me),u.lookahead-=u.match_length,u.strstart+=u.match_length,u.match_length=0):(ye=n._tr_tally(u,0,u.window[u.strstart]),u.lookahead--,u.strstart++),ye&&(ar(u,!1),u.strm.avail_out===0))return Gt}return u.insert=0,de===v?(ar(u,!0),u.strm.avail_out===0?hn:jr):u.last_lit&&(ar(u,!1),u.strm.avail_out===0)?Gt:It}function Nn(u,de){for(var ye;;){if(u.lookahead===0&&(an(u),u.lookahead===0)){if(de===s)return Gt;break}if(u.match_length=0,ye=n._tr_tally(u,0,u.window[u.strstart]),u.lookahead--,u.strstart++,ye&&(ar(u,!1),u.strm.avail_out===0))return Gt}return u.insert=0,de===v?(ar(u,!0),u.strm.avail_out===0?hn:jr):u.last_lit&&(ar(u,!1),u.strm.avail_out===0)?Gt:It}function Tr(u,de,ye,w,V){this.good_length=u,this.max_lazy=de,this.nice_length=ye,this.max_chain=w,this.func=V}var Dn;Dn=[new Tr(0,0,0,0,E),new Tr(4,4,8,4,di),new Tr(4,5,16,8,di),new Tr(4,6,32,32,di),new Tr(4,4,16,16,dn),new Tr(8,16,32,32,dn),new Tr(8,16,128,128,dn),new Tr(8,32,128,256,dn),new Tr(32,128,258,1024,dn),new Tr(32,258,258,4096,dn)];function Bn(u){u.window_size=2*u.w_size,Zr(u.head),u.max_lazy_match=Dn[u.level].max_lazy,u.good_match=Dn[u.level].good_length,u.nice_match=Dn[u.level].nice_length,u.max_chain_length=Dn[u.level].max_chain,u.strstart=0,u.block_start=0,u.lookahead=0,u.insert=0,u.match_length=u.prev_length=Me-1,u.match_available=0,u.ins_h=0}function C(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=F,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new t.Buf16(Ot*2),this.dyn_dtree=new t.Buf16((2*tt+1)*2),this.bl_tree=new t.Buf16((2*Re+1)*2),Zr(this.dyn_ltree),Zr(this.dyn_dtree),Zr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new t.Buf16(bt+1),this.heap=new t.Buf16(2*st+1),Zr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new t.Buf16(2*st+1),Zr(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Ue(u){var de;return!u||!u.state?Nr(u,U):(u.total_in=u.total_out=0,u.data_type=P,de=u.state,de.pending=0,de.pending_out=0,de.wrap<0&&(de.wrap=-de.wrap),de.status=de.wrap?Wt:Kt,u.adler=de.wrap===2?0:1,de.last_flush=s,n._tr_init(de),B)}function Xe(u){var de=Ue(u);return de===B&&Bn(u.state),de}function dt(u,de){return!u||!u.state||u.state.wrap!==2?U:(u.state.gzhead=de,B)}function Z(u,de,ye,w,V,ce){if(!u)return U;var Et=1;if(de===pe&&(de=6),w<0?(Et=0,w=-w):w>15&&(Et=2,w-=16),V<1||V>J||ye!==F||w<8||w>15||de<0||de>9||ce<0||ce>g)return Nr(u,U);w===8&&(w=9);var at=new C;return u.state=at,at.strm=u,at.wrap=Et,at.gzhead=null,at.w_bits=w,at.w_size=1<<at.w_bits,at.w_mask=at.w_size-1,at.hash_bits=V+7,at.hash_size=1<<at.hash_bits,at.hash_mask=at.hash_size-1,at.hash_shift=~~((at.hash_bits+Me-1)/Me),at.window=new t.Buf8(at.w_size*2),at.head=new t.Buf16(at.hash_size),at.prev=new t.Buf16(at.w_size),at.lit_bufsize=1<<V+6,at.pending_buf_size=at.lit_bufsize*4,at.pending_buf=new t.Buf8(at.pending_buf_size),at.d_buf=1*at.lit_bufsize,at.l_buf=(1+2)*at.lit_bufsize,at.level=de,at.strategy=ce,at.method=ye,Xe(u)}function we(u,de){return Z(u,de,F,Te,nt,x)}function m(u,de){var ye,w,V,ce;if(!u||!u.state||de>M||de<0)return u?Nr(u,U):U;if(w=u.state,!u.output||!u.input&&u.avail_in!==0||w.status===wr&&de!==v)return Nr(u,u.avail_out===0?D:U);if(w.strm=u,ye=w.last_flush,w.last_flush=de,w.status===Wt)if(w.wrap===2)u.adler=0,Pt(w,31),Pt(w,139),Pt(w,8),w.gzhead?(Pt(w,(w.gzhead.text?1:0)+(w.gzhead.hcrc?2:0)+(w.gzhead.extra?4:0)+(w.gzhead.name?8:0)+(w.gzhead.comment?16:0)),Pt(w,w.gzhead.time&255),Pt(w,w.gzhead.time>>8&255),Pt(w,w.gzhead.time>>16&255),Pt(w,w.gzhead.time>>24&255),Pt(w,w.level===9?2:w.strategy>=b||w.level<2?4:0),Pt(w,w.gzhead.os&255),w.gzhead.extra&&w.gzhead.extra.length&&(Pt(w,w.gzhead.extra.length&255),Pt(w,w.gzhead.extra.length>>8&255)),w.gzhead.hcrc&&(u.adler=o(u.adler,w.pending_buf,w.pending,0)),w.gzindex=0,w.status=Qt):(Pt(w,0),Pt(w,0),Pt(w,0),Pt(w,0),Pt(w,0),Pt(w,w.level===9?2:w.strategy>=b||w.level<2?4:0),Pt(w,kt),w.status=Kt);else{var Et=F+(w.w_bits-8<<4)<<8,at=-1;w.strategy>=b||w.level<2?at=0:w.level<6?at=1:w.level===6?at=2:at=3,Et|=at<<6,w.strstart!==0&&(Et|=$t),Et+=31-Et%31,w.status=Kt,Tn(w,Et),w.strstart!==0&&(Tn(w,u.adler>>>16),Tn(w,u.adler&65535)),u.adler=1}if(w.status===Qt)if(w.gzhead.extra){for(V=w.pending;w.gzindex<(w.gzhead.extra.length&65535)&&!(w.pending===w.pending_buf_size&&(w.gzhead.hcrc&&w.pending>V&&(u.adler=o(u.adler,w.pending_buf,w.pending-V,V)),Qr(u),V=w.pending,w.pending===w.pending_buf_size));)Pt(w,w.gzhead.extra[w.gzindex]&255),w.gzindex++;w.gzhead.hcrc&&w.pending>V&&(u.adler=o(u.adler,w.pending_buf,w.pending-V,V)),w.gzindex===w.gzhead.extra.length&&(w.gzindex=0,w.status=sr)}else w.status=sr;if(w.status===sr)if(w.gzhead.name){V=w.pending;do{if(w.pending===w.pending_buf_size&&(w.gzhead.hcrc&&w.pending>V&&(u.adler=o(u.adler,w.pending_buf,w.pending-V,V)),Qr(u),V=w.pending,w.pending===w.pending_buf_size)){ce=1;break}w.gzindex<w.gzhead.name.length?ce=w.gzhead.name.charCodeAt(w.gzindex++)&255:ce=0,Pt(w,ce)}while(ce!==0);w.gzhead.hcrc&&w.pending>V&&(u.adler=o(u.adler,w.pending_buf,w.pending-V,V)),ce===0&&(w.gzindex=0,w.status=xr)}else w.status=xr;if(w.status===xr)if(w.gzhead.comment){V=w.pending;do{if(w.pending===w.pending_buf_size&&(w.gzhead.hcrc&&w.pending>V&&(u.adler=o(u.adler,w.pending_buf,w.pending-V,V)),Qr(u),V=w.pending,w.pending===w.pending_buf_size)){ce=1;break}w.gzindex<w.gzhead.comment.length?ce=w.gzhead.comment.charCodeAt(w.gzindex++)&255:ce=0,Pt(w,ce)}while(ce!==0);w.gzhead.hcrc&&w.pending>V&&(u.adler=o(u.adler,w.pending_buf,w.pending-V,V)),ce===0&&(w.status=lr)}else w.status=lr;if(w.status===lr&&(w.gzhead.hcrc?(w.pending+2>w.pending_buf_size&&Qr(u),w.pending+2<=w.pending_buf_size&&(Pt(w,u.adler&255),Pt(w,u.adler>>8&255),u.adler=0,w.status=Kt)):w.status=Kt),w.pending!==0){if(Qr(u),u.avail_out===0)return w.last_flush=-1,B}else if(u.avail_in===0&&Fr(de)<=Fr(ye)&&de!==v)return Nr(u,D);if(w.status===wr&&u.avail_in!==0)return Nr(u,D);if(u.avail_in!==0||w.lookahead!==0||de!==s&&w.status!==wr){var mt=w.strategy===b?Nn(w,de):w.strategy===A?zi(w,de):Dn[w.level].func(w,de);if((mt===hn||mt===jr)&&(w.status=wr),mt===Gt||mt===hn)return u.avail_out===0&&(w.last_flush=-1),B;if(mt===It&&(de===l?n._tr_align(w):de!==M&&(n._tr_stored_block(w,0,0,!1),de===d&&(Zr(w.head),w.lookahead===0&&(w.strstart=0,w.block_start=0,w.insert=0))),Qr(u),u.avail_out===0))return w.last_flush=-1,B}return de!==v?B:w.wrap<=0?p:(w.wrap===2?(Pt(w,u.adler&255),Pt(w,u.adler>>8&255),Pt(w,u.adler>>16&255),Pt(w,u.adler>>24&255),Pt(w,u.total_in&255),Pt(w,u.total_in>>8&255),Pt(w,u.total_in>>16&255),Pt(w,u.total_in>>24&255)):(Tn(w,u.adler>>>16),Tn(w,u.adler&65535)),Qr(u),w.wrap>0&&(w.wrap=-w.wrap),w.pending!==0?B:p)}function He(u){var de;return!u||!u.state?U:(de=u.state.status,de!==Wt&&de!==Qt&&de!==sr&&de!==xr&&de!==lr&&de!==Kt&&de!==wr?Nr(u,U):(u.state=null,de===Kt?Nr(u,q):B))}function Nt(u,de){var ye=de.length,w,V,ce,Et,at,mt,ur,vi;if(!u||!u.state||(w=u.state,Et=w.wrap,Et===2||Et===1&&w.status!==Wt||w.lookahead))return U;for(Et===1&&(u.adler=i(u.adler,de,ye,0)),w.wrap=0,ye>=w.w_size&&(Et===0&&(Zr(w.head),w.strstart=0,w.block_start=0,w.insert=0),vi=new t.Buf8(w.w_size),t.arraySet(vi,de,ye-w.w_size,w.w_size,0),de=vi,ye=w.w_size),at=u.avail_in,mt=u.next_in,ur=u.input,u.avail_in=ye,u.next_in=0,u.input=de,an(w);w.lookahead>=Me;){V=w.strstart,ce=w.lookahead-(Me-1);do w.ins_h=(w.ins_h<<w.hash_shift^w.window[V+Me-1])&w.hash_mask,w.prev[V&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=V,V++;while(--ce);w.strstart=V,w.lookahead=Me-1,an(w)}return w.strstart+=w.lookahead,w.block_start=w.strstart,w.insert=w.lookahead,w.lookahead=0,w.match_length=w.prev_length=Me-1,w.match_available=0,u.next_in=mt,u.input=ur,u.avail_in=at,w.wrap=Et,B}return Hi.deflateInit=we,Hi.deflateInit2=Z,Hi.deflateReset=Xe,Hi.deflateResetKeep=Ue,Hi.deflateSetHeader=dt,Hi.deflate=m,Hi.deflateEnd=He,Hi.deflateSetDictionary=Nt,Hi.deflateInfo="pako deflate (from Nodeca project)",Hi}var jo={},Av;function Tv(){if(Av)return jo;Av=1;var t=yo(),n=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch{n=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{i=!1}for(var o=new t.Buf8(256),f=0;f<256;f++)o[f]=f>=252?6:f>=248?5:f>=240?4:f>=224?3:f>=192?2:1;o[254]=o[254]=1,jo.string2buf=function(l){var d,v,M,B,p,U=l.length,q=0;for(B=0;B<U;B++)v=l.charCodeAt(B),(v&64512)===55296&&B+1<U&&(M=l.charCodeAt(B+1),(M&64512)===56320&&(v=65536+(v-55296<<10)+(M-56320),B++)),q+=v<128?1:v<2048?2:v<65536?3:4;for(d=new t.Buf8(q),p=0,B=0;p<q;B++)v=l.charCodeAt(B),(v&64512)===55296&&B+1<U&&(M=l.charCodeAt(B+1),(M&64512)===56320&&(v=65536+(v-55296<<10)+(M-56320),B++)),v<128?d[p++]=v:v<2048?(d[p++]=192|v>>>6,d[p++]=128|v&63):v<65536?(d[p++]=224|v>>>12,d[p++]=128|v>>>6&63,d[p++]=128|v&63):(d[p++]=240|v>>>18,d[p++]=128|v>>>12&63,d[p++]=128|v>>>6&63,d[p++]=128|v&63);return d};function s(l,d){if(d<65534&&(l.subarray&&i||!l.subarray&&n))return String.fromCharCode.apply(null,t.shrinkBuf(l,d));for(var v="",M=0;M<d;M++)v+=String.fromCharCode(l[M]);return v}return jo.buf2binstring=function(l){return s(l,l.length)},jo.binstring2buf=function(l){for(var d=new t.Buf8(l.length),v=0,M=d.length;v<M;v++)d[v]=l.charCodeAt(v);return d},jo.buf2string=function(l,d){var v,M,B,p,U=d||l.length,q=new Array(U*2);for(M=0,v=0;v<U;){if(B=l[v++],B<128){q[M++]=B;continue}if(p=o[B],p>4){q[M++]=65533,v+=p-1;continue}for(B&=p===2?31:p===3?15:7;p>1&&v<U;)B=B<<6|l[v++]&63,p--;if(p>1){q[M++]=65533;continue}B<65536?q[M++]=B:(B-=65536,q[M++]=55296|B>>10&1023,q[M++]=56320|B&1023)}return s(q,M)},jo.utf8border=function(l,d){var v;for(d=d||l.length,d>l.length&&(d=l.length),v=d-1;v>=0&&(l[v]&192)===128;)v--;return v<0||v===0?d:v+o[l[v]]>d?v:d},jo}var Lh,Ev;function Dv(){if(Ev)return Lh;Ev=1;function t(){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}return Lh=t,Lh}var Lv;function wy(){if(Lv)return Hs;Lv=1;var t=xy(),n=yo(),i=Tv(),o=Dh(),f=Dv(),s=Object.prototype.toString,l=0,d=4,v=0,M=1,B=2,p=-1,U=0,q=8;function D(A){if(!(this instanceof D))return new D(A);this.options=n.assign({level:p,method:q,chunkSize:16384,windowBits:15,memLevel:8,strategy:U,to:""},A||{});var g=this.options;g.raw&&g.windowBits>0?g.windowBits=-g.windowBits:g.gzip&&g.windowBits>0&&g.windowBits<16&&(g.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var x=t.deflateInit2(this.strm,g.level,g.method,g.windowBits,g.memLevel,g.strategy);if(x!==v)throw new Error(o[x]);if(g.header&&t.deflateSetHeader(this.strm,g.header),g.dictionary){var P;if(typeof g.dictionary=="string"?P=i.string2buf(g.dictionary):s.call(g.dictionary)==="[object ArrayBuffer]"?P=new Uint8Array(g.dictionary):P=g.dictionary,x=t.deflateSetDictionary(this.strm,P),x!==v)throw new Error(o[x]);this._dict_set=!0}}D.prototype.push=function(A,g){var x=this.strm,P=this.options.chunkSize,F,J;if(this.ended)return!1;J=g===~~g?g:g===!0?d:l,typeof A=="string"?x.input=i.string2buf(A):s.call(A)==="[object ArrayBuffer]"?x.input=new Uint8Array(A):x.input=A,x.next_in=0,x.avail_in=x.input.length;do{if(x.avail_out===0&&(x.output=new n.Buf8(P),x.next_out=0,x.avail_out=P),F=t.deflate(x,J),F!==M&&F!==v)return this.onEnd(F),this.ended=!0,!1;(x.avail_out===0||x.avail_in===0&&(J===d||J===B))&&(this.options.to==="string"?this.onData(i.buf2binstring(n.shrinkBuf(x.output,x.next_out))):this.onData(n.shrinkBuf(x.output,x.next_out)))}while((x.avail_in>0||x.avail_out===0)&&F!==M);return J===d?(F=t.deflateEnd(this.strm),this.onEnd(F),this.ended=!0,F===v):(J===B&&(this.onEnd(v),x.avail_out=0),!0)},D.prototype.onData=function(A){this.chunks.push(A)},D.prototype.onEnd=function(A){A===v&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=A,this.msg=this.strm.msg};function pe(A,g){var x=new D(g);if(x.push(A,!0),x.err)throw x.msg||o[x.err];return x.result}function ue(A,g){return g=g||{},g.raw=!0,pe(A,g)}function b(A,g){return g=g||{},g.gzip=!0,pe(A,g)}return Hs.Deflate=D,Hs.deflate=pe,Hs.deflateRaw=ue,Hs.gzip=b,Hs}var zs={},Ci={},Rh,Rv;function Sy(){if(Rv)return Rh;Rv=1;var t=30,n=12;return Rh=function(o,f){var s,l,d,v,M,B,p,U,q,D,pe,ue,b,A,g,x,P,F,J,Te,nt,ut,it,st,tt;s=o.state,l=o.next_in,st=o.input,d=l+(o.avail_in-5),v=o.next_out,tt=o.output,M=v-(f-o.avail_out),B=v+(o.avail_out-257),p=s.dmax,U=s.wsize,q=s.whave,D=s.wnext,pe=s.window,ue=s.hold,b=s.bits,A=s.lencode,g=s.distcode,x=(1<<s.lenbits)-1,P=(1<<s.distbits)-1;e:do{b<15&&(ue+=st[l++]<<b,b+=8,ue+=st[l++]<<b,b+=8),F=A[ue&x];t:for(;;){if(J=F>>>24,ue>>>=J,b-=J,J=F>>>16&255,J===0)tt[v++]=F&65535;else if(J&16){Te=F&65535,J&=15,J&&(b<J&&(ue+=st[l++]<<b,b+=8),Te+=ue&(1<<J)-1,ue>>>=J,b-=J),b<15&&(ue+=st[l++]<<b,b+=8,ue+=st[l++]<<b,b+=8),F=g[ue&P];r:for(;;){if(J=F>>>24,ue>>>=J,b-=J,J=F>>>16&255,J&16){if(nt=F&65535,J&=15,b<J&&(ue+=st[l++]<<b,b+=8,b<J&&(ue+=st[l++]<<b,b+=8)),nt+=ue&(1<<J)-1,nt>p){o.msg="invalid distance too far back",s.mode=t;break e}if(ue>>>=J,b-=J,J=v-M,nt>J){if(J=nt-J,J>q&&s.sane){o.msg="invalid distance too far back",s.mode=t;break e}if(ut=0,it=pe,D===0){if(ut+=U-J,J<Te){Te-=J;do tt[v++]=pe[ut++];while(--J);ut=v-nt,it=tt}}else if(D<J){if(ut+=U+D-J,J-=D,J<Te){Te-=J;do tt[v++]=pe[ut++];while(--J);if(ut=0,D<Te){J=D,Te-=J;do tt[v++]=pe[ut++];while(--J);ut=v-nt,it=tt}}}else if(ut+=D-J,J<Te){Te-=J;do tt[v++]=pe[ut++];while(--J);ut=v-nt,it=tt}for(;Te>2;)tt[v++]=it[ut++],tt[v++]=it[ut++],tt[v++]=it[ut++],Te-=3;Te&&(tt[v++]=it[ut++],Te>1&&(tt[v++]=it[ut++]))}else{ut=v-nt;do tt[v++]=tt[ut++],tt[v++]=tt[ut++],tt[v++]=tt[ut++],Te-=3;while(Te>2);Te&&(tt[v++]=tt[ut++],Te>1&&(tt[v++]=tt[ut++]))}}else if((J&64)===0){F=g[(F&65535)+(ue&(1<<J)-1)];continue r}else{o.msg="invalid distance code",s.mode=t;break e}break}}else if((J&64)===0){F=A[(F&65535)+(ue&(1<<J)-1)];continue t}else if(J&32){s.mode=n;break e}else{o.msg="invalid literal/length code",s.mode=t;break e}break}}while(l<d&&v<B);Te=b>>3,l-=Te,b-=Te<<3,ue&=(1<<b)-1,o.next_in=l,o.next_out=v,o.avail_in=l<d?5+(d-l):5-(l-d),o.avail_out=v<B?257+(B-v):257-(v-B),s.hold=ue,s.bits=b},Rh}var Ch,Cv;function Ay(){if(Cv)return Ch;Cv=1;var t=yo(),n=15,i=852,o=592,f=0,s=1,l=2,d=[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],v=[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],M=[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],B=[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];return Ch=function(U,q,D,pe,ue,b,A,g){var x=g.bits,P=0,F=0,J=0,Te=0,nt=0,ut=0,it=0,st=0,tt=0,Re=0,Ot,bt,Me,Ze,St,$t=null,Wt=0,Qt,sr=new t.Buf16(n+1),xr=new t.Buf16(n+1),lr=null,Kt=0,wr,Gt,It;for(P=0;P<=n;P++)sr[P]=0;for(F=0;F<pe;F++)sr[q[D+F]]++;for(nt=x,Te=n;Te>=1&&sr[Te]===0;Te--);if(nt>Te&&(nt=Te),Te===0)return ue[b++]=1<<24|64<<16|0,ue[b++]=1<<24|64<<16|0,g.bits=1,0;for(J=1;J<Te&&sr[J]===0;J++);for(nt<J&&(nt=J),st=1,P=1;P<=n;P++)if(st<<=1,st-=sr[P],st<0)return-1;if(st>0&&(U===f||Te!==1))return-1;for(xr[1]=0,P=1;P<n;P++)xr[P+1]=xr[P]+sr[P];for(F=0;F<pe;F++)q[D+F]!==0&&(A[xr[q[D+F]]++]=F);if(U===f?($t=lr=A,Qt=19):U===s?($t=d,Wt-=257,lr=v,Kt-=257,Qt=256):($t=M,lr=B,Qt=-1),Re=0,F=0,P=J,St=b,ut=nt,it=0,Me=-1,tt=1<<nt,Ze=tt-1,U===s&&tt>i||U===l&&tt>o)return 1;for(;;){wr=P-it,A[F]<Qt?(Gt=0,It=A[F]):A[F]>Qt?(Gt=lr[Kt+A[F]],It=$t[Wt+A[F]]):(Gt=32+64,It=0),Ot=1<<P-it,bt=1<<ut,J=bt;do bt-=Ot,ue[St+(Re>>it)+bt]=wr<<24|Gt<<16|It|0;while(bt!==0);for(Ot=1<<P-1;Re&Ot;)Ot>>=1;if(Ot!==0?(Re&=Ot-1,Re+=Ot):Re=0,F++,--sr[P]===0){if(P===Te)break;P=q[D+A[F]]}if(P>nt&&(Re&Ze)!==Me){for(it===0&&(it=nt),St+=J,ut=P-it,st=1<<ut;ut+it<Te&&(st-=sr[ut+it],!(st<=0));)ut++,st<<=1;if(tt+=1<<ut,U===s&&tt>i||U===l&&tt>o)return 1;Me=Re&Ze,ue[Me]=nt<<24|ut<<16|St-b|0}}return Re!==0&&(ue[St+Re]=P-it<<24|64<<16|0),g.bits=nt,0},Ch}var Ov;function Ty(){if(Ov)return Ci;Ov=1;var t=yo(),n=yv(),i=xv(),o=Sy(),f=Ay(),s=0,l=1,d=2,v=4,M=5,B=6,p=0,U=1,q=2,D=-2,pe=-3,ue=-4,b=-5,A=8,g=1,x=2,P=3,F=4,J=5,Te=6,nt=7,ut=8,it=9,st=10,tt=11,Re=12,Ot=13,bt=14,Me=15,Ze=16,St=17,$t=18,Wt=19,Qt=20,sr=21,xr=22,lr=23,Kt=24,wr=25,Gt=26,It=27,hn=28,jr=29,kt=30,Nr=31,Fr=32,Zr=852,Qr=592,ar=15,Pt=ar;function Tn(Z){return(Z>>>24&255)+(Z>>>8&65280)+((Z&65280)<<8)+((Z&255)<<24)}function En(){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 t.Buf16(320),this.work=new t.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Jr(Z){var we;return!Z||!Z.state?D:(we=Z.state,Z.total_in=Z.total_out=we.total=0,Z.msg="",we.wrap&&(Z.adler=we.wrap&1),we.mode=g,we.last=0,we.havedict=0,we.dmax=32768,we.head=null,we.hold=0,we.bits=0,we.lencode=we.lendyn=new t.Buf32(Zr),we.distcode=we.distdyn=new t.Buf32(Qr),we.sane=1,we.back=-1,p)}function an(Z){var we;return!Z||!Z.state?D:(we=Z.state,we.wsize=0,we.whave=0,we.wnext=0,Jr(Z))}function E(Z,we){var m,He;return!Z||!Z.state||(He=Z.state,we<0?(m=0,we=-we):(m=(we>>4)+1,we<48&&(we&=15)),we&&(we<8||we>15))?D:(He.window!==null&&He.wbits!==we&&(He.window=null),He.wrap=m,He.wbits=we,an(Z))}function di(Z,we){var m,He;return Z?(He=new En,Z.state=He,He.window=null,m=E(Z,we),m!==p&&(Z.state=null),m):D}function dn(Z){return di(Z,Pt)}var zi=!0,Nn,Tr;function Dn(Z){if(zi){var we;for(Nn=new t.Buf32(512),Tr=new t.Buf32(32),we=0;we<144;)Z.lens[we++]=8;for(;we<256;)Z.lens[we++]=9;for(;we<280;)Z.lens[we++]=7;for(;we<288;)Z.lens[we++]=8;for(f(l,Z.lens,0,288,Nn,0,Z.work,{bits:9}),we=0;we<32;)Z.lens[we++]=5;f(d,Z.lens,0,32,Tr,0,Z.work,{bits:5}),zi=!1}Z.lencode=Nn,Z.lenbits=9,Z.distcode=Tr,Z.distbits=5}function Bn(Z,we,m,He){var Nt,u=Z.state;return u.window===null&&(u.wsize=1<<u.wbits,u.wnext=0,u.whave=0,u.window=new t.Buf8(u.wsize)),He>=u.wsize?(t.arraySet(u.window,we,m-u.wsize,u.wsize,0),u.wnext=0,u.whave=u.wsize):(Nt=u.wsize-u.wnext,Nt>He&&(Nt=He),t.arraySet(u.window,we,m-He,Nt,u.wnext),He-=Nt,He?(t.arraySet(u.window,we,m-He,He,0),u.wnext=He,u.whave=u.wsize):(u.wnext+=Nt,u.wnext===u.wsize&&(u.wnext=0),u.whave<u.wsize&&(u.whave+=Nt))),0}function C(Z,we){var m,He,Nt,u,de,ye,w,V,ce,Et,at,mt,ur,vi,kr=0,dr,Yr,vn,Ln,Ia,Fa,jt,Wn,on=new t.Buf8(4),_i,Xn,Ws=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!Z||!Z.state||!Z.output||!Z.input&&Z.avail_in!==0)return D;m=Z.state,m.mode===Re&&(m.mode=Ot),de=Z.next_out,Nt=Z.output,w=Z.avail_out,u=Z.next_in,He=Z.input,ye=Z.avail_in,V=m.hold,ce=m.bits,Et=ye,at=w,Wn=p;e:for(;;)switch(m.mode){case g:if(m.wrap===0){m.mode=Ot;break}for(;ce<16;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(m.wrap&2&&V===35615){m.check=0,on[0]=V&255,on[1]=V>>>8&255,m.check=i(m.check,on,2,0),V=0,ce=0,m.mode=x;break}if(m.flags=0,m.head&&(m.head.done=!1),!(m.wrap&1)||(((V&255)<<8)+(V>>8))%31){Z.msg="incorrect header check",m.mode=kt;break}if((V&15)!==A){Z.msg="unknown compression method",m.mode=kt;break}if(V>>>=4,ce-=4,jt=(V&15)+8,m.wbits===0)m.wbits=jt;else if(jt>m.wbits){Z.msg="invalid window size",m.mode=kt;break}m.dmax=1<<jt,Z.adler=m.check=1,m.mode=V&512?st:Re,V=0,ce=0;break;case x:for(;ce<16;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(m.flags=V,(m.flags&255)!==A){Z.msg="unknown compression method",m.mode=kt;break}if(m.flags&57344){Z.msg="unknown header flags set",m.mode=kt;break}m.head&&(m.head.text=V>>8&1),m.flags&512&&(on[0]=V&255,on[1]=V>>>8&255,m.check=i(m.check,on,2,0)),V=0,ce=0,m.mode=P;case P:for(;ce<32;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}m.head&&(m.head.time=V),m.flags&512&&(on[0]=V&255,on[1]=V>>>8&255,on[2]=V>>>16&255,on[3]=V>>>24&255,m.check=i(m.check,on,4,0)),V=0,ce=0,m.mode=F;case F:for(;ce<16;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}m.head&&(m.head.xflags=V&255,m.head.os=V>>8),m.flags&512&&(on[0]=V&255,on[1]=V>>>8&255,m.check=i(m.check,on,2,0)),V=0,ce=0,m.mode=J;case J:if(m.flags&1024){for(;ce<16;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}m.length=V,m.head&&(m.head.extra_len=V),m.flags&512&&(on[0]=V&255,on[1]=V>>>8&255,m.check=i(m.check,on,2,0)),V=0,ce=0}else m.head&&(m.head.extra=null);m.mode=Te;case Te:if(m.flags&1024&&(mt=m.length,mt>ye&&(mt=ye),mt&&(m.head&&(jt=m.head.extra_len-m.length,m.head.extra||(m.head.extra=new Array(m.head.extra_len)),t.arraySet(m.head.extra,He,u,mt,jt)),m.flags&512&&(m.check=i(m.check,He,mt,u)),ye-=mt,u+=mt,m.length-=mt),m.length))break e;m.length=0,m.mode=nt;case nt:if(m.flags&2048){if(ye===0)break e;mt=0;do jt=He[u+mt++],m.head&&jt&&m.length<65536&&(m.head.name+=String.fromCharCode(jt));while(jt&&mt<ye);if(m.flags&512&&(m.check=i(m.check,He,mt,u)),ye-=mt,u+=mt,jt)break e}else m.head&&(m.head.name=null);m.length=0,m.mode=ut;case ut:if(m.flags&4096){if(ye===0)break e;mt=0;do jt=He[u+mt++],m.head&&jt&&m.length<65536&&(m.head.comment+=String.fromCharCode(jt));while(jt&&mt<ye);if(m.flags&512&&(m.check=i(m.check,He,mt,u)),ye-=mt,u+=mt,jt)break e}else m.head&&(m.head.comment=null);m.mode=it;case it:if(m.flags&512){for(;ce<16;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(V!==(m.check&65535)){Z.msg="header crc mismatch",m.mode=kt;break}V=0,ce=0}m.head&&(m.head.hcrc=m.flags>>9&1,m.head.done=!0),Z.adler=m.check=0,m.mode=Re;break;case st:for(;ce<32;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}Z.adler=m.check=Tn(V),V=0,ce=0,m.mode=tt;case tt:if(m.havedict===0)return Z.next_out=de,Z.avail_out=w,Z.next_in=u,Z.avail_in=ye,m.hold=V,m.bits=ce,q;Z.adler=m.check=1,m.mode=Re;case Re:if(we===M||we===B)break e;case Ot:if(m.last){V>>>=ce&7,ce-=ce&7,m.mode=It;break}for(;ce<3;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}switch(m.last=V&1,V>>>=1,ce-=1,V&3){case 0:m.mode=bt;break;case 1:if(Dn(m),m.mode=Qt,we===B){V>>>=2,ce-=2;break e}break;case 2:m.mode=St;break;case 3:Z.msg="invalid block type",m.mode=kt}V>>>=2,ce-=2;break;case bt:for(V>>>=ce&7,ce-=ce&7;ce<32;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if((V&65535)!==(V>>>16^65535)){Z.msg="invalid stored block lengths",m.mode=kt;break}if(m.length=V&65535,V=0,ce=0,m.mode=Me,we===B)break e;case Me:m.mode=Ze;case Ze:if(mt=m.length,mt){if(mt>ye&&(mt=ye),mt>w&&(mt=w),mt===0)break e;t.arraySet(Nt,He,u,mt,de),ye-=mt,u+=mt,w-=mt,de+=mt,m.length-=mt;break}m.mode=Re;break;case St:for(;ce<14;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(m.nlen=(V&31)+257,V>>>=5,ce-=5,m.ndist=(V&31)+1,V>>>=5,ce-=5,m.ncode=(V&15)+4,V>>>=4,ce-=4,m.nlen>286||m.ndist>30){Z.msg="too many length or distance symbols",m.mode=kt;break}m.have=0,m.mode=$t;case $t:for(;m.have<m.ncode;){for(;ce<3;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}m.lens[Ws[m.have++]]=V&7,V>>>=3,ce-=3}for(;m.have<19;)m.lens[Ws[m.have++]]=0;if(m.lencode=m.lendyn,m.lenbits=7,_i={bits:m.lenbits},Wn=f(s,m.lens,0,19,m.lencode,0,m.work,_i),m.lenbits=_i.bits,Wn){Z.msg="invalid code lengths set",m.mode=kt;break}m.have=0,m.mode=Wt;case Wt:for(;m.have<m.nlen+m.ndist;){for(;kr=m.lencode[V&(1<<m.lenbits)-1],dr=kr>>>24,Yr=kr>>>16&255,vn=kr&65535,!(dr<=ce);){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(vn<16)V>>>=dr,ce-=dr,m.lens[m.have++]=vn;else{if(vn===16){for(Xn=dr+2;ce<Xn;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(V>>>=dr,ce-=dr,m.have===0){Z.msg="invalid bit length repeat",m.mode=kt;break}jt=m.lens[m.have-1],mt=3+(V&3),V>>>=2,ce-=2}else if(vn===17){for(Xn=dr+3;ce<Xn;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}V>>>=dr,ce-=dr,jt=0,mt=3+(V&7),V>>>=3,ce-=3}else{for(Xn=dr+7;ce<Xn;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}V>>>=dr,ce-=dr,jt=0,mt=11+(V&127),V>>>=7,ce-=7}if(m.have+mt>m.nlen+m.ndist){Z.msg="invalid bit length repeat",m.mode=kt;break}for(;mt--;)m.lens[m.have++]=jt}}if(m.mode===kt)break;if(m.lens[256]===0){Z.msg="invalid code -- missing end-of-block",m.mode=kt;break}if(m.lenbits=9,_i={bits:m.lenbits},Wn=f(l,m.lens,0,m.nlen,m.lencode,0,m.work,_i),m.lenbits=_i.bits,Wn){Z.msg="invalid literal/lengths set",m.mode=kt;break}if(m.distbits=6,m.distcode=m.distdyn,_i={bits:m.distbits},Wn=f(d,m.lens,m.nlen,m.ndist,m.distcode,0,m.work,_i),m.distbits=_i.bits,Wn){Z.msg="invalid distances set",m.mode=kt;break}if(m.mode=Qt,we===B)break e;case Qt:m.mode=sr;case sr:if(ye>=6&&w>=258){Z.next_out=de,Z.avail_out=w,Z.next_in=u,Z.avail_in=ye,m.hold=V,m.bits=ce,o(Z,at),de=Z.next_out,Nt=Z.output,w=Z.avail_out,u=Z.next_in,He=Z.input,ye=Z.avail_in,V=m.hold,ce=m.bits,m.mode===Re&&(m.back=-1);break}for(m.back=0;kr=m.lencode[V&(1<<m.lenbits)-1],dr=kr>>>24,Yr=kr>>>16&255,vn=kr&65535,!(dr<=ce);){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(Yr&&(Yr&240)===0){for(Ln=dr,Ia=Yr,Fa=vn;kr=m.lencode[Fa+((V&(1<<Ln+Ia)-1)>>Ln)],dr=kr>>>24,Yr=kr>>>16&255,vn=kr&65535,!(Ln+dr<=ce);){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}V>>>=Ln,ce-=Ln,m.back+=Ln}if(V>>>=dr,ce-=dr,m.back+=dr,m.length=vn,Yr===0){m.mode=Gt;break}if(Yr&32){m.back=-1,m.mode=Re;break}if(Yr&64){Z.msg="invalid literal/length code",m.mode=kt;break}m.extra=Yr&15,m.mode=xr;case xr:if(m.extra){for(Xn=m.extra;ce<Xn;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}m.length+=V&(1<<m.extra)-1,V>>>=m.extra,ce-=m.extra,m.back+=m.extra}m.was=m.length,m.mode=lr;case lr:for(;kr=m.distcode[V&(1<<m.distbits)-1],dr=kr>>>24,Yr=kr>>>16&255,vn=kr&65535,!(dr<=ce);){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if((Yr&240)===0){for(Ln=dr,Ia=Yr,Fa=vn;kr=m.distcode[Fa+((V&(1<<Ln+Ia)-1)>>Ln)],dr=kr>>>24,Yr=kr>>>16&255,vn=kr&65535,!(Ln+dr<=ce);){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}V>>>=Ln,ce-=Ln,m.back+=Ln}if(V>>>=dr,ce-=dr,m.back+=dr,Yr&64){Z.msg="invalid distance code",m.mode=kt;break}m.offset=vn,m.extra=Yr&15,m.mode=Kt;case Kt:if(m.extra){for(Xn=m.extra;ce<Xn;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}m.offset+=V&(1<<m.extra)-1,V>>>=m.extra,ce-=m.extra,m.back+=m.extra}if(m.offset>m.dmax){Z.msg="invalid distance too far back",m.mode=kt;break}m.mode=wr;case wr:if(w===0)break e;if(mt=at-w,m.offset>mt){if(mt=m.offset-mt,mt>m.whave&&m.sane){Z.msg="invalid distance too far back",m.mode=kt;break}mt>m.wnext?(mt-=m.wnext,ur=m.wsize-mt):ur=m.wnext-mt,mt>m.length&&(mt=m.length),vi=m.window}else vi=Nt,ur=de-m.offset,mt=m.length;mt>w&&(mt=w),w-=mt,m.length-=mt;do Nt[de++]=vi[ur++];while(--mt);m.length===0&&(m.mode=sr);break;case Gt:if(w===0)break e;Nt[de++]=m.length,w--,m.mode=sr;break;case It:if(m.wrap){for(;ce<32;){if(ye===0)break e;ye--,V|=He[u++]<<ce,ce+=8}if(at-=w,Z.total_out+=at,m.total+=at,at&&(Z.adler=m.check=m.flags?i(m.check,Nt,at,de-at):n(m.check,Nt,at,de-at)),at=w,(m.flags?V:Tn(V))!==m.check){Z.msg="incorrect data check",m.mode=kt;break}V=0,ce=0}m.mode=hn;case hn:if(m.wrap&&m.flags){for(;ce<32;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(V!==(m.total&4294967295)){Z.msg="incorrect length check",m.mode=kt;break}V=0,ce=0}m.mode=jr;case jr:Wn=U;break e;case kt:Wn=pe;break e;case Nr:return ue;case Fr:default:return D}return Z.next_out=de,Z.avail_out=w,Z.next_in=u,Z.avail_in=ye,m.hold=V,m.bits=ce,(m.wsize||at!==Z.avail_out&&m.mode<kt&&(m.mode<It||we!==v))&&Bn(Z,Z.output,Z.next_out,at-Z.avail_out),Et-=Z.avail_in,at-=Z.avail_out,Z.total_in+=Et,Z.total_out+=at,m.total+=at,m.wrap&&at&&(Z.adler=m.check=m.flags?i(m.check,Nt,at,Z.next_out-at):n(m.check,Nt,at,Z.next_out-at)),Z.data_type=m.bits+(m.last?64:0)+(m.mode===Re?128:0)+(m.mode===Qt||m.mode===Me?256:0),(Et===0&&at===0||we===v)&&Wn===p&&(Wn=b),Wn}function Ue(Z){if(!Z||!Z.state)return D;var we=Z.state;return we.window&&(we.window=null),Z.state=null,p}function Xe(Z,we){var m;return!Z||!Z.state||(m=Z.state,(m.wrap&2)===0)?D:(m.head=we,we.done=!1,p)}function dt(Z,we){var m=we.length,He,Nt,u;return!Z||!Z.state||(He=Z.state,He.wrap!==0&&He.mode!==tt)?D:He.mode===tt&&(Nt=1,Nt=n(Nt,we,m,0),Nt!==He.check)?pe:(u=Bn(Z,we,m,m),u?(He.mode=Nr,ue):(He.havedict=1,p))}return Ci.inflateReset=an,Ci.inflateReset2=E,Ci.inflateResetKeep=Jr,Ci.inflateInit=dn,Ci.inflateInit2=di,Ci.inflate=C,Ci.inflateEnd=Ue,Ci.inflateGetHeader=Xe,Ci.inflateSetDictionary=dt,Ci.inflateInfo="pako inflate (from Nodeca project)",Ci}var Oh,Mv;function Iv(){return Mv||(Mv=1,Oh={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_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}),Oh}var Mh,Fv;function Ey(){if(Fv)return Mh;Fv=1;function t(){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}return Mh=t,Mh}var kv;function Dy(){if(kv)return zs;kv=1;var t=Ty(),n=yo(),i=Tv(),o=Iv(),f=Dh(),s=Dv(),l=Ey(),d=Object.prototype.toString;function v(p){if(!(this instanceof v))return new v(p);this.options=n.assign({chunkSize:16384,windowBits:0,to:""},p||{});var U=this.options;U.raw&&U.windowBits>=0&&U.windowBits<16&&(U.windowBits=-U.windowBits,U.windowBits===0&&(U.windowBits=-15)),U.windowBits>=0&&U.windowBits<16&&!(p&&p.windowBits)&&(U.windowBits+=32),U.windowBits>15&&U.windowBits<48&&(U.windowBits&15)===0&&(U.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var q=t.inflateInit2(this.strm,U.windowBits);if(q!==o.Z_OK)throw new Error(f[q]);if(this.header=new l,t.inflateGetHeader(this.strm,this.header),U.dictionary&&(typeof U.dictionary=="string"?U.dictionary=i.string2buf(U.dictionary):d.call(U.dictionary)==="[object ArrayBuffer]"&&(U.dictionary=new Uint8Array(U.dictionary)),U.raw&&(q=t.inflateSetDictionary(this.strm,U.dictionary),q!==o.Z_OK)))throw new Error(f[q])}v.prototype.push=function(p,U){var q=this.strm,D=this.options.chunkSize,pe=this.options.dictionary,ue,b,A,g,x,P=!1;if(this.ended)return!1;b=U===~~U?U:U===!0?o.Z_FINISH:o.Z_NO_FLUSH,typeof p=="string"?q.input=i.binstring2buf(p):d.call(p)==="[object ArrayBuffer]"?q.input=new Uint8Array(p):q.input=p,q.next_in=0,q.avail_in=q.input.length;do{if(q.avail_out===0&&(q.output=new n.Buf8(D),q.next_out=0,q.avail_out=D),ue=t.inflate(q,o.Z_NO_FLUSH),ue===o.Z_NEED_DICT&&pe&&(ue=t.inflateSetDictionary(this.strm,pe)),ue===o.Z_BUF_ERROR&&P===!0&&(ue=o.Z_OK,P=!1),ue!==o.Z_STREAM_END&&ue!==o.Z_OK)return this.onEnd(ue),this.ended=!0,!1;q.next_out&&(q.avail_out===0||ue===o.Z_STREAM_END||q.avail_in===0&&(b===o.Z_FINISH||b===o.Z_SYNC_FLUSH))&&(this.options.to==="string"?(A=i.utf8border(q.output,q.next_out),g=q.next_out-A,x=i.buf2string(q.output,A),q.next_out=g,q.avail_out=D-g,g&&n.arraySet(q.output,q.output,A,g,0),this.onData(x)):this.onData(n.shrinkBuf(q.output,q.next_out))),q.avail_in===0&&q.avail_out===0&&(P=!0)}while((q.avail_in>0||q.avail_out===0)&&ue!==o.Z_STREAM_END);return ue===o.Z_STREAM_END&&(b=o.Z_FINISH),b===o.Z_FINISH?(ue=t.inflateEnd(this.strm),this.onEnd(ue),this.ended=!0,ue===o.Z_OK):(b===o.Z_SYNC_FLUSH&&(this.onEnd(o.Z_OK),q.avail_out=0),!0)},v.prototype.onData=function(p){this.chunks.push(p)},v.prototype.onEnd=function(p){p===o.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg};function M(p,U){var q=new v(U);if(q.push(p,!0),q.err)throw q.msg||f[q.err];return q.result}function B(p,U){return U=U||{},U.raw=!0,M(p,U)}return zs.Inflate=v,zs.inflate=M,zs.inflateRaw=B,zs.ungzip=M,zs}var Ih,Pv;function Ly(){if(Pv)return Ih;Pv=1;var t=yo().assign,n=wy(),i=Dy(),o=Iv(),f={};return t(f,n,i,o),Ih=f,Ih}(function(t){(function(){var n={},i;t.exports=n,typeof yy=="function"?i=Ly():i=window.pako,function(o,f){o.toRGBA8=function(s){var l=s.width,d=s.height;if(s.tabs.acTL==null)return[o.toRGBA8.decodeImage(s.data,l,d,s).buffer];var v=[];s.frames[0].data==null&&(s.frames[0].data=s.data);for(var M,B=new Uint8Array(l*d*4),p=0;p<s.frames.length;p++){var U=s.frames[p],q=U.rect.x,D=U.rect.y,pe=U.rect.width,ue=U.rect.height,b=o.toRGBA8.decodeImage(U.data,pe,ue,s);if(p==0?M=b:U.blend==0?o._copyTile(b,pe,ue,M,l,d,q,D,0):U.blend==1&&o._copyTile(b,pe,ue,M,l,d,q,D,1),v.push(M.buffer),M=M.slice(0),U.dispose!=0){if(U.dispose==1)o._copyTile(B,pe,ue,M,l,d,q,D,0);else if(U.dispose==2){for(var A=p-1;s.frames[A].dispose==2;)A--;M=new Uint8Array(v[A]).slice(0)}}}return v},o.toRGBA8.decodeImage=function(s,l,d,v){var M=l*d,B=o.decode._getBPP(v),p=Math.ceil(l*B/8),U=new Uint8Array(M*4),q=new Uint32Array(U.buffer),D=v.ctype,pe=v.depth,ue=o._bin.readUshort;if(D==6){var b=M<<2;if(pe==8)for(var A=0;A<b;A++)U[A]=s[A];if(pe==16)for(var A=0;A<b;A++)U[A]=s[A<<1]}else if(D==2){var g=v.tabs.tRNS,x=-1,P=-1,F=-1;if(g&&(x=g[0],P=g[1],F=g[2]),pe==8)for(var A=0;A<M;A++){var J=A<<2,Te=A*3;U[J]=s[Te],U[J+1]=s[Te+1],U[J+2]=s[Te+2],U[J+3]=255,x!=-1&&s[Te]==x&&s[Te+1]==P&&s[Te+2]==F&&(U[J+3]=0)}if(pe==16)for(var A=0;A<M;A++){var J=A<<2,Te=A*6;U[J]=s[Te],U[J+1]=s[Te+2],U[J+2]=s[Te+4],U[J+3]=255,x!=-1&&ue(s,Te)==x&&ue(s,Te+2)==P&&ue(s,Te+4)==F&&(U[J+3]=0)}}else if(D==3){var nt=v.tabs.PLTE,ut=v.tabs.tRNS,it=ut?ut.length:0;if(pe==1)for(var st=0;st<d;st++)for(var tt=st*p,Re=st*l,A=0;A<l;A++){var J=Re+A<<2,Ot=s[tt+(A>>3)]>>7-((A&7)<<0)&1,bt=3*Ot;U[J]=nt[bt],U[J+1]=nt[bt+1],U[J+2]=nt[bt+2],U[J+3]=Ot<it?ut[Ot]:255}if(pe==2)for(var st=0;st<d;st++)for(var tt=st*p,Re=st*l,A=0;A<l;A++){var J=Re+A<<2,Ot=s[tt+(A>>2)]>>6-((A&3)<<1)&3,bt=3*Ot;U[J]=nt[bt],U[J+1]=nt[bt+1],U[J+2]=nt[bt+2],U[J+3]=Ot<it?ut[Ot]:255}if(pe==4)for(var st=0;st<d;st++)for(var tt=st*p,Re=st*l,A=0;A<l;A++){var J=Re+A<<2,Ot=s[tt+(A>>1)]>>4-((A&1)<<2)&15,bt=3*Ot;U[J]=nt[bt],U[J+1]=nt[bt+1],U[J+2]=nt[bt+2],U[J+3]=Ot<it?ut[Ot]:255}if(pe==8)for(var A=0;A<M;A++){var J=A<<2,Ot=s[A],bt=3*Ot;U[J]=nt[bt],U[J+1]=nt[bt+1],U[J+2]=nt[bt+2],U[J+3]=Ot<it?ut[Ot]:255}}else if(D==4){if(pe==8)for(var A=0;A<M;A++){var J=A<<2,Me=A<<1,Ze=s[Me];U[J]=Ze,U[J+1]=Ze,U[J+2]=Ze,U[J+3]=s[Me+1]}if(pe==16)for(var A=0;A<M;A++){var J=A<<2,Me=A<<2,Ze=s[Me];U[J]=Ze,U[J+1]=Ze,U[J+2]=Ze,U[J+3]=s[Me+2]}}else if(D==0){var x=v.tabs.tRNS?v.tabs.tRNS:-1;if(pe==1)for(var A=0;A<M;A++){var Ze=255*(s[A>>3]>>7-(A&7)&1),St=Ze==x*255?0:255;q[A]=St<<24|Ze<<16|Ze<<8|Ze}if(pe==2)for(var A=0;A<M;A++){var Ze=85*(s[A>>2]>>6-((A&3)<<1)&3),St=Ze==x*85?0:255;q[A]=St<<24|Ze<<16|Ze<<8|Ze}if(pe==4)for(var A=0;A<M;A++){var Ze=17*(s[A>>1]>>4-((A&1)<<2)&15),St=Ze==x*17?0:255;q[A]=St<<24|Ze<<16|Ze<<8|Ze}if(pe==8)for(var A=0;A<M;A++){var Ze=s[A],St=Ze==x?0:255;q[A]=St<<24|Ze<<16|Ze<<8|Ze}if(pe==16)for(var A=0;A<M;A++){var Ze=s[A<<1],St=ue(s,A<<1)==x?0:255;q[A]=St<<24|Ze<<16|Ze<<8|Ze}}return U},o.decode=function(s){for(var l=new Uint8Array(s),d=8,v=o._bin,M=v.readUshort,B=v.readUint,p={tabs:{},frames:[]},U=new Uint8Array(l.length),q=0,D,pe=0,ue=[137,80,78,71,13,10,26,10],b=0;b<8;b++)if(l[b]!=ue[b])throw"The input is not a PNG file!";for(;d<l.length;){var A=v.readUint(l,d);d+=4;var g=v.readASCII(l,d,4);if(d+=4,g=="IHDR")o.decode._IHDR(l,d,p);else if(g=="IDAT"){for(var b=0;b<A;b++)U[q+b]=l[d+b];q+=A}else if(g=="acTL")p.tabs[g]={num_frames:B(l,d),num_plays:B(l,d+4)},D=new Uint8Array(l.length);else if(g=="fcTL"){if(pe!=0){var x=p.frames[p.frames.length-1];x.data=o.decode._decompress(p,D.slice(0,pe),x.rect.width,x.rect.height),pe=0}var P={x:B(l,d+12),y:B(l,d+16),width:B(l,d+4),height:B(l,d+8)},F=M(l,d+22);F=M(l,d+20)/(F==0?100:F);var J={rect:P,delay:Math.round(F*1e3),dispose:l[d+24],blend:l[d+25]};p.frames.push(J)}else if(g=="fdAT"){for(var b=0;b<A-4;b++)D[pe+b]=l[d+b+4];pe+=A-4}else if(g=="pHYs")p.tabs[g]=[v.readUint(l,d),v.readUint(l,d+4),l[d+8]];else if(g=="cHRM"){p.tabs[g]=[];for(var b=0;b<8;b++)p.tabs[g].push(v.readUint(l,d+b*4))}else if(g=="tEXt"){p.tabs[g]==null&&(p.tabs[g]={});var Te=v.nextZero(l,d),nt=v.readASCII(l,d,Te-d),ut=v.readASCII(l,Te+1,d+A-Te-1);p.tabs[g][nt]=ut}else if(g=="iTXt"){p.tabs[g]==null&&(p.tabs[g]={});var Te=0,it=d;Te=v.nextZero(l,it);var nt=v.readASCII(l,it,Te-it);it=Te+1,l[it],l[it+1],it+=2,Te=v.nextZero(l,it),v.readASCII(l,it,Te-it),it=Te+1,Te=v.nextZero(l,it),v.readUTF8(l,it,Te-it),it=Te+1;var ut=v.readUTF8(l,it,A-(it-d));p.tabs[g][nt]=ut}else if(g=="PLTE")p.tabs[g]=v.readBytes(l,d,A);else if(g=="hIST"){var st=p.tabs.PLTE.length/3;p.tabs[g]=[];for(var b=0;b<st;b++)p.tabs[g].push(M(l,d+b*2))}else if(g=="tRNS")p.ctype==3?p.tabs[g]=v.readBytes(l,d,A):p.ctype==0?p.tabs[g]=M(l,d):p.ctype==2&&(p.tabs[g]=[M(l,d),M(l,d+2),M(l,d+4)]);else if(g=="gAMA")p.tabs[g]=v.readUint(l,d)/1e5;else if(g=="sRGB")p.tabs[g]=l[d];else if(g=="bKGD")p.ctype==0||p.ctype==4?p.tabs[g]=[M(l,d)]:p.ctype==2||p.ctype==6?p.tabs[g]=[M(l,d),M(l,d+2),M(l,d+4)]:p.ctype==3&&(p.tabs[g]=l[d]);else if(g=="IEND"){if(pe!=0){var x=p.frames[p.frames.length-1];x.data=o.decode._decompress(p,D.slice(0,pe),x.rect.width,x.rect.height),pe=0}p.data=o.decode._decompress(p,U,p.width,p.height);break}d+=A,v.readUint(l,d),d+=4}return delete p.compress,delete p.interlace,delete p.filter,p},o.decode._decompress=function(s,l,d,v){return s.compress==0&&(l=o.decode._inflate(l)),s.interlace==0?l=o.decode._filterZero(l,s,0,d,v):s.interlace==1&&(l=o.decode._readInterlace(l,s)),l},o.decode._inflate=function(s){return f.inflate(s)},o.decode._readInterlace=function(s,l){for(var d=l.width,v=l.height,M=o.decode._getBPP(l),B=M>>3,p=Math.ceil(d*M/8),U=new Uint8Array(v*p),q=0,D=[0,0,4,0,2,0,1],pe=[0,4,0,2,0,1,0],ue=[8,8,8,4,4,2,2],b=[8,8,4,4,2,2,1],A=0;A<7;){for(var g=ue[A],x=b[A],P=0,F=0,J=D[A];J<v;)J+=g,F++;for(var Te=pe[A];Te<d;)Te+=x,P++;var nt=Math.ceil(P*M/8);o.decode._filterZero(s,l,q,P,F);for(var ut=0,it=D[A];it<v;){for(var st=pe[A],tt=q+ut*nt<<3;st<d;){if(M==1){var Re=s[tt>>3];Re=Re>>7-(tt&7)&1,U[it*p+(st>>3)]|=Re<<7-((st&3)<<0)}if(M==2){var Re=s[tt>>3];Re=Re>>6-(tt&7)&3,U[it*p+(st>>2)]|=Re<<6-((st&3)<<1)}if(M==4){var Re=s[tt>>3];Re=Re>>4-(tt&7)&15,U[it*p+(st>>1)]|=Re<<4-((st&1)<<2)}if(M>=8)for(var Ot=it*p+st*B,bt=0;bt<B;bt++)U[Ot+bt]=s[(tt>>3)+bt];tt+=M,st+=x}ut++,it+=g}P*F!=0&&(q+=F*(1+nt)),A=A+1}return U},o.decode._getBPP=function(s){var l=[1,null,3,1,2,null,4][s.ctype];return l*s.depth},o.decode._filterZero=function(s,l,d,v,M){var B=o.decode._getBPP(l),p=Math.ceil(v*B/8),U=o.decode._paeth;B=Math.ceil(B/8);for(var q=0;q<M;q++){var D=d+q*p,pe=D+q+1,ue=s[pe-1];if(ue==0)for(var b=0;b<p;b++)s[D+b]=s[pe+b];else if(ue==1){for(var b=0;b<B;b++)s[D+b]=s[pe+b];for(var b=B;b<p;b++)s[D+b]=s[pe+b]+s[D+b-B]&255}else if(q==0){for(var b=0;b<B;b++)s[D+b]=s[pe+b];if(ue==2)for(var b=B;b<p;b++)s[D+b]=s[pe+b]&255;if(ue==3)for(var b=B;b<p;b++)s[D+b]=s[pe+b]+(s[D+b-B]>>1)&255;if(ue==4)for(var b=B;b<p;b++)s[D+b]=s[pe+b]+U(s[D+b-B],0,0)&255}else{if(ue==2)for(var b=0;b<p;b++)s[D+b]=s[pe+b]+s[D+b-p]&255;if(ue==3){for(var b=0;b<B;b++)s[D+b]=s[pe+b]+(s[D+b-p]>>1)&255;for(var b=B;b<p;b++)s[D+b]=s[pe+b]+(s[D+b-p]+s[D+b-B]>>1)&255}if(ue==4){for(var b=0;b<B;b++)s[D+b]=s[pe+b]+U(0,s[D+b-p],0)&255;for(var b=B;b<p;b++)s[D+b]=s[pe+b]+U(s[D+b-B],s[D+b-p],s[D+b-B-p])&255}}}return s},o.decode._paeth=function(s,l,d){var v=s+l-d,M=Math.abs(v-s),B=Math.abs(v-l),p=Math.abs(v-d);return M<=B&&M<=p?s:B<=p?l:d},o.decode._IHDR=function(s,l,d){var v=o._bin;d.width=v.readUint(s,l),l+=4,d.height=v.readUint(s,l),l+=4,d.depth=s[l],l++,d.ctype=s[l],l++,d.compress=s[l],l++,d.filter=s[l],l++,d.interlace=s[l],l++},o._bin={nextZero:function(s,l){for(;s[l]!=0;)l++;return l},readUshort:function(s,l){return s[l]<<8|s[l+1]},writeUshort:function(s,l,d){s[l]=d>>8&255,s[l+1]=d&255},readUint:function(s,l){return s[l]*(256*256*256)+(s[l+1]<<16|s[l+2]<<8|s[l+3])},writeUint:function(s,l,d){s[l]=d>>24&255,s[l+1]=d>>16&255,s[l+2]=d>>8&255,s[l+3]=d&255},readASCII:function(s,l,d){for(var v="",M=0;M<d;M++)v+=String.fromCharCode(s[l+M]);return v},writeASCII:function(s,l,d){for(var v=0;v<d.length;v++)s[l+v]=d.charCodeAt(v)},readBytes:function(s,l,d){for(var v=[],M=0;M<d;M++)v.push(s[l+M]);return v},pad:function(s){return s.length<2?"0"+s:s},readUTF8:function(s,l,d){for(var v="",M,B=0;B<d;B++)v+="%"+o._bin.pad(s[l+B].toString(16));try{M=decodeURIComponent(v)}catch{return o._bin.readASCII(s,l,d)}return M}},o._copyTile=function(s,l,d,v,M,B,p,U,q){for(var D=Math.min(l,M),pe=Math.min(d,B),ue=0,b=0,A=0;A<pe;A++)for(var g=0;g<D;g++)if(p>=0&&U>=0?(ue=A*l+g<<2,b=(U+A)*M+p+g<<2):(ue=(-U+A)*l-p+g<<2,b=A*M+g<<2),q==0)v[b]=s[ue],v[b+1]=s[ue+1],v[b+2]=s[ue+2],v[b+3]=s[ue+3];else if(q==1){var x=s[ue+3]*.00392156862745098,P=s[ue]*x,F=s[ue+1]*x,J=s[ue+2]*x,Te=v[b+3]*(1/255),nt=v[b]*Te,ut=v[b+1]*Te,it=v[b+2]*Te,st=1-x,tt=x+Te*st,Re=tt==0?0:1/tt;v[b+3]=255*tt,v[b+0]=(P+nt*st)*Re,v[b+1]=(F+ut*st)*Re,v[b+2]=(J+it*st)*Re}else if(q==2){var x=s[ue+3],P=s[ue],F=s[ue+1],J=s[ue+2],Te=v[b+3],nt=v[b],ut=v[b+1],it=v[b+2];x==Te&&P==nt&&F==ut&&J==it?(v[b]=0,v[b+1]=0,v[b+2]=0,v[b+3]=0):(v[b]=P,v[b+1]=F,v[b+2]=J,v[b+3]=x)}else if(q==3){var x=s[ue+3],P=s[ue],F=s[ue+1],J=s[ue+2],Te=v[b+3],nt=v[b],ut=v[b+1],it=v[b+2];if(x==Te&&P==nt&&F==ut&&J==it)continue;if(x<220&&Te>20)return!1}return!0},o.encode=function(s,l,d,v,M,B){v==null&&(v=0),B==null&&(B=!1);for(var p=new Uint8Array(s[0].byteLength*s.length+100),U=[137,80,78,71,13,10,26,10],q=0;q<8;q++)p[q]=U[q];var D=8,pe=o._bin,ue=o.crc.crc,b=pe.writeUint,A=pe.writeUshort,g=pe.writeASCII,x=o.encode.compressPNG(s,l,d,v,B);b(p,D,13),D+=4,g(p,D,"IHDR"),D+=4,b(p,D,l),D+=4,b(p,D,d),D+=4,p[D]=x.depth,D++,p[D]=x.ctype,D++,p[D]=0,D++,p[D]=0,D++,p[D]=0,D++,b(p,D,ue(p,D-17,17)),D+=4,b(p,D,1),D+=4,g(p,D,"sRGB"),D+=4,p[D]=1,D++,b(p,D,ue(p,D-5,5)),D+=4;var P=s.length>1;if(P&&(b(p,D,8),D+=4,g(p,D,"acTL"),D+=4,b(p,D,s.length),D+=4,b(p,D,0),D+=4,b(p,D,ue(p,D-12,12)),D+=4),x.ctype==3){var F=x.plte.length;b(p,D,F*3),D+=4,g(p,D,"PLTE"),D+=4;for(var q=0;q<F;q++){var J=q*3,Te=x.plte[q],nt=Te&255,ut=Te>>8&255,it=Te>>16&255;p[D+J+0]=nt,p[D+J+1]=ut,p[D+J+2]=it}if(D+=F*3,b(p,D,ue(p,D-F*3-4,F*3+4)),D+=4,x.gotAlpha){b(p,D,F),D+=4,g(p,D,"tRNS"),D+=4;for(var q=0;q<F;q++)p[D+q]=x.plte[q]>>24&255;D+=F,b(p,D,ue(p,D-F-4,F+4)),D+=4}}for(var st=0,tt=0;tt<x.frames.length;tt++){var Re=x.frames[tt];P&&(b(p,D,26),D+=4,g(p,D,"fcTL"),D+=4,b(p,D,st++),D+=4,b(p,D,Re.rect.width),D+=4,b(p,D,Re.rect.height),D+=4,b(p,D,Re.rect.x),D+=4,b(p,D,Re.rect.y),D+=4,A(p,D,M[tt]),D+=2,A(p,D,1e3),D+=2,p[D]=Re.dispose,D++,p[D]=Re.blend,D++,b(p,D,ue(p,D-30,30)),D+=4);var Ot=Re.cimg,F=Ot.length;b(p,D,F+(tt==0?0:4)),D+=4;var bt=D;g(p,D,tt==0?"IDAT":"fdAT"),D+=4,tt!=0&&(b(p,D,st++),D+=4);for(var q=0;q<F;q++)p[D+q]=Ot[q];D+=F,b(p,D,ue(p,bt,D-bt)),D+=4}return b(p,D,0),D+=4,g(p,D,"IEND"),D+=4,b(p,D,ue(p,D-4,4)),D+=4,p.buffer.slice(0,D)},o.encode.compressPNG=function(s,l,d,v,M){for(var B=o.encode.compress(s,l,d,v,!1,M),p=0;p<s.length;p++){var U=B.frames[p];U.rect.width;var q=U.rect.height,D=U.bpl,pe=U.bpp,ue=new Uint8Array(q*D+q);U.cimg=o.encode._filterZero(U.img,q,pe,D,ue)}return B},o.encode.compress=function(s,l,d,v,M,B){B==null&&(B=!1);for(var p=6,U=8,q=4,D=255,pe=0;pe<s.length;pe++)for(var ue=new Uint8Array(s[pe]),b=ue.length,A=0;A<b;A+=4)D&=ue[A+3];var g=D!=255,x={},P=[];if(s.length!=0&&(x[0]=0,P.push(0),v!=0&&v--),v!=0){var F=o.quantize(s,v,M);s=F.bufs;for(var A=0;A<F.plte.length;A++){var J=F.plte[A].est.rgba;x[J]==null&&(x[J]=P.length,P.push(J))}}else for(var pe=0;pe<s.length;pe++)for(var Te=new Uint32Array(s[pe]),b=Te.length,A=0;A<b;A++){var J=Te[A];if((A<l||J!=Te[A-1]&&J!=Te[A-l])&&x[J]==null&&(x[J]=P.length,P.push(J),P.length>=300))break}var nt=g?M:!1,ut=P.length;ut<=256&&B==!1&&(ut<=2?U=1:ut<=4?U=2:ut<=16?U=4:U=8,M&&(U=8),g=!0);for(var it=[],pe=0;pe<s.length;pe++){var st=new Uint8Array(s[pe]),tt=new Uint32Array(st.buffer),Re=0,Ot=0,bt=l,Me=d,Ze=0;if(pe!=0&&!nt){for(var St=M||pe==1||it[it.length-2].dispose==2?1:2,$t=0,Wt=1e9,Qt=0;Qt<St;Qt++){for(var jr=new Uint8Array(s[pe-1-Qt]),sr=new Uint32Array(s[pe-1-Qt]),xr=l,lr=d,Kt=-1,wr=-1,Gt=0;Gt<d;Gt++)for(var It=0;It<l;It++){var A=Gt*l+It;tt[A]!=sr[A]&&(It<xr&&(xr=It),It>Kt&&(Kt=It),Gt<lr&&(lr=Gt),Gt>wr&&(wr=Gt))}var hn=Kt==-1?1:(Kt-xr+1)*(wr-lr+1);hn<Wt&&(Wt=hn,$t=Qt,Kt==-1?(Re=Ot=0,bt=Me=1):(Re=xr,Ot=lr,bt=Kt-xr+1,Me=wr-lr+1))}var jr=new Uint8Array(s[pe-1-$t]);$t==1&&(it[it.length-1].dispose=2);var kt=new Uint8Array(bt*Me*4);new Uint32Array(kt.buffer),o._copyTile(jr,l,d,kt,bt,Me,-Re,-Ot,0),o._copyTile(st,l,d,kt,bt,Me,-Re,-Ot,3)?(o._copyTile(st,l,d,kt,bt,Me,-Re,-Ot,2),Ze=1):(o._copyTile(st,l,d,kt,bt,Me,-Re,-Ot,0),Ze=0),st=kt,tt=new Uint32Array(st.buffer)}var Nr=4*bt;if(ut<=256&&B==!1){Nr=Math.ceil(U*bt/8);for(var kt=new Uint8Array(Nr*Me),Gt=0;Gt<Me;Gt++){var A=Gt*Nr,Fr=Gt*bt;if(U==8)for(var It=0;It<bt;It++)kt[A+It]=x[tt[Fr+It]];else if(U==4)for(var It=0;It<bt;It++)kt[A+(It>>1)]|=x[tt[Fr+It]]<<4-(It&1)*4;else if(U==2)for(var It=0;It<bt;It++)kt[A+(It>>2)]|=x[tt[Fr+It]]<<6-(It&3)*2;else if(U==1)for(var It=0;It<bt;It++)kt[A+(It>>3)]|=x[tt[Fr+It]]<<7-(It&7)*1}st=kt,p=3,q=1}else if(g==!1&&s.length==1){for(var kt=new Uint8Array(bt*Me*3),Zr=bt*Me,A=0;A<Zr;A++){var Qr=A*3,ar=A*4;kt[Qr]=st[ar],kt[Qr+1]=st[ar+1],kt[Qr+2]=st[ar+2]}st=kt,p=2,q=3,Nr=3*bt}it.push({rect:{x:Re,y:Ot,width:bt,height:Me},img:st,bpl:Nr,bpp:q,blend:Ze,dispose:nt?1:0})}return{ctype:p,depth:U,plte:P,gotAlpha:g,frames:it}},o.encode._filterZero=function(s,l,d,v,M){for(var B=[],p=0;p<5;p++)if(!(l*v>5e5&&(p==2||p==3||p==4))){for(var U=0;U<l;U++)o.encode._filterLine(M,s,U,v,d,p);if(B.push(f.deflate(M)),d==1)break}for(var q,D=1e9,pe=0;pe<B.length;pe++)B[pe].length<D&&(q=pe,D=B[pe].length);return B[q]},o.encode._filterLine=function(s,l,d,v,M,B){var p=d*v,U=p+d,q=o.decode._paeth;if(s[U]=B,U++,B==0)for(var D=0;D<v;D++)s[U+D]=l[p+D];else if(B==1){for(var D=0;D<M;D++)s[U+D]=l[p+D];for(var D=M;D<v;D++)s[U+D]=l[p+D]-l[p+D-M]+256&255}else if(d==0){for(var D=0;D<M;D++)s[U+D]=l[p+D];if(B==2)for(var D=M;D<v;D++)s[U+D]=l[p+D];if(B==3)for(var D=M;D<v;D++)s[U+D]=l[p+D]-(l[p+D-M]>>1)+256&255;if(B==4)for(var D=M;D<v;D++)s[U+D]=l[p+D]-q(l[p+D-M],0,0)+256&255}else{if(B==2)for(var D=0;D<v;D++)s[U+D]=l[p+D]+256-l[p+D-v]&255;if(B==3){for(var D=0;D<M;D++)s[U+D]=l[p+D]+256-(l[p+D-v]>>1)&255;for(var D=M;D<v;D++)s[U+D]=l[p+D]+256-(l[p+D-v]+l[p+D-M]>>1)&255}if(B==4){for(var D=0;D<M;D++)s[U+D]=l[p+D]+256-q(0,l[p+D-v],0)&255;for(var D=M;D<v;D++)s[U+D]=l[p+D]+256-q(l[p+D-M],l[p+D-v],l[p+D-M-v])&255}}},o.crc={table:function(){for(var s=new Uint32Array(256),l=0;l<256;l++){for(var d=l,v=0;v<8;v++)d&1?d=3988292384^d>>>1:d=d>>>1;s[l]=d}return s}(),update:function(s,l,d,v){for(var M=0;M<v;M++)s=o.crc.table[(s^l[d+M])&255]^s>>>8;return s},crc:function(s,l,d){return o.crc.update(4294967295,s,l,d)^4294967295}},o.quantize=function(s,l,d){for(var v=[],M=0,B=0;B<s.length;B++)v.push(o.encode.alphaMul(new Uint8Array(s[B]),d)),M+=s[B].byteLength;for(var p=new Uint8Array(M),U=new Uint32Array(p.buffer),q=0,B=0;B<v.length;B++){for(var D=v[B],pe=D.length,ue=0;ue<pe;ue++)p[q+ue]=D[ue];q+=pe}var b={i0:0,i1:p.length,bst:null,est:null,tdst:0,left:null,right:null};b.bst=o.quantize.stats(p,b.i0,b.i1),b.est=o.quantize.estats(b.bst);for(var A=[b];A.length<l;){for(var g=0,x=0,B=0;B<A.length;B++)A[B].est.L>g&&(g=A[B].est.L,x=B);if(g<.001)break;var P=A[x],F=o.quantize.splitPixels(p,U,P.i0,P.i1,P.est.e,P.est.eMq255),J={i0:P.i0,i1:F,bst:null,est:null,tdst:0,left:null,right:null};J.bst=o.quantize.stats(p,J.i0,J.i1),J.est=o.quantize.estats(J.bst);var Te={i0:F,i1:P.i1,bst:null,est:null,tdst:0,left:null,right:null};Te.bst={R:[],m:[],N:P.bst.N-J.bst.N};for(var B=0;B<16;B++)Te.bst.R[B]=P.bst.R[B]-J.bst.R[B];for(var B=0;B<4;B++)Te.bst.m[B]=P.bst.m[B]-J.bst.m[B];Te.est=o.quantize.estats(Te.bst),P.left=J,P.right=Te,A[x]=J,A.push(Te)}A.sort(function(St,$t){return $t.bst.N-St.bst.N});for(var nt=0;nt<v.length;nt++){for(var ut=o.quantize.planeDst,it=new Uint8Array(v[nt].buffer),st=new Uint32Array(v[nt].buffer),tt=it.length,B=0;B<tt;B+=4){for(var Re=it[B]*.00392156862745098,Ot=it[B+1]*(1/255),bt=it[B+2]*(1/255),Me=it[B+3]*(1/255),Ze=b;Ze.left;)Ze=ut(Ze.est,Re,Ot,bt,Me)<=0?Ze.left:Ze.right;st[B>>2]=Ze.est.rgba}v[nt]=st.buffer}return{bufs:v,plte:A}},o.quantize.getNearest=function(s,l,d,v,M){if(s.left==null)return s.tdst=o.quantize.dist(s.est.q,l,d,v,M),s;var B=o.quantize.planeDst(s.est,l,d,v,M),p=s.left,U=s.right;B>0&&(p=s.right,U=s.left);var q=o.quantize.getNearest(p,l,d,v,M);if(q.tdst<=B*B)return q;var D=o.quantize.getNearest(U,l,d,v,M);return D.tdst<q.tdst?D:q},o.quantize.planeDst=function(s,l,d,v,M){var B=s.e;return B[0]*l+B[1]*d+B[2]*v+B[3]*M-s.eMq},o.quantize.dist=function(s,l,d,v,M){var B=l-s[0],p=d-s[1],U=v-s[2],q=M-s[3];return B*B+p*p+U*U+q*q},o.quantize.splitPixels=function(s,l,d,v,M,B){var p=o.quantize.vecDot;for(v-=4;d<v;){for(;p(s,d,M)<=B;)d+=4;for(;p(s,v,M)>B;)v-=4;if(d>=v)break;var U=l[d>>2];l[d>>2]=l[v>>2],l[v>>2]=U,d+=4,v-=4}for(;p(s,d,M)>B;)d-=4;return d+4},o.quantize.vecDot=function(s,l,d){return s[l]*d[0]+s[l+1]*d[1]+s[l+2]*d[2]+s[l+3]*d[3]},o.quantize.stats=function(s,l,d){for(var v=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=[0,0,0,0],B=d-l>>2,p=l;p<d;p+=4){var U=s[p]*.00392156862745098,q=s[p+1]*(1/255),D=s[p+2]*(1/255),pe=s[p+3]*(1/255);M[0]+=U,M[1]+=q,M[2]+=D,M[3]+=pe,v[0]+=U*U,v[1]+=U*q,v[2]+=U*D,v[3]+=U*pe,v[5]+=q*q,v[6]+=q*D,v[7]+=q*pe,v[10]+=D*D,v[11]+=D*pe,v[15]+=pe*pe}return v[4]=v[1],v[8]=v[2],v[12]=v[3],v[9]=v[6],v[13]=v[7],v[14]=v[11],{R:v,m:M,N:B}},o.quantize.estats=function(s){var l=s.R,d=s.m,v=s.N,M=d[0],B=d[1],p=d[2],U=d[3],q=v==0?0:1/v,D=[l[0]-M*M*q,l[1]-M*B*q,l[2]-M*p*q,l[3]-M*U*q,l[4]-B*M*q,l[5]-B*B*q,l[6]-B*p*q,l[7]-B*U*q,l[8]-p*M*q,l[9]-p*B*q,l[10]-p*p*q,l[11]-p*U*q,l[12]-U*M*q,l[13]-U*B*q,l[14]-U*p*q,l[15]-U*U*q],pe=D,ue=o.M4,b=[.5,.5,.5,.5],A=0,g=0;if(v!=0)for(var x=0;x<10&&(b=ue.multVec(pe,b),g=Math.sqrt(ue.dot(b,b)),b=ue.sml(1/g,b),!(Math.abs(g-A)<1e-9));x++)A=g;var P=[M*q,B*q,p*q,U*q],F=ue.dot(ue.sml(255,P),b),J=P[3]<.001?0:1/P[3];return{Cov:D,q:P,e:b,L:A,eMq255:F,eMq:ue.dot(b,P),rgba:(Math.round(255*P[3])<<24|Math.round(255*P[2]*J)<<16|Math.round(255*P[1]*J)<<8|Math.round(255*P[0]*J)<<0)>>>0}},o.M4={multVec:function(s,l){return[s[0]*l[0]+s[1]*l[1]+s[2]*l[2]+s[3]*l[3],s[4]*l[0]+s[5]*l[1]+s[6]*l[2]+s[7]*l[3],s[8]*l[0]+s[9]*l[1]+s[10]*l[2]+s[11]*l[3],s[12]*l[0]+s[13]*l[1]+s[14]*l[2]+s[15]*l[3]]},dot:function(s,l){return s[0]*l[0]+s[1]*l[1]+s[2]*l[2]+s[3]*l[3]},sml:function(s,l){return[s*l[0],s*l[1],s*l[2],s*l[3]]}},o.encode.alphaMul=function(s,l){for(var d=new Uint8Array(s.length),v=s.length>>2,M=0;M<v;M++){var B=M<<2,p=s[B+3];l&&(p=p<128?0:255);var U=p*(1/255);d[B+0]=s[B+0]*U,d[B+1]=s[B+1]*U,d[B+2]=s[B+2]*U,d[B+3]=p}return d}}(n,i)})()})(wh);var Nv={exports:{}};(function(t,n){(function(i,o){t.exports=o()})(Us,function(){var i=function(h){return h instanceof Uint8Array||h instanceof Uint16Array||h instanceof Uint32Array||h instanceof Int8Array||h instanceof Int16Array||h instanceof Int32Array||h instanceof Float32Array||h instanceof Float64Array||h instanceof Uint8ClampedArray},o=function(h,T){for(var G=Object.keys(T),se=0;se<G.length;++se)h[G[se]]=T[G[se]];return h},f=`
37
- `;function s(h){return typeof atob<"u"?atob(h):"base64:"+h}function l(h){var T=new Error("(regl) "+h);throw console.error(T),T}function d(h,T){h||l(T)}function v(h){return h?": "+h:""}function M(h,T,G){h in T||l("unknown parameter ("+h+")"+v(G)+". possible values: "+Object.keys(T).join())}function B(h,T){i(h)||l("invalid parameter type"+v(T)+". must be a typed array")}function p(h,T){switch(T){case"number":return typeof h=="number";case"object":return typeof h=="object";case"string":return typeof h=="string";case"boolean":return typeof h=="boolean";case"function":return typeof h=="function";case"undefined":return typeof h>"u";case"symbol":return typeof h=="symbol"}}function U(h,T,G){p(h,T)||l("invalid parameter type"+v(G)+". expected "+T+", got "+typeof h)}function q(h,T){h>=0&&(h|0)===h||l("invalid parameter type, ("+h+")"+v(T)+". must be a nonnegative integer")}function D(h,T,G){T.indexOf(h)<0&&l("invalid value"+v(G)+". must be one of: "+T)}var pe=["gl","canvas","container","attributes","pixelRatio","extensions","optionalExtensions","profile","onDone"];function ue(h){Object.keys(h).forEach(function(T){pe.indexOf(T)<0&&l('invalid regl constructor argument "'+T+'". must be one of '+pe)})}function b(h,T){for(h=h+"";h.length<T;)h=" "+h;return h}function A(){this.name="unknown",this.lines=[],this.index={},this.hasErrors=!1}function g(h,T){this.number=h,this.line=T,this.errors=[]}function x(h,T,G){this.file=h,this.line=T,this.message=G}function P(){var h=new Error,T=(h.stack||h).toString(),G=/compileProcedure.*\n\s*at.*\((.*)\)/.exec(T);if(G)return G[1];var se=/compileProcedure.*\n\s*at\s+(.*)(\n|$)/.exec(T);return se?se[1]:"unknown"}function F(){var h=new Error,T=(h.stack||h).toString(),G=/at REGLCommand.*\n\s+at.*\((.*)\)/.exec(T);if(G)return G[1];var se=/at REGLCommand.*\n\s+at\s+(.*)\n/.exec(T);return se?se[1]:"unknown"}function J(h,T){var G=h.split(`
38
+ }`;var or=W_(function(){return mr(L,Rt+"return "+ze).apply(i,z)});if(or.source=ze,h0(or))throw or;return or}function oS(e){return Rr(e).toLowerCase()}function sS(e){return Rr(e).toUpperCase()}function fS(e,r,o){if(e=Rr(e),e&&(o||r===i))return ic(e);if(!e||!(r=Qn(r)))return e;var c=Yn(e),_=Yn(r),L=uf(c,_),z=cf(c,_)+1;return Ai(c,L,z).join("")}function lS(e,r,o){if(e=Rr(e),e&&(o||r===i))return e.slice(0,fc(e)+1);if(!e||!(r=Qn(r)))return e;var c=Yn(e),_=cf(c,Yn(r))+1;return Ai(c,0,_).join("")}function uS(e,r,o){if(e=Rr(e),e&&(o||r===i))return e.replace(Yr,"");if(!e||!(r=Qn(r)))return e;var c=Yn(e),_=uf(c,Yn(r));return Ai(c,_).join("")}function cS(e,r){var o=ut,c=it;if(rn(r)){var _="separator"in r?r.separator:_;o="length"in r?nr(r.length):o,c="omission"in r?Qn(r.omission):c}e=Rr(e);var L=e.length;if(za(e)){var z=Yn(e);L=z.length}if(o>=L)return e;var $=o-_a(c);if($<1)return c;var ie=z?Ai(z,0,$).join(""):e.slice(0,$);if(_===i)return ie+c;if(z&&($+=ie.length-$),d0(_)){if(e.slice($).search(_)){var Fe,Pe=ie;for(_.global||(_=Ll(_.source,Rr(Kn.exec(_))+"g")),_.lastIndex=0;Fe=_.exec(Pe);)var ze=Fe.index;ie=ie.slice(0,ze===i?$:ze)}}else if(e.indexOf(Qn(_),$)!=$){var vt=ie.lastIndexOf(_);vt>-1&&(ie=ie.slice(0,vt))}return ie+c}function hS(e){return e=Rr(e),e&&w.test(e)?e.replace(de,wd):e}var dS=Xo(function(e,r,o){return e+(o?" ":"")+r.toUpperCase()}),p0=tu("toUpperCase");function z_(e,r,o){return e=Rr(e),r=o?i:r,r===i?ac(e)?Ad(e):xd(e):e.match(r)||[]}var W_=rr(function(e,r){try{return pn(e,i,r)}catch(o){return h0(o)?o:new Zt(o)}}),vS=Ni(function(e,r){return An(r,function(o){o=Dr(o),Xn(e,o,u0(e[o],e))}),e});function _S(e){var r=e==null?0:e.length,o=Bt();return e=r?Br(e,function(c){if(typeof c[1]!="function")throw new ai(l);return[o(c[0]),c[1]]}):[],rr(function(c){for(var _=-1;++_<r;){var L=e[_];if(pn(L[0],this,c))return pn(L[1],this,c)}})}function pS(e){return xc(Tn(e,p))}function m0(e){return function(){return e}}function mS(e,r){return e==null||e!==e?r:e}var gS=na(),yS=na(!0);function hi(e){return e}function g0(e){return Uo(typeof e=="function"?e:Tn(e,p))}function xS(e){return wa(Tn(e,p))}function bS(e,r){return Sa(e,Tn(r,p))}var wS=rr(function(e,r){return function(o){return to(o,e,r)}}),SS=rr(function(e,r){return function(o){return to(e,o,r)}});function y0(e,r,o){var c=Nn(r),_=ws(r,c);o==null&&!(rn(r)&&(_.length||!c.length))&&(o=r,r=e,e=this,_=ws(r,Nn(r)));var L=!(rn(o)&&"chain"in o)||!!o.chain,z=_o(e);return An(_,function($){var ie=r[$];e[$]=ie,z&&(e.prototype[$]=function(){var Fe=this.__chain__;if(L||Fe){var Pe=e(this.__wrapped__),ze=Pe.__actions__=kn(this.__actions__);return ze.push({func:ie,args:arguments,thisArg:e}),Pe.__chain__=Fe,Pe}return ie.apply(e,qi([this.value()],arguments))})}),e}function AS(){return Sn._===this&&(Sn._=lc),this}function x0(){}function TS(e){return e=nr(e),rr(function(r){return Yo(r,e)})}var ES=Pf(Br),DS=Pf(da),LS=Pf(sf);function V_(e){return Oe(e)?Ha(Dr(e)):Ho(e)}function RS(e){return function(r){return e==null?i:xa(e,r)}}var CS=zr(),OS=zr(!0);function b0(){return[]}function w0(){return!1}function IS(){return{}}function MS(){return""}function FS(){return!0}function kS(e,r){if(e=nr(e),e<1||e>Ze)return[];var o=Wt,c=In(e,Wt);r=Bt(r),e-=Wt;for(var _=xl(c,r);++o<e;)r(o);return _}function PS(e){return Jt(e)?Br(e,Dr):Di(e)?[e]:kn(Xt(Rr(e)))}function NS(e){var r=++Ld;return Rr(e)+r}var BS=lo(function(e,r){return e+r},0),GS=nu("ceil"),US=lo(function(e,r){return e/r},1),YS=nu("floor");function HS(e){return e&&e.length?eo(e,hi,Ss):i}function zS(e,r){return e&&e.length?eo(e,Bt(r,2),Ss):i}function WS(e){return fs(e,hi)}function VS(e,r){return fs(e,Bt(r,2))}function $S(e){return e&&e.length?eo(e,hi,ro):i}function ZS(e,r){return e&&e.length?eo(e,Bt(r,2),ro):i}var XS=lo(function(e,r){return e*r},1),qS=nu("round"),KS=lo(function(e,r){return e-r},0);function jS(e){return e&&e.length?lf(e,hi):0}function QS(e,r){return e&&e.length?lf(e,Bt(r,2)):0}return S.after=x2,S.ary=w_,S.assign=sw,S.assignIn=P_,S.assignInWith=Zc,S.assignWith=fw,S.at=lw,S.before=S_,S.bind=u0,S.bindAll=vS,S.bindKey=A_,S.castArray=I2,S.chain=y_,S.chunk=tn,S.compact=un,S.concat=gn,S.cond=_S,S.conforms=pS,S.constant=m0,S.countBy=jb,S.create=uw,S.curry=T_,S.curryRight=E_,S.debounce=D_,S.defaults=cw,S.defaultsDeep=hw,S.defer=b2,S.delay=w2,S.difference=Wr,S.differenceBy=Ut,S.differenceWith=yn,S.drop=hr,S.dropRight=At,S.dropRightWhile=qt,S.dropWhile=er,S.fill=Vr,S.filter=Jb,S.flatMap=r2,S.flatMapDeep=n2,S.flatMapDepth=i2,S.flatten=k,S.flattenDeep=le,S.flattenDepth=ne,S.flip=S2,S.flow=gS,S.flowRight=yS,S.fromPairs=ft,S.functions=yw,S.functionsIn=xw,S.groupBy=a2,S.initial=y,S.intersection=H,S.intersectionBy=j,S.intersectionWith=Q,S.invert=ww,S.invertBy=Sw,S.invokeMap=s2,S.iteratee=g0,S.keyBy=f2,S.keys=Nn,S.keysIn=ci,S.map=Yc,S.mapKeys=Tw,S.mapValues=Ew,S.matches=xS,S.matchesProperty=bS,S.memoize=zc,S.merge=Dw,S.mergeWith=N_,S.method=wS,S.methodOf=SS,S.mixin=y0,S.negate=Wc,S.nthArg=TS,S.omit=Lw,S.omitBy=Rw,S.once=A2,S.orderBy=l2,S.over=ES,S.overArgs=T2,S.overEvery=DS,S.overSome=LS,S.partial=c0,S.partialRight=L_,S.partition=u2,S.pick=Cw,S.pickBy=B_,S.property=V_,S.propertyOf=RS,S.pull=N,S.pullAll=M,S.pullAllBy=re,S.pullAllWith=ee,S.pullAt=_e,S.range=CS,S.rangeRight=OS,S.rearg=E2,S.reject=d2,S.remove=be,S.rest=D2,S.reverse=Ye,S.sampleSize=_2,S.set=Iw,S.setWith=Mw,S.shuffle=p2,S.slice=Dt,S.sortBy=y2,S.sortedUniq=Tt,S.sortedUniqBy=vr,S.split=rS,S.spread=L2,S.tail=xn,S.take=co,S.takeRight=aa,S.takeRightWhile=Bi,S.takeWhile=La,S.tap=Hb,S.throttle=R2,S.thru=Uc,S.toArray=M_,S.toPairs=G_,S.toPairsIn=U_,S.toPath=PS,S.toPlainObject=k_,S.transform=Fw,S.unary=C2,S.union=ho,S.unionBy=Bc,S.unionWith=Jn,S.uniq=vo,S.uniqBy=li,S.uniqWith=Gc,S.unset=kw,S.unzip=Pn,S.unzipWith=Ps,S.update=Pw,S.updateWith=Nw,S.values=Hf,S.valuesIn=Bw,S.without=Uf,S.words=z_,S.wrap=O2,S.xor=kb,S.xorBy=Pb,S.xorWith=Nb,S.zip=Bb,S.zipObject=Gb,S.zipObjectDeep=Ub,S.zipWith=Yb,S.entries=G_,S.entriesIn=U_,S.extend=P_,S.extendWith=Zc,y0(S,S),S.add=BS,S.attempt=W_,S.camelCase=Hw,S.capitalize=Y_,S.ceil=GS,S.clamp=Gw,S.clone=M2,S.cloneDeep=k2,S.cloneDeepWith=P2,S.cloneWith=F2,S.conformsTo=N2,S.deburr=H_,S.defaultTo=mS,S.divide=US,S.endsWith=zw,S.eq=oa,S.escape=Ww,S.escapeRegExp=Vw,S.every=Qb,S.find=e2,S.findIndex=Ei,S.findKey=dw,S.findLast=t2,S.findLastIndex=Da,S.findLastKey=vw,S.floor=YS,S.forEach=x_,S.forEachRight=b_,S.forIn=_w,S.forInRight=pw,S.forOwn=mw,S.forOwnRight=gw,S.get=v0,S.gt=B2,S.gte=G2,S.has=bw,S.hasIn=_0,S.head=zt,S.identity=hi,S.includes=o2,S.indexOf=R,S.inRange=Uw,S.invoke=Aw,S.isArguments=Ns,S.isArray=Jt,S.isArrayBuffer=U2,S.isArrayLike=ui,S.isArrayLikeObject=cn,S.isBoolean=Y2,S.isBuffer=qo,S.isDate=H2,S.isElement=z2,S.isEmpty=W2,S.isEqual=V2,S.isEqualWith=$2,S.isError=h0,S.isFinite=Z2,S.isFunction=_o,S.isInteger=R_,S.isLength=Vc,S.isMap=C_,S.isMatch=X2,S.isMatchWith=q2,S.isNaN=K2,S.isNative=j2,S.isNil=J2,S.isNull=Q2,S.isNumber=O_,S.isObject=rn,S.isObjectLike=nn,S.isPlainObject=ou,S.isRegExp=d0,S.isSafeInteger=ew,S.isSet=I_,S.isString=$c,S.isSymbol=Di,S.isTypedArray=Yf,S.isUndefined=tw,S.isWeakMap=rw,S.isWeakSet=nw,S.join=W,S.kebabCase=$w,S.last=Y,S.lastIndexOf=X,S.lowerCase=Zw,S.lowerFirst=Xw,S.lt=iw,S.lte=aw,S.max=HS,S.maxBy=zS,S.mean=WS,S.meanBy=VS,S.min=$S,S.minBy=ZS,S.stubArray=b0,S.stubFalse=w0,S.stubObject=IS,S.stubString=MS,S.stubTrue=FS,S.multiply=XS,S.nth=O,S.noConflict=AS,S.noop=x0,S.now=Hc,S.pad=qw,S.padEnd=Kw,S.padStart=jw,S.parseInt=Qw,S.random=Yw,S.reduce=c2,S.reduceRight=h2,S.repeat=Jw,S.replace=eS,S.result=Ow,S.round=qS,S.runInContext=te,S.sample=v2,S.size=m2,S.snakeCase=tS,S.some=g2,S.sortedIndex=yt,S.sortedIndexBy=ot,S.sortedIndexOf=Ae,S.sortedLastIndex=he,S.sortedLastIndexBy=ht,S.sortedLastIndexOf=ct,S.startCase=nS,S.startsWith=iS,S.subtract=KS,S.sum=jS,S.sumBy=QS,S.template=aS,S.times=kS,S.toFinite=po,S.toInteger=nr,S.toLength=F_,S.toLower=oS,S.toNumber=Gi,S.toSafeInteger=ow,S.toString=Rr,S.toUpper=sS,S.trim=fS,S.trimEnd=lS,S.trimStart=uS,S.truncate=cS,S.unescape=hS,S.uniqueId=NS,S.upperCase=dS,S.upperFirst=p0,S.each=x_,S.eachRight=b_,S.first=zt,y0(S,function(){var e={};return si(S,function(r,o){gr.call(S.prototype,o)||(e[o]=r)}),e}(),{chain:!1}),S.VERSION=a,An(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){S[e].placeholder=S}),An(["drop","take"],function(e,r){cr.prototype[e]=function(o){o=o===i?1:qr(nr(o),0);var c=this.__filtered__&&!r?new cr(this):this.clone();return c.__filtered__?c.__takeCount__=In(o,c.__takeCount__):c.__views__.push({size:In(o,Wt),type:e+(c.__dir__<0?"Right":"")}),c},cr.prototype[e+"Right"]=function(o){return this.reverse()[e](o).reverse()}}),An(["filter","map","takeWhile"],function(e,r){var o=r+1,c=o==Re||o==xt;cr.prototype[e]=function(_){var L=this.clone();return L.__iteratees__.push({iteratee:Bt(_,3),type:o}),L.__filtered__=L.__filtered__||c,L}}),An(["head","last"],function(e,r){var o="take"+(r?"Right":"");cr.prototype[e]=function(){return this[o](1).value()[0]}}),An(["initial","tail"],function(e,r){var o="drop"+(r?"":"Right");cr.prototype[e]=function(){return this.__filtered__?new cr(this):this[o](1)}}),cr.prototype.compact=function(){return this.filter(hi)},cr.prototype.find=function(e){return this.filter(e).head()},cr.prototype.findLast=function(e){return this.reverse().find(e)},cr.prototype.invokeMap=rr(function(e,r){return typeof e=="function"?new cr(this):this.map(function(o){return to(o,e,r)})}),cr.prototype.reject=function(e){return this.filter(Wc(Bt(e)))},cr.prototype.slice=function(e,r){e=nr(e);var o=this;return o.__filtered__&&(e>0||r<0)?new cr(o):(e<0?o=o.takeRight(-e):e&&(o=o.drop(e)),r!==i&&(r=nr(r),o=r<0?o.dropRight(-r):o.take(r-e)),o)},cr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},cr.prototype.toArray=function(){return this.take(Wt)},si(cr.prototype,function(e,r){var o=/^(?:filter|find|map|reject)|While$/.test(r),c=/^(?:head|last)$/.test(r),_=S[c?"take"+(r=="last"?"Right":""):r],L=c||/^find/.test(r);!_||(S.prototype[r]=function(){var z=this.__wrapped__,$=c?[1]:arguments,ie=z instanceof cr,Fe=$[0],Pe=ie||Jt(z),ze=function(_r){var yr=_.apply(S,qi([_r],$));return c&&vt?yr[0]:yr};Pe&&o&&typeof Fe=="function"&&Fe.length!=1&&(ie=Pe=!1);var vt=this.__chain__,Rt=!!this.__actions__.length,Yt=L&&!vt,or=ie&&!Rt;if(!L&&Pe){z=or?z:new cr(this);var Ht=e.apply(z,$);return Ht.__actions__.push({func:Uc,args:[ze],thisArg:i}),new oi(Ht,vt)}return Yt&&or?e.apply(this,$):(Ht=this.thru(ze),Yt?c?Ht.value()[0]:Ht.value():Ht)})}),An(["pop","push","shift","sort","splice","unshift"],function(e){var r=df[e],o=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",c=/^(?:pop|shift)$/.test(e);S.prototype[e]=function(){var _=arguments;if(c&&!this.__chain__){var L=this.value();return r.apply(Jt(L)?L:[],_)}return this[o](function(z){return r.apply(Jt(z)?z:[],_)})}}),si(cr.prototype,function(e,r){var o=S[r];if(o){var c=o.name+"";gr.call(Mn,c)||(Mn[c]=[]),Mn[c].push({name:r,func:o})}}),Mn[ks(i,x).name]=[{name:"wrapper",func:i}],cr.prototype.clone=kd,cr.prototype.reverse=Pd,cr.prototype.value=Nd,S.prototype.at=zb,S.prototype.chain=Wb,S.prototype.commit=Vb,S.prototype.next=$b,S.prototype.plant=Xb,S.prototype.reverse=qb,S.prototype.toJSON=S.prototype.valueOf=S.prototype.value=Kb,S.prototype.first=S.prototype.head,xi&&(S.prototype[xi]=Zb),S},Ro=Td();Ua?((Ua.exports=Ro)._=Ro,vl._=Ro):Sn._=Ro}).call(Zs)})(Xs,Xs.exports);const bo=Xs.exports,Rh={normal:["FC6310R","FC6310"],infrared:["M3T"],multispectral:["FC6360"]};var ni=63710088e-1,Fv={centimeters:ni*100,centimetres:ni*100,degrees:ni/111325,feet:ni*3.28084,inches:ni*39.37,kilometers:ni/1e3,kilometres:ni/1e3,meters:ni,metres:ni,miles:ni/1609.344,millimeters:ni*1e3,millimetres:ni*1e3,nauticalmiles:ni/1852,radians:1,yards:ni*1.0936};function mx(t,n,i){i===void 0&&(i={});var a={type:"Feature"};return(i.id===0||i.id)&&(a.id=i.id),i.bbox&&(a.bbox=i.bbox),a.properties=n||{},a.geometry=t,a}function gx(t,n,i){if(i===void 0&&(i={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!kv(t[0])||!kv(t[1]))throw new Error("coordinates must contain numbers");var a={type:"Point",coordinates:t};return mx(a,n,i)}function yx(t,n){n===void 0&&(n="kilometers");var i=Fv[n];if(!i)throw new Error(n+" units is invalid");return t*i}function xx(t,n){n===void 0&&(n="kilometers");var i=Fv[n];if(!i)throw new Error(n+" units is invalid");return t/i}function Ch(t){var n=t%(2*Math.PI);return n*180/Math.PI}function Vi(t){var n=t%360;return n*Math.PI/180}function kv(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function tl(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return t.geometry.coordinates;if(t.type==="Point")return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function bx(t,n){return t.type==="FeatureCollection"?"FeatureCollection":t.type==="GeometryCollection"?"GeometryCollection":t.type==="Feature"&&t.geometry!==null?t.geometry.type:t.type}function Pv(t,n,i){i===void 0&&(i={});var a=tl(t),f=tl(n),s=Vi(f[1]-a[1]),l=Vi(f[0]-a[0]),d=Vi(a[1]),v=Vi(f[1]),I=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(l/2),2)*Math.cos(d)*Math.cos(v);return yx(2*Math.atan2(Math.sqrt(I),Math.sqrt(1-I)),i.units)}function wx(t,n,i,a){a===void 0&&(a={});var f=tl(t),s=Vi(f[0]),l=Vi(f[1]),d=Vi(i),v=xx(n,a.units),I=Math.asin(Math.sin(l)*Math.cos(v)+Math.cos(l)*Math.sin(v)*Math.cos(d)),B=s+Math.atan2(Math.sin(d)*Math.sin(v)*Math.cos(l),Math.cos(v)-Math.sin(l)*Math.sin(I)),p=Ch(B),U=Ch(I);return gx([p,U],a.properties)}function Nv(t,n,i){if(i===void 0&&(i={}),i.final===!0)return Sx(t,n);var a=tl(t),f=tl(n),s=Vi(a[0]),l=Vi(f[0]),d=Vi(a[1]),v=Vi(f[1]),I=Math.sin(l-s)*Math.cos(v),B=Math.cos(d)*Math.sin(v)-Math.sin(d)*Math.cos(v)*Math.cos(l-s);return Ch(Math.atan2(I,B))}function Sx(t,n){var i=Nv(n,t);return i=(i+180)%360,i}function Ax(t,n){var i=Pv(t,n),a=Nv(t,n),f=wx(t,i/2,a);return f}const Bv=[{id:"annotation",type:"annotation",name:"\u6807\u6CE8",collapsed:!1,visible:!0,opacity:1},{id:"output",type:"output",name:"\u6210\u679C\u56FE\u5C42",collapsed:!1,visible:!0,opacity:1},{id:"dataset",type:"dataset",name:"\u6570\u636E\u96C6",collapsed:!1,visible:!0,opacity:1},{id:"overlay",type:"overlay",name:"\u8986\u76D6\u7269",collapsed:!1,visible:!0,opacity:1}],Tx=[{type:"image",img:"satellite",name:"\u5F71\u50CF\u5730\u56FE",items:[{type:"raster",tileSize:256,tiles:["https://t0.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0"],maxzoom:18,layerType:"bmap"},{type:"raster",tileSize:256,tiles:["https://t0.tianditu.gov.cn/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0"],maxzoom:18,layerType:"bmap"}]},{type:"vector_standard",img:"vector_standard",name:"\u77E2\u91CF\u5730\u56FE",items:[{type:"raster",tileSize:256,tiles:["https://t0.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0"],maxzoom:18,layerType:"bmap"},{type:"raster",tileSize:256,tiles:["https://t0.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=bfc12ce6bd94a4449ad626b8a0b709d0"],maxzoom:18,layerType:"bmap"}]}],Ex=["#321644","#455dd1","#2eb4f2","#26eda6","#c3f134","#f8bd39","#e14209","#7a0403"],Dx=[{type:"dom",name:"\u6B63\u5C04\u5F71\u50CF\uFF08DOM\uFF09",group:"output",visible:!0,opacity:1,class:"image2d"},{type:"tmp",name:"\u6E29\u5EA6\u56FE",group:"output",visible:!0,opacity:1,class:"tmp"},{type:"dsm",name:"\u6570\u5B57\u8868\u9762\u6A21\u578B\uFF08DSM\uFF09",group:"output",visible:!1,opacity:.5,class:"image2d"},{type:"mesh3d",name:"\u4E09\u7EF4\u6A21\u578B",group:"output",visible:!0,opacity:1,class:"mesh3d"},{type:"ndvi",name:"\u690D\u88AB\u6307\u6570\uFF08NDVI\uFF09",group:"output",visible:!0,opacity:1,class:"ndvi"},{type:"photos",name:"\u7167\u7247",group:"dataset",visible:!1,opacity:1,class:"photos"}],Lx={dom:"tile",dsm:"dsm_tile",ndvi:"ndvi_tile",tmp:"tem_tile"},Rx={annotation:"icon-biaozhu",output:"icon-chengguo",dataset:"icon-photos",overlay:"icon-dataset",geojson:"icon-vector",raster:"icon-tuxiang",object:"icon-cube",dom:"icon-tuxiang",dsm:"icon-moxing",ndvi:"icon-zhishu",mesh3d:"icon-mesh",point_cloud:"icon-dianyun",photos:"icon-24gf-photoAlbum",point:"icon-locate",line:"icon-line",polygon:"icon-polygon"},Cx=[{name:"2d",icon:"icon-view_d"},{name:"3d",icon:"icon-view_d1"}],Ox={quality:"medium",output:{normal:[{type:"image2d",name:"\u4E8C\u7EF4\u6B63\u5C04\uFF08DOM+DSM\uFF09"},{type:"mesh3d",name:"\u4E09\u7EF4\u6A21\u578B\uFF083DTiles\uFF09"}],infrared:[{type:"tmp",name:"\u6E29\u5EA6\u56FE",required:!0}],multispectral:[{type:"image2d",name:"\u4E8C\u7EF4\u6B63\u5C04\uFF08DOM+DSM\uFF09"},{type:"ndvi",name:"\u690D\u88AB\u6307\u6570\uFF08NDVI\uFF09",required:!0}]}},Ix=[{type:"draw_point",mode:"draw_point",name:"\u6807\u70B9",icon:"icon-locate"},{type:"draw_line_string",mode:"draw_line_string",name:"\u6807\u7EBF",icon:"icon-line"},{type:"draw_polygon",mode:"draw_polygon",name:"\u6807\u9762",icon:"icon-polygon"}];function Mx(){return _m()}function Fx(t){return t?_t(t).format("YYYY-MM-DD HH:mm:ss"):"-"}function kx(){return _t().format("YYYY/M/D HH:mm:ss")}function Px(t){return t=parseInt(t),t=t.toString(),t.length>6?(t=(Number(t)/1e6).toFixed(2),t+" MB"):(t=(Number(t)/1e3).toFixed(2),t+" KB")}async function Nx(t){let n=t.slice(0,131072);n.name=t.name;let i=await jc(n),{GPSAltitude:a,GPSLatitude:f,GPSLatitudeRef:s,GPSLongitude:l,GPSLongitudeRef:d,DateTimeOriginal:v,Model:I,PixelXDimension:B,PixelYDimension:p}=i,U=null;return l&&f&&(U={lng:Oh(d)*Ih(l),lat:Oh(s)*Ih(f),alt:+a}),{date:v&&v.split(" ")[0].replaceAll(":","-"),Model:I,width:B,height:p,position:U}}function Bx(t){return new Promise((n,i)=>{let a,f,s=t.slice(0,131072);s.name=t.name,jc(s).then(I=>{f=I,v()});let l=new FileReader,d=new px.ArrayBuffer;l.readAsArrayBuffer(s),l.onload=I=>{d.append(I.target.result),a=d.end(),v()};function v(){!a||!f||(n({md5:a,exif:f}),l=null,d=null)}})}function Oh(t){return t==="N"||t==="E"?1:-1}function Ih(t){return t[0]+t[1]/60+t[2]/3600}function Gx(t,n=[]){t=Gv(t),n=Gv(n);let i=[];for(let a of t){let{visible:f}=a;for(let s of a.items||[]){let{id:l,type:d,opacity:v,visible:I,color:B,geometry:p}=s;if(f||(I=!1),["point","line","polygon"].includes(d)&&i.find(pe=>pe[0]==="updateAnnotations"))continue;let U=ku(l,n);if(!U&&!I)continue;if(!U){["point","line","polygon"].includes(d)?i.push(["updateAnnotations",s]):i.push(["addLayer",s]);continue}let{opacity:q,visible:D}=U;bo.isEqual(s,U)||(["point","line","polygon"].includes(d)?i.push(["updateAnnotations",s]):v!==q||d==="geojson"&&!bo.isEqual(s.metadata,U.metadata)?i.push(["updateLayer",s]):I!==D&&i.push([I?"addLayer":"removeLayer",s]))}}for(let a of n)for(let f of a.items||[]){let{id:s,type:l}=f;ku(s,t)||(["point","line","polygon"].includes(l)?i.find(v=>v[0]==="updateAnnotations")||i.push(["updateAnnotations",f]):i.push(["removeLayer",f]))}return i}function ku(t,n){var i;for(let a of n){if(a.id===t)return a;if((i=a.items)!=null&&i.length){let f=ku(t,a.items);if(f)return f}}return null}function Gv(t){let n=bo.cloneDeep(t);for(let i of n)for(let a of i.items||[])i.visible||(a.visible=!1);return n}function Ux(t,n){let i=t.style._layers,a=t.style.order,{layerType:f}=n.metadata;return a.find(d=>{let v=i[d].metadata;return bo.isEmpty(v)&&(v={layerType:"dsm"}),l(f,n.id)<l(v.layerType,d)})||"";function l(d,v){const I=[["bmap"],["dom"],["ndvi"],["dsm"],["circle"],["annotation"],["label"]];let B=-1;return v.startsWith("gl-draw")?B=5:B=I.findIndex(p=>p.includes(d)),B===-1?100:B}}function Yx(t){if(!t)return!1;let{message:n="",msg:i=""}=t.data;return t.status==401&&(i.toLowerCase().includes("expired")||n.toLowerCase().includes("expired"))}function Hx(t){for(let n in Rh)if(Rh[n].includes(t))return n;return"normal"}function zx(t){let n=`\u5FEB\u7167${_t().format("YYYYMMDD")}${new Date().getTime()}.png`,i=document.createElement("a");i.href=t,i.download=n,document.body.appendChild(i),i.click(),document.body.removeChild(i)}function Wx(t){let n=bx(t);return["Point","MultiPoint"].includes(n)?"point":["LineString","MultiLineString"].includes(n)?"line":"polygon"}function Vx(t){let n=t[3]>128?0:1,i=-1*(1-n)+n,a=Math.floor((t[3]+.1)%128)*2+Math.floor((t[2]+.1)/128)-127,f=t[0]+t[1]*256+Math.floor((t[2]+.1)%128)*256*256;return i*(1+f/8388607)*Math.pow(2,a)}function $x(t){let{geometry:n}=t,i=bo.cloneDeep(t);return delete i.geometry,{id:i.id,type:"Feature",properties:i,geometry:bo.cloneDeep(n)}}function Zx(t,n){let i=[],a=n==="point"?"\u70B9\u6CE8\u8BB0":n==="line"?"\u7EBF\u6CE8\u8BB0":"\u9762\u6CE8\u8BB0";t.forEach(f=>{if(f.name===a){i.push(0);return}if(f.name.startsWith(`${a} `)){let s=Number(f.name.split(" ").pop());Number.isNaN(s)||i.push(s)}}),i=i.sort((f,s)=>f-s);for(let f=0;f<i.length;f++)if(i[f]!==f)return f===0?a:`${a} ${f}`;return i.length===0?a:`${a} ${i.length}`}function Xx(t){let n=t.geometry.coordinates,i=[];for(let v=1;v<n.length;v++)Pv(n[v-1],n[v],{units:"meters"})>30&&i.push([n[v-1],n[v]]);let a=[];if(i.length){let v=Math.floor(i.length/2);a=i[v]}else{let v=Math.floor(n.length/2-1);a=[n[v],n[v+1]]}let f=Mh(a[0]),s=Mh(a[1]),l=360-Math.atan((f.y-s.y)/(s.x-f.x))*180/Math.PI,d=Ax(a[0],a[1]);return d.properties=t.properties,d.properties.angle=l,d.geometry.coordinates.push(((a[0][2]||0)+(a[1][2]||0))/2),d}function Mh(t,n=12){let[i,a]=t,f=(180+i)/360,s=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+a*Math.PI/360)))/360;return{x:f*Math.pow(2,n)*512,y:s*Math.pow(2,n)*512}}function qx(t,n){n.forEach(i=>{t.loadImage(i,(a,f)=>{let s=i.split("/").pop().split(".")[0];if(!t.hasImage(s)){if(a)throw a;t.addImage(s,f)}})})}function Kx(t,n,i){var s;let a=bo.cloneDeep(((s=t.metadata)==null?void 0:s.groups)||Bv);return a.forEach(l=>l.items=[]),n.forEach(l=>{let d=bo.cloneDeep(l);d.group||d.group,a.find(I=>I.id===d.group).items.push(d)}),(t.status==="complete"?i:[]).forEach(l=>{let{group:d}=l,v=a.find(I=>I.id===d);!v||v.items.push(l)}),a}let wo=null;function Uv(t,n,i){i[t]=i[t]||[],i[t].push(n)}function Fh(t,n,i){if(i&&i[t]){const a=i[t].indexOf(n);a!==-1&&i[t].splice(a,1)}}function Yv(t,...n){for(const i of n)for(const a in i)t[a]=i[a];return t}function jx(t,n){return t.indexOf(n,t.length-n.length)!==-1}class Qx{constructor(){this._listeners=[],this._oneTimeListeners=[],this._eventedParent=null,this._eventedParentData=null}on(n,i){return this._listeners=this._listeners||{},Uv(n,i,this._listeners),this}off(n,i){if(!i){this._listeners={},this._oneTimeListeners={};return}return Fh(n,i,this._listeners),Fh(n,i,this._oneTimeListeners),this}once(n,i){return this._oneTimeListeners=this._oneTimeListeners||{},Uv(n,i,this._oneTimeListeners),this}fire(n,i){if(this.listens(n)){if(i=Yv({},i,{type:n,target:this}),wo){if(i.point&&wo===i.point.x+i.point.y){if(wo===i.point.x+i.point.y)return;wo=i.point.x+i.point.y}else if(i.feature){if(wo===i.x+i.y)return;wo=i.x+i.y}}else i.point?wo=i.point.x+i.point.y:i.feature&&(wo=i.x+i.y);const a=this._listeners&&this._listeners[n]?this._listeners[n].slice():[];for(let s=0;s<a.length;s++)a[s].call(this,i);const f=this._oneTimeListeners&&this._oneTimeListeners[n]?this._oneTimeListeners[n].slice():[];for(let s=0;s<f.length;s++)f[s].call(this,i),Fh(n,f[s],this._oneTimeListeners);this._eventedParent&&this._eventedParent.fire(n,Yv({},i,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData))}else jx(n,"error")&&console.error(i&&i.error||i||"Empty error event");return this}listens(n){return this._listeners&&this._listeners[n]&&this._listeners[n].length>0||this._oneTimeListeners&&this._oneTimeListeners[n]&&this._oneTimeListeners[n].length>0||this._eventedParent&&this._eventedParent.listens(n)}setEventedParent(n,i){return this._eventedParent=n,this._eventedParentData=i,this}}const Jx={tileFormat:"float32",tileSize:256,colorScale:[],sentinelValues:[],transitions:!1,transitionTimeMs:800,debug:!1,extraPixelLayers:0,colorscaleMaxLength:16,sentinelMaxLength:16,minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,glOperation:"none",multiLayers:0,operationUrlA:"",operationUrlB:"",operationUrlC:"",operationUrlD:"",operationUrlE:"",operationUrlF:"",filterLowA:0,filterHighA:1e5,filterLowB:0,filterHighB:1e5,filterLowC:0,filterHighC:1e5,filterLowD:0,filterHighD:1e5,filterLowE:0,filterHighE:1e5,filterLowF:0,filterHighF:1e5,multiplierA:1,multiplierB:1,multiplierC:1,multiplierD:1,multiplierE:1,multiplierF:1,hillshadeType:"none",hsSimpleZoomdelta:0,hsSimpleSlopescale:3,hsSimpleAzimuth:315,hsSimpleAltitude:70,hsAdvValueScale:1,hsAdvPixelScale:"auto",hsAdvSoftIterations:10,hsAdvAmbientIterations:10,hsAdvSunRadiusMultiplier:100,hsAdvFinalSoftMultiplier:1,hsAdvFinalAmbientMultiplier:.25,hsAdvBaselayerUrl:"",hsAdvSmoothInput:!1,hsAdvSmoothInputKernel:3,hsPregenUrl:"",_hillshadeOptions:{hillshadeType:"none"},contourType:"none",contourSmoothLines:!1,contourSmoothInput:!1,contourSmoothInputKernel:7,contourScaleFactor:1,contourInterval:25,contourIndexInterval:100,contourLineColor:"#000000",contourIlluminatedHighlightColor:"rgba(177,174,164,.5)",contourIlluminatedShadowColor:"#5b5143",contourIlluminatedShadowSize:2,contourLineWeight:.5,contourLineIndexWeight:2,contourIndexLabels:!1,contourLabelFont:"12px Arial",contourLabelDistance:250,contourHypso:!1,contourHypsoDomain:[0,1e3,2e3],contourHypsoColors:["#486341","#e5d9c9","#dddddd"],contourBathy:!1,contourBathyDomain:[-2e3,0],contourBathyColors:["#315d9b","#d5f2ff"],contourBathyShadowColor:"#4e5c66",contourBathyHighlightColor:"rgba(224, 242, 255, .5)"};function eb(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var kh={exports:{}},Ph={},Hv;function So(){return Hv||(Hv=1,function(t){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function i(s,l){return Object.prototype.hasOwnProperty.call(s,l)}t.assign=function(s){for(var l=Array.prototype.slice.call(arguments,1);l.length;){var d=l.shift();if(!!d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var v in d)i(d,v)&&(s[v]=d[v])}}return s},t.shrinkBuf=function(s,l){return s.length===l?s:s.subarray?s.subarray(0,l):(s.length=l,s)};var a={arraySet:function(s,l,d,v,I){if(l.subarray&&s.subarray){s.set(l.subarray(d,d+v),I);return}for(var B=0;B<v;B++)s[I+B]=l[d+B]},flattenChunks:function(s){var l,d,v,I,B,p;for(v=0,l=0,d=s.length;l<d;l++)v+=s[l].length;for(p=new Uint8Array(v),I=0,l=0,d=s.length;l<d;l++)B=s[l],p.set(B,I),I+=B.length;return p}},f={arraySet:function(s,l,d,v,I){for(var B=0;B<v;B++)s[I+B]=l[d+B]},flattenChunks:function(s){return[].concat.apply([],s)}};t.setTyped=function(s){s?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,a)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,f))},t.setTyped(n)}(Ph)),Ph}var qs={},$i={},rs={},zv;function tb(){if(zv)return rs;zv=1;var t=So(),n=4,i=0,a=1,f=2;function s(C){for(var Ue=C.length;--Ue>=0;)C[Ue]=0}var l=0,d=1,v=2,I=3,B=258,p=29,U=256,q=U+1+p,D=30,pe=19,ue=2*q+1,x=15,A=16,g=7,b=256,P=16,F=17,J=18,Te=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],nt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ut=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],it=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],st=512,tt=new Array((q+2)*2);s(tt);var Re=new Array(D*2);s(Re);var Ot=new Array(st);s(Ot);var xt=new Array(B-I+1);s(xt);var Ie=new Array(p);s(Ie);var Ze=new Array(D);s(Ze);function St(C,Ue,Xe,dt,Z){this.static_tree=C,this.extra_bits=Ue,this.extra_base=Xe,this.elems=dt,this.max_length=Z,this.has_stree=C&&C.length}var $t,Wt,Qt;function sr(C,Ue){this.dyn_tree=C,this.max_code=0,this.stat_desc=Ue}function br(C){return C<256?Ot[C]:Ot[256+(C>>>7)]}function lr(C,Ue){C.pending_buf[C.pending++]=Ue&255,C.pending_buf[C.pending++]=Ue>>>8&255}function Kt(C,Ue,Xe){C.bi_valid>A-Xe?(C.bi_buf|=Ue<<C.bi_valid&65535,lr(C,C.bi_buf),C.bi_buf=Ue>>A-C.bi_valid,C.bi_valid+=Xe-A):(C.bi_buf|=Ue<<C.bi_valid&65535,C.bi_valid+=Xe)}function wr(C,Ue,Xe){Kt(C,Xe[Ue*2],Xe[Ue*2+1])}function Gt(C,Ue){var Xe=0;do Xe|=C&1,C>>>=1,Xe<<=1;while(--Ue>0);return Xe>>>1}function Mt(C){C.bi_valid===16?(lr(C,C.bi_buf),C.bi_buf=0,C.bi_valid=0):C.bi_valid>=8&&(C.pending_buf[C.pending++]=C.bi_buf&255,C.bi_buf>>=8,C.bi_valid-=8)}function dn(C,Ue){var Xe=Ue.dyn_tree,dt=Ue.max_code,Z=Ue.stat_desc.static_tree,we=Ue.stat_desc.has_stree,m=Ue.stat_desc.extra_bits,He=Ue.stat_desc.extra_base,Nt=Ue.stat_desc.max_length,u,de,ye,w,V,ce,Et=0;for(w=0;w<=x;w++)C.bl_count[w]=0;for(Xe[C.heap[C.heap_max]*2+1]=0,u=C.heap_max+1;u<ue;u++)de=C.heap[u],w=Xe[Xe[de*2+1]*2+1]+1,w>Nt&&(w=Nt,Et++),Xe[de*2+1]=w,!(de>dt)&&(C.bl_count[w]++,V=0,de>=He&&(V=m[de-He]),ce=Xe[de*2],C.opt_len+=ce*(w+V),we&&(C.static_len+=ce*(Z[de*2+1]+V)));if(Et!==0){do{for(w=Nt-1;C.bl_count[w]===0;)w--;C.bl_count[w]--,C.bl_count[w+1]+=2,C.bl_count[Nt]--,Et-=2}while(Et>0);for(w=Nt;w!==0;w--)for(de=C.bl_count[w];de!==0;)ye=C.heap[--u],!(ye>dt)&&(Xe[ye*2+1]!==w&&(C.opt_len+=(w-Xe[ye*2+1])*Xe[ye*2],Xe[ye*2+1]=w),de--)}}function Qr(C,Ue,Xe){var dt=new Array(x+1),Z=0,we,m;for(we=1;we<=x;we++)dt[we]=Z=Z+Xe[we-1]<<1;for(m=0;m<=Ue;m++){var He=C[m*2+1];He!==0&&(C[m*2]=Gt(dt[He]++,He))}}function kt(){var C,Ue,Xe,dt,Z,we=new Array(x+1);for(Xe=0,dt=0;dt<p-1;dt++)for(Ie[dt]=Xe,C=0;C<1<<Te[dt];C++)xt[Xe++]=dt;for(xt[Xe-1]=dt,Z=0,dt=0;dt<16;dt++)for(Ze[dt]=Z,C=0;C<1<<nt[dt];C++)Ot[Z++]=dt;for(Z>>=7;dt<D;dt++)for(Ze[dt]=Z<<7,C=0;C<1<<nt[dt]-7;C++)Ot[256+Z++]=dt;for(Ue=0;Ue<=x;Ue++)we[Ue]=0;for(C=0;C<=143;)tt[C*2+1]=8,C++,we[8]++;for(;C<=255;)tt[C*2+1]=9,C++,we[9]++;for(;C<=279;)tt[C*2+1]=7,C++,we[7]++;for(;C<=287;)tt[C*2+1]=8,C++,we[8]++;for(Qr(tt,q+1,we),C=0;C<D;C++)Re[C*2+1]=5,Re[C*2]=Gt(C,5);$t=new St(tt,Te,U+1,q,x),Wt=new St(Re,nt,0,D,x),Qt=new St(new Array(0),ut,0,pe,g)}function Nr(C){var Ue;for(Ue=0;Ue<q;Ue++)C.dyn_ltree[Ue*2]=0;for(Ue=0;Ue<D;Ue++)C.dyn_dtree[Ue*2]=0;for(Ue=0;Ue<pe;Ue++)C.bl_tree[Ue*2]=0;C.dyn_ltree[b*2]=1,C.opt_len=C.static_len=0,C.last_lit=C.matches=0}function Fr(C){C.bi_valid>8?lr(C,C.bi_buf):C.bi_valid>0&&(C.pending_buf[C.pending++]=C.bi_buf),C.bi_buf=0,C.bi_valid=0}function Xr(C,Ue,Xe,dt){Fr(C),dt&&(lr(C,Xe),lr(C,~Xe)),t.arraySet(C.pending_buf,C.window,Ue,Xe,C.pending),C.pending+=Xe}function Jr(C,Ue,Xe,dt){var Z=Ue*2,we=Xe*2;return C[Z]<C[we]||C[Z]===C[we]&&dt[Ue]<=dt[Xe]}function ar(C,Ue,Xe){for(var dt=C.heap[Xe],Z=Xe<<1;Z<=C.heap_len&&(Z<C.heap_len&&Jr(Ue,C.heap[Z+1],C.heap[Z],C.depth)&&Z++,!Jr(Ue,dt,C.heap[Z],C.depth));)C.heap[Xe]=C.heap[Z],Xe=Z,Z<<=1;C.heap[Xe]=dt}function Pt(C,Ue,Xe){var dt,Z,we=0,m,He;if(C.last_lit!==0)do dt=C.pending_buf[C.d_buf+we*2]<<8|C.pending_buf[C.d_buf+we*2+1],Z=C.pending_buf[C.l_buf+we],we++,dt===0?wr(C,Z,Ue):(m=xt[Z],wr(C,m+U+1,Ue),He=Te[m],He!==0&&(Z-=Ie[m],Kt(C,Z,He)),dt--,m=br(dt),wr(C,m,Xe),He=nt[m],He!==0&&(dt-=Ze[m],Kt(C,dt,He)));while(we<C.last_lit);wr(C,b,Ue)}function Dn(C,Ue){var Xe=Ue.dyn_tree,dt=Ue.stat_desc.static_tree,Z=Ue.stat_desc.has_stree,we=Ue.stat_desc.elems,m,He,Nt=-1,u;for(C.heap_len=0,C.heap_max=ue,m=0;m<we;m++)Xe[m*2]!==0?(C.heap[++C.heap_len]=Nt=m,C.depth[m]=0):Xe[m*2+1]=0;for(;C.heap_len<2;)u=C.heap[++C.heap_len]=Nt<2?++Nt:0,Xe[u*2]=1,C.depth[u]=0,C.opt_len--,Z&&(C.static_len-=dt[u*2+1]);for(Ue.max_code=Nt,m=C.heap_len>>1;m>=1;m--)ar(C,Xe,m);u=we;do m=C.heap[1],C.heap[1]=C.heap[C.heap_len--],ar(C,Xe,1),He=C.heap[1],C.heap[--C.heap_max]=m,C.heap[--C.heap_max]=He,Xe[u*2]=Xe[m*2]+Xe[He*2],C.depth[u]=(C.depth[m]>=C.depth[He]?C.depth[m]:C.depth[He])+1,Xe[m*2+1]=Xe[He*2+1]=u,C.heap[1]=u++,ar(C,Xe,1);while(C.heap_len>=2);C.heap[--C.heap_max]=C.heap[1],dn(C,Ue),Qr(Xe,Nt,C.bl_count)}function Ln(C,Ue,Xe){var dt,Z=-1,we,m=Ue[0*2+1],He=0,Nt=7,u=4;for(m===0&&(Nt=138,u=3),Ue[(Xe+1)*2+1]=65535,dt=0;dt<=Xe;dt++)we=m,m=Ue[(dt+1)*2+1],!(++He<Nt&&we===m)&&(He<u?C.bl_tree[we*2]+=He:we!==0?(we!==Z&&C.bl_tree[we*2]++,C.bl_tree[P*2]++):He<=10?C.bl_tree[F*2]++:C.bl_tree[J*2]++,He=0,Z=we,m===0?(Nt=138,u=3):we===m?(Nt=6,u=3):(Nt=7,u=4))}function en(C,Ue,Xe){var dt,Z=-1,we,m=Ue[0*2+1],He=0,Nt=7,u=4;for(m===0&&(Nt=138,u=3),dt=0;dt<=Xe;dt++)if(we=m,m=Ue[(dt+1)*2+1],!(++He<Nt&&we===m)){if(He<u)do wr(C,we,C.bl_tree);while(--He!==0);else we!==0?(we!==Z&&(wr(C,we,C.bl_tree),He--),wr(C,P,C.bl_tree),Kt(C,He-3,2)):He<=10?(wr(C,F,C.bl_tree),Kt(C,He-3,3)):(wr(C,J,C.bl_tree),Kt(C,He-11,7));He=0,Z=we,m===0?(Nt=138,u=3):we===m?(Nt=6,u=3):(Nt=7,u=4)}}function on(C){var Ue;for(Ln(C,C.dyn_ltree,C.l_desc.max_code),Ln(C,C.dyn_dtree,C.d_desc.max_code),Dn(C,C.bl_desc),Ue=pe-1;Ue>=3&&C.bl_tree[it[Ue]*2+1]===0;Ue--);return C.opt_len+=3*(Ue+1)+5+5+4,Ue}function E(C,Ue,Xe,dt){var Z;for(Kt(C,Ue-257,5),Kt(C,Xe-1,5),Kt(C,dt-4,4),Z=0;Z<dt;Z++)Kt(C,C.bl_tree[it[Z]*2+1],3);en(C,C.dyn_ltree,Ue-1),en(C,C.dyn_dtree,Xe-1)}function pi(C){var Ue=4093624447,Xe;for(Xe=0;Xe<=31;Xe++,Ue>>>=1)if(Ue&1&&C.dyn_ltree[Xe*2]!==0)return i;if(C.dyn_ltree[9*2]!==0||C.dyn_ltree[10*2]!==0||C.dyn_ltree[13*2]!==0)return a;for(Xe=32;Xe<U;Xe++)if(C.dyn_ltree[Xe*2]!==0)return a;return i}var vn=!1;function Zi(C){vn||(kt(),vn=!0),C.l_desc=new sr(C.dyn_ltree,$t),C.d_desc=new sr(C.dyn_dtree,Wt),C.bl_desc=new sr(C.bl_tree,Qt),C.bi_buf=0,C.bi_valid=0,Nr(C)}function Gn(C,Ue,Xe,dt){Kt(C,(l<<1)+(dt?1:0),3),Xr(C,Ue,Xe,!0)}function Tr(C){Kt(C,d<<1,3),wr(C,b,tt),Mt(C)}function Rn(C,Ue,Xe,dt){var Z,we,m=0;C.level>0?(C.strm.data_type===f&&(C.strm.data_type=pi(C)),Dn(C,C.l_desc),Dn(C,C.d_desc),m=on(C),Z=C.opt_len+3+7>>>3,we=C.static_len+3+7>>>3,we<=Z&&(Z=we)):Z=we=Xe+5,Xe+4<=Z&&Ue!==-1?Gn(C,Ue,Xe,dt):C.strategy===n||we===Z?(Kt(C,(d<<1)+(dt?1:0),3),Pt(C,tt,Re)):(Kt(C,(v<<1)+(dt?1:0),3),E(C,C.l_desc.max_code+1,C.d_desc.max_code+1,m+1),Pt(C,C.dyn_ltree,C.dyn_dtree)),Nr(C),dt&&Fr(C)}function Un(C,Ue,Xe){return C.pending_buf[C.d_buf+C.last_lit*2]=Ue>>>8&255,C.pending_buf[C.d_buf+C.last_lit*2+1]=Ue&255,C.pending_buf[C.l_buf+C.last_lit]=Xe&255,C.last_lit++,Ue===0?C.dyn_ltree[Xe*2]++:(C.matches++,Ue--,C.dyn_ltree[(xt[Xe]+U+1)*2]++,C.dyn_dtree[br(Ue)*2]++),C.last_lit===C.lit_bufsize-1}return rs._tr_init=Zi,rs._tr_stored_block=Gn,rs._tr_flush_block=Rn,rs._tr_tally=Un,rs._tr_align=Tr,rs}var Nh,Wv;function Vv(){if(Wv)return Nh;Wv=1;function t(n,i,a,f){for(var s=n&65535|0,l=n>>>16&65535|0,d=0;a!==0;){d=a>2e3?2e3:a,a-=d;do s=s+i[f++]|0,l=l+s|0;while(--d);s%=65521,l%=65521}return s|l<<16|0}return Nh=t,Nh}var Bh,$v;function Zv(){if($v)return Bh;$v=1;function t(){for(var a,f=[],s=0;s<256;s++){a=s;for(var l=0;l<8;l++)a=a&1?3988292384^a>>>1:a>>>1;f[s]=a}return f}var n=t();function i(a,f,s,l){var d=n,v=l+s;a^=-1;for(var I=l;I<v;I++)a=a>>>8^d[(a^f[I])&255];return a^-1}return Bh=i,Bh}var Gh,Xv;function Uh(){return Xv||(Xv=1,Gh={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"}),Gh}var qv;function rb(){if(qv)return $i;qv=1;var t=So(),n=tb(),i=Vv(),a=Zv(),f=Uh(),s=0,l=1,d=3,v=4,I=5,B=0,p=1,U=-2,q=-3,D=-5,pe=-1,ue=1,x=2,A=3,g=4,b=0,P=2,F=8,J=9,Te=15,nt=8,ut=29,it=256,st=it+1+ut,tt=30,Re=19,Ot=2*st+1,xt=15,Ie=3,Ze=258,St=Ze+Ie+1,$t=32,Wt=42,Qt=69,sr=73,br=91,lr=103,Kt=113,wr=666,Gt=1,Mt=2,dn=3,Qr=4,kt=3;function Nr(u,de){return u.msg=f[de],de}function Fr(u){return(u<<1)-(u>4?9:0)}function Xr(u){for(var de=u.length;--de>=0;)u[de]=0}function Jr(u){var de=u.state,ye=de.pending;ye>u.avail_out&&(ye=u.avail_out),ye!==0&&(t.arraySet(u.output,de.pending_buf,de.pending_out,ye,u.next_out),u.next_out+=ye,de.pending_out+=ye,u.total_out+=ye,u.avail_out-=ye,de.pending-=ye,de.pending===0&&(de.pending_out=0))}function ar(u,de){n._tr_flush_block(u,u.block_start>=0?u.block_start:-1,u.strstart-u.block_start,de),u.block_start=u.strstart,Jr(u.strm)}function Pt(u,de){u.pending_buf[u.pending++]=de}function Dn(u,de){u.pending_buf[u.pending++]=de>>>8&255,u.pending_buf[u.pending++]=de&255}function Ln(u,de,ye,w){var V=u.avail_in;return V>w&&(V=w),V===0?0:(u.avail_in-=V,t.arraySet(de,u.input,u.next_in,V,ye),u.state.wrap===1?u.adler=i(u.adler,de,V,ye):u.state.wrap===2&&(u.adler=a(u.adler,de,V,ye)),u.next_in+=V,u.total_in+=V,V)}function en(u,de){var ye=u.max_chain_length,w=u.strstart,V,ce,Et=u.prev_length,at=u.nice_match,mt=u.strstart>u.w_size-St?u.strstart-(u.w_size-St):0,ur=u.window,mi=u.w_mask,kr=u.prev,dr=u.strstart+Ze,Yr=ur[w+Et-1],_n=ur[w+Et];u.prev_length>=u.good_match&&(ye>>=2),at>u.lookahead&&(at=u.lookahead);do if(V=de,!(ur[V+Et]!==_n||ur[V+Et-1]!==Yr||ur[V]!==ur[w]||ur[++V]!==ur[w+1])){w+=2,V++;do;while(ur[++w]===ur[++V]&&ur[++w]===ur[++V]&&ur[++w]===ur[++V]&&ur[++w]===ur[++V]&&ur[++w]===ur[++V]&&ur[++w]===ur[++V]&&ur[++w]===ur[++V]&&ur[++w]===ur[++V]&&w<dr);if(ce=Ze-(dr-w),w=dr-Ze,ce>Et){if(u.match_start=de,Et=ce,ce>=at)break;Yr=ur[w+Et-1],_n=ur[w+Et]}}while((de=kr[de&mi])>mt&&--ye!==0);return Et<=u.lookahead?Et:u.lookahead}function on(u){var de=u.w_size,ye,w,V,ce,Et;do{if(ce=u.window_size-u.lookahead-u.strstart,u.strstart>=de+(de-St)){t.arraySet(u.window,u.window,de,de,0),u.match_start-=de,u.strstart-=de,u.block_start-=de,w=u.hash_size,ye=w;do V=u.head[--ye],u.head[ye]=V>=de?V-de:0;while(--w);w=de,ye=w;do V=u.prev[--ye],u.prev[ye]=V>=de?V-de:0;while(--w);ce+=de}if(u.strm.avail_in===0)break;if(w=Ln(u.strm,u.window,u.strstart+u.lookahead,ce),u.lookahead+=w,u.lookahead+u.insert>=Ie)for(Et=u.strstart-u.insert,u.ins_h=u.window[Et],u.ins_h=(u.ins_h<<u.hash_shift^u.window[Et+1])&u.hash_mask;u.insert&&(u.ins_h=(u.ins_h<<u.hash_shift^u.window[Et+Ie-1])&u.hash_mask,u.prev[Et&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=Et,Et++,u.insert--,!(u.lookahead+u.insert<Ie)););}while(u.lookahead<St&&u.strm.avail_in!==0)}function E(u,de){var ye=65535;for(ye>u.pending_buf_size-5&&(ye=u.pending_buf_size-5);;){if(u.lookahead<=1){if(on(u),u.lookahead===0&&de===s)return Gt;if(u.lookahead===0)break}u.strstart+=u.lookahead,u.lookahead=0;var w=u.block_start+ye;if((u.strstart===0||u.strstart>=w)&&(u.lookahead=u.strstart-w,u.strstart=w,ar(u,!1),u.strm.avail_out===0)||u.strstart-u.block_start>=u.w_size-St&&(ar(u,!1),u.strm.avail_out===0))return Gt}return u.insert=0,de===v?(ar(u,!0),u.strm.avail_out===0?dn:Qr):(u.strstart>u.block_start&&(ar(u,!1),u.strm.avail_out===0),Gt)}function pi(u,de){for(var ye,w;;){if(u.lookahead<St){if(on(u),u.lookahead<St&&de===s)return Gt;if(u.lookahead===0)break}if(ye=0,u.lookahead>=Ie&&(u.ins_h=(u.ins_h<<u.hash_shift^u.window[u.strstart+Ie-1])&u.hash_mask,ye=u.prev[u.strstart&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=u.strstart),ye!==0&&u.strstart-ye<=u.w_size-St&&(u.match_length=en(u,ye)),u.match_length>=Ie)if(w=n._tr_tally(u,u.strstart-u.match_start,u.match_length-Ie),u.lookahead-=u.match_length,u.match_length<=u.max_lazy_match&&u.lookahead>=Ie){u.match_length--;do u.strstart++,u.ins_h=(u.ins_h<<u.hash_shift^u.window[u.strstart+Ie-1])&u.hash_mask,ye=u.prev[u.strstart&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=u.strstart;while(--u.match_length!==0);u.strstart++}else u.strstart+=u.match_length,u.match_length=0,u.ins_h=u.window[u.strstart],u.ins_h=(u.ins_h<<u.hash_shift^u.window[u.strstart+1])&u.hash_mask;else w=n._tr_tally(u,0,u.window[u.strstart]),u.lookahead--,u.strstart++;if(w&&(ar(u,!1),u.strm.avail_out===0))return Gt}return u.insert=u.strstart<Ie-1?u.strstart:Ie-1,de===v?(ar(u,!0),u.strm.avail_out===0?dn:Qr):u.last_lit&&(ar(u,!1),u.strm.avail_out===0)?Gt:Mt}function vn(u,de){for(var ye,w,V;;){if(u.lookahead<St){if(on(u),u.lookahead<St&&de===s)return Gt;if(u.lookahead===0)break}if(ye=0,u.lookahead>=Ie&&(u.ins_h=(u.ins_h<<u.hash_shift^u.window[u.strstart+Ie-1])&u.hash_mask,ye=u.prev[u.strstart&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=u.strstart),u.prev_length=u.match_length,u.prev_match=u.match_start,u.match_length=Ie-1,ye!==0&&u.prev_length<u.max_lazy_match&&u.strstart-ye<=u.w_size-St&&(u.match_length=en(u,ye),u.match_length<=5&&(u.strategy===ue||u.match_length===Ie&&u.strstart-u.match_start>4096)&&(u.match_length=Ie-1)),u.prev_length>=Ie&&u.match_length<=u.prev_length){V=u.strstart+u.lookahead-Ie,w=n._tr_tally(u,u.strstart-1-u.prev_match,u.prev_length-Ie),u.lookahead-=u.prev_length-1,u.prev_length-=2;do++u.strstart<=V&&(u.ins_h=(u.ins_h<<u.hash_shift^u.window[u.strstart+Ie-1])&u.hash_mask,ye=u.prev[u.strstart&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=u.strstart);while(--u.prev_length!==0);if(u.match_available=0,u.match_length=Ie-1,u.strstart++,w&&(ar(u,!1),u.strm.avail_out===0))return Gt}else if(u.match_available){if(w=n._tr_tally(u,0,u.window[u.strstart-1]),w&&ar(u,!1),u.strstart++,u.lookahead--,u.strm.avail_out===0)return Gt}else u.match_available=1,u.strstart++,u.lookahead--}return u.match_available&&(w=n._tr_tally(u,0,u.window[u.strstart-1]),u.match_available=0),u.insert=u.strstart<Ie-1?u.strstart:Ie-1,de===v?(ar(u,!0),u.strm.avail_out===0?dn:Qr):u.last_lit&&(ar(u,!1),u.strm.avail_out===0)?Gt:Mt}function Zi(u,de){for(var ye,w,V,ce,Et=u.window;;){if(u.lookahead<=Ze){if(on(u),u.lookahead<=Ze&&de===s)return Gt;if(u.lookahead===0)break}if(u.match_length=0,u.lookahead>=Ie&&u.strstart>0&&(V=u.strstart-1,w=Et[V],w===Et[++V]&&w===Et[++V]&&w===Et[++V])){ce=u.strstart+Ze;do;while(w===Et[++V]&&w===Et[++V]&&w===Et[++V]&&w===Et[++V]&&w===Et[++V]&&w===Et[++V]&&w===Et[++V]&&w===Et[++V]&&V<ce);u.match_length=Ze-(ce-V),u.match_length>u.lookahead&&(u.match_length=u.lookahead)}if(u.match_length>=Ie?(ye=n._tr_tally(u,1,u.match_length-Ie),u.lookahead-=u.match_length,u.strstart+=u.match_length,u.match_length=0):(ye=n._tr_tally(u,0,u.window[u.strstart]),u.lookahead--,u.strstart++),ye&&(ar(u,!1),u.strm.avail_out===0))return Gt}return u.insert=0,de===v?(ar(u,!0),u.strm.avail_out===0?dn:Qr):u.last_lit&&(ar(u,!1),u.strm.avail_out===0)?Gt:Mt}function Gn(u,de){for(var ye;;){if(u.lookahead===0&&(on(u),u.lookahead===0)){if(de===s)return Gt;break}if(u.match_length=0,ye=n._tr_tally(u,0,u.window[u.strstart]),u.lookahead--,u.strstart++,ye&&(ar(u,!1),u.strm.avail_out===0))return Gt}return u.insert=0,de===v?(ar(u,!0),u.strm.avail_out===0?dn:Qr):u.last_lit&&(ar(u,!1),u.strm.avail_out===0)?Gt:Mt}function Tr(u,de,ye,w,V){this.good_length=u,this.max_lazy=de,this.nice_length=ye,this.max_chain=w,this.func=V}var Rn;Rn=[new Tr(0,0,0,0,E),new Tr(4,4,8,4,pi),new Tr(4,5,16,8,pi),new Tr(4,6,32,32,pi),new Tr(4,4,16,16,vn),new Tr(8,16,32,32,vn),new Tr(8,16,128,128,vn),new Tr(8,32,128,256,vn),new Tr(32,128,258,1024,vn),new Tr(32,258,258,4096,vn)];function Un(u){u.window_size=2*u.w_size,Xr(u.head),u.max_lazy_match=Rn[u.level].max_lazy,u.good_match=Rn[u.level].good_length,u.nice_match=Rn[u.level].nice_length,u.max_chain_length=Rn[u.level].max_chain,u.strstart=0,u.block_start=0,u.lookahead=0,u.insert=0,u.match_length=u.prev_length=Ie-1,u.match_available=0,u.ins_h=0}function C(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=F,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new t.Buf16(Ot*2),this.dyn_dtree=new t.Buf16((2*tt+1)*2),this.bl_tree=new t.Buf16((2*Re+1)*2),Xr(this.dyn_ltree),Xr(this.dyn_dtree),Xr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new t.Buf16(xt+1),this.heap=new t.Buf16(2*st+1),Xr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new t.Buf16(2*st+1),Xr(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Ue(u){var de;return!u||!u.state?Nr(u,U):(u.total_in=u.total_out=0,u.data_type=P,de=u.state,de.pending=0,de.pending_out=0,de.wrap<0&&(de.wrap=-de.wrap),de.status=de.wrap?Wt:Kt,u.adler=de.wrap===2?0:1,de.last_flush=s,n._tr_init(de),B)}function Xe(u){var de=Ue(u);return de===B&&Un(u.state),de}function dt(u,de){return!u||!u.state||u.state.wrap!==2?U:(u.state.gzhead=de,B)}function Z(u,de,ye,w,V,ce){if(!u)return U;var Et=1;if(de===pe&&(de=6),w<0?(Et=0,w=-w):w>15&&(Et=2,w-=16),V<1||V>J||ye!==F||w<8||w>15||de<0||de>9||ce<0||ce>g)return Nr(u,U);w===8&&(w=9);var at=new C;return u.state=at,at.strm=u,at.wrap=Et,at.gzhead=null,at.w_bits=w,at.w_size=1<<at.w_bits,at.w_mask=at.w_size-1,at.hash_bits=V+7,at.hash_size=1<<at.hash_bits,at.hash_mask=at.hash_size-1,at.hash_shift=~~((at.hash_bits+Ie-1)/Ie),at.window=new t.Buf8(at.w_size*2),at.head=new t.Buf16(at.hash_size),at.prev=new t.Buf16(at.w_size),at.lit_bufsize=1<<V+6,at.pending_buf_size=at.lit_bufsize*4,at.pending_buf=new t.Buf8(at.pending_buf_size),at.d_buf=1*at.lit_bufsize,at.l_buf=(1+2)*at.lit_bufsize,at.level=de,at.strategy=ce,at.method=ye,Xe(u)}function we(u,de){return Z(u,de,F,Te,nt,b)}function m(u,de){var ye,w,V,ce;if(!u||!u.state||de>I||de<0)return u?Nr(u,U):U;if(w=u.state,!u.output||!u.input&&u.avail_in!==0||w.status===wr&&de!==v)return Nr(u,u.avail_out===0?D:U);if(w.strm=u,ye=w.last_flush,w.last_flush=de,w.status===Wt)if(w.wrap===2)u.adler=0,Pt(w,31),Pt(w,139),Pt(w,8),w.gzhead?(Pt(w,(w.gzhead.text?1:0)+(w.gzhead.hcrc?2:0)+(w.gzhead.extra?4:0)+(w.gzhead.name?8:0)+(w.gzhead.comment?16:0)),Pt(w,w.gzhead.time&255),Pt(w,w.gzhead.time>>8&255),Pt(w,w.gzhead.time>>16&255),Pt(w,w.gzhead.time>>24&255),Pt(w,w.level===9?2:w.strategy>=x||w.level<2?4:0),Pt(w,w.gzhead.os&255),w.gzhead.extra&&w.gzhead.extra.length&&(Pt(w,w.gzhead.extra.length&255),Pt(w,w.gzhead.extra.length>>8&255)),w.gzhead.hcrc&&(u.adler=a(u.adler,w.pending_buf,w.pending,0)),w.gzindex=0,w.status=Qt):(Pt(w,0),Pt(w,0),Pt(w,0),Pt(w,0),Pt(w,0),Pt(w,w.level===9?2:w.strategy>=x||w.level<2?4:0),Pt(w,kt),w.status=Kt);else{var Et=F+(w.w_bits-8<<4)<<8,at=-1;w.strategy>=x||w.level<2?at=0:w.level<6?at=1:w.level===6?at=2:at=3,Et|=at<<6,w.strstart!==0&&(Et|=$t),Et+=31-Et%31,w.status=Kt,Dn(w,Et),w.strstart!==0&&(Dn(w,u.adler>>>16),Dn(w,u.adler&65535)),u.adler=1}if(w.status===Qt)if(w.gzhead.extra){for(V=w.pending;w.gzindex<(w.gzhead.extra.length&65535)&&!(w.pending===w.pending_buf_size&&(w.gzhead.hcrc&&w.pending>V&&(u.adler=a(u.adler,w.pending_buf,w.pending-V,V)),Jr(u),V=w.pending,w.pending===w.pending_buf_size));)Pt(w,w.gzhead.extra[w.gzindex]&255),w.gzindex++;w.gzhead.hcrc&&w.pending>V&&(u.adler=a(u.adler,w.pending_buf,w.pending-V,V)),w.gzindex===w.gzhead.extra.length&&(w.gzindex=0,w.status=sr)}else w.status=sr;if(w.status===sr)if(w.gzhead.name){V=w.pending;do{if(w.pending===w.pending_buf_size&&(w.gzhead.hcrc&&w.pending>V&&(u.adler=a(u.adler,w.pending_buf,w.pending-V,V)),Jr(u),V=w.pending,w.pending===w.pending_buf_size)){ce=1;break}w.gzindex<w.gzhead.name.length?ce=w.gzhead.name.charCodeAt(w.gzindex++)&255:ce=0,Pt(w,ce)}while(ce!==0);w.gzhead.hcrc&&w.pending>V&&(u.adler=a(u.adler,w.pending_buf,w.pending-V,V)),ce===0&&(w.gzindex=0,w.status=br)}else w.status=br;if(w.status===br)if(w.gzhead.comment){V=w.pending;do{if(w.pending===w.pending_buf_size&&(w.gzhead.hcrc&&w.pending>V&&(u.adler=a(u.adler,w.pending_buf,w.pending-V,V)),Jr(u),V=w.pending,w.pending===w.pending_buf_size)){ce=1;break}w.gzindex<w.gzhead.comment.length?ce=w.gzhead.comment.charCodeAt(w.gzindex++)&255:ce=0,Pt(w,ce)}while(ce!==0);w.gzhead.hcrc&&w.pending>V&&(u.adler=a(u.adler,w.pending_buf,w.pending-V,V)),ce===0&&(w.status=lr)}else w.status=lr;if(w.status===lr&&(w.gzhead.hcrc?(w.pending+2>w.pending_buf_size&&Jr(u),w.pending+2<=w.pending_buf_size&&(Pt(w,u.adler&255),Pt(w,u.adler>>8&255),u.adler=0,w.status=Kt)):w.status=Kt),w.pending!==0){if(Jr(u),u.avail_out===0)return w.last_flush=-1,B}else if(u.avail_in===0&&Fr(de)<=Fr(ye)&&de!==v)return Nr(u,D);if(w.status===wr&&u.avail_in!==0)return Nr(u,D);if(u.avail_in!==0||w.lookahead!==0||de!==s&&w.status!==wr){var mt=w.strategy===x?Gn(w,de):w.strategy===A?Zi(w,de):Rn[w.level].func(w,de);if((mt===dn||mt===Qr)&&(w.status=wr),mt===Gt||mt===dn)return u.avail_out===0&&(w.last_flush=-1),B;if(mt===Mt&&(de===l?n._tr_align(w):de!==I&&(n._tr_stored_block(w,0,0,!1),de===d&&(Xr(w.head),w.lookahead===0&&(w.strstart=0,w.block_start=0,w.insert=0))),Jr(u),u.avail_out===0))return w.last_flush=-1,B}return de!==v?B:w.wrap<=0?p:(w.wrap===2?(Pt(w,u.adler&255),Pt(w,u.adler>>8&255),Pt(w,u.adler>>16&255),Pt(w,u.adler>>24&255),Pt(w,u.total_in&255),Pt(w,u.total_in>>8&255),Pt(w,u.total_in>>16&255),Pt(w,u.total_in>>24&255)):(Dn(w,u.adler>>>16),Dn(w,u.adler&65535)),Jr(u),w.wrap>0&&(w.wrap=-w.wrap),w.pending!==0?B:p)}function He(u){var de;return!u||!u.state?U:(de=u.state.status,de!==Wt&&de!==Qt&&de!==sr&&de!==br&&de!==lr&&de!==Kt&&de!==wr?Nr(u,U):(u.state=null,de===Kt?Nr(u,q):B))}function Nt(u,de){var ye=de.length,w,V,ce,Et,at,mt,ur,mi;if(!u||!u.state||(w=u.state,Et=w.wrap,Et===2||Et===1&&w.status!==Wt||w.lookahead))return U;for(Et===1&&(u.adler=i(u.adler,de,ye,0)),w.wrap=0,ye>=w.w_size&&(Et===0&&(Xr(w.head),w.strstart=0,w.block_start=0,w.insert=0),mi=new t.Buf8(w.w_size),t.arraySet(mi,de,ye-w.w_size,w.w_size,0),de=mi,ye=w.w_size),at=u.avail_in,mt=u.next_in,ur=u.input,u.avail_in=ye,u.next_in=0,u.input=de,on(w);w.lookahead>=Ie;){V=w.strstart,ce=w.lookahead-(Ie-1);do w.ins_h=(w.ins_h<<w.hash_shift^w.window[V+Ie-1])&w.hash_mask,w.prev[V&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=V,V++;while(--ce);w.strstart=V,w.lookahead=Ie-1,on(w)}return w.strstart+=w.lookahead,w.block_start=w.strstart,w.insert=w.lookahead,w.lookahead=0,w.match_length=w.prev_length=Ie-1,w.match_available=0,u.next_in=mt,u.input=ur,u.avail_in=at,w.wrap=Et,B}return $i.deflateInit=we,$i.deflateInit2=Z,$i.deflateReset=Xe,$i.deflateResetKeep=Ue,$i.deflateSetHeader=dt,$i.deflate=m,$i.deflateEnd=He,$i.deflateSetDictionary=Nt,$i.deflateInfo="pako deflate (from Nodeca project)",$i}var ns={},Kv;function jv(){if(Kv)return ns;Kv=1;var t=So(),n=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch{n=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{i=!1}for(var a=new t.Buf8(256),f=0;f<256;f++)a[f]=f>=252?6:f>=248?5:f>=240?4:f>=224?3:f>=192?2:1;a[254]=a[254]=1,ns.string2buf=function(l){var d,v,I,B,p,U=l.length,q=0;for(B=0;B<U;B++)v=l.charCodeAt(B),(v&64512)===55296&&B+1<U&&(I=l.charCodeAt(B+1),(I&64512)===56320&&(v=65536+(v-55296<<10)+(I-56320),B++)),q+=v<128?1:v<2048?2:v<65536?3:4;for(d=new t.Buf8(q),p=0,B=0;p<q;B++)v=l.charCodeAt(B),(v&64512)===55296&&B+1<U&&(I=l.charCodeAt(B+1),(I&64512)===56320&&(v=65536+(v-55296<<10)+(I-56320),B++)),v<128?d[p++]=v:v<2048?(d[p++]=192|v>>>6,d[p++]=128|v&63):v<65536?(d[p++]=224|v>>>12,d[p++]=128|v>>>6&63,d[p++]=128|v&63):(d[p++]=240|v>>>18,d[p++]=128|v>>>12&63,d[p++]=128|v>>>6&63,d[p++]=128|v&63);return d};function s(l,d){if(d<65534&&(l.subarray&&i||!l.subarray&&n))return String.fromCharCode.apply(null,t.shrinkBuf(l,d));for(var v="",I=0;I<d;I++)v+=String.fromCharCode(l[I]);return v}return ns.buf2binstring=function(l){return s(l,l.length)},ns.binstring2buf=function(l){for(var d=new t.Buf8(l.length),v=0,I=d.length;v<I;v++)d[v]=l.charCodeAt(v);return d},ns.buf2string=function(l,d){var v,I,B,p,U=d||l.length,q=new Array(U*2);for(I=0,v=0;v<U;){if(B=l[v++],B<128){q[I++]=B;continue}if(p=a[B],p>4){q[I++]=65533,v+=p-1;continue}for(B&=p===2?31:p===3?15:7;p>1&&v<U;)B=B<<6|l[v++]&63,p--;if(p>1){q[I++]=65533;continue}B<65536?q[I++]=B:(B-=65536,q[I++]=55296|B>>10&1023,q[I++]=56320|B&1023)}return s(q,I)},ns.utf8border=function(l,d){var v;for(d=d||l.length,d>l.length&&(d=l.length),v=d-1;v>=0&&(l[v]&192)===128;)v--;return v<0||v===0?d:v+a[l[v]]>d?v:d},ns}var Yh,Qv;function Jv(){if(Qv)return Yh;Qv=1;function t(){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}return Yh=t,Yh}var e_;function nb(){if(e_)return qs;e_=1;var t=rb(),n=So(),i=jv(),a=Uh(),f=Jv(),s=Object.prototype.toString,l=0,d=4,v=0,I=1,B=2,p=-1,U=0,q=8;function D(A){if(!(this instanceof D))return new D(A);this.options=n.assign({level:p,method:q,chunkSize:16384,windowBits:15,memLevel:8,strategy:U,to:""},A||{});var g=this.options;g.raw&&g.windowBits>0?g.windowBits=-g.windowBits:g.gzip&&g.windowBits>0&&g.windowBits<16&&(g.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var b=t.deflateInit2(this.strm,g.level,g.method,g.windowBits,g.memLevel,g.strategy);if(b!==v)throw new Error(a[b]);if(g.header&&t.deflateSetHeader(this.strm,g.header),g.dictionary){var P;if(typeof g.dictionary=="string"?P=i.string2buf(g.dictionary):s.call(g.dictionary)==="[object ArrayBuffer]"?P=new Uint8Array(g.dictionary):P=g.dictionary,b=t.deflateSetDictionary(this.strm,P),b!==v)throw new Error(a[b]);this._dict_set=!0}}D.prototype.push=function(A,g){var b=this.strm,P=this.options.chunkSize,F,J;if(this.ended)return!1;J=g===~~g?g:g===!0?d:l,typeof A=="string"?b.input=i.string2buf(A):s.call(A)==="[object ArrayBuffer]"?b.input=new Uint8Array(A):b.input=A,b.next_in=0,b.avail_in=b.input.length;do{if(b.avail_out===0&&(b.output=new n.Buf8(P),b.next_out=0,b.avail_out=P),F=t.deflate(b,J),F!==I&&F!==v)return this.onEnd(F),this.ended=!0,!1;(b.avail_out===0||b.avail_in===0&&(J===d||J===B))&&(this.options.to==="string"?this.onData(i.buf2binstring(n.shrinkBuf(b.output,b.next_out))):this.onData(n.shrinkBuf(b.output,b.next_out)))}while((b.avail_in>0||b.avail_out===0)&&F!==I);return J===d?(F=t.deflateEnd(this.strm),this.onEnd(F),this.ended=!0,F===v):(J===B&&(this.onEnd(v),b.avail_out=0),!0)},D.prototype.onData=function(A){this.chunks.push(A)},D.prototype.onEnd=function(A){A===v&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=A,this.msg=this.strm.msg};function pe(A,g){var b=new D(g);if(b.push(A,!0),b.err)throw b.msg||a[b.err];return b.result}function ue(A,g){return g=g||{},g.raw=!0,pe(A,g)}function x(A,g){return g=g||{},g.gzip=!0,pe(A,g)}return qs.Deflate=D,qs.deflate=pe,qs.deflateRaw=ue,qs.gzip=x,qs}var Ks={},Mi={},Hh,t_;function ib(){if(t_)return Hh;t_=1;var t=30,n=12;return Hh=function(a,f){var s,l,d,v,I,B,p,U,q,D,pe,ue,x,A,g,b,P,F,J,Te,nt,ut,it,st,tt;s=a.state,l=a.next_in,st=a.input,d=l+(a.avail_in-5),v=a.next_out,tt=a.output,I=v-(f-a.avail_out),B=v+(a.avail_out-257),p=s.dmax,U=s.wsize,q=s.whave,D=s.wnext,pe=s.window,ue=s.hold,x=s.bits,A=s.lencode,g=s.distcode,b=(1<<s.lenbits)-1,P=(1<<s.distbits)-1;e:do{x<15&&(ue+=st[l++]<<x,x+=8,ue+=st[l++]<<x,x+=8),F=A[ue&b];t:for(;;){if(J=F>>>24,ue>>>=J,x-=J,J=F>>>16&255,J===0)tt[v++]=F&65535;else if(J&16){Te=F&65535,J&=15,J&&(x<J&&(ue+=st[l++]<<x,x+=8),Te+=ue&(1<<J)-1,ue>>>=J,x-=J),x<15&&(ue+=st[l++]<<x,x+=8,ue+=st[l++]<<x,x+=8),F=g[ue&P];r:for(;;){if(J=F>>>24,ue>>>=J,x-=J,J=F>>>16&255,J&16){if(nt=F&65535,J&=15,x<J&&(ue+=st[l++]<<x,x+=8,x<J&&(ue+=st[l++]<<x,x+=8)),nt+=ue&(1<<J)-1,nt>p){a.msg="invalid distance too far back",s.mode=t;break e}if(ue>>>=J,x-=J,J=v-I,nt>J){if(J=nt-J,J>q&&s.sane){a.msg="invalid distance too far back",s.mode=t;break e}if(ut=0,it=pe,D===0){if(ut+=U-J,J<Te){Te-=J;do tt[v++]=pe[ut++];while(--J);ut=v-nt,it=tt}}else if(D<J){if(ut+=U+D-J,J-=D,J<Te){Te-=J;do tt[v++]=pe[ut++];while(--J);if(ut=0,D<Te){J=D,Te-=J;do tt[v++]=pe[ut++];while(--J);ut=v-nt,it=tt}}}else if(ut+=D-J,J<Te){Te-=J;do tt[v++]=pe[ut++];while(--J);ut=v-nt,it=tt}for(;Te>2;)tt[v++]=it[ut++],tt[v++]=it[ut++],tt[v++]=it[ut++],Te-=3;Te&&(tt[v++]=it[ut++],Te>1&&(tt[v++]=it[ut++]))}else{ut=v-nt;do tt[v++]=tt[ut++],tt[v++]=tt[ut++],tt[v++]=tt[ut++],Te-=3;while(Te>2);Te&&(tt[v++]=tt[ut++],Te>1&&(tt[v++]=tt[ut++]))}}else if((J&64)===0){F=g[(F&65535)+(ue&(1<<J)-1)];continue r}else{a.msg="invalid distance code",s.mode=t;break e}break}}else if((J&64)===0){F=A[(F&65535)+(ue&(1<<J)-1)];continue t}else if(J&32){s.mode=n;break e}else{a.msg="invalid literal/length code",s.mode=t;break e}break}}while(l<d&&v<B);Te=x>>3,l-=Te,x-=Te<<3,ue&=(1<<x)-1,a.next_in=l,a.next_out=v,a.avail_in=l<d?5+(d-l):5-(l-d),a.avail_out=v<B?257+(B-v):257-(v-B),s.hold=ue,s.bits=x},Hh}var zh,r_;function ab(){if(r_)return zh;r_=1;var t=So(),n=15,i=852,a=592,f=0,s=1,l=2,d=[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],v=[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],I=[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],B=[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];return zh=function(U,q,D,pe,ue,x,A,g){var b=g.bits,P=0,F=0,J=0,Te=0,nt=0,ut=0,it=0,st=0,tt=0,Re=0,Ot,xt,Ie,Ze,St,$t=null,Wt=0,Qt,sr=new t.Buf16(n+1),br=new t.Buf16(n+1),lr=null,Kt=0,wr,Gt,Mt;for(P=0;P<=n;P++)sr[P]=0;for(F=0;F<pe;F++)sr[q[D+F]]++;for(nt=b,Te=n;Te>=1&&sr[Te]===0;Te--);if(nt>Te&&(nt=Te),Te===0)return ue[x++]=1<<24|64<<16|0,ue[x++]=1<<24|64<<16|0,g.bits=1,0;for(J=1;J<Te&&sr[J]===0;J++);for(nt<J&&(nt=J),st=1,P=1;P<=n;P++)if(st<<=1,st-=sr[P],st<0)return-1;if(st>0&&(U===f||Te!==1))return-1;for(br[1]=0,P=1;P<n;P++)br[P+1]=br[P]+sr[P];for(F=0;F<pe;F++)q[D+F]!==0&&(A[br[q[D+F]]++]=F);if(U===f?($t=lr=A,Qt=19):U===s?($t=d,Wt-=257,lr=v,Kt-=257,Qt=256):($t=I,lr=B,Qt=-1),Re=0,F=0,P=J,St=x,ut=nt,it=0,Ie=-1,tt=1<<nt,Ze=tt-1,U===s&&tt>i||U===l&&tt>a)return 1;for(;;){wr=P-it,A[F]<Qt?(Gt=0,Mt=A[F]):A[F]>Qt?(Gt=lr[Kt+A[F]],Mt=$t[Wt+A[F]]):(Gt=32+64,Mt=0),Ot=1<<P-it,xt=1<<ut,J=xt;do xt-=Ot,ue[St+(Re>>it)+xt]=wr<<24|Gt<<16|Mt|0;while(xt!==0);for(Ot=1<<P-1;Re&Ot;)Ot>>=1;if(Ot!==0?(Re&=Ot-1,Re+=Ot):Re=0,F++,--sr[P]===0){if(P===Te)break;P=q[D+A[F]]}if(P>nt&&(Re&Ze)!==Ie){for(it===0&&(it=nt),St+=J,ut=P-it,st=1<<ut;ut+it<Te&&(st-=sr[ut+it],!(st<=0));)ut++,st<<=1;if(tt+=1<<ut,U===s&&tt>i||U===l&&tt>a)return 1;Ie=Re&Ze,ue[Ie]=nt<<24|ut<<16|St-x|0}}return Re!==0&&(ue[St+Re]=P-it<<24|64<<16|0),g.bits=nt,0},zh}var n_;function ob(){if(n_)return Mi;n_=1;var t=So(),n=Vv(),i=Zv(),a=ib(),f=ab(),s=0,l=1,d=2,v=4,I=5,B=6,p=0,U=1,q=2,D=-2,pe=-3,ue=-4,x=-5,A=8,g=1,b=2,P=3,F=4,J=5,Te=6,nt=7,ut=8,it=9,st=10,tt=11,Re=12,Ot=13,xt=14,Ie=15,Ze=16,St=17,$t=18,Wt=19,Qt=20,sr=21,br=22,lr=23,Kt=24,wr=25,Gt=26,Mt=27,dn=28,Qr=29,kt=30,Nr=31,Fr=32,Xr=852,Jr=592,ar=15,Pt=ar;function Dn(Z){return(Z>>>24&255)+(Z>>>8&65280)+((Z&65280)<<8)+((Z&255)<<24)}function Ln(){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 t.Buf16(320),this.work=new t.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function en(Z){var we;return!Z||!Z.state?D:(we=Z.state,Z.total_in=Z.total_out=we.total=0,Z.msg="",we.wrap&&(Z.adler=we.wrap&1),we.mode=g,we.last=0,we.havedict=0,we.dmax=32768,we.head=null,we.hold=0,we.bits=0,we.lencode=we.lendyn=new t.Buf32(Xr),we.distcode=we.distdyn=new t.Buf32(Jr),we.sane=1,we.back=-1,p)}function on(Z){var we;return!Z||!Z.state?D:(we=Z.state,we.wsize=0,we.whave=0,we.wnext=0,en(Z))}function E(Z,we){var m,He;return!Z||!Z.state||(He=Z.state,we<0?(m=0,we=-we):(m=(we>>4)+1,we<48&&(we&=15)),we&&(we<8||we>15))?D:(He.window!==null&&He.wbits!==we&&(He.window=null),He.wrap=m,He.wbits=we,on(Z))}function pi(Z,we){var m,He;return Z?(He=new Ln,Z.state=He,He.window=null,m=E(Z,we),m!==p&&(Z.state=null),m):D}function vn(Z){return pi(Z,Pt)}var Zi=!0,Gn,Tr;function Rn(Z){if(Zi){var we;for(Gn=new t.Buf32(512),Tr=new t.Buf32(32),we=0;we<144;)Z.lens[we++]=8;for(;we<256;)Z.lens[we++]=9;for(;we<280;)Z.lens[we++]=7;for(;we<288;)Z.lens[we++]=8;for(f(l,Z.lens,0,288,Gn,0,Z.work,{bits:9}),we=0;we<32;)Z.lens[we++]=5;f(d,Z.lens,0,32,Tr,0,Z.work,{bits:5}),Zi=!1}Z.lencode=Gn,Z.lenbits=9,Z.distcode=Tr,Z.distbits=5}function Un(Z,we,m,He){var Nt,u=Z.state;return u.window===null&&(u.wsize=1<<u.wbits,u.wnext=0,u.whave=0,u.window=new t.Buf8(u.wsize)),He>=u.wsize?(t.arraySet(u.window,we,m-u.wsize,u.wsize,0),u.wnext=0,u.whave=u.wsize):(Nt=u.wsize-u.wnext,Nt>He&&(Nt=He),t.arraySet(u.window,we,m-He,Nt,u.wnext),He-=Nt,He?(t.arraySet(u.window,we,m-He,He,0),u.wnext=He,u.whave=u.wsize):(u.wnext+=Nt,u.wnext===u.wsize&&(u.wnext=0),u.whave<u.wsize&&(u.whave+=Nt))),0}function C(Z,we){var m,He,Nt,u,de,ye,w,V,ce,Et,at,mt,ur,mi,kr=0,dr,Yr,_n,Cn,Na,Ba,jt,$n,sn=new t.Buf8(4),gi,Kn,js=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!Z||!Z.state||!Z.output||!Z.input&&Z.avail_in!==0)return D;m=Z.state,m.mode===Re&&(m.mode=Ot),de=Z.next_out,Nt=Z.output,w=Z.avail_out,u=Z.next_in,He=Z.input,ye=Z.avail_in,V=m.hold,ce=m.bits,Et=ye,at=w,$n=p;e:for(;;)switch(m.mode){case g:if(m.wrap===0){m.mode=Ot;break}for(;ce<16;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(m.wrap&2&&V===35615){m.check=0,sn[0]=V&255,sn[1]=V>>>8&255,m.check=i(m.check,sn,2,0),V=0,ce=0,m.mode=b;break}if(m.flags=0,m.head&&(m.head.done=!1),!(m.wrap&1)||(((V&255)<<8)+(V>>8))%31){Z.msg="incorrect header check",m.mode=kt;break}if((V&15)!==A){Z.msg="unknown compression method",m.mode=kt;break}if(V>>>=4,ce-=4,jt=(V&15)+8,m.wbits===0)m.wbits=jt;else if(jt>m.wbits){Z.msg="invalid window size",m.mode=kt;break}m.dmax=1<<jt,Z.adler=m.check=1,m.mode=V&512?st:Re,V=0,ce=0;break;case b:for(;ce<16;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(m.flags=V,(m.flags&255)!==A){Z.msg="unknown compression method",m.mode=kt;break}if(m.flags&57344){Z.msg="unknown header flags set",m.mode=kt;break}m.head&&(m.head.text=V>>8&1),m.flags&512&&(sn[0]=V&255,sn[1]=V>>>8&255,m.check=i(m.check,sn,2,0)),V=0,ce=0,m.mode=P;case P:for(;ce<32;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}m.head&&(m.head.time=V),m.flags&512&&(sn[0]=V&255,sn[1]=V>>>8&255,sn[2]=V>>>16&255,sn[3]=V>>>24&255,m.check=i(m.check,sn,4,0)),V=0,ce=0,m.mode=F;case F:for(;ce<16;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}m.head&&(m.head.xflags=V&255,m.head.os=V>>8),m.flags&512&&(sn[0]=V&255,sn[1]=V>>>8&255,m.check=i(m.check,sn,2,0)),V=0,ce=0,m.mode=J;case J:if(m.flags&1024){for(;ce<16;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}m.length=V,m.head&&(m.head.extra_len=V),m.flags&512&&(sn[0]=V&255,sn[1]=V>>>8&255,m.check=i(m.check,sn,2,0)),V=0,ce=0}else m.head&&(m.head.extra=null);m.mode=Te;case Te:if(m.flags&1024&&(mt=m.length,mt>ye&&(mt=ye),mt&&(m.head&&(jt=m.head.extra_len-m.length,m.head.extra||(m.head.extra=new Array(m.head.extra_len)),t.arraySet(m.head.extra,He,u,mt,jt)),m.flags&512&&(m.check=i(m.check,He,mt,u)),ye-=mt,u+=mt,m.length-=mt),m.length))break e;m.length=0,m.mode=nt;case nt:if(m.flags&2048){if(ye===0)break e;mt=0;do jt=He[u+mt++],m.head&&jt&&m.length<65536&&(m.head.name+=String.fromCharCode(jt));while(jt&&mt<ye);if(m.flags&512&&(m.check=i(m.check,He,mt,u)),ye-=mt,u+=mt,jt)break e}else m.head&&(m.head.name=null);m.length=0,m.mode=ut;case ut:if(m.flags&4096){if(ye===0)break e;mt=0;do jt=He[u+mt++],m.head&&jt&&m.length<65536&&(m.head.comment+=String.fromCharCode(jt));while(jt&&mt<ye);if(m.flags&512&&(m.check=i(m.check,He,mt,u)),ye-=mt,u+=mt,jt)break e}else m.head&&(m.head.comment=null);m.mode=it;case it:if(m.flags&512){for(;ce<16;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(V!==(m.check&65535)){Z.msg="header crc mismatch",m.mode=kt;break}V=0,ce=0}m.head&&(m.head.hcrc=m.flags>>9&1,m.head.done=!0),Z.adler=m.check=0,m.mode=Re;break;case st:for(;ce<32;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}Z.adler=m.check=Dn(V),V=0,ce=0,m.mode=tt;case tt:if(m.havedict===0)return Z.next_out=de,Z.avail_out=w,Z.next_in=u,Z.avail_in=ye,m.hold=V,m.bits=ce,q;Z.adler=m.check=1,m.mode=Re;case Re:if(we===I||we===B)break e;case Ot:if(m.last){V>>>=ce&7,ce-=ce&7,m.mode=Mt;break}for(;ce<3;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}switch(m.last=V&1,V>>>=1,ce-=1,V&3){case 0:m.mode=xt;break;case 1:if(Rn(m),m.mode=Qt,we===B){V>>>=2,ce-=2;break e}break;case 2:m.mode=St;break;case 3:Z.msg="invalid block type",m.mode=kt}V>>>=2,ce-=2;break;case xt:for(V>>>=ce&7,ce-=ce&7;ce<32;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if((V&65535)!==(V>>>16^65535)){Z.msg="invalid stored block lengths",m.mode=kt;break}if(m.length=V&65535,V=0,ce=0,m.mode=Ie,we===B)break e;case Ie:m.mode=Ze;case Ze:if(mt=m.length,mt){if(mt>ye&&(mt=ye),mt>w&&(mt=w),mt===0)break e;t.arraySet(Nt,He,u,mt,de),ye-=mt,u+=mt,w-=mt,de+=mt,m.length-=mt;break}m.mode=Re;break;case St:for(;ce<14;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(m.nlen=(V&31)+257,V>>>=5,ce-=5,m.ndist=(V&31)+1,V>>>=5,ce-=5,m.ncode=(V&15)+4,V>>>=4,ce-=4,m.nlen>286||m.ndist>30){Z.msg="too many length or distance symbols",m.mode=kt;break}m.have=0,m.mode=$t;case $t:for(;m.have<m.ncode;){for(;ce<3;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}m.lens[js[m.have++]]=V&7,V>>>=3,ce-=3}for(;m.have<19;)m.lens[js[m.have++]]=0;if(m.lencode=m.lendyn,m.lenbits=7,gi={bits:m.lenbits},$n=f(s,m.lens,0,19,m.lencode,0,m.work,gi),m.lenbits=gi.bits,$n){Z.msg="invalid code lengths set",m.mode=kt;break}m.have=0,m.mode=Wt;case Wt:for(;m.have<m.nlen+m.ndist;){for(;kr=m.lencode[V&(1<<m.lenbits)-1],dr=kr>>>24,Yr=kr>>>16&255,_n=kr&65535,!(dr<=ce);){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(_n<16)V>>>=dr,ce-=dr,m.lens[m.have++]=_n;else{if(_n===16){for(Kn=dr+2;ce<Kn;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(V>>>=dr,ce-=dr,m.have===0){Z.msg="invalid bit length repeat",m.mode=kt;break}jt=m.lens[m.have-1],mt=3+(V&3),V>>>=2,ce-=2}else if(_n===17){for(Kn=dr+3;ce<Kn;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}V>>>=dr,ce-=dr,jt=0,mt=3+(V&7),V>>>=3,ce-=3}else{for(Kn=dr+7;ce<Kn;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}V>>>=dr,ce-=dr,jt=0,mt=11+(V&127),V>>>=7,ce-=7}if(m.have+mt>m.nlen+m.ndist){Z.msg="invalid bit length repeat",m.mode=kt;break}for(;mt--;)m.lens[m.have++]=jt}}if(m.mode===kt)break;if(m.lens[256]===0){Z.msg="invalid code -- missing end-of-block",m.mode=kt;break}if(m.lenbits=9,gi={bits:m.lenbits},$n=f(l,m.lens,0,m.nlen,m.lencode,0,m.work,gi),m.lenbits=gi.bits,$n){Z.msg="invalid literal/lengths set",m.mode=kt;break}if(m.distbits=6,m.distcode=m.distdyn,gi={bits:m.distbits},$n=f(d,m.lens,m.nlen,m.ndist,m.distcode,0,m.work,gi),m.distbits=gi.bits,$n){Z.msg="invalid distances set",m.mode=kt;break}if(m.mode=Qt,we===B)break e;case Qt:m.mode=sr;case sr:if(ye>=6&&w>=258){Z.next_out=de,Z.avail_out=w,Z.next_in=u,Z.avail_in=ye,m.hold=V,m.bits=ce,a(Z,at),de=Z.next_out,Nt=Z.output,w=Z.avail_out,u=Z.next_in,He=Z.input,ye=Z.avail_in,V=m.hold,ce=m.bits,m.mode===Re&&(m.back=-1);break}for(m.back=0;kr=m.lencode[V&(1<<m.lenbits)-1],dr=kr>>>24,Yr=kr>>>16&255,_n=kr&65535,!(dr<=ce);){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(Yr&&(Yr&240)===0){for(Cn=dr,Na=Yr,Ba=_n;kr=m.lencode[Ba+((V&(1<<Cn+Na)-1)>>Cn)],dr=kr>>>24,Yr=kr>>>16&255,_n=kr&65535,!(Cn+dr<=ce);){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}V>>>=Cn,ce-=Cn,m.back+=Cn}if(V>>>=dr,ce-=dr,m.back+=dr,m.length=_n,Yr===0){m.mode=Gt;break}if(Yr&32){m.back=-1,m.mode=Re;break}if(Yr&64){Z.msg="invalid literal/length code",m.mode=kt;break}m.extra=Yr&15,m.mode=br;case br:if(m.extra){for(Kn=m.extra;ce<Kn;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}m.length+=V&(1<<m.extra)-1,V>>>=m.extra,ce-=m.extra,m.back+=m.extra}m.was=m.length,m.mode=lr;case lr:for(;kr=m.distcode[V&(1<<m.distbits)-1],dr=kr>>>24,Yr=kr>>>16&255,_n=kr&65535,!(dr<=ce);){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if((Yr&240)===0){for(Cn=dr,Na=Yr,Ba=_n;kr=m.distcode[Ba+((V&(1<<Cn+Na)-1)>>Cn)],dr=kr>>>24,Yr=kr>>>16&255,_n=kr&65535,!(Cn+dr<=ce);){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}V>>>=Cn,ce-=Cn,m.back+=Cn}if(V>>>=dr,ce-=dr,m.back+=dr,Yr&64){Z.msg="invalid distance code",m.mode=kt;break}m.offset=_n,m.extra=Yr&15,m.mode=Kt;case Kt:if(m.extra){for(Kn=m.extra;ce<Kn;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}m.offset+=V&(1<<m.extra)-1,V>>>=m.extra,ce-=m.extra,m.back+=m.extra}if(m.offset>m.dmax){Z.msg="invalid distance too far back",m.mode=kt;break}m.mode=wr;case wr:if(w===0)break e;if(mt=at-w,m.offset>mt){if(mt=m.offset-mt,mt>m.whave&&m.sane){Z.msg="invalid distance too far back",m.mode=kt;break}mt>m.wnext?(mt-=m.wnext,ur=m.wsize-mt):ur=m.wnext-mt,mt>m.length&&(mt=m.length),mi=m.window}else mi=Nt,ur=de-m.offset,mt=m.length;mt>w&&(mt=w),w-=mt,m.length-=mt;do Nt[de++]=mi[ur++];while(--mt);m.length===0&&(m.mode=sr);break;case Gt:if(w===0)break e;Nt[de++]=m.length,w--,m.mode=sr;break;case Mt:if(m.wrap){for(;ce<32;){if(ye===0)break e;ye--,V|=He[u++]<<ce,ce+=8}if(at-=w,Z.total_out+=at,m.total+=at,at&&(Z.adler=m.check=m.flags?i(m.check,Nt,at,de-at):n(m.check,Nt,at,de-at)),at=w,(m.flags?V:Dn(V))!==m.check){Z.msg="incorrect data check",m.mode=kt;break}V=0,ce=0}m.mode=dn;case dn:if(m.wrap&&m.flags){for(;ce<32;){if(ye===0)break e;ye--,V+=He[u++]<<ce,ce+=8}if(V!==(m.total&4294967295)){Z.msg="incorrect length check",m.mode=kt;break}V=0,ce=0}m.mode=Qr;case Qr:$n=U;break e;case kt:$n=pe;break e;case Nr:return ue;case Fr:default:return D}return Z.next_out=de,Z.avail_out=w,Z.next_in=u,Z.avail_in=ye,m.hold=V,m.bits=ce,(m.wsize||at!==Z.avail_out&&m.mode<kt&&(m.mode<Mt||we!==v))&&Un(Z,Z.output,Z.next_out,at-Z.avail_out),Et-=Z.avail_in,at-=Z.avail_out,Z.total_in+=Et,Z.total_out+=at,m.total+=at,m.wrap&&at&&(Z.adler=m.check=m.flags?i(m.check,Nt,at,Z.next_out-at):n(m.check,Nt,at,Z.next_out-at)),Z.data_type=m.bits+(m.last?64:0)+(m.mode===Re?128:0)+(m.mode===Qt||m.mode===Ie?256:0),(Et===0&&at===0||we===v)&&$n===p&&($n=x),$n}function Ue(Z){if(!Z||!Z.state)return D;var we=Z.state;return we.window&&(we.window=null),Z.state=null,p}function Xe(Z,we){var m;return!Z||!Z.state||(m=Z.state,(m.wrap&2)===0)?D:(m.head=we,we.done=!1,p)}function dt(Z,we){var m=we.length,He,Nt,u;return!Z||!Z.state||(He=Z.state,He.wrap!==0&&He.mode!==tt)?D:He.mode===tt&&(Nt=1,Nt=n(Nt,we,m,0),Nt!==He.check)?pe:(u=Un(Z,we,m,m),u?(He.mode=Nr,ue):(He.havedict=1,p))}return Mi.inflateReset=on,Mi.inflateReset2=E,Mi.inflateResetKeep=en,Mi.inflateInit=vn,Mi.inflateInit2=pi,Mi.inflate=C,Mi.inflateEnd=Ue,Mi.inflateGetHeader=Xe,Mi.inflateSetDictionary=dt,Mi.inflateInfo="pako inflate (from Nodeca project)",Mi}var Wh,i_;function a_(){return i_||(i_=1,Wh={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_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}),Wh}var Vh,o_;function sb(){if(o_)return Vh;o_=1;function t(){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}return Vh=t,Vh}var s_;function fb(){if(s_)return Ks;s_=1;var t=ob(),n=So(),i=jv(),a=a_(),f=Uh(),s=Jv(),l=sb(),d=Object.prototype.toString;function v(p){if(!(this instanceof v))return new v(p);this.options=n.assign({chunkSize:16384,windowBits:0,to:""},p||{});var U=this.options;U.raw&&U.windowBits>=0&&U.windowBits<16&&(U.windowBits=-U.windowBits,U.windowBits===0&&(U.windowBits=-15)),U.windowBits>=0&&U.windowBits<16&&!(p&&p.windowBits)&&(U.windowBits+=32),U.windowBits>15&&U.windowBits<48&&(U.windowBits&15)===0&&(U.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var q=t.inflateInit2(this.strm,U.windowBits);if(q!==a.Z_OK)throw new Error(f[q]);if(this.header=new l,t.inflateGetHeader(this.strm,this.header),U.dictionary&&(typeof U.dictionary=="string"?U.dictionary=i.string2buf(U.dictionary):d.call(U.dictionary)==="[object ArrayBuffer]"&&(U.dictionary=new Uint8Array(U.dictionary)),U.raw&&(q=t.inflateSetDictionary(this.strm,U.dictionary),q!==a.Z_OK)))throw new Error(f[q])}v.prototype.push=function(p,U){var q=this.strm,D=this.options.chunkSize,pe=this.options.dictionary,ue,x,A,g,b,P=!1;if(this.ended)return!1;x=U===~~U?U:U===!0?a.Z_FINISH:a.Z_NO_FLUSH,typeof p=="string"?q.input=i.binstring2buf(p):d.call(p)==="[object ArrayBuffer]"?q.input=new Uint8Array(p):q.input=p,q.next_in=0,q.avail_in=q.input.length;do{if(q.avail_out===0&&(q.output=new n.Buf8(D),q.next_out=0,q.avail_out=D),ue=t.inflate(q,a.Z_NO_FLUSH),ue===a.Z_NEED_DICT&&pe&&(ue=t.inflateSetDictionary(this.strm,pe)),ue===a.Z_BUF_ERROR&&P===!0&&(ue=a.Z_OK,P=!1),ue!==a.Z_STREAM_END&&ue!==a.Z_OK)return this.onEnd(ue),this.ended=!0,!1;q.next_out&&(q.avail_out===0||ue===a.Z_STREAM_END||q.avail_in===0&&(x===a.Z_FINISH||x===a.Z_SYNC_FLUSH))&&(this.options.to==="string"?(A=i.utf8border(q.output,q.next_out),g=q.next_out-A,b=i.buf2string(q.output,A),q.next_out=g,q.avail_out=D-g,g&&n.arraySet(q.output,q.output,A,g,0),this.onData(b)):this.onData(n.shrinkBuf(q.output,q.next_out))),q.avail_in===0&&q.avail_out===0&&(P=!0)}while((q.avail_in>0||q.avail_out===0)&&ue!==a.Z_STREAM_END);return ue===a.Z_STREAM_END&&(x=a.Z_FINISH),x===a.Z_FINISH?(ue=t.inflateEnd(this.strm),this.onEnd(ue),this.ended=!0,ue===a.Z_OK):(x===a.Z_SYNC_FLUSH&&(this.onEnd(a.Z_OK),q.avail_out=0),!0)},v.prototype.onData=function(p){this.chunks.push(p)},v.prototype.onEnd=function(p){p===a.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=n.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg};function I(p,U){var q=new v(U);if(q.push(p,!0),q.err)throw q.msg||f[q.err];return q.result}function B(p,U){return U=U||{},U.raw=!0,I(p,U)}return Ks.Inflate=v,Ks.inflate=I,Ks.inflateRaw=B,Ks.ungzip=I,Ks}var $h,f_;function lb(){if(f_)return $h;f_=1;var t=So().assign,n=nb(),i=fb(),a=a_(),f={};return t(f,n,i,a),$h=f,$h}(function(t){(function(){var n={},i;t.exports=n,typeof eb=="function"?i=lb():i=window.pako,function(a,f){a.toRGBA8=function(s){var l=s.width,d=s.height;if(s.tabs.acTL==null)return[a.toRGBA8.decodeImage(s.data,l,d,s).buffer];var v=[];s.frames[0].data==null&&(s.frames[0].data=s.data);for(var I,B=new Uint8Array(l*d*4),p=0;p<s.frames.length;p++){var U=s.frames[p],q=U.rect.x,D=U.rect.y,pe=U.rect.width,ue=U.rect.height,x=a.toRGBA8.decodeImage(U.data,pe,ue,s);if(p==0?I=x:U.blend==0?a._copyTile(x,pe,ue,I,l,d,q,D,0):U.blend==1&&a._copyTile(x,pe,ue,I,l,d,q,D,1),v.push(I.buffer),I=I.slice(0),U.dispose!=0){if(U.dispose==1)a._copyTile(B,pe,ue,I,l,d,q,D,0);else if(U.dispose==2){for(var A=p-1;s.frames[A].dispose==2;)A--;I=new Uint8Array(v[A]).slice(0)}}}return v},a.toRGBA8.decodeImage=function(s,l,d,v){var I=l*d,B=a.decode._getBPP(v),p=Math.ceil(l*B/8),U=new Uint8Array(I*4),q=new Uint32Array(U.buffer),D=v.ctype,pe=v.depth,ue=a._bin.readUshort;if(D==6){var x=I<<2;if(pe==8)for(var A=0;A<x;A++)U[A]=s[A];if(pe==16)for(var A=0;A<x;A++)U[A]=s[A<<1]}else if(D==2){var g=v.tabs.tRNS,b=-1,P=-1,F=-1;if(g&&(b=g[0],P=g[1],F=g[2]),pe==8)for(var A=0;A<I;A++){var J=A<<2,Te=A*3;U[J]=s[Te],U[J+1]=s[Te+1],U[J+2]=s[Te+2],U[J+3]=255,b!=-1&&s[Te]==b&&s[Te+1]==P&&s[Te+2]==F&&(U[J+3]=0)}if(pe==16)for(var A=0;A<I;A++){var J=A<<2,Te=A*6;U[J]=s[Te],U[J+1]=s[Te+2],U[J+2]=s[Te+4],U[J+3]=255,b!=-1&&ue(s,Te)==b&&ue(s,Te+2)==P&&ue(s,Te+4)==F&&(U[J+3]=0)}}else if(D==3){var nt=v.tabs.PLTE,ut=v.tabs.tRNS,it=ut?ut.length:0;if(pe==1)for(var st=0;st<d;st++)for(var tt=st*p,Re=st*l,A=0;A<l;A++){var J=Re+A<<2,Ot=s[tt+(A>>3)]>>7-((A&7)<<0)&1,xt=3*Ot;U[J]=nt[xt],U[J+1]=nt[xt+1],U[J+2]=nt[xt+2],U[J+3]=Ot<it?ut[Ot]:255}if(pe==2)for(var st=0;st<d;st++)for(var tt=st*p,Re=st*l,A=0;A<l;A++){var J=Re+A<<2,Ot=s[tt+(A>>2)]>>6-((A&3)<<1)&3,xt=3*Ot;U[J]=nt[xt],U[J+1]=nt[xt+1],U[J+2]=nt[xt+2],U[J+3]=Ot<it?ut[Ot]:255}if(pe==4)for(var st=0;st<d;st++)for(var tt=st*p,Re=st*l,A=0;A<l;A++){var J=Re+A<<2,Ot=s[tt+(A>>1)]>>4-((A&1)<<2)&15,xt=3*Ot;U[J]=nt[xt],U[J+1]=nt[xt+1],U[J+2]=nt[xt+2],U[J+3]=Ot<it?ut[Ot]:255}if(pe==8)for(var A=0;A<I;A++){var J=A<<2,Ot=s[A],xt=3*Ot;U[J]=nt[xt],U[J+1]=nt[xt+1],U[J+2]=nt[xt+2],U[J+3]=Ot<it?ut[Ot]:255}}else if(D==4){if(pe==8)for(var A=0;A<I;A++){var J=A<<2,Ie=A<<1,Ze=s[Ie];U[J]=Ze,U[J+1]=Ze,U[J+2]=Ze,U[J+3]=s[Ie+1]}if(pe==16)for(var A=0;A<I;A++){var J=A<<2,Ie=A<<2,Ze=s[Ie];U[J]=Ze,U[J+1]=Ze,U[J+2]=Ze,U[J+3]=s[Ie+2]}}else if(D==0){var b=v.tabs.tRNS?v.tabs.tRNS:-1;if(pe==1)for(var A=0;A<I;A++){var Ze=255*(s[A>>3]>>7-(A&7)&1),St=Ze==b*255?0:255;q[A]=St<<24|Ze<<16|Ze<<8|Ze}if(pe==2)for(var A=0;A<I;A++){var Ze=85*(s[A>>2]>>6-((A&3)<<1)&3),St=Ze==b*85?0:255;q[A]=St<<24|Ze<<16|Ze<<8|Ze}if(pe==4)for(var A=0;A<I;A++){var Ze=17*(s[A>>1]>>4-((A&1)<<2)&15),St=Ze==b*17?0:255;q[A]=St<<24|Ze<<16|Ze<<8|Ze}if(pe==8)for(var A=0;A<I;A++){var Ze=s[A],St=Ze==b?0:255;q[A]=St<<24|Ze<<16|Ze<<8|Ze}if(pe==16)for(var A=0;A<I;A++){var Ze=s[A<<1],St=ue(s,A<<1)==b?0:255;q[A]=St<<24|Ze<<16|Ze<<8|Ze}}return U},a.decode=function(s){for(var l=new Uint8Array(s),d=8,v=a._bin,I=v.readUshort,B=v.readUint,p={tabs:{},frames:[]},U=new Uint8Array(l.length),q=0,D,pe=0,ue=[137,80,78,71,13,10,26,10],x=0;x<8;x++)if(l[x]!=ue[x])throw"The input is not a PNG file!";for(;d<l.length;){var A=v.readUint(l,d);d+=4;var g=v.readASCII(l,d,4);if(d+=4,g=="IHDR")a.decode._IHDR(l,d,p);else if(g=="IDAT"){for(var x=0;x<A;x++)U[q+x]=l[d+x];q+=A}else if(g=="acTL")p.tabs[g]={num_frames:B(l,d),num_plays:B(l,d+4)},D=new Uint8Array(l.length);else if(g=="fcTL"){if(pe!=0){var b=p.frames[p.frames.length-1];b.data=a.decode._decompress(p,D.slice(0,pe),b.rect.width,b.rect.height),pe=0}var P={x:B(l,d+12),y:B(l,d+16),width:B(l,d+4),height:B(l,d+8)},F=I(l,d+22);F=I(l,d+20)/(F==0?100:F);var J={rect:P,delay:Math.round(F*1e3),dispose:l[d+24],blend:l[d+25]};p.frames.push(J)}else if(g=="fdAT"){for(var x=0;x<A-4;x++)D[pe+x]=l[d+x+4];pe+=A-4}else if(g=="pHYs")p.tabs[g]=[v.readUint(l,d),v.readUint(l,d+4),l[d+8]];else if(g=="cHRM"){p.tabs[g]=[];for(var x=0;x<8;x++)p.tabs[g].push(v.readUint(l,d+x*4))}else if(g=="tEXt"){p.tabs[g]==null&&(p.tabs[g]={});var Te=v.nextZero(l,d),nt=v.readASCII(l,d,Te-d),ut=v.readASCII(l,Te+1,d+A-Te-1);p.tabs[g][nt]=ut}else if(g=="iTXt"){p.tabs[g]==null&&(p.tabs[g]={});var Te=0,it=d;Te=v.nextZero(l,it);var nt=v.readASCII(l,it,Te-it);it=Te+1,l[it],l[it+1],it+=2,Te=v.nextZero(l,it),v.readASCII(l,it,Te-it),it=Te+1,Te=v.nextZero(l,it),v.readUTF8(l,it,Te-it),it=Te+1;var ut=v.readUTF8(l,it,A-(it-d));p.tabs[g][nt]=ut}else if(g=="PLTE")p.tabs[g]=v.readBytes(l,d,A);else if(g=="hIST"){var st=p.tabs.PLTE.length/3;p.tabs[g]=[];for(var x=0;x<st;x++)p.tabs[g].push(I(l,d+x*2))}else if(g=="tRNS")p.ctype==3?p.tabs[g]=v.readBytes(l,d,A):p.ctype==0?p.tabs[g]=I(l,d):p.ctype==2&&(p.tabs[g]=[I(l,d),I(l,d+2),I(l,d+4)]);else if(g=="gAMA")p.tabs[g]=v.readUint(l,d)/1e5;else if(g=="sRGB")p.tabs[g]=l[d];else if(g=="bKGD")p.ctype==0||p.ctype==4?p.tabs[g]=[I(l,d)]:p.ctype==2||p.ctype==6?p.tabs[g]=[I(l,d),I(l,d+2),I(l,d+4)]:p.ctype==3&&(p.tabs[g]=l[d]);else if(g=="IEND"){if(pe!=0){var b=p.frames[p.frames.length-1];b.data=a.decode._decompress(p,D.slice(0,pe),b.rect.width,b.rect.height),pe=0}p.data=a.decode._decompress(p,U,p.width,p.height);break}d+=A,v.readUint(l,d),d+=4}return delete p.compress,delete p.interlace,delete p.filter,p},a.decode._decompress=function(s,l,d,v){return s.compress==0&&(l=a.decode._inflate(l)),s.interlace==0?l=a.decode._filterZero(l,s,0,d,v):s.interlace==1&&(l=a.decode._readInterlace(l,s)),l},a.decode._inflate=function(s){return f.inflate(s)},a.decode._readInterlace=function(s,l){for(var d=l.width,v=l.height,I=a.decode._getBPP(l),B=I>>3,p=Math.ceil(d*I/8),U=new Uint8Array(v*p),q=0,D=[0,0,4,0,2,0,1],pe=[0,4,0,2,0,1,0],ue=[8,8,8,4,4,2,2],x=[8,8,4,4,2,2,1],A=0;A<7;){for(var g=ue[A],b=x[A],P=0,F=0,J=D[A];J<v;)J+=g,F++;for(var Te=pe[A];Te<d;)Te+=b,P++;var nt=Math.ceil(P*I/8);a.decode._filterZero(s,l,q,P,F);for(var ut=0,it=D[A];it<v;){for(var st=pe[A],tt=q+ut*nt<<3;st<d;){if(I==1){var Re=s[tt>>3];Re=Re>>7-(tt&7)&1,U[it*p+(st>>3)]|=Re<<7-((st&3)<<0)}if(I==2){var Re=s[tt>>3];Re=Re>>6-(tt&7)&3,U[it*p+(st>>2)]|=Re<<6-((st&3)<<1)}if(I==4){var Re=s[tt>>3];Re=Re>>4-(tt&7)&15,U[it*p+(st>>1)]|=Re<<4-((st&1)<<2)}if(I>=8)for(var Ot=it*p+st*B,xt=0;xt<B;xt++)U[Ot+xt]=s[(tt>>3)+xt];tt+=I,st+=b}ut++,it+=g}P*F!=0&&(q+=F*(1+nt)),A=A+1}return U},a.decode._getBPP=function(s){var l=[1,null,3,1,2,null,4][s.ctype];return l*s.depth},a.decode._filterZero=function(s,l,d,v,I){var B=a.decode._getBPP(l),p=Math.ceil(v*B/8),U=a.decode._paeth;B=Math.ceil(B/8);for(var q=0;q<I;q++){var D=d+q*p,pe=D+q+1,ue=s[pe-1];if(ue==0)for(var x=0;x<p;x++)s[D+x]=s[pe+x];else if(ue==1){for(var x=0;x<B;x++)s[D+x]=s[pe+x];for(var x=B;x<p;x++)s[D+x]=s[pe+x]+s[D+x-B]&255}else if(q==0){for(var x=0;x<B;x++)s[D+x]=s[pe+x];if(ue==2)for(var x=B;x<p;x++)s[D+x]=s[pe+x]&255;if(ue==3)for(var x=B;x<p;x++)s[D+x]=s[pe+x]+(s[D+x-B]>>1)&255;if(ue==4)for(var x=B;x<p;x++)s[D+x]=s[pe+x]+U(s[D+x-B],0,0)&255}else{if(ue==2)for(var x=0;x<p;x++)s[D+x]=s[pe+x]+s[D+x-p]&255;if(ue==3){for(var x=0;x<B;x++)s[D+x]=s[pe+x]+(s[D+x-p]>>1)&255;for(var x=B;x<p;x++)s[D+x]=s[pe+x]+(s[D+x-p]+s[D+x-B]>>1)&255}if(ue==4){for(var x=0;x<B;x++)s[D+x]=s[pe+x]+U(0,s[D+x-p],0)&255;for(var x=B;x<p;x++)s[D+x]=s[pe+x]+U(s[D+x-B],s[D+x-p],s[D+x-B-p])&255}}}return s},a.decode._paeth=function(s,l,d){var v=s+l-d,I=Math.abs(v-s),B=Math.abs(v-l),p=Math.abs(v-d);return I<=B&&I<=p?s:B<=p?l:d},a.decode._IHDR=function(s,l,d){var v=a._bin;d.width=v.readUint(s,l),l+=4,d.height=v.readUint(s,l),l+=4,d.depth=s[l],l++,d.ctype=s[l],l++,d.compress=s[l],l++,d.filter=s[l],l++,d.interlace=s[l],l++},a._bin={nextZero:function(s,l){for(;s[l]!=0;)l++;return l},readUshort:function(s,l){return s[l]<<8|s[l+1]},writeUshort:function(s,l,d){s[l]=d>>8&255,s[l+1]=d&255},readUint:function(s,l){return s[l]*(256*256*256)+(s[l+1]<<16|s[l+2]<<8|s[l+3])},writeUint:function(s,l,d){s[l]=d>>24&255,s[l+1]=d>>16&255,s[l+2]=d>>8&255,s[l+3]=d&255},readASCII:function(s,l,d){for(var v="",I=0;I<d;I++)v+=String.fromCharCode(s[l+I]);return v},writeASCII:function(s,l,d){for(var v=0;v<d.length;v++)s[l+v]=d.charCodeAt(v)},readBytes:function(s,l,d){for(var v=[],I=0;I<d;I++)v.push(s[l+I]);return v},pad:function(s){return s.length<2?"0"+s:s},readUTF8:function(s,l,d){for(var v="",I,B=0;B<d;B++)v+="%"+a._bin.pad(s[l+B].toString(16));try{I=decodeURIComponent(v)}catch{return a._bin.readASCII(s,l,d)}return I}},a._copyTile=function(s,l,d,v,I,B,p,U,q){for(var D=Math.min(l,I),pe=Math.min(d,B),ue=0,x=0,A=0;A<pe;A++)for(var g=0;g<D;g++)if(p>=0&&U>=0?(ue=A*l+g<<2,x=(U+A)*I+p+g<<2):(ue=(-U+A)*l-p+g<<2,x=A*I+g<<2),q==0)v[x]=s[ue],v[x+1]=s[ue+1],v[x+2]=s[ue+2],v[x+3]=s[ue+3];else if(q==1){var b=s[ue+3]*.00392156862745098,P=s[ue]*b,F=s[ue+1]*b,J=s[ue+2]*b,Te=v[x+3]*(1/255),nt=v[x]*Te,ut=v[x+1]*Te,it=v[x+2]*Te,st=1-b,tt=b+Te*st,Re=tt==0?0:1/tt;v[x+3]=255*tt,v[x+0]=(P+nt*st)*Re,v[x+1]=(F+ut*st)*Re,v[x+2]=(J+it*st)*Re}else if(q==2){var b=s[ue+3],P=s[ue],F=s[ue+1],J=s[ue+2],Te=v[x+3],nt=v[x],ut=v[x+1],it=v[x+2];b==Te&&P==nt&&F==ut&&J==it?(v[x]=0,v[x+1]=0,v[x+2]=0,v[x+3]=0):(v[x]=P,v[x+1]=F,v[x+2]=J,v[x+3]=b)}else if(q==3){var b=s[ue+3],P=s[ue],F=s[ue+1],J=s[ue+2],Te=v[x+3],nt=v[x],ut=v[x+1],it=v[x+2];if(b==Te&&P==nt&&F==ut&&J==it)continue;if(b<220&&Te>20)return!1}return!0},a.encode=function(s,l,d,v,I,B){v==null&&(v=0),B==null&&(B=!1);for(var p=new Uint8Array(s[0].byteLength*s.length+100),U=[137,80,78,71,13,10,26,10],q=0;q<8;q++)p[q]=U[q];var D=8,pe=a._bin,ue=a.crc.crc,x=pe.writeUint,A=pe.writeUshort,g=pe.writeASCII,b=a.encode.compressPNG(s,l,d,v,B);x(p,D,13),D+=4,g(p,D,"IHDR"),D+=4,x(p,D,l),D+=4,x(p,D,d),D+=4,p[D]=b.depth,D++,p[D]=b.ctype,D++,p[D]=0,D++,p[D]=0,D++,p[D]=0,D++,x(p,D,ue(p,D-17,17)),D+=4,x(p,D,1),D+=4,g(p,D,"sRGB"),D+=4,p[D]=1,D++,x(p,D,ue(p,D-5,5)),D+=4;var P=s.length>1;if(P&&(x(p,D,8),D+=4,g(p,D,"acTL"),D+=4,x(p,D,s.length),D+=4,x(p,D,0),D+=4,x(p,D,ue(p,D-12,12)),D+=4),b.ctype==3){var F=b.plte.length;x(p,D,F*3),D+=4,g(p,D,"PLTE"),D+=4;for(var q=0;q<F;q++){var J=q*3,Te=b.plte[q],nt=Te&255,ut=Te>>8&255,it=Te>>16&255;p[D+J+0]=nt,p[D+J+1]=ut,p[D+J+2]=it}if(D+=F*3,x(p,D,ue(p,D-F*3-4,F*3+4)),D+=4,b.gotAlpha){x(p,D,F),D+=4,g(p,D,"tRNS"),D+=4;for(var q=0;q<F;q++)p[D+q]=b.plte[q]>>24&255;D+=F,x(p,D,ue(p,D-F-4,F+4)),D+=4}}for(var st=0,tt=0;tt<b.frames.length;tt++){var Re=b.frames[tt];P&&(x(p,D,26),D+=4,g(p,D,"fcTL"),D+=4,x(p,D,st++),D+=4,x(p,D,Re.rect.width),D+=4,x(p,D,Re.rect.height),D+=4,x(p,D,Re.rect.x),D+=4,x(p,D,Re.rect.y),D+=4,A(p,D,I[tt]),D+=2,A(p,D,1e3),D+=2,p[D]=Re.dispose,D++,p[D]=Re.blend,D++,x(p,D,ue(p,D-30,30)),D+=4);var Ot=Re.cimg,F=Ot.length;x(p,D,F+(tt==0?0:4)),D+=4;var xt=D;g(p,D,tt==0?"IDAT":"fdAT"),D+=4,tt!=0&&(x(p,D,st++),D+=4);for(var q=0;q<F;q++)p[D+q]=Ot[q];D+=F,x(p,D,ue(p,xt,D-xt)),D+=4}return x(p,D,0),D+=4,g(p,D,"IEND"),D+=4,x(p,D,ue(p,D-4,4)),D+=4,p.buffer.slice(0,D)},a.encode.compressPNG=function(s,l,d,v,I){for(var B=a.encode.compress(s,l,d,v,!1,I),p=0;p<s.length;p++){var U=B.frames[p];U.rect.width;var q=U.rect.height,D=U.bpl,pe=U.bpp,ue=new Uint8Array(q*D+q);U.cimg=a.encode._filterZero(U.img,q,pe,D,ue)}return B},a.encode.compress=function(s,l,d,v,I,B){B==null&&(B=!1);for(var p=6,U=8,q=4,D=255,pe=0;pe<s.length;pe++)for(var ue=new Uint8Array(s[pe]),x=ue.length,A=0;A<x;A+=4)D&=ue[A+3];var g=D!=255,b={},P=[];if(s.length!=0&&(b[0]=0,P.push(0),v!=0&&v--),v!=0){var F=a.quantize(s,v,I);s=F.bufs;for(var A=0;A<F.plte.length;A++){var J=F.plte[A].est.rgba;b[J]==null&&(b[J]=P.length,P.push(J))}}else for(var pe=0;pe<s.length;pe++)for(var Te=new Uint32Array(s[pe]),x=Te.length,A=0;A<x;A++){var J=Te[A];if((A<l||J!=Te[A-1]&&J!=Te[A-l])&&b[J]==null&&(b[J]=P.length,P.push(J),P.length>=300))break}var nt=g?I:!1,ut=P.length;ut<=256&&B==!1&&(ut<=2?U=1:ut<=4?U=2:ut<=16?U=4:U=8,I&&(U=8),g=!0);for(var it=[],pe=0;pe<s.length;pe++){var st=new Uint8Array(s[pe]),tt=new Uint32Array(st.buffer),Re=0,Ot=0,xt=l,Ie=d,Ze=0;if(pe!=0&&!nt){for(var St=I||pe==1||it[it.length-2].dispose==2?1:2,$t=0,Wt=1e9,Qt=0;Qt<St;Qt++){for(var Qr=new Uint8Array(s[pe-1-Qt]),sr=new Uint32Array(s[pe-1-Qt]),br=l,lr=d,Kt=-1,wr=-1,Gt=0;Gt<d;Gt++)for(var Mt=0;Mt<l;Mt++){var A=Gt*l+Mt;tt[A]!=sr[A]&&(Mt<br&&(br=Mt),Mt>Kt&&(Kt=Mt),Gt<lr&&(lr=Gt),Gt>wr&&(wr=Gt))}var dn=Kt==-1?1:(Kt-br+1)*(wr-lr+1);dn<Wt&&(Wt=dn,$t=Qt,Kt==-1?(Re=Ot=0,xt=Ie=1):(Re=br,Ot=lr,xt=Kt-br+1,Ie=wr-lr+1))}var Qr=new Uint8Array(s[pe-1-$t]);$t==1&&(it[it.length-1].dispose=2);var kt=new Uint8Array(xt*Ie*4);new Uint32Array(kt.buffer),a._copyTile(Qr,l,d,kt,xt,Ie,-Re,-Ot,0),a._copyTile(st,l,d,kt,xt,Ie,-Re,-Ot,3)?(a._copyTile(st,l,d,kt,xt,Ie,-Re,-Ot,2),Ze=1):(a._copyTile(st,l,d,kt,xt,Ie,-Re,-Ot,0),Ze=0),st=kt,tt=new Uint32Array(st.buffer)}var Nr=4*xt;if(ut<=256&&B==!1){Nr=Math.ceil(U*xt/8);for(var kt=new Uint8Array(Nr*Ie),Gt=0;Gt<Ie;Gt++){var A=Gt*Nr,Fr=Gt*xt;if(U==8)for(var Mt=0;Mt<xt;Mt++)kt[A+Mt]=b[tt[Fr+Mt]];else if(U==4)for(var Mt=0;Mt<xt;Mt++)kt[A+(Mt>>1)]|=b[tt[Fr+Mt]]<<4-(Mt&1)*4;else if(U==2)for(var Mt=0;Mt<xt;Mt++)kt[A+(Mt>>2)]|=b[tt[Fr+Mt]]<<6-(Mt&3)*2;else if(U==1)for(var Mt=0;Mt<xt;Mt++)kt[A+(Mt>>3)]|=b[tt[Fr+Mt]]<<7-(Mt&7)*1}st=kt,p=3,q=1}else if(g==!1&&s.length==1){for(var kt=new Uint8Array(xt*Ie*3),Xr=xt*Ie,A=0;A<Xr;A++){var Jr=A*3,ar=A*4;kt[Jr]=st[ar],kt[Jr+1]=st[ar+1],kt[Jr+2]=st[ar+2]}st=kt,p=2,q=3,Nr=3*xt}it.push({rect:{x:Re,y:Ot,width:xt,height:Ie},img:st,bpl:Nr,bpp:q,blend:Ze,dispose:nt?1:0})}return{ctype:p,depth:U,plte:P,gotAlpha:g,frames:it}},a.encode._filterZero=function(s,l,d,v,I){for(var B=[],p=0;p<5;p++)if(!(l*v>5e5&&(p==2||p==3||p==4))){for(var U=0;U<l;U++)a.encode._filterLine(I,s,U,v,d,p);if(B.push(f.deflate(I)),d==1)break}for(var q,D=1e9,pe=0;pe<B.length;pe++)B[pe].length<D&&(q=pe,D=B[pe].length);return B[q]},a.encode._filterLine=function(s,l,d,v,I,B){var p=d*v,U=p+d,q=a.decode._paeth;if(s[U]=B,U++,B==0)for(var D=0;D<v;D++)s[U+D]=l[p+D];else if(B==1){for(var D=0;D<I;D++)s[U+D]=l[p+D];for(var D=I;D<v;D++)s[U+D]=l[p+D]-l[p+D-I]+256&255}else if(d==0){for(var D=0;D<I;D++)s[U+D]=l[p+D];if(B==2)for(var D=I;D<v;D++)s[U+D]=l[p+D];if(B==3)for(var D=I;D<v;D++)s[U+D]=l[p+D]-(l[p+D-I]>>1)+256&255;if(B==4)for(var D=I;D<v;D++)s[U+D]=l[p+D]-q(l[p+D-I],0,0)+256&255}else{if(B==2)for(var D=0;D<v;D++)s[U+D]=l[p+D]+256-l[p+D-v]&255;if(B==3){for(var D=0;D<I;D++)s[U+D]=l[p+D]+256-(l[p+D-v]>>1)&255;for(var D=I;D<v;D++)s[U+D]=l[p+D]+256-(l[p+D-v]+l[p+D-I]>>1)&255}if(B==4){for(var D=0;D<I;D++)s[U+D]=l[p+D]+256-q(0,l[p+D-v],0)&255;for(var D=I;D<v;D++)s[U+D]=l[p+D]+256-q(l[p+D-I],l[p+D-v],l[p+D-I-v])&255}}},a.crc={table:function(){for(var s=new Uint32Array(256),l=0;l<256;l++){for(var d=l,v=0;v<8;v++)d&1?d=3988292384^d>>>1:d=d>>>1;s[l]=d}return s}(),update:function(s,l,d,v){for(var I=0;I<v;I++)s=a.crc.table[(s^l[d+I])&255]^s>>>8;return s},crc:function(s,l,d){return a.crc.update(4294967295,s,l,d)^4294967295}},a.quantize=function(s,l,d){for(var v=[],I=0,B=0;B<s.length;B++)v.push(a.encode.alphaMul(new Uint8Array(s[B]),d)),I+=s[B].byteLength;for(var p=new Uint8Array(I),U=new Uint32Array(p.buffer),q=0,B=0;B<v.length;B++){for(var D=v[B],pe=D.length,ue=0;ue<pe;ue++)p[q+ue]=D[ue];q+=pe}var x={i0:0,i1:p.length,bst:null,est:null,tdst:0,left:null,right:null};x.bst=a.quantize.stats(p,x.i0,x.i1),x.est=a.quantize.estats(x.bst);for(var A=[x];A.length<l;){for(var g=0,b=0,B=0;B<A.length;B++)A[B].est.L>g&&(g=A[B].est.L,b=B);if(g<.001)break;var P=A[b],F=a.quantize.splitPixels(p,U,P.i0,P.i1,P.est.e,P.est.eMq255),J={i0:P.i0,i1:F,bst:null,est:null,tdst:0,left:null,right:null};J.bst=a.quantize.stats(p,J.i0,J.i1),J.est=a.quantize.estats(J.bst);var Te={i0:F,i1:P.i1,bst:null,est:null,tdst:0,left:null,right:null};Te.bst={R:[],m:[],N:P.bst.N-J.bst.N};for(var B=0;B<16;B++)Te.bst.R[B]=P.bst.R[B]-J.bst.R[B];for(var B=0;B<4;B++)Te.bst.m[B]=P.bst.m[B]-J.bst.m[B];Te.est=a.quantize.estats(Te.bst),P.left=J,P.right=Te,A[b]=J,A.push(Te)}A.sort(function(St,$t){return $t.bst.N-St.bst.N});for(var nt=0;nt<v.length;nt++){for(var ut=a.quantize.planeDst,it=new Uint8Array(v[nt].buffer),st=new Uint32Array(v[nt].buffer),tt=it.length,B=0;B<tt;B+=4){for(var Re=it[B]*.00392156862745098,Ot=it[B+1]*(1/255),xt=it[B+2]*(1/255),Ie=it[B+3]*(1/255),Ze=x;Ze.left;)Ze=ut(Ze.est,Re,Ot,xt,Ie)<=0?Ze.left:Ze.right;st[B>>2]=Ze.est.rgba}v[nt]=st.buffer}return{bufs:v,plte:A}},a.quantize.getNearest=function(s,l,d,v,I){if(s.left==null)return s.tdst=a.quantize.dist(s.est.q,l,d,v,I),s;var B=a.quantize.planeDst(s.est,l,d,v,I),p=s.left,U=s.right;B>0&&(p=s.right,U=s.left);var q=a.quantize.getNearest(p,l,d,v,I);if(q.tdst<=B*B)return q;var D=a.quantize.getNearest(U,l,d,v,I);return D.tdst<q.tdst?D:q},a.quantize.planeDst=function(s,l,d,v,I){var B=s.e;return B[0]*l+B[1]*d+B[2]*v+B[3]*I-s.eMq},a.quantize.dist=function(s,l,d,v,I){var B=l-s[0],p=d-s[1],U=v-s[2],q=I-s[3];return B*B+p*p+U*U+q*q},a.quantize.splitPixels=function(s,l,d,v,I,B){var p=a.quantize.vecDot;for(v-=4;d<v;){for(;p(s,d,I)<=B;)d+=4;for(;p(s,v,I)>B;)v-=4;if(d>=v)break;var U=l[d>>2];l[d>>2]=l[v>>2],l[v>>2]=U,d+=4,v-=4}for(;p(s,d,I)>B;)d-=4;return d+4},a.quantize.vecDot=function(s,l,d){return s[l]*d[0]+s[l+1]*d[1]+s[l+2]*d[2]+s[l+3]*d[3]},a.quantize.stats=function(s,l,d){for(var v=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],I=[0,0,0,0],B=d-l>>2,p=l;p<d;p+=4){var U=s[p]*.00392156862745098,q=s[p+1]*(1/255),D=s[p+2]*(1/255),pe=s[p+3]*(1/255);I[0]+=U,I[1]+=q,I[2]+=D,I[3]+=pe,v[0]+=U*U,v[1]+=U*q,v[2]+=U*D,v[3]+=U*pe,v[5]+=q*q,v[6]+=q*D,v[7]+=q*pe,v[10]+=D*D,v[11]+=D*pe,v[15]+=pe*pe}return v[4]=v[1],v[8]=v[2],v[12]=v[3],v[9]=v[6],v[13]=v[7],v[14]=v[11],{R:v,m:I,N:B}},a.quantize.estats=function(s){var l=s.R,d=s.m,v=s.N,I=d[0],B=d[1],p=d[2],U=d[3],q=v==0?0:1/v,D=[l[0]-I*I*q,l[1]-I*B*q,l[2]-I*p*q,l[3]-I*U*q,l[4]-B*I*q,l[5]-B*B*q,l[6]-B*p*q,l[7]-B*U*q,l[8]-p*I*q,l[9]-p*B*q,l[10]-p*p*q,l[11]-p*U*q,l[12]-U*I*q,l[13]-U*B*q,l[14]-U*p*q,l[15]-U*U*q],pe=D,ue=a.M4,x=[.5,.5,.5,.5],A=0,g=0;if(v!=0)for(var b=0;b<10&&(x=ue.multVec(pe,x),g=Math.sqrt(ue.dot(x,x)),x=ue.sml(1/g,x),!(Math.abs(g-A)<1e-9));b++)A=g;var P=[I*q,B*q,p*q,U*q],F=ue.dot(ue.sml(255,P),x),J=P[3]<.001?0:1/P[3];return{Cov:D,q:P,e:x,L:A,eMq255:F,eMq:ue.dot(x,P),rgba:(Math.round(255*P[3])<<24|Math.round(255*P[2]*J)<<16|Math.round(255*P[1]*J)<<8|Math.round(255*P[0]*J)<<0)>>>0}},a.M4={multVec:function(s,l){return[s[0]*l[0]+s[1]*l[1]+s[2]*l[2]+s[3]*l[3],s[4]*l[0]+s[5]*l[1]+s[6]*l[2]+s[7]*l[3],s[8]*l[0]+s[9]*l[1]+s[10]*l[2]+s[11]*l[3],s[12]*l[0]+s[13]*l[1]+s[14]*l[2]+s[15]*l[3]]},dot:function(s,l){return s[0]*l[0]+s[1]*l[1]+s[2]*l[2]+s[3]*l[3]},sml:function(s,l){return[s*l[0],s*l[1],s*l[2],s*l[3]]}},a.encode.alphaMul=function(s,l){for(var d=new Uint8Array(s.length),v=s.length>>2,I=0;I<v;I++){var B=I<<2,p=s[B+3];l&&(p=p<128?0:255);var U=p*(1/255);d[B+0]=s[B+0]*U,d[B+1]=s[B+1]*U,d[B+2]=s[B+2]*U,d[B+3]=p}return d}}(n,i)})()})(kh);var l_={exports:{}};(function(t,n){(function(i,a){t.exports=a()})(Zs,function(){var i=function(h){return h instanceof Uint8Array||h instanceof Uint16Array||h instanceof Uint32Array||h instanceof Int8Array||h instanceof Int16Array||h instanceof Int32Array||h instanceof Float32Array||h instanceof Float64Array||h instanceof Uint8ClampedArray},a=function(h,T){for(var G=Object.keys(T),se=0;se<G.length;++se)h[G[se]]=T[G[se]];return h},f=`
39
+ `;function s(h){return typeof atob<"u"?atob(h):"base64:"+h}function l(h){var T=new Error("(regl) "+h);throw console.error(T),T}function d(h,T){h||l(T)}function v(h){return h?": "+h:""}function I(h,T,G){h in T||l("unknown parameter ("+h+")"+v(G)+". possible values: "+Object.keys(T).join())}function B(h,T){i(h)||l("invalid parameter type"+v(T)+". must be a typed array")}function p(h,T){switch(T){case"number":return typeof h=="number";case"object":return typeof h=="object";case"string":return typeof h=="string";case"boolean":return typeof h=="boolean";case"function":return typeof h=="function";case"undefined":return typeof h>"u";case"symbol":return typeof h=="symbol"}}function U(h,T,G){p(h,T)||l("invalid parameter type"+v(G)+". expected "+T+", got "+typeof h)}function q(h,T){h>=0&&(h|0)===h||l("invalid parameter type, ("+h+")"+v(T)+". must be a nonnegative integer")}function D(h,T,G){T.indexOf(h)<0&&l("invalid value"+v(G)+". must be one of: "+T)}var pe=["gl","canvas","container","attributes","pixelRatio","extensions","optionalExtensions","profile","onDone"];function ue(h){Object.keys(h).forEach(function(T){pe.indexOf(T)<0&&l('invalid regl constructor argument "'+T+'". must be one of '+pe)})}function x(h,T){for(h=h+"";h.length<T;)h=" "+h;return h}function A(){this.name="unknown",this.lines=[],this.index={},this.hasErrors=!1}function g(h,T){this.number=h,this.line=T,this.errors=[]}function b(h,T,G){this.file=h,this.line=T,this.message=G}function P(){var h=new Error,T=(h.stack||h).toString(),G=/compileProcedure.*\n\s*at.*\((.*)\)/.exec(T);if(G)return G[1];var se=/compileProcedure.*\n\s*at\s+(.*)(\n|$)/.exec(T);return se?se[1]:"unknown"}function F(){var h=new Error,T=(h.stack||h).toString(),G=/at REGLCommand.*\n\s+at.*\((.*)\)/.exec(T);if(G)return G[1];var se=/at REGLCommand.*\n\s+at\s+(.*)\n/.exec(T);return se?se[1]:"unknown"}function J(h,T){var G=h.split(`
38
40
  `),se=1,me=0,ae={unknown:new A,0:new A};ae.unknown.name=ae[0].name=T||P(),ae.unknown.lines.push(new g(0,""));for(var fe=0;fe<G.length;++fe){var Le=G[fe],De=/^\s*#\s*(\w+)\s+(.+)\s*$/.exec(Le);if(De)switch(De[1]){case"line":var Ne=/(\d+)(\s+\d+)?/.exec(De[2]);Ne&&(se=Ne[1]|0,Ne[2]&&(me=Ne[2]|0,me in ae||(ae[me]=new A)));break;case"define":var Ge=/SHADER_NAME(_B64)?\s+(.*)$/.exec(De[2]);Ge&&(ae[me].name=Ge[1]?s(Ge[2]):Ge[2]);break}ae[me].lines.push(new g(se++,Le))}return Object.keys(ae).forEach(function(Be){var We=ae[Be];We.lines.forEach(function(Ce){We.index[Ce.number]=Ce})}),ae}function Te(h){var T=[];return h.split(`
39
- `).forEach(function(G){if(!(G.length<5)){var se=/^ERROR:\s+(\d+):(\d+):\s*(.*)$/.exec(G);se?T.push(new x(se[1]|0,se[2]|0,se[3].trim())):G.length>0&&T.push(new x("unknown",0,G))}}),T}function nt(h,T){T.forEach(function(G){var se=h[G.file];if(se){var me=se.index[G.line];if(me){me.errors.push(G),se.hasErrors=!0;return}}h.unknown.hasErrors=!0,h.unknown.lines[0].errors.push(G)})}function ut(h,T,G,se,me){if(!h.getShaderParameter(T,h.COMPILE_STATUS)){var ae=h.getShaderInfoLog(T),fe=se===h.FRAGMENT_SHADER?"fragment":"vertex";Me(G,"string",fe+" shader source must be a string",me);var Le=J(G,me),De=Te(ae);nt(Le,De),Object.keys(Le).forEach(function(Ne){var Ge=Le[Ne];if(!Ge.hasErrors)return;var Be=[""],We=[""];function Ce(ke,K){Be.push(ke),We.push(K||"")}Ce("file number "+Ne+": "+Ge.name+`
40
- `,"color:red;text-decoration:underline;font-weight:bold"),Ge.lines.forEach(function(ke){if(ke.errors.length>0){Ce(b(ke.number,4)+"| ","background-color:yellow; font-weight:bold"),Ce(ke.line+f,"color:red; background-color:yellow; font-weight:bold");var K=0;ke.errors.forEach(function(oe){var Oe=oe.message,rt=/^\s*'(.*)'\s*:\s*(.*)$/.exec(Oe);if(rt){var Se=rt[1];switch(Oe=rt[2],Se){case"assign":Se="=";break}K=Math.max(ke.line.indexOf(Se,K),0)}else K=0;Ce(b("| ",6)),Ce(b("^^^",K+3)+f,"font-weight:bold"),Ce(b("| ",6)),Ce(Oe+f,"font-weight:bold")}),Ce(b("| ",6)+f)}else Ce(b(ke.number,4)+"| "),Ce(ke.line+f,"color:red")}),typeof document<"u"&&!window.chrome?(We[0]=Be.join("%c"),console.log.apply(console,We)):console.log(Be.join(""))}),d.raise("Error compiling "+fe+" shader, "+Le[0].name)}}function it(h,T,G,se,me){if(!h.getProgramParameter(T,h.LINK_STATUS)){var ae=h.getProgramInfoLog(T),fe=J(G,me),Le=J(se,me),De='Error linking program with vertex shader, "'+Le[0].name+'", and fragment shader "'+fe[0].name+'"';typeof document<"u"?console.log("%c"+De+f+"%c"+ae,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(De+f+ae),d.raise(De)}}function st(h){h._commandRef=P()}function tt(h,T,G,se){st(h);function me(De){return De?se.id(De):0}h._fragId=me(h.static.frag),h._vertId=me(h.static.vert);function ae(De,Ne){Object.keys(Ne).forEach(function(Ge){De[se.id(Ge)]=!0})}var fe=h._uniformSet={};ae(fe,T.static),ae(fe,T.dynamic);var Le=h._attributeSet={};ae(Le,G.static),ae(Le,G.dynamic),h._hasCount="count"in h.static||"count"in h.dynamic||"elements"in h.static||"elements"in h.dynamic}function Re(h,T){var G=F();l(h+" in command "+(T||P())+(G==="unknown"?"":" called from "+G))}function Ot(h,T,G){h||Re(T,G||P())}function bt(h,T,G,se){h in T||Re("unknown parameter ("+h+")"+v(G)+". possible values: "+Object.keys(T).join(),se||P())}function Me(h,T,G,se){p(h,T)||Re("invalid parameter type"+v(G)+". expected "+T+", got "+typeof h,se||P())}function Ze(h){h()}function St(h,T,G){h.texture?D(h.texture._texture.internalformat,T,"unsupported texture format for attachment"):D(h.renderbuffer._renderbuffer.format,G,"unsupported renderbuffer format for attachment")}var $t=33071,Wt=9728,Qt=9984,sr=9985,xr=9986,lr=9987,Kt=5120,wr=5121,Gt=5122,It=5123,hn=5124,jr=5125,kt=5126,Nr=32819,Fr=32820,Zr=33635,Qr=34042,ar=36193,Pt={};Pt[Kt]=Pt[wr]=1,Pt[Gt]=Pt[It]=Pt[ar]=Pt[Zr]=Pt[Nr]=Pt[Fr]=2,Pt[hn]=Pt[jr]=Pt[kt]=Pt[Qr]=4;function Tn(h,T){return h===Fr||h===Nr||h===Zr?2:h===Qr?4:Pt[h]*T}function En(h){return!(h&h-1)&&!!h}function Jr(h,T,G){var se,me=T.width,ae=T.height,fe=T.channels;d(me>0&&me<=G.maxTextureSize&&ae>0&&ae<=G.maxTextureSize,"invalid texture shape"),(h.wrapS!==$t||h.wrapT!==$t)&&d(En(me)&&En(ae),"incompatible wrap mode for texture, both width and height must be power of 2"),T.mipmask===1?me!==1&&ae!==1&&d(h.minFilter!==Qt&&h.minFilter!==xr&&h.minFilter!==sr&&h.minFilter!==lr,"min filter requires mipmap"):(d(En(me)&&En(ae),"texture must be a square power of 2 to support mipmapping"),d(T.mipmask===(me<<1)-1,"missing or incomplete mipmap data")),T.type===kt&&(G.extensions.indexOf("oes_texture_float_linear")<0&&d(h.minFilter===Wt&&h.magFilter===Wt,"filter not supported, must enable oes_texture_float_linear"),d(!h.genMipmaps,"mipmap generation not supported with float textures"));var Le=T.images;for(se=0;se<16;++se)if(Le[se]){var De=me>>se,Ne=ae>>se;d(T.mipmask&1<<se,"missing mipmap data");var Ge=Le[se];if(d(Ge.width===De&&Ge.height===Ne,"invalid shape for mip images"),d(Ge.format===T.format&&Ge.internalformat===T.internalformat&&Ge.type===T.type,"incompatible type for mip image"),!Ge.compressed)if(Ge.data){var Be=Math.ceil(Tn(Ge.type,fe)*De/Ge.unpackAlignment)*Ge.unpackAlignment;d(Ge.data.byteLength===Be*Ne,"invalid data for image, buffer size is inconsistent with image format")}else Ge.element||Ge.copy}else h.genMipmaps||d((T.mipmask&1<<se)===0,"extra mipmap data");T.compressed&&d(!h.genMipmaps,"mipmap generation for compressed images not supported")}function an(h,T,G,se){var me=h.width,ae=h.height,fe=h.channels;d(me>0&&me<=se.maxTextureSize&&ae>0&&ae<=se.maxTextureSize,"invalid texture shape"),d(me===ae,"cube map must be square"),d(T.wrapS===$t&&T.wrapT===$t,"wrap mode not supported by cube map");for(var Le=0;Le<G.length;++Le){var De=G[Le];d(De.width===me&&De.height===ae,"inconsistent cube map face shape"),T.genMipmaps&&(d(!De.compressed,"can not generate mipmap for compressed textures"),d(De.mipmask===1,"can not specify mipmaps and generate mipmaps"));for(var Ne=De.images,Ge=0;Ge<16;++Ge){var Be=Ne[Ge];if(Be){var We=me>>Ge,Ce=ae>>Ge;d(De.mipmask&1<<Ge,"missing mipmap data"),d(Be.width===We&&Be.height===Ce,"invalid shape for mip images"),d(Be.format===h.format&&Be.internalformat===h.internalformat&&Be.type===h.type,"incompatible type for mip image"),Be.compressed||(Be.data?d(Be.data.byteLength===We*Ce*Math.max(Tn(Be.type,fe),Be.unpackAlignment),"invalid data for image, buffer size is inconsistent with image format"):Be.element||Be.copy)}}}}var E=o(d,{optional:Ze,raise:l,commandRaise:Re,command:Ot,parameter:M,commandParameter:bt,constructor:ue,type:U,commandType:Me,isTypedArray:B,nni:q,oneOf:D,shaderError:ut,linkError:it,callSite:F,saveCommandRef:st,saveDrawInfo:tt,framebufferFormat:St,guessCommand:P,texture2D:Jr,textureCube:an}),di=0,dn=0,zi=5,Nn=6;function Tr(h,T){this.id=di++,this.type=h,this.data=T}function Dn(h){return h.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function Bn(h){if(h.length===0)return[];var T=h.charAt(0),G=h.charAt(h.length-1);if(h.length>1&&T===G&&(T==='"'||T==="'"))return['"'+Dn(h.substr(1,h.length-2))+'"'];var se=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(h);if(se)return Bn(h.substr(0,se.index)).concat(Bn(se[1])).concat(Bn(h.substr(se.index+se[0].length)));var me=h.split(".");if(me.length===1)return['"'+Dn(h)+'"'];for(var ae=[],fe=0;fe<me.length;++fe)ae=ae.concat(Bn(me[fe]));return ae}function C(h){return"["+Bn(h).join("][")+"]"}function Ue(h,T){return new Tr(h,C(T+""))}function Xe(h){return typeof h=="function"&&!h._reglType||h instanceof Tr}function dt(h,T){if(typeof h=="function")return new Tr(dn,h);if(typeof h=="number"||typeof h=="boolean")return new Tr(zi,h);if(Array.isArray(h))return new Tr(Nn,h.map(function(G,se){return dt(G,T+"["+se+"]")}));if(h instanceof Tr)return h;E(!1,"invalid option type in uniform "+T)}var Z={DynamicVariable:Tr,define:Ue,isDynamic:Xe,unbox:dt,accessor:C},we={next:typeof requestAnimationFrame=="function"?function(h){return requestAnimationFrame(h)}:function(h){return setTimeout(h,16)},cancel:typeof cancelAnimationFrame=="function"?function(h){return cancelAnimationFrame(h)}:clearTimeout},m=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date};function He(){var h={"":0},T=[""];return{id:function(G){var se=h[G];return se||(se=h[G]=T.length,T.push(G),se)},str:function(G){return T[G]}}}function Nt(h,T,G){var se=document.createElement("canvas");o(se.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),h.appendChild(se),h===document.body&&(se.style.position="absolute",o(h.style,{margin:0,padding:0}));function me(){var Le=window.innerWidth,De=window.innerHeight;if(h!==document.body){var Ne=se.getBoundingClientRect();Le=Ne.right-Ne.left,De=Ne.bottom-Ne.top}se.width=G*Le,se.height=G*De}var ae;h!==document.body&&typeof ResizeObserver=="function"?(ae=new ResizeObserver(function(){setTimeout(me)}),ae.observe(h)):window.addEventListener("resize",me,!1);function fe(){ae?ae.disconnect():window.removeEventListener("resize",me),h.removeChild(se)}return me(),{canvas:se,onDestroy:fe}}function u(h,T){function G(se){try{return h.getContext(se,T)}catch{return null}}return G("webgl")||G("experimental-webgl")||G("webgl-experimental")}function de(h){return typeof h.nodeName=="string"&&typeof h.appendChild=="function"&&typeof h.getBoundingClientRect=="function"}function ye(h){return typeof h.drawArrays=="function"||typeof h.drawElements=="function"}function w(h){return typeof h=="string"?h.split():(E(Array.isArray(h),"invalid extension array"),h)}function V(h){return typeof h=="string"?(E(typeof document<"u","not supported outside of DOM"),document.querySelector(h)):h}function ce(h){var T=h||{},G,se,me,ae,fe={},Le=[],De=[],Ne=typeof window>"u"?1:window.devicePixelRatio,Ge=!1,Be=function(ke){ke&&E.raise(ke)},We=function(){};if(typeof T=="string"?(E(typeof document<"u","selector queries only supported in DOM enviroments"),G=document.querySelector(T),E(G,"invalid query string for element")):typeof T=="object"?de(T)?G=T:ye(T)?(ae=T,me=ae.canvas):(E.constructor(T),"gl"in T?ae=T.gl:"canvas"in T?me=V(T.canvas):"container"in T&&(se=V(T.container)),"attributes"in T&&(fe=T.attributes,E.type(fe,"object","invalid context attributes")),"extensions"in T&&(Le=w(T.extensions)),"optionalExtensions"in T&&(De=w(T.optionalExtensions)),"onDone"in T&&(E.type(T.onDone,"function","invalid or missing onDone callback"),Be=T.onDone),"profile"in T&&(Ge=!!T.profile),"pixelRatio"in T&&(Ne=+T.pixelRatio,E(Ne>0,"invalid pixel ratio"))):E.raise("invalid arguments to regl"),G&&(G.nodeName.toLowerCase()==="canvas"?me=G:se=G),!ae){if(!me){E(typeof document<"u","must manually specify webgl context outside of DOM environments");var Ce=Nt(se||document.body,Be,Ne);if(!Ce)return null;me=Ce.canvas,We=Ce.onDestroy}fe.premultipliedAlpha===void 0&&(fe.premultipliedAlpha=!0),ae=u(me,fe)}return ae?{gl:ae,canvas:me,container:se,extensions:Le,optionalExtensions:De,pixelRatio:Ne,profile:Ge,onDone:Be,onDestroy:We}:(We(),Be("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function Et(h,T){var G={};function se(fe){E.type(fe,"string","extension name must be string");var Le=fe.toLowerCase(),De;try{De=G[Le]=h.getExtension(Le)}catch{}return!!De}for(var me=0;me<T.extensions.length;++me){var ae=T.extensions[me];if(!se(ae))return T.onDestroy(),T.onDone('"'+ae+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return T.optionalExtensions.forEach(se),{extensions:G,restore:function(){Object.keys(G).forEach(function(fe){if(G[fe]&&!se(fe))throw new Error("(regl): error restoring extension "+fe)})}}}function at(h,T){for(var G=Array(h),se=0;se<h;++se)G[se]=T(se);return G}var mt=5120,ur=5121,vi=5122,kr=5123,dr=5124,Yr=5125,vn=5126;function Ln(h){for(var T=16;T<=1<<28;T*=16)if(h<=T)return T;return 0}function Ia(h){var T,G;return T=(h>65535)<<4,h>>>=T,G=(h>255)<<3,h>>>=G,T|=G,G=(h>15)<<2,h>>>=G,T|=G,G=(h>3)<<1,h>>>=G,T|=G,T|h>>1}function Fa(){var h=at(8,function(){return[]});function T(ae){var fe=Ln(ae),Le=h[Ia(fe)>>2];return Le.length>0?Le.pop():new ArrayBuffer(fe)}function G(ae){h[Ia(ae.byteLength)>>2].push(ae)}function se(ae,fe){var Le=null;switch(ae){case mt:Le=new Int8Array(T(fe),0,fe);break;case ur:Le=new Uint8Array(T(fe),0,fe);break;case vi:Le=new Int16Array(T(2*fe),0,fe);break;case kr:Le=new Uint16Array(T(2*fe),0,fe);break;case dr:Le=new Int32Array(T(4*fe),0,fe);break;case Yr:Le=new Uint32Array(T(4*fe),0,fe);break;case vn:Le=new Float32Array(T(4*fe),0,fe);break;default:return null}return Le.length!==fe?Le.subarray(0,fe):Le}function me(ae){G(ae.buffer)}return{alloc:T,free:G,allocType:se,freeType:me}}var jt=Fa();jt.zero=Fa();var Wn=3408,on=3410,_i=3411,Xn=3412,Ws=3413,kh=3414,Ph=3415,Nh=33901,Bh=33902,Gh=3379,Vs=3386,Uh=34921,$s=36347,Yh=36348,Hh=35661,zh=35660,Eu=34930,Du=36349,Lu=34076,Wh=34024,Vh=7936,$h=7937,Zh=7938,Ru=35724,Cu=34047,Ou=36063,qf=34852,Zs=3553,Kf=34067,Xs=34069,Mu=33984,Jo=6408,qs=5126,jf=5121,es=36160,Xh=36053,Iu=36064,Qf=16384,Jf=function(h,T){var G=1;T.ext_texture_filter_anisotropic&&(G=h.getParameter(Cu));var se=1,me=1;T.webgl_draw_buffers&&(se=h.getParameter(qf),me=h.getParameter(Ou));var ae=!!T.oes_texture_float;if(ae){var fe=h.createTexture();h.bindTexture(Zs,fe),h.texImage2D(Zs,0,Jo,1,1,0,Jo,qs,null);var Le=h.createFramebuffer();if(h.bindFramebuffer(es,Le),h.framebufferTexture2D(es,Iu,Zs,fe,0),h.bindTexture(Zs,null),h.checkFramebufferStatus(es)!==Xh)ae=!1;else{h.viewport(0,0,1,1),h.clearColor(1,0,0,1),h.clear(Qf);var De=jt.allocType(qs,4);h.readPixels(0,0,1,1,Jo,qs,De),h.getError()?ae=!1:(h.deleteFramebuffer(Le),h.deleteTexture(fe),ae=De[0]===1),jt.freeType(De)}}var Ne=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Ge=!0;if(!Ne){var Be=h.createTexture(),We=jt.allocType(jf,36);h.activeTexture(Mu),h.bindTexture(Kf,Be),h.texImage2D(Xs,0,Jo,3,3,0,Jo,jf,We),jt.freeType(We),h.bindTexture(Kf,null),h.deleteTexture(Be),Ge=!h.getError()}return{colorBits:[h.getParameter(on),h.getParameter(_i),h.getParameter(Xn),h.getParameter(Ws)],depthBits:h.getParameter(kh),stencilBits:h.getParameter(Ph),subpixelBits:h.getParameter(Wn),extensions:Object.keys(T).filter(function(Ce){return!!T[Ce]}),maxAnisotropic:G,maxDrawbuffers:se,maxColorAttachments:me,pointSizeDims:h.getParameter(Nh),lineWidthDims:h.getParameter(Bh),maxViewportDims:h.getParameter(Vs),maxCombinedTextureUnits:h.getParameter(Hh),maxCubeMapSize:h.getParameter(Lu),maxRenderbufferSize:h.getParameter(Wh),maxTextureUnits:h.getParameter(Eu),maxTextureSize:h.getParameter(Gh),maxAttributes:h.getParameter(Uh),maxVertexUniforms:h.getParameter($s),maxVertexTextureUnits:h.getParameter(zh),maxVaryingVectors:h.getParameter(Yh),maxFragmentUniforms:h.getParameter(Du),glsl:h.getParameter(Ru),renderer:h.getParameter($h),vendor:h.getParameter(Vh),version:h.getParameter(Zh),readFloat:ae,npotTextureCube:Ge}};function Rn(h){return!!h&&typeof h=="object"&&Array.isArray(h.shape)&&Array.isArray(h.stride)&&typeof h.offset=="number"&&h.shape.length===h.stride.length&&(Array.isArray(h.data)||i(h.data))}var Vn=function(h){return Object.keys(h).map(function(T){return h[T]})},ts={shape:Kh,flatten:ku};function qh(h,T,G){for(var se=0;se<T;++se)G[se]=h[se]}function Fu(h,T,G,se){for(var me=0,ae=0;ae<T;++ae)for(var fe=h[ae],Le=0;Le<G;++Le)se[me++]=fe[Le]}function el(h,T,G,se,me,ae){for(var fe=ae,Le=0;Le<T;++Le)for(var De=h[Le],Ne=0;Ne<G;++Ne)for(var Ge=De[Ne],Be=0;Be<se;++Be)me[fe++]=Ge[Be]}function tl(h,T,G,se,me){for(var ae=1,fe=G+1;fe<T.length;++fe)ae*=T[fe];var Le=T[G];if(T.length-G===4){var De=T[G+1],Ne=T[G+2],Ge=T[G+3];for(fe=0;fe<Le;++fe)el(h[fe],De,Ne,Ge,se,me),me+=ae}else for(fe=0;fe<Le;++fe)tl(h[fe],T,G+1,se,me),me+=ae}function ku(h,T,G,se){var me=1;if(T.length)for(var ae=0;ae<T.length;++ae)me*=T[ae];else me=0;var fe=se||jt.allocType(G,me);switch(T.length){case 0:break;case 1:qh(h,T[0],fe);break;case 2:Fu(h,T[0],T[1],fe);break;case 3:el(h,T[0],T[1],T[2],fe,0);break;default:tl(h,T,0,fe,0)}return fe}function Kh(h){for(var T=[],G=h;G.length;G=G[0])T.push(G.length);return T}var rl={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},jh=5120,Pu=5122,Qh=5124,Jh=5121,ed=5123,td=5125,nl=5126,rd=5126,ka={int8:jh,int16:Pu,int32:Qh,uint8:Jh,uint16:ed,uint32:td,float:nl,float32:rd},nd=35048,id=35040,Ks={dynamic:nd,stream:id,static:35044},Cr=ts.flatten,Or=ts.shape,Nu=35044,ad=35040,il=5121,al=5126,fa=[];fa[5120]=1,fa[5122]=2,fa[5124]=4,fa[5121]=1,fa[5123]=2,fa[5125]=4,fa[5126]=4;function js(h){return rl[Object.prototype.toString.call(h)]|0}function ol(h,T){for(var G=0;G<T.length;++G)h[G]=T[G]}function Bu(h,T,G,se,me,ae,fe){for(var Le=0,De=0;De<G;++De)for(var Ne=0;Ne<se;++Ne)h[Le++]=T[me*De+ae*Ne+fe]}function xn(h,T,G,se){var me=0,ae={};function fe(K){this.id=me++,this.buffer=h.createBuffer(),this.type=K,this.usage=Nu,this.byteLength=0,this.dimension=1,this.dtype=il,this.persistentData=null,G.profile&&(this.stats={size:0})}fe.prototype.bind=function(){h.bindBuffer(this.type,this.buffer)},fe.prototype.destroy=function(){We(this)};var Le=[];function De(K,oe){var Oe=Le.pop();return Oe||(Oe=new fe(K)),Oe.bind(),Be(Oe,oe,ad,0,1,!1),Oe}function Ne(K){Le.push(K)}function Ge(K,oe,Oe){K.byteLength=oe.byteLength,h.bufferData(K.type,oe,Oe)}function Be(K,oe,Oe,rt,Se,Qe){var je;if(K.usage=Oe,Array.isArray(oe)){if(K.dtype=rt||al,oe.length>0){var pt;if(Array.isArray(oe[0])){je=Or(oe);for(var be=1,ge=1;ge<je.length;++ge)be*=je[ge];K.dimension=be,pt=Cr(oe,je,K.dtype),Ge(K,pt,Oe),Qe?K.persistentData=pt:jt.freeType(pt)}else if(typeof oe[0]=="number"){K.dimension=Se;var lt=jt.allocType(K.dtype,oe.length);ol(lt,oe),Ge(K,lt,Oe),Qe?K.persistentData=lt:jt.freeType(lt)}else i(oe[0])?(K.dimension=oe[0].length,K.dtype=rt||js(oe[0])||al,pt=Cr(oe,[oe.length,oe[0].length],K.dtype),Ge(K,pt,Oe),Qe?K.persistentData=pt:jt.freeType(pt)):E.raise("invalid buffer data")}}else if(i(oe))K.dtype=rt||js(oe),K.dimension=Se,Ge(K,oe,Oe),Qe&&(K.persistentData=new Uint8Array(new Uint8Array(oe.buffer)));else if(Rn(oe)){je=oe.shape;var Ve=oe.stride,Ie=oe.offset,$e=0,qe=0,Mt=0,Lt=0;je.length===1?($e=je[0],qe=1,Mt=Ve[0],Lt=0):je.length===2?($e=je[0],qe=je[1],Mt=Ve[0],Lt=Ve[1]):E.raise("invalid shape"),K.dtype=rt||js(oe.data)||al,K.dimension=qe;var Ke=jt.allocType(K.dtype,$e*qe);Bu(Ke,oe.data,$e,qe,Mt,Lt,Ie),Ge(K,Ke,Oe),Qe?K.persistentData=Ke:jt.freeType(Ke)}else oe instanceof ArrayBuffer?(K.dtype=il,K.dimension=Se,Ge(K,oe,Oe),Qe&&(K.persistentData=new Uint8Array(new Uint8Array(oe)))):E.raise("invalid buffer data")}function We(K){T.bufferCount--,se(K);var oe=K.buffer;E(oe,"buffer must not be deleted already"),h.deleteBuffer(oe),K.buffer=null,delete ae[K.id]}function Ce(K,oe,Oe,rt){T.bufferCount++;var Se=new fe(oe);ae[Se.id]=Se;function Qe(be){var ge=Nu,lt=null,Ve=0,Ie=0,$e=1;return Array.isArray(be)||i(be)||Rn(be)||be instanceof ArrayBuffer?lt=be:typeof be=="number"?Ve=be|0:be&&(E.type(be,"object","buffer arguments must be an object, a number or an array"),"data"in be&&(E(lt===null||Array.isArray(lt)||i(lt)||Rn(lt),"invalid data for buffer"),lt=be.data),"usage"in be&&(E.parameter(be.usage,Ks,"invalid buffer usage"),ge=Ks[be.usage]),"type"in be&&(E.parameter(be.type,ka,"invalid buffer type"),Ie=ka[be.type]),"dimension"in be&&(E.type(be.dimension,"number","invalid dimension"),$e=be.dimension|0),"length"in be&&(E.nni(Ve,"buffer length must be a nonnegative integer"),Ve=be.length|0)),Se.bind(),lt?Be(Se,lt,ge,Ie,$e,rt):(Ve&&h.bufferData(Se.type,Ve,ge),Se.dtype=Ie||il,Se.usage=ge,Se.dimension=$e,Se.byteLength=Ve),G.profile&&(Se.stats.size=Se.byteLength*fa[Se.dtype]),Qe}function je(be,ge){E(ge+be.byteLength<=Se.byteLength,"invalid buffer subdata call, buffer is too small. Can't write data of size "+be.byteLength+" starting from offset "+ge+" to a buffer of size "+Se.byteLength),h.bufferSubData(Se.type,ge,be)}function pt(be,ge){var lt=(ge||0)|0,Ve;if(Se.bind(),i(be)||be instanceof ArrayBuffer)je(be,lt);else if(Array.isArray(be)){if(be.length>0)if(typeof be[0]=="number"){var Ie=jt.allocType(Se.dtype,be.length);ol(Ie,be),je(Ie,lt),jt.freeType(Ie)}else if(Array.isArray(be[0])||i(be[0])){Ve=Or(be);var $e=Cr(be,Ve,Se.dtype);je($e,lt),jt.freeType($e)}else E.raise("invalid buffer data")}else if(Rn(be)){Ve=be.shape;var qe=be.stride,Mt=0,Lt=0,Ke=0,Je=0;Ve.length===1?(Mt=Ve[0],Lt=1,Ke=qe[0],Je=0):Ve.length===2?(Mt=Ve[0],Lt=Ve[1],Ke=qe[0],Je=qe[1]):E.raise("invalid shape");var wt=Array.isArray(be.data)?Se.dtype:js(be.data),Ct=jt.allocType(wt,Mt*Lt);Bu(Ct,be.data,Mt,Lt,Ke,Je,be.offset),je(Ct,lt),jt.freeType(Ct)}else E.raise("invalid data for buffer subdata");return Qe}return Oe||Qe(K),Qe._reglType="buffer",Qe._buffer=Se,Qe.subdata=pt,G.profile&&(Qe.stats=Se.stats),Qe.destroy=function(){We(Se)},Qe}function ke(){Vn(ae).forEach(function(K){K.buffer=h.createBuffer(),h.bindBuffer(K.type,K.buffer),h.bufferData(K.type,K.persistentData||K.byteLength,K.usage)})}return G.profile&&(T.getTotalBufferSize=function(){var K=0;return Object.keys(ae).forEach(function(oe){K+=ae[oe].stats.size}),K}),{create:Ce,createStream:De,destroyStream:Ne,clear:function(){Vn(ae).forEach(We),Le.forEach(We)},getBuffer:function(K){return K&&K._buffer instanceof fe?K._buffer:null},restore:ke,_initBuffer:Be}}var sl=0,Pa=0,Gu=1,fl=1,ti=4,Uu=4,Wi={points:sl,point:Pa,lines:Gu,line:fl,triangles:ti,triangle:Uu,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Yu=0,Hu=1,bo=4,zu=5120,_n=5121,Wu=5122,wn=5123,Vu=5124,la=5125,Oi=34963,Qs=35040,ll=35044;function Br(h,T,G,se){var me={},ae=0,fe={uint8:_n,uint16:wn};T.oes_element_index_uint&&(fe.uint32=la);function Le(ke){this.id=ae++,me[this.id]=this,this.buffer=ke,this.primType=bo,this.vertCount=0,this.type=0}Le.prototype.bind=function(){this.buffer.bind()};var De=[];function Ne(ke){var K=De.pop();return K||(K=new Le(G.create(null,Oi,!0,!1)._buffer)),Be(K,ke,Qs,-1,-1,0,0),K}function Ge(ke){De.push(ke)}function Be(ke,K,oe,Oe,rt,Se,Qe){ke.buffer.bind();var je;if(K){var pt=Qe;!Qe&&(!i(K)||Rn(K)&&!i(K.data))&&(pt=T.oes_element_index_uint?la:wn),G._initBuffer(ke.buffer,K,oe,pt,3)}else h.bufferData(Oi,Se,oe),ke.buffer.dtype=je||_n,ke.buffer.usage=oe,ke.buffer.dimension=3,ke.buffer.byteLength=Se;if(je=Qe,!Qe){switch(ke.buffer.dtype){case _n:case zu:je=_n;break;case wn:case Wu:je=wn;break;case la:case Vu:je=la;break;default:E.raise("unsupported type for element array")}ke.buffer.dtype=je}ke.type=je,E(je!==la||!!T.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var be=rt;be<0&&(be=ke.buffer.byteLength,je===wn?be>>=1:je===la&&(be>>=2)),ke.vertCount=be;var ge=Oe;if(Oe<0){ge=bo;var lt=ke.buffer.dimension;lt===1&&(ge=Yu),lt===2&&(ge=Hu),lt===3&&(ge=bo)}ke.primType=ge}function We(ke){se.elementsCount--,E(ke.buffer!==null,"must not double destroy elements"),delete me[ke.id],ke.buffer.destroy(),ke.buffer=null}function Ce(ke,K){var oe=G.create(null,Oi,!0),Oe=new Le(oe._buffer);se.elementsCount++;function rt(Se){if(!Se)oe(),Oe.primType=bo,Oe.vertCount=0,Oe.type=_n;else if(typeof Se=="number")oe(Se),Oe.primType=bo,Oe.vertCount=Se|0,Oe.type=_n;else{var Qe=null,je=ll,pt=-1,be=-1,ge=0,lt=0;Array.isArray(Se)||i(Se)||Rn(Se)?Qe=Se:(E.type(Se,"object","invalid arguments for elements"),"data"in Se&&(Qe=Se.data,E(Array.isArray(Qe)||i(Qe)||Rn(Qe),"invalid data for element buffer")),"usage"in Se&&(E.parameter(Se.usage,Ks,"invalid element buffer usage"),je=Ks[Se.usage]),"primitive"in Se&&(E.parameter(Se.primitive,Wi,"invalid element buffer primitive"),pt=Wi[Se.primitive]),"count"in Se&&(E(typeof Se.count=="number"&&Se.count>=0,"invalid vertex count for elements"),be=Se.count|0),"type"in Se&&(E.parameter(Se.type,fe,"invalid buffer type"),lt=fe[Se.type]),"length"in Se?ge=Se.length|0:(ge=be,lt===wn||lt===Wu?ge*=2:(lt===la||lt===Vu)&&(ge*=4))),Be(Oe,Qe,je,pt,be,ge,lt)}return rt}return rt(ke),rt._reglType="elements",rt._elements=Oe,rt.subdata=function(Se,Qe){return oe.subdata(Se,Qe),rt},rt.destroy=function(){We(Oe)},rt}return{create:Ce,createStream:Ne,destroyStream:Ge,getElements:function(ke){return typeof ke=="function"&&ke._elements instanceof Le?ke._elements:null},clear:function(){Vn(me).forEach(We)}}}var Vi=new Float32Array(1),ul=new Uint32Array(Vi.buffer),od=5123;function Js(h){for(var T=jt.allocType(od,h.length),G=0;G<h.length;++G)if(isNaN(h[G]))T[G]=65535;else if(h[G]===1/0)T[G]=31744;else if(h[G]===-1/0)T[G]=64512;else{Vi[0]=h[G];var se=ul[0],me=se>>>31<<15,ae=(se<<1>>>24)-127,fe=se>>13&(1<<10)-1;if(ae<-24)T[G]=me;else if(ae<-14){var Le=-14-ae;T[G]=me+(fe+(1<<10)>>Le)}else ae>15?T[G]=me+31744:T[G]=me+(ae+15<<10)+fe}return T}function Pr(h){return Array.isArray(h)||i(h)}var $u=function(h){return!(h&h-1)&&!!h},sd=34467,pi=3553,xo=34067,$i=34069,Na=6408,ef=6406,rs=6407,Ba=6409,wo=6410,cl=32854,hl=32855,tf=36194,dl=32819,fd=32820,Zu=33635,qn=34042,ns=6402,ua=34041,rf=35904,nf=35906,So=36193,vl=33776,_l=33777,pl=33778,ml=33779,Ga=35986,Xu=35987,qu=34798,af=35840,gl=35841,Zi=35842,is=35843,Ku=36196,Ao=5121,yl=5123,ca=5125,Gn=5126,ju=10242,ld=10243,ud=10497,bl=33071,cd=33648,hd=10240,To=10241,te=9728,Ee=9729,ve=9984,gt=9985,Zt=9986,mr=9987,sn=33170,Er=4352,xl=4353,dd=4354,ri=34046,of=3317,vd=37440,Eo=37441,sf=37443,as=37444,gr=33984,_d=[ve,Zt,gt,mr],os=[0,Ba,wo,rs,Na],Un={};Un[Ba]=Un[ef]=Un[ns]=1,Un[ua]=Un[wo]=2,Un[rs]=Un[rf]=3,Un[Na]=Un[nf]=4;function Do(h){return"[object "+h+"]"}var Qu=Do("HTMLCanvasElement"),Ju=Do("OffscreenCanvas"),ss=Do("CanvasRenderingContext2D"),Xi=Do("ImageBitmap"),fs=Do("HTMLImageElement"),wl=Do("HTMLVideoElement"),ff=Object.keys(rl).concat([Qu,Ju,ss,Xi,fs,wl]),Ua=[];Ua[Ao]=1,Ua[Gn]=4,Ua[So]=2,Ua[yl]=2,Ua[ca]=4;var fn=[];fn[cl]=2,fn[hl]=2,fn[tf]=2,fn[ua]=4,fn[vl]=.5,fn[_l]=.5,fn[pl]=1,fn[ml]=1,fn[Ga]=.5,fn[Xu]=1,fn[qu]=1,fn[af]=.5,fn[gl]=.25,fn[Zi]=.5,fn[is]=.25,fn[Ku]=.5;function ls(h){return Array.isArray(h)&&(h.length===0||typeof h[0]=="number")}function Sl(h){if(!Array.isArray(h))return!1;var T=h.length;return!(T===0||!Pr(h[0]))}function mi(h){return Object.prototype.toString.call(h)}function ha(h){return mi(h)===Qu}function us(h){return mi(h)===Ju}function pd(h){return mi(h)===ss}function md(h){return mi(h)===Xi}function gd(h){return mi(h)===fs}function lf(h){return mi(h)===wl}function Lo(h){if(!h)return!1;var T=mi(h);return ff.indexOf(T)>=0?!0:ls(h)||Sl(h)||Rn(h)}function uf(h){return rl[Object.prototype.toString.call(h)]|0}function yd(h,T){var G=T.length;switch(h.type){case Ao:case yl:case ca:case Gn:var se=jt.allocType(h.type,G);se.set(T),h.data=se;break;case So:h.data=Js(T);break;default:E.raise("unsupported texture type, must specify a typed array")}}function Al(h,T){return jt.allocType(h.type===So?Gn:h.type,T)}function ec(h,T){h.type===So?(h.data=Js(T),jt.freeType(T)):h.data=T}function bd(h,T,G,se,me,ae){for(var fe=h.width,Le=h.height,De=h.channels,Ne=fe*Le*De,Ge=Al(h,Ne),Be=0,We=0;We<Le;++We)for(var Ce=0;Ce<fe;++Ce)for(var ke=0;ke<De;++ke)Ge[Be++]=T[G*Ce+se*We+me*ke+ae];ec(h,Ge)}function Xr(h,T,G,se,me,ae){var fe;if(typeof fn[h]<"u"?fe=fn[h]:fe=Un[h]*Ua[T],ae&&(fe*=6),me){for(var Le=0,De=G;De>=1;)Le+=fe*De*De,De/=2;return Le}else return fe*G*se}function Cn(h,T,G,se,me,ae,fe){var Le={"don't care":Er,"dont care":Er,nice:dd,fast:xl},De={repeat:ud,clamp:bl,mirror:cd},Ne={nearest:te,linear:Ee},Ge=o({mipmap:mr,"nearest mipmap nearest":ve,"linear mipmap nearest":gt,"nearest mipmap linear":Zt,"linear mipmap linear":mr},Ne),Be={none:0,browser:as},We={uint8:Ao,rgba4:dl,rgb565:Zu,"rgb5 a1":fd},Ce={alpha:ef,luminance:Ba,"luminance alpha":wo,rgb:rs,rgba:Na,rgba4:cl,"rgb5 a1":hl,rgb565:tf},ke={};T.ext_srgb&&(Ce.srgb=rf,Ce.srgba=nf),T.oes_texture_float&&(We.float32=We.float=Gn),T.oes_texture_half_float&&(We.float16=We["half float"]=So),T.webgl_depth_texture&&(o(Ce,{depth:ns,"depth stencil":ua}),o(We,{uint16:yl,uint32:ca,"depth stencil":qn})),T.webgl_compressed_texture_s3tc&&o(ke,{"rgb s3tc dxt1":vl,"rgba s3tc dxt1":_l,"rgba s3tc dxt3":pl,"rgba s3tc dxt5":ml}),T.webgl_compressed_texture_atc&&o(ke,{"rgb atc":Ga,"rgba atc explicit alpha":Xu,"rgba atc interpolated alpha":qu}),T.webgl_compressed_texture_pvrtc&&o(ke,{"rgb pvrtc 4bppv1":af,"rgb pvrtc 2bppv1":gl,"rgba pvrtc 4bppv1":Zi,"rgba pvrtc 2bppv1":is}),T.webgl_compressed_texture_etc1&&(ke["rgb etc1"]=Ku);var K=Array.prototype.slice.call(h.getParameter(sd));Object.keys(ke).forEach(function(k){var le=ke[k];K.indexOf(le)>=0&&(Ce[k]=le)});var oe=Object.keys(Ce);G.textureFormats=oe;var Oe=[];Object.keys(Ce).forEach(function(k){var le=Ce[k];Oe[le]=k});var rt=[];Object.keys(We).forEach(function(k){var le=We[k];rt[le]=k});var Se=[];Object.keys(Ne).forEach(function(k){var le=Ne[k];Se[le]=k});var Qe=[];Object.keys(Ge).forEach(function(k){var le=Ge[k];Qe[le]=k});var je=[];Object.keys(De).forEach(function(k){var le=De[k];je[le]=k});var pt=oe.reduce(function(k,le){var ne=Ce[le];return ne===Ba||ne===ef||ne===Ba||ne===wo||ne===ns||ne===ua||T.ext_srgb&&(ne===rf||ne===nf)?k[ne]=ne:ne===hl||le.indexOf("rgba")>=0?k[ne]=Na:k[ne]=rs,k},{});function be(){this.internalformat=Na,this.format=Na,this.type=Ao,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=as,this.width=0,this.height=0,this.channels=0}function ge(k,le){k.internalformat=le.internalformat,k.format=le.format,k.type=le.type,k.compressed=le.compressed,k.premultiplyAlpha=le.premultiplyAlpha,k.flipY=le.flipY,k.unpackAlignment=le.unpackAlignment,k.colorSpace=le.colorSpace,k.width=le.width,k.height=le.height,k.channels=le.channels}function lt(k,le){if(!(typeof le!="object"||!le)){if("premultiplyAlpha"in le&&(E.type(le.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),k.premultiplyAlpha=le.premultiplyAlpha),"flipY"in le&&(E.type(le.flipY,"boolean","invalid texture flip"),k.flipY=le.flipY),"alignment"in le&&(E.oneOf(le.alignment,[1,2,4,8],"invalid texture unpack alignment"),k.unpackAlignment=le.alignment),"colorSpace"in le&&(E.parameter(le.colorSpace,Be,"invalid colorSpace"),k.colorSpace=Be[le.colorSpace]),"type"in le){var ne=le.type;E(T.oes_texture_float||!(ne==="float"||ne==="float32"),"you must enable the OES_texture_float extension in order to use floating point textures."),E(T.oes_texture_half_float||!(ne==="half float"||ne==="float16"),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),E(T.webgl_depth_texture||!(ne==="uint16"||ne==="uint32"||ne==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),E.parameter(ne,We,"invalid texture type"),k.type=We[ne]}var ft=k.width,zt=k.height,R=k.channels,y=!1;"shape"in le?(E(Array.isArray(le.shape)&&le.shape.length>=2,"shape must be an array"),ft=le.shape[0],zt=le.shape[1],le.shape.length===3&&(R=le.shape[2],E(R>0&&R<=4,"invalid number of channels"),y=!0),E(ft>=0&&ft<=G.maxTextureSize,"invalid width"),E(zt>=0&&zt<=G.maxTextureSize,"invalid height")):("radius"in le&&(ft=zt=le.radius,E(ft>=0&&ft<=G.maxTextureSize,"invalid radius")),"width"in le&&(ft=le.width,E(ft>=0&&ft<=G.maxTextureSize,"invalid width")),"height"in le&&(zt=le.height,E(zt>=0&&zt<=G.maxTextureSize,"invalid height")),"channels"in le&&(R=le.channels,E(R>0&&R<=4,"invalid number of channels"),y=!0)),k.width=ft|0,k.height=zt|0,k.channels=R|0;var H=!1;if("format"in le){var j=le.format;E(T.webgl_depth_texture||!(j==="depth"||j==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),E.parameter(j,Ce,"invalid texture format");var Q=k.internalformat=Ce[j];k.format=pt[Q],j in We&&("type"in le||(k.type=We[j])),j in ke&&(k.compressed=!0),H=!0}!y&&H?k.channels=Un[k.format]:y&&!H?k.channels!==os[k.format]&&(k.format=k.internalformat=os[k.channels]):H&&y&&E(k.channels===Un[k.format],"number of channels inconsistent with specified format")}}function Ve(k){h.pixelStorei(vd,k.flipY),h.pixelStorei(Eo,k.premultiplyAlpha),h.pixelStorei(sf,k.colorSpace),h.pixelStorei(of,k.unpackAlignment)}function Ie(){be.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function $e(k,le){var ne=null;if(Lo(le)?ne=le:le&&(E.type(le,"object","invalid pixel data type"),lt(k,le),"x"in le&&(k.xOffset=le.x|0),"y"in le&&(k.yOffset=le.y|0),Lo(le.data)&&(ne=le.data)),E(!k.compressed||ne instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),le.copy){E(!ne,"can not specify copy and data field for the same texture");var ft=me.viewportWidth,zt=me.viewportHeight;k.width=k.width||ft-k.xOffset,k.height=k.height||zt-k.yOffset,k.needsCopy=!0,E(k.xOffset>=0&&k.xOffset<ft&&k.yOffset>=0&&k.yOffset<zt&&k.width>0&&k.width<=ft&&k.height>0&&k.height<=zt,"copy texture read out of bounds")}else if(!ne)k.width=k.width||1,k.height=k.height||1,k.channels=k.channels||4;else if(i(ne))k.channels=k.channels||4,k.data=ne,!("type"in le)&&k.type===Ao&&(k.type=uf(ne));else if(ls(ne))k.channels=k.channels||4,yd(k,ne),k.alignment=1,k.needsFree=!0;else if(Rn(ne)){var R=ne.data;!Array.isArray(R)&&k.type===Ao&&(k.type=uf(R));var y=ne.shape,H=ne.stride,j,Q,W,Y,X,O;y.length===3?(W=y[2],O=H[2]):(E(y.length===2,"invalid ndarray pixel data, must be 2 or 3D"),W=1,O=1),j=y[0],Q=y[1],Y=H[0],X=H[1],k.alignment=1,k.width=j,k.height=Q,k.channels=W,k.format=k.internalformat=os[W],k.needsFree=!0,bd(k,R,Y,X,O,ne.offset)}else if(ha(ne)||us(ne)||pd(ne))ha(ne)||us(ne)?k.element=ne:k.element=ne.canvas,k.width=k.element.width,k.height=k.element.height,k.channels=4;else if(md(ne))k.element=ne,k.width=ne.width,k.height=ne.height,k.channels=4;else if(gd(ne))k.element=ne,k.width=ne.naturalWidth,k.height=ne.naturalHeight,k.channels=4;else if(lf(ne))k.element=ne,k.width=ne.videoWidth,k.height=ne.videoHeight,k.channels=4;else if(Sl(ne)){var N=k.width||ne[0].length,I=k.height||ne.length,re=k.channels;Pr(ne[0][0])?re=re||ne[0][0].length:re=re||1;for(var ee=ts.shape(ne),_e=1,xe=0;xe<ee.length;++xe)_e*=ee[xe];var Ye=Al(k,_e);ts.flatten(ne,ee,"",Ye),ec(k,Ye),k.alignment=1,k.width=N,k.height=I,k.channels=re,k.format=k.internalformat=os[re],k.needsFree=!0}k.type===Gn?E(G.extensions.indexOf("oes_texture_float")>=0,"oes_texture_float extension not enabled"):k.type===So&&E(G.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function qe(k,le,ne){var ft=k.element,zt=k.data,R=k.internalformat,y=k.format,H=k.type,j=k.width,Q=k.height;Ve(k),ft?h.texImage2D(le,ne,y,y,H,ft):k.compressed?h.compressedTexImage2D(le,ne,R,j,Q,0,zt):k.needsCopy?(se(),h.copyTexImage2D(le,ne,y,k.xOffset,k.yOffset,j,Q,0)):h.texImage2D(le,ne,y,j,Q,0,y,H,zt||null)}function Mt(k,le,ne,ft,zt){var R=k.element,y=k.data,H=k.internalformat,j=k.format,Q=k.type,W=k.width,Y=k.height;Ve(k),R?h.texSubImage2D(le,zt,ne,ft,j,Q,R):k.compressed?h.compressedTexSubImage2D(le,zt,ne,ft,H,W,Y,y):k.needsCopy?(se(),h.copyTexSubImage2D(le,zt,ne,ft,k.xOffset,k.yOffset,W,Y)):h.texSubImage2D(le,zt,ne,ft,W,Y,j,Q,y)}var Lt=[];function Ke(){return Lt.pop()||new Ie}function Je(k){k.needsFree&&jt.freeType(k.data),Ie.call(k),Lt.push(k)}function wt(){be.call(this),this.genMipmaps=!1,this.mipmapHint=Er,this.mipmask=0,this.images=Array(16)}function Ct(k,le,ne){var ft=k.images[0]=Ke();k.mipmask=1,ft.width=k.width=le,ft.height=k.height=ne,ft.channels=k.channels=4}function Vt(k,le){var ne=null;if(Lo(le))ne=k.images[0]=Ke(),ge(ne,k),$e(ne,le),k.mipmask=1;else if(lt(k,le),Array.isArray(le.mipmap))for(var ft=le.mipmap,zt=0;zt<ft.length;++zt)ne=k.images[zt]=Ke(),ge(ne,k),ne.width>>=zt,ne.height>>=zt,$e(ne,ft[zt]),k.mipmask|=1<<zt;else ne=k.images[0]=Ke(),ge(ne,k),$e(ne,le),k.mipmask=1;ge(k,k.images[0]),k.compressed&&(k.internalformat===vl||k.internalformat===_l||k.internalformat===pl||k.internalformat===ml)&&E(k.width%4===0&&k.height%4===0,"for compressed texture formats, mipmap level 0 must have width and height that are a multiple of 4")}function Mr(k,le){for(var ne=k.images,ft=0;ft<ne.length;++ft){if(!ne[ft])return;qe(ne[ft],le,ft)}}var Lr=[];function Xt(){var k=Lr.pop()||new wt;be.call(k),k.mipmask=0;for(var le=0;le<16;++le)k.images[le]=null;return k}function Dr(k){for(var le=k.images,ne=0;ne<le.length;++ne)le[ne]&&Je(le[ne]),le[ne]=null;Lr.push(k)}function pr(){this.minFilter=te,this.magFilter=te,this.wrapS=bl,this.wrapT=bl,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=Er}function qr(k,le){if("min"in le){var ne=le.min;E.parameter(ne,Ge),k.minFilter=Ge[ne],_d.indexOf(k.minFilter)>=0&&!("faces"in le)&&(k.genMipmaps=!0)}if("mag"in le){var ft=le.mag;E.parameter(ft,Ne),k.magFilter=Ne[ft]}var zt=k.wrapS,R=k.wrapT;if("wrap"in le){var y=le.wrap;typeof y=="string"?(E.parameter(y,De),zt=R=De[y]):Array.isArray(y)&&(E.parameter(y[0],De),E.parameter(y[1],De),zt=De[y[0]],R=De[y[1]])}else{if("wrapS"in le){var H=le.wrapS;E.parameter(H,De),zt=De[H]}if("wrapT"in le){var j=le.wrapT;E.parameter(j,De),R=De[j]}}if(k.wrapS=zt,k.wrapT=R,"anisotropic"in le){var Q=le.anisotropic;E(typeof Q=="number"&&Q>=1&&Q<=G.maxAnisotropic,"aniso samples must be between 1 and "),k.anisotropic=le.anisotropic}if("mipmap"in le){var W=!1;switch(typeof le.mipmap){case"string":E.parameter(le.mipmap,Le,"invalid mipmap hint"),k.mipmapHint=Le[le.mipmap],k.genMipmaps=!0,W=!0;break;case"boolean":W=k.genMipmaps=le.mipmap;break;case"object":E(Array.isArray(le.mipmap),"invalid mipmap type"),k.genMipmaps=!1,W=!0;break;default:E.raise("invalid mipmap type")}W&&!("min"in le)&&(k.minFilter=ve)}}function Kr(k,le){h.texParameteri(le,To,k.minFilter),h.texParameteri(le,hd,k.magFilter),h.texParameteri(le,ju,k.wrapS),h.texParameteri(le,ld,k.wrapT),T.ext_texture_filter_anisotropic&&h.texParameteri(le,ri,k.anisotropic),k.genMipmaps&&(h.hint(sn,k.mipmapHint),h.generateMipmap(le))}var en=0,ln={},mn=G.maxTextureUnits,Wr=Array(mn).map(function(){return null});function Ut(k){be.call(this),this.mipmask=0,this.internalformat=Na,this.id=en++,this.refCount=1,this.target=k,this.texture=h.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new pr,fe.profile&&(this.stats={size:0})}function gn(k){h.activeTexture(gr),h.bindTexture(k.target,k.texture)}function hr(){var k=Wr[0];k?h.bindTexture(k.target,k.texture):h.bindTexture(pi,null)}function At(k){var le=k.texture;E(le,"must not double destroy texture");var ne=k.unit,ft=k.target;ne>=0&&(h.activeTexture(gr+ne),h.bindTexture(ft,null),Wr[ne]=null),h.deleteTexture(le),k.texture=null,k.params=null,k.pixels=null,k.refCount=0,delete ln[k.id],ae.textureCount--}o(Ut.prototype,{bind:function(){var k=this;k.bindCount+=1;var le=k.unit;if(le<0){for(var ne=0;ne<mn;++ne){var ft=Wr[ne];if(ft){if(ft.bindCount>0)continue;ft.unit=-1}Wr[ne]=k,le=ne;break}le>=mn&&E.raise("insufficient number of texture units"),fe.profile&&ae.maxTextureUnits<le+1&&(ae.maxTextureUnits=le+1),k.unit=le,h.activeTexture(gr+le),h.bindTexture(k.target,k.texture)}return le},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&At(this)}});function qt(k,le){var ne=new Ut(pi);ln[ne.id]=ne,ae.textureCount++;function ft(y,H){var j=ne.texInfo;pr.call(j);var Q=Xt();return typeof y=="number"?typeof H=="number"?Ct(Q,y|0,H|0):Ct(Q,y|0,y|0):y?(E.type(y,"object","invalid arguments to regl.texture"),qr(j,y),Vt(Q,y)):Ct(Q,1,1),j.genMipmaps&&(Q.mipmask=(Q.width<<1)-1),ne.mipmask=Q.mipmask,ge(ne,Q),E.texture2D(j,Q,G),ne.internalformat=Q.internalformat,ft.width=Q.width,ft.height=Q.height,gn(ne),Mr(Q,pi),Kr(j,pi),hr(),Dr(Q),fe.profile&&(ne.stats.size=Xr(ne.internalformat,ne.type,Q.width,Q.height,j.genMipmaps,!1)),ft.format=Oe[ne.internalformat],ft.type=rt[ne.type],ft.mag=Se[j.magFilter],ft.min=Qe[j.minFilter],ft.wrapS=je[j.wrapS],ft.wrapT=je[j.wrapT],ft}function zt(y,H,j,Q){E(!!y,"must specify image data");var W=H|0,Y=j|0,X=Q|0,O=Ke();return ge(O,ne),O.width=0,O.height=0,$e(O,y),O.width=O.width||(ne.width>>X)-W,O.height=O.height||(ne.height>>X)-Y,E(ne.type===O.type&&ne.format===O.format&&ne.internalformat===O.internalformat,"incompatible format for texture.subimage"),E(W>=0&&Y>=0&&W+O.width<=ne.width&&Y+O.height<=ne.height,"texture.subimage write out of bounds"),E(ne.mipmask&1<<X,"missing mipmap data"),E(O.data||O.element||O.needsCopy,"missing image data"),gn(ne),Mt(O,pi,W,Y,X),hr(),Je(O),ft}function R(y,H){var j=y|0,Q=H|0||j;if(j===ne.width&&Q===ne.height)return ft;ft.width=ne.width=j,ft.height=ne.height=Q,gn(ne);for(var W=0;ne.mipmask>>W;++W){var Y=j>>W,X=Q>>W;if(!Y||!X)break;h.texImage2D(pi,W,ne.format,Y,X,0,ne.format,ne.type,null)}return hr(),fe.profile&&(ne.stats.size=Xr(ne.internalformat,ne.type,j,Q,!1,!1)),ft}return ft(k,le),ft.subimage=zt,ft.resize=R,ft._reglType="texture2d",ft._texture=ne,fe.profile&&(ft.stats=ne.stats),ft.destroy=function(){ne.decRef()},ft}function er(k,le,ne,ft,zt,R){var y=new Ut(xo);ln[y.id]=y,ae.cubeCount++;var H=new Array(6);function j(Y,X,O,N,I,re){var ee,_e=y.texInfo;for(pr.call(_e),ee=0;ee<6;++ee)H[ee]=Xt();if(typeof Y=="number"||!Y){var xe=Y|0||1;for(ee=0;ee<6;++ee)Ct(H[ee],xe,xe)}else if(typeof Y=="object")if(X)Vt(H[0],Y),Vt(H[1],X),Vt(H[2],O),Vt(H[3],N),Vt(H[4],I),Vt(H[5],re);else if(qr(_e,Y),lt(y,Y),"faces"in Y){var Ye=Y.faces;for(E(Array.isArray(Ye)&&Ye.length===6,"cube faces must be a length 6 array"),ee=0;ee<6;++ee)E(typeof Ye[ee]=="object"&&!!Ye[ee],"invalid input for cube map face"),ge(H[ee],y),Vt(H[ee],Ye[ee])}else for(ee=0;ee<6;++ee)Vt(H[ee],Y);else E.raise("invalid arguments to cube map");for(ge(y,H[0]),E.optional(function(){G.npotTextureCube||E($u(y.width)&&$u(y.height),"your browser does not support non power or two texture dimensions")}),_e.genMipmaps?y.mipmask=(H[0].width<<1)-1:y.mipmask=H[0].mipmask,E.textureCube(y,_e,H,G),y.internalformat=H[0].internalformat,j.width=H[0].width,j.height=H[0].height,gn(y),ee=0;ee<6;++ee)Mr(H[ee],$i+ee);for(Kr(_e,xo),hr(),fe.profile&&(y.stats.size=Xr(y.internalformat,y.type,j.width,j.height,_e.genMipmaps,!0)),j.format=Oe[y.internalformat],j.type=rt[y.type],j.mag=Se[_e.magFilter],j.min=Qe[_e.minFilter],j.wrapS=je[_e.wrapS],j.wrapT=je[_e.wrapT],ee=0;ee<6;++ee)Dr(H[ee]);return j}function Q(Y,X,O,N,I){E(!!X,"must specify image data"),E(typeof Y=="number"&&Y===(Y|0)&&Y>=0&&Y<6,"invalid face");var re=O|0,ee=N|0,_e=I|0,xe=Ke();return ge(xe,y),xe.width=0,xe.height=0,$e(xe,X),xe.width=xe.width||(y.width>>_e)-re,xe.height=xe.height||(y.height>>_e)-ee,E(y.type===xe.type&&y.format===xe.format&&y.internalformat===xe.internalformat,"incompatible format for texture.subimage"),E(re>=0&&ee>=0&&re+xe.width<=y.width&&ee+xe.height<=y.height,"texture.subimage write out of bounds"),E(y.mipmask&1<<_e,"missing mipmap data"),E(xe.data||xe.element||xe.needsCopy,"missing image data"),gn(y),Mt(xe,$i+Y,re,ee,_e),hr(),Je(xe),j}function W(Y){var X=Y|0;if(X!==y.width){j.width=y.width=X,j.height=y.height=X,gn(y);for(var O=0;O<6;++O)for(var N=0;y.mipmask>>N;++N)h.texImage2D($i+O,N,y.format,X>>N,X>>N,0,y.format,y.type,null);return hr(),fe.profile&&(y.stats.size=Xr(y.internalformat,y.type,j.width,j.height,!1,!0)),j}}return j(k,le,ne,ft,zt,R),j.subimage=Q,j.resize=W,j._reglType="textureCube",j._texture=y,fe.profile&&(j.stats=y.stats),j.destroy=function(){y.decRef()},j}function Vr(){for(var k=0;k<mn;++k)h.activeTexture(gr+k),h.bindTexture(pi,null),Wr[k]=null;Vn(ln).forEach(At),ae.cubeCount=0,ae.textureCount=0}fe.profile&&(ae.getTotalTextureSize=function(){var k=0;return Object.keys(ln).forEach(function(le){k+=ln[le].stats.size}),k});function Si(){for(var k=0;k<mn;++k){var le=Wr[k];le&&(le.bindCount=0,le.unit=-1,Wr[k]=null)}Vn(ln).forEach(function(ne){ne.texture=h.createTexture(),h.bindTexture(ne.target,ne.texture);for(var ft=0;ft<32;++ft)if((ne.mipmask&1<<ft)!==0)if(ne.target===pi)h.texImage2D(pi,ft,ne.internalformat,ne.width>>ft,ne.height>>ft,0,ne.internalformat,ne.type,null);else for(var zt=0;zt<6;++zt)h.texImage2D($i+zt,ft,ne.internalformat,ne.width>>ft,ne.height>>ft,0,ne.internalformat,ne.type,null);Kr(ne.texInfo,ne.target)})}function Sa(){for(var k=0;k<mn;++k){var le=Wr[k];le&&(le.bindCount=0,le.unit=-1,Wr[k]=null),h.activeTexture(gr+k),h.bindTexture(pi,null),h.bindTexture(xo,null)}}return{create2D:qt,createCube:er,clear:Vr,getTexture:function(k){return null},restore:Si,refresh:Sa}}var da=36161,cf=32854,Tl=32855,tc=36194,hf=33189,Ro=36168,df=34041,Ya=35907,Co=34836,Oo=34842,cs=34843,On=[];On[cf]=2,On[Tl]=2,On[tc]=2,On[hf]=2,On[Ro]=1,On[df]=4,On[Ya]=4,On[Co]=16,On[Oo]=8,On[cs]=6;function rc(h,T,G){return On[h]*T*G}var xd=function(h,T,G,se,me){var ae={rgba4:cf,rgb565:tc,"rgb5 a1":Tl,depth:hf,stencil:Ro,"depth stencil":df};T.ext_srgb&&(ae.srgba=Ya),T.ext_color_buffer_half_float&&(ae.rgba16f=Oo,ae.rgb16f=cs),T.webgl_color_buffer_float&&(ae.rgba32f=Co);var fe=[];Object.keys(ae).forEach(function(Ce){var ke=ae[Ce];fe[ke]=Ce});var Le=0,De={};function Ne(Ce){this.id=Le++,this.refCount=1,this.renderbuffer=Ce,this.format=cf,this.width=0,this.height=0,me.profile&&(this.stats={size:0})}Ne.prototype.decRef=function(){--this.refCount<=0&&Ge(this)};function Ge(Ce){var ke=Ce.renderbuffer;E(ke,"must not double destroy renderbuffer"),h.bindRenderbuffer(da,null),h.deleteRenderbuffer(ke),Ce.renderbuffer=null,Ce.refCount=0,delete De[Ce.id],se.renderbufferCount--}function Be(Ce,ke){var K=new Ne(h.createRenderbuffer());De[K.id]=K,se.renderbufferCount++;function oe(rt,Se){var Qe=0,je=0,pt=cf;if(typeof rt=="object"&&rt){var be=rt;if("shape"in be){var ge=be.shape;E(Array.isArray(ge)&&ge.length>=2,"invalid renderbuffer shape"),Qe=ge[0]|0,je=ge[1]|0}else"radius"in be&&(Qe=je=be.radius|0),"width"in be&&(Qe=be.width|0),"height"in be&&(je=be.height|0);"format"in be&&(E.parameter(be.format,ae,"invalid renderbuffer format"),pt=ae[be.format])}else typeof rt=="number"?(Qe=rt|0,typeof Se=="number"?je=Se|0:je=Qe):rt?E.raise("invalid arguments to renderbuffer constructor"):Qe=je=1;if(E(Qe>0&&je>0&&Qe<=G.maxRenderbufferSize&&je<=G.maxRenderbufferSize,"invalid renderbuffer size"),!(Qe===K.width&&je===K.height&&pt===K.format))return oe.width=K.width=Qe,oe.height=K.height=je,K.format=pt,h.bindRenderbuffer(da,K.renderbuffer),h.renderbufferStorage(da,pt,Qe,je),E(h.getError()===0,"invalid render buffer format"),me.profile&&(K.stats.size=rc(K.format,K.width,K.height)),oe.format=fe[K.format],oe}function Oe(rt,Se){var Qe=rt|0,je=Se|0||Qe;return Qe===K.width&&je===K.height||(E(Qe>0&&je>0&&Qe<=G.maxRenderbufferSize&&je<=G.maxRenderbufferSize,"invalid renderbuffer size"),oe.width=K.width=Qe,oe.height=K.height=je,h.bindRenderbuffer(da,K.renderbuffer),h.renderbufferStorage(da,K.format,Qe,je),E(h.getError()===0,"invalid render buffer format"),me.profile&&(K.stats.size=rc(K.format,K.width,K.height))),oe}return oe(Ce,ke),oe.resize=Oe,oe._reglType="renderbuffer",oe._renderbuffer=K,me.profile&&(oe.stats=K.stats),oe.destroy=function(){K.decRef()},oe}me.profile&&(se.getTotalRenderbufferSize=function(){var Ce=0;return Object.keys(De).forEach(function(ke){Ce+=De[ke].stats.size}),Ce});function We(){Vn(De).forEach(function(Ce){Ce.renderbuffer=h.createRenderbuffer(),h.bindRenderbuffer(da,Ce.renderbuffer),h.renderbufferStorage(da,Ce.format,Ce.width,Ce.height)}),h.bindRenderbuffer(da,null)}return{create:Be,clear:function(){Vn(De).forEach(Ge)},restore:We}},qi=36160,El=36161,Ha=3553,za=34069,Mo=36064,Dl=36096,S=36128,Wa=33306,hs=36053,ni=36054,cr=36055,wd=36057,Sd=36061,Ad=36193,Va=5121,Td=5126,nc=6407,ic=6408,Ed=6402,Dd=[nc,ic],gi=[];gi[ic]=4,gi[nc]=3;var vf=[];vf[Va]=1,vf[Td]=4,vf[Ad]=2;var Ld=32854,Rd=32855,Cd=36194,Od=33189,Ki=36168,ac=34041,Md=35907,Id=34836,Fd=34842,kd=34843,$a=[Ld,Rd,Cd,Md,Fd,kd,Id],Io={};Io[hs]="complete",Io[ni]="incomplete attachment",Io[wd]="incomplete dimensions",Io[cr]="incomplete, missing attachment",Io[Sd]="unsupported";function Pd(h,T,G,se,me,ae){var fe={cur:null,next:null,dirty:!1,setFBO:null},Le=["rgba"],De=["rgba4","rgb565","rgb5 a1"];T.ext_srgb&&De.push("srgba"),T.ext_color_buffer_half_float&&De.push("rgba16f","rgb16f"),T.webgl_color_buffer_float&&De.push("rgba32f");var Ne=["uint8"];T.oes_texture_half_float&&Ne.push("half float","float16"),T.oes_texture_float&&Ne.push("float","float32");function Ge(Ie,$e,qe){this.target=Ie,this.texture=$e,this.renderbuffer=qe;var Mt=0,Lt=0;$e?(Mt=$e.width,Lt=$e.height):qe&&(Mt=qe.width,Lt=qe.height),this.width=Mt,this.height=Lt}function Be(Ie){Ie&&(Ie.texture&&Ie.texture._texture.decRef(),Ie.renderbuffer&&Ie.renderbuffer._renderbuffer.decRef())}function We(Ie,$e,qe){if(!!Ie)if(Ie.texture){var Mt=Ie.texture._texture,Lt=Math.max(1,Mt.width),Ke=Math.max(1,Mt.height);E(Lt===$e&&Ke===qe,"inconsistent width/height for supplied texture"),Mt.refCount+=1}else{var Je=Ie.renderbuffer._renderbuffer;E(Je.width===$e&&Je.height===qe,"inconsistent width/height for renderbuffer"),Je.refCount+=1}}function Ce(Ie,$e){$e&&($e.texture?h.framebufferTexture2D(qi,Ie,$e.target,$e.texture._texture.texture,0):h.framebufferRenderbuffer(qi,Ie,El,$e.renderbuffer._renderbuffer.renderbuffer))}function ke(Ie){var $e=Ha,qe=null,Mt=null,Lt=Ie;typeof Ie=="object"&&(Lt=Ie.data,"target"in Ie&&($e=Ie.target|0)),E.type(Lt,"function","invalid attachment data");var Ke=Lt._reglType;return Ke==="texture2d"?(qe=Lt,E($e===Ha)):Ke==="textureCube"?(qe=Lt,E($e>=za&&$e<za+6,"invalid cube map target")):Ke==="renderbuffer"?(Mt=Lt,$e=El):E.raise("invalid regl object for attachment"),new Ge($e,qe,Mt)}function K(Ie,$e,qe,Mt,Lt){if(qe){var Ke=se.create2D({width:Ie,height:$e,format:Mt,type:Lt});return Ke._texture.refCount=0,new Ge(Ha,Ke,null)}else{var Je=me.create({width:Ie,height:$e,format:Mt});return Je._renderbuffer.refCount=0,new Ge(El,null,Je)}}function oe(Ie){return Ie&&(Ie.texture||Ie.renderbuffer)}function Oe(Ie,$e,qe){Ie&&(Ie.texture?Ie.texture.resize($e,qe):Ie.renderbuffer&&Ie.renderbuffer.resize($e,qe),Ie.width=$e,Ie.height=qe)}var rt=0,Se={};function Qe(){this.id=rt++,Se[this.id]=this,this.framebuffer=h.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function je(Ie){Ie.colorAttachments.forEach(Be),Be(Ie.depthAttachment),Be(Ie.stencilAttachment),Be(Ie.depthStencilAttachment)}function pt(Ie){var $e=Ie.framebuffer;E($e,"must not double destroy framebuffer"),h.deleteFramebuffer($e),Ie.framebuffer=null,ae.framebufferCount--,delete Se[Ie.id]}function be(Ie){var $e;h.bindFramebuffer(qi,Ie.framebuffer);var qe=Ie.colorAttachments;for($e=0;$e<qe.length;++$e)Ce(Mo+$e,qe[$e]);for($e=qe.length;$e<G.maxColorAttachments;++$e)h.framebufferTexture2D(qi,Mo+$e,Ha,null,0);h.framebufferTexture2D(qi,Wa,Ha,null,0),h.framebufferTexture2D(qi,Dl,Ha,null,0),h.framebufferTexture2D(qi,S,Ha,null,0),Ce(Dl,Ie.depthAttachment),Ce(S,Ie.stencilAttachment),Ce(Wa,Ie.depthStencilAttachment);var Mt=h.checkFramebufferStatus(qi);!h.isContextLost()&&Mt!==hs&&E.raise("framebuffer configuration not supported, status = "+Io[Mt]),h.bindFramebuffer(qi,fe.next?fe.next.framebuffer:null),fe.cur=fe.next,h.getError()}function ge(Ie,$e){var qe=new Qe;ae.framebufferCount++;function Mt(Ke,Je){var wt;E(fe.next!==qe,"can not update framebuffer which is currently in use");var Ct=0,Vt=0,Mr=!0,Lr=!0,Xt=null,Dr=!0,pr="rgba",qr="uint8",Kr=1,en=null,ln=null,mn=null,Wr=!1;if(typeof Ke=="number")Ct=Ke|0,Vt=Je|0||Ct;else if(!Ke)Ct=Vt=1;else{E.type(Ke,"object","invalid arguments for framebuffer");var Ut=Ke;if("shape"in Ut){var gn=Ut.shape;E(Array.isArray(gn)&&gn.length>=2,"invalid shape for framebuffer"),Ct=gn[0],Vt=gn[1]}else"radius"in Ut&&(Ct=Vt=Ut.radius),"width"in Ut&&(Ct=Ut.width),"height"in Ut&&(Vt=Ut.height);("color"in Ut||"colors"in Ut)&&(Xt=Ut.color||Ut.colors,Array.isArray(Xt)&&E(Xt.length===1||T.webgl_draw_buffers,"multiple render targets not supported")),Xt||("colorCount"in Ut&&(Kr=Ut.colorCount|0,E(Kr>0,"invalid color buffer count")),"colorTexture"in Ut&&(Dr=!!Ut.colorTexture,pr="rgba4"),"colorType"in Ut&&(qr=Ut.colorType,Dr?(E(T.oes_texture_float||!(qr==="float"||qr==="float32"),"you must enable OES_texture_float in order to use floating point framebuffer objects"),E(T.oes_texture_half_float||!(qr==="half float"||qr==="float16"),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):qr==="half float"||qr==="float16"?(E(T.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),pr="rgba16f"):(qr==="float"||qr==="float32")&&(E(T.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),pr="rgba32f"),E.oneOf(qr,Ne,"invalid color type")),"colorFormat"in Ut&&(pr=Ut.colorFormat,Le.indexOf(pr)>=0?Dr=!0:De.indexOf(pr)>=0?Dr=!1:E.optional(function(){Dr?E.oneOf(Ut.colorFormat,Le,"invalid color format for texture"):E.oneOf(Ut.colorFormat,De,"invalid color format for renderbuffer")}))),("depthTexture"in Ut||"depthStencilTexture"in Ut)&&(Wr=!!(Ut.depthTexture||Ut.depthStencilTexture),E(!Wr||T.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in Ut&&(typeof Ut.depth=="boolean"?Mr=Ut.depth:(en=Ut.depth,Lr=!1)),"stencil"in Ut&&(typeof Ut.stencil=="boolean"?Lr=Ut.stencil:(ln=Ut.stencil,Mr=!1)),"depthStencil"in Ut&&(typeof Ut.depthStencil=="boolean"?Mr=Lr=Ut.depthStencil:(mn=Ut.depthStencil,Mr=!1,Lr=!1))}var hr=null,At=null,qt=null,er=null;if(Array.isArray(Xt))hr=Xt.map(ke);else if(Xt)hr=[ke(Xt)];else for(hr=new Array(Kr),wt=0;wt<Kr;++wt)hr[wt]=K(Ct,Vt,Dr,pr,qr);E(T.webgl_draw_buffers||hr.length<=1,"you must enable the WEBGL_draw_buffers extension in order to use multiple color buffers."),E(hr.length<=G.maxColorAttachments,"too many color attachments, not supported"),Ct=Ct||hr[0].width,Vt=Vt||hr[0].height,en?At=ke(en):Mr&&!Lr&&(At=K(Ct,Vt,Wr,"depth","uint32")),ln?qt=ke(ln):Lr&&!Mr&&(qt=K(Ct,Vt,!1,"stencil","uint8")),mn?er=ke(mn):!en&&!ln&&Lr&&Mr&&(er=K(Ct,Vt,Wr,"depth stencil","depth stencil")),E(!!en+!!ln+!!mn<=1,"invalid framebuffer configuration, can specify exactly one depth/stencil attachment");var Vr=null;for(wt=0;wt<hr.length;++wt)if(We(hr[wt],Ct,Vt),E(!hr[wt]||hr[wt].texture&&Dd.indexOf(hr[wt].texture._texture.format)>=0||hr[wt].renderbuffer&&$a.indexOf(hr[wt].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+wt+" is invalid"),hr[wt]&&hr[wt].texture){var Si=gi[hr[wt].texture._texture.format]*vf[hr[wt].texture._texture.type];Vr===null?Vr=Si:E(Vr===Si,"all color attachments much have the same number of bits per pixel.")}return We(At,Ct,Vt),E(!At||At.texture&&At.texture._texture.format===Ed||At.renderbuffer&&At.renderbuffer._renderbuffer.format===Od,"invalid depth attachment for framebuffer object"),We(qt,Ct,Vt),E(!qt||qt.renderbuffer&&qt.renderbuffer._renderbuffer.format===Ki,"invalid stencil attachment for framebuffer object"),We(er,Ct,Vt),E(!er||er.texture&&er.texture._texture.format===ac||er.renderbuffer&&er.renderbuffer._renderbuffer.format===ac,"invalid depth-stencil attachment for framebuffer object"),je(qe),qe.width=Ct,qe.height=Vt,qe.colorAttachments=hr,qe.depthAttachment=At,qe.stencilAttachment=qt,qe.depthStencilAttachment=er,Mt.color=hr.map(oe),Mt.depth=oe(At),Mt.stencil=oe(qt),Mt.depthStencil=oe(er),Mt.width=qe.width,Mt.height=qe.height,be(qe),Mt}function Lt(Ke,Je){E(fe.next!==qe,"can not resize a framebuffer which is currently in use");var wt=Math.max(Ke|0,1),Ct=Math.max(Je|0||wt,1);if(wt===qe.width&&Ct===qe.height)return Mt;for(var Vt=qe.colorAttachments,Mr=0;Mr<Vt.length;++Mr)Oe(Vt[Mr],wt,Ct);return Oe(qe.depthAttachment,wt,Ct),Oe(qe.stencilAttachment,wt,Ct),Oe(qe.depthStencilAttachment,wt,Ct),qe.width=Mt.width=wt,qe.height=Mt.height=Ct,be(qe),Mt}return Mt(Ie,$e),o(Mt,{resize:Lt,_reglType:"framebuffer",_framebuffer:qe,destroy:function(){pt(qe),je(qe)},use:function(Ke){fe.setFBO({framebuffer:Mt},Ke)}})}function lt(Ie){var $e=Array(6);function qe(Lt){var Ke;E($e.indexOf(fe.next)<0,"can not update framebuffer which is currently in use");var Je={color:null},wt=0,Ct=null,Vt="rgba",Mr="uint8",Lr=1;if(typeof Lt=="number")wt=Lt|0;else if(!Lt)wt=1;else{E.type(Lt,"object","invalid arguments for framebuffer");var Xt=Lt;if("shape"in Xt){var Dr=Xt.shape;E(Array.isArray(Dr)&&Dr.length>=2,"invalid shape for framebuffer"),E(Dr[0]===Dr[1],"cube framebuffer must be square"),wt=Dr[0]}else"radius"in Xt&&(wt=Xt.radius|0),"width"in Xt?(wt=Xt.width|0,"height"in Xt&&E(Xt.height===wt,"must be square")):"height"in Xt&&(wt=Xt.height|0);("color"in Xt||"colors"in Xt)&&(Ct=Xt.color||Xt.colors,Array.isArray(Ct)&&E(Ct.length===1||T.webgl_draw_buffers,"multiple render targets not supported")),Ct||("colorCount"in Xt&&(Lr=Xt.colorCount|0,E(Lr>0,"invalid color buffer count")),"colorType"in Xt&&(E.oneOf(Xt.colorType,Ne,"invalid color type"),Mr=Xt.colorType),"colorFormat"in Xt&&(Vt=Xt.colorFormat,E.oneOf(Xt.colorFormat,Le,"invalid color format for texture"))),"depth"in Xt&&(Je.depth=Xt.depth),"stencil"in Xt&&(Je.stencil=Xt.stencil),"depthStencil"in Xt&&(Je.depthStencil=Xt.depthStencil)}var pr;if(Ct)if(Array.isArray(Ct))for(pr=[],Ke=0;Ke<Ct.length;++Ke)pr[Ke]=Ct[Ke];else pr=[Ct];else{pr=Array(Lr);var qr={radius:wt,format:Vt,type:Mr};for(Ke=0;Ke<Lr;++Ke)pr[Ke]=se.createCube(qr)}for(Je.color=Array(pr.length),Ke=0;Ke<pr.length;++Ke){var Kr=pr[Ke];E(typeof Kr=="function"&&Kr._reglType==="textureCube","invalid cube map"),wt=wt||Kr.width,E(Kr.width===wt&&Kr.height===wt,"invalid cube map shape"),Je.color[Ke]={target:za,data:pr[Ke]}}for(Ke=0;Ke<6;++Ke){for(var en=0;en<pr.length;++en)Je.color[en].target=za+Ke;Ke>0&&(Je.depth=$e[0].depth,Je.stencil=$e[0].stencil,Je.depthStencil=$e[0].depthStencil),$e[Ke]?$e[Ke](Je):$e[Ke]=ge(Je)}return o(qe,{width:wt,height:wt,color:pr})}function Mt(Lt){var Ke,Je=Lt|0;if(E(Je>0&&Je<=G.maxCubeMapSize,"invalid radius for cube fbo"),Je===qe.width)return qe;var wt=qe.color;for(Ke=0;Ke<wt.length;++Ke)wt[Ke].resize(Je);for(Ke=0;Ke<6;++Ke)$e[Ke].resize(Je);return qe.width=qe.height=Je,qe}return qe(Ie),o(qe,{faces:$e,resize:Mt,_reglType:"framebufferCube",destroy:function(){$e.forEach(function(Lt){Lt.destroy()})}})}function Ve(){fe.cur=null,fe.next=null,fe.dirty=!0,Vn(Se).forEach(function(Ie){Ie.framebuffer=h.createFramebuffer(),be(Ie)})}return o(fe,{getFramebuffer:function(Ie){if(typeof Ie=="function"&&Ie._reglType==="framebuffer"){var $e=Ie._framebuffer;if($e instanceof Qe)return $e}return null},create:ge,createCube:lt,clear:function(){Vn(Se).forEach(pt)},restore:Ve})}var yi=5126,oc=34962,_f=34963,sc=["attributes","elements","offset","count","primitive","instances"];function Ll(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=yi,this.offset=0,this.stride=0,this.divisor=0}function Nd(h,T,G,se,me,ae,fe){for(var Le=G.maxAttributes,De=new Array(Le),Ne=0;Ne<Le;++Ne)De[Ne]=new Ll;var Ge=0,Be={},We={Record:Ll,scope:{},state:De,currentVAO:null,targetVAO:null,restore:ke()?je:function(){},createVAO:pt,getVAO:oe,destroyBuffer:Ce,setVAO:ke()?Oe:rt,clear:ke()?Se:function(){}};function Ce(be){for(var ge=0;ge<De.length;++ge){var lt=De[ge];lt.buffer===be&&(h.disableVertexAttribArray(ge),lt.buffer=null)}}function ke(){return T.oes_vertex_array_object}function K(){return T.angle_instanced_arrays}function oe(be){return typeof be=="function"&&be._vao?be._vao:null}function Oe(be){if(be!==We.currentVAO){var ge=ke();be?ge.bindVertexArrayOES(be.vao):ge.bindVertexArrayOES(null),We.currentVAO=be}}function rt(be){if(be!==We.currentVAO){if(be)be.bindAttrs();else{for(var ge=K(),lt=0;lt<De.length;++lt){var Ve=De[lt];Ve.buffer?(h.enableVertexAttribArray(lt),Ve.buffer.bind(),h.vertexAttribPointer(lt,Ve.size,Ve.type,Ve.normalized,Ve.stride,Ve.offfset),ge&&Ve.divisor&&ge.vertexAttribDivisorANGLE(lt,Ve.divisor)):(h.disableVertexAttribArray(lt),h.vertexAttrib4f(lt,Ve.x,Ve.y,Ve.z,Ve.w))}fe.elements?h.bindBuffer(_f,fe.elements.buffer.buffer):h.bindBuffer(_f,null)}We.currentVAO=be}}function Se(){Vn(Be).forEach(function(be){be.destroy()})}function Qe(){this.id=++Ge,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var be=ke();be?this.vao=be.createVertexArrayOES():this.vao=null,Be[this.id]=this,this.buffers=[]}Qe.prototype.bindAttrs=function(){for(var be=K(),ge=this.attributes,lt=0;lt<ge.length;++lt){var Ve=ge[lt];Ve.buffer?(h.enableVertexAttribArray(lt),h.bindBuffer(oc,Ve.buffer.buffer),h.vertexAttribPointer(lt,Ve.size,Ve.type,Ve.normalized,Ve.stride,Ve.offset),be&&Ve.divisor&&be.vertexAttribDivisorANGLE(lt,Ve.divisor)):(h.disableVertexAttribArray(lt),h.vertexAttrib4f(lt,Ve.x,Ve.y,Ve.z,Ve.w))}for(var Ie=ge.length;Ie<Le;++Ie)h.disableVertexAttribArray(Ie);var $e=ae.getElements(this.elements);$e?h.bindBuffer(_f,$e.buffer.buffer):h.bindBuffer(_f,null)},Qe.prototype.refresh=function(){var be=ke();be&&(be.bindVertexArrayOES(this.vao),this.bindAttrs(),We.currentVAO=null,be.bindVertexArrayOES(null))},Qe.prototype.destroy=function(){if(this.vao){var be=ke();this===We.currentVAO&&(We.currentVAO=null,be.bindVertexArrayOES(null)),be.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),Be[this.id]&&(delete Be[this.id],se.vaoCount-=1)};function je(){var be=ke();be&&Vn(Be).forEach(function(ge){ge.refresh()})}function pt(be){var ge=new Qe;se.vaoCount+=1;function lt(Ve){var Ie;if(Array.isArray(Ve))Ie=Ve,ge.elements&&ge.ownsElements&&ge.elements.destroy(),ge.elements=null,ge.ownsElements=!1,ge.offset=0,ge.count=0,ge.instances=-1,ge.primitive=4;else{if(E(typeof Ve=="object","invalid arguments for create vao"),E("attributes"in Ve,"must specify attributes for vao"),Ve.elements){var $e=Ve.elements;ge.ownsElements?typeof $e=="function"&&$e._reglType==="elements"?(ge.elements.destroy(),ge.ownsElements=!1):(ge.elements($e),ge.ownsElements=!1):ae.getElements(Ve.elements)?(ge.elements=Ve.elements,ge.ownsElements=!1):(ge.elements=ae.create(Ve.elements),ge.ownsElements=!0)}else ge.elements=null,ge.ownsElements=!1;Ie=Ve.attributes,ge.offset=0,ge.count=-1,ge.instances=-1,ge.primitive=4,ge.elements&&(ge.count=ge.elements._elements.vertCount,ge.primitive=ge.elements._elements.primType),"offset"in Ve&&(ge.offset=Ve.offset|0),"count"in Ve&&(ge.count=Ve.count|0),"instances"in Ve&&(ge.instances=Ve.instances|0),"primitive"in Ve&&(E(Ve.primitive in Wi,"bad primitive type: "+Ve.primitive),ge.primitive=Wi[Ve.primitive]),E.optional(()=>{for(var Mr=Object.keys(Ve),Lr=0;Lr<Mr.length;++Lr)E(sc.indexOf(Mr[Lr])>=0,'invalid option for vao: "'+Mr[Lr]+'" valid options are '+sc)}),E(Array.isArray(Ie),"attributes must be an array")}E(Ie.length<Le,"too many attributes"),E(Ie.length>0,"must specify at least one attribute");var qe={},Mt=ge.attributes;Mt.length=Ie.length;for(var Lt=0;Lt<Ie.length;++Lt){var Ke=Ie[Lt],Je=Mt[Lt]=new Ll,wt=Ke.data||Ke;if(Array.isArray(wt)||i(wt)||Rn(wt)){var Ct;ge.buffers[Lt]&&(Ct=ge.buffers[Lt],i(wt)&&Ct._buffer.byteLength>=wt.byteLength?Ct.subdata(wt):(Ct.destroy(),ge.buffers[Lt]=null)),ge.buffers[Lt]||(Ct=ge.buffers[Lt]=me.create(Ke,oc,!1,!0)),Je.buffer=me.getBuffer(Ct),Je.size=Je.buffer.dimension|0,Je.normalized=!1,Je.type=Je.buffer.dtype,Je.offset=0,Je.stride=0,Je.divisor=0,Je.state=1,qe[Lt]=1}else me.getBuffer(Ke)?(Je.buffer=me.getBuffer(Ke),Je.size=Je.buffer.dimension|0,Je.normalized=!1,Je.type=Je.buffer.dtype,Je.offset=0,Je.stride=0,Je.divisor=0,Je.state=1):me.getBuffer(Ke.buffer)?(Je.buffer=me.getBuffer(Ke.buffer),Je.size=(+Ke.size||Je.buffer.dimension)|0,Je.normalized=!!Ke.normalized||!1,"type"in Ke?(E.parameter(Ke.type,ka,"invalid buffer type"),Je.type=ka[Ke.type]):Je.type=Je.buffer.dtype,Je.offset=(Ke.offset||0)|0,Je.stride=(Ke.stride||0)|0,Je.divisor=(Ke.divisor||0)|0,Je.state=1,E(Je.size>=1&&Je.size<=4,"size must be between 1 and 4"),E(Je.offset>=0,"invalid offset"),E(Je.stride>=0&&Je.stride<=255,"stride must be between 0 and 255"),E(Je.divisor>=0,"divisor must be positive"),E(!Je.divisor||!!T.angle_instanced_arrays,"ANGLE_instanced_arrays must be enabled to use divisor")):"x"in Ke?(E(Lt>0,"first attribute must not be a constant"),Je.x=+Ke.x||0,Je.y=+Ke.y||0,Je.z=+Ke.z||0,Je.w=+Ke.w||0,Je.state=2):E(!1,"invalid attribute spec for location "+Lt)}for(var Vt=0;Vt<ge.buffers.length;++Vt)!qe[Vt]&&ge.buffers[Vt]&&(ge.buffers[Vt].destroy(),ge.buffers[Vt]=null);return ge.refresh(),lt}return lt.destroy=function(){for(var Ve=0;Ve<ge.buffers.length;++Ve)ge.buffers[Ve]&&ge.buffers[Ve].destroy();ge.buffers.length=0,ge.ownsElements&&(ge.elements.destroy(),ge.elements=null,ge.ownsElements=!1),ge.destroy()},lt._vao=ge,lt._reglType="vao",lt(be)}return We}var Rl=35632,fc=35633,Bd=35718,Gd=35721;function Cl(h,T,G,se){var me={},ae={};function fe(K,oe,Oe,rt){this.name=K,this.id=oe,this.location=Oe,this.info=rt}function Le(K,oe){for(var Oe=0;Oe<K.length;++Oe)if(K[Oe].id===oe.id){K[Oe].location=oe.location;return}K.push(oe)}function De(K,oe,Oe){var rt=K===Rl?me:ae,Se=rt[oe];if(!Se){var Qe=T.str(oe);Se=h.createShader(K),h.shaderSource(Se,Qe),h.compileShader(Se),E.shaderError(h,Se,Qe,K,Oe),rt[oe]=Se}return Se}var Ne={},Ge=[],Be=0;function We(K,oe){this.id=Be++,this.fragId=K,this.vertId=oe,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,se.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function Ce(K,oe,Oe){var rt,Se,Qe=De(Rl,K.fragId),je=De(fc,K.vertId),pt=K.program=h.createProgram();if(h.attachShader(pt,Qe),h.attachShader(pt,je),Oe)for(rt=0;rt<Oe.length;++rt){var be=Oe[rt];h.bindAttribLocation(pt,be[0],be[1])}h.linkProgram(pt),E.linkError(h,pt,T.str(K.fragId),T.str(K.vertId),oe);var ge=h.getProgramParameter(pt,Bd);se.profile&&(K.stats.uniformsCount=ge);var lt=K.uniforms;for(rt=0;rt<ge;++rt)if(Se=h.getActiveUniform(pt,rt),Se){if(Se.size>1)for(var Ve=0;Ve<Se.size;++Ve){var Ie=Se.name.replace("[0]","["+Ve+"]");Le(lt,new fe(Ie,T.id(Ie),h.getUniformLocation(pt,Ie),Se))}var $e=Se.name;Se.size>1&&($e=$e.replace("[0]","")),Le(lt,new fe($e,T.id($e),h.getUniformLocation(pt,$e),Se))}var qe=h.getProgramParameter(pt,Gd);se.profile&&(K.stats.attributesCount=qe);var Mt=K.attributes;for(rt=0;rt<qe;++rt)Se=h.getActiveAttrib(pt,rt),Se&&Le(Mt,new fe(Se.name,T.id(Se.name),h.getAttribLocation(pt,Se.name),Se))}se.profile&&(G.getMaxUniformsCount=function(){var K=0;return Ge.forEach(function(oe){oe.stats.uniformsCount>K&&(K=oe.stats.uniformsCount)}),K},G.getMaxAttributesCount=function(){var K=0;return Ge.forEach(function(oe){oe.stats.attributesCount>K&&(K=oe.stats.attributesCount)}),K});function ke(){me={},ae={};for(var K=0;K<Ge.length;++K)Ce(Ge[K],null,Ge[K].attributes.map(function(oe){return[oe.location,oe.name]}))}return{clear:function(){var K=h.deleteShader.bind(h);Vn(me).forEach(K),me={},Vn(ae).forEach(K),ae={},Ge.forEach(function(oe){h.deleteProgram(oe.program)}),Ge.length=0,Ne={},G.shaderCount=0},program:function(K,oe,Oe,rt){E.command(K>=0,"missing vertex shader",Oe),E.command(oe>=0,"missing fragment shader",Oe);var Se=Ne[oe];Se||(Se=Ne[oe]={});var Qe=Se[K];if(Qe&&(Qe.refCount++,!rt))return Qe;var je=new We(oe,K);return G.shaderCount++,Ce(je,Oe,rt),Qe||(Se[K]=je),Ge.push(je),o(je,{destroy:function(){if(je.refCount--,je.refCount<=0){h.deleteProgram(je.program);var pt=Ge.indexOf(je);Ge.splice(pt,1),G.shaderCount--}Se[je.vertId].refCount<=0&&(h.deleteShader(ae[je.vertId]),delete ae[je.vertId],delete Ne[je.fragId][je.vertId]),Object.keys(Ne[je.fragId]).length||(h.deleteShader(me[je.fragId]),delete me[je.fragId],delete Ne[je.fragId])}})},restore:ke,shader:De,frag:-1,vert:-1}}var ds=6408,va=5121,Ud=3333,vs=5126;function Yd(h,T,G,se,me,ae,fe){function Le(Ge){var Be;T.next===null?(E(me.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),Be=va):(E(T.next.colorAttachments[0].texture!==null,"You cannot read from a renderbuffer"),Be=T.next.colorAttachments[0].texture._texture.type,E.optional(function(){ae.oes_texture_float?(E(Be===va||Be===vs,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"),Be===vs&&E(fe.readFloat,"Reading 'float' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float")):E(Be===va,"Reading from a framebuffer is only allowed for the type 'uint8'")}));var We=0,Ce=0,ke=se.framebufferWidth,K=se.framebufferHeight,oe=null;i(Ge)?oe=Ge:Ge&&(E.type(Ge,"object","invalid arguments to regl.read()"),We=Ge.x|0,Ce=Ge.y|0,E(We>=0&&We<se.framebufferWidth,"invalid x offset for regl.read"),E(Ce>=0&&Ce<se.framebufferHeight,"invalid y offset for regl.read"),ke=(Ge.width||se.framebufferWidth-We)|0,K=(Ge.height||se.framebufferHeight-Ce)|0,oe=Ge.data||null),oe&&(Be===va?E(oe instanceof Uint8Array,"buffer must be 'Uint8Array' when reading from a framebuffer of type 'uint8'"):Be===vs&&E(oe instanceof Float32Array,"buffer must be 'Float32Array' when reading from a framebuffer of type 'float'")),E(ke>0&&ke+We<=se.framebufferWidth,"invalid width for read pixels"),E(K>0&&K+Ce<=se.framebufferHeight,"invalid height for read pixels"),G();var Oe=ke*K*4;return oe||(Be===va?oe=new Uint8Array(Oe):Be===vs&&(oe=oe||new Float32Array(Oe))),E.isTypedArray(oe,"data buffer for regl.read() must be a typedarray"),E(oe.byteLength>=Oe,"data buffer for regl.read() too small"),h.pixelStorei(Ud,4),h.readPixels(We,Ce,ke,K,ds,Be,oe),oe}function De(Ge){var Be;return T.setFBO({framebuffer:Ge.framebuffer},function(){Be=Le(Ge)}),Be}function Ne(Ge){return!Ge||!("framebuffer"in Ge)?Le(Ge):De(Ge)}return Ne}function $n(h){return Array.prototype.slice.call(h)}function _a(h){return $n(h).join("")}function Za(){var h=0,T=[],G=[];function se(Be){for(var We=0;We<G.length;++We)if(G[We]===Be)return T[We];var Ce="g"+h++;return T.push(Ce),G.push(Be),Ce}function me(){var Be=[];function We(){Be.push.apply(Be,$n(arguments))}var Ce=[];function ke(){var K="v"+h++;return Ce.push(K),arguments.length>0&&(Be.push(K,"="),Be.push.apply(Be,$n(arguments)),Be.push(";")),K}return o(We,{def:ke,toString:function(){return _a([Ce.length>0?"var "+Ce.join(",")+";":"",_a(Be)])}})}function ae(){var Be=me(),We=me(),Ce=Be.toString,ke=We.toString;function K(oe,Oe){We(oe,Oe,"=",Be.def(oe,Oe),";")}return o(function(){Be.apply(Be,$n(arguments))},{def:Be.def,entry:Be,exit:We,save:K,set:function(oe,Oe,rt){K(oe,Oe),Be(oe,Oe,"=",rt,";")},toString:function(){return Ce()+ke()}})}function fe(){var Be=_a(arguments),We=ae(),Ce=ae(),ke=We.toString,K=Ce.toString;return o(We,{then:function(){return We.apply(We,$n(arguments)),this},else:function(){return Ce.apply(Ce,$n(arguments)),this},toString:function(){var oe=K();return oe&&(oe="else{"+oe+"}"),_a(["if(",Be,"){",ke(),"}",oe])}})}var Le=me(),De={};function Ne(Be,We){var Ce=[];function ke(){var Se="a"+Ce.length;return Ce.push(Se),Se}We=We||0;for(var K=0;K<We;++K)ke();var oe=ae(),Oe=oe.toString,rt=De[Be]=o(oe,{arg:ke,toString:function(){return _a(["function(",Ce.join(),"){",Oe(),"}"])}});return rt}function Ge(){var Be=['"use strict";',Le,"return {"];Object.keys(De).forEach(function(ke){Be.push('"',ke,'":',De[ke].toString(),",")}),Be.push("}");var We=_a(Be).replace(/;/g,`;
41
+ `).forEach(function(G){if(!(G.length<5)){var se=/^ERROR:\s+(\d+):(\d+):\s*(.*)$/.exec(G);se?T.push(new b(se[1]|0,se[2]|0,se[3].trim())):G.length>0&&T.push(new b("unknown",0,G))}}),T}function nt(h,T){T.forEach(function(G){var se=h[G.file];if(se){var me=se.index[G.line];if(me){me.errors.push(G),se.hasErrors=!0;return}}h.unknown.hasErrors=!0,h.unknown.lines[0].errors.push(G)})}function ut(h,T,G,se,me){if(!h.getShaderParameter(T,h.COMPILE_STATUS)){var ae=h.getShaderInfoLog(T),fe=se===h.FRAGMENT_SHADER?"fragment":"vertex";Ie(G,"string",fe+" shader source must be a string",me);var Le=J(G,me),De=Te(ae);nt(Le,De),Object.keys(Le).forEach(function(Ne){var Ge=Le[Ne];if(!Ge.hasErrors)return;var Be=[""],We=[""];function Ce(ke,K){Be.push(ke),We.push(K||"")}Ce("file number "+Ne+": "+Ge.name+`
42
+ `,"color:red;text-decoration:underline;font-weight:bold"),Ge.lines.forEach(function(ke){if(ke.errors.length>0){Ce(x(ke.number,4)+"| ","background-color:yellow; font-weight:bold"),Ce(ke.line+f,"color:red; background-color:yellow; font-weight:bold");var K=0;ke.errors.forEach(function(oe){var Oe=oe.message,rt=/^\s*'(.*)'\s*:\s*(.*)$/.exec(Oe);if(rt){var Se=rt[1];switch(Oe=rt[2],Se){case"assign":Se="=";break}K=Math.max(ke.line.indexOf(Se,K),0)}else K=0;Ce(x("| ",6)),Ce(x("^^^",K+3)+f,"font-weight:bold"),Ce(x("| ",6)),Ce(Oe+f,"font-weight:bold")}),Ce(x("| ",6)+f)}else Ce(x(ke.number,4)+"| "),Ce(ke.line+f,"color:red")}),typeof document<"u"&&!window.chrome?(We[0]=Be.join("%c"),console.log.apply(console,We)):console.log(Be.join(""))}),d.raise("Error compiling "+fe+" shader, "+Le[0].name)}}function it(h,T,G,se,me){if(!h.getProgramParameter(T,h.LINK_STATUS)){var ae=h.getProgramInfoLog(T),fe=J(G,me),Le=J(se,me),De='Error linking program with vertex shader, "'+Le[0].name+'", and fragment shader "'+fe[0].name+'"';typeof document<"u"?console.log("%c"+De+f+"%c"+ae,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(De+f+ae),d.raise(De)}}function st(h){h._commandRef=P()}function tt(h,T,G,se){st(h);function me(De){return De?se.id(De):0}h._fragId=me(h.static.frag),h._vertId=me(h.static.vert);function ae(De,Ne){Object.keys(Ne).forEach(function(Ge){De[se.id(Ge)]=!0})}var fe=h._uniformSet={};ae(fe,T.static),ae(fe,T.dynamic);var Le=h._attributeSet={};ae(Le,G.static),ae(Le,G.dynamic),h._hasCount="count"in h.static||"count"in h.dynamic||"elements"in h.static||"elements"in h.dynamic}function Re(h,T){var G=F();l(h+" in command "+(T||P())+(G==="unknown"?"":" called from "+G))}function Ot(h,T,G){h||Re(T,G||P())}function xt(h,T,G,se){h in T||Re("unknown parameter ("+h+")"+v(G)+". possible values: "+Object.keys(T).join(),se||P())}function Ie(h,T,G,se){p(h,T)||Re("invalid parameter type"+v(G)+". expected "+T+", got "+typeof h,se||P())}function Ze(h){h()}function St(h,T,G){h.texture?D(h.texture._texture.internalformat,T,"unsupported texture format for attachment"):D(h.renderbuffer._renderbuffer.format,G,"unsupported renderbuffer format for attachment")}var $t=33071,Wt=9728,Qt=9984,sr=9985,br=9986,lr=9987,Kt=5120,wr=5121,Gt=5122,Mt=5123,dn=5124,Qr=5125,kt=5126,Nr=32819,Fr=32820,Xr=33635,Jr=34042,ar=36193,Pt={};Pt[Kt]=Pt[wr]=1,Pt[Gt]=Pt[Mt]=Pt[ar]=Pt[Xr]=Pt[Nr]=Pt[Fr]=2,Pt[dn]=Pt[Qr]=Pt[kt]=Pt[Jr]=4;function Dn(h,T){return h===Fr||h===Nr||h===Xr?2:h===Jr?4:Pt[h]*T}function Ln(h){return!(h&h-1)&&!!h}function en(h,T,G){var se,me=T.width,ae=T.height,fe=T.channels;d(me>0&&me<=G.maxTextureSize&&ae>0&&ae<=G.maxTextureSize,"invalid texture shape"),(h.wrapS!==$t||h.wrapT!==$t)&&d(Ln(me)&&Ln(ae),"incompatible wrap mode for texture, both width and height must be power of 2"),T.mipmask===1?me!==1&&ae!==1&&d(h.minFilter!==Qt&&h.minFilter!==br&&h.minFilter!==sr&&h.minFilter!==lr,"min filter requires mipmap"):(d(Ln(me)&&Ln(ae),"texture must be a square power of 2 to support mipmapping"),d(T.mipmask===(me<<1)-1,"missing or incomplete mipmap data")),T.type===kt&&(G.extensions.indexOf("oes_texture_float_linear")<0&&d(h.minFilter===Wt&&h.magFilter===Wt,"filter not supported, must enable oes_texture_float_linear"),d(!h.genMipmaps,"mipmap generation not supported with float textures"));var Le=T.images;for(se=0;se<16;++se)if(Le[se]){var De=me>>se,Ne=ae>>se;d(T.mipmask&1<<se,"missing mipmap data");var Ge=Le[se];if(d(Ge.width===De&&Ge.height===Ne,"invalid shape for mip images"),d(Ge.format===T.format&&Ge.internalformat===T.internalformat&&Ge.type===T.type,"incompatible type for mip image"),!Ge.compressed)if(Ge.data){var Be=Math.ceil(Dn(Ge.type,fe)*De/Ge.unpackAlignment)*Ge.unpackAlignment;d(Ge.data.byteLength===Be*Ne,"invalid data for image, buffer size is inconsistent with image format")}else Ge.element||Ge.copy}else h.genMipmaps||d((T.mipmask&1<<se)===0,"extra mipmap data");T.compressed&&d(!h.genMipmaps,"mipmap generation for compressed images not supported")}function on(h,T,G,se){var me=h.width,ae=h.height,fe=h.channels;d(me>0&&me<=se.maxTextureSize&&ae>0&&ae<=se.maxTextureSize,"invalid texture shape"),d(me===ae,"cube map must be square"),d(T.wrapS===$t&&T.wrapT===$t,"wrap mode not supported by cube map");for(var Le=0;Le<G.length;++Le){var De=G[Le];d(De.width===me&&De.height===ae,"inconsistent cube map face shape"),T.genMipmaps&&(d(!De.compressed,"can not generate mipmap for compressed textures"),d(De.mipmask===1,"can not specify mipmaps and generate mipmaps"));for(var Ne=De.images,Ge=0;Ge<16;++Ge){var Be=Ne[Ge];if(Be){var We=me>>Ge,Ce=ae>>Ge;d(De.mipmask&1<<Ge,"missing mipmap data"),d(Be.width===We&&Be.height===Ce,"invalid shape for mip images"),d(Be.format===h.format&&Be.internalformat===h.internalformat&&Be.type===h.type,"incompatible type for mip image"),Be.compressed||(Be.data?d(Be.data.byteLength===We*Ce*Math.max(Dn(Be.type,fe),Be.unpackAlignment),"invalid data for image, buffer size is inconsistent with image format"):Be.element||Be.copy)}}}}var E=a(d,{optional:Ze,raise:l,commandRaise:Re,command:Ot,parameter:I,commandParameter:xt,constructor:ue,type:U,commandType:Ie,isTypedArray:B,nni:q,oneOf:D,shaderError:ut,linkError:it,callSite:F,saveCommandRef:st,saveDrawInfo:tt,framebufferFormat:St,guessCommand:P,texture2D:en,textureCube:on}),pi=0,vn=0,Zi=5,Gn=6;function Tr(h,T){this.id=pi++,this.type=h,this.data=T}function Rn(h){return h.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function Un(h){if(h.length===0)return[];var T=h.charAt(0),G=h.charAt(h.length-1);if(h.length>1&&T===G&&(T==='"'||T==="'"))return['"'+Rn(h.substr(1,h.length-2))+'"'];var se=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(h);if(se)return Un(h.substr(0,se.index)).concat(Un(se[1])).concat(Un(h.substr(se.index+se[0].length)));var me=h.split(".");if(me.length===1)return['"'+Rn(h)+'"'];for(var ae=[],fe=0;fe<me.length;++fe)ae=ae.concat(Un(me[fe]));return ae}function C(h){return"["+Un(h).join("][")+"]"}function Ue(h,T){return new Tr(h,C(T+""))}function Xe(h){return typeof h=="function"&&!h._reglType||h instanceof Tr}function dt(h,T){if(typeof h=="function")return new Tr(vn,h);if(typeof h=="number"||typeof h=="boolean")return new Tr(Zi,h);if(Array.isArray(h))return new Tr(Gn,h.map(function(G,se){return dt(G,T+"["+se+"]")}));if(h instanceof Tr)return h;E(!1,"invalid option type in uniform "+T)}var Z={DynamicVariable:Tr,define:Ue,isDynamic:Xe,unbox:dt,accessor:C},we={next:typeof requestAnimationFrame=="function"?function(h){return requestAnimationFrame(h)}:function(h){return setTimeout(h,16)},cancel:typeof cancelAnimationFrame=="function"?function(h){return cancelAnimationFrame(h)}:clearTimeout},m=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date};function He(){var h={"":0},T=[""];return{id:function(G){var se=h[G];return se||(se=h[G]=T.length,T.push(G),se)},str:function(G){return T[G]}}}function Nt(h,T,G){var se=document.createElement("canvas");a(se.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),h.appendChild(se),h===document.body&&(se.style.position="absolute",a(h.style,{margin:0,padding:0}));function me(){var Le=window.innerWidth,De=window.innerHeight;if(h!==document.body){var Ne=se.getBoundingClientRect();Le=Ne.right-Ne.left,De=Ne.bottom-Ne.top}se.width=G*Le,se.height=G*De}var ae;h!==document.body&&typeof ResizeObserver=="function"?(ae=new ResizeObserver(function(){setTimeout(me)}),ae.observe(h)):window.addEventListener("resize",me,!1);function fe(){ae?ae.disconnect():window.removeEventListener("resize",me),h.removeChild(se)}return me(),{canvas:se,onDestroy:fe}}function u(h,T){function G(se){try{return h.getContext(se,T)}catch{return null}}return G("webgl")||G("experimental-webgl")||G("webgl-experimental")}function de(h){return typeof h.nodeName=="string"&&typeof h.appendChild=="function"&&typeof h.getBoundingClientRect=="function"}function ye(h){return typeof h.drawArrays=="function"||typeof h.drawElements=="function"}function w(h){return typeof h=="string"?h.split():(E(Array.isArray(h),"invalid extension array"),h)}function V(h){return typeof h=="string"?(E(typeof document<"u","not supported outside of DOM"),document.querySelector(h)):h}function ce(h){var T=h||{},G,se,me,ae,fe={},Le=[],De=[],Ne=typeof window>"u"?1:window.devicePixelRatio,Ge=!1,Be=function(ke){ke&&E.raise(ke)},We=function(){};if(typeof T=="string"?(E(typeof document<"u","selector queries only supported in DOM enviroments"),G=document.querySelector(T),E(G,"invalid query string for element")):typeof T=="object"?de(T)?G=T:ye(T)?(ae=T,me=ae.canvas):(E.constructor(T),"gl"in T?ae=T.gl:"canvas"in T?me=V(T.canvas):"container"in T&&(se=V(T.container)),"attributes"in T&&(fe=T.attributes,E.type(fe,"object","invalid context attributes")),"extensions"in T&&(Le=w(T.extensions)),"optionalExtensions"in T&&(De=w(T.optionalExtensions)),"onDone"in T&&(E.type(T.onDone,"function","invalid or missing onDone callback"),Be=T.onDone),"profile"in T&&(Ge=!!T.profile),"pixelRatio"in T&&(Ne=+T.pixelRatio,E(Ne>0,"invalid pixel ratio"))):E.raise("invalid arguments to regl"),G&&(G.nodeName.toLowerCase()==="canvas"?me=G:se=G),!ae){if(!me){E(typeof document<"u","must manually specify webgl context outside of DOM environments");var Ce=Nt(se||document.body,Be,Ne);if(!Ce)return null;me=Ce.canvas,We=Ce.onDestroy}fe.premultipliedAlpha===void 0&&(fe.premultipliedAlpha=!0),ae=u(me,fe)}return ae?{gl:ae,canvas:me,container:se,extensions:Le,optionalExtensions:De,pixelRatio:Ne,profile:Ge,onDone:Be,onDestroy:We}:(We(),Be("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function Et(h,T){var G={};function se(fe){E.type(fe,"string","extension name must be string");var Le=fe.toLowerCase(),De;try{De=G[Le]=h.getExtension(Le)}catch{}return!!De}for(var me=0;me<T.extensions.length;++me){var ae=T.extensions[me];if(!se(ae))return T.onDestroy(),T.onDone('"'+ae+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return T.optionalExtensions.forEach(se),{extensions:G,restore:function(){Object.keys(G).forEach(function(fe){if(G[fe]&&!se(fe))throw new Error("(regl): error restoring extension "+fe)})}}}function at(h,T){for(var G=Array(h),se=0;se<h;++se)G[se]=T(se);return G}var mt=5120,ur=5121,mi=5122,kr=5123,dr=5124,Yr=5125,_n=5126;function Cn(h){for(var T=16;T<=1<<28;T*=16)if(h<=T)return T;return 0}function Na(h){var T,G;return T=(h>65535)<<4,h>>>=T,G=(h>255)<<3,h>>>=G,T|=G,G=(h>15)<<2,h>>>=G,T|=G,G=(h>3)<<1,h>>>=G,T|=G,T|h>>1}function Ba(){var h=at(8,function(){return[]});function T(ae){var fe=Cn(ae),Le=h[Na(fe)>>2];return Le.length>0?Le.pop():new ArrayBuffer(fe)}function G(ae){h[Na(ae.byteLength)>>2].push(ae)}function se(ae,fe){var Le=null;switch(ae){case mt:Le=new Int8Array(T(fe),0,fe);break;case ur:Le=new Uint8Array(T(fe),0,fe);break;case mi:Le=new Int16Array(T(2*fe),0,fe);break;case kr:Le=new Uint16Array(T(2*fe),0,fe);break;case dr:Le=new Int32Array(T(4*fe),0,fe);break;case Yr:Le=new Uint32Array(T(4*fe),0,fe);break;case _n:Le=new Float32Array(T(4*fe),0,fe);break;default:return null}return Le.length!==fe?Le.subarray(0,fe):Le}function me(ae){G(ae.buffer)}return{alloc:T,free:G,allocType:se,freeType:me}}var jt=Ba();jt.zero=Ba();var $n=3408,sn=3410,gi=3411,Kn=3412,js=3413,Xh=3414,qh=3415,Kh=33901,jh=33902,Qh=3379,Qs=3386,Jh=34921,Js=36347,ed=36348,td=35661,rd=35660,Nu=34930,Bu=36349,Gu=34076,nd=34024,id=7936,ad=7937,od=7938,Uu=35724,Yu=34047,Hu=36063,rl=34852,ef=3553,nl=34067,tf=34069,zu=33984,as=6408,rf=5126,il=5121,os=36160,sd=36053,Wu=36064,al=16384,ol=function(h,T){var G=1;T.ext_texture_filter_anisotropic&&(G=h.getParameter(Yu));var se=1,me=1;T.webgl_draw_buffers&&(se=h.getParameter(rl),me=h.getParameter(Hu));var ae=!!T.oes_texture_float;if(ae){var fe=h.createTexture();h.bindTexture(ef,fe),h.texImage2D(ef,0,as,1,1,0,as,rf,null);var Le=h.createFramebuffer();if(h.bindFramebuffer(os,Le),h.framebufferTexture2D(os,Wu,ef,fe,0),h.bindTexture(ef,null),h.checkFramebufferStatus(os)!==sd)ae=!1;else{h.viewport(0,0,1,1),h.clearColor(1,0,0,1),h.clear(al);var De=jt.allocType(rf,4);h.readPixels(0,0,1,1,as,rf,De),h.getError()?ae=!1:(h.deleteFramebuffer(Le),h.deleteTexture(fe),ae=De[0]===1),jt.freeType(De)}}var Ne=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Ge=!0;if(!Ne){var Be=h.createTexture(),We=jt.allocType(il,36);h.activeTexture(zu),h.bindTexture(nl,Be),h.texImage2D(tf,0,as,3,3,0,as,il,We),jt.freeType(We),h.bindTexture(nl,null),h.deleteTexture(Be),Ge=!h.getError()}return{colorBits:[h.getParameter(sn),h.getParameter(gi),h.getParameter(Kn),h.getParameter(js)],depthBits:h.getParameter(Xh),stencilBits:h.getParameter(qh),subpixelBits:h.getParameter($n),extensions:Object.keys(T).filter(function(Ce){return!!T[Ce]}),maxAnisotropic:G,maxDrawbuffers:se,maxColorAttachments:me,pointSizeDims:h.getParameter(Kh),lineWidthDims:h.getParameter(jh),maxViewportDims:h.getParameter(Qs),maxCombinedTextureUnits:h.getParameter(td),maxCubeMapSize:h.getParameter(Gu),maxRenderbufferSize:h.getParameter(nd),maxTextureUnits:h.getParameter(Nu),maxTextureSize:h.getParameter(Qh),maxAttributes:h.getParameter(Jh),maxVertexUniforms:h.getParameter(Js),maxVertexTextureUnits:h.getParameter(rd),maxVaryingVectors:h.getParameter(ed),maxFragmentUniforms:h.getParameter(Bu),glsl:h.getParameter(Uu),renderer:h.getParameter(ad),vendor:h.getParameter(id),version:h.getParameter(od),readFloat:ae,npotTextureCube:Ge}};function On(h){return!!h&&typeof h=="object"&&Array.isArray(h.shape)&&Array.isArray(h.stride)&&typeof h.offset=="number"&&h.shape.length===h.stride.length&&(Array.isArray(h.data)||i(h.data))}var Zn=function(h){return Object.keys(h).map(function(T){return h[T]})},ss={shape:ld,flatten:$u};function fd(h,T,G){for(var se=0;se<T;++se)G[se]=h[se]}function Vu(h,T,G,se){for(var me=0,ae=0;ae<T;++ae)for(var fe=h[ae],Le=0;Le<G;++Le)se[me++]=fe[Le]}function sl(h,T,G,se,me,ae){for(var fe=ae,Le=0;Le<T;++Le)for(var De=h[Le],Ne=0;Ne<G;++Ne)for(var Ge=De[Ne],Be=0;Be<se;++Be)me[fe++]=Ge[Be]}function fl(h,T,G,se,me){for(var ae=1,fe=G+1;fe<T.length;++fe)ae*=T[fe];var Le=T[G];if(T.length-G===4){var De=T[G+1],Ne=T[G+2],Ge=T[G+3];for(fe=0;fe<Le;++fe)sl(h[fe],De,Ne,Ge,se,me),me+=ae}else for(fe=0;fe<Le;++fe)fl(h[fe],T,G+1,se,me),me+=ae}function $u(h,T,G,se){var me=1;if(T.length)for(var ae=0;ae<T.length;++ae)me*=T[ae];else me=0;var fe=se||jt.allocType(G,me);switch(T.length){case 0:break;case 1:fd(h,T[0],fe);break;case 2:Vu(h,T[0],T[1],fe);break;case 3:sl(h,T[0],T[1],T[2],fe,0);break;default:fl(h,T,0,fe,0)}return fe}function ld(h){for(var T=[],G=h;G.length;G=G[0])T.push(G.length);return T}var ll={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},ud=5120,Zu=5122,cd=5124,hd=5121,dd=5123,vd=5125,ul=5126,_d=5126,Ga={int8:ud,int16:Zu,int32:cd,uint8:hd,uint16:dd,uint32:vd,float:ul,float32:_d},pd=35048,md=35040,nf={dynamic:pd,stream:md,static:35044},Cr=ss.flatten,Or=ss.shape,Xu=35044,gd=35040,cl=5121,hl=5126,ha=[];ha[5120]=1,ha[5122]=2,ha[5124]=4,ha[5121]=1,ha[5123]=2,ha[5125]=4,ha[5126]=4;function af(h){return ll[Object.prototype.toString.call(h)]|0}function dl(h,T){for(var G=0;G<T.length;++G)h[G]=T[G]}function qu(h,T,G,se,me,ae,fe){for(var Le=0,De=0;De<G;++De)for(var Ne=0;Ne<se;++Ne)h[Le++]=T[me*De+ae*Ne+fe]}function Sn(h,T,G,se){var me=0,ae={};function fe(K){this.id=me++,this.buffer=h.createBuffer(),this.type=K,this.usage=Xu,this.byteLength=0,this.dimension=1,this.dtype=cl,this.persistentData=null,G.profile&&(this.stats={size:0})}fe.prototype.bind=function(){h.bindBuffer(this.type,this.buffer)},fe.prototype.destroy=function(){We(this)};var Le=[];function De(K,oe){var Oe=Le.pop();return Oe||(Oe=new fe(K)),Oe.bind(),Be(Oe,oe,gd,0,1,!1),Oe}function Ne(K){Le.push(K)}function Ge(K,oe,Oe){K.byteLength=oe.byteLength,h.bufferData(K.type,oe,Oe)}function Be(K,oe,Oe,rt,Se,Qe){var je;if(K.usage=Oe,Array.isArray(oe)){if(K.dtype=rt||hl,oe.length>0){var pt;if(Array.isArray(oe[0])){je=Or(oe);for(var xe=1,ge=1;ge<je.length;++ge)xe*=je[ge];K.dimension=xe,pt=Cr(oe,je,K.dtype),Ge(K,pt,Oe),Qe?K.persistentData=pt:jt.freeType(pt)}else if(typeof oe[0]=="number"){K.dimension=Se;var lt=jt.allocType(K.dtype,oe.length);dl(lt,oe),Ge(K,lt,Oe),Qe?K.persistentData=lt:jt.freeType(lt)}else i(oe[0])?(K.dimension=oe[0].length,K.dtype=rt||af(oe[0])||hl,pt=Cr(oe,[oe.length,oe[0].length],K.dtype),Ge(K,pt,Oe),Qe?K.persistentData=pt:jt.freeType(pt)):E.raise("invalid buffer data")}}else if(i(oe))K.dtype=rt||af(oe),K.dimension=Se,Ge(K,oe,Oe),Qe&&(K.persistentData=new Uint8Array(new Uint8Array(oe.buffer)));else if(On(oe)){je=oe.shape;var Ve=oe.stride,Me=oe.offset,$e=0,qe=0,It=0,Lt=0;je.length===1?($e=je[0],qe=1,It=Ve[0],Lt=0):je.length===2?($e=je[0],qe=je[1],It=Ve[0],Lt=Ve[1]):E.raise("invalid shape"),K.dtype=rt||af(oe.data)||hl,K.dimension=qe;var Ke=jt.allocType(K.dtype,$e*qe);qu(Ke,oe.data,$e,qe,It,Lt,Me),Ge(K,Ke,Oe),Qe?K.persistentData=Ke:jt.freeType(Ke)}else oe instanceof ArrayBuffer?(K.dtype=cl,K.dimension=Se,Ge(K,oe,Oe),Qe&&(K.persistentData=new Uint8Array(new Uint8Array(oe)))):E.raise("invalid buffer data")}function We(K){T.bufferCount--,se(K);var oe=K.buffer;E(oe,"buffer must not be deleted already"),h.deleteBuffer(oe),K.buffer=null,delete ae[K.id]}function Ce(K,oe,Oe,rt){T.bufferCount++;var Se=new fe(oe);ae[Se.id]=Se;function Qe(xe){var ge=Xu,lt=null,Ve=0,Me=0,$e=1;return Array.isArray(xe)||i(xe)||On(xe)||xe instanceof ArrayBuffer?lt=xe:typeof xe=="number"?Ve=xe|0:xe&&(E.type(xe,"object","buffer arguments must be an object, a number or an array"),"data"in xe&&(E(lt===null||Array.isArray(lt)||i(lt)||On(lt),"invalid data for buffer"),lt=xe.data),"usage"in xe&&(E.parameter(xe.usage,nf,"invalid buffer usage"),ge=nf[xe.usage]),"type"in xe&&(E.parameter(xe.type,Ga,"invalid buffer type"),Me=Ga[xe.type]),"dimension"in xe&&(E.type(xe.dimension,"number","invalid dimension"),$e=xe.dimension|0),"length"in xe&&(E.nni(Ve,"buffer length must be a nonnegative integer"),Ve=xe.length|0)),Se.bind(),lt?Be(Se,lt,ge,Me,$e,rt):(Ve&&h.bufferData(Se.type,Ve,ge),Se.dtype=Me||cl,Se.usage=ge,Se.dimension=$e,Se.byteLength=Ve),G.profile&&(Se.stats.size=Se.byteLength*ha[Se.dtype]),Qe}function je(xe,ge){E(ge+xe.byteLength<=Se.byteLength,"invalid buffer subdata call, buffer is too small. Can't write data of size "+xe.byteLength+" starting from offset "+ge+" to a buffer of size "+Se.byteLength),h.bufferSubData(Se.type,ge,xe)}function pt(xe,ge){var lt=(ge||0)|0,Ve;if(Se.bind(),i(xe)||xe instanceof ArrayBuffer)je(xe,lt);else if(Array.isArray(xe)){if(xe.length>0)if(typeof xe[0]=="number"){var Me=jt.allocType(Se.dtype,xe.length);dl(Me,xe),je(Me,lt),jt.freeType(Me)}else if(Array.isArray(xe[0])||i(xe[0])){Ve=Or(xe);var $e=Cr(xe,Ve,Se.dtype);je($e,lt),jt.freeType($e)}else E.raise("invalid buffer data")}else if(On(xe)){Ve=xe.shape;var qe=xe.stride,It=0,Lt=0,Ke=0,Je=0;Ve.length===1?(It=Ve[0],Lt=1,Ke=qe[0],Je=0):Ve.length===2?(It=Ve[0],Lt=Ve[1],Ke=qe[0],Je=qe[1]):E.raise("invalid shape");var wt=Array.isArray(xe.data)?Se.dtype:af(xe.data),Ct=jt.allocType(wt,It*Lt);qu(Ct,xe.data,It,Lt,Ke,Je,xe.offset),je(Ct,lt),jt.freeType(Ct)}else E.raise("invalid data for buffer subdata");return Qe}return Oe||Qe(K),Qe._reglType="buffer",Qe._buffer=Se,Qe.subdata=pt,G.profile&&(Qe.stats=Se.stats),Qe.destroy=function(){We(Se)},Qe}function ke(){Zn(ae).forEach(function(K){K.buffer=h.createBuffer(),h.bindBuffer(K.type,K.buffer),h.bufferData(K.type,K.persistentData||K.byteLength,K.usage)})}return G.profile&&(T.getTotalBufferSize=function(){var K=0;return Object.keys(ae).forEach(function(oe){K+=ae[oe].stats.size}),K}),{create:Ce,createStream:De,destroyStream:Ne,clear:function(){Zn(ae).forEach(We),Le.forEach(We)},getBuffer:function(K){return K&&K._buffer instanceof fe?K._buffer:null},restore:ke,_initBuffer:Be}}var vl=0,Ua=0,Ku=1,_l=1,ii=4,ju=4,Xi={points:vl,point:Ua,lines:Ku,line:_l,triangles:ii,triangle:ju,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Qu=0,Ju=1,Ao=4,ec=5120,pn=5121,tc=5122,An=5123,rc=5124,da=5125,Fi=34963,of=35040,pl=35044;function Br(h,T,G,se){var me={},ae=0,fe={uint8:pn,uint16:An};T.oes_element_index_uint&&(fe.uint32=da);function Le(ke){this.id=ae++,me[this.id]=this,this.buffer=ke,this.primType=Ao,this.vertCount=0,this.type=0}Le.prototype.bind=function(){this.buffer.bind()};var De=[];function Ne(ke){var K=De.pop();return K||(K=new Le(G.create(null,Fi,!0,!1)._buffer)),Be(K,ke,of,-1,-1,0,0),K}function Ge(ke){De.push(ke)}function Be(ke,K,oe,Oe,rt,Se,Qe){ke.buffer.bind();var je;if(K){var pt=Qe;!Qe&&(!i(K)||On(K)&&!i(K.data))&&(pt=T.oes_element_index_uint?da:An),G._initBuffer(ke.buffer,K,oe,pt,3)}else h.bufferData(Fi,Se,oe),ke.buffer.dtype=je||pn,ke.buffer.usage=oe,ke.buffer.dimension=3,ke.buffer.byteLength=Se;if(je=Qe,!Qe){switch(ke.buffer.dtype){case pn:case ec:je=pn;break;case An:case tc:je=An;break;case da:case rc:je=da;break;default:E.raise("unsupported type for element array")}ke.buffer.dtype=je}ke.type=je,E(je!==da||!!T.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var xe=rt;xe<0&&(xe=ke.buffer.byteLength,je===An?xe>>=1:je===da&&(xe>>=2)),ke.vertCount=xe;var ge=Oe;if(Oe<0){ge=Ao;var lt=ke.buffer.dimension;lt===1&&(ge=Qu),lt===2&&(ge=Ju),lt===3&&(ge=Ao)}ke.primType=ge}function We(ke){se.elementsCount--,E(ke.buffer!==null,"must not double destroy elements"),delete me[ke.id],ke.buffer.destroy(),ke.buffer=null}function Ce(ke,K){var oe=G.create(null,Fi,!0),Oe=new Le(oe._buffer);se.elementsCount++;function rt(Se){if(!Se)oe(),Oe.primType=Ao,Oe.vertCount=0,Oe.type=pn;else if(typeof Se=="number")oe(Se),Oe.primType=Ao,Oe.vertCount=Se|0,Oe.type=pn;else{var Qe=null,je=pl,pt=-1,xe=-1,ge=0,lt=0;Array.isArray(Se)||i(Se)||On(Se)?Qe=Se:(E.type(Se,"object","invalid arguments for elements"),"data"in Se&&(Qe=Se.data,E(Array.isArray(Qe)||i(Qe)||On(Qe),"invalid data for element buffer")),"usage"in Se&&(E.parameter(Se.usage,nf,"invalid element buffer usage"),je=nf[Se.usage]),"primitive"in Se&&(E.parameter(Se.primitive,Xi,"invalid element buffer primitive"),pt=Xi[Se.primitive]),"count"in Se&&(E(typeof Se.count=="number"&&Se.count>=0,"invalid vertex count for elements"),xe=Se.count|0),"type"in Se&&(E.parameter(Se.type,fe,"invalid buffer type"),lt=fe[Se.type]),"length"in Se?ge=Se.length|0:(ge=xe,lt===An||lt===tc?ge*=2:(lt===da||lt===rc)&&(ge*=4))),Be(Oe,Qe,je,pt,xe,ge,lt)}return rt}return rt(ke),rt._reglType="elements",rt._elements=Oe,rt.subdata=function(Se,Qe){return oe.subdata(Se,Qe),rt},rt.destroy=function(){We(Oe)},rt}return{create:Ce,createStream:Ne,destroyStream:Ge,getElements:function(ke){return typeof ke=="function"&&ke._elements instanceof Le?ke._elements:null},clear:function(){Zn(me).forEach(We)}}}var qi=new Float32Array(1),ml=new Uint32Array(qi.buffer),yd=5123;function sf(h){for(var T=jt.allocType(yd,h.length),G=0;G<h.length;++G)if(isNaN(h[G]))T[G]=65535;else if(h[G]===1/0)T[G]=31744;else if(h[G]===-1/0)T[G]=64512;else{qi[0]=h[G];var se=ml[0],me=se>>>31<<15,ae=(se<<1>>>24)-127,fe=se>>13&(1<<10)-1;if(ae<-24)T[G]=me;else if(ae<-14){var Le=-14-ae;T[G]=me+(fe+(1<<10)>>Le)}else ae>15?T[G]=me+31744:T[G]=me+(ae+15<<10)+fe}return T}function Pr(h){return Array.isArray(h)||i(h)}var nc=function(h){return!(h&h-1)&&!!h},xd=34467,yi=3553,To=34067,Ki=34069,Ya=6408,ff=6406,fs=6407,Ha=6409,Eo=6410,gl=32854,yl=32855,lf=36194,xl=32819,bd=32820,ic=33635,jn=34042,ls=6402,va=34041,uf=35904,cf=35906,Do=36193,bl=33776,wl=33777,Sl=33778,Al=33779,za=35986,ac=35987,oc=34798,hf=35840,Tl=35841,ji=35842,us=35843,sc=36196,Lo=5121,El=5123,_a=5125,Yn=5126,fc=10242,wd=10243,Sd=10497,Dl=33071,Ad=33648,Td=10240,Ro=10241,te=9728,Ee=9729,ve=9984,gt=9985,Zt=9986,mr=9987,fn=33170,Er=4352,Ll=4353,Ed=4354,ai=34046,df=3317,Dd=37440,Co=37441,vf=37443,cs=37444,gr=33984,Ld=[ve,Zt,gt,mr],hs=[0,Ha,Eo,fs,Ya],Hn={};Hn[Ha]=Hn[ff]=Hn[ls]=1,Hn[va]=Hn[Eo]=2,Hn[fs]=Hn[uf]=3,Hn[Ya]=Hn[cf]=4;function Oo(h){return"[object "+h+"]"}var lc=Oo("HTMLCanvasElement"),uc=Oo("OffscreenCanvas"),ds=Oo("CanvasRenderingContext2D"),Qi=Oo("ImageBitmap"),vs=Oo("HTMLImageElement"),Rl=Oo("HTMLVideoElement"),_f=Object.keys(ll).concat([lc,uc,ds,Qi,vs,Rl]),Wa=[];Wa[Lo]=1,Wa[Yn]=4,Wa[Do]=2,Wa[El]=2,Wa[_a]=4;var ln=[];ln[gl]=2,ln[yl]=2,ln[lf]=2,ln[va]=4,ln[bl]=.5,ln[wl]=.5,ln[Sl]=1,ln[Al]=1,ln[za]=.5,ln[ac]=1,ln[oc]=1,ln[hf]=.5,ln[Tl]=.25,ln[ji]=.5,ln[us]=.25,ln[sc]=.5;function _s(h){return Array.isArray(h)&&(h.length===0||typeof h[0]=="number")}function Cl(h){if(!Array.isArray(h))return!1;var T=h.length;return!(T===0||!Pr(h[0]))}function xi(h){return Object.prototype.toString.call(h)}function pa(h){return xi(h)===lc}function ps(h){return xi(h)===uc}function Rd(h){return xi(h)===ds}function Cd(h){return xi(h)===Qi}function Od(h){return xi(h)===vs}function pf(h){return xi(h)===Rl}function Io(h){if(!h)return!1;var T=xi(h);return _f.indexOf(T)>=0?!0:_s(h)||Cl(h)||On(h)}function mf(h){return ll[Object.prototype.toString.call(h)]|0}function Id(h,T){var G=T.length;switch(h.type){case Lo:case El:case _a:case Yn:var se=jt.allocType(h.type,G);se.set(T),h.data=se;break;case Do:h.data=sf(T);break;default:E.raise("unsupported texture type, must specify a typed array")}}function Ol(h,T){return jt.allocType(h.type===Do?Yn:h.type,T)}function cc(h,T){h.type===Do?(h.data=sf(T),jt.freeType(T)):h.data=T}function Md(h,T,G,se,me,ae){for(var fe=h.width,Le=h.height,De=h.channels,Ne=fe*Le*De,Ge=Ol(h,Ne),Be=0,We=0;We<Le;++We)for(var Ce=0;Ce<fe;++Ce)for(var ke=0;ke<De;++ke)Ge[Be++]=T[G*Ce+se*We+me*ke+ae];cc(h,Ge)}function qr(h,T,G,se,me,ae){var fe;if(typeof ln[h]<"u"?fe=ln[h]:fe=Hn[h]*Wa[T],ae&&(fe*=6),me){for(var Le=0,De=G;De>=1;)Le+=fe*De*De,De/=2;return Le}else return fe*G*se}function In(h,T,G,se,me,ae,fe){var Le={"don't care":Er,"dont care":Er,nice:Ed,fast:Ll},De={repeat:Sd,clamp:Dl,mirror:Ad},Ne={nearest:te,linear:Ee},Ge=a({mipmap:mr,"nearest mipmap nearest":ve,"linear mipmap nearest":gt,"nearest mipmap linear":Zt,"linear mipmap linear":mr},Ne),Be={none:0,browser:cs},We={uint8:Lo,rgba4:xl,rgb565:ic,"rgb5 a1":bd},Ce={alpha:ff,luminance:Ha,"luminance alpha":Eo,rgb:fs,rgba:Ya,rgba4:gl,"rgb5 a1":yl,rgb565:lf},ke={};T.ext_srgb&&(Ce.srgb=uf,Ce.srgba=cf),T.oes_texture_float&&(We.float32=We.float=Yn),T.oes_texture_half_float&&(We.float16=We["half float"]=Do),T.webgl_depth_texture&&(a(Ce,{depth:ls,"depth stencil":va}),a(We,{uint16:El,uint32:_a,"depth stencil":jn})),T.webgl_compressed_texture_s3tc&&a(ke,{"rgb s3tc dxt1":bl,"rgba s3tc dxt1":wl,"rgba s3tc dxt3":Sl,"rgba s3tc dxt5":Al}),T.webgl_compressed_texture_atc&&a(ke,{"rgb atc":za,"rgba atc explicit alpha":ac,"rgba atc interpolated alpha":oc}),T.webgl_compressed_texture_pvrtc&&a(ke,{"rgb pvrtc 4bppv1":hf,"rgb pvrtc 2bppv1":Tl,"rgba pvrtc 4bppv1":ji,"rgba pvrtc 2bppv1":us}),T.webgl_compressed_texture_etc1&&(ke["rgb etc1"]=sc);var K=Array.prototype.slice.call(h.getParameter(xd));Object.keys(ke).forEach(function(k){var le=ke[k];K.indexOf(le)>=0&&(Ce[k]=le)});var oe=Object.keys(Ce);G.textureFormats=oe;var Oe=[];Object.keys(Ce).forEach(function(k){var le=Ce[k];Oe[le]=k});var rt=[];Object.keys(We).forEach(function(k){var le=We[k];rt[le]=k});var Se=[];Object.keys(Ne).forEach(function(k){var le=Ne[k];Se[le]=k});var Qe=[];Object.keys(Ge).forEach(function(k){var le=Ge[k];Qe[le]=k});var je=[];Object.keys(De).forEach(function(k){var le=De[k];je[le]=k});var pt=oe.reduce(function(k,le){var ne=Ce[le];return ne===Ha||ne===ff||ne===Ha||ne===Eo||ne===ls||ne===va||T.ext_srgb&&(ne===uf||ne===cf)?k[ne]=ne:ne===yl||le.indexOf("rgba")>=0?k[ne]=Ya:k[ne]=fs,k},{});function xe(){this.internalformat=Ya,this.format=Ya,this.type=Lo,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=cs,this.width=0,this.height=0,this.channels=0}function ge(k,le){k.internalformat=le.internalformat,k.format=le.format,k.type=le.type,k.compressed=le.compressed,k.premultiplyAlpha=le.premultiplyAlpha,k.flipY=le.flipY,k.unpackAlignment=le.unpackAlignment,k.colorSpace=le.colorSpace,k.width=le.width,k.height=le.height,k.channels=le.channels}function lt(k,le){if(!(typeof le!="object"||!le)){if("premultiplyAlpha"in le&&(E.type(le.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),k.premultiplyAlpha=le.premultiplyAlpha),"flipY"in le&&(E.type(le.flipY,"boolean","invalid texture flip"),k.flipY=le.flipY),"alignment"in le&&(E.oneOf(le.alignment,[1,2,4,8],"invalid texture unpack alignment"),k.unpackAlignment=le.alignment),"colorSpace"in le&&(E.parameter(le.colorSpace,Be,"invalid colorSpace"),k.colorSpace=Be[le.colorSpace]),"type"in le){var ne=le.type;E(T.oes_texture_float||!(ne==="float"||ne==="float32"),"you must enable the OES_texture_float extension in order to use floating point textures."),E(T.oes_texture_half_float||!(ne==="half float"||ne==="float16"),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),E(T.webgl_depth_texture||!(ne==="uint16"||ne==="uint32"||ne==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),E.parameter(ne,We,"invalid texture type"),k.type=We[ne]}var ft=k.width,zt=k.height,R=k.channels,y=!1;"shape"in le?(E(Array.isArray(le.shape)&&le.shape.length>=2,"shape must be an array"),ft=le.shape[0],zt=le.shape[1],le.shape.length===3&&(R=le.shape[2],E(R>0&&R<=4,"invalid number of channels"),y=!0),E(ft>=0&&ft<=G.maxTextureSize,"invalid width"),E(zt>=0&&zt<=G.maxTextureSize,"invalid height")):("radius"in le&&(ft=zt=le.radius,E(ft>=0&&ft<=G.maxTextureSize,"invalid radius")),"width"in le&&(ft=le.width,E(ft>=0&&ft<=G.maxTextureSize,"invalid width")),"height"in le&&(zt=le.height,E(zt>=0&&zt<=G.maxTextureSize,"invalid height")),"channels"in le&&(R=le.channels,E(R>0&&R<=4,"invalid number of channels"),y=!0)),k.width=ft|0,k.height=zt|0,k.channels=R|0;var H=!1;if("format"in le){var j=le.format;E(T.webgl_depth_texture||!(j==="depth"||j==="depth stencil"),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),E.parameter(j,Ce,"invalid texture format");var Q=k.internalformat=Ce[j];k.format=pt[Q],j in We&&("type"in le||(k.type=We[j])),j in ke&&(k.compressed=!0),H=!0}!y&&H?k.channels=Hn[k.format]:y&&!H?k.channels!==hs[k.format]&&(k.format=k.internalformat=hs[k.channels]):H&&y&&E(k.channels===Hn[k.format],"number of channels inconsistent with specified format")}}function Ve(k){h.pixelStorei(Dd,k.flipY),h.pixelStorei(Co,k.premultiplyAlpha),h.pixelStorei(vf,k.colorSpace),h.pixelStorei(df,k.unpackAlignment)}function Me(){xe.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function $e(k,le){var ne=null;if(Io(le)?ne=le:le&&(E.type(le,"object","invalid pixel data type"),lt(k,le),"x"in le&&(k.xOffset=le.x|0),"y"in le&&(k.yOffset=le.y|0),Io(le.data)&&(ne=le.data)),E(!k.compressed||ne instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),le.copy){E(!ne,"can not specify copy and data field for the same texture");var ft=me.viewportWidth,zt=me.viewportHeight;k.width=k.width||ft-k.xOffset,k.height=k.height||zt-k.yOffset,k.needsCopy=!0,E(k.xOffset>=0&&k.xOffset<ft&&k.yOffset>=0&&k.yOffset<zt&&k.width>0&&k.width<=ft&&k.height>0&&k.height<=zt,"copy texture read out of bounds")}else if(!ne)k.width=k.width||1,k.height=k.height||1,k.channels=k.channels||4;else if(i(ne))k.channels=k.channels||4,k.data=ne,!("type"in le)&&k.type===Lo&&(k.type=mf(ne));else if(_s(ne))k.channels=k.channels||4,Id(k,ne),k.alignment=1,k.needsFree=!0;else if(On(ne)){var R=ne.data;!Array.isArray(R)&&k.type===Lo&&(k.type=mf(R));var y=ne.shape,H=ne.stride,j,Q,W,Y,X,O;y.length===3?(W=y[2],O=H[2]):(E(y.length===2,"invalid ndarray pixel data, must be 2 or 3D"),W=1,O=1),j=y[0],Q=y[1],Y=H[0],X=H[1],k.alignment=1,k.width=j,k.height=Q,k.channels=W,k.format=k.internalformat=hs[W],k.needsFree=!0,Md(k,R,Y,X,O,ne.offset)}else if(pa(ne)||ps(ne)||Rd(ne))pa(ne)||ps(ne)?k.element=ne:k.element=ne.canvas,k.width=k.element.width,k.height=k.element.height,k.channels=4;else if(Cd(ne))k.element=ne,k.width=ne.width,k.height=ne.height,k.channels=4;else if(Od(ne))k.element=ne,k.width=ne.naturalWidth,k.height=ne.naturalHeight,k.channels=4;else if(pf(ne))k.element=ne,k.width=ne.videoWidth,k.height=ne.videoHeight,k.channels=4;else if(Cl(ne)){var N=k.width||ne[0].length,M=k.height||ne.length,re=k.channels;Pr(ne[0][0])?re=re||ne[0][0].length:re=re||1;for(var ee=ss.shape(ne),_e=1,be=0;be<ee.length;++be)_e*=ee[be];var Ye=Ol(k,_e);ss.flatten(ne,ee,"",Ye),cc(k,Ye),k.alignment=1,k.width=N,k.height=M,k.channels=re,k.format=k.internalformat=hs[re],k.needsFree=!0}k.type===Yn?E(G.extensions.indexOf("oes_texture_float")>=0,"oes_texture_float extension not enabled"):k.type===Do&&E(G.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function qe(k,le,ne){var ft=k.element,zt=k.data,R=k.internalformat,y=k.format,H=k.type,j=k.width,Q=k.height;Ve(k),ft?h.texImage2D(le,ne,y,y,H,ft):k.compressed?h.compressedTexImage2D(le,ne,R,j,Q,0,zt):k.needsCopy?(se(),h.copyTexImage2D(le,ne,y,k.xOffset,k.yOffset,j,Q,0)):h.texImage2D(le,ne,y,j,Q,0,y,H,zt||null)}function It(k,le,ne,ft,zt){var R=k.element,y=k.data,H=k.internalformat,j=k.format,Q=k.type,W=k.width,Y=k.height;Ve(k),R?h.texSubImage2D(le,zt,ne,ft,j,Q,R):k.compressed?h.compressedTexSubImage2D(le,zt,ne,ft,H,W,Y,y):k.needsCopy?(se(),h.copyTexSubImage2D(le,zt,ne,ft,k.xOffset,k.yOffset,W,Y)):h.texSubImage2D(le,zt,ne,ft,W,Y,j,Q,y)}var Lt=[];function Ke(){return Lt.pop()||new Me}function Je(k){k.needsFree&&jt.freeType(k.data),Me.call(k),Lt.push(k)}function wt(){xe.call(this),this.genMipmaps=!1,this.mipmapHint=Er,this.mipmask=0,this.images=Array(16)}function Ct(k,le,ne){var ft=k.images[0]=Ke();k.mipmask=1,ft.width=k.width=le,ft.height=k.height=ne,ft.channels=k.channels=4}function Vt(k,le){var ne=null;if(Io(le))ne=k.images[0]=Ke(),ge(ne,k),$e(ne,le),k.mipmask=1;else if(lt(k,le),Array.isArray(le.mipmap))for(var ft=le.mipmap,zt=0;zt<ft.length;++zt)ne=k.images[zt]=Ke(),ge(ne,k),ne.width>>=zt,ne.height>>=zt,$e(ne,ft[zt]),k.mipmask|=1<<zt;else ne=k.images[0]=Ke(),ge(ne,k),$e(ne,le),k.mipmask=1;ge(k,k.images[0]),k.compressed&&(k.internalformat===bl||k.internalformat===wl||k.internalformat===Sl||k.internalformat===Al)&&E(k.width%4===0&&k.height%4===0,"for compressed texture formats, mipmap level 0 must have width and height that are a multiple of 4")}function Ir(k,le){for(var ne=k.images,ft=0;ft<ne.length;++ft){if(!ne[ft])return;qe(ne[ft],le,ft)}}var Lr=[];function Xt(){var k=Lr.pop()||new wt;xe.call(k),k.mipmask=0;for(var le=0;le<16;++le)k.images[le]=null;return k}function Dr(k){for(var le=k.images,ne=0;ne<le.length;++ne)le[ne]&&Je(le[ne]),le[ne]=null;Lr.push(k)}function pr(){this.minFilter=te,this.magFilter=te,this.wrapS=Dl,this.wrapT=Dl,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=Er}function Kr(k,le){if("min"in le){var ne=le.min;E.parameter(ne,Ge),k.minFilter=Ge[ne],Ld.indexOf(k.minFilter)>=0&&!("faces"in le)&&(k.genMipmaps=!0)}if("mag"in le){var ft=le.mag;E.parameter(ft,Ne),k.magFilter=Ne[ft]}var zt=k.wrapS,R=k.wrapT;if("wrap"in le){var y=le.wrap;typeof y=="string"?(E.parameter(y,De),zt=R=De[y]):Array.isArray(y)&&(E.parameter(y[0],De),E.parameter(y[1],De),zt=De[y[0]],R=De[y[1]])}else{if("wrapS"in le){var H=le.wrapS;E.parameter(H,De),zt=De[H]}if("wrapT"in le){var j=le.wrapT;E.parameter(j,De),R=De[j]}}if(k.wrapS=zt,k.wrapT=R,"anisotropic"in le){var Q=le.anisotropic;E(typeof Q=="number"&&Q>=1&&Q<=G.maxAnisotropic,"aniso samples must be between 1 and "),k.anisotropic=le.anisotropic}if("mipmap"in le){var W=!1;switch(typeof le.mipmap){case"string":E.parameter(le.mipmap,Le,"invalid mipmap hint"),k.mipmapHint=Le[le.mipmap],k.genMipmaps=!0,W=!0;break;case"boolean":W=k.genMipmaps=le.mipmap;break;case"object":E(Array.isArray(le.mipmap),"invalid mipmap type"),k.genMipmaps=!1,W=!0;break;default:E.raise("invalid mipmap type")}W&&!("min"in le)&&(k.minFilter=ve)}}function jr(k,le){h.texParameteri(le,Ro,k.minFilter),h.texParameteri(le,Td,k.magFilter),h.texParameteri(le,fc,k.wrapS),h.texParameteri(le,wd,k.wrapT),T.ext_texture_filter_anisotropic&&h.texParameteri(le,ai,k.anisotropic),k.genMipmaps&&(h.hint(fn,k.mipmapHint),h.generateMipmap(le))}var tn=0,un={},gn=G.maxTextureUnits,Wr=Array(gn).map(function(){return null});function Ut(k){xe.call(this),this.mipmask=0,this.internalformat=Ya,this.id=tn++,this.refCount=1,this.target=k,this.texture=h.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new pr,fe.profile&&(this.stats={size:0})}function yn(k){h.activeTexture(gr),h.bindTexture(k.target,k.texture)}function hr(){var k=Wr[0];k?h.bindTexture(k.target,k.texture):h.bindTexture(yi,null)}function At(k){var le=k.texture;E(le,"must not double destroy texture");var ne=k.unit,ft=k.target;ne>=0&&(h.activeTexture(gr+ne),h.bindTexture(ft,null),Wr[ne]=null),h.deleteTexture(le),k.texture=null,k.params=null,k.pixels=null,k.refCount=0,delete un[k.id],ae.textureCount--}a(Ut.prototype,{bind:function(){var k=this;k.bindCount+=1;var le=k.unit;if(le<0){for(var ne=0;ne<gn;++ne){var ft=Wr[ne];if(ft){if(ft.bindCount>0)continue;ft.unit=-1}Wr[ne]=k,le=ne;break}le>=gn&&E.raise("insufficient number of texture units"),fe.profile&&ae.maxTextureUnits<le+1&&(ae.maxTextureUnits=le+1),k.unit=le,h.activeTexture(gr+le),h.bindTexture(k.target,k.texture)}return le},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&At(this)}});function qt(k,le){var ne=new Ut(yi);un[ne.id]=ne,ae.textureCount++;function ft(y,H){var j=ne.texInfo;pr.call(j);var Q=Xt();return typeof y=="number"?typeof H=="number"?Ct(Q,y|0,H|0):Ct(Q,y|0,y|0):y?(E.type(y,"object","invalid arguments to regl.texture"),Kr(j,y),Vt(Q,y)):Ct(Q,1,1),j.genMipmaps&&(Q.mipmask=(Q.width<<1)-1),ne.mipmask=Q.mipmask,ge(ne,Q),E.texture2D(j,Q,G),ne.internalformat=Q.internalformat,ft.width=Q.width,ft.height=Q.height,yn(ne),Ir(Q,yi),jr(j,yi),hr(),Dr(Q),fe.profile&&(ne.stats.size=qr(ne.internalformat,ne.type,Q.width,Q.height,j.genMipmaps,!1)),ft.format=Oe[ne.internalformat],ft.type=rt[ne.type],ft.mag=Se[j.magFilter],ft.min=Qe[j.minFilter],ft.wrapS=je[j.wrapS],ft.wrapT=je[j.wrapT],ft}function zt(y,H,j,Q){E(!!y,"must specify image data");var W=H|0,Y=j|0,X=Q|0,O=Ke();return ge(O,ne),O.width=0,O.height=0,$e(O,y),O.width=O.width||(ne.width>>X)-W,O.height=O.height||(ne.height>>X)-Y,E(ne.type===O.type&&ne.format===O.format&&ne.internalformat===O.internalformat,"incompatible format for texture.subimage"),E(W>=0&&Y>=0&&W+O.width<=ne.width&&Y+O.height<=ne.height,"texture.subimage write out of bounds"),E(ne.mipmask&1<<X,"missing mipmap data"),E(O.data||O.element||O.needsCopy,"missing image data"),yn(ne),It(O,yi,W,Y,X),hr(),Je(O),ft}function R(y,H){var j=y|0,Q=H|0||j;if(j===ne.width&&Q===ne.height)return ft;ft.width=ne.width=j,ft.height=ne.height=Q,yn(ne);for(var W=0;ne.mipmask>>W;++W){var Y=j>>W,X=Q>>W;if(!Y||!X)break;h.texImage2D(yi,W,ne.format,Y,X,0,ne.format,ne.type,null)}return hr(),fe.profile&&(ne.stats.size=qr(ne.internalformat,ne.type,j,Q,!1,!1)),ft}return ft(k,le),ft.subimage=zt,ft.resize=R,ft._reglType="texture2d",ft._texture=ne,fe.profile&&(ft.stats=ne.stats),ft.destroy=function(){ne.decRef()},ft}function er(k,le,ne,ft,zt,R){var y=new Ut(To);un[y.id]=y,ae.cubeCount++;var H=new Array(6);function j(Y,X,O,N,M,re){var ee,_e=y.texInfo;for(pr.call(_e),ee=0;ee<6;++ee)H[ee]=Xt();if(typeof Y=="number"||!Y){var be=Y|0||1;for(ee=0;ee<6;++ee)Ct(H[ee],be,be)}else if(typeof Y=="object")if(X)Vt(H[0],Y),Vt(H[1],X),Vt(H[2],O),Vt(H[3],N),Vt(H[4],M),Vt(H[5],re);else if(Kr(_e,Y),lt(y,Y),"faces"in Y){var Ye=Y.faces;for(E(Array.isArray(Ye)&&Ye.length===6,"cube faces must be a length 6 array"),ee=0;ee<6;++ee)E(typeof Ye[ee]=="object"&&!!Ye[ee],"invalid input for cube map face"),ge(H[ee],y),Vt(H[ee],Ye[ee])}else for(ee=0;ee<6;++ee)Vt(H[ee],Y);else E.raise("invalid arguments to cube map");for(ge(y,H[0]),E.optional(function(){G.npotTextureCube||E(nc(y.width)&&nc(y.height),"your browser does not support non power or two texture dimensions")}),_e.genMipmaps?y.mipmask=(H[0].width<<1)-1:y.mipmask=H[0].mipmask,E.textureCube(y,_e,H,G),y.internalformat=H[0].internalformat,j.width=H[0].width,j.height=H[0].height,yn(y),ee=0;ee<6;++ee)Ir(H[ee],Ki+ee);for(jr(_e,To),hr(),fe.profile&&(y.stats.size=qr(y.internalformat,y.type,j.width,j.height,_e.genMipmaps,!0)),j.format=Oe[y.internalformat],j.type=rt[y.type],j.mag=Se[_e.magFilter],j.min=Qe[_e.minFilter],j.wrapS=je[_e.wrapS],j.wrapT=je[_e.wrapT],ee=0;ee<6;++ee)Dr(H[ee]);return j}function Q(Y,X,O,N,M){E(!!X,"must specify image data"),E(typeof Y=="number"&&Y===(Y|0)&&Y>=0&&Y<6,"invalid face");var re=O|0,ee=N|0,_e=M|0,be=Ke();return ge(be,y),be.width=0,be.height=0,$e(be,X),be.width=be.width||(y.width>>_e)-re,be.height=be.height||(y.height>>_e)-ee,E(y.type===be.type&&y.format===be.format&&y.internalformat===be.internalformat,"incompatible format for texture.subimage"),E(re>=0&&ee>=0&&re+be.width<=y.width&&ee+be.height<=y.height,"texture.subimage write out of bounds"),E(y.mipmask&1<<_e,"missing mipmap data"),E(be.data||be.element||be.needsCopy,"missing image data"),yn(y),It(be,Ki+Y,re,ee,_e),hr(),Je(be),j}function W(Y){var X=Y|0;if(X!==y.width){j.width=y.width=X,j.height=y.height=X,yn(y);for(var O=0;O<6;++O)for(var N=0;y.mipmask>>N;++N)h.texImage2D(Ki+O,N,y.format,X>>N,X>>N,0,y.format,y.type,null);return hr(),fe.profile&&(y.stats.size=qr(y.internalformat,y.type,j.width,j.height,!1,!0)),j}}return j(k,le,ne,ft,zt,R),j.subimage=Q,j.resize=W,j._reglType="textureCube",j._texture=y,fe.profile&&(j.stats=y.stats),j.destroy=function(){y.decRef()},j}function Vr(){for(var k=0;k<gn;++k)h.activeTexture(gr+k),h.bindTexture(yi,null),Wr[k]=null;Zn(un).forEach(At),ae.cubeCount=0,ae.textureCount=0}fe.profile&&(ae.getTotalTextureSize=function(){var k=0;return Object.keys(un).forEach(function(le){k+=un[le].stats.size}),k});function Ei(){for(var k=0;k<gn;++k){var le=Wr[k];le&&(le.bindCount=0,le.unit=-1,Wr[k]=null)}Zn(un).forEach(function(ne){ne.texture=h.createTexture(),h.bindTexture(ne.target,ne.texture);for(var ft=0;ft<32;++ft)if((ne.mipmask&1<<ft)!==0)if(ne.target===yi)h.texImage2D(yi,ft,ne.internalformat,ne.width>>ft,ne.height>>ft,0,ne.internalformat,ne.type,null);else for(var zt=0;zt<6;++zt)h.texImage2D(Ki+zt,ft,ne.internalformat,ne.width>>ft,ne.height>>ft,0,ne.internalformat,ne.type,null);jr(ne.texInfo,ne.target)})}function Da(){for(var k=0;k<gn;++k){var le=Wr[k];le&&(le.bindCount=0,le.unit=-1,Wr[k]=null),h.activeTexture(gr+k),h.bindTexture(yi,null),h.bindTexture(To,null)}}return{create2D:qt,createCube:er,clear:Vr,getTexture:function(k){return null},restore:Ei,refresh:Da}}var ma=36161,gf=32854,Il=32855,hc=36194,yf=33189,Mo=36168,xf=34041,Va=35907,Fo=34836,ko=34842,ms=34843,Mn=[];Mn[gf]=2,Mn[Il]=2,Mn[hc]=2,Mn[yf]=2,Mn[Mo]=1,Mn[xf]=4,Mn[Va]=4,Mn[Fo]=16,Mn[ko]=8,Mn[ms]=6;function dc(h,T,G){return Mn[h]*T*G}var Fd=function(h,T,G,se,me){var ae={rgba4:gf,rgb565:hc,"rgb5 a1":Il,depth:yf,stencil:Mo,"depth stencil":xf};T.ext_srgb&&(ae.srgba=Va),T.ext_color_buffer_half_float&&(ae.rgba16f=ko,ae.rgb16f=ms),T.webgl_color_buffer_float&&(ae.rgba32f=Fo);var fe=[];Object.keys(ae).forEach(function(Ce){var ke=ae[Ce];fe[ke]=Ce});var Le=0,De={};function Ne(Ce){this.id=Le++,this.refCount=1,this.renderbuffer=Ce,this.format=gf,this.width=0,this.height=0,me.profile&&(this.stats={size:0})}Ne.prototype.decRef=function(){--this.refCount<=0&&Ge(this)};function Ge(Ce){var ke=Ce.renderbuffer;E(ke,"must not double destroy renderbuffer"),h.bindRenderbuffer(ma,null),h.deleteRenderbuffer(ke),Ce.renderbuffer=null,Ce.refCount=0,delete De[Ce.id],se.renderbufferCount--}function Be(Ce,ke){var K=new Ne(h.createRenderbuffer());De[K.id]=K,se.renderbufferCount++;function oe(rt,Se){var Qe=0,je=0,pt=gf;if(typeof rt=="object"&&rt){var xe=rt;if("shape"in xe){var ge=xe.shape;E(Array.isArray(ge)&&ge.length>=2,"invalid renderbuffer shape"),Qe=ge[0]|0,je=ge[1]|0}else"radius"in xe&&(Qe=je=xe.radius|0),"width"in xe&&(Qe=xe.width|0),"height"in xe&&(je=xe.height|0);"format"in xe&&(E.parameter(xe.format,ae,"invalid renderbuffer format"),pt=ae[xe.format])}else typeof rt=="number"?(Qe=rt|0,typeof Se=="number"?je=Se|0:je=Qe):rt?E.raise("invalid arguments to renderbuffer constructor"):Qe=je=1;if(E(Qe>0&&je>0&&Qe<=G.maxRenderbufferSize&&je<=G.maxRenderbufferSize,"invalid renderbuffer size"),!(Qe===K.width&&je===K.height&&pt===K.format))return oe.width=K.width=Qe,oe.height=K.height=je,K.format=pt,h.bindRenderbuffer(ma,K.renderbuffer),h.renderbufferStorage(ma,pt,Qe,je),E(h.getError()===0,"invalid render buffer format"),me.profile&&(K.stats.size=dc(K.format,K.width,K.height)),oe.format=fe[K.format],oe}function Oe(rt,Se){var Qe=rt|0,je=Se|0||Qe;return Qe===K.width&&je===K.height||(E(Qe>0&&je>0&&Qe<=G.maxRenderbufferSize&&je<=G.maxRenderbufferSize,"invalid renderbuffer size"),oe.width=K.width=Qe,oe.height=K.height=je,h.bindRenderbuffer(ma,K.renderbuffer),h.renderbufferStorage(ma,K.format,Qe,je),E(h.getError()===0,"invalid render buffer format"),me.profile&&(K.stats.size=dc(K.format,K.width,K.height))),oe}return oe(Ce,ke),oe.resize=Oe,oe._reglType="renderbuffer",oe._renderbuffer=K,me.profile&&(oe.stats=K.stats),oe.destroy=function(){K.decRef()},oe}me.profile&&(se.getTotalRenderbufferSize=function(){var Ce=0;return Object.keys(De).forEach(function(ke){Ce+=De[ke].stats.size}),Ce});function We(){Zn(De).forEach(function(Ce){Ce.renderbuffer=h.createRenderbuffer(),h.bindRenderbuffer(ma,Ce.renderbuffer),h.renderbufferStorage(ma,Ce.format,Ce.width,Ce.height)}),h.bindRenderbuffer(ma,null)}return{create:Be,clear:function(){Zn(De).forEach(Ge)},restore:We}},Ji=36160,Ml=36161,$a=3553,Za=34069,Po=36064,Fl=36096,S=36128,Xa=33306,gs=36053,oi=36054,cr=36055,kd=36057,Pd=36061,Nd=36193,qa=5121,Bd=5126,vc=6407,_c=6408,Gd=6402,Ud=[vc,_c],bi=[];bi[_c]=4,bi[vc]=3;var bf=[];bf[qa]=1,bf[Bd]=4,bf[Nd]=2;var Yd=32854,Hd=32855,zd=36194,Wd=33189,ea=36168,pc=34041,Vd=35907,$d=34836,Zd=34842,Xd=34843,Ka=[Yd,Hd,zd,Vd,Zd,Xd,$d],No={};No[gs]="complete",No[oi]="incomplete attachment",No[kd]="incomplete dimensions",No[cr]="incomplete, missing attachment",No[Pd]="unsupported";function qd(h,T,G,se,me,ae){var fe={cur:null,next:null,dirty:!1,setFBO:null},Le=["rgba"],De=["rgba4","rgb565","rgb5 a1"];T.ext_srgb&&De.push("srgba"),T.ext_color_buffer_half_float&&De.push("rgba16f","rgb16f"),T.webgl_color_buffer_float&&De.push("rgba32f");var Ne=["uint8"];T.oes_texture_half_float&&Ne.push("half float","float16"),T.oes_texture_float&&Ne.push("float","float32");function Ge(Me,$e,qe){this.target=Me,this.texture=$e,this.renderbuffer=qe;var It=0,Lt=0;$e?(It=$e.width,Lt=$e.height):qe&&(It=qe.width,Lt=qe.height),this.width=It,this.height=Lt}function Be(Me){Me&&(Me.texture&&Me.texture._texture.decRef(),Me.renderbuffer&&Me.renderbuffer._renderbuffer.decRef())}function We(Me,$e,qe){if(!!Me)if(Me.texture){var It=Me.texture._texture,Lt=Math.max(1,It.width),Ke=Math.max(1,It.height);E(Lt===$e&&Ke===qe,"inconsistent width/height for supplied texture"),It.refCount+=1}else{var Je=Me.renderbuffer._renderbuffer;E(Je.width===$e&&Je.height===qe,"inconsistent width/height for renderbuffer"),Je.refCount+=1}}function Ce(Me,$e){$e&&($e.texture?h.framebufferTexture2D(Ji,Me,$e.target,$e.texture._texture.texture,0):h.framebufferRenderbuffer(Ji,Me,Ml,$e.renderbuffer._renderbuffer.renderbuffer))}function ke(Me){var $e=$a,qe=null,It=null,Lt=Me;typeof Me=="object"&&(Lt=Me.data,"target"in Me&&($e=Me.target|0)),E.type(Lt,"function","invalid attachment data");var Ke=Lt._reglType;return Ke==="texture2d"?(qe=Lt,E($e===$a)):Ke==="textureCube"?(qe=Lt,E($e>=Za&&$e<Za+6,"invalid cube map target")):Ke==="renderbuffer"?(It=Lt,$e=Ml):E.raise("invalid regl object for attachment"),new Ge($e,qe,It)}function K(Me,$e,qe,It,Lt){if(qe){var Ke=se.create2D({width:Me,height:$e,format:It,type:Lt});return Ke._texture.refCount=0,new Ge($a,Ke,null)}else{var Je=me.create({width:Me,height:$e,format:It});return Je._renderbuffer.refCount=0,new Ge(Ml,null,Je)}}function oe(Me){return Me&&(Me.texture||Me.renderbuffer)}function Oe(Me,$e,qe){Me&&(Me.texture?Me.texture.resize($e,qe):Me.renderbuffer&&Me.renderbuffer.resize($e,qe),Me.width=$e,Me.height=qe)}var rt=0,Se={};function Qe(){this.id=rt++,Se[this.id]=this,this.framebuffer=h.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function je(Me){Me.colorAttachments.forEach(Be),Be(Me.depthAttachment),Be(Me.stencilAttachment),Be(Me.depthStencilAttachment)}function pt(Me){var $e=Me.framebuffer;E($e,"must not double destroy framebuffer"),h.deleteFramebuffer($e),Me.framebuffer=null,ae.framebufferCount--,delete Se[Me.id]}function xe(Me){var $e;h.bindFramebuffer(Ji,Me.framebuffer);var qe=Me.colorAttachments;for($e=0;$e<qe.length;++$e)Ce(Po+$e,qe[$e]);for($e=qe.length;$e<G.maxColorAttachments;++$e)h.framebufferTexture2D(Ji,Po+$e,$a,null,0);h.framebufferTexture2D(Ji,Xa,$a,null,0),h.framebufferTexture2D(Ji,Fl,$a,null,0),h.framebufferTexture2D(Ji,S,$a,null,0),Ce(Fl,Me.depthAttachment),Ce(S,Me.stencilAttachment),Ce(Xa,Me.depthStencilAttachment);var It=h.checkFramebufferStatus(Ji);!h.isContextLost()&&It!==gs&&E.raise("framebuffer configuration not supported, status = "+No[It]),h.bindFramebuffer(Ji,fe.next?fe.next.framebuffer:null),fe.cur=fe.next,h.getError()}function ge(Me,$e){var qe=new Qe;ae.framebufferCount++;function It(Ke,Je){var wt;E(fe.next!==qe,"can not update framebuffer which is currently in use");var Ct=0,Vt=0,Ir=!0,Lr=!0,Xt=null,Dr=!0,pr="rgba",Kr="uint8",jr=1,tn=null,un=null,gn=null,Wr=!1;if(typeof Ke=="number")Ct=Ke|0,Vt=Je|0||Ct;else if(!Ke)Ct=Vt=1;else{E.type(Ke,"object","invalid arguments for framebuffer");var Ut=Ke;if("shape"in Ut){var yn=Ut.shape;E(Array.isArray(yn)&&yn.length>=2,"invalid shape for framebuffer"),Ct=yn[0],Vt=yn[1]}else"radius"in Ut&&(Ct=Vt=Ut.radius),"width"in Ut&&(Ct=Ut.width),"height"in Ut&&(Vt=Ut.height);("color"in Ut||"colors"in Ut)&&(Xt=Ut.color||Ut.colors,Array.isArray(Xt)&&E(Xt.length===1||T.webgl_draw_buffers,"multiple render targets not supported")),Xt||("colorCount"in Ut&&(jr=Ut.colorCount|0,E(jr>0,"invalid color buffer count")),"colorTexture"in Ut&&(Dr=!!Ut.colorTexture,pr="rgba4"),"colorType"in Ut&&(Kr=Ut.colorType,Dr?(E(T.oes_texture_float||!(Kr==="float"||Kr==="float32"),"you must enable OES_texture_float in order to use floating point framebuffer objects"),E(T.oes_texture_half_float||!(Kr==="half float"||Kr==="float16"),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):Kr==="half float"||Kr==="float16"?(E(T.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),pr="rgba16f"):(Kr==="float"||Kr==="float32")&&(E(T.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),pr="rgba32f"),E.oneOf(Kr,Ne,"invalid color type")),"colorFormat"in Ut&&(pr=Ut.colorFormat,Le.indexOf(pr)>=0?Dr=!0:De.indexOf(pr)>=0?Dr=!1:E.optional(function(){Dr?E.oneOf(Ut.colorFormat,Le,"invalid color format for texture"):E.oneOf(Ut.colorFormat,De,"invalid color format for renderbuffer")}))),("depthTexture"in Ut||"depthStencilTexture"in Ut)&&(Wr=!!(Ut.depthTexture||Ut.depthStencilTexture),E(!Wr||T.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in Ut&&(typeof Ut.depth=="boolean"?Ir=Ut.depth:(tn=Ut.depth,Lr=!1)),"stencil"in Ut&&(typeof Ut.stencil=="boolean"?Lr=Ut.stencil:(un=Ut.stencil,Ir=!1)),"depthStencil"in Ut&&(typeof Ut.depthStencil=="boolean"?Ir=Lr=Ut.depthStencil:(gn=Ut.depthStencil,Ir=!1,Lr=!1))}var hr=null,At=null,qt=null,er=null;if(Array.isArray(Xt))hr=Xt.map(ke);else if(Xt)hr=[ke(Xt)];else for(hr=new Array(jr),wt=0;wt<jr;++wt)hr[wt]=K(Ct,Vt,Dr,pr,Kr);E(T.webgl_draw_buffers||hr.length<=1,"you must enable the WEBGL_draw_buffers extension in order to use multiple color buffers."),E(hr.length<=G.maxColorAttachments,"too many color attachments, not supported"),Ct=Ct||hr[0].width,Vt=Vt||hr[0].height,tn?At=ke(tn):Ir&&!Lr&&(At=K(Ct,Vt,Wr,"depth","uint32")),un?qt=ke(un):Lr&&!Ir&&(qt=K(Ct,Vt,!1,"stencil","uint8")),gn?er=ke(gn):!tn&&!un&&Lr&&Ir&&(er=K(Ct,Vt,Wr,"depth stencil","depth stencil")),E(!!tn+!!un+!!gn<=1,"invalid framebuffer configuration, can specify exactly one depth/stencil attachment");var Vr=null;for(wt=0;wt<hr.length;++wt)if(We(hr[wt],Ct,Vt),E(!hr[wt]||hr[wt].texture&&Ud.indexOf(hr[wt].texture._texture.format)>=0||hr[wt].renderbuffer&&Ka.indexOf(hr[wt].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+wt+" is invalid"),hr[wt]&&hr[wt].texture){var Ei=bi[hr[wt].texture._texture.format]*bf[hr[wt].texture._texture.type];Vr===null?Vr=Ei:E(Vr===Ei,"all color attachments much have the same number of bits per pixel.")}return We(At,Ct,Vt),E(!At||At.texture&&At.texture._texture.format===Gd||At.renderbuffer&&At.renderbuffer._renderbuffer.format===Wd,"invalid depth attachment for framebuffer object"),We(qt,Ct,Vt),E(!qt||qt.renderbuffer&&qt.renderbuffer._renderbuffer.format===ea,"invalid stencil attachment for framebuffer object"),We(er,Ct,Vt),E(!er||er.texture&&er.texture._texture.format===pc||er.renderbuffer&&er.renderbuffer._renderbuffer.format===pc,"invalid depth-stencil attachment for framebuffer object"),je(qe),qe.width=Ct,qe.height=Vt,qe.colorAttachments=hr,qe.depthAttachment=At,qe.stencilAttachment=qt,qe.depthStencilAttachment=er,It.color=hr.map(oe),It.depth=oe(At),It.stencil=oe(qt),It.depthStencil=oe(er),It.width=qe.width,It.height=qe.height,xe(qe),It}function Lt(Ke,Je){E(fe.next!==qe,"can not resize a framebuffer which is currently in use");var wt=Math.max(Ke|0,1),Ct=Math.max(Je|0||wt,1);if(wt===qe.width&&Ct===qe.height)return It;for(var Vt=qe.colorAttachments,Ir=0;Ir<Vt.length;++Ir)Oe(Vt[Ir],wt,Ct);return Oe(qe.depthAttachment,wt,Ct),Oe(qe.stencilAttachment,wt,Ct),Oe(qe.depthStencilAttachment,wt,Ct),qe.width=It.width=wt,qe.height=It.height=Ct,xe(qe),It}return It(Me,$e),a(It,{resize:Lt,_reglType:"framebuffer",_framebuffer:qe,destroy:function(){pt(qe),je(qe)},use:function(Ke){fe.setFBO({framebuffer:It},Ke)}})}function lt(Me){var $e=Array(6);function qe(Lt){var Ke;E($e.indexOf(fe.next)<0,"can not update framebuffer which is currently in use");var Je={color:null},wt=0,Ct=null,Vt="rgba",Ir="uint8",Lr=1;if(typeof Lt=="number")wt=Lt|0;else if(!Lt)wt=1;else{E.type(Lt,"object","invalid arguments for framebuffer");var Xt=Lt;if("shape"in Xt){var Dr=Xt.shape;E(Array.isArray(Dr)&&Dr.length>=2,"invalid shape for framebuffer"),E(Dr[0]===Dr[1],"cube framebuffer must be square"),wt=Dr[0]}else"radius"in Xt&&(wt=Xt.radius|0),"width"in Xt?(wt=Xt.width|0,"height"in Xt&&E(Xt.height===wt,"must be square")):"height"in Xt&&(wt=Xt.height|0);("color"in Xt||"colors"in Xt)&&(Ct=Xt.color||Xt.colors,Array.isArray(Ct)&&E(Ct.length===1||T.webgl_draw_buffers,"multiple render targets not supported")),Ct||("colorCount"in Xt&&(Lr=Xt.colorCount|0,E(Lr>0,"invalid color buffer count")),"colorType"in Xt&&(E.oneOf(Xt.colorType,Ne,"invalid color type"),Ir=Xt.colorType),"colorFormat"in Xt&&(Vt=Xt.colorFormat,E.oneOf(Xt.colorFormat,Le,"invalid color format for texture"))),"depth"in Xt&&(Je.depth=Xt.depth),"stencil"in Xt&&(Je.stencil=Xt.stencil),"depthStencil"in Xt&&(Je.depthStencil=Xt.depthStencil)}var pr;if(Ct)if(Array.isArray(Ct))for(pr=[],Ke=0;Ke<Ct.length;++Ke)pr[Ke]=Ct[Ke];else pr=[Ct];else{pr=Array(Lr);var Kr={radius:wt,format:Vt,type:Ir};for(Ke=0;Ke<Lr;++Ke)pr[Ke]=se.createCube(Kr)}for(Je.color=Array(pr.length),Ke=0;Ke<pr.length;++Ke){var jr=pr[Ke];E(typeof jr=="function"&&jr._reglType==="textureCube","invalid cube map"),wt=wt||jr.width,E(jr.width===wt&&jr.height===wt,"invalid cube map shape"),Je.color[Ke]={target:Za,data:pr[Ke]}}for(Ke=0;Ke<6;++Ke){for(var tn=0;tn<pr.length;++tn)Je.color[tn].target=Za+Ke;Ke>0&&(Je.depth=$e[0].depth,Je.stencil=$e[0].stencil,Je.depthStencil=$e[0].depthStencil),$e[Ke]?$e[Ke](Je):$e[Ke]=ge(Je)}return a(qe,{width:wt,height:wt,color:pr})}function It(Lt){var Ke,Je=Lt|0;if(E(Je>0&&Je<=G.maxCubeMapSize,"invalid radius for cube fbo"),Je===qe.width)return qe;var wt=qe.color;for(Ke=0;Ke<wt.length;++Ke)wt[Ke].resize(Je);for(Ke=0;Ke<6;++Ke)$e[Ke].resize(Je);return qe.width=qe.height=Je,qe}return qe(Me),a(qe,{faces:$e,resize:It,_reglType:"framebufferCube",destroy:function(){$e.forEach(function(Lt){Lt.destroy()})}})}function Ve(){fe.cur=null,fe.next=null,fe.dirty=!0,Zn(Se).forEach(function(Me){Me.framebuffer=h.createFramebuffer(),xe(Me)})}return a(fe,{getFramebuffer:function(Me){if(typeof Me=="function"&&Me._reglType==="framebuffer"){var $e=Me._framebuffer;if($e instanceof Qe)return $e}return null},create:ge,createCube:lt,clear:function(){Zn(Se).forEach(pt)},restore:Ve})}var wi=5126,mc=34962,wf=34963,gc=["attributes","elements","offset","count","primitive","instances"];function kl(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=wi,this.offset=0,this.stride=0,this.divisor=0}function Kd(h,T,G,se,me,ae,fe){for(var Le=G.maxAttributes,De=new Array(Le),Ne=0;Ne<Le;++Ne)De[Ne]=new kl;var Ge=0,Be={},We={Record:kl,scope:{},state:De,currentVAO:null,targetVAO:null,restore:ke()?je:function(){},createVAO:pt,getVAO:oe,destroyBuffer:Ce,setVAO:ke()?Oe:rt,clear:ke()?Se:function(){}};function Ce(xe){for(var ge=0;ge<De.length;++ge){var lt=De[ge];lt.buffer===xe&&(h.disableVertexAttribArray(ge),lt.buffer=null)}}function ke(){return T.oes_vertex_array_object}function K(){return T.angle_instanced_arrays}function oe(xe){return typeof xe=="function"&&xe._vao?xe._vao:null}function Oe(xe){if(xe!==We.currentVAO){var ge=ke();xe?ge.bindVertexArrayOES(xe.vao):ge.bindVertexArrayOES(null),We.currentVAO=xe}}function rt(xe){if(xe!==We.currentVAO){if(xe)xe.bindAttrs();else{for(var ge=K(),lt=0;lt<De.length;++lt){var Ve=De[lt];Ve.buffer?(h.enableVertexAttribArray(lt),Ve.buffer.bind(),h.vertexAttribPointer(lt,Ve.size,Ve.type,Ve.normalized,Ve.stride,Ve.offfset),ge&&Ve.divisor&&ge.vertexAttribDivisorANGLE(lt,Ve.divisor)):(h.disableVertexAttribArray(lt),h.vertexAttrib4f(lt,Ve.x,Ve.y,Ve.z,Ve.w))}fe.elements?h.bindBuffer(wf,fe.elements.buffer.buffer):h.bindBuffer(wf,null)}We.currentVAO=xe}}function Se(){Zn(Be).forEach(function(xe){xe.destroy()})}function Qe(){this.id=++Ge,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var xe=ke();xe?this.vao=xe.createVertexArrayOES():this.vao=null,Be[this.id]=this,this.buffers=[]}Qe.prototype.bindAttrs=function(){for(var xe=K(),ge=this.attributes,lt=0;lt<ge.length;++lt){var Ve=ge[lt];Ve.buffer?(h.enableVertexAttribArray(lt),h.bindBuffer(mc,Ve.buffer.buffer),h.vertexAttribPointer(lt,Ve.size,Ve.type,Ve.normalized,Ve.stride,Ve.offset),xe&&Ve.divisor&&xe.vertexAttribDivisorANGLE(lt,Ve.divisor)):(h.disableVertexAttribArray(lt),h.vertexAttrib4f(lt,Ve.x,Ve.y,Ve.z,Ve.w))}for(var Me=ge.length;Me<Le;++Me)h.disableVertexAttribArray(Me);var $e=ae.getElements(this.elements);$e?h.bindBuffer(wf,$e.buffer.buffer):h.bindBuffer(wf,null)},Qe.prototype.refresh=function(){var xe=ke();xe&&(xe.bindVertexArrayOES(this.vao),this.bindAttrs(),We.currentVAO=null,xe.bindVertexArrayOES(null))},Qe.prototype.destroy=function(){if(this.vao){var xe=ke();this===We.currentVAO&&(We.currentVAO=null,xe.bindVertexArrayOES(null)),xe.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),Be[this.id]&&(delete Be[this.id],se.vaoCount-=1)};function je(){var xe=ke();xe&&Zn(Be).forEach(function(ge){ge.refresh()})}function pt(xe){var ge=new Qe;se.vaoCount+=1;function lt(Ve){var Me;if(Array.isArray(Ve))Me=Ve,ge.elements&&ge.ownsElements&&ge.elements.destroy(),ge.elements=null,ge.ownsElements=!1,ge.offset=0,ge.count=0,ge.instances=-1,ge.primitive=4;else{if(E(typeof Ve=="object","invalid arguments for create vao"),E("attributes"in Ve,"must specify attributes for vao"),Ve.elements){var $e=Ve.elements;ge.ownsElements?typeof $e=="function"&&$e._reglType==="elements"?(ge.elements.destroy(),ge.ownsElements=!1):(ge.elements($e),ge.ownsElements=!1):ae.getElements(Ve.elements)?(ge.elements=Ve.elements,ge.ownsElements=!1):(ge.elements=ae.create(Ve.elements),ge.ownsElements=!0)}else ge.elements=null,ge.ownsElements=!1;Me=Ve.attributes,ge.offset=0,ge.count=-1,ge.instances=-1,ge.primitive=4,ge.elements&&(ge.count=ge.elements._elements.vertCount,ge.primitive=ge.elements._elements.primType),"offset"in Ve&&(ge.offset=Ve.offset|0),"count"in Ve&&(ge.count=Ve.count|0),"instances"in Ve&&(ge.instances=Ve.instances|0),"primitive"in Ve&&(E(Ve.primitive in Xi,"bad primitive type: "+Ve.primitive),ge.primitive=Xi[Ve.primitive]),E.optional(()=>{for(var Ir=Object.keys(Ve),Lr=0;Lr<Ir.length;++Lr)E(gc.indexOf(Ir[Lr])>=0,'invalid option for vao: "'+Ir[Lr]+'" valid options are '+gc)}),E(Array.isArray(Me),"attributes must be an array")}E(Me.length<Le,"too many attributes"),E(Me.length>0,"must specify at least one attribute");var qe={},It=ge.attributes;It.length=Me.length;for(var Lt=0;Lt<Me.length;++Lt){var Ke=Me[Lt],Je=It[Lt]=new kl,wt=Ke.data||Ke;if(Array.isArray(wt)||i(wt)||On(wt)){var Ct;ge.buffers[Lt]&&(Ct=ge.buffers[Lt],i(wt)&&Ct._buffer.byteLength>=wt.byteLength?Ct.subdata(wt):(Ct.destroy(),ge.buffers[Lt]=null)),ge.buffers[Lt]||(Ct=ge.buffers[Lt]=me.create(Ke,mc,!1,!0)),Je.buffer=me.getBuffer(Ct),Je.size=Je.buffer.dimension|0,Je.normalized=!1,Je.type=Je.buffer.dtype,Je.offset=0,Je.stride=0,Je.divisor=0,Je.state=1,qe[Lt]=1}else me.getBuffer(Ke)?(Je.buffer=me.getBuffer(Ke),Je.size=Je.buffer.dimension|0,Je.normalized=!1,Je.type=Je.buffer.dtype,Je.offset=0,Je.stride=0,Je.divisor=0,Je.state=1):me.getBuffer(Ke.buffer)?(Je.buffer=me.getBuffer(Ke.buffer),Je.size=(+Ke.size||Je.buffer.dimension)|0,Je.normalized=!!Ke.normalized||!1,"type"in Ke?(E.parameter(Ke.type,Ga,"invalid buffer type"),Je.type=Ga[Ke.type]):Je.type=Je.buffer.dtype,Je.offset=(Ke.offset||0)|0,Je.stride=(Ke.stride||0)|0,Je.divisor=(Ke.divisor||0)|0,Je.state=1,E(Je.size>=1&&Je.size<=4,"size must be between 1 and 4"),E(Je.offset>=0,"invalid offset"),E(Je.stride>=0&&Je.stride<=255,"stride must be between 0 and 255"),E(Je.divisor>=0,"divisor must be positive"),E(!Je.divisor||!!T.angle_instanced_arrays,"ANGLE_instanced_arrays must be enabled to use divisor")):"x"in Ke?(E(Lt>0,"first attribute must not be a constant"),Je.x=+Ke.x||0,Je.y=+Ke.y||0,Je.z=+Ke.z||0,Je.w=+Ke.w||0,Je.state=2):E(!1,"invalid attribute spec for location "+Lt)}for(var Vt=0;Vt<ge.buffers.length;++Vt)!qe[Vt]&&ge.buffers[Vt]&&(ge.buffers[Vt].destroy(),ge.buffers[Vt]=null);return ge.refresh(),lt}return lt.destroy=function(){for(var Ve=0;Ve<ge.buffers.length;++Ve)ge.buffers[Ve]&&ge.buffers[Ve].destroy();ge.buffers.length=0,ge.ownsElements&&(ge.elements.destroy(),ge.elements=null,ge.ownsElements=!1),ge.destroy()},lt._vao=ge,lt._reglType="vao",lt(xe)}return We}var Pl=35632,yc=35633,jd=35718,Qd=35721;function Nl(h,T,G,se){var me={},ae={};function fe(K,oe,Oe,rt){this.name=K,this.id=oe,this.location=Oe,this.info=rt}function Le(K,oe){for(var Oe=0;Oe<K.length;++Oe)if(K[Oe].id===oe.id){K[Oe].location=oe.location;return}K.push(oe)}function De(K,oe,Oe){var rt=K===Pl?me:ae,Se=rt[oe];if(!Se){var Qe=T.str(oe);Se=h.createShader(K),h.shaderSource(Se,Qe),h.compileShader(Se),E.shaderError(h,Se,Qe,K,Oe),rt[oe]=Se}return Se}var Ne={},Ge=[],Be=0;function We(K,oe){this.id=Be++,this.fragId=K,this.vertId=oe,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,se.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function Ce(K,oe,Oe){var rt,Se,Qe=De(Pl,K.fragId),je=De(yc,K.vertId),pt=K.program=h.createProgram();if(h.attachShader(pt,Qe),h.attachShader(pt,je),Oe)for(rt=0;rt<Oe.length;++rt){var xe=Oe[rt];h.bindAttribLocation(pt,xe[0],xe[1])}h.linkProgram(pt),E.linkError(h,pt,T.str(K.fragId),T.str(K.vertId),oe);var ge=h.getProgramParameter(pt,jd);se.profile&&(K.stats.uniformsCount=ge);var lt=K.uniforms;for(rt=0;rt<ge;++rt)if(Se=h.getActiveUniform(pt,rt),Se){if(Se.size>1)for(var Ve=0;Ve<Se.size;++Ve){var Me=Se.name.replace("[0]","["+Ve+"]");Le(lt,new fe(Me,T.id(Me),h.getUniformLocation(pt,Me),Se))}var $e=Se.name;Se.size>1&&($e=$e.replace("[0]","")),Le(lt,new fe($e,T.id($e),h.getUniformLocation(pt,$e),Se))}var qe=h.getProgramParameter(pt,Qd);se.profile&&(K.stats.attributesCount=qe);var It=K.attributes;for(rt=0;rt<qe;++rt)Se=h.getActiveAttrib(pt,rt),Se&&Le(It,new fe(Se.name,T.id(Se.name),h.getAttribLocation(pt,Se.name),Se))}se.profile&&(G.getMaxUniformsCount=function(){var K=0;return Ge.forEach(function(oe){oe.stats.uniformsCount>K&&(K=oe.stats.uniformsCount)}),K},G.getMaxAttributesCount=function(){var K=0;return Ge.forEach(function(oe){oe.stats.attributesCount>K&&(K=oe.stats.attributesCount)}),K});function ke(){me={},ae={};for(var K=0;K<Ge.length;++K)Ce(Ge[K],null,Ge[K].attributes.map(function(oe){return[oe.location,oe.name]}))}return{clear:function(){var K=h.deleteShader.bind(h);Zn(me).forEach(K),me={},Zn(ae).forEach(K),ae={},Ge.forEach(function(oe){h.deleteProgram(oe.program)}),Ge.length=0,Ne={},G.shaderCount=0},program:function(K,oe,Oe,rt){E.command(K>=0,"missing vertex shader",Oe),E.command(oe>=0,"missing fragment shader",Oe);var Se=Ne[oe];Se||(Se=Ne[oe]={});var Qe=Se[K];if(Qe&&(Qe.refCount++,!rt))return Qe;var je=new We(oe,K);return G.shaderCount++,Ce(je,Oe,rt),Qe||(Se[K]=je),Ge.push(je),a(je,{destroy:function(){if(je.refCount--,je.refCount<=0){h.deleteProgram(je.program);var pt=Ge.indexOf(je);Ge.splice(pt,1),G.shaderCount--}Se[je.vertId].refCount<=0&&(h.deleteShader(ae[je.vertId]),delete ae[je.vertId],delete Ne[je.fragId][je.vertId]),Object.keys(Ne[je.fragId]).length||(h.deleteShader(me[je.fragId]),delete me[je.fragId],delete Ne[je.fragId])}})},restore:ke,shader:De,frag:-1,vert:-1}}var ys=6408,ga=5121,Jd=3333,xs=5126;function e0(h,T,G,se,me,ae,fe){function Le(Ge){var Be;T.next===null?(E(me.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),Be=ga):(E(T.next.colorAttachments[0].texture!==null,"You cannot read from a renderbuffer"),Be=T.next.colorAttachments[0].texture._texture.type,E.optional(function(){ae.oes_texture_float?(E(Be===ga||Be===xs,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"),Be===xs&&E(fe.readFloat,"Reading 'float' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float")):E(Be===ga,"Reading from a framebuffer is only allowed for the type 'uint8'")}));var We=0,Ce=0,ke=se.framebufferWidth,K=se.framebufferHeight,oe=null;i(Ge)?oe=Ge:Ge&&(E.type(Ge,"object","invalid arguments to regl.read()"),We=Ge.x|0,Ce=Ge.y|0,E(We>=0&&We<se.framebufferWidth,"invalid x offset for regl.read"),E(Ce>=0&&Ce<se.framebufferHeight,"invalid y offset for regl.read"),ke=(Ge.width||se.framebufferWidth-We)|0,K=(Ge.height||se.framebufferHeight-Ce)|0,oe=Ge.data||null),oe&&(Be===ga?E(oe instanceof Uint8Array,"buffer must be 'Uint8Array' when reading from a framebuffer of type 'uint8'"):Be===xs&&E(oe instanceof Float32Array,"buffer must be 'Float32Array' when reading from a framebuffer of type 'float'")),E(ke>0&&ke+We<=se.framebufferWidth,"invalid width for read pixels"),E(K>0&&K+Ce<=se.framebufferHeight,"invalid height for read pixels"),G();var Oe=ke*K*4;return oe||(Be===ga?oe=new Uint8Array(Oe):Be===xs&&(oe=oe||new Float32Array(Oe))),E.isTypedArray(oe,"data buffer for regl.read() must be a typedarray"),E(oe.byteLength>=Oe,"data buffer for regl.read() too small"),h.pixelStorei(Jd,4),h.readPixels(We,Ce,ke,K,ys,Be,oe),oe}function De(Ge){var Be;return T.setFBO({framebuffer:Ge.framebuffer},function(){Be=Le(Ge)}),Be}function Ne(Ge){return!Ge||!("framebuffer"in Ge)?Le(Ge):De(Ge)}return Ne}function Xn(h){return Array.prototype.slice.call(h)}function ya(h){return Xn(h).join("")}function ja(){var h=0,T=[],G=[];function se(Be){for(var We=0;We<G.length;++We)if(G[We]===Be)return T[We];var Ce="g"+h++;return T.push(Ce),G.push(Be),Ce}function me(){var Be=[];function We(){Be.push.apply(Be,Xn(arguments))}var Ce=[];function ke(){var K="v"+h++;return Ce.push(K),arguments.length>0&&(Be.push(K,"="),Be.push.apply(Be,Xn(arguments)),Be.push(";")),K}return a(We,{def:ke,toString:function(){return ya([Ce.length>0?"var "+Ce.join(",")+";":"",ya(Be)])}})}function ae(){var Be=me(),We=me(),Ce=Be.toString,ke=We.toString;function K(oe,Oe){We(oe,Oe,"=",Be.def(oe,Oe),";")}return a(function(){Be.apply(Be,Xn(arguments))},{def:Be.def,entry:Be,exit:We,save:K,set:function(oe,Oe,rt){K(oe,Oe),Be(oe,Oe,"=",rt,";")},toString:function(){return Ce()+ke()}})}function fe(){var Be=ya(arguments),We=ae(),Ce=ae(),ke=We.toString,K=Ce.toString;return a(We,{then:function(){return We.apply(We,Xn(arguments)),this},else:function(){return Ce.apply(Ce,Xn(arguments)),this},toString:function(){var oe=K();return oe&&(oe="else{"+oe+"}"),ya(["if(",Be,"){",ke(),"}",oe])}})}var Le=me(),De={};function Ne(Be,We){var Ce=[];function ke(){var Se="a"+Ce.length;return Ce.push(Se),Se}We=We||0;for(var K=0;K<We;++K)ke();var oe=ae(),Oe=oe.toString,rt=De[Be]=a(oe,{arg:ke,toString:function(){return ya(["function(",Ce.join(),"){",Oe(),"}"])}});return rt}function Ge(){var Be=['"use strict";',Le,"return {"];Object.keys(De).forEach(function(ke){Be.push('"',ke,'":',De[ke].toString(),",")}),Be.push("}");var We=ya(Be).replace(/;/g,`;
41
43
  `).replace(/}/g,`}
42
44
  `).replace(/{/g,`{
43
- `),Ce=Function.apply(null,T.concat(We));return Ce.apply(null,G)}return{global:Le,link:se,block:me,proc:Ne,scope:ae,cond:fe,compile:Ge}}var Sn="xyzw".split(""),lc=5121,Xa=1,pf=2,qa=0,Mi=1,mf=2,Ol=3,Ka=4,uc=5,Ml=6,pn="dither",gf="blend.enable",Il="blend.color",ii="blend.equation",_s="blend.func",ps="depth.enable",pa="depth.func",Fl="depth.range",Mn="depth.mask",ms="colorMask",cc="cull.enable",hc="cull.face",kl="frontFace",gs="lineWidth",dc="polygonOffset.enable",ja="polygonOffset.offset",Pl="sample.alpha",vc="sample.enable",Nl="sample.coverage",Fo="stencil.enable",_c="stencil.mask",Bl="stencil.func",ys="stencil.opFront",ko="stencil.opBack",pc="scissor.enable",yf="scissor.box",ji="viewport",Po="profile",Qi="framebuffer",bs="vert",Qa="frag",ma="elements",ga="primitive",ya="count",Ja="offset",bf="instances",No="vao",xf="Width",Gl="Height",eo=Qi+xf,Bo=Qi+Gl,Ul=ji+xf,mc=ji+Gl,wf="drawingBuffer",gc=wf+xf,Sf=wf+Gl,rr=[_s,ii,Bl,ys,ko,Nl,ji,yf,ja],Go=34962,Yl=34963,xs=35632,yc=35633,bc=3553,Hd=34067,ai=2884,zd=3042,Af=3024,Hl=2960,xc=2929,wc=3089,Kn=32823,ba=32926,zl=32928,Tf=5126,to=35664,ws=35665,Uo=35666,Ef=5124,Yo=35667,Ho=35668,bi=35669,Wl=35670,xi=35671,Ss=35672,As=35673,ro=35674,Ts=35675,Es=35676,Ds=35678,zo=35680,Df=4,Ls=1028,xa=1029,Vl=2304,In=2305,Ii=32775,Wd=32776,Vd=519,wi=7680,no=0,$l=1,Zl=32774,$d=513,Xl=36160,Wo=36064,Zn={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Sc=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"],io={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Ji={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Rs={frag:xs,vert:yc},Lf={cw:Vl,ccw:In};function ao(h){return Array.isArray(h)||i(h)||Rn(h)}function Rf(h){return h.sort(function(T,G){return T===ji?-1:G===ji?1:T<G?-1:1})}function Hr(h,T,G,se){this.thisDep=h,this.contextDep=T,this.propDep=G,this.append=se}function wa(h){return h&&!(h.thisDep||h.contextDep||h.propDep)}function zr(h){return new Hr(!1,!1,!1,h)}function An(h,T){var G=h.type;if(G===qa){var se=h.data.length;return new Hr(!0,se>=1,se>=2,T)}else if(G===Ka){var me=h.data;return new Hr(me.thisDep,me.contextDep,me.propDep,T)}else{if(G===uc)return new Hr(!1,!1,!1,T);if(G===Ml){for(var ae=!1,fe=!1,Le=!1,De=0;De<h.data.length;++De){var Ne=h.data[De];if(Ne.type===Mi)Le=!0;else if(Ne.type===mf)fe=!0;else if(Ne.type===Ol)ae=!0;else if(Ne.type===qa){ae=!0;var Ge=Ne.data;Ge>=1&&(fe=!0),Ge>=2&&(Le=!0)}else Ne.type===Ka&&(ae=ae||Ne.data.thisDep,fe=fe||Ne.data.contextDep,Le=Le||Ne.data.propDep)}return new Hr(ae,fe,Le,T)}else return new Hr(G===Ol,G===mf,G===Mi,T)}}var ql=new Hr(!1,!1,!1,function(){});function Kl(h,T,G,se,me,ae,fe,Le,De,Ne,Ge,Be,We,Ce,ke){var K=Ne.Record,oe={add:32774,subtract:32778,"reverse subtract":32779};G.ext_blend_minmax&&(oe.min=Ii,oe.max=Wd);var Oe=G.angle_instanced_arrays,rt=G.webgl_draw_buffers,Se=G.oes_vertex_array_object,Qe={dirty:!0,profile:ke.profile},je={},pt=[],be={},ge={};function lt(R){return R.replace(".","_")}function Ve(R,y,H){var j=lt(R);pt.push(R),je[j]=Qe[j]=!!H,be[j]=y}function Ie(R,y,H){var j=lt(R);pt.push(R),Array.isArray(H)?(Qe[j]=H.slice(),je[j]=H.slice()):Qe[j]=je[j]=H,ge[j]=y}Ve(pn,Af),Ve(gf,zd),Ie(Il,"blendColor",[0,0,0,0]),Ie(ii,"blendEquationSeparate",[Zl,Zl]),Ie(_s,"blendFuncSeparate",[$l,no,$l,no]),Ve(ps,xc,!0),Ie(pa,"depthFunc",$d),Ie(Fl,"depthRange",[0,1]),Ie(Mn,"depthMask",!0),Ie(ms,ms,[!0,!0,!0,!0]),Ve(cc,ai),Ie(hc,"cullFace",xa),Ie(kl,kl,In),Ie(gs,gs,1),Ve(dc,Kn),Ie(ja,"polygonOffset",[0,0]),Ve(Pl,ba),Ve(vc,zl),Ie(Nl,"sampleCoverage",[1,!1]),Ve(Fo,Hl),Ie(_c,"stencilMask",-1),Ie(Bl,"stencilFunc",[Vd,0,-1]),Ie(ys,"stencilOpSeparate",[Ls,wi,wi,wi]),Ie(ko,"stencilOpSeparate",[xa,wi,wi,wi]),Ve(pc,wc),Ie(yf,"scissor",[0,0,h.drawingBufferWidth,h.drawingBufferHeight]),Ie(ji,ji,[0,0,h.drawingBufferWidth,h.drawingBufferHeight]);var $e={gl:h,context:We,strings:T,next:je,current:Qe,draw:Be,elements:ae,buffer:me,shader:Ge,attributes:Ne.state,vao:Ne,uniforms:De,framebuffer:Le,extensions:G,timer:Ce,isBufferArgs:ao},qe={primTypes:Wi,compareFuncs:io,blendFuncs:Zn,blendEquations:oe,stencilOps:Ji,glTypes:ka,orientationType:Lf};E.optional(function(){$e.isArrayLike=Pr}),rt&&(qe.backBuffer=[xa],qe.drawBuffer=at(se.maxDrawbuffers,function(R){return R===0?[0]:at(R,function(y){return Wo+y})}));var Mt=0;function Lt(){var R=Za(),y=R.link,H=R.global;R.id=Mt++,R.batchId="0";var j=y($e),Q=R.shared={props:"a0"};Object.keys($e).forEach(function(N){Q[N]=H.def(j,".",N)}),E.optional(function(){R.CHECK=y(E),R.commandStr=E.guessCommand(),R.command=y(R.commandStr),R.assert=function(N,I,re){N("if(!(",I,"))",this.CHECK,".commandRaise(",y(re),",",this.command,");")},qe.invalidBlendCombinations=Sc});var W=R.next={},Y=R.current={};Object.keys(ge).forEach(function(N){Array.isArray(Qe[N])&&(W[N]=H.def(Q.next,".",N),Y[N]=H.def(Q.current,".",N))});var X=R.constants={};Object.keys(qe).forEach(function(N){X[N]=H.def(JSON.stringify(qe[N]))}),R.invoke=function(N,I){switch(I.type){case qa:var re=["this",Q.context,Q.props,R.batchId];return N.def(y(I.data),".call(",re.slice(0,Math.max(I.data.length+1,4)),")");case Mi:return N.def(Q.props,I.data);case mf:return N.def(Q.context,I.data);case Ol:return N.def("this",I.data);case Ka:return I.data.append(R,N),I.data.ref;case uc:return I.data.toString();case Ml:return I.data.map(function(ee){return R.invoke(N,ee)})}},R.attribCache={};var O={};return R.scopeAttrib=function(N){var I=T.id(N);if(I in O)return O[I];var re=Ne.scope[I];re||(re=Ne.scope[I]=new K);var ee=O[I]=y(re);return ee},R}function Ke(R){var y=R.static,H=R.dynamic,j;if(Po in y){var Q=!!y[Po];j=zr(function(Y,X){return Q}),j.enable=Q}else if(Po in H){var W=H[Po];j=An(W,function(Y,X){return Y.invoke(X,W)})}return j}function Je(R,y){var H=R.static,j=R.dynamic;if(Qi in H){var Q=H[Qi];return Q?(Q=Le.getFramebuffer(Q),E.command(Q,"invalid framebuffer object"),zr(function(Y,X){var O=Y.link(Q),N=Y.shared;X.set(N.framebuffer,".next",O);var I=N.context;return X.set(I,"."+eo,O+".width"),X.set(I,"."+Bo,O+".height"),O})):zr(function(Y,X){var O=Y.shared;X.set(O.framebuffer,".next","null");var N=O.context;return X.set(N,"."+eo,N+"."+gc),X.set(N,"."+Bo,N+"."+Sf),"null"})}else if(Qi in j){var W=j[Qi];return An(W,function(Y,X){var O=Y.invoke(X,W),N=Y.shared,I=N.framebuffer,re=X.def(I,".getFramebuffer(",O,")");E.optional(function(){Y.assert(X,"!"+O+"||"+re,"invalid framebuffer object")}),X.set(I,".next",re);var ee=N.context;return X.set(ee,"."+eo,re+"?"+re+".width:"+ee+"."+gc),X.set(ee,"."+Bo,re+"?"+re+".height:"+ee+"."+Sf),re})}else return null}function wt(R,y,H){var j=R.static,Q=R.dynamic;function W(O){if(O in j){var N=j[O];E.commandType(N,"object","invalid "+O,H.commandStr);var I=!0,re=N.x|0,ee=N.y|0,_e,xe;return"width"in N?(_e=N.width|0,E.command(_e>=0,"invalid "+O,H.commandStr)):I=!1,"height"in N?(xe=N.height|0,E.command(xe>=0,"invalid "+O,H.commandStr)):I=!1,new Hr(!I&&y&&y.thisDep,!I&&y&&y.contextDep,!I&&y&&y.propDep,function(yt,ot){var Ae=yt.shared.context,he=_e;"width"in N||(he=ot.def(Ae,".",eo,"-",re));var ht=xe;return"height"in N||(ht=ot.def(Ae,".",Bo,"-",ee)),[re,ee,he,ht]})}else if(O in Q){var Ye=Q[O],Dt=An(Ye,function(yt,ot){var Ae=yt.invoke(ot,Ye);E.optional(function(){yt.assert(ot,Ae+"&&typeof "+Ae+'==="object"',"invalid "+O)});var he=yt.shared.context,ht=ot.def(Ae,".x|0"),ct=ot.def(Ae,".y|0"),Tt=ot.def('"width" in ',Ae,"?",Ae,".width|0:","(",he,".",eo,"-",ht,")"),vr=ot.def('"height" in ',Ae,"?",Ae,".height|0:","(",he,".",Bo,"-",ct,")");return E.optional(function(){yt.assert(ot,Tt+">=0&&"+vr+">=0","invalid "+O)}),[ht,ct,Tt,vr]});return y&&(Dt.thisDep=Dt.thisDep||y.thisDep,Dt.contextDep=Dt.contextDep||y.contextDep,Dt.propDep=Dt.propDep||y.propDep),Dt}else return y?new Hr(y.thisDep,y.contextDep,y.propDep,function(yt,ot){var Ae=yt.shared.context;return[0,0,ot.def(Ae,".",eo),ot.def(Ae,".",Bo)]}):null}var Y=W(ji);if(Y){var X=Y;Y=new Hr(Y.thisDep,Y.contextDep,Y.propDep,function(O,N){var I=X.append(O,N),re=O.shared.context;return N.set(re,"."+Ul,I[2]),N.set(re,"."+mc,I[3]),I})}return{viewport:Y,scissor_box:W(yf)}}function Ct(R,y){var H=R.static,j=typeof H[Qa]=="string"&&typeof H[bs]=="string";if(j){if(Object.keys(y.dynamic).length>0)return null;var Q=y.static,W=Object.keys(Q);if(W.length>0&&typeof Q[W[0]]=="number"){for(var Y=[],X=0;X<W.length;++X)E(typeof Q[W[X]]=="number","must specify all vertex attribute locations when using vaos"),Y.push([Q[W[X]]|0,W[X]]);return Y}}return null}function Vt(R,y,H){var j=R.static,Q=R.dynamic;function W(I){if(I in j){var re=T.id(j[I]);E.optional(function(){Ge.shader(Rs[I],re,E.guessCommand())});var ee=zr(function(){return re});return ee.id=re,ee}else if(I in Q){var _e=Q[I];return An(_e,function(xe,Ye){var Dt=xe.invoke(Ye,_e),yt=Ye.def(xe.shared.strings,".id(",Dt,")");return E.optional(function(){Ye(xe.shared.shader,".shader(",Rs[I],",",yt,",",xe.command,");")}),yt})}return null}var Y=W(Qa),X=W(bs),O=null,N;return wa(Y)&&wa(X)?(O=Ge.program(X.id,Y.id,null,H),N=zr(function(I,re){return I.link(O)})):N=new Hr(Y&&Y.thisDep||X&&X.thisDep,Y&&Y.contextDep||X&&X.contextDep,Y&&Y.propDep||X&&X.propDep,function(I,re){var ee=I.shared.shader,_e;Y?_e=Y.append(I,re):_e=re.def(ee,".",Qa);var xe;X?xe=X.append(I,re):xe=re.def(ee,".",bs);var Ye=ee+".program("+xe+","+_e;return E.optional(function(){Ye+=","+I.command}),re.def(Ye+")")}),{frag:Y,vert:X,progVar:N,program:O}}function Mr(R,y){var H=R.static,j=R.dynamic,Q={},W=!1;function Y(){if(No in H){var ot=H[No];return ot!==null&&Ne.getVAO(ot)===null&&(ot=Ne.createVAO(ot)),W=!0,Q.vao=ot,zr(function(he){var ht=Ne.getVAO(ot);return ht?he.link(ht):"null"})}else if(No in j){W=!0;var Ae=j[No];return An(Ae,function(he,ht){var ct=he.invoke(ht,Ae);return ht.def(he.shared.vao+".getVAO("+ct+")")})}return null}var X=Y(),O=!1;function N(){if(ma in H){var ot=H[ma];if(Q.elements=ot,ao(ot)){var Ae=Q.elements=ae.create(ot,!0);ot=ae.getElements(Ae),O=!0}else ot&&(ot=ae.getElements(ot),O=!0,E.command(ot,"invalid elements",y.commandStr));var he=zr(function(ct,Tt){if(ot){var vr=ct.link(ot);return ct.ELEMENTS=vr,vr}return ct.ELEMENTS=null,null});return he.value=ot,he}else if(ma in j){O=!0;var ht=j[ma];return An(ht,function(ct,Tt){var vr=ct.shared,yn=vr.isBufferArgs,so=vr.elements,ta=ct.invoke(Tt,ht),ki=Tt.def("null"),Aa=Tt.def(yn,"(",ta,")"),fo=ct.cond(Aa).then(ki,"=",so,".createStream(",ta,");").else(ki,"=",so,".getElements(",ta,");");return E.optional(function(){ct.assert(fo.else,"!"+ta+"||"+ki,"invalid elements")}),Tt.entry(fo),Tt.exit(ct.cond(Aa).then(so,".destroyStream(",ki,");")),ct.ELEMENTS=ki,ki})}else if(W)return new Hr(X.thisDep,X.contextDep,X.propDep,function(ct,Tt){return Tt.def(ct.shared.vao+".currentVAO?"+ct.shared.elements+".getElements("+ct.shared.vao+".currentVAO.elements):null")});return null}var I=N();function re(){if(ga in H){var ot=H[ga];return Q.primitive=ot,E.commandParameter(ot,Wi,"invalid primitve",y.commandStr),zr(function(he,ht){return Wi[ot]})}else if(ga in j){var Ae=j[ga];return An(Ae,function(he,ht){var ct=he.constants.primTypes,Tt=he.invoke(ht,Ae);return E.optional(function(){he.assert(ht,Tt+" in "+ct,"invalid primitive, must be one of "+Object.keys(Wi))}),ht.def(ct,"[",Tt,"]")})}else{if(O)return wa(I)?I.value?zr(function(he,ht){return ht.def(he.ELEMENTS,".primType")}):zr(function(){return Df}):new Hr(I.thisDep,I.contextDep,I.propDep,function(he,ht){var ct=he.ELEMENTS;return ht.def(ct,"?",ct,".primType:",Df)});if(W)return new Hr(X.thisDep,X.contextDep,X.propDep,function(he,ht){return ht.def(he.shared.vao+".currentVAO?"+he.shared.vao+".currentVAO.primitive:"+Df)})}return null}function ee(ot,Ae){if(ot in H){var he=H[ot]|0;return Ae?Q.offset=he:Q.instances=he,E.command(!Ae||he>=0,"invalid "+ot,y.commandStr),zr(function(ct,Tt){return Ae&&(ct.OFFSET=he),he})}else if(ot in j){var ht=j[ot];return An(ht,function(ct,Tt){var vr=ct.invoke(Tt,ht);return Ae&&(ct.OFFSET=vr,E.optional(function(){ct.assert(Tt,vr+">=0","invalid "+ot)})),vr})}else if(Ae){if(O)return zr(function(ct,Tt){return ct.OFFSET=0,0});if(W)return new Hr(X.thisDep,X.contextDep,X.propDep,function(ct,Tt){return Tt.def(ct.shared.vao+".currentVAO?"+ct.shared.vao+".currentVAO.offset:0")})}else if(W)return new Hr(X.thisDep,X.contextDep,X.propDep,function(ct,Tt){return Tt.def(ct.shared.vao+".currentVAO?"+ct.shared.vao+".currentVAO.instances:-1")});return null}var _e=ee(Ja,!0);function xe(){if(ya in H){var ot=H[ya]|0;return Q.count=ot,E.command(typeof ot=="number"&&ot>=0,"invalid vertex count",y.commandStr),zr(function(){return ot})}else if(ya in j){var Ae=j[ya];return An(Ae,function(Tt,vr){var yn=Tt.invoke(vr,Ae);return E.optional(function(){Tt.assert(vr,"typeof "+yn+'==="number"&&'+yn+">=0&&"+yn+"===("+yn+"|0)","invalid vertex count")}),yn})}else if(O)if(wa(I)){if(I)return _e?new Hr(_e.thisDep,_e.contextDep,_e.propDep,function(Tt,vr){var yn=vr.def(Tt.ELEMENTS,".vertCount-",Tt.OFFSET);return E.optional(function(){Tt.assert(vr,yn+">=0","invalid vertex offset/element buffer too small")}),yn}):zr(function(Tt,vr){return vr.def(Tt.ELEMENTS,".vertCount")});var he=zr(function(){return-1});return E.optional(function(){he.MISSING=!0}),he}else{var ht=new Hr(I.thisDep||_e.thisDep,I.contextDep||_e.contextDep,I.propDep||_e.propDep,function(Tt,vr){var yn=Tt.ELEMENTS;return Tt.OFFSET?vr.def(yn,"?",yn,".vertCount-",Tt.OFFSET,":-1"):vr.def(yn,"?",yn,".vertCount:-1")});return E.optional(function(){ht.DYNAMIC=!0}),ht}else if(W){var ct=new Hr(X.thisDep,X.contextDep,X.propDep,function(Tt,vr){return vr.def(Tt.shared.vao,".currentVAO?",Tt.shared.vao,".currentVAO.count:-1")});return ct}return null}var Ye=re(),Dt=xe(),yt=ee(bf,!1);return{elements:I,primitive:Ye,count:Dt,instances:yt,offset:_e,vao:X,vaoActive:W,elementsActive:O,static:Q}}function Lr(R,y){var H=R.static,j=R.dynamic,Q={};return pt.forEach(function(W){var Y=lt(W);function X(O,N){if(W in H){var I=O(H[W]);Q[Y]=zr(function(){return I})}else if(W in j){var re=j[W];Q[Y]=An(re,function(ee,_e){return N(ee,_e,ee.invoke(_e,re))})}}switch(W){case cc:case gf:case pn:case Fo:case ps:case pc:case dc:case Pl:case vc:case Mn:return X(function(O){return E.commandType(O,"boolean",W,y.commandStr),O},function(O,N,I){return E.optional(function(){O.assert(N,"typeof "+I+'==="boolean"',"invalid flag "+W,O.commandStr)}),I});case pa:return X(function(O){return E.commandParameter(O,io,"invalid "+W,y.commandStr),io[O]},function(O,N,I){var re=O.constants.compareFuncs;return E.optional(function(){O.assert(N,I+" in "+re,"invalid "+W+", must be one of "+Object.keys(io))}),N.def(re,"[",I,"]")});case Fl:return X(function(O){return E.command(Pr(O)&&O.length===2&&typeof O[0]=="number"&&typeof O[1]=="number"&&O[0]<=O[1],"depth range is 2d array",y.commandStr),O},function(O,N,I){E.optional(function(){O.assert(N,O.shared.isArrayLike+"("+I+")&&"+I+".length===2&&typeof "+I+'[0]==="number"&&typeof '+I+'[1]==="number"&&'+I+"[0]<="+I+"[1]","depth range must be a 2d array")});var re=N.def("+",I,"[0]"),ee=N.def("+",I,"[1]");return[re,ee]});case _s:return X(function(O){E.commandType(O,"object","blend.func",y.commandStr);var N="srcRGB"in O?O.srcRGB:O.src,I="srcAlpha"in O?O.srcAlpha:O.src,re="dstRGB"in O?O.dstRGB:O.dst,ee="dstAlpha"in O?O.dstAlpha:O.dst;return E.commandParameter(N,Zn,Y+".srcRGB",y.commandStr),E.commandParameter(I,Zn,Y+".srcAlpha",y.commandStr),E.commandParameter(re,Zn,Y+".dstRGB",y.commandStr),E.commandParameter(ee,Zn,Y+".dstAlpha",y.commandStr),E.command(Sc.indexOf(N+", "+re)===-1,"unallowed blending combination (srcRGB, dstRGB) = ("+N+", "+re+")",y.commandStr),[Zn[N],Zn[re],Zn[I],Zn[ee]]},function(O,N,I){var re=O.constants.blendFuncs;E.optional(function(){O.assert(N,I+"&&typeof "+I+'==="object"',"invalid blend func, must be an object")});function ee(Ae,he){var ht=N.def('"',Ae,he,'" in ',I,"?",I,".",Ae,he,":",I,".",Ae);return E.optional(function(){O.assert(N,ht+" in "+re,"invalid "+W+"."+Ae+he+", must be one of "+Object.keys(Zn))}),ht}var _e=ee("src","RGB"),xe=ee("dst","RGB");E.optional(function(){var Ae=O.constants.invalidBlendCombinations;O.assert(N,Ae+".indexOf("+_e+'+", "+'+xe+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")});var Ye=N.def(re,"[",_e,"]"),Dt=N.def(re,"[",ee("src","Alpha"),"]"),yt=N.def(re,"[",xe,"]"),ot=N.def(re,"[",ee("dst","Alpha"),"]");return[Ye,yt,Dt,ot]});case ii:return X(function(O){if(typeof O=="string")return E.commandParameter(O,oe,"invalid "+W,y.commandStr),[oe[O],oe[O]];if(typeof O=="object")return E.commandParameter(O.rgb,oe,W+".rgb",y.commandStr),E.commandParameter(O.alpha,oe,W+".alpha",y.commandStr),[oe[O.rgb],oe[O.alpha]];E.commandRaise("invalid blend.equation",y.commandStr)},function(O,N,I){var re=O.constants.blendEquations,ee=N.def(),_e=N.def(),xe=O.cond("typeof ",I,'==="string"');return E.optional(function(){function Ye(Dt,yt,ot){O.assert(Dt,ot+" in "+re,"invalid "+yt+", must be one of "+Object.keys(oe))}Ye(xe.then,W,I),O.assert(xe.else,I+"&&typeof "+I+'==="object"',"invalid "+W),Ye(xe.else,W+".rgb",I+".rgb"),Ye(xe.else,W+".alpha",I+".alpha")}),xe.then(ee,"=",_e,"=",re,"[",I,"];"),xe.else(ee,"=",re,"[",I,".rgb];",_e,"=",re,"[",I,".alpha];"),N(xe),[ee,_e]});case Il:return X(function(O){return E.command(Pr(O)&&O.length===4,"blend.color must be a 4d array",y.commandStr),at(4,function(N){return+O[N]})},function(O,N,I){return E.optional(function(){O.assert(N,O.shared.isArrayLike+"("+I+")&&"+I+".length===4","blend.color must be a 4d array")}),at(4,function(re){return N.def("+",I,"[",re,"]")})});case _c:return X(function(O){return E.commandType(O,"number",Y,y.commandStr),O|0},function(O,N,I){return E.optional(function(){O.assert(N,"typeof "+I+'==="number"',"invalid stencil.mask")}),N.def(I,"|0")});case Bl:return X(function(O){E.commandType(O,"object",Y,y.commandStr);var N=O.cmp||"keep",I=O.ref||0,re="mask"in O?O.mask:-1;return E.commandParameter(N,io,W+".cmp",y.commandStr),E.commandType(I,"number",W+".ref",y.commandStr),E.commandType(re,"number",W+".mask",y.commandStr),[io[N],I,re]},function(O,N,I){var re=O.constants.compareFuncs;E.optional(function(){function Ye(){O.assert(N,Array.prototype.join.call(arguments,""),"invalid stencil.func")}Ye(I+"&&typeof ",I,'==="object"'),Ye('!("cmp" in ',I,")||(",I,".cmp in ",re,")")});var ee=N.def('"cmp" in ',I,"?",re,"[",I,".cmp]",":",wi),_e=N.def(I,".ref|0"),xe=N.def('"mask" in ',I,"?",I,".mask|0:-1");return[ee,_e,xe]});case ys:case ko:return X(function(O){E.commandType(O,"object",Y,y.commandStr);var N=O.fail||"keep",I=O.zfail||"keep",re=O.zpass||"keep";return E.commandParameter(N,Ji,W+".fail",y.commandStr),E.commandParameter(I,Ji,W+".zfail",y.commandStr),E.commandParameter(re,Ji,W+".zpass",y.commandStr),[W===ko?xa:Ls,Ji[N],Ji[I],Ji[re]]},function(O,N,I){var re=O.constants.stencilOps;E.optional(function(){O.assert(N,I+"&&typeof "+I+'==="object"',"invalid "+W)});function ee(_e){return E.optional(function(){O.assert(N,'!("'+_e+'" in '+I+")||("+I+"."+_e+" in "+re+")","invalid "+W+"."+_e+", must be one of "+Object.keys(Ji))}),N.def('"',_e,'" in ',I,"?",re,"[",I,".",_e,"]:",wi)}return[W===ko?xa:Ls,ee("fail"),ee("zfail"),ee("zpass")]});case ja:return X(function(O){E.commandType(O,"object",Y,y.commandStr);var N=O.factor|0,I=O.units|0;return E.commandType(N,"number",Y+".factor",y.commandStr),E.commandType(I,"number",Y+".units",y.commandStr),[N,I]},function(O,N,I){E.optional(function(){O.assert(N,I+"&&typeof "+I+'==="object"',"invalid "+W)});var re=N.def(I,".factor|0"),ee=N.def(I,".units|0");return[re,ee]});case hc:return X(function(O){var N=0;return O==="front"?N=Ls:O==="back"&&(N=xa),E.command(!!N,Y,y.commandStr),N},function(O,N,I){return E.optional(function(){O.assert(N,I+'==="front"||'+I+'==="back"',"invalid cull.face")}),N.def(I,'==="front"?',Ls,":",xa)});case gs:return X(function(O){return E.command(typeof O=="number"&&O>=se.lineWidthDims[0]&&O<=se.lineWidthDims[1],"invalid line width, must be a positive number between "+se.lineWidthDims[0]+" and "+se.lineWidthDims[1],y.commandStr),O},function(O,N,I){return E.optional(function(){O.assert(N,"typeof "+I+'==="number"&&'+I+">="+se.lineWidthDims[0]+"&&"+I+"<="+se.lineWidthDims[1],"invalid line width")}),I});case kl:return X(function(O){return E.commandParameter(O,Lf,Y,y.commandStr),Lf[O]},function(O,N,I){return E.optional(function(){O.assert(N,I+'==="cw"||'+I+'==="ccw"',"invalid frontFace, must be one of cw,ccw")}),N.def(I+'==="cw"?'+Vl+":"+In)});case ms:return X(function(O){return E.command(Pr(O)&&O.length===4,"color.mask must be length 4 array",y.commandStr),O.map(function(N){return!!N})},function(O,N,I){return E.optional(function(){O.assert(N,O.shared.isArrayLike+"("+I+")&&"+I+".length===4","invalid color.mask")}),at(4,function(re){return"!!"+I+"["+re+"]"})});case Nl:return X(function(O){E.command(typeof O=="object"&&O,Y,y.commandStr);var N="value"in O?O.value:1,I=!!O.invert;return E.command(typeof N=="number"&&N>=0&&N<=1,"sample.coverage.value must be a number between 0 and 1",y.commandStr),[N,I]},function(O,N,I){E.optional(function(){O.assert(N,I+"&&typeof "+I+'==="object"',"invalid sample.coverage")});var re=N.def('"value" in ',I,"?+",I,".value:1"),ee=N.def("!!",I,".invert");return[re,ee]})}}),Q}function Xt(R,y){var H=R.static,j=R.dynamic,Q={};return Object.keys(H).forEach(function(W){var Y=H[W],X;if(typeof Y=="number"||typeof Y=="boolean")X=zr(function(){return Y});else if(typeof Y=="function"){var O=Y._reglType;O==="texture2d"||O==="textureCube"?X=zr(function(N){return N.link(Y)}):O==="framebuffer"||O==="framebufferCube"?(E.command(Y.color.length>0,'missing color attachment for framebuffer sent to uniform "'+W+'"',y.commandStr),X=zr(function(N){return N.link(Y.color[0])})):E.commandRaise('invalid data for uniform "'+W+'"',y.commandStr)}else Pr(Y)?X=zr(function(N){var I=N.global.def("[",at(Y.length,function(re){return E.command(typeof Y[re]=="number"||typeof Y[re]=="boolean","invalid uniform "+W,N.commandStr),Y[re]}),"]");return I}):E.commandRaise('invalid or missing data for uniform "'+W+'"',y.commandStr);X.value=Y,Q[W]=X}),Object.keys(j).forEach(function(W){var Y=j[W];Q[W]=An(Y,function(X,O){return X.invoke(O,Y)})}),Q}function Dr(R,y){var H=R.static,j=R.dynamic,Q={};return Object.keys(H).forEach(function(W){var Y=H[W],X=T.id(W),O=new K;if(ao(Y))O.state=Xa,O.buffer=me.getBuffer(me.create(Y,Go,!1,!0)),O.type=0;else{var N=me.getBuffer(Y);if(N)O.state=Xa,O.buffer=N,O.type=0;else if(E.command(typeof Y=="object"&&Y,"invalid data for attribute "+W,y.commandStr),"constant"in Y){var I=Y.constant;O.buffer="null",O.state=pf,typeof I=="number"?O.x=I:(E.command(Pr(I)&&I.length>0&&I.length<=4,"invalid constant for attribute "+W,y.commandStr),Sn.forEach(function(yt,ot){ot<I.length&&(O[yt]=I[ot])}))}else{ao(Y.buffer)?N=me.getBuffer(me.create(Y.buffer,Go,!1,!0)):N=me.getBuffer(Y.buffer),E.command(!!N,'missing buffer for attribute "'+W+'"',y.commandStr);var re=Y.offset|0;E.command(re>=0,'invalid offset for attribute "'+W+'"',y.commandStr);var ee=Y.stride|0;E.command(ee>=0&&ee<256,'invalid stride for attribute "'+W+'", must be integer betweeen [0, 255]',y.commandStr);var _e=Y.size|0;E.command(!("size"in Y)||_e>0&&_e<=4,'invalid size for attribute "'+W+'", must be 1,2,3,4',y.commandStr);var xe=!!Y.normalized,Ye=0;"type"in Y&&(E.commandParameter(Y.type,ka,"invalid type for attribute "+W,y.commandStr),Ye=ka[Y.type]);var Dt=Y.divisor|0;E.optional(function(){"divisor"in Y&&(E.command(Dt===0||Oe,'cannot specify divisor for attribute "'+W+'", instancing not supported',y.commandStr),E.command(Dt>=0,'invalid divisor for attribute "'+W+'"',y.commandStr));var yt=y.commandStr,ot=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(Y).forEach(function(Ae){E.command(ot.indexOf(Ae)>=0,'unknown parameter "'+Ae+'" for attribute pointer "'+W+'" (valid parameters are '+ot+")",yt)})}),O.buffer=N,O.state=Xa,O.size=_e,O.normalized=xe,O.type=Ye||N.dtype,O.offset=re,O.stride=ee,O.divisor=Dt}}Q[W]=zr(function(yt,ot){var Ae=yt.attribCache;if(X in Ae)return Ae[X];var he={isStream:!1};return Object.keys(O).forEach(function(ht){he[ht]=O[ht]}),O.buffer&&(he.buffer=yt.link(O.buffer),he.type=he.type||he.buffer+".dtype"),Ae[X]=he,he})}),Object.keys(j).forEach(function(W){var Y=j[W];function X(O,N){var I=O.invoke(N,Y),re=O.shared,ee=O.constants,_e=re.isBufferArgs,xe=re.buffer;E.optional(function(){O.assert(N,I+"&&(typeof "+I+'==="object"||typeof '+I+'==="function")&&('+_e+"("+I+")||"+xe+".getBuffer("+I+")||"+xe+".getBuffer("+I+".buffer)||"+_e+"("+I+'.buffer)||("constant" in '+I+"&&(typeof "+I+'.constant==="number"||'+re.isArrayLike+"("+I+".constant))))",'invalid dynamic attribute "'+W+'"')});var Ye={isStream:N.def(!1)},Dt=new K;Dt.state=Xa,Object.keys(Dt).forEach(function(he){Ye[he]=N.def(""+Dt[he])});var yt=Ye.buffer,ot=Ye.type;N("if(",_e,"(",I,")){",Ye.isStream,"=true;",yt,"=",xe,".createStream(",Go,",",I,");",ot,"=",yt,".dtype;","}else{",yt,"=",xe,".getBuffer(",I,");","if(",yt,"){",ot,"=",yt,".dtype;",'}else if("constant" in ',I,"){",Ye.state,"=",pf,";","if(typeof "+I+'.constant === "number"){',Ye[Sn[0]],"=",I,".constant;",Sn.slice(1).map(function(he){return Ye[he]}).join("="),"=0;","}else{",Sn.map(function(he,ht){return Ye[he]+"="+I+".constant.length>"+ht+"?"+I+".constant["+ht+"]:0;"}).join(""),"}}else{","if(",_e,"(",I,".buffer)){",yt,"=",xe,".createStream(",Go,",",I,".buffer);","}else{",yt,"=",xe,".getBuffer(",I,".buffer);","}",ot,'="type" in ',I,"?",ee.glTypes,"[",I,".type]:",yt,".dtype;",Ye.normalized,"=!!",I,".normalized;");function Ae(he){N(Ye[he],"=",I,".",he,"|0;")}return Ae("size"),Ae("offset"),Ae("stride"),Ae("divisor"),N("}}"),N.exit("if(",Ye.isStream,"){",xe,".destroyStream(",yt,");","}"),Ye}Q[W]=An(Y,X)}),Q}function pr(R){var y=R.static,H=R.dynamic,j={};return Object.keys(y).forEach(function(Q){var W=y[Q];j[Q]=zr(function(Y,X){return typeof W=="number"||typeof W=="boolean"?""+W:Y.link(W)})}),Object.keys(H).forEach(function(Q){var W=H[Q];j[Q]=An(W,function(Y,X){return Y.invoke(X,W)})}),j}function qr(R,y,H,j,Q){var W=R.static,Y=R.dynamic;E.optional(function(){var Ae=[Qi,bs,Qa,ma,ga,Ja,ya,bf,Po,No].concat(pt);function he(ht){Object.keys(ht).forEach(function(ct){E.command(Ae.indexOf(ct)>=0,'unknown parameter "'+ct+'"',Q.commandStr)})}he(W),he(Y)});var X=Ct(R,y),O=Je(R),N=wt(R,O,Q),I=Mr(R,Q),re=Lr(R,Q),ee=Vt(R,Q,X);function _e(Ae){var he=N[Ae];he&&(re[Ae]=he)}_e(ji),_e(lt(yf));var xe=Object.keys(re).length>0,Ye={framebuffer:O,draw:I,shader:ee,state:re,dirty:xe,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ye.profile=Ke(R),Ye.uniforms=Xt(H,Q),Ye.drawVAO=Ye.scopeVAO=I.vao,!Ye.drawVAO&&ee.program&&!X&&G.angle_instanced_arrays&&I.static.elements){var Dt=!0,yt=ee.program.attributes.map(function(Ae){var he=y.static[Ae];return Dt=Dt&&!!he,he});if(Dt&&yt.length>0){var ot=Ne.getVAO(Ne.createVAO({attributes:yt,elements:I.static.elements}));Ye.drawVAO=new Hr(null,null,null,function(Ae,he){return Ae.link(ot)}),Ye.useVAO=!0}}return X?Ye.useVAO=!0:Ye.attributes=Dr(y,Q),Ye.context=pr(j),Ye}function Kr(R,y,H){var j=R.shared,Q=j.context,W=R.scope();Object.keys(H).forEach(function(Y){y.save(Q,"."+Y);var X=H[Y],O=X.append(R,y);Array.isArray(O)?W(Q,".",Y,"=[",O.join(),"];"):W(Q,".",Y,"=",O,";")}),y(W)}function en(R,y,H,j){var Q=R.shared,W=Q.gl,Y=Q.framebuffer,X;rt&&(X=y.def(Q.extensions,".webgl_draw_buffers"));var O=R.constants,N=O.drawBuffer,I=O.backBuffer,re;H?re=H.append(R,y):re=y.def(Y,".next"),j||y("if(",re,"!==",Y,".cur){"),y("if(",re,"){",W,".bindFramebuffer(",Xl,",",re,".framebuffer);"),rt&&y(X,".drawBuffersWEBGL(",N,"[",re,".colorAttachments.length]);"),y("}else{",W,".bindFramebuffer(",Xl,",null);"),rt&&y(X,".drawBuffersWEBGL(",I,");"),y("}",Y,".cur=",re,";"),j||y("}")}function ln(R,y,H){var j=R.shared,Q=j.gl,W=R.current,Y=R.next,X=j.current,O=j.next,N=R.cond(X,".dirty");pt.forEach(function(I){var re=lt(I);if(!(re in H.state)){var ee,_e;if(re in Y){ee=Y[re],_e=W[re];var xe=at(Qe[re].length,function(Dt){return N.def(ee,"[",Dt,"]")});N(R.cond(xe.map(function(Dt,yt){return Dt+"!=="+_e+"["+yt+"]"}).join("||")).then(Q,".",ge[re],"(",xe,");",xe.map(function(Dt,yt){return _e+"["+yt+"]="+Dt}).join(";"),";"))}else{ee=N.def(O,".",re);var Ye=R.cond(ee,"!==",X,".",re);N(Ye),re in be?Ye(R.cond(ee).then(Q,".enable(",be[re],");").else(Q,".disable(",be[re],");"),X,".",re,"=",ee,";"):Ye(Q,".",ge[re],"(",ee,");",X,".",re,"=",ee,";")}}}),Object.keys(H.state).length===0&&N(X,".dirty=false;"),y(N)}function mn(R,y,H,j){var Q=R.shared,W=R.current,Y=Q.current,X=Q.gl;Rf(Object.keys(H)).forEach(function(O){var N=H[O];if(!(j&&!j(N))){var I=N.append(R,y);if(be[O]){var re=be[O];wa(N)?I?y(X,".enable(",re,");"):y(X,".disable(",re,");"):y(R.cond(I).then(X,".enable(",re,");").else(X,".disable(",re,");")),y(Y,".",O,"=",I,";")}else if(Pr(I)){var ee=W[O];y(X,".",ge[O],"(",I,");",I.map(function(_e,xe){return ee+"["+xe+"]="+_e}).join(";"),";")}else y(X,".",ge[O],"(",I,");",Y,".",O,"=",I,";")}})}function Wr(R,y){Oe&&(R.instancing=y.def(R.shared.extensions,".angle_instanced_arrays"))}function Ut(R,y,H,j,Q){var W=R.shared,Y=R.stats,X=W.current,O=W.timer,N=H.profile;function I(){return typeof performance>"u"?"Date.now()":"performance.now()"}var re,ee;function _e(Ae){re=y.def(),Ae(re,"=",I(),";"),typeof Q=="string"?Ae(Y,".count+=",Q,";"):Ae(Y,".count++;"),Ce&&(j?(ee=y.def(),Ae(ee,"=",O,".getNumPendingQueries();")):Ae(O,".beginQuery(",Y,");"))}function xe(Ae){Ae(Y,".cpuTime+=",I(),"-",re,";"),Ce&&(j?Ae(O,".pushScopeStats(",ee,",",O,".getNumPendingQueries(),",Y,");"):Ae(O,".endQuery();"))}function Ye(Ae){var he=y.def(X,".profile");y(X,".profile=",Ae,";"),y.exit(X,".profile=",he,";")}var Dt;if(N){if(wa(N)){N.enable?(_e(y),xe(y.exit),Ye("true")):Ye("false");return}Dt=N.append(R,y),Ye(Dt)}else Dt=y.def(X,".profile");var yt=R.block();_e(yt),y("if(",Dt,"){",yt,"}");var ot=R.block();xe(ot),y.exit("if(",Dt,"){",ot,"}")}function gn(R,y,H,j,Q){var W=R.shared;function Y(O){switch(O){case to:case Yo:case xi:return 2;case ws:case Ho:case Ss:return 3;case Uo:case bi:case As:return 4;default:return 1}}function X(O,N,I){var re=W.gl,ee=y.def(O,".location"),_e=y.def(W.attributes,"[",ee,"]"),xe=I.state,Ye=I.buffer,Dt=[I.x,I.y,I.z,I.w],yt=["buffer","normalized","offset","stride"];function ot(){y("if(!",_e,".buffer){",re,".enableVertexAttribArray(",ee,");}");var he=I.type,ht;if(I.size?ht=y.def(I.size,"||",N):ht=N,y("if(",_e,".type!==",he,"||",_e,".size!==",ht,"||",yt.map(function(Tt){return _e+"."+Tt+"!=="+I[Tt]}).join("||"),"){",re,".bindBuffer(",Go,",",Ye,".buffer);",re,".vertexAttribPointer(",[ee,ht,he,I.normalized,I.stride,I.offset],");",_e,".type=",he,";",_e,".size=",ht,";",yt.map(function(Tt){return _e+"."+Tt+"="+I[Tt]+";"}).join(""),"}"),Oe){var ct=I.divisor;y("if(",_e,".divisor!==",ct,"){",R.instancing,".vertexAttribDivisorANGLE(",[ee,ct],");",_e,".divisor=",ct,";}")}}function Ae(){y("if(",_e,".buffer){",re,".disableVertexAttribArray(",ee,");",_e,".buffer=null;","}if(",Sn.map(function(he,ht){return _e+"."+he+"!=="+Dt[ht]}).join("||"),"){",re,".vertexAttrib4f(",ee,",",Dt,");",Sn.map(function(he,ht){return _e+"."+he+"="+Dt[ht]+";"}).join(""),"}")}xe===Xa?ot():xe===pf?Ae():(y("if(",xe,"===",Xa,"){"),ot(),y("}else{"),Ae(),y("}"))}j.forEach(function(O){var N=O.name,I=H.attributes[N],re;if(I){if(!Q(I))return;re=I.append(R,y)}else{if(!Q(ql))return;var ee=R.scopeAttrib(N);E.optional(function(){R.assert(y,ee+".state","missing attribute "+N)}),re={},Object.keys(new K).forEach(function(_e){re[_e]=y.def(ee,".",_e)})}X(R.link(O),Y(O.info.type),re)})}function hr(R,y,H,j,Q,W){for(var Y=R.shared,X=Y.gl,O={},N,I=0;I<j.length;++I){var re=j[I],ee=re.name,_e=re.info.type,xe=re.info.size,Ye=H.uniforms[ee];if(xe>1){if(!Ye)continue;var Dt=ee.replace("[0]","");if(O[Dt])continue;O[Dt]=1}var yt=R.link(re),ot=yt+".location",Ae;if(Ye){if(!Q(Ye))continue;if(wa(Ye)){var he=Ye.value;if(E.command(he!==null&&typeof he<"u",'missing uniform "'+ee+'"',R.commandStr),_e===Ds||_e===zo){E.command(typeof he=="function"&&(_e===Ds&&(he._reglType==="texture2d"||he._reglType==="framebuffer")||_e===zo&&(he._reglType==="textureCube"||he._reglType==="framebufferCube")),"invalid texture for uniform "+ee,R.commandStr);var ht=R.link(he._texture||he.color[0]._texture);y(X,".uniform1i(",ot,",",ht+".bind());"),y.exit(ht,".unbind();")}else if(_e===ro||_e===Ts||_e===Es){E.optional(function(){E.command(Pr(he),"invalid matrix for uniform "+ee,R.commandStr),E.command(_e===ro&&he.length===4||_e===Ts&&he.length===9||_e===Es&&he.length===16,"invalid length for matrix uniform "+ee,R.commandStr)});var ct=R.global.def("new Float32Array(["+Array.prototype.slice.call(he)+"])"),Tt=2;_e===Ts?Tt=3:_e===Es&&(Tt=4),y(X,".uniformMatrix",Tt,"fv(",ot,",false,",ct,");")}else{switch(_e){case Tf:xe===1?E.commandType(he,"number","uniform "+ee,R.commandStr):E.command(Pr(he)&&he.length===xe,"uniform "+ee,R.commandStr),N="1f";break;case to:E.command(Pr(he)&&he.length&&he.length%2===0&&he.length<=xe*2,"uniform "+ee,R.commandStr),N="2f";break;case ws:E.command(Pr(he)&&he.length&&he.length%3===0&&he.length<=xe*3,"uniform "+ee,R.commandStr),N="3f";break;case Uo:E.command(Pr(he)&&he.length&&he.length%4===0&&he.length<=xe*4,"uniform "+ee,R.commandStr),N="4f";break;case Wl:xe===1?E.commandType(he,"boolean","uniform "+ee,R.commandStr):E.command(Pr(he)&&he.length===xe,"uniform "+ee,R.commandStr),N="1i";break;case Ef:xe===1?E.commandType(he,"number","uniform "+ee,R.commandStr):E.command(Pr(he)&&he.length===xe,"uniform "+ee,R.commandStr),N="1i";break;case xi:E.command(Pr(he)&&he.length&&he.length%2===0&&he.length<=xe*2,"uniform "+ee,R.commandStr),N="2i";break;case Yo:E.command(Pr(he)&&he.length&&he.length%2===0&&he.length<=xe*2,"uniform "+ee,R.commandStr),N="2i";break;case Ss:E.command(Pr(he)&&he.length&&he.length%3===0&&he.length<=xe*3,"uniform "+ee,R.commandStr),N="3i";break;case Ho:E.command(Pr(he)&&he.length&&he.length%3===0&&he.length<=xe*3,"uniform "+ee,R.commandStr),N="3i";break;case As:E.command(Pr(he)&&he.length&&he.length%4===0&&he.length<=xe*4,"uniform "+ee,R.commandStr),N="4i";break;case bi:E.command(Pr(he)&&he.length&&he.length%4===0&&he.length<=xe*4,"uniform "+ee,R.commandStr),N="4i";break}xe>1?(N+="v",he=R.global.def("["+Array.prototype.slice.call(he)+"]")):he=Pr(he)?Array.prototype.slice.call(he):he,y(X,".uniform",N,"(",ot,",",he,");")}continue}else Ae=Ye.append(R,y)}else{if(!Q(ql))continue;Ae=y.def(Y.uniforms,"[",T.id(ee),"]")}_e===Ds?(E(!Array.isArray(Ae),"must specify a scalar prop for textures"),y("if(",Ae,"&&",Ae,'._reglType==="framebuffer"){',Ae,"=",Ae,".color[0];","}")):_e===zo&&(E(!Array.isArray(Ae),"must specify a scalar prop for cube maps"),y("if(",Ae,"&&",Ae,'._reglType==="framebufferCube"){',Ae,"=",Ae,".color[0];","}")),E.optional(function(){function jn(Fn,Cs){R.assert(y,Fn,'bad data or missing for uniform "'+ee+'". '+Cs)}function lo(Fn,Cs){Cs===1&&E(!Array.isArray(Ae),"must not specify an array type for uniform"),jn("Array.isArray("+Ae+") && typeof "+Ae+'[0]===" '+Fn+'" || typeof '+Ae+'==="'+Fn+'"',"invalid type, expected "+Fn)}function oi(Fn,Cs,If){Array.isArray(Ae)?E(Ae.length&&Ae.length%Fn===0&&Ae.length<=Fn*If,"must have length of "+(If===1?"":"n * ")+Fn):jn(Y.isArrayLike+"("+Ae+")&&"+Ae+".length && "+Ae+".length % "+Fn+" === 0 && "+Ae+".length<="+Fn*If,"invalid vector, should have length of "+(If===1?"":"n * ")+Fn,R.commandStr)}function Lc(Fn){E(!Array.isArray(Ae),"must not specify a value type"),jn("typeof "+Ae+'==="function"&&'+Ae+'._reglType==="texture'+(Fn===bc?"2d":"Cube")+'"',"invalid texture type",R.commandStr)}switch(_e){case Ef:lo("number",xe);break;case Yo:oi(2,"number",xe);break;case Ho:oi(3,"number",xe);break;case bi:oi(4,"number",xe);break;case Tf:lo("number",xe);break;case to:oi(2,"number",xe);break;case ws:oi(3,"number",xe);break;case Uo:oi(4,"number",xe);break;case Wl:lo("boolean",xe);break;case xi:oi(2,"boolean",xe);break;case Ss:oi(3,"boolean",xe);break;case As:oi(4,"boolean",xe);break;case ro:oi(4,"number",xe);break;case Ts:oi(9,"number",xe);break;case Es:oi(16,"number",xe);break;case Ds:Lc(bc);break;case zo:Lc(Hd);break}});var vr=1;switch(_e){case Ds:case zo:var yn=y.def(Ae,"._texture");y(X,".uniform1i(",ot,",",yn,".bind());"),y.exit(yn,".unbind();");continue;case Ef:case Wl:N="1i";break;case Yo:case xi:N="2i",vr=2;break;case Ho:case Ss:N="3i",vr=3;break;case bi:case As:N="4i",vr=4;break;case Tf:N="1f";break;case to:N="2f",vr=2;break;case ws:N="3f",vr=3;break;case Uo:N="4f",vr=4;break;case ro:N="Matrix2fv";break;case Ts:N="Matrix3fv";break;case Es:N="Matrix4fv";break}if(N.indexOf("Matrix")===-1&&xe>1&&(N+="v",vr=1),N.charAt(0)==="M"){y(X,".uniform",N,"(",ot,",");var so=Math.pow(_e-ro+2,2),ta=R.global.def("new Float32Array(",so,")");Array.isArray(Ae)?y("false,(",at(so,function(jn){return ta+"["+jn+"]="+Ae[jn]}),",",ta,")"):y("false,(Array.isArray(",Ae,")||",Ae," instanceof Float32Array)?",Ae,":(",at(so,function(jn){return ta+"["+jn+"]="+Ae+"["+jn+"]"}),",",ta,")"),y(");")}else if(vr>1){for(var ki=[],Aa=[],fo=0;fo<vr;++fo)Array.isArray(Ae)?Aa.push(Ae[fo]):Aa.push(y.def(Ae+"["+fo+"]")),W&&ki.push(y.def());W&&y("if(!",R.batchId,"||",ki.map(function(jn,lo){return jn+"!=="+Aa[lo]}).join("||"),"){",ki.map(function(jn,lo){return jn+"="+Aa[lo]+";"}).join("")),y(X,".uniform",N,"(",ot,",",Aa.join(","),");"),W&&y("}")}else{if(E(!Array.isArray(Ae),"uniform value must not be an array"),W){var Dc=y.def();y("if(!",R.batchId,"||",Dc,"!==",Ae,"){",Dc,"=",Ae,";")}y(X,".uniform",N,"(",ot,",",Ae,");"),W&&y("}")}}}function At(R,y,H,j){var Q=R.shared,W=Q.gl,Y=Q.draw,X=j.draw;function O(){var ht=X.elements,ct,Tt=y;return ht?((ht.contextDep&&j.contextDynamic||ht.propDep)&&(Tt=H),ct=ht.append(R,Tt),X.elementsActive&&Tt("if("+ct+")"+W+".bindBuffer("+Yl+","+ct+".buffer.buffer);")):(ct=Tt.def(),Tt(ct,"=",Y,".",ma,";","if(",ct,"){",W,".bindBuffer(",Yl,",",ct,".buffer.buffer);}","else if(",Q.vao,".currentVAO){",ct,"=",R.shared.elements+".getElements("+Q.vao,".currentVAO.elements);",Se?"":"if("+ct+")"+W+".bindBuffer("+Yl+","+ct+".buffer.buffer);","}")),ct}function N(){var ht=X.count,ct,Tt=y;return ht?((ht.contextDep&&j.contextDynamic||ht.propDep)&&(Tt=H),ct=ht.append(R,Tt),E.optional(function(){ht.MISSING&&R.assert(y,"false","missing vertex count"),ht.DYNAMIC&&R.assert(Tt,ct+">=0","missing vertex count")})):(ct=Tt.def(Y,".",ya),E.optional(function(){R.assert(Tt,ct+">=0","missing vertex count")})),ct}var I=O();function re(ht){var ct=X[ht];return ct?ct.contextDep&&j.contextDynamic||ct.propDep?ct.append(R,H):ct.append(R,y):y.def(Y,".",ht)}var ee=re(ga),_e=re(Ja),xe=N();if(typeof xe=="number"){if(xe===0)return}else H("if(",xe,"){"),H.exit("}");var Ye,Dt;Oe&&(Ye=re(bf),Dt=R.instancing);var yt=I+".type",ot=X.elements&&wa(X.elements)&&!X.vaoActive;function Ae(){function ht(){H(Dt,".drawElementsInstancedANGLE(",[ee,xe,yt,_e+"<<(("+yt+"-"+lc+")>>1)",Ye],");")}function ct(){H(Dt,".drawArraysInstancedANGLE(",[ee,_e,xe,Ye],");")}I&&I!=="null"?ot?ht():(H("if(",I,"){"),ht(),H("}else{"),ct(),H("}")):ct()}function he(){function ht(){H(W+".drawElements("+[ee,xe,yt,_e+"<<(("+yt+"-"+lc+")>>1)"]+");")}function ct(){H(W+".drawArrays("+[ee,_e,xe]+");")}I&&I!=="null"?ot?ht():(H("if(",I,"){"),ht(),H("}else{"),ct(),H("}")):ct()}Oe&&(typeof Ye!="number"||Ye>=0)?typeof Ye=="string"?(H("if(",Ye,">0){"),Ae(),H("}else if(",Ye,"<0){"),he(),H("}")):Ae():he()}function qt(R,y,H,j,Q){var W=Lt(),Y=W.proc("body",Q);return E.optional(function(){W.commandStr=y.commandStr,W.command=W.link(y.commandStr)}),Oe&&(W.instancing=Y.def(W.shared.extensions,".angle_instanced_arrays")),R(W,Y,H,j),W.compile().body}function er(R,y,H,j){Wr(R,y),H.useVAO?H.drawVAO?y(R.shared.vao,".setVAO(",H.drawVAO.append(R,y),");"):y(R.shared.vao,".setVAO(",R.shared.vao,".targetVAO);"):(y(R.shared.vao,".setVAO(null);"),gn(R,y,H,j.attributes,function(){return!0})),hr(R,y,H,j.uniforms,function(){return!0},!1),At(R,y,y,H)}function Vr(R,y){var H=R.proc("draw",1);Wr(R,H),Kr(R,H,y.context),en(R,H,y.framebuffer),ln(R,H,y),mn(R,H,y.state),Ut(R,H,y,!1,!0);var j=y.shader.progVar.append(R,H);if(H(R.shared.gl,".useProgram(",j,".program);"),y.shader.program)er(R,H,y,y.shader.program);else{H(R.shared.vao,".setVAO(null);");var Q=R.global.def("{}"),W=H.def(j,".id"),Y=H.def(Q,"[",W,"]");H(R.cond(Y).then(Y,".call(this,a0);").else(Y,"=",Q,"[",W,"]=",R.link(function(X){return qt(er,R,y,X,1)}),"(",j,");",Y,".call(this,a0);"))}Object.keys(y.state).length>0&&H(R.shared.current,".dirty=true;"),R.shared.vao&&H(R.shared.vao,".setVAO(null);")}function Si(R,y,H,j){R.batchId="a1",Wr(R,y);function Q(){return!0}gn(R,y,H,j.attributes,Q),hr(R,y,H,j.uniforms,Q,!1),At(R,y,y,H)}function Sa(R,y,H,j){Wr(R,y);var Q=H.contextDep,W=y.def(),Y="a0",X="a1",O=y.def();R.shared.props=O,R.batchId=W;var N=R.scope(),I=R.scope();y(N.entry,"for(",W,"=0;",W,"<",X,";++",W,"){",O,"=",Y,"[",W,"];",I,"}",N.exit);function re(yt){return yt.contextDep&&Q||yt.propDep}function ee(yt){return!re(yt)}if(H.needsContext&&Kr(R,I,H.context),H.needsFramebuffer&&en(R,I,H.framebuffer),mn(R,I,H.state,re),H.profile&&re(H.profile)&&Ut(R,I,H,!1,!0),j)H.useVAO?H.drawVAO?re(H.drawVAO)?I(R.shared.vao,".setVAO(",H.drawVAO.append(R,I),");"):N(R.shared.vao,".setVAO(",H.drawVAO.append(R,N),");"):N(R.shared.vao,".setVAO(",R.shared.vao,".targetVAO);"):(N(R.shared.vao,".setVAO(null);"),gn(R,N,H,j.attributes,ee),gn(R,I,H,j.attributes,re)),hr(R,N,H,j.uniforms,ee,!1),hr(R,I,H,j.uniforms,re,!0),At(R,N,I,H);else{var _e=R.global.def("{}"),xe=H.shader.progVar.append(R,I),Ye=I.def(xe,".id"),Dt=I.def(_e,"[",Ye,"]");I(R.shared.gl,".useProgram(",xe,".program);","if(!",Dt,"){",Dt,"=",_e,"[",Ye,"]=",R.link(function(yt){return qt(Si,R,H,yt,2)}),"(",xe,");}",Dt,".call(this,a0[",W,"],",W,");")}}function k(R,y){var H=R.proc("batch",2);R.batchId="0",Wr(R,H);var j=!1,Q=!0;Object.keys(y.context).forEach(function(_e){j=j||y.context[_e].propDep}),j||(Kr(R,H,y.context),Q=!1);var W=y.framebuffer,Y=!1;W?(W.propDep?j=Y=!0:W.contextDep&&j&&(Y=!0),Y||en(R,H,W)):en(R,H,null),y.state.viewport&&y.state.viewport.propDep&&(j=!0);function X(_e){return _e.contextDep&&j||_e.propDep}ln(R,H,y),mn(R,H,y.state,function(_e){return!X(_e)}),(!y.profile||!X(y.profile))&&Ut(R,H,y,!1,"a1"),y.contextDep=j,y.needsContext=Q,y.needsFramebuffer=Y;var O=y.shader.progVar;if(O.contextDep&&j||O.propDep)Sa(R,H,y,null);else{var N=O.append(R,H);if(H(R.shared.gl,".useProgram(",N,".program);"),y.shader.program)Sa(R,H,y,y.shader.program);else{H(R.shared.vao,".setVAO(null);");var I=R.global.def("{}"),re=H.def(N,".id"),ee=H.def(I,"[",re,"]");H(R.cond(ee).then(ee,".call(this,a0,a1);").else(ee,"=",I,"[",re,"]=",R.link(function(_e){return qt(Sa,R,y,_e,2)}),"(",N,");",ee,".call(this,a0,a1);"))}}Object.keys(y.state).length>0&&H(R.shared.current,".dirty=true;"),R.shared.vao&&H(R.shared.vao,".setVAO(null);")}function le(R,y){var H=R.proc("scope",3);R.batchId="a2";var j=R.shared,Q=j.current;Kr(R,H,y.context),y.framebuffer&&y.framebuffer.append(R,H),Rf(Object.keys(y.state)).forEach(function(Y){var X=y.state[Y],O=X.append(R,H);Pr(O)?O.forEach(function(N,I){H.set(R.next[Y],"["+I+"]",N)}):H.set(j.next,"."+Y,O)}),Ut(R,H,y,!0,!0),[ma,Ja,ya,bf,ga].forEach(function(Y){var X=y.draw[Y];!X||H.set(j.draw,"."+Y,""+X.append(R,H))}),Object.keys(y.uniforms).forEach(function(Y){var X=y.uniforms[Y].append(R,H);Array.isArray(X)&&(X="["+X.join()+"]"),H.set(j.uniforms,"["+T.id(Y)+"]",X)}),Object.keys(y.attributes).forEach(function(Y){var X=y.attributes[Y].append(R,H),O=R.scopeAttrib(Y);Object.keys(new K).forEach(function(N){H.set(O,"."+N,X[N])})}),y.scopeVAO&&H.set(j.vao,".targetVAO",y.scopeVAO.append(R,H));function W(Y){var X=y.shader[Y];X&&H.set(j.shader,"."+Y,X.append(R,H))}W(bs),W(Qa),Object.keys(y.state).length>0&&(H(Q,".dirty=true;"),H.exit(Q,".dirty=true;")),H("a1(",R.shared.context,",a0,",R.batchId,");")}function ne(R){if(!(typeof R!="object"||Pr(R))){for(var y=Object.keys(R),H=0;H<y.length;++H)if(Z.isDynamic(R[y[H]]))return!0;return!1}}function ft(R,y,H){var j=y.static[H];if(!j||!ne(j))return;var Q=R.global,W=Object.keys(j),Y=!1,X=!1,O=!1,N=R.global.def("{}");W.forEach(function(re){var ee=j[re];if(Z.isDynamic(ee)){typeof ee=="function"&&(ee=j[re]=Z.unbox(ee));var _e=An(ee,null);Y=Y||_e.thisDep,O=O||_e.propDep,X=X||_e.contextDep}else{switch(Q(N,".",re,"="),typeof ee){case"number":Q(ee);break;case"string":Q('"',ee,'"');break;case"object":Array.isArray(ee)&&Q("[",ee.join(),"]");break;default:Q(R.link(ee));break}Q(";")}});function I(re,ee){W.forEach(function(_e){var xe=j[_e];if(!!Z.isDynamic(xe)){var Ye=re.invoke(ee,xe);ee(N,".",_e,"=",Ye,";")}})}y.dynamic[H]=new Z.DynamicVariable(Ka,{thisDep:Y,contextDep:X,propDep:O,ref:N,append:I}),delete y.static[H]}function zt(R,y,H,j,Q){var W=Lt();W.stats=W.link(Q),Object.keys(y.static).forEach(function(X){ft(W,y,X)}),rr.forEach(function(X){ft(W,R,X)});var Y=qr(R,y,H,j,W);return Vr(W,Y),le(W,Y),k(W,Y),o(W.compile(),{destroy:function(){Y.shader.program.destroy()}})}return{next:je,current:Qe,procs:function(){var R=Lt(),y=R.proc("poll"),H=R.proc("refresh"),j=R.block();y(j),H(j);var Q=R.shared,W=Q.gl,Y=Q.next,X=Q.current;j(X,".dirty=false;"),en(R,y),en(R,H,null,!0);var O;Oe&&(O=R.link(Oe)),G.oes_vertex_array_object&&H(R.link(G.oes_vertex_array_object),".bindVertexArrayOES(null);");for(var N=0;N<se.maxAttributes;++N){var I=H.def(Q.attributes,"[",N,"]"),re=R.cond(I,".buffer");re.then(W,".enableVertexAttribArray(",N,");",W,".bindBuffer(",Go,",",I,".buffer.buffer);",W,".vertexAttribPointer(",N,",",I,".size,",I,".type,",I,".normalized,",I,".stride,",I,".offset);").else(W,".disableVertexAttribArray(",N,");",W,".vertexAttrib4f(",N,",",I,".x,",I,".y,",I,".z,",I,".w);",I,".buffer=null;"),H(re),Oe&&H(O,".vertexAttribDivisorANGLE(",N,",",I,".divisor);")}return H(R.shared.vao,".currentVAO=null;",R.shared.vao,".setVAO(",R.shared.vao,".targetVAO);"),Object.keys(be).forEach(function(ee){var _e=be[ee],xe=j.def(Y,".",ee),Ye=R.block();Ye("if(",xe,"){",W,".enable(",_e,")}else{",W,".disable(",_e,")}",X,".",ee,"=",xe,";"),H(Ye),y("if(",xe,"!==",X,".",ee,"){",Ye,"}")}),Object.keys(ge).forEach(function(ee){var _e=ge[ee],xe=Qe[ee],Ye,Dt,yt=R.block();if(yt(W,".",_e,"("),Pr(xe)){var ot=xe.length;Ye=R.global.def(Y,".",ee),Dt=R.global.def(X,".",ee),yt(at(ot,function(Ae){return Ye+"["+Ae+"]"}),");",at(ot,function(Ae){return Dt+"["+Ae+"]="+Ye+"["+Ae+"];"}).join("")),y("if(",at(ot,function(Ae){return Ye+"["+Ae+"]!=="+Dt+"["+Ae+"]"}).join("||"),"){",yt,"}")}else Ye=j.def(Y,".",ee),Dt=j.def(X,".",ee),yt(Ye,");",X,".",ee,"=",Ye,";"),y("if(",Ye,"!==",Dt,"){",yt,"}");H(yt)}),R.compile()}(),compile:zt}}function Zd(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var Ac=34918,ea=34919,jl=35007,Tc=function(h,T){if(!T.ext_disjoint_timer_query)return null;var G=[];function se(){return G.pop()||T.ext_disjoint_timer_query.createQueryEXT()}function me(Oe){G.push(Oe)}var ae=[];function fe(Oe){var rt=se();T.ext_disjoint_timer_query.beginQueryEXT(jl,rt),ae.push(rt),Ce(ae.length-1,ae.length,Oe)}function Le(){T.ext_disjoint_timer_query.endQueryEXT(jl)}function De(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var Ne=[];function Ge(){return Ne.pop()||new De}function Be(Oe){Ne.push(Oe)}var We=[];function Ce(Oe,rt,Se){var Qe=Ge();Qe.startQueryIndex=Oe,Qe.endQueryIndex=rt,Qe.sum=0,Qe.stats=Se,We.push(Qe)}var ke=[],K=[];function oe(){var Oe,rt,Se=ae.length;if(Se!==0){K.length=Math.max(K.length,Se+1),ke.length=Math.max(ke.length,Se+1),ke[0]=0,K[0]=0;var Qe=0;for(Oe=0,rt=0;rt<ae.length;++rt){var je=ae[rt];T.ext_disjoint_timer_query.getQueryObjectEXT(je,ea)?(Qe+=T.ext_disjoint_timer_query.getQueryObjectEXT(je,Ac),me(je)):ae[Oe++]=je,ke[rt+1]=Qe,K[rt+1]=Oe}for(ae.length=Oe,Oe=0,rt=0;rt<We.length;++rt){var pt=We[rt],be=pt.startQueryIndex,ge=pt.endQueryIndex;pt.sum+=ke[ge]-ke[be];var lt=K[be],Ve=K[ge];Ve===lt?(pt.stats.gpuTime+=pt.sum/1e6,Be(pt)):(pt.startQueryIndex=lt,pt.endQueryIndex=Ve,We[Oe++]=pt)}We.length=Oe}}return{beginQuery:fe,endQuery:Le,pushScopeStats:Ce,update:oe,getNumPendingQueries:function(){return ae.length},clear:function(){G.push.apply(G,ae);for(var Oe=0;Oe<G.length;Oe++)T.ext_disjoint_timer_query.deleteQueryEXT(G[Oe]);ae.length=0,G.length=0},restore:function(){ae.length=0,G.length=0}}},Xd=16384,Ec=256,qd=1024,Kd=34962,Fi="webglcontextlost",Cf="webglcontextrestored",Of=1,Ql=2,Mf=3;function oo(h,T){for(var G=0;G<h.length;++G)if(h[G]===T)return G;return-1}function Bt(h){var T=ce(h);if(!T)return null;var G=T.gl,se=G.getContextAttributes(),me=G.isContextLost(),ae=Et(G,T);if(!ae)return null;var fe=He(),Le=Zd(),De=ae.extensions,Ne=Tc(G,De),Ge=m(),Be=G.drawingBufferWidth,We=G.drawingBufferHeight,Ce={tick:0,time:0,viewportWidth:Be,viewportHeight:We,framebufferWidth:Be,framebufferHeight:We,drawingBufferWidth:Be,drawingBufferHeight:We,pixelRatio:T.pixelRatio},ke={},K={elements:null,primitive:4,count:-1,offset:0,instances:-1},oe=Jf(G,De),Oe=xn(G,Le,T,Qe),rt=Br(G,De,Oe,Le),Se=Nd(G,De,oe,Le,Oe,rt,K);function Qe(At){return Se.destroyBuffer(At)}var je=Cl(G,fe,Le,T),pt=Cn(G,De,oe,function(){lt.procs.poll()},Ce,Le,T),be=xd(G,De,oe,Le,T),ge=Pd(G,De,oe,pt,be,Le),lt=Kl(G,fe,De,oe,Oe,rt,pt,ge,ke,Se,je,K,Ce,Ne,T),Ve=Yd(G,ge,lt.procs.poll,Ce,se,De,oe),Ie=lt.next,$e=G.canvas,qe=[],Mt=[],Lt=[],Ke=[T.onDestroy],Je=null;function wt(){if(qe.length===0){Ne&&Ne.update(),Je=null;return}Je=we.next(wt),mn();for(var At=qe.length-1;At>=0;--At){var qt=qe[At];qt&&qt(Ce,null,0)}G.flush(),Ne&&Ne.update()}function Ct(){!Je&&qe.length>0&&(Je=we.next(wt))}function Vt(){Je&&(we.cancel(wt),Je=null)}function Mr(At){At.preventDefault(),me=!0,Vt(),Mt.forEach(function(qt){qt()})}function Lr(At){G.getError(),me=!1,ae.restore(),je.restore(),Oe.restore(),pt.restore(),be.restore(),ge.restore(),Se.restore(),Ne&&Ne.restore(),lt.procs.refresh(),Ct(),Lt.forEach(function(qt){qt()})}$e&&($e.addEventListener(Fi,Mr,!1),$e.addEventListener(Cf,Lr,!1));function Xt(){qe.length=0,Vt(),$e&&($e.removeEventListener(Fi,Mr),$e.removeEventListener(Cf,Lr)),je.clear(),ge.clear(),be.clear(),Se.clear(),pt.clear(),rt.clear(),Oe.clear(),Ne&&Ne.clear(),Ke.forEach(function(At){At()})}function Dr(At){E(!!At,"invalid args to regl({...})"),E.type(At,"object","invalid args to regl({...})");function qt(Q){var W=o({},Q);delete W.uniforms,delete W.attributes,delete W.context,delete W.vao,"stencil"in W&&W.stencil.op&&(W.stencil.opBack=W.stencil.opFront=W.stencil.op,delete W.stencil.op);function Y(X){if(X in W){var O=W[X];delete W[X],Object.keys(O).forEach(function(N){W[X+"."+N]=O[N]})}}return Y("blend"),Y("depth"),Y("cull"),Y("stencil"),Y("polygonOffset"),Y("scissor"),Y("sample"),"vao"in Q&&(W.vao=Q.vao),W}function er(Q,W){var Y={},X={};return Object.keys(Q).forEach(function(O){var N=Q[O];if(Z.isDynamic(N)){X[O]=Z.unbox(N,O);return}else if(W&&Array.isArray(N)){for(var I=0;I<N.length;++I)if(Z.isDynamic(N[I])){X[O]=Z.unbox(N,O);return}}Y[O]=N}),{dynamic:X,static:Y}}var Vr=er(At.context||{},!0),Si=er(At.uniforms||{},!0),Sa=er(At.attributes||{},!1),k=er(qt(At),!1),le={gpuTime:0,cpuTime:0,count:0},ne=lt.compile(k,Sa,Si,Vr,le),ft=ne.draw,zt=ne.batch,R=ne.scope,y=[];function H(Q){for(;y.length<Q;)y.push(null);return y}function j(Q,W){var Y;if(me&&E.raise("context lost"),typeof Q=="function")return R.call(this,null,Q,0);if(typeof W=="function")if(typeof Q=="number")for(Y=0;Y<Q;++Y)R.call(this,null,W,Y);else if(Array.isArray(Q))for(Y=0;Y<Q.length;++Y)R.call(this,Q[Y],W,Y);else return R.call(this,Q,W,0);else if(typeof Q=="number"){if(Q>0)return zt.call(this,H(Q|0),Q|0)}else if(Array.isArray(Q)){if(Q.length)return zt.call(this,Q,Q.length)}else return ft.call(this,Q)}return o(j,{stats:le,destroy:function(){ne.destroy()}})}var pr=ge.setFBO=Dr({framebuffer:Z.define.call(null,Of,"framebuffer")});function qr(At,qt){var er=0;lt.procs.poll();var Vr=qt.color;Vr&&(G.clearColor(+Vr[0]||0,+Vr[1]||0,+Vr[2]||0,+Vr[3]||0),er|=Xd),"depth"in qt&&(G.clearDepth(+qt.depth),er|=Ec),"stencil"in qt&&(G.clearStencil(qt.stencil|0),er|=qd),E(!!er,"called regl.clear with no buffer specified"),G.clear(er)}function Kr(At){if(E(typeof At=="object"&&At,"regl.clear() takes an object as input"),"framebuffer"in At)if(At.framebuffer&&At.framebuffer_reglType==="framebufferCube")for(var qt=0;qt<6;++qt)pr(o({framebuffer:At.framebuffer.faces[qt]},At),qr);else pr(At,qr);else qr(null,At)}function en(At){E.type(At,"function","regl.frame() callback must be a function"),qe.push(At);function qt(){var er=oo(qe,At);E(er>=0,"cannot cancel a frame twice");function Vr(){var Si=oo(qe,Vr);qe[Si]=qe[qe.length-1],qe.length-=1,qe.length<=0&&Vt()}qe[er]=Vr}return Ct(),{cancel:qt}}function ln(){var At=Ie.viewport,qt=Ie.scissor_box;At[0]=At[1]=qt[0]=qt[1]=0,Ce.viewportWidth=Ce.framebufferWidth=Ce.drawingBufferWidth=At[2]=qt[2]=G.drawingBufferWidth,Ce.viewportHeight=Ce.framebufferHeight=Ce.drawingBufferHeight=At[3]=qt[3]=G.drawingBufferHeight}function mn(){Ce.tick+=1,Ce.time=Ut(),ln(),lt.procs.poll()}function Wr(){pt.refresh(),ln(),lt.procs.refresh(),Ne&&Ne.update()}function Ut(){return(m()-Ge)/1e3}Wr();function gn(At,qt){E.type(qt,"function","listener callback must be a function");var er;switch(At){case"frame":return en(qt);case"lost":er=Mt;break;case"restore":er=Lt;break;case"destroy":er=Ke;break;default:E.raise("invalid event, must be one of frame,lost,restore,destroy")}return er.push(qt),{cancel:function(){for(var Vr=0;Vr<er.length;++Vr)if(er[Vr]===qt){er[Vr]=er[er.length-1],er.pop();return}}}}var hr=o(Dr,{clear:Kr,prop:Z.define.bind(null,Of),context:Z.define.bind(null,Ql),this:Z.define.bind(null,Mf),draw:Dr({}),buffer:function(At){return Oe.create(At,Kd,!1,!1)},elements:function(At){return rt.create(At,!1)},texture:pt.create2D,cube:pt.createCube,renderbuffer:be.create,framebuffer:ge.create,framebufferCube:ge.createCube,vao:Se.createVAO,attributes:se,frame:en,on:gn,limits:oe,hasExtension:function(At){return oe.extensions.indexOf(At.toLowerCase())>=0},read:Ve,destroy:Xt,_gl:G,_refresh:Wr,poll:function(){mn(),Ne&&Ne.update()},now:Ut,stats:Le});return T.onDone(null,hr),hr}return Bt})})(Nv);const Ry=Nv.exports,Cy=[0,0,0,0],Oy=1024,My=1496e8,Iy=40075016686e-3,Fy=695508e3,ky=.017453292519943295,Py=.0333334,Ny=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/,By=/(?:#)[0-9a-f]{8}|(?:#)[0-9a-f]{6}|(?:#)[0-9a-f]{4}|(?:#)[0-9a-f]{3}/ig;function Bv(){const t=new Uint8Array([170,187]);return new Uint16Array(t.buffer)[0]===48042}function Gv(...t){if(t.length===1){const[n]=t;return new Array(n).fill(void 0).map((i,o)=>o)}else{const[n,i,o=1]=t;if(o===0)throw new Error("Argument step must be nonzero.");const f=[];for(let s=n;o>0?s<i:s>i;s+=o)f.push(s);return f}}async function Uv(t,n,i){return new Promise((o,f)=>{const s=new XMLHttpRequest;s.open("GET",t,!0),s.responseType="arraybuffer",s.addEventListener("load",()=>{o(s.response)}),s.addEventListener("error",f),s.send(null)}).then(o=>{const f=wh.exports.decode(o),s=wh.exports.toRGBA8(f)[0];return new Uint8Array(s)}).catch(()=>Fh(n,i))}function Gy(t,n){return t.byteLength!==n.byteLength?!1:t.every((i,o)=>i===n[o])}function Uy(t,n){const i=2/t,o=-2/n;return[i,0,0,0,0,o,0,0,0,0,1,0,-1,1,0,1]}function Yy(t){const[{x:n,y:i},{x:o,y:f}]=t;return[[n,i],[o,i],[n,f],[o,f]]}const Fh=Ys.exports.memoize((t,n=256)=>{const i=new Float32Array(n*n);return i.fill(t),new Uint8Array(i.buffer)});function Hy(t,n){return`${Object.keys(n).map(o=>`#define ${o} ${n[o]}
45
+ `),Ce=Function.apply(null,T.concat(We));return Ce.apply(null,G)}return{global:Le,link:se,block:me,proc:Ne,scope:ae,cond:fe,compile:Ge}}var Tn="xyzw".split(""),xc=5121,Qa=1,Sf=2,Ja=0,ki=1,Af=2,Bl=3,eo=4,bc=5,Gl=6,mn="dither",Tf="blend.enable",Ul="blend.color",si="blend.equation",bs="blend.func",ws="depth.enable",xa="depth.func",Yl="depth.range",Fn="depth.mask",Ss="colorMask",wc="cull.enable",Sc="cull.face",Hl="frontFace",As="lineWidth",Ac="polygonOffset.enable",to="polygonOffset.offset",zl="sample.alpha",Tc="sample.enable",Wl="sample.coverage",Bo="stencil.enable",Ec="stencil.mask",Vl="stencil.func",Ts="stencil.opFront",Go="stencil.opBack",Dc="scissor.enable",Ef="scissor.box",ta="viewport",Uo="profile",ra="framebuffer",Es="vert",ro="frag",ba="elements",wa="primitive",Sa="count",no="offset",Df="instances",Yo="vao",Lf="Width",$l="Height",io=ra+Lf,Ho=ra+$l,Zl=ta+Lf,Lc=ta+$l,Rf="drawingBuffer",Rc=Rf+Lf,Cf=Rf+$l,rr=[bs,si,Vl,Ts,Go,Wl,ta,Ef,to],zo=34962,Xl=34963,Ds=35632,Cc=35633,Oc=3553,t0=34067,fi=2884,r0=3042,Of=3024,ql=2960,Ic=2929,Mc=3089,Qn=32823,Aa=32926,Kl=32928,If=5126,ao=35664,Ls=35665,Wo=35666,Mf=5124,Vo=35667,$o=35668,Si=35669,jl=35670,Ai=35671,Rs=35672,Cs=35673,oo=35674,Os=35675,Is=35676,Ms=35678,Zo=35680,Ff=4,Fs=1028,Ta=1029,Ql=2304,kn=2305,Pi=32775,n0=32776,i0=519,Ti=7680,so=0,Jl=1,eu=32774,a0=513,tu=36160,Xo=36064,qn={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Fc=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"],fo={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},na={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},ks={frag:Ds,vert:Cc},kf={cw:Ql,ccw:kn};function lo(h){return Array.isArray(h)||i(h)||On(h)}function Pf(h){return h.sort(function(T,G){return T===ta?-1:G===ta?1:T<G?-1:1})}function Hr(h,T,G,se){this.thisDep=h,this.contextDep=T,this.propDep=G,this.append=se}function Ea(h){return h&&!(h.thisDep||h.contextDep||h.propDep)}function zr(h){return new Hr(!1,!1,!1,h)}function En(h,T){var G=h.type;if(G===Ja){var se=h.data.length;return new Hr(!0,se>=1,se>=2,T)}else if(G===eo){var me=h.data;return new Hr(me.thisDep,me.contextDep,me.propDep,T)}else{if(G===bc)return new Hr(!1,!1,!1,T);if(G===Gl){for(var ae=!1,fe=!1,Le=!1,De=0;De<h.data.length;++De){var Ne=h.data[De];if(Ne.type===ki)Le=!0;else if(Ne.type===Af)fe=!0;else if(Ne.type===Bl)ae=!0;else if(Ne.type===Ja){ae=!0;var Ge=Ne.data;Ge>=1&&(fe=!0),Ge>=2&&(Le=!0)}else Ne.type===eo&&(ae=ae||Ne.data.thisDep,fe=fe||Ne.data.contextDep,Le=Le||Ne.data.propDep)}return new Hr(ae,fe,Le,T)}else return new Hr(G===Bl,G===Af,G===ki,T)}}var ru=new Hr(!1,!1,!1,function(){});function nu(h,T,G,se,me,ae,fe,Le,De,Ne,Ge,Be,We,Ce,ke){var K=Ne.Record,oe={add:32774,subtract:32778,"reverse subtract":32779};G.ext_blend_minmax&&(oe.min=Pi,oe.max=n0);var Oe=G.angle_instanced_arrays,rt=G.webgl_draw_buffers,Se=G.oes_vertex_array_object,Qe={dirty:!0,profile:ke.profile},je={},pt=[],xe={},ge={};function lt(R){return R.replace(".","_")}function Ve(R,y,H){var j=lt(R);pt.push(R),je[j]=Qe[j]=!!H,xe[j]=y}function Me(R,y,H){var j=lt(R);pt.push(R),Array.isArray(H)?(Qe[j]=H.slice(),je[j]=H.slice()):Qe[j]=je[j]=H,ge[j]=y}Ve(mn,Of),Ve(Tf,r0),Me(Ul,"blendColor",[0,0,0,0]),Me(si,"blendEquationSeparate",[eu,eu]),Me(bs,"blendFuncSeparate",[Jl,so,Jl,so]),Ve(ws,Ic,!0),Me(xa,"depthFunc",a0),Me(Yl,"depthRange",[0,1]),Me(Fn,"depthMask",!0),Me(Ss,Ss,[!0,!0,!0,!0]),Ve(wc,fi),Me(Sc,"cullFace",Ta),Me(Hl,Hl,kn),Me(As,As,1),Ve(Ac,Qn),Me(to,"polygonOffset",[0,0]),Ve(zl,Aa),Ve(Tc,Kl),Me(Wl,"sampleCoverage",[1,!1]),Ve(Bo,ql),Me(Ec,"stencilMask",-1),Me(Vl,"stencilFunc",[i0,0,-1]),Me(Ts,"stencilOpSeparate",[Fs,Ti,Ti,Ti]),Me(Go,"stencilOpSeparate",[Ta,Ti,Ti,Ti]),Ve(Dc,Mc),Me(Ef,"scissor",[0,0,h.drawingBufferWidth,h.drawingBufferHeight]),Me(ta,ta,[0,0,h.drawingBufferWidth,h.drawingBufferHeight]);var $e={gl:h,context:We,strings:T,next:je,current:Qe,draw:Be,elements:ae,buffer:me,shader:Ge,attributes:Ne.state,vao:Ne,uniforms:De,framebuffer:Le,extensions:G,timer:Ce,isBufferArgs:lo},qe={primTypes:Xi,compareFuncs:fo,blendFuncs:qn,blendEquations:oe,stencilOps:na,glTypes:Ga,orientationType:kf};E.optional(function(){$e.isArrayLike=Pr}),rt&&(qe.backBuffer=[Ta],qe.drawBuffer=at(se.maxDrawbuffers,function(R){return R===0?[0]:at(R,function(y){return Xo+y})}));var It=0;function Lt(){var R=ja(),y=R.link,H=R.global;R.id=It++,R.batchId="0";var j=y($e),Q=R.shared={props:"a0"};Object.keys($e).forEach(function(N){Q[N]=H.def(j,".",N)}),E.optional(function(){R.CHECK=y(E),R.commandStr=E.guessCommand(),R.command=y(R.commandStr),R.assert=function(N,M,re){N("if(!(",M,"))",this.CHECK,".commandRaise(",y(re),",",this.command,");")},qe.invalidBlendCombinations=Fc});var W=R.next={},Y=R.current={};Object.keys(ge).forEach(function(N){Array.isArray(Qe[N])&&(W[N]=H.def(Q.next,".",N),Y[N]=H.def(Q.current,".",N))});var X=R.constants={};Object.keys(qe).forEach(function(N){X[N]=H.def(JSON.stringify(qe[N]))}),R.invoke=function(N,M){switch(M.type){case Ja:var re=["this",Q.context,Q.props,R.batchId];return N.def(y(M.data),".call(",re.slice(0,Math.max(M.data.length+1,4)),")");case ki:return N.def(Q.props,M.data);case Af:return N.def(Q.context,M.data);case Bl:return N.def("this",M.data);case eo:return M.data.append(R,N),M.data.ref;case bc:return M.data.toString();case Gl:return M.data.map(function(ee){return R.invoke(N,ee)})}},R.attribCache={};var O={};return R.scopeAttrib=function(N){var M=T.id(N);if(M in O)return O[M];var re=Ne.scope[M];re||(re=Ne.scope[M]=new K);var ee=O[M]=y(re);return ee},R}function Ke(R){var y=R.static,H=R.dynamic,j;if(Uo in y){var Q=!!y[Uo];j=zr(function(Y,X){return Q}),j.enable=Q}else if(Uo in H){var W=H[Uo];j=En(W,function(Y,X){return Y.invoke(X,W)})}return j}function Je(R,y){var H=R.static,j=R.dynamic;if(ra in H){var Q=H[ra];return Q?(Q=Le.getFramebuffer(Q),E.command(Q,"invalid framebuffer object"),zr(function(Y,X){var O=Y.link(Q),N=Y.shared;X.set(N.framebuffer,".next",O);var M=N.context;return X.set(M,"."+io,O+".width"),X.set(M,"."+Ho,O+".height"),O})):zr(function(Y,X){var O=Y.shared;X.set(O.framebuffer,".next","null");var N=O.context;return X.set(N,"."+io,N+"."+Rc),X.set(N,"."+Ho,N+"."+Cf),"null"})}else if(ra in j){var W=j[ra];return En(W,function(Y,X){var O=Y.invoke(X,W),N=Y.shared,M=N.framebuffer,re=X.def(M,".getFramebuffer(",O,")");E.optional(function(){Y.assert(X,"!"+O+"||"+re,"invalid framebuffer object")}),X.set(M,".next",re);var ee=N.context;return X.set(ee,"."+io,re+"?"+re+".width:"+ee+"."+Rc),X.set(ee,"."+Ho,re+"?"+re+".height:"+ee+"."+Cf),re})}else return null}function wt(R,y,H){var j=R.static,Q=R.dynamic;function W(O){if(O in j){var N=j[O];E.commandType(N,"object","invalid "+O,H.commandStr);var M=!0,re=N.x|0,ee=N.y|0,_e,be;return"width"in N?(_e=N.width|0,E.command(_e>=0,"invalid "+O,H.commandStr)):M=!1,"height"in N?(be=N.height|0,E.command(be>=0,"invalid "+O,H.commandStr)):M=!1,new Hr(!M&&y&&y.thisDep,!M&&y&&y.contextDep,!M&&y&&y.propDep,function(yt,ot){var Ae=yt.shared.context,he=_e;"width"in N||(he=ot.def(Ae,".",io,"-",re));var ht=be;return"height"in N||(ht=ot.def(Ae,".",Ho,"-",ee)),[re,ee,he,ht]})}else if(O in Q){var Ye=Q[O],Dt=En(Ye,function(yt,ot){var Ae=yt.invoke(ot,Ye);E.optional(function(){yt.assert(ot,Ae+"&&typeof "+Ae+'==="object"',"invalid "+O)});var he=yt.shared.context,ht=ot.def(Ae,".x|0"),ct=ot.def(Ae,".y|0"),Tt=ot.def('"width" in ',Ae,"?",Ae,".width|0:","(",he,".",io,"-",ht,")"),vr=ot.def('"height" in ',Ae,"?",Ae,".height|0:","(",he,".",Ho,"-",ct,")");return E.optional(function(){yt.assert(ot,Tt+">=0&&"+vr+">=0","invalid "+O)}),[ht,ct,Tt,vr]});return y&&(Dt.thisDep=Dt.thisDep||y.thisDep,Dt.contextDep=Dt.contextDep||y.contextDep,Dt.propDep=Dt.propDep||y.propDep),Dt}else return y?new Hr(y.thisDep,y.contextDep,y.propDep,function(yt,ot){var Ae=yt.shared.context;return[0,0,ot.def(Ae,".",io),ot.def(Ae,".",Ho)]}):null}var Y=W(ta);if(Y){var X=Y;Y=new Hr(Y.thisDep,Y.contextDep,Y.propDep,function(O,N){var M=X.append(O,N),re=O.shared.context;return N.set(re,"."+Zl,M[2]),N.set(re,"."+Lc,M[3]),M})}return{viewport:Y,scissor_box:W(Ef)}}function Ct(R,y){var H=R.static,j=typeof H[ro]=="string"&&typeof H[Es]=="string";if(j){if(Object.keys(y.dynamic).length>0)return null;var Q=y.static,W=Object.keys(Q);if(W.length>0&&typeof Q[W[0]]=="number"){for(var Y=[],X=0;X<W.length;++X)E(typeof Q[W[X]]=="number","must specify all vertex attribute locations when using vaos"),Y.push([Q[W[X]]|0,W[X]]);return Y}}return null}function Vt(R,y,H){var j=R.static,Q=R.dynamic;function W(M){if(M in j){var re=T.id(j[M]);E.optional(function(){Ge.shader(ks[M],re,E.guessCommand())});var ee=zr(function(){return re});return ee.id=re,ee}else if(M in Q){var _e=Q[M];return En(_e,function(be,Ye){var Dt=be.invoke(Ye,_e),yt=Ye.def(be.shared.strings,".id(",Dt,")");return E.optional(function(){Ye(be.shared.shader,".shader(",ks[M],",",yt,",",be.command,");")}),yt})}return null}var Y=W(ro),X=W(Es),O=null,N;return Ea(Y)&&Ea(X)?(O=Ge.program(X.id,Y.id,null,H),N=zr(function(M,re){return M.link(O)})):N=new Hr(Y&&Y.thisDep||X&&X.thisDep,Y&&Y.contextDep||X&&X.contextDep,Y&&Y.propDep||X&&X.propDep,function(M,re){var ee=M.shared.shader,_e;Y?_e=Y.append(M,re):_e=re.def(ee,".",ro);var be;X?be=X.append(M,re):be=re.def(ee,".",Es);var Ye=ee+".program("+be+","+_e;return E.optional(function(){Ye+=","+M.command}),re.def(Ye+")")}),{frag:Y,vert:X,progVar:N,program:O}}function Ir(R,y){var H=R.static,j=R.dynamic,Q={},W=!1;function Y(){if(Yo in H){var ot=H[Yo];return ot!==null&&Ne.getVAO(ot)===null&&(ot=Ne.createVAO(ot)),W=!0,Q.vao=ot,zr(function(he){var ht=Ne.getVAO(ot);return ht?he.link(ht):"null"})}else if(Yo in j){W=!0;var Ae=j[Yo];return En(Ae,function(he,ht){var ct=he.invoke(ht,Ae);return ht.def(he.shared.vao+".getVAO("+ct+")")})}return null}var X=Y(),O=!1;function N(){if(ba in H){var ot=H[ba];if(Q.elements=ot,lo(ot)){var Ae=Q.elements=ae.create(ot,!0);ot=ae.getElements(Ae),O=!0}else ot&&(ot=ae.getElements(ot),O=!0,E.command(ot,"invalid elements",y.commandStr));var he=zr(function(ct,Tt){if(ot){var vr=ct.link(ot);return ct.ELEMENTS=vr,vr}return ct.ELEMENTS=null,null});return he.value=ot,he}else if(ba in j){O=!0;var ht=j[ba];return En(ht,function(ct,Tt){var vr=ct.shared,xn=vr.isBufferArgs,co=vr.elements,aa=ct.invoke(Tt,ht),Bi=Tt.def("null"),La=Tt.def(xn,"(",aa,")"),ho=ct.cond(La).then(Bi,"=",co,".createStream(",aa,");").else(Bi,"=",co,".getElements(",aa,");");return E.optional(function(){ct.assert(ho.else,"!"+aa+"||"+Bi,"invalid elements")}),Tt.entry(ho),Tt.exit(ct.cond(La).then(co,".destroyStream(",Bi,");")),ct.ELEMENTS=Bi,Bi})}else if(W)return new Hr(X.thisDep,X.contextDep,X.propDep,function(ct,Tt){return Tt.def(ct.shared.vao+".currentVAO?"+ct.shared.elements+".getElements("+ct.shared.vao+".currentVAO.elements):null")});return null}var M=N();function re(){if(wa in H){var ot=H[wa];return Q.primitive=ot,E.commandParameter(ot,Xi,"invalid primitve",y.commandStr),zr(function(he,ht){return Xi[ot]})}else if(wa in j){var Ae=j[wa];return En(Ae,function(he,ht){var ct=he.constants.primTypes,Tt=he.invoke(ht,Ae);return E.optional(function(){he.assert(ht,Tt+" in "+ct,"invalid primitive, must be one of "+Object.keys(Xi))}),ht.def(ct,"[",Tt,"]")})}else{if(O)return Ea(M)?M.value?zr(function(he,ht){return ht.def(he.ELEMENTS,".primType")}):zr(function(){return Ff}):new Hr(M.thisDep,M.contextDep,M.propDep,function(he,ht){var ct=he.ELEMENTS;return ht.def(ct,"?",ct,".primType:",Ff)});if(W)return new Hr(X.thisDep,X.contextDep,X.propDep,function(he,ht){return ht.def(he.shared.vao+".currentVAO?"+he.shared.vao+".currentVAO.primitive:"+Ff)})}return null}function ee(ot,Ae){if(ot in H){var he=H[ot]|0;return Ae?Q.offset=he:Q.instances=he,E.command(!Ae||he>=0,"invalid "+ot,y.commandStr),zr(function(ct,Tt){return Ae&&(ct.OFFSET=he),he})}else if(ot in j){var ht=j[ot];return En(ht,function(ct,Tt){var vr=ct.invoke(Tt,ht);return Ae&&(ct.OFFSET=vr,E.optional(function(){ct.assert(Tt,vr+">=0","invalid "+ot)})),vr})}else if(Ae){if(O)return zr(function(ct,Tt){return ct.OFFSET=0,0});if(W)return new Hr(X.thisDep,X.contextDep,X.propDep,function(ct,Tt){return Tt.def(ct.shared.vao+".currentVAO?"+ct.shared.vao+".currentVAO.offset:0")})}else if(W)return new Hr(X.thisDep,X.contextDep,X.propDep,function(ct,Tt){return Tt.def(ct.shared.vao+".currentVAO?"+ct.shared.vao+".currentVAO.instances:-1")});return null}var _e=ee(no,!0);function be(){if(Sa in H){var ot=H[Sa]|0;return Q.count=ot,E.command(typeof ot=="number"&&ot>=0,"invalid vertex count",y.commandStr),zr(function(){return ot})}else if(Sa in j){var Ae=j[Sa];return En(Ae,function(Tt,vr){var xn=Tt.invoke(vr,Ae);return E.optional(function(){Tt.assert(vr,"typeof "+xn+'==="number"&&'+xn+">=0&&"+xn+"===("+xn+"|0)","invalid vertex count")}),xn})}else if(O)if(Ea(M)){if(M)return _e?new Hr(_e.thisDep,_e.contextDep,_e.propDep,function(Tt,vr){var xn=vr.def(Tt.ELEMENTS,".vertCount-",Tt.OFFSET);return E.optional(function(){Tt.assert(vr,xn+">=0","invalid vertex offset/element buffer too small")}),xn}):zr(function(Tt,vr){return vr.def(Tt.ELEMENTS,".vertCount")});var he=zr(function(){return-1});return E.optional(function(){he.MISSING=!0}),he}else{var ht=new Hr(M.thisDep||_e.thisDep,M.contextDep||_e.contextDep,M.propDep||_e.propDep,function(Tt,vr){var xn=Tt.ELEMENTS;return Tt.OFFSET?vr.def(xn,"?",xn,".vertCount-",Tt.OFFSET,":-1"):vr.def(xn,"?",xn,".vertCount:-1")});return E.optional(function(){ht.DYNAMIC=!0}),ht}else if(W){var ct=new Hr(X.thisDep,X.contextDep,X.propDep,function(Tt,vr){return vr.def(Tt.shared.vao,".currentVAO?",Tt.shared.vao,".currentVAO.count:-1")});return ct}return null}var Ye=re(),Dt=be(),yt=ee(Df,!1);return{elements:M,primitive:Ye,count:Dt,instances:yt,offset:_e,vao:X,vaoActive:W,elementsActive:O,static:Q}}function Lr(R,y){var H=R.static,j=R.dynamic,Q={};return pt.forEach(function(W){var Y=lt(W);function X(O,N){if(W in H){var M=O(H[W]);Q[Y]=zr(function(){return M})}else if(W in j){var re=j[W];Q[Y]=En(re,function(ee,_e){return N(ee,_e,ee.invoke(_e,re))})}}switch(W){case wc:case Tf:case mn:case Bo:case ws:case Dc:case Ac:case zl:case Tc:case Fn:return X(function(O){return E.commandType(O,"boolean",W,y.commandStr),O},function(O,N,M){return E.optional(function(){O.assert(N,"typeof "+M+'==="boolean"',"invalid flag "+W,O.commandStr)}),M});case xa:return X(function(O){return E.commandParameter(O,fo,"invalid "+W,y.commandStr),fo[O]},function(O,N,M){var re=O.constants.compareFuncs;return E.optional(function(){O.assert(N,M+" in "+re,"invalid "+W+", must be one of "+Object.keys(fo))}),N.def(re,"[",M,"]")});case Yl:return X(function(O){return E.command(Pr(O)&&O.length===2&&typeof O[0]=="number"&&typeof O[1]=="number"&&O[0]<=O[1],"depth range is 2d array",y.commandStr),O},function(O,N,M){E.optional(function(){O.assert(N,O.shared.isArrayLike+"("+M+")&&"+M+".length===2&&typeof "+M+'[0]==="number"&&typeof '+M+'[1]==="number"&&'+M+"[0]<="+M+"[1]","depth range must be a 2d array")});var re=N.def("+",M,"[0]"),ee=N.def("+",M,"[1]");return[re,ee]});case bs:return X(function(O){E.commandType(O,"object","blend.func",y.commandStr);var N="srcRGB"in O?O.srcRGB:O.src,M="srcAlpha"in O?O.srcAlpha:O.src,re="dstRGB"in O?O.dstRGB:O.dst,ee="dstAlpha"in O?O.dstAlpha:O.dst;return E.commandParameter(N,qn,Y+".srcRGB",y.commandStr),E.commandParameter(M,qn,Y+".srcAlpha",y.commandStr),E.commandParameter(re,qn,Y+".dstRGB",y.commandStr),E.commandParameter(ee,qn,Y+".dstAlpha",y.commandStr),E.command(Fc.indexOf(N+", "+re)===-1,"unallowed blending combination (srcRGB, dstRGB) = ("+N+", "+re+")",y.commandStr),[qn[N],qn[re],qn[M],qn[ee]]},function(O,N,M){var re=O.constants.blendFuncs;E.optional(function(){O.assert(N,M+"&&typeof "+M+'==="object"',"invalid blend func, must be an object")});function ee(Ae,he){var ht=N.def('"',Ae,he,'" in ',M,"?",M,".",Ae,he,":",M,".",Ae);return E.optional(function(){O.assert(N,ht+" in "+re,"invalid "+W+"."+Ae+he+", must be one of "+Object.keys(qn))}),ht}var _e=ee("src","RGB"),be=ee("dst","RGB");E.optional(function(){var Ae=O.constants.invalidBlendCombinations;O.assert(N,Ae+".indexOf("+_e+'+", "+'+be+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")});var Ye=N.def(re,"[",_e,"]"),Dt=N.def(re,"[",ee("src","Alpha"),"]"),yt=N.def(re,"[",be,"]"),ot=N.def(re,"[",ee("dst","Alpha"),"]");return[Ye,yt,Dt,ot]});case si:return X(function(O){if(typeof O=="string")return E.commandParameter(O,oe,"invalid "+W,y.commandStr),[oe[O],oe[O]];if(typeof O=="object")return E.commandParameter(O.rgb,oe,W+".rgb",y.commandStr),E.commandParameter(O.alpha,oe,W+".alpha",y.commandStr),[oe[O.rgb],oe[O.alpha]];E.commandRaise("invalid blend.equation",y.commandStr)},function(O,N,M){var re=O.constants.blendEquations,ee=N.def(),_e=N.def(),be=O.cond("typeof ",M,'==="string"');return E.optional(function(){function Ye(Dt,yt,ot){O.assert(Dt,ot+" in "+re,"invalid "+yt+", must be one of "+Object.keys(oe))}Ye(be.then,W,M),O.assert(be.else,M+"&&typeof "+M+'==="object"',"invalid "+W),Ye(be.else,W+".rgb",M+".rgb"),Ye(be.else,W+".alpha",M+".alpha")}),be.then(ee,"=",_e,"=",re,"[",M,"];"),be.else(ee,"=",re,"[",M,".rgb];",_e,"=",re,"[",M,".alpha];"),N(be),[ee,_e]});case Ul:return X(function(O){return E.command(Pr(O)&&O.length===4,"blend.color must be a 4d array",y.commandStr),at(4,function(N){return+O[N]})},function(O,N,M){return E.optional(function(){O.assert(N,O.shared.isArrayLike+"("+M+")&&"+M+".length===4","blend.color must be a 4d array")}),at(4,function(re){return N.def("+",M,"[",re,"]")})});case Ec:return X(function(O){return E.commandType(O,"number",Y,y.commandStr),O|0},function(O,N,M){return E.optional(function(){O.assert(N,"typeof "+M+'==="number"',"invalid stencil.mask")}),N.def(M,"|0")});case Vl:return X(function(O){E.commandType(O,"object",Y,y.commandStr);var N=O.cmp||"keep",M=O.ref||0,re="mask"in O?O.mask:-1;return E.commandParameter(N,fo,W+".cmp",y.commandStr),E.commandType(M,"number",W+".ref",y.commandStr),E.commandType(re,"number",W+".mask",y.commandStr),[fo[N],M,re]},function(O,N,M){var re=O.constants.compareFuncs;E.optional(function(){function Ye(){O.assert(N,Array.prototype.join.call(arguments,""),"invalid stencil.func")}Ye(M+"&&typeof ",M,'==="object"'),Ye('!("cmp" in ',M,")||(",M,".cmp in ",re,")")});var ee=N.def('"cmp" in ',M,"?",re,"[",M,".cmp]",":",Ti),_e=N.def(M,".ref|0"),be=N.def('"mask" in ',M,"?",M,".mask|0:-1");return[ee,_e,be]});case Ts:case Go:return X(function(O){E.commandType(O,"object",Y,y.commandStr);var N=O.fail||"keep",M=O.zfail||"keep",re=O.zpass||"keep";return E.commandParameter(N,na,W+".fail",y.commandStr),E.commandParameter(M,na,W+".zfail",y.commandStr),E.commandParameter(re,na,W+".zpass",y.commandStr),[W===Go?Ta:Fs,na[N],na[M],na[re]]},function(O,N,M){var re=O.constants.stencilOps;E.optional(function(){O.assert(N,M+"&&typeof "+M+'==="object"',"invalid "+W)});function ee(_e){return E.optional(function(){O.assert(N,'!("'+_e+'" in '+M+")||("+M+"."+_e+" in "+re+")","invalid "+W+"."+_e+", must be one of "+Object.keys(na))}),N.def('"',_e,'" in ',M,"?",re,"[",M,".",_e,"]:",Ti)}return[W===Go?Ta:Fs,ee("fail"),ee("zfail"),ee("zpass")]});case to:return X(function(O){E.commandType(O,"object",Y,y.commandStr);var N=O.factor|0,M=O.units|0;return E.commandType(N,"number",Y+".factor",y.commandStr),E.commandType(M,"number",Y+".units",y.commandStr),[N,M]},function(O,N,M){E.optional(function(){O.assert(N,M+"&&typeof "+M+'==="object"',"invalid "+W)});var re=N.def(M,".factor|0"),ee=N.def(M,".units|0");return[re,ee]});case Sc:return X(function(O){var N=0;return O==="front"?N=Fs:O==="back"&&(N=Ta),E.command(!!N,Y,y.commandStr),N},function(O,N,M){return E.optional(function(){O.assert(N,M+'==="front"||'+M+'==="back"',"invalid cull.face")}),N.def(M,'==="front"?',Fs,":",Ta)});case As:return X(function(O){return E.command(typeof O=="number"&&O>=se.lineWidthDims[0]&&O<=se.lineWidthDims[1],"invalid line width, must be a positive number between "+se.lineWidthDims[0]+" and "+se.lineWidthDims[1],y.commandStr),O},function(O,N,M){return E.optional(function(){O.assert(N,"typeof "+M+'==="number"&&'+M+">="+se.lineWidthDims[0]+"&&"+M+"<="+se.lineWidthDims[1],"invalid line width")}),M});case Hl:return X(function(O){return E.commandParameter(O,kf,Y,y.commandStr),kf[O]},function(O,N,M){return E.optional(function(){O.assert(N,M+'==="cw"||'+M+'==="ccw"',"invalid frontFace, must be one of cw,ccw")}),N.def(M+'==="cw"?'+Ql+":"+kn)});case Ss:return X(function(O){return E.command(Pr(O)&&O.length===4,"color.mask must be length 4 array",y.commandStr),O.map(function(N){return!!N})},function(O,N,M){return E.optional(function(){O.assert(N,O.shared.isArrayLike+"("+M+")&&"+M+".length===4","invalid color.mask")}),at(4,function(re){return"!!"+M+"["+re+"]"})});case Wl:return X(function(O){E.command(typeof O=="object"&&O,Y,y.commandStr);var N="value"in O?O.value:1,M=!!O.invert;return E.command(typeof N=="number"&&N>=0&&N<=1,"sample.coverage.value must be a number between 0 and 1",y.commandStr),[N,M]},function(O,N,M){E.optional(function(){O.assert(N,M+"&&typeof "+M+'==="object"',"invalid sample.coverage")});var re=N.def('"value" in ',M,"?+",M,".value:1"),ee=N.def("!!",M,".invert");return[re,ee]})}}),Q}function Xt(R,y){var H=R.static,j=R.dynamic,Q={};return Object.keys(H).forEach(function(W){var Y=H[W],X;if(typeof Y=="number"||typeof Y=="boolean")X=zr(function(){return Y});else if(typeof Y=="function"){var O=Y._reglType;O==="texture2d"||O==="textureCube"?X=zr(function(N){return N.link(Y)}):O==="framebuffer"||O==="framebufferCube"?(E.command(Y.color.length>0,'missing color attachment for framebuffer sent to uniform "'+W+'"',y.commandStr),X=zr(function(N){return N.link(Y.color[0])})):E.commandRaise('invalid data for uniform "'+W+'"',y.commandStr)}else Pr(Y)?X=zr(function(N){var M=N.global.def("[",at(Y.length,function(re){return E.command(typeof Y[re]=="number"||typeof Y[re]=="boolean","invalid uniform "+W,N.commandStr),Y[re]}),"]");return M}):E.commandRaise('invalid or missing data for uniform "'+W+'"',y.commandStr);X.value=Y,Q[W]=X}),Object.keys(j).forEach(function(W){var Y=j[W];Q[W]=En(Y,function(X,O){return X.invoke(O,Y)})}),Q}function Dr(R,y){var H=R.static,j=R.dynamic,Q={};return Object.keys(H).forEach(function(W){var Y=H[W],X=T.id(W),O=new K;if(lo(Y))O.state=Qa,O.buffer=me.getBuffer(me.create(Y,zo,!1,!0)),O.type=0;else{var N=me.getBuffer(Y);if(N)O.state=Qa,O.buffer=N,O.type=0;else if(E.command(typeof Y=="object"&&Y,"invalid data for attribute "+W,y.commandStr),"constant"in Y){var M=Y.constant;O.buffer="null",O.state=Sf,typeof M=="number"?O.x=M:(E.command(Pr(M)&&M.length>0&&M.length<=4,"invalid constant for attribute "+W,y.commandStr),Tn.forEach(function(yt,ot){ot<M.length&&(O[yt]=M[ot])}))}else{lo(Y.buffer)?N=me.getBuffer(me.create(Y.buffer,zo,!1,!0)):N=me.getBuffer(Y.buffer),E.command(!!N,'missing buffer for attribute "'+W+'"',y.commandStr);var re=Y.offset|0;E.command(re>=0,'invalid offset for attribute "'+W+'"',y.commandStr);var ee=Y.stride|0;E.command(ee>=0&&ee<256,'invalid stride for attribute "'+W+'", must be integer betweeen [0, 255]',y.commandStr);var _e=Y.size|0;E.command(!("size"in Y)||_e>0&&_e<=4,'invalid size for attribute "'+W+'", must be 1,2,3,4',y.commandStr);var be=!!Y.normalized,Ye=0;"type"in Y&&(E.commandParameter(Y.type,Ga,"invalid type for attribute "+W,y.commandStr),Ye=Ga[Y.type]);var Dt=Y.divisor|0;E.optional(function(){"divisor"in Y&&(E.command(Dt===0||Oe,'cannot specify divisor for attribute "'+W+'", instancing not supported',y.commandStr),E.command(Dt>=0,'invalid divisor for attribute "'+W+'"',y.commandStr));var yt=y.commandStr,ot=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(Y).forEach(function(Ae){E.command(ot.indexOf(Ae)>=0,'unknown parameter "'+Ae+'" for attribute pointer "'+W+'" (valid parameters are '+ot+")",yt)})}),O.buffer=N,O.state=Qa,O.size=_e,O.normalized=be,O.type=Ye||N.dtype,O.offset=re,O.stride=ee,O.divisor=Dt}}Q[W]=zr(function(yt,ot){var Ae=yt.attribCache;if(X in Ae)return Ae[X];var he={isStream:!1};return Object.keys(O).forEach(function(ht){he[ht]=O[ht]}),O.buffer&&(he.buffer=yt.link(O.buffer),he.type=he.type||he.buffer+".dtype"),Ae[X]=he,he})}),Object.keys(j).forEach(function(W){var Y=j[W];function X(O,N){var M=O.invoke(N,Y),re=O.shared,ee=O.constants,_e=re.isBufferArgs,be=re.buffer;E.optional(function(){O.assert(N,M+"&&(typeof "+M+'==="object"||typeof '+M+'==="function")&&('+_e+"("+M+")||"+be+".getBuffer("+M+")||"+be+".getBuffer("+M+".buffer)||"+_e+"("+M+'.buffer)||("constant" in '+M+"&&(typeof "+M+'.constant==="number"||'+re.isArrayLike+"("+M+".constant))))",'invalid dynamic attribute "'+W+'"')});var Ye={isStream:N.def(!1)},Dt=new K;Dt.state=Qa,Object.keys(Dt).forEach(function(he){Ye[he]=N.def(""+Dt[he])});var yt=Ye.buffer,ot=Ye.type;N("if(",_e,"(",M,")){",Ye.isStream,"=true;",yt,"=",be,".createStream(",zo,",",M,");",ot,"=",yt,".dtype;","}else{",yt,"=",be,".getBuffer(",M,");","if(",yt,"){",ot,"=",yt,".dtype;",'}else if("constant" in ',M,"){",Ye.state,"=",Sf,";","if(typeof "+M+'.constant === "number"){',Ye[Tn[0]],"=",M,".constant;",Tn.slice(1).map(function(he){return Ye[he]}).join("="),"=0;","}else{",Tn.map(function(he,ht){return Ye[he]+"="+M+".constant.length>"+ht+"?"+M+".constant["+ht+"]:0;"}).join(""),"}}else{","if(",_e,"(",M,".buffer)){",yt,"=",be,".createStream(",zo,",",M,".buffer);","}else{",yt,"=",be,".getBuffer(",M,".buffer);","}",ot,'="type" in ',M,"?",ee.glTypes,"[",M,".type]:",yt,".dtype;",Ye.normalized,"=!!",M,".normalized;");function Ae(he){N(Ye[he],"=",M,".",he,"|0;")}return Ae("size"),Ae("offset"),Ae("stride"),Ae("divisor"),N("}}"),N.exit("if(",Ye.isStream,"){",be,".destroyStream(",yt,");","}"),Ye}Q[W]=En(Y,X)}),Q}function pr(R){var y=R.static,H=R.dynamic,j={};return Object.keys(y).forEach(function(Q){var W=y[Q];j[Q]=zr(function(Y,X){return typeof W=="number"||typeof W=="boolean"?""+W:Y.link(W)})}),Object.keys(H).forEach(function(Q){var W=H[Q];j[Q]=En(W,function(Y,X){return Y.invoke(X,W)})}),j}function Kr(R,y,H,j,Q){var W=R.static,Y=R.dynamic;E.optional(function(){var Ae=[ra,Es,ro,ba,wa,no,Sa,Df,Uo,Yo].concat(pt);function he(ht){Object.keys(ht).forEach(function(ct){E.command(Ae.indexOf(ct)>=0,'unknown parameter "'+ct+'"',Q.commandStr)})}he(W),he(Y)});var X=Ct(R,y),O=Je(R),N=wt(R,O,Q),M=Ir(R,Q),re=Lr(R,Q),ee=Vt(R,Q,X);function _e(Ae){var he=N[Ae];he&&(re[Ae]=he)}_e(ta),_e(lt(Ef));var be=Object.keys(re).length>0,Ye={framebuffer:O,draw:M,shader:ee,state:re,dirty:be,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ye.profile=Ke(R),Ye.uniforms=Xt(H,Q),Ye.drawVAO=Ye.scopeVAO=M.vao,!Ye.drawVAO&&ee.program&&!X&&G.angle_instanced_arrays&&M.static.elements){var Dt=!0,yt=ee.program.attributes.map(function(Ae){var he=y.static[Ae];return Dt=Dt&&!!he,he});if(Dt&&yt.length>0){var ot=Ne.getVAO(Ne.createVAO({attributes:yt,elements:M.static.elements}));Ye.drawVAO=new Hr(null,null,null,function(Ae,he){return Ae.link(ot)}),Ye.useVAO=!0}}return X?Ye.useVAO=!0:Ye.attributes=Dr(y,Q),Ye.context=pr(j),Ye}function jr(R,y,H){var j=R.shared,Q=j.context,W=R.scope();Object.keys(H).forEach(function(Y){y.save(Q,"."+Y);var X=H[Y],O=X.append(R,y);Array.isArray(O)?W(Q,".",Y,"=[",O.join(),"];"):W(Q,".",Y,"=",O,";")}),y(W)}function tn(R,y,H,j){var Q=R.shared,W=Q.gl,Y=Q.framebuffer,X;rt&&(X=y.def(Q.extensions,".webgl_draw_buffers"));var O=R.constants,N=O.drawBuffer,M=O.backBuffer,re;H?re=H.append(R,y):re=y.def(Y,".next"),j||y("if(",re,"!==",Y,".cur){"),y("if(",re,"){",W,".bindFramebuffer(",tu,",",re,".framebuffer);"),rt&&y(X,".drawBuffersWEBGL(",N,"[",re,".colorAttachments.length]);"),y("}else{",W,".bindFramebuffer(",tu,",null);"),rt&&y(X,".drawBuffersWEBGL(",M,");"),y("}",Y,".cur=",re,";"),j||y("}")}function un(R,y,H){var j=R.shared,Q=j.gl,W=R.current,Y=R.next,X=j.current,O=j.next,N=R.cond(X,".dirty");pt.forEach(function(M){var re=lt(M);if(!(re in H.state)){var ee,_e;if(re in Y){ee=Y[re],_e=W[re];var be=at(Qe[re].length,function(Dt){return N.def(ee,"[",Dt,"]")});N(R.cond(be.map(function(Dt,yt){return Dt+"!=="+_e+"["+yt+"]"}).join("||")).then(Q,".",ge[re],"(",be,");",be.map(function(Dt,yt){return _e+"["+yt+"]="+Dt}).join(";"),";"))}else{ee=N.def(O,".",re);var Ye=R.cond(ee,"!==",X,".",re);N(Ye),re in xe?Ye(R.cond(ee).then(Q,".enable(",xe[re],");").else(Q,".disable(",xe[re],");"),X,".",re,"=",ee,";"):Ye(Q,".",ge[re],"(",ee,");",X,".",re,"=",ee,";")}}}),Object.keys(H.state).length===0&&N(X,".dirty=false;"),y(N)}function gn(R,y,H,j){var Q=R.shared,W=R.current,Y=Q.current,X=Q.gl;Pf(Object.keys(H)).forEach(function(O){var N=H[O];if(!(j&&!j(N))){var M=N.append(R,y);if(xe[O]){var re=xe[O];Ea(N)?M?y(X,".enable(",re,");"):y(X,".disable(",re,");"):y(R.cond(M).then(X,".enable(",re,");").else(X,".disable(",re,");")),y(Y,".",O,"=",M,";")}else if(Pr(M)){var ee=W[O];y(X,".",ge[O],"(",M,");",M.map(function(_e,be){return ee+"["+be+"]="+_e}).join(";"),";")}else y(X,".",ge[O],"(",M,");",Y,".",O,"=",M,";")}})}function Wr(R,y){Oe&&(R.instancing=y.def(R.shared.extensions,".angle_instanced_arrays"))}function Ut(R,y,H,j,Q){var W=R.shared,Y=R.stats,X=W.current,O=W.timer,N=H.profile;function M(){return typeof performance>"u"?"Date.now()":"performance.now()"}var re,ee;function _e(Ae){re=y.def(),Ae(re,"=",M(),";"),typeof Q=="string"?Ae(Y,".count+=",Q,";"):Ae(Y,".count++;"),Ce&&(j?(ee=y.def(),Ae(ee,"=",O,".getNumPendingQueries();")):Ae(O,".beginQuery(",Y,");"))}function be(Ae){Ae(Y,".cpuTime+=",M(),"-",re,";"),Ce&&(j?Ae(O,".pushScopeStats(",ee,",",O,".getNumPendingQueries(),",Y,");"):Ae(O,".endQuery();"))}function Ye(Ae){var he=y.def(X,".profile");y(X,".profile=",Ae,";"),y.exit(X,".profile=",he,";")}var Dt;if(N){if(Ea(N)){N.enable?(_e(y),be(y.exit),Ye("true")):Ye("false");return}Dt=N.append(R,y),Ye(Dt)}else Dt=y.def(X,".profile");var yt=R.block();_e(yt),y("if(",Dt,"){",yt,"}");var ot=R.block();be(ot),y.exit("if(",Dt,"){",ot,"}")}function yn(R,y,H,j,Q){var W=R.shared;function Y(O){switch(O){case ao:case Vo:case Ai:return 2;case Ls:case $o:case Rs:return 3;case Wo:case Si:case Cs:return 4;default:return 1}}function X(O,N,M){var re=W.gl,ee=y.def(O,".location"),_e=y.def(W.attributes,"[",ee,"]"),be=M.state,Ye=M.buffer,Dt=[M.x,M.y,M.z,M.w],yt=["buffer","normalized","offset","stride"];function ot(){y("if(!",_e,".buffer){",re,".enableVertexAttribArray(",ee,");}");var he=M.type,ht;if(M.size?ht=y.def(M.size,"||",N):ht=N,y("if(",_e,".type!==",he,"||",_e,".size!==",ht,"||",yt.map(function(Tt){return _e+"."+Tt+"!=="+M[Tt]}).join("||"),"){",re,".bindBuffer(",zo,",",Ye,".buffer);",re,".vertexAttribPointer(",[ee,ht,he,M.normalized,M.stride,M.offset],");",_e,".type=",he,";",_e,".size=",ht,";",yt.map(function(Tt){return _e+"."+Tt+"="+M[Tt]+";"}).join(""),"}"),Oe){var ct=M.divisor;y("if(",_e,".divisor!==",ct,"){",R.instancing,".vertexAttribDivisorANGLE(",[ee,ct],");",_e,".divisor=",ct,";}")}}function Ae(){y("if(",_e,".buffer){",re,".disableVertexAttribArray(",ee,");",_e,".buffer=null;","}if(",Tn.map(function(he,ht){return _e+"."+he+"!=="+Dt[ht]}).join("||"),"){",re,".vertexAttrib4f(",ee,",",Dt,");",Tn.map(function(he,ht){return _e+"."+he+"="+Dt[ht]+";"}).join(""),"}")}be===Qa?ot():be===Sf?Ae():(y("if(",be,"===",Qa,"){"),ot(),y("}else{"),Ae(),y("}"))}j.forEach(function(O){var N=O.name,M=H.attributes[N],re;if(M){if(!Q(M))return;re=M.append(R,y)}else{if(!Q(ru))return;var ee=R.scopeAttrib(N);E.optional(function(){R.assert(y,ee+".state","missing attribute "+N)}),re={},Object.keys(new K).forEach(function(_e){re[_e]=y.def(ee,".",_e)})}X(R.link(O),Y(O.info.type),re)})}function hr(R,y,H,j,Q,W){for(var Y=R.shared,X=Y.gl,O={},N,M=0;M<j.length;++M){var re=j[M],ee=re.name,_e=re.info.type,be=re.info.size,Ye=H.uniforms[ee];if(be>1){if(!Ye)continue;var Dt=ee.replace("[0]","");if(O[Dt])continue;O[Dt]=1}var yt=R.link(re),ot=yt+".location",Ae;if(Ye){if(!Q(Ye))continue;if(Ea(Ye)){var he=Ye.value;if(E.command(he!==null&&typeof he<"u",'missing uniform "'+ee+'"',R.commandStr),_e===Ms||_e===Zo){E.command(typeof he=="function"&&(_e===Ms&&(he._reglType==="texture2d"||he._reglType==="framebuffer")||_e===Zo&&(he._reglType==="textureCube"||he._reglType==="framebufferCube")),"invalid texture for uniform "+ee,R.commandStr);var ht=R.link(he._texture||he.color[0]._texture);y(X,".uniform1i(",ot,",",ht+".bind());"),y.exit(ht,".unbind();")}else if(_e===oo||_e===Os||_e===Is){E.optional(function(){E.command(Pr(he),"invalid matrix for uniform "+ee,R.commandStr),E.command(_e===oo&&he.length===4||_e===Os&&he.length===9||_e===Is&&he.length===16,"invalid length for matrix uniform "+ee,R.commandStr)});var ct=R.global.def("new Float32Array(["+Array.prototype.slice.call(he)+"])"),Tt=2;_e===Os?Tt=3:_e===Is&&(Tt=4),y(X,".uniformMatrix",Tt,"fv(",ot,",false,",ct,");")}else{switch(_e){case If:be===1?E.commandType(he,"number","uniform "+ee,R.commandStr):E.command(Pr(he)&&he.length===be,"uniform "+ee,R.commandStr),N="1f";break;case ao:E.command(Pr(he)&&he.length&&he.length%2===0&&he.length<=be*2,"uniform "+ee,R.commandStr),N="2f";break;case Ls:E.command(Pr(he)&&he.length&&he.length%3===0&&he.length<=be*3,"uniform "+ee,R.commandStr),N="3f";break;case Wo:E.command(Pr(he)&&he.length&&he.length%4===0&&he.length<=be*4,"uniform "+ee,R.commandStr),N="4f";break;case jl:be===1?E.commandType(he,"boolean","uniform "+ee,R.commandStr):E.command(Pr(he)&&he.length===be,"uniform "+ee,R.commandStr),N="1i";break;case Mf:be===1?E.commandType(he,"number","uniform "+ee,R.commandStr):E.command(Pr(he)&&he.length===be,"uniform "+ee,R.commandStr),N="1i";break;case Ai:E.command(Pr(he)&&he.length&&he.length%2===0&&he.length<=be*2,"uniform "+ee,R.commandStr),N="2i";break;case Vo:E.command(Pr(he)&&he.length&&he.length%2===0&&he.length<=be*2,"uniform "+ee,R.commandStr),N="2i";break;case Rs:E.command(Pr(he)&&he.length&&he.length%3===0&&he.length<=be*3,"uniform "+ee,R.commandStr),N="3i";break;case $o:E.command(Pr(he)&&he.length&&he.length%3===0&&he.length<=be*3,"uniform "+ee,R.commandStr),N="3i";break;case Cs:E.command(Pr(he)&&he.length&&he.length%4===0&&he.length<=be*4,"uniform "+ee,R.commandStr),N="4i";break;case Si:E.command(Pr(he)&&he.length&&he.length%4===0&&he.length<=be*4,"uniform "+ee,R.commandStr),N="4i";break}be>1?(N+="v",he=R.global.def("["+Array.prototype.slice.call(he)+"]")):he=Pr(he)?Array.prototype.slice.call(he):he,y(X,".uniform",N,"(",ot,",",he,");")}continue}else Ae=Ye.append(R,y)}else{if(!Q(ru))continue;Ae=y.def(Y.uniforms,"[",T.id(ee),"]")}_e===Ms?(E(!Array.isArray(Ae),"must specify a scalar prop for textures"),y("if(",Ae,"&&",Ae,'._reglType==="framebuffer"){',Ae,"=",Ae,".color[0];","}")):_e===Zo&&(E(!Array.isArray(Ae),"must specify a scalar prop for cube maps"),y("if(",Ae,"&&",Ae,'._reglType==="framebufferCube"){',Ae,"=",Ae,".color[0];","}")),E.optional(function(){function Jn(Pn,Ps){R.assert(y,Pn,'bad data or missing for uniform "'+ee+'". '+Ps)}function vo(Pn,Ps){Ps===1&&E(!Array.isArray(Ae),"must not specify an array type for uniform"),Jn("Array.isArray("+Ae+") && typeof "+Ae+'[0]===" '+Pn+'" || typeof '+Ae+'==="'+Pn+'"',"invalid type, expected "+Pn)}function li(Pn,Ps,Uf){Array.isArray(Ae)?E(Ae.length&&Ae.length%Pn===0&&Ae.length<=Pn*Uf,"must have length of "+(Uf===1?"":"n * ")+Pn):Jn(Y.isArrayLike+"("+Ae+")&&"+Ae+".length && "+Ae+".length % "+Pn+" === 0 && "+Ae+".length<="+Pn*Uf,"invalid vector, should have length of "+(Uf===1?"":"n * ")+Pn,R.commandStr)}function Gc(Pn){E(!Array.isArray(Ae),"must not specify a value type"),Jn("typeof "+Ae+'==="function"&&'+Ae+'._reglType==="texture'+(Pn===Oc?"2d":"Cube")+'"',"invalid texture type",R.commandStr)}switch(_e){case Mf:vo("number",be);break;case Vo:li(2,"number",be);break;case $o:li(3,"number",be);break;case Si:li(4,"number",be);break;case If:vo("number",be);break;case ao:li(2,"number",be);break;case Ls:li(3,"number",be);break;case Wo:li(4,"number",be);break;case jl:vo("boolean",be);break;case Ai:li(2,"boolean",be);break;case Rs:li(3,"boolean",be);break;case Cs:li(4,"boolean",be);break;case oo:li(4,"number",be);break;case Os:li(9,"number",be);break;case Is:li(16,"number",be);break;case Ms:Gc(Oc);break;case Zo:Gc(t0);break}});var vr=1;switch(_e){case Ms:case Zo:var xn=y.def(Ae,"._texture");y(X,".uniform1i(",ot,",",xn,".bind());"),y.exit(xn,".unbind();");continue;case Mf:case jl:N="1i";break;case Vo:case Ai:N="2i",vr=2;break;case $o:case Rs:N="3i",vr=3;break;case Si:case Cs:N="4i",vr=4;break;case If:N="1f";break;case ao:N="2f",vr=2;break;case Ls:N="3f",vr=3;break;case Wo:N="4f",vr=4;break;case oo:N="Matrix2fv";break;case Os:N="Matrix3fv";break;case Is:N="Matrix4fv";break}if(N.indexOf("Matrix")===-1&&be>1&&(N+="v",vr=1),N.charAt(0)==="M"){y(X,".uniform",N,"(",ot,",");var co=Math.pow(_e-oo+2,2),aa=R.global.def("new Float32Array(",co,")");Array.isArray(Ae)?y("false,(",at(co,function(Jn){return aa+"["+Jn+"]="+Ae[Jn]}),",",aa,")"):y("false,(Array.isArray(",Ae,")||",Ae," instanceof Float32Array)?",Ae,":(",at(co,function(Jn){return aa+"["+Jn+"]="+Ae+"["+Jn+"]"}),",",aa,")"),y(");")}else if(vr>1){for(var Bi=[],La=[],ho=0;ho<vr;++ho)Array.isArray(Ae)?La.push(Ae[ho]):La.push(y.def(Ae+"["+ho+"]")),W&&Bi.push(y.def());W&&y("if(!",R.batchId,"||",Bi.map(function(Jn,vo){return Jn+"!=="+La[vo]}).join("||"),"){",Bi.map(function(Jn,vo){return Jn+"="+La[vo]+";"}).join("")),y(X,".uniform",N,"(",ot,",",La.join(","),");"),W&&y("}")}else{if(E(!Array.isArray(Ae),"uniform value must not be an array"),W){var Bc=y.def();y("if(!",R.batchId,"||",Bc,"!==",Ae,"){",Bc,"=",Ae,";")}y(X,".uniform",N,"(",ot,",",Ae,");"),W&&y("}")}}}function At(R,y,H,j){var Q=R.shared,W=Q.gl,Y=Q.draw,X=j.draw;function O(){var ht=X.elements,ct,Tt=y;return ht?((ht.contextDep&&j.contextDynamic||ht.propDep)&&(Tt=H),ct=ht.append(R,Tt),X.elementsActive&&Tt("if("+ct+")"+W+".bindBuffer("+Xl+","+ct+".buffer.buffer);")):(ct=Tt.def(),Tt(ct,"=",Y,".",ba,";","if(",ct,"){",W,".bindBuffer(",Xl,",",ct,".buffer.buffer);}","else if(",Q.vao,".currentVAO){",ct,"=",R.shared.elements+".getElements("+Q.vao,".currentVAO.elements);",Se?"":"if("+ct+")"+W+".bindBuffer("+Xl+","+ct+".buffer.buffer);","}")),ct}function N(){var ht=X.count,ct,Tt=y;return ht?((ht.contextDep&&j.contextDynamic||ht.propDep)&&(Tt=H),ct=ht.append(R,Tt),E.optional(function(){ht.MISSING&&R.assert(y,"false","missing vertex count"),ht.DYNAMIC&&R.assert(Tt,ct+">=0","missing vertex count")})):(ct=Tt.def(Y,".",Sa),E.optional(function(){R.assert(Tt,ct+">=0","missing vertex count")})),ct}var M=O();function re(ht){var ct=X[ht];return ct?ct.contextDep&&j.contextDynamic||ct.propDep?ct.append(R,H):ct.append(R,y):y.def(Y,".",ht)}var ee=re(wa),_e=re(no),be=N();if(typeof be=="number"){if(be===0)return}else H("if(",be,"){"),H.exit("}");var Ye,Dt;Oe&&(Ye=re(Df),Dt=R.instancing);var yt=M+".type",ot=X.elements&&Ea(X.elements)&&!X.vaoActive;function Ae(){function ht(){H(Dt,".drawElementsInstancedANGLE(",[ee,be,yt,_e+"<<(("+yt+"-"+xc+")>>1)",Ye],");")}function ct(){H(Dt,".drawArraysInstancedANGLE(",[ee,_e,be,Ye],");")}M&&M!=="null"?ot?ht():(H("if(",M,"){"),ht(),H("}else{"),ct(),H("}")):ct()}function he(){function ht(){H(W+".drawElements("+[ee,be,yt,_e+"<<(("+yt+"-"+xc+")>>1)"]+");")}function ct(){H(W+".drawArrays("+[ee,_e,be]+");")}M&&M!=="null"?ot?ht():(H("if(",M,"){"),ht(),H("}else{"),ct(),H("}")):ct()}Oe&&(typeof Ye!="number"||Ye>=0)?typeof Ye=="string"?(H("if(",Ye,">0){"),Ae(),H("}else if(",Ye,"<0){"),he(),H("}")):Ae():he()}function qt(R,y,H,j,Q){var W=Lt(),Y=W.proc("body",Q);return E.optional(function(){W.commandStr=y.commandStr,W.command=W.link(y.commandStr)}),Oe&&(W.instancing=Y.def(W.shared.extensions,".angle_instanced_arrays")),R(W,Y,H,j),W.compile().body}function er(R,y,H,j){Wr(R,y),H.useVAO?H.drawVAO?y(R.shared.vao,".setVAO(",H.drawVAO.append(R,y),");"):y(R.shared.vao,".setVAO(",R.shared.vao,".targetVAO);"):(y(R.shared.vao,".setVAO(null);"),yn(R,y,H,j.attributes,function(){return!0})),hr(R,y,H,j.uniforms,function(){return!0},!1),At(R,y,y,H)}function Vr(R,y){var H=R.proc("draw",1);Wr(R,H),jr(R,H,y.context),tn(R,H,y.framebuffer),un(R,H,y),gn(R,H,y.state),Ut(R,H,y,!1,!0);var j=y.shader.progVar.append(R,H);if(H(R.shared.gl,".useProgram(",j,".program);"),y.shader.program)er(R,H,y,y.shader.program);else{H(R.shared.vao,".setVAO(null);");var Q=R.global.def("{}"),W=H.def(j,".id"),Y=H.def(Q,"[",W,"]");H(R.cond(Y).then(Y,".call(this,a0);").else(Y,"=",Q,"[",W,"]=",R.link(function(X){return qt(er,R,y,X,1)}),"(",j,");",Y,".call(this,a0);"))}Object.keys(y.state).length>0&&H(R.shared.current,".dirty=true;"),R.shared.vao&&H(R.shared.vao,".setVAO(null);")}function Ei(R,y,H,j){R.batchId="a1",Wr(R,y);function Q(){return!0}yn(R,y,H,j.attributes,Q),hr(R,y,H,j.uniforms,Q,!1),At(R,y,y,H)}function Da(R,y,H,j){Wr(R,y);var Q=H.contextDep,W=y.def(),Y="a0",X="a1",O=y.def();R.shared.props=O,R.batchId=W;var N=R.scope(),M=R.scope();y(N.entry,"for(",W,"=0;",W,"<",X,";++",W,"){",O,"=",Y,"[",W,"];",M,"}",N.exit);function re(yt){return yt.contextDep&&Q||yt.propDep}function ee(yt){return!re(yt)}if(H.needsContext&&jr(R,M,H.context),H.needsFramebuffer&&tn(R,M,H.framebuffer),gn(R,M,H.state,re),H.profile&&re(H.profile)&&Ut(R,M,H,!1,!0),j)H.useVAO?H.drawVAO?re(H.drawVAO)?M(R.shared.vao,".setVAO(",H.drawVAO.append(R,M),");"):N(R.shared.vao,".setVAO(",H.drawVAO.append(R,N),");"):N(R.shared.vao,".setVAO(",R.shared.vao,".targetVAO);"):(N(R.shared.vao,".setVAO(null);"),yn(R,N,H,j.attributes,ee),yn(R,M,H,j.attributes,re)),hr(R,N,H,j.uniforms,ee,!1),hr(R,M,H,j.uniforms,re,!0),At(R,N,M,H);else{var _e=R.global.def("{}"),be=H.shader.progVar.append(R,M),Ye=M.def(be,".id"),Dt=M.def(_e,"[",Ye,"]");M(R.shared.gl,".useProgram(",be,".program);","if(!",Dt,"){",Dt,"=",_e,"[",Ye,"]=",R.link(function(yt){return qt(Ei,R,H,yt,2)}),"(",be,");}",Dt,".call(this,a0[",W,"],",W,");")}}function k(R,y){var H=R.proc("batch",2);R.batchId="0",Wr(R,H);var j=!1,Q=!0;Object.keys(y.context).forEach(function(_e){j=j||y.context[_e].propDep}),j||(jr(R,H,y.context),Q=!1);var W=y.framebuffer,Y=!1;W?(W.propDep?j=Y=!0:W.contextDep&&j&&(Y=!0),Y||tn(R,H,W)):tn(R,H,null),y.state.viewport&&y.state.viewport.propDep&&(j=!0);function X(_e){return _e.contextDep&&j||_e.propDep}un(R,H,y),gn(R,H,y.state,function(_e){return!X(_e)}),(!y.profile||!X(y.profile))&&Ut(R,H,y,!1,"a1"),y.contextDep=j,y.needsContext=Q,y.needsFramebuffer=Y;var O=y.shader.progVar;if(O.contextDep&&j||O.propDep)Da(R,H,y,null);else{var N=O.append(R,H);if(H(R.shared.gl,".useProgram(",N,".program);"),y.shader.program)Da(R,H,y,y.shader.program);else{H(R.shared.vao,".setVAO(null);");var M=R.global.def("{}"),re=H.def(N,".id"),ee=H.def(M,"[",re,"]");H(R.cond(ee).then(ee,".call(this,a0,a1);").else(ee,"=",M,"[",re,"]=",R.link(function(_e){return qt(Da,R,y,_e,2)}),"(",N,");",ee,".call(this,a0,a1);"))}}Object.keys(y.state).length>0&&H(R.shared.current,".dirty=true;"),R.shared.vao&&H(R.shared.vao,".setVAO(null);")}function le(R,y){var H=R.proc("scope",3);R.batchId="a2";var j=R.shared,Q=j.current;jr(R,H,y.context),y.framebuffer&&y.framebuffer.append(R,H),Pf(Object.keys(y.state)).forEach(function(Y){var X=y.state[Y],O=X.append(R,H);Pr(O)?O.forEach(function(N,M){H.set(R.next[Y],"["+M+"]",N)}):H.set(j.next,"."+Y,O)}),Ut(R,H,y,!0,!0),[ba,no,Sa,Df,wa].forEach(function(Y){var X=y.draw[Y];!X||H.set(j.draw,"."+Y,""+X.append(R,H))}),Object.keys(y.uniforms).forEach(function(Y){var X=y.uniforms[Y].append(R,H);Array.isArray(X)&&(X="["+X.join()+"]"),H.set(j.uniforms,"["+T.id(Y)+"]",X)}),Object.keys(y.attributes).forEach(function(Y){var X=y.attributes[Y].append(R,H),O=R.scopeAttrib(Y);Object.keys(new K).forEach(function(N){H.set(O,"."+N,X[N])})}),y.scopeVAO&&H.set(j.vao,".targetVAO",y.scopeVAO.append(R,H));function W(Y){var X=y.shader[Y];X&&H.set(j.shader,"."+Y,X.append(R,H))}W(Es),W(ro),Object.keys(y.state).length>0&&(H(Q,".dirty=true;"),H.exit(Q,".dirty=true;")),H("a1(",R.shared.context,",a0,",R.batchId,");")}function ne(R){if(!(typeof R!="object"||Pr(R))){for(var y=Object.keys(R),H=0;H<y.length;++H)if(Z.isDynamic(R[y[H]]))return!0;return!1}}function ft(R,y,H){var j=y.static[H];if(!j||!ne(j))return;var Q=R.global,W=Object.keys(j),Y=!1,X=!1,O=!1,N=R.global.def("{}");W.forEach(function(re){var ee=j[re];if(Z.isDynamic(ee)){typeof ee=="function"&&(ee=j[re]=Z.unbox(ee));var _e=En(ee,null);Y=Y||_e.thisDep,O=O||_e.propDep,X=X||_e.contextDep}else{switch(Q(N,".",re,"="),typeof ee){case"number":Q(ee);break;case"string":Q('"',ee,'"');break;case"object":Array.isArray(ee)&&Q("[",ee.join(),"]");break;default:Q(R.link(ee));break}Q(";")}});function M(re,ee){W.forEach(function(_e){var be=j[_e];if(!!Z.isDynamic(be)){var Ye=re.invoke(ee,be);ee(N,".",_e,"=",Ye,";")}})}y.dynamic[H]=new Z.DynamicVariable(eo,{thisDep:Y,contextDep:X,propDep:O,ref:N,append:M}),delete y.static[H]}function zt(R,y,H,j,Q){var W=Lt();W.stats=W.link(Q),Object.keys(y.static).forEach(function(X){ft(W,y,X)}),rr.forEach(function(X){ft(W,R,X)});var Y=Kr(R,y,H,j,W);return Vr(W,Y),le(W,Y),k(W,Y),a(W.compile(),{destroy:function(){Y.shader.program.destroy()}})}return{next:je,current:Qe,procs:function(){var R=Lt(),y=R.proc("poll"),H=R.proc("refresh"),j=R.block();y(j),H(j);var Q=R.shared,W=Q.gl,Y=Q.next,X=Q.current;j(X,".dirty=false;"),tn(R,y),tn(R,H,null,!0);var O;Oe&&(O=R.link(Oe)),G.oes_vertex_array_object&&H(R.link(G.oes_vertex_array_object),".bindVertexArrayOES(null);");for(var N=0;N<se.maxAttributes;++N){var M=H.def(Q.attributes,"[",N,"]"),re=R.cond(M,".buffer");re.then(W,".enableVertexAttribArray(",N,");",W,".bindBuffer(",zo,",",M,".buffer.buffer);",W,".vertexAttribPointer(",N,",",M,".size,",M,".type,",M,".normalized,",M,".stride,",M,".offset);").else(W,".disableVertexAttribArray(",N,");",W,".vertexAttrib4f(",N,",",M,".x,",M,".y,",M,".z,",M,".w);",M,".buffer=null;"),H(re),Oe&&H(O,".vertexAttribDivisorANGLE(",N,",",M,".divisor);")}return H(R.shared.vao,".currentVAO=null;",R.shared.vao,".setVAO(",R.shared.vao,".targetVAO);"),Object.keys(xe).forEach(function(ee){var _e=xe[ee],be=j.def(Y,".",ee),Ye=R.block();Ye("if(",be,"){",W,".enable(",_e,")}else{",W,".disable(",_e,")}",X,".",ee,"=",be,";"),H(Ye),y("if(",be,"!==",X,".",ee,"){",Ye,"}")}),Object.keys(ge).forEach(function(ee){var _e=ge[ee],be=Qe[ee],Ye,Dt,yt=R.block();if(yt(W,".",_e,"("),Pr(be)){var ot=be.length;Ye=R.global.def(Y,".",ee),Dt=R.global.def(X,".",ee),yt(at(ot,function(Ae){return Ye+"["+Ae+"]"}),");",at(ot,function(Ae){return Dt+"["+Ae+"]="+Ye+"["+Ae+"];"}).join("")),y("if(",at(ot,function(Ae){return Ye+"["+Ae+"]!=="+Dt+"["+Ae+"]"}).join("||"),"){",yt,"}")}else Ye=j.def(Y,".",ee),Dt=j.def(X,".",ee),yt(Ye,");",X,".",ee,"=",Ye,";"),y("if(",Ye,"!==",Dt,"){",yt,"}");H(yt)}),R.compile()}(),compile:zt}}function o0(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var kc=34918,ia=34919,iu=35007,Pc=function(h,T){if(!T.ext_disjoint_timer_query)return null;var G=[];function se(){return G.pop()||T.ext_disjoint_timer_query.createQueryEXT()}function me(Oe){G.push(Oe)}var ae=[];function fe(Oe){var rt=se();T.ext_disjoint_timer_query.beginQueryEXT(iu,rt),ae.push(rt),Ce(ae.length-1,ae.length,Oe)}function Le(){T.ext_disjoint_timer_query.endQueryEXT(iu)}function De(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var Ne=[];function Ge(){return Ne.pop()||new De}function Be(Oe){Ne.push(Oe)}var We=[];function Ce(Oe,rt,Se){var Qe=Ge();Qe.startQueryIndex=Oe,Qe.endQueryIndex=rt,Qe.sum=0,Qe.stats=Se,We.push(Qe)}var ke=[],K=[];function oe(){var Oe,rt,Se=ae.length;if(Se!==0){K.length=Math.max(K.length,Se+1),ke.length=Math.max(ke.length,Se+1),ke[0]=0,K[0]=0;var Qe=0;for(Oe=0,rt=0;rt<ae.length;++rt){var je=ae[rt];T.ext_disjoint_timer_query.getQueryObjectEXT(je,ia)?(Qe+=T.ext_disjoint_timer_query.getQueryObjectEXT(je,kc),me(je)):ae[Oe++]=je,ke[rt+1]=Qe,K[rt+1]=Oe}for(ae.length=Oe,Oe=0,rt=0;rt<We.length;++rt){var pt=We[rt],xe=pt.startQueryIndex,ge=pt.endQueryIndex;pt.sum+=ke[ge]-ke[xe];var lt=K[xe],Ve=K[ge];Ve===lt?(pt.stats.gpuTime+=pt.sum/1e6,Be(pt)):(pt.startQueryIndex=lt,pt.endQueryIndex=Ve,We[Oe++]=pt)}We.length=Oe}}return{beginQuery:fe,endQuery:Le,pushScopeStats:Ce,update:oe,getNumPendingQueries:function(){return ae.length},clear:function(){G.push.apply(G,ae);for(var Oe=0;Oe<G.length;Oe++)T.ext_disjoint_timer_query.deleteQueryEXT(G[Oe]);ae.length=0,G.length=0},restore:function(){ae.length=0,G.length=0}}},s0=16384,Nc=256,f0=1024,l0=34962,Ni="webglcontextlost",Nf="webglcontextrestored",Bf=1,au=2,Gf=3;function uo(h,T){for(var G=0;G<h.length;++G)if(h[G]===T)return G;return-1}function Bt(h){var T=ce(h);if(!T)return null;var G=T.gl,se=G.getContextAttributes(),me=G.isContextLost(),ae=Et(G,T);if(!ae)return null;var fe=He(),Le=o0(),De=ae.extensions,Ne=Pc(G,De),Ge=m(),Be=G.drawingBufferWidth,We=G.drawingBufferHeight,Ce={tick:0,time:0,viewportWidth:Be,viewportHeight:We,framebufferWidth:Be,framebufferHeight:We,drawingBufferWidth:Be,drawingBufferHeight:We,pixelRatio:T.pixelRatio},ke={},K={elements:null,primitive:4,count:-1,offset:0,instances:-1},oe=ol(G,De),Oe=Sn(G,Le,T,Qe),rt=Br(G,De,Oe,Le),Se=Kd(G,De,oe,Le,Oe,rt,K);function Qe(At){return Se.destroyBuffer(At)}var je=Nl(G,fe,Le,T),pt=In(G,De,oe,function(){lt.procs.poll()},Ce,Le,T),xe=Fd(G,De,oe,Le,T),ge=qd(G,De,oe,pt,xe,Le),lt=nu(G,fe,De,oe,Oe,rt,pt,ge,ke,Se,je,K,Ce,Ne,T),Ve=e0(G,ge,lt.procs.poll,Ce,se,De,oe),Me=lt.next,$e=G.canvas,qe=[],It=[],Lt=[],Ke=[T.onDestroy],Je=null;function wt(){if(qe.length===0){Ne&&Ne.update(),Je=null;return}Je=we.next(wt),gn();for(var At=qe.length-1;At>=0;--At){var qt=qe[At];qt&&qt(Ce,null,0)}G.flush(),Ne&&Ne.update()}function Ct(){!Je&&qe.length>0&&(Je=we.next(wt))}function Vt(){Je&&(we.cancel(wt),Je=null)}function Ir(At){At.preventDefault(),me=!0,Vt(),It.forEach(function(qt){qt()})}function Lr(At){G.getError(),me=!1,ae.restore(),je.restore(),Oe.restore(),pt.restore(),xe.restore(),ge.restore(),Se.restore(),Ne&&Ne.restore(),lt.procs.refresh(),Ct(),Lt.forEach(function(qt){qt()})}$e&&($e.addEventListener(Ni,Ir,!1),$e.addEventListener(Nf,Lr,!1));function Xt(){qe.length=0,Vt(),$e&&($e.removeEventListener(Ni,Ir),$e.removeEventListener(Nf,Lr)),je.clear(),ge.clear(),xe.clear(),Se.clear(),pt.clear(),rt.clear(),Oe.clear(),Ne&&Ne.clear(),Ke.forEach(function(At){At()})}function Dr(At){E(!!At,"invalid args to regl({...})"),E.type(At,"object","invalid args to regl({...})");function qt(Q){var W=a({},Q);delete W.uniforms,delete W.attributes,delete W.context,delete W.vao,"stencil"in W&&W.stencil.op&&(W.stencil.opBack=W.stencil.opFront=W.stencil.op,delete W.stencil.op);function Y(X){if(X in W){var O=W[X];delete W[X],Object.keys(O).forEach(function(N){W[X+"."+N]=O[N]})}}return Y("blend"),Y("depth"),Y("cull"),Y("stencil"),Y("polygonOffset"),Y("scissor"),Y("sample"),"vao"in Q&&(W.vao=Q.vao),W}function er(Q,W){var Y={},X={};return Object.keys(Q).forEach(function(O){var N=Q[O];if(Z.isDynamic(N)){X[O]=Z.unbox(N,O);return}else if(W&&Array.isArray(N)){for(var M=0;M<N.length;++M)if(Z.isDynamic(N[M])){X[O]=Z.unbox(N,O);return}}Y[O]=N}),{dynamic:X,static:Y}}var Vr=er(At.context||{},!0),Ei=er(At.uniforms||{},!0),Da=er(At.attributes||{},!1),k=er(qt(At),!1),le={gpuTime:0,cpuTime:0,count:0},ne=lt.compile(k,Da,Ei,Vr,le),ft=ne.draw,zt=ne.batch,R=ne.scope,y=[];function H(Q){for(;y.length<Q;)y.push(null);return y}function j(Q,W){var Y;if(me&&E.raise("context lost"),typeof Q=="function")return R.call(this,null,Q,0);if(typeof W=="function")if(typeof Q=="number")for(Y=0;Y<Q;++Y)R.call(this,null,W,Y);else if(Array.isArray(Q))for(Y=0;Y<Q.length;++Y)R.call(this,Q[Y],W,Y);else return R.call(this,Q,W,0);else if(typeof Q=="number"){if(Q>0)return zt.call(this,H(Q|0),Q|0)}else if(Array.isArray(Q)){if(Q.length)return zt.call(this,Q,Q.length)}else return ft.call(this,Q)}return a(j,{stats:le,destroy:function(){ne.destroy()}})}var pr=ge.setFBO=Dr({framebuffer:Z.define.call(null,Bf,"framebuffer")});function Kr(At,qt){var er=0;lt.procs.poll();var Vr=qt.color;Vr&&(G.clearColor(+Vr[0]||0,+Vr[1]||0,+Vr[2]||0,+Vr[3]||0),er|=s0),"depth"in qt&&(G.clearDepth(+qt.depth),er|=Nc),"stencil"in qt&&(G.clearStencil(qt.stencil|0),er|=f0),E(!!er,"called regl.clear with no buffer specified"),G.clear(er)}function jr(At){if(E(typeof At=="object"&&At,"regl.clear() takes an object as input"),"framebuffer"in At)if(At.framebuffer&&At.framebuffer_reglType==="framebufferCube")for(var qt=0;qt<6;++qt)pr(a({framebuffer:At.framebuffer.faces[qt]},At),Kr);else pr(At,Kr);else Kr(null,At)}function tn(At){E.type(At,"function","regl.frame() callback must be a function"),qe.push(At);function qt(){var er=uo(qe,At);E(er>=0,"cannot cancel a frame twice");function Vr(){var Ei=uo(qe,Vr);qe[Ei]=qe[qe.length-1],qe.length-=1,qe.length<=0&&Vt()}qe[er]=Vr}return Ct(),{cancel:qt}}function un(){var At=Me.viewport,qt=Me.scissor_box;At[0]=At[1]=qt[0]=qt[1]=0,Ce.viewportWidth=Ce.framebufferWidth=Ce.drawingBufferWidth=At[2]=qt[2]=G.drawingBufferWidth,Ce.viewportHeight=Ce.framebufferHeight=Ce.drawingBufferHeight=At[3]=qt[3]=G.drawingBufferHeight}function gn(){Ce.tick+=1,Ce.time=Ut(),un(),lt.procs.poll()}function Wr(){pt.refresh(),un(),lt.procs.refresh(),Ne&&Ne.update()}function Ut(){return(m()-Ge)/1e3}Wr();function yn(At,qt){E.type(qt,"function","listener callback must be a function");var er;switch(At){case"frame":return tn(qt);case"lost":er=It;break;case"restore":er=Lt;break;case"destroy":er=Ke;break;default:E.raise("invalid event, must be one of frame,lost,restore,destroy")}return er.push(qt),{cancel:function(){for(var Vr=0;Vr<er.length;++Vr)if(er[Vr]===qt){er[Vr]=er[er.length-1],er.pop();return}}}}var hr=a(Dr,{clear:jr,prop:Z.define.bind(null,Bf),context:Z.define.bind(null,au),this:Z.define.bind(null,Gf),draw:Dr({}),buffer:function(At){return Oe.create(At,l0,!1,!1)},elements:function(At){return rt.create(At,!1)},texture:pt.create2D,cube:pt.createCube,renderbuffer:xe.create,framebuffer:ge.create,framebufferCube:ge.createCube,vao:Se.createVAO,attributes:se,frame:tn,on:yn,limits:oe,hasExtension:function(At){return oe.extensions.indexOf(At.toLowerCase())>=0},read:Ve,destroy:Xt,_gl:G,_refresh:Wr,poll:function(){gn(),Ne&&Ne.update()},now:Ut,stats:Le});return T.onDone(null,hr),hr}return Bt})})(l_);const ub=l_.exports,cb=[0,0,0,0],hb=1024,db=1496e8,vb=40075016686e-3,_b=695508e3,pb=.017453292519943295,mb=.0333334,gb=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/,yb=/(?:#)[0-9a-f]{8}|(?:#)[0-9a-f]{6}|(?:#)[0-9a-f]{4}|(?:#)[0-9a-f]{3}/ig;function u_(){const t=new Uint8Array([170,187]);return new Uint16Array(t.buffer)[0]===48042}function c_(...t){if(t.length===1){const[n]=t;return new Array(n).fill(void 0).map((i,a)=>a)}else{const[n,i,a=1]=t;if(a===0)throw new Error("Argument step must be nonzero.");const f=[];for(let s=n;a>0?s<i:s>i;s+=a)f.push(s);return f}}async function h_(t,n,i){return new Promise((a,f)=>{const s=new XMLHttpRequest;s.open("GET",t,!0),s.responseType="arraybuffer",s.addEventListener("load",()=>{a(s.response)}),s.addEventListener("error",f),s.send(null)}).then(a=>{const f=kh.exports.decode(a),s=kh.exports.toRGBA8(f)[0];return new Uint8Array(s)}).catch(()=>Zh(n,i))}function xb(t,n){return t.byteLength!==n.byteLength?!1:t.every((i,a)=>i===n[a])}function bb(t,n){const i=2/t,a=-2/n;return[i,0,0,0,0,a,0,0,0,0,1,0,-1,1,0,1]}function wb(t){const[{x:n,y:i},{x:a,y:f}]=t;return[[n,i],[a,i],[n,f],[a,f]]}const Zh=Xs.exports.memoize((t,n=256)=>{const i=new Float32Array(n*n);return i.fill(t),new Uint8Array(i.buffer)});function Sb(t,n){return`${Object.keys(n).map(a=>`#define ${a} ${n[a]}
44
46
  `).join("")}
45
- ${t}`}const zy=t=>{const n=t.length===9,i=n?24:16,o=parseInt(t.slice(1),16),f=o>>i&255,s=o>>i-8&255,l=o>>i-16&255,d=n?o>>i-24&255:255;return[f,s,l,d]};function Wy(t){if(t==="transparent")return[0,0,0,0];const n=t.match(Ny),i=t.match(By);if(n!==null){const[,o,f,s]=n;return[+o,+f,+s,255]}else{if(i!==null)return zy(t);throw new Error(`'${t}' is not a valid RGB or hex color expression.`)}}const Vy=t=>{const n=[];let i=[];for(let d=0;d<t.length;d++){n.push(t[d].offset);const v=Wy(t[d].color);i=i.concat(v)}const o=new Float32Array(n),f=new Uint8Array(o.buffer),s=Array.from(f);return i.concat(s)};function Tu(t,n){const i=Vy(t);let o;return t.length===0?o=n.texture({shape:[2,2]}):o=n.texture({width:t.length,height:2,data:i}),o}class Yv{constructor(n,i=256,o,f=!1,s="rgba",l="uint8"){const d=Math.floor(o/i),v=d*i,M=d*d,B=n.texture({width:v,height:v,flipY:f,format:s,type:l}),p=new Map,U=this.allTextureCoordinates(d,i);Object.assign(this,{tileSize:i,tilesAcross:d,pixelsAcross:v,tileCapacity:M,texture:B,contents:p,available:U})}addTile(n,i){const{available:o,contents:f,texture:s,tileSize:l}=this,d=this.hashTileCoordinates(n);if(f.has(d)){const p=f.get(d);return f.delete(d),f.set(d,p),this.formatOutputTextureCoordinates(p)}if(Ys.exports.isEmpty(o)){const p=f.keys().next().value;this.removeByHashKey(p)}const v=o.pop();f.set(d,v);const{x:M,y:B}=v;return s.subimage({data:i,width:l,height:l},M,B),this.formatOutputTextureCoordinates(v)}removeTile(n){this.removeByHashKey(this.hashTileCoordinates(n))}clearTiles(){for(const n of Array.from(this.contents.keys()))this.removeByHashKey(n)}destroy(){this.texture.destroy()}removeByHashKey(n){if(this.contents.has(n)){const i=this.contents.get(n);this.contents.delete(n),this.available.push(i)}}formatOutputTextureCoordinates(n){const{x:i,y:o}=n,{pixelsAcross:f,tileSize:s}=this;return[{x:i/f,y:o/f},{x:(i+s)/f,y:(o+s)/f}]}hashTileCoordinates({x:n,y:i,z:o}){return`${n}:${i}:${o}`}getTextureCoordinates(n){const i=this.hashTileCoordinates(n),o=this.contents.get(i);return this.formatOutputTextureCoordinates(o)}allTextureCoordinates(n,i){return Ys.exports.flatMap(Gv(n),o=>Gv(n).map(f=>({x:o*i,y:f*i})))}}var Hv=typeof Float32Array<"u"?Float32Array:Array,zv=Math.random;Math.hypot||(Math.hypot=function(){for(var t=0,n=arguments.length;n--;)t+=arguments[n]*arguments[n];return Math.sqrt(t)});function Qo(){var t=new Hv(3);return Hv!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function $y(t,n,i){return t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t}function Zy(t,n,i){return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t}function Wv(t,n){var i=n[0],o=n[1],f=n[2],s=i*i+o*o+f*f;return s>0&&(s=1/Math.sqrt(s)),t[0]=n[0]*s,t[1]=n[1]*s,t[2]=n[2]*s,t}function Vv(t,n){n=n||1;var i=zv()*2*Math.PI,o=zv()*2-1,f=Math.sqrt(1-o*o)*n;return t[0]=Math.cos(i)*f,t[1]=Math.sin(i)*f,t[2]=o*n,t}(function(){var t=Qo();return function(n,i,o,f,s,l){var d,v;for(i||(i=3),o||(o=0),f?v=Math.min(f*i+o,n.length):v=n.length,d=o;d<v;d+=i)t[0]=n[d],t[1]=n[d+1],t[2]=n[d+2],s(t,t,l),n[d]=t[0],n[d+1]=t[1],n[d+2]=t[2];return n}})();const Xy=`#define GLSLIFY 1
47
+ ${t}`}const Ab=t=>{const n=t.length===9,i=n?24:16,a=parseInt(t.slice(1),16),f=a>>i&255,s=a>>i-8&255,l=a>>i-16&255,d=n?a>>i-24&255:255;return[f,s,l,d]};function Tb(t){if(t==="transparent")return[0,0,0,0];const n=t.match(gb),i=t.match(yb);if(n!==null){const[,a,f,s]=n;return[+a,+f,+s,255]}else{if(i!==null)return Ab(t);throw new Error(`'${t}' is not a valid RGB or hex color expression.`)}}const Eb=t=>{const n=[];let i=[];for(let d=0;d<t.length;d++){n.push(t[d].offset);const v=Tb(t[d].color);i=i.concat(v)}const a=new Float32Array(n),f=new Uint8Array(a.buffer),s=Array.from(f);return i.concat(s)};function Pu(t,n){const i=Eb(t);let a;return t.length===0?a=n.texture({shape:[2,2]}):a=n.texture({width:t.length,height:2,data:i}),a}class d_{constructor(n,i=256,a,f=!1,s="rgba",l="uint8"){const d=Math.floor(a/i),v=d*i,I=d*d,B=n.texture({width:v,height:v,flipY:f,format:s,type:l}),p=new Map,U=this.allTextureCoordinates(d,i);Object.assign(this,{tileSize:i,tilesAcross:d,pixelsAcross:v,tileCapacity:I,texture:B,contents:p,available:U})}addTile(n,i){const{available:a,contents:f,texture:s,tileSize:l}=this,d=this.hashTileCoordinates(n);if(f.has(d)){const p=f.get(d);return f.delete(d),f.set(d,p),this.formatOutputTextureCoordinates(p)}if(Xs.exports.isEmpty(a)){const p=f.keys().next().value;this.removeByHashKey(p)}const v=a.pop();f.set(d,v);const{x:I,y:B}=v;return s.subimage({data:i,width:l,height:l},I,B),this.formatOutputTextureCoordinates(v)}removeTile(n){this.removeByHashKey(this.hashTileCoordinates(n))}clearTiles(){for(const n of Array.from(this.contents.keys()))this.removeByHashKey(n)}destroy(){this.texture.destroy()}removeByHashKey(n){if(this.contents.has(n)){const i=this.contents.get(n);this.contents.delete(n),this.available.push(i)}}formatOutputTextureCoordinates(n){const{x:i,y:a}=n,{pixelsAcross:f,tileSize:s}=this;return[{x:i/f,y:a/f},{x:(i+s)/f,y:(a+s)/f}]}hashTileCoordinates({x:n,y:i,z:a}){return`${n}:${i}:${a}`}getTextureCoordinates(n){const i=this.hashTileCoordinates(n),a=this.contents.get(i);return this.formatOutputTextureCoordinates(a)}allTextureCoordinates(n,i){return Xs.exports.flatMap(c_(n),a=>c_(n).map(f=>({x:a*i,y:f*i})))}}var v_=typeof Float32Array<"u"?Float32Array:Array,__=Math.random;Math.hypot||(Math.hypot=function(){for(var t=0,n=arguments.length;n--;)t+=arguments[n]*arguments[n];return Math.sqrt(t)});function is(){var t=new v_(3);return v_!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Db(t,n,i){return t[0]=n[0]+i[0],t[1]=n[1]+i[1],t[2]=n[2]+i[2],t}function Lb(t,n,i){return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t}function p_(t,n){var i=n[0],a=n[1],f=n[2],s=i*i+a*a+f*f;return s>0&&(s=1/Math.sqrt(s)),t[0]=n[0]*s,t[1]=n[1]*s,t[2]=n[2]*s,t}function m_(t,n){n=n||1;var i=__()*2*Math.PI,a=__()*2-1,f=Math.sqrt(1-a*a)*n;return t[0]=Math.cos(i)*f,t[1]=Math.sin(i)*f,t[2]=a*n,t}(function(){var t=is();return function(n,i,a,f,s,l){var d,v;for(i||(i=3),a||(a=0),f?v=Math.min(f*i+a,n.length):v=n.length,d=a;d<v;d+=i)t[0]=n[d],t[1]=n[d+1],t[2]=n[d+2],s(t,t,l),n[d]=t[0],n[d+1]=t[1],n[d+2]=t[2];return n}})();const Rb=`#define GLSLIFY 1
46
48
  uniform mat4 transformMatrix;
47
49
 
48
50
  attribute vec2 position;
@@ -53,7 +55,7 @@ varying vec2 vTexCoord;
53
55
  void main() {
54
56
  vTexCoord = texCoord;
55
57
  gl_Position = transformMatrix * vec4(position, 0.0, 1.0);
56
- }`,qy=`#ifdef GL_FRAGMENT_PRECISION_HIGH
58
+ }`,Cb=`#ifdef GL_FRAGMENT_PRECISION_HIGH
57
59
  precision highp float;
58
60
  #else
59
61
  precision mediump float;
@@ -279,4 +281,4 @@ void main() {
279
281
  }
280
282
 
281
283
  gl_FragColor = clr;
282
- }`;function Ky(t,n,i){return t({...n,vert:Xy,frag:Hy(qy,i),uniforms:{...n.uniforms,scaleLength:t.prop("scaleLength"),sentinelLength:t.prop("sentinelLength"),scaleColormap:t.prop("scaleColormap"),sentinelColormap:t.prop("sentinelColormap"),texture:(o,{texture:f})=>f,enableSimpleHillshade:(o,{enableSimpleHillshade:f})=>f,offset:0,azimuth:0,altitude:0,slopescale:0,deg2rad:ky,slopeFactor:Py,tileSize:0,textureSize:0,textureBounds:[0,0,0,0]},attributes:{...n.attributes,texCoord:(o,{textureBounds:f})=>Yy(f)}})}Bv();const jy=Bv();function Qy(t,n){return{uniforms:{nodataValue:n,littleEndian:jy,transformMatrix:({viewportWidth:i,viewportHeight:o})=>Uy(i,o)},attributes:{position:(i,{canvasCoordinates:o})=>{const[f,s]=o,[l,d]=[f+t,s+t];return[[f,s],[l,s],[f,d],[l,d]]}},depth:{enable:!1},primitive:"triangle strip",count:4,viewport:(i,{canvasSize:[o,f]})=>({width:o,height:f})}}class $v{constructor(n,i,o,f,s,l,d){const v=document.createElement("canvas");let M=Oy,B=1024;const p=Ry({canvas:v,optionalExtensions:["OES_texture_float","WEBGL_color_buffer_float"],onDone:function(D,pe){if(D){console.log(D);return}else pe.limits.maxTextureSize>2048&&(M=2048),pe.limits.maxTextureSize>4096&&(M=4096),pe.limits.maxTextureSize>8192&&(M=8192),B=M;pe.limits.maxFragmentUniforms===261&&console.warn("Software rendering detected. Many features of this plugin will fail. If you have a GPU, check if drivers are installed ok?")}}),U=Qy(i,o),q={SCALE_MAX_LENGTH:l,SENTINEL_MAX_LENGTH:d};Object.assign(this,{gloperations:n,canvas:v,regl:p,tileSize:i,nodataValue:o,maxTextureDimension:M,normalTextureDimension:B,scaleInput:f,sentinelInput:s,scaleColormap:Tu(f,p),sentinelColormap:Tu(s,p),textureManager:new Yv(p,i,B,!1),drawTile:Ky(p,U,q)})}renderTile({coords:n,pixelData:i},o,f){const{regl:s,textureManager:l,tileSize:d}=this;this.setCanvasSize(d,d);const v=l.addTile(n,i);s.clear({color:Cy});const M=o.hsSimpleZoomdelta||0,p=Math.max(.5,2**(f+M)/2048)/l.texture.width;return o.hillshadeType==="none"?this.drawTile({canvasSize:[d,d],canvasCoordinates:[0,0],textureBounds:v,texture:l.texture,scaleLength:this.scaleInput.length,sentinelLength:this.sentinelInput.length,scaleColormap:this.scaleColormap,sentinelColormap:this.sentinelColormap,enableSimpleHillshade:!1}):o.hillshadeType==="simple"&&this.drawTileHsSimple({scaleLength:this.scaleInput.length,sentinelLength:this.sentinelInput.length,scaleColormap:this.scaleColormap,sentinelColormap:this.sentinelColormap,canvasSize:[d,d],canvasCoordinates:[0,0],textureBounds:v,texture:l.texture,textureSize:l.texture.width,tileSize:d,offset:p,enableSimpleHillshade:!0,azimuth:o.hsSimpleAzimuth,altitude:o.hsSimpleAltitude,slopescale:o.hsSimpleSlopescale}),[0,0]}setCanvasSize(n,i){Object.assign(this.canvas,{width:n,height:i})}generateAmbientDirections(n){const i=[];for(let o=0;o<n;o++){const f=Vv(Qo(),Math.random());i.push(f)}this.ambientDirections=i}generateSunDirections(n,i){const o=[];for(let f=0;f<n;f++){const s=Wv(Qo(),$y(Qo(),Zy(Qo(),Wv(Qo(),[1,1,1]),My),Vv(Qo(),Fy*i)));o.push(s)}this.sunDirections=o}updateColorscale(n){this.scaleInputPrevious=this.scaleInput,this.scaleInput=n,this.scaleColormapPrevious=this.scaleColormap,this.scaleColormap=Tu(n,this.regl)}updateSentinels(n){this.sentinelInputPrevious=this.sentinelInput,this.sentinelInput=n,this.sentinelColormapPrevious=this.sentinelColormap,this.sentinelColormap=Tu(n,this.regl)}setMaxTextureDimension(n){const{textureManager:i,tileSize:o,regl:f}=this;i.destroy(),Object.assign(this,{maxTextureDimension:n,textureManager:new Yv(f,o,n,!1)})}}class Jy{constructor(n){this.options=Object.assign({},gy,n),this._checkColorScaleAndSentinels(),this.setHillshadeOptions();const{nodataValue:i,tileSize:o}=this.options;this._renderer=new $v(this,o,i,this.options.colorScale,this.options.sentinelValues,this.options.colorscaleMaxLength,this.options.sentinelMaxLength),this._renderer.generateAmbientDirections(this.options.hsAdvAmbientIterations),this._renderer.generateSunDirections(this.options.hsAdvSoftIterations,this.options.hsAdvSunRadiusMultiplier)}updateOptions(n){const{url:i,glOperation:o,operationUrlA:f,operationUrlB:s,operationUrlC:l,operationUrlD:d,operationUrlE:v,operationUrlF:M,colorScale:B,sentinelValues:p,filterLowA:U,filterHighA:q,filterLowB:D,filterHighB:pe,filterLowC:ue,filterHighC:b,filterLowD:A,filterHighD:g,filterLowE:x,filterHighE:P,filterLowF:F,filterHighF:J,multiplierA:Te,multiplierB:nt,multiplierC:ut,multiplierD:it,multiplierE:st,multiplierF:tt,multiLayers:Re,hsPregenUrl:Ot,hillshadeType:bt,hsAdvValueScale:Me,hsAdvPixelScale:Ze,hsSimpleSlopescale:St,hsSimpleAzimuth:$t,hsSimpleAltitude:Wt,hsAdvSoftIterations:Qt,hsAdvAmbientIterations:sr,hsAdvSunRadiusMultiplier:xr,hsAdvFinalSoftMultiplier:lr,hsAdvFinalAmbientMultiplier:Kt,hsAdvBaselayerUrl:wr,hsAdvSmoothInput:Gt,hsAdvSmoothInputKernel:It,contourInterval:hn,contourIndexInterval:jr,contourLineColor:kt,contourLineWeight:Nr,contourLineIndexWeight:Fr,contourType:Zr,contourSmoothLines:Qr,contourSmoothInput:ar,contourSmoothInputKernel:Pt,contourIlluminatedHighlightColor:Tn,contourIlluminatedShadowColor:En,contourIlluminatedShadowSize:Jr,contourHypso:an,contourHypsoDomain:E,contourHypsoColors:di,contourBathy:dn,contourBathyDomain:zi,contourBathyColors:Nn,contourBathyShadowColor:Tr,contourBathyHighlightColor:Dn,contourIndexLabels:Bn,contourLabelFont:C,contourLabelDistance:Ue,colorscaleMaxLength:Xe,sentinelMaxLength:dt}=this.options;if(Object.assign(this.options,n),this.options.colorscaleMaxLength!==Xe||this.options.sentinelMaxLength!==dt){const Z=this._tileSizeAsNumber(),we=new $v(this,Z,this.options.nodataValue,this.options.colorScale,this.options.sentinelValues,this.options.colorscaleMaxLength,this.options.sentinelMaxLength);this._renderer.regl.destroy(),delete this._renderer,Object.assign(this,{_renderer:we})}this._checkColorScaleAndSentinels(),this.options.colorScale!==B&&this._renderer.updateColorscale(this.options.colorScale),this.options.sentinelValues!==p&&this._renderer.updateSentinels(this.options.sentinelValues),this.options.hsAdvAmbientIterations!==sr&&this._renderer.generateAmbientDirections(this.options.hsAdvAmbientIterations),(this.options.hsAdvSoftIterations!==Qt||this.options.hsAdvSunRadiusMultiplier!==xr)&&this._renderer.generateSunDirections(this.options.hsAdvSoftIterations,this.options.hsAdvSunRadiusMultiplier),this.setHillshadeOptions(),this.options.extraPixelLayers>0&&this.options.glOperation==="none"&&this._maybeLoadExtraLayers(f,s,l,d),this.options.hillshadeType!==bt&&(this.options.hillshadeType==="simple"?this._renderer.setMaxTextureDimension(this._tileSizeAsNumber()):bt==="simple"&&this._renderer.setMaxTextureDimension(this._renderer.findMaxTextureDimension())),this.options.url!==i&&this._renderer.textureManager.clearTiles(),this.options.hsAdvBaselayerUrl!==wr&&this._renderer.textureManagerHillshade.clearTiles()}createTile(n){const{extraPixelLayers:i,tileSize:o,url:f,hsPregenUrl:s,operationUrlA:l,operationUrlB:d,operationUrlC:v,operationUrlD:M,operationUrlE:B,operationUrlF:p,filterLowA:U,filterHighA:q,filterLowB:D,filterHighB:pe,filterLowC:ue,filterHighC:b,filterLowD:A,filterHighD:g,filterLowE:x,filterHighE:P,filterLowF:F,filterHighF:J,multiplierA:Te,multiplierB:nt,multiplierC:ut,multiplierD:it,multiplierE:st,multiplierF:tt}=this.options,Re=document.createElement("canvas");return Object.assign(Re,{className:"gl-tile",width:o,height:o}),new Promise((Ot,bt)=>{this.options.glOperation==="none"?(i===1&&this._fetchTileData(n,l).then(Me=>{this.options.debug&&console.log("createTile - extraPixelLayers === 1"),Re.pixelDataA=Me}),this._fetchTileData(n,f).then(Me=>{this.options.debug&&console.log("_fetchTileData with no operation");let[Ze,St]=this._renderer.renderTile({coords:n,pixelData:Me},this.options._hillshadeOptions,n.z);Re.pixelData=Me,this._copyToTileCanvas(Re,Ze,St),Ot(Re)})):this.options.glOperation==="diff"?Promise.all([this._fetchTileData(n,l),this._fetchTileData(n,d)]).then(Me=>{this.options.debug&&console.log("_fetchTileData with diff");const Ze=Me[0],St=Me[1],[$t,Wt,Qt]=this._renderer.renderTileDiff({coords:n,pixelData:Ze},{coords:n,pixelData:St});Re.pixelData=Qt,Re.pixelDataA=Ze,Re.pixelDataB=St,this._copyToTileCanvas(Re,$t,Wt)}):this.options.glOperation==="multi"&&this.options.multiLayers===1?Promise.all([this._fetchTileData(n,l)]).then(Me=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Me[0],[St,$t,Wt]=this._renderer.renderTileMulti1({coords:n,pixelData:Ze},U,q,Te);Re.pixelData=Wt,Re.pixelDataA=Ze,this._copyToTileCanvas(Re,St,$t)}):this.options.glOperation==="multi"&&this.options.multiLayers===2?Promise.all([this._fetchTileData(n,l),this._fetchTileData(n,d)]).then(Me=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Me[0],St=Me[1],[$t,Wt,Qt]=this._renderer.renderTileMulti2({coords:n,pixelData:Ze},{coords:n,pixelData:St},U,q,D,pe,Te,nt);Re.pixelData=Qt,Re.pixelDataA=Ze,Re.pixelDataB=St,this._copyToTileCanvas(Re,$t,Wt)}):this.options.glOperation==="multi"&&this.options.multiLayers===3?Promise.all([this._fetchTileData(n,l),this._fetchTileData(n,d),this._fetchTileData(n,v)]).then(Me=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Me[0],St=Me[1],$t=Me[2],[Wt,Qt,sr]=this._renderer.renderTileMulti3({coords:n,pixelData:Ze},{coords:n,pixelData:St},{coords:n,pixelData:$t},U,q,D,pe,ue,b,Te,nt,ut);Re.pixelData=sr,Re.pixelDataA=Ze,Re.pixelDataB=St,Re.pixelDataC=$t,this._copyToTileCanvas(Re,Wt,Qt)}):this.options.glOperation==="multi"&&this.options.multiLayers===4?Promise.all([this._fetchTileData(n,l),this._fetchTileData(n,d),this._fetchTileData(n,v),this._fetchTileData(n,M)]).then(Me=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Me[0],St=Me[1],$t=Me[2],Wt=Me[3],[Qt,sr,xr]=this._renderer.renderTileMulti4({coords:n,pixelData:Ze},{coords:n,pixelData:St},{coords:n,pixelData:$t},{coords:n,pixelData:Wt},U,q,D,pe,ue,b,A,g,Te,nt,ut,it);Re.pixelData=xr,Re.pixelDataA=Ze,Re.pixelDataB=St,Re.pixelDataC=$t,Re.pixelDataD=Wt,this._copyToTileCanvas(Re,Qt,sr)}):this.options.glOperation==="multi"&&this.options.multiLayers===5?Promise.all([this._fetchTileData(n,l),this._fetchTileData(n,d),this._fetchTileData(n,v),this._fetchTileData(n,M),this._fetchTileData(n,B)]).then(Me=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Me[0],St=Me[1],$t=Me[2],Wt=Me[3],Qt=Me[4],[sr,xr,lr]=this._renderer.renderTileMulti5({coords:n,pixelData:Ze},{coords:n,pixelData:St},{coords:n,pixelData:$t},{coords:n,pixelData:Wt},{coords:n,pixelData:Qt},U,q,D,pe,ue,b,A,g,x,P,Te,nt,ut,it,st);Re.pixelData=lr,Re.pixelDataA=Ze,Re.pixelDataB=St,Re.pixelDataC=$t,Re.pixelDataD=Wt,Re.pixelDataE=Qt,this._copyToTileCanvas(Re,sr,xr)}):this.options.glOperation==="multi"&&this.options.multiLayers===6&&Promise.all([this._fetchTileData(n,l),this._fetchTileData(n,d),this._fetchTileData(n,v),this._fetchTileData(n,M),this._fetchTileData(n,B),this._fetchTileData(n,p)]).then(Me=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Me[0],St=Me[1],$t=Me[2],Wt=Me[3],Qt=Me[4],sr=Me[5],[xr,lr,Kt]=this._renderer.renderTileMulti6({coords:n,pixelData:Ze},{coords:n,pixelData:St},{coords:n,pixelData:$t},{coords:n,pixelData:Wt},{coords:n,pixelData:Qt},{coords:n,pixelData:sr},U,q,D,pe,ue,b,A,g,x,P,F,J,Te,nt,ut,it,st,tt);Re.pixelData=Kt,Re.pixelDataA=Ze,Re.pixelDataB=St,Re.pixelDataC=$t,Re.pixelDataD=Wt,Re.pixelDataE=Qt,Re.pixelDataF=sr,this._copyToTileCanvas(Re,xr,lr)})})}_checkColorScaleAndSentinels(){const{colorScale:n,sentinelValues:i,colorscaleMaxLength:o,sentinelMaxLength:f}=this.options;if(n.length===0&&i.length===0)throw new Error("Either `colorScale` or `sentinelValues` must be of non-zero length.");if(n.length>o)throw new Error(`Color scale length ${n.length} exceeds the maximum, ${o}.`);if(i.length>f)throw new Error(`Sentinel values length ${i.length} exceeds the maximum, ${f}.`)}setHillshadeOptions(){this.options._hillshadeOptions={hillshadeType:this.options.hillshadeType,hsAdvValueScale:this.options.hsAdvValueScale,hsAdvPixelScale:this.options.hsAdvPixelScale,hsSimpleSlopescale:this.options.hsSimpleSlopescale,hsSimpleAzimuth:this.options.hsSimpleAzimuth,hsSimpleAltitude:this.options.hsSimpleAltitude,hsSimpleZoomdelta:this.options.hsSimpleZoomdelta,hsAdvSoftIterations:this.options.hsAdvSoftIterations,hsAdvAmbientIterations:this.options.hsAdvAmbientIterations,hsAdvSunRadiusMultiplier:this.options.hsAdvSunRadiusMultiplier,hsAdvFinalSoftMultiplier:this.options.hsAdvFinalSoftMultiplier,hsAdvFinalAmbientMultiplier:this.options.hsAdvFinalAmbientMultiplier,hsAdvBaselayerUrl:this.options.hsAdvBaselayerUrl,hsAdvSmoothInput:this.options.hsAdvSmoothInput,hsAdvSmoothInputKernel:this.options.hsAdvSmoothInputKernel,hsPregenUrl:this.options.hsPregenUrl}}_tileSizeAsNumber(){return this.options.tileSize}async _fetchTileData(n,i,o=this.options.tileFormat){if(o==="float32"||o==="image")return Uv(this.getTileUrl(n,i),this.options.nodataValue,this._tileSizeAsNumber());if(o==="dem"){const f=Fh(this.options.nodataValue,this._tileSizeAsNumber()),s=await Uv(this.getTileUrl(n,i),this.options.nodataValue,this._tileSizeAsNumber());return Gy(s,f)?s:this._renderer.renderConvertDem(s)}return Fh(this.options.nodataValue,this._tileSizeAsNumber())}_copyToTileCanvas(n,i,o){const f=this._tileSizeAsNumber(),s=n.getContext("2d");if(s===null)throw new Error("Tile canvas 2D context is null.");s.clearRect(0,0,f,f),s.drawImage(this._renderer.canvas,i,o,f,f,0,0,f,f)}getTileUrl(n,i){return i.replace(/{z}/g,String(n.z)).replace(/{x}/g,String(n.x)).replace(/{y}/g,String(n.y))}_getPixelScale(n){let{bbox:{east:i,south:o,west:f,north:s},z:l}=n,d=1,v=(o+s)/2;return this.options.hsAdvPixelScale==="auto"?d=Iy*Math.abs(Math.cos(v/180*Math.PI))/Math.pow(2,l+8):typeof this.options.hsAdvPixelScale=="number"&&(d=this.options.hsAdvPixelScale/(this._tileSizeAsNumber()*2**l)),d}}ir.Event=my,ir.GLOperations=Jy,ir.addIcons2Map=vy,ir.bmapTypes=Wg,ir.cameras=ph,ir.colors=Vg,ir.defaultLayers=$g,ir.diffLayers=iy,ir.downloadImage=fy,ir.findNodeInTree=Au,ir.formatDate=Jg,ir.formatFileSize=ty,ir.formatLocalDate=ey,ir.generateId=Qg,ir.getAnnotationFeature=cy,ir.getAnnotationName=hy,ir.getBeforeId=ay,ir.getDataType=sy,ir.getGeoCoordOperator=gh,ir.getGeometryType=ly,ir.getLineLabelFeature=dy,ir.getPhotoInfo=ry,ir.getPhotoMeta=ny,ir.getPhotoTags=Bc,ir.getTaskTreeList=_y,ir.isTokenExpired=oy,ir.layerFolders=Zg,ir.layerGroups=hv,ir.layerIcons=Xg,ir.mapViewModes=qg,ir.project=bh,ir.rgbaToFloat=uy,ir.taskParams=Kg,ir.toRadian=yh,ir.tools=jg,Object.defineProperties(ir,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
284
+ }`;function Ob(t,n,i){return t({...n,vert:Rb,frag:Sb(Cb,i),uniforms:{...n.uniforms,scaleLength:t.prop("scaleLength"),sentinelLength:t.prop("sentinelLength"),scaleColormap:t.prop("scaleColormap"),sentinelColormap:t.prop("sentinelColormap"),texture:(a,{texture:f})=>f,enableSimpleHillshade:(a,{enableSimpleHillshade:f})=>f,offset:0,azimuth:0,altitude:0,slopescale:0,deg2rad:pb,slopeFactor:mb,tileSize:0,textureSize:0,textureBounds:[0,0,0,0]},attributes:{...n.attributes,texCoord:(a,{textureBounds:f})=>wb(f)}})}u_();const Ib=u_();function Mb(t,n){return{uniforms:{nodataValue:n,littleEndian:Ib,transformMatrix:({viewportWidth:i,viewportHeight:a})=>bb(i,a)},attributes:{position:(i,{canvasCoordinates:a})=>{const[f,s]=a,[l,d]=[f+t,s+t];return[[f,s],[l,s],[f,d],[l,d]]}},depth:{enable:!1},primitive:"triangle strip",count:4,viewport:(i,{canvasSize:[a,f]})=>({width:a,height:f})}}class g_{constructor(n,i,a,f,s,l,d){const v=document.createElement("canvas");let I=hb,B=1024;const p=ub({canvas:v,optionalExtensions:["OES_texture_float","WEBGL_color_buffer_float"],onDone:function(D,pe){if(D){console.log(D);return}else pe.limits.maxTextureSize>2048&&(I=2048),pe.limits.maxTextureSize>4096&&(I=4096),pe.limits.maxTextureSize>8192&&(I=8192),B=I;pe.limits.maxFragmentUniforms===261&&console.warn("Software rendering detected. Many features of this plugin will fail. If you have a GPU, check if drivers are installed ok?")}}),U=Mb(i,a),q={SCALE_MAX_LENGTH:l,SENTINEL_MAX_LENGTH:d};Object.assign(this,{gloperations:n,canvas:v,regl:p,tileSize:i,nodataValue:a,maxTextureDimension:I,normalTextureDimension:B,scaleInput:f,sentinelInput:s,scaleColormap:Pu(f,p),sentinelColormap:Pu(s,p),textureManager:new d_(p,i,B,!1),drawTile:Ob(p,U,q)})}renderTile({coords:n,pixelData:i},a,f){const{regl:s,textureManager:l,tileSize:d}=this;this.setCanvasSize(d,d);const v=l.addTile(n,i);s.clear({color:cb});const I=a.hsSimpleZoomdelta||0,p=Math.max(.5,2**(f+I)/2048)/l.texture.width;return a.hillshadeType==="none"?this.drawTile({canvasSize:[d,d],canvasCoordinates:[0,0],textureBounds:v,texture:l.texture,scaleLength:this.scaleInput.length,sentinelLength:this.sentinelInput.length,scaleColormap:this.scaleColormap,sentinelColormap:this.sentinelColormap,enableSimpleHillshade:!1}):a.hillshadeType==="simple"&&this.drawTileHsSimple({scaleLength:this.scaleInput.length,sentinelLength:this.sentinelInput.length,scaleColormap:this.scaleColormap,sentinelColormap:this.sentinelColormap,canvasSize:[d,d],canvasCoordinates:[0,0],textureBounds:v,texture:l.texture,textureSize:l.texture.width,tileSize:d,offset:p,enableSimpleHillshade:!0,azimuth:a.hsSimpleAzimuth,altitude:a.hsSimpleAltitude,slopescale:a.hsSimpleSlopescale}),[0,0]}setCanvasSize(n,i){Object.assign(this.canvas,{width:n,height:i})}generateAmbientDirections(n){const i=[];for(let a=0;a<n;a++){const f=m_(is(),Math.random());i.push(f)}this.ambientDirections=i}generateSunDirections(n,i){const a=[];for(let f=0;f<n;f++){const s=p_(is(),Db(is(),Lb(is(),p_(is(),[1,1,1]),db),m_(is(),_b*i)));a.push(s)}this.sunDirections=a}updateColorscale(n){this.scaleInputPrevious=this.scaleInput,this.scaleInput=n,this.scaleColormapPrevious=this.scaleColormap,this.scaleColormap=Pu(n,this.regl)}updateSentinels(n){this.sentinelInputPrevious=this.sentinelInput,this.sentinelInput=n,this.sentinelColormapPrevious=this.sentinelColormap,this.sentinelColormap=Pu(n,this.regl)}setMaxTextureDimension(n){const{textureManager:i,tileSize:a,regl:f}=this;i.destroy(),Object.assign(this,{maxTextureDimension:n,textureManager:new d_(f,a,n,!1)})}}class Fb{constructor(n){this.options=Object.assign({},Jx,n),this._checkColorScaleAndSentinels(),this.setHillshadeOptions();const{nodataValue:i,tileSize:a}=this.options;this._renderer=new g_(this,a,i,this.options.colorScale,this.options.sentinelValues,this.options.colorscaleMaxLength,this.options.sentinelMaxLength),this._renderer.generateAmbientDirections(this.options.hsAdvAmbientIterations),this._renderer.generateSunDirections(this.options.hsAdvSoftIterations,this.options.hsAdvSunRadiusMultiplier)}updateOptions(n){const{url:i,glOperation:a,operationUrlA:f,operationUrlB:s,operationUrlC:l,operationUrlD:d,operationUrlE:v,operationUrlF:I,colorScale:B,sentinelValues:p,filterLowA:U,filterHighA:q,filterLowB:D,filterHighB:pe,filterLowC:ue,filterHighC:x,filterLowD:A,filterHighD:g,filterLowE:b,filterHighE:P,filterLowF:F,filterHighF:J,multiplierA:Te,multiplierB:nt,multiplierC:ut,multiplierD:it,multiplierE:st,multiplierF:tt,multiLayers:Re,hsPregenUrl:Ot,hillshadeType:xt,hsAdvValueScale:Ie,hsAdvPixelScale:Ze,hsSimpleSlopescale:St,hsSimpleAzimuth:$t,hsSimpleAltitude:Wt,hsAdvSoftIterations:Qt,hsAdvAmbientIterations:sr,hsAdvSunRadiusMultiplier:br,hsAdvFinalSoftMultiplier:lr,hsAdvFinalAmbientMultiplier:Kt,hsAdvBaselayerUrl:wr,hsAdvSmoothInput:Gt,hsAdvSmoothInputKernel:Mt,contourInterval:dn,contourIndexInterval:Qr,contourLineColor:kt,contourLineWeight:Nr,contourLineIndexWeight:Fr,contourType:Xr,contourSmoothLines:Jr,contourSmoothInput:ar,contourSmoothInputKernel:Pt,contourIlluminatedHighlightColor:Dn,contourIlluminatedShadowColor:Ln,contourIlluminatedShadowSize:en,contourHypso:on,contourHypsoDomain:E,contourHypsoColors:pi,contourBathy:vn,contourBathyDomain:Zi,contourBathyColors:Gn,contourBathyShadowColor:Tr,contourBathyHighlightColor:Rn,contourIndexLabels:Un,contourLabelFont:C,contourLabelDistance:Ue,colorscaleMaxLength:Xe,sentinelMaxLength:dt}=this.options;if(Object.assign(this.options,n),this.options.colorscaleMaxLength!==Xe||this.options.sentinelMaxLength!==dt){const Z=this._tileSizeAsNumber(),we=new g_(this,Z,this.options.nodataValue,this.options.colorScale,this.options.sentinelValues,this.options.colorscaleMaxLength,this.options.sentinelMaxLength);this._renderer.regl.destroy(),delete this._renderer,Object.assign(this,{_renderer:we})}this._checkColorScaleAndSentinels(),this.options.colorScale!==B&&this._renderer.updateColorscale(this.options.colorScale),this.options.sentinelValues!==p&&this._renderer.updateSentinels(this.options.sentinelValues),this.options.hsAdvAmbientIterations!==sr&&this._renderer.generateAmbientDirections(this.options.hsAdvAmbientIterations),(this.options.hsAdvSoftIterations!==Qt||this.options.hsAdvSunRadiusMultiplier!==br)&&this._renderer.generateSunDirections(this.options.hsAdvSoftIterations,this.options.hsAdvSunRadiusMultiplier),this.setHillshadeOptions(),this.options.extraPixelLayers>0&&this.options.glOperation==="none"&&this._maybeLoadExtraLayers(f,s,l,d),this.options.hillshadeType!==xt&&(this.options.hillshadeType==="simple"?this._renderer.setMaxTextureDimension(this._tileSizeAsNumber()):xt==="simple"&&this._renderer.setMaxTextureDimension(this._renderer.findMaxTextureDimension())),this.options.url!==i&&this._renderer.textureManager.clearTiles(),this.options.hsAdvBaselayerUrl!==wr&&this._renderer.textureManagerHillshade.clearTiles()}createTile(n){const{extraPixelLayers:i,tileSize:a,url:f,hsPregenUrl:s,operationUrlA:l,operationUrlB:d,operationUrlC:v,operationUrlD:I,operationUrlE:B,operationUrlF:p,filterLowA:U,filterHighA:q,filterLowB:D,filterHighB:pe,filterLowC:ue,filterHighC:x,filterLowD:A,filterHighD:g,filterLowE:b,filterHighE:P,filterLowF:F,filterHighF:J,multiplierA:Te,multiplierB:nt,multiplierC:ut,multiplierD:it,multiplierE:st,multiplierF:tt}=this.options,Re=document.createElement("canvas");return Object.assign(Re,{className:"gl-tile",width:a,height:a}),new Promise((Ot,xt)=>{this.options.glOperation==="none"?(i===1&&this._fetchTileData(n,l).then(Ie=>{this.options.debug&&console.log("createTile - extraPixelLayers === 1"),Re.pixelDataA=Ie}),this._fetchTileData(n,f).then(Ie=>{this.options.debug&&console.log("_fetchTileData with no operation");let[Ze,St]=this._renderer.renderTile({coords:n,pixelData:Ie},this.options._hillshadeOptions,n.z);Re.pixelData=Ie,this._copyToTileCanvas(Re,Ze,St),Ot(Re)})):this.options.glOperation==="diff"?Promise.all([this._fetchTileData(n,l),this._fetchTileData(n,d)]).then(Ie=>{this.options.debug&&console.log("_fetchTileData with diff");const Ze=Ie[0],St=Ie[1],[$t,Wt,Qt]=this._renderer.renderTileDiff({coords:n,pixelData:Ze},{coords:n,pixelData:St});Re.pixelData=Qt,Re.pixelDataA=Ze,Re.pixelDataB=St,this._copyToTileCanvas(Re,$t,Wt)}):this.options.glOperation==="multi"&&this.options.multiLayers===1?Promise.all([this._fetchTileData(n,l)]).then(Ie=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Ie[0],[St,$t,Wt]=this._renderer.renderTileMulti1({coords:n,pixelData:Ze},U,q,Te);Re.pixelData=Wt,Re.pixelDataA=Ze,this._copyToTileCanvas(Re,St,$t)}):this.options.glOperation==="multi"&&this.options.multiLayers===2?Promise.all([this._fetchTileData(n,l),this._fetchTileData(n,d)]).then(Ie=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Ie[0],St=Ie[1],[$t,Wt,Qt]=this._renderer.renderTileMulti2({coords:n,pixelData:Ze},{coords:n,pixelData:St},U,q,D,pe,Te,nt);Re.pixelData=Qt,Re.pixelDataA=Ze,Re.pixelDataB=St,this._copyToTileCanvas(Re,$t,Wt)}):this.options.glOperation==="multi"&&this.options.multiLayers===3?Promise.all([this._fetchTileData(n,l),this._fetchTileData(n,d),this._fetchTileData(n,v)]).then(Ie=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Ie[0],St=Ie[1],$t=Ie[2],[Wt,Qt,sr]=this._renderer.renderTileMulti3({coords:n,pixelData:Ze},{coords:n,pixelData:St},{coords:n,pixelData:$t},U,q,D,pe,ue,x,Te,nt,ut);Re.pixelData=sr,Re.pixelDataA=Ze,Re.pixelDataB=St,Re.pixelDataC=$t,this._copyToTileCanvas(Re,Wt,Qt)}):this.options.glOperation==="multi"&&this.options.multiLayers===4?Promise.all([this._fetchTileData(n,l),this._fetchTileData(n,d),this._fetchTileData(n,v),this._fetchTileData(n,I)]).then(Ie=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Ie[0],St=Ie[1],$t=Ie[2],Wt=Ie[3],[Qt,sr,br]=this._renderer.renderTileMulti4({coords:n,pixelData:Ze},{coords:n,pixelData:St},{coords:n,pixelData:$t},{coords:n,pixelData:Wt},U,q,D,pe,ue,x,A,g,Te,nt,ut,it);Re.pixelData=br,Re.pixelDataA=Ze,Re.pixelDataB=St,Re.pixelDataC=$t,Re.pixelDataD=Wt,this._copyToTileCanvas(Re,Qt,sr)}):this.options.glOperation==="multi"&&this.options.multiLayers===5?Promise.all([this._fetchTileData(n,l),this._fetchTileData(n,d),this._fetchTileData(n,v),this._fetchTileData(n,I),this._fetchTileData(n,B)]).then(Ie=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Ie[0],St=Ie[1],$t=Ie[2],Wt=Ie[3],Qt=Ie[4],[sr,br,lr]=this._renderer.renderTileMulti5({coords:n,pixelData:Ze},{coords:n,pixelData:St},{coords:n,pixelData:$t},{coords:n,pixelData:Wt},{coords:n,pixelData:Qt},U,q,D,pe,ue,x,A,g,b,P,Te,nt,ut,it,st);Re.pixelData=lr,Re.pixelDataA=Ze,Re.pixelDataB=St,Re.pixelDataC=$t,Re.pixelDataD=Wt,Re.pixelDataE=Qt,this._copyToTileCanvas(Re,sr,br)}):this.options.glOperation==="multi"&&this.options.multiLayers===6&&Promise.all([this._fetchTileData(n,l),this._fetchTileData(n,d),this._fetchTileData(n,v),this._fetchTileData(n,I),this._fetchTileData(n,B),this._fetchTileData(n,p)]).then(Ie=>{this.options.debug&&console.log("_fetchTileData with multi");const Ze=Ie[0],St=Ie[1],$t=Ie[2],Wt=Ie[3],Qt=Ie[4],sr=Ie[5],[br,lr,Kt]=this._renderer.renderTileMulti6({coords:n,pixelData:Ze},{coords:n,pixelData:St},{coords:n,pixelData:$t},{coords:n,pixelData:Wt},{coords:n,pixelData:Qt},{coords:n,pixelData:sr},U,q,D,pe,ue,x,A,g,b,P,F,J,Te,nt,ut,it,st,tt);Re.pixelData=Kt,Re.pixelDataA=Ze,Re.pixelDataB=St,Re.pixelDataC=$t,Re.pixelDataD=Wt,Re.pixelDataE=Qt,Re.pixelDataF=sr,this._copyToTileCanvas(Re,br,lr)})})}_checkColorScaleAndSentinels(){const{colorScale:n,sentinelValues:i,colorscaleMaxLength:a,sentinelMaxLength:f}=this.options;if(n.length===0&&i.length===0)throw new Error("Either `colorScale` or `sentinelValues` must be of non-zero length.");if(n.length>a)throw new Error(`Color scale length ${n.length} exceeds the maximum, ${a}.`);if(i.length>f)throw new Error(`Sentinel values length ${i.length} exceeds the maximum, ${f}.`)}setHillshadeOptions(){this.options._hillshadeOptions={hillshadeType:this.options.hillshadeType,hsAdvValueScale:this.options.hsAdvValueScale,hsAdvPixelScale:this.options.hsAdvPixelScale,hsSimpleSlopescale:this.options.hsSimpleSlopescale,hsSimpleAzimuth:this.options.hsSimpleAzimuth,hsSimpleAltitude:this.options.hsSimpleAltitude,hsSimpleZoomdelta:this.options.hsSimpleZoomdelta,hsAdvSoftIterations:this.options.hsAdvSoftIterations,hsAdvAmbientIterations:this.options.hsAdvAmbientIterations,hsAdvSunRadiusMultiplier:this.options.hsAdvSunRadiusMultiplier,hsAdvFinalSoftMultiplier:this.options.hsAdvFinalSoftMultiplier,hsAdvFinalAmbientMultiplier:this.options.hsAdvFinalAmbientMultiplier,hsAdvBaselayerUrl:this.options.hsAdvBaselayerUrl,hsAdvSmoothInput:this.options.hsAdvSmoothInput,hsAdvSmoothInputKernel:this.options.hsAdvSmoothInputKernel,hsPregenUrl:this.options.hsPregenUrl}}_tileSizeAsNumber(){return this.options.tileSize}async _fetchTileData(n,i,a=this.options.tileFormat){if(a==="float32"||a==="image")return h_(this.getTileUrl(n,i),this.options.nodataValue,this._tileSizeAsNumber());if(a==="dem"){const f=Zh(this.options.nodataValue,this._tileSizeAsNumber()),s=await h_(this.getTileUrl(n,i),this.options.nodataValue,this._tileSizeAsNumber());return xb(s,f)?s:this._renderer.renderConvertDem(s)}return Zh(this.options.nodataValue,this._tileSizeAsNumber())}_copyToTileCanvas(n,i,a){const f=this._tileSizeAsNumber(),s=n.getContext("2d");if(s===null)throw new Error("Tile canvas 2D context is null.");s.clearRect(0,0,f,f),s.drawImage(this._renderer.canvas,i,a,f,f,0,0,f,f)}getTileUrl(n,i){return i.replace(/{z}/g,String(n.z)).replace(/{x}/g,String(n.x)).replace(/{y}/g,String(n.y))}_getPixelScale(n){let{bbox:{east:i,south:a,west:f,north:s},z:l}=n,d=1,v=(a+s)/2;return this.options.hsAdvPixelScale==="auto"?d=vb*Math.abs(Math.cos(v/180*Math.PI))/Math.pow(2,l+8):typeof this.options.hsAdvPixelScale=="number"&&(d=this.options.hsAdvPixelScale/(this._tileSizeAsNumber()*2**l)),d}}ir.Event=Qx,ir.GLOperations=Fb,ir.addIcons2Map=qx,ir.bmapTypes=Tx,ir.cameras=Rh,ir.colors=Ex,ir.defaultLayers=Dx,ir.diffLayers=Gx,ir.downloadImage=zx,ir.findNodeInTree=ku,ir.formatDate=Fx,ir.formatFileSize=Px,ir.formatLocalDate=kx,ir.generateId=Mx,ir.getAnnotationFeature=$x,ir.getAnnotationName=Zx,ir.getBeforeId=Ux,ir.getDataType=Hx,ir.getGeoCoordOperator=Oh,ir.getGeometryType=Wx,ir.getLineLabelFeature=Xx,ir.getPhotoInfo=Nx,ir.getPhotoMeta=Bx,ir.getPhotoTags=jc,ir.getTaskTreeList=Kx,ir.isTokenExpired=Yx,ir.layerFolders=Lx,ir.layerGroups=Bv,ir.layerIcons=Rx,ir.mapViewModes=Cx,ir.project=Mh,ir.rgbaToFloat=Vx,ir.taskParams=Ox,ir.toRadian=Ih,ir.tools=Ix,Object.defineProperties(ir,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});