@mxtommy/kip 4.3.0 → 4.4.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/bug_report.yml +84 -0
- package/.github/ISSUE_TEMPLATE/config.yml +5 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +35 -0
- package/.github/workflows/ci.yml +2 -2
- package/package.json +42 -39
- package/plugin/index.js +2 -2
- package/public/3rdpartylicenses.txt +178 -1
- package/public/assets/svg/AtoN/cardinal/east_beacon.svg +21 -0
- package/public/assets/svg/AtoN/cardinal/east_mark.svg +30 -0
- package/public/assets/svg/AtoN/cardinal/north_beacon.svg +20 -0
- package/public/assets/svg/AtoN/cardinal/north_mark.svg +30 -0
- package/public/assets/svg/AtoN/cardinal/south_beacon.svg +20 -0
- package/public/assets/svg/AtoN/cardinal/south_mark.svg +30 -0
- package/public/assets/svg/AtoN/cardinal/west_beacon.svg +21 -0
- package/public/assets/svg/AtoN/cardinal/west_mark.svg +57 -0
- package/public/assets/svg/AtoN/dangerSafe/isolateddanger_beacon.svg +16 -0
- package/public/assets/svg/AtoN/dangerSafe/isolateddanger_mark.svg +30 -0
- package/public/assets/svg/AtoN/dangerSafe/safewater_beacon_.svg +15 -0
- package/public/assets/svg/AtoN/dangerSafe/safewater_mark.svg +43 -0
- package/public/assets/svg/AtoN/lateral/port_beacon.svg +6 -0
- package/public/assets/svg/AtoN/lateral/port_mark.svg +24 -0
- package/public/assets/svg/AtoN/lateral/port_prefered_beacon.svg +15 -0
- package/public/assets/svg/AtoN/lateral/port_prefered_mark.svg +44 -0
- package/public/assets/svg/AtoN/lateral/starboard_beacon.svg +6 -0
- package/public/assets/svg/AtoN/lateral/starboard_mark.svg +24 -0
- package/public/assets/svg/AtoN/lateral/starboard_prefered_beacon.svg +15 -0
- package/public/assets/svg/AtoN/lateral/starboard_prefered_mark.svg +48 -0
- package/public/assets/svg/AtoN/other/aton.svg +78 -0
- package/public/assets/svg/AtoN/other/basestation.svg +91 -0
- package/public/assets/svg/AtoN/other/unknown.svg +22 -0
- package/public/assets/svg/AtoN/special/special_beacon.svg +7 -0
- package/public/assets/svg/AtoN/special/special_mark.svg +20 -0
- package/public/assets/svg/Chart icons.md +28 -0
- package/public/assets/svg/aircraft/ais_sar-aircraft.svg +23 -0
- package/public/assets/svg/icons.svg +3 -0
- package/public/assets/svg/sar-distress-device/sart-eprib-mob.svg +35 -0
- package/public/assets/svg/vessel/buddy.svg +26 -0
- package/public/assets/svg/vessel/cargo.svg +20 -0
- package/public/assets/svg/vessel/diving-ops.svg +31 -0
- package/public/assets/svg/vessel/fishing.svg +20 -0
- package/public/assets/svg/vessel/highspeed.svg +24 -0
- package/public/assets/svg/vessel/law-enforcement.svg +24 -0
- package/public/assets/svg/vessel/military-ops.svg +60 -0
- package/public/assets/svg/vessel/other.svg +20 -0
- package/public/assets/svg/vessel/passenger.svg +20 -0
- package/public/assets/svg/vessel/pilot.svg +82 -0
- package/public/assets/svg/vessel/pleasurecraft.svg +20 -0
- package/public/assets/svg/vessel/sailing.svg +20 -0
- package/public/assets/svg/vessel/sar.svg +25 -0
- package/public/assets/svg/vessel/self.svg +67 -0
- package/public/assets/svg/vessel/stationary.svg +32 -0
- package/public/assets/svg/vessel/tanker.svg +20 -0
- package/public/assets/svg/vessel/tug.svg +20 -0
- package/public/assets/svg/vessel/unknown.svg +22 -0
- package/public/chunk-2KMYPGX4.js +2 -0
- package/public/{chunk-SGKVVF2R.js → chunk-57TQNMBB.js} +4 -4
- package/public/{chunk-OIUDA44M.js → chunk-5DLSQ773.js} +1 -1
- package/public/{chunk-BICTPGGI.js → chunk-7HLFWAA7.js} +1 -1
- package/public/chunk-BNIQFWQ6.js +62 -0
- package/public/{chunk-4LGDIZQH.js → chunk-HJQQWPGC.js} +1 -1
- package/public/chunk-ITJKRZX5.js +9 -0
- package/public/{chunk-WUZG34V4.js → chunk-IWK4FHBL.js} +1 -1
- package/public/{chunk-3Z6GSUML.js → chunk-J4IGUIZA.js} +1 -1
- package/public/{chunk-T26GJV5O.js → chunk-KIR67PZ2.js} +1 -1
- package/public/{chunk-E57JLACD.js → chunk-KKJXPB75.js} +1 -1
- package/public/chunk-LB67BVGG.js +53 -0
- package/public/chunk-MMIOUKLI.js +1 -0
- package/public/{chunk-JE4IH556.js → chunk-PDYVZHOK.js} +1 -1
- package/public/chunk-PESXPDBT.js +2 -0
- package/public/{chunk-KQY62HN7.js → chunk-PKATAZA2.js} +1 -1
- package/public/chunk-PSF2OKKT.js +1 -0
- package/public/{chunk-ODGDFFA5.js → chunk-PSWEVUQT.js} +1 -1
- package/public/chunk-SIWREBK3.js +1 -0
- package/public/{chunk-WGS5SNGF.js → chunk-SNX7XX5K.js} +1 -1
- package/public/{chunk-GSMU2M4Y.js → chunk-TGGJAGV7.js} +12 -12
- package/public/chunk-TKC7ROZ7.js +4 -0
- package/public/{chunk-N77C4M4I.js → chunk-UVAQADRE.js} +1 -1
- package/public/chunk-VH4ZIU4T.js +4 -0
- package/public/{chunk-GDSV24J2.js → chunk-XEJJOWK6.js} +2 -2
- package/public/index.html +2 -2
- package/public/main-YDHULJ3Q.js +1 -0
- package/public/{styles-7VM4HXM4.css → styles-DYEO23GZ.css} +1 -1
- package/public/chunk-2KZMRA4F.js +0 -1
- package/public/chunk-5QZ2G7BQ.js +0 -4
- package/public/chunk-BU2UG7KI.js +0 -9
- package/public/chunk-H7SICK4W.js +0 -1
- package/public/chunk-KC4TEJJN.js +0 -4
- package/public/chunk-KXSGKJ7X.js +0 -63
- package/public/chunk-UM5PEESF.js +0 -53
- package/public/chunk-ZPAB6RAF.js +0 -1
- package/public/chunk-ZQJMMQNG.js +0 -2
- package/public/main-2EXNI6Z4.js +0 -1
package/public/chunk-KC4TEJJN.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{b as Ri,c as Pi,f as Ni,g as Fi,h as Wi,k as Ui,m as ut}from"./chunk-WUZG34V4.js";import{s as Oi,t as xi,w as Ei}from"./chunk-E57JLACD.js";import{G as Di,O as Ii,P as Ai,d as ge,f as ii,g as Q,h as ri,i as si,k as ni,m as ai,q as Ci,r as Mi,w as Ti}from"./chunk-GDSV24J2.js";import{a as bi,i as We,m as Si,o as wi,p as ki,r as lt,s as ct,t as Ue}from"./chunk-ZQJMMQNG.js";import{A as Ft,Aa as Vt,Ab as it,Ad as ci,Ba as Me,Bd as nt,Da as Te,E as Wt,Ea as De,Ec as ti,Ed as ui,Fb as pe,G as Ut,Ga as zt,Gb as A,Hb as q,I as Lt,Ib as Gt,J as ke,Ja as Ht,Jd as di,K as Xe,Lc as Ae,Ma as se,Nc as G,Oc as st,Pb as me,Pd as pi,Q as $t,Qd as mi,Rb as j,Rd as hi,Sd as oe,Tb as ne,Td as fi,Ub as Yt,Vb as rt,Vd as gi,Wb as Xt,Wd as at,Xa as $,Xb as Ie,Xd as _i,Yb as V,Za as Ze,Zb as z,Zc as Re,a as ce,ab as Bt,ba as Je,bc as Jt,be as _e,ca as Qe,d as Rr,da as O,dc as ae,de as ot,e as Pr,eb as Kt,fc as Qt,g as At,gc as he,h as Rt,hc as fe,ib as Oe,j as Ye,jb as xe,k as w,kb as et,ke as Pe,l as Pt,la as re,le as Ne,m as L,ma as Ce,n as ie,oa as J,ob as jt,od as x,qa as g,s as Nt,sc as Zt,tc as ei,va as B,ve as yi,wa as K,xa as qt,xb as Ee,xe as vi,yd as oi,z as ue,za as de,zb as tt,zd as li,ze as Fe}from"./chunk-GSMU2M4Y.js";var zi=Rr((pt,mt)=>{(function(l,b){typeof pt=="object"&&typeof mt<"u"?mt.exports=b():typeof define=="function"&&define.amd?define(b):(l=typeof globalThis<"u"?globalThis:l||self,l.Qty=b())})(pt,function(){"use strict";function l(i){return typeof i=="string"||i instanceof String}var b=Number.isFinite||window.isFinite;function e(i){return b(i)}function t(i){return i}function r(i){var s={};return i.filter(function(a){return s.hasOwnProperty(a)?!1:s[a]=!0})}function n(i,s){if(s.length!==i.length)return!1;for(var a=0;a<i.length;a++)if(s[a].compareArray&&!s[a].compareArray(i[a])||s[a]!==i[a])return!1;return!0}function o(i,s){Object.keys(s).forEach(function(a){i[a]=s[a]})}function p(){for(var i=1,s=0,a=0;a<arguments.length;a++){var c=arguments[a];s=s+R(c),i*=c}return s!==0?y(i,s):i}function f(i,s){if(s===0)throw new Error("Divide by zero");var a=Math.pow(10,R(s)),c=a/(a*s);return p(i,c)}function y(i,s){return Math.round(i*Math.pow(10,s))/Math.pow(10,s)}function R(i){if(!isFinite(i))return 0;for(var s=0;i%1!==0;)i*=10,s++;return s}function m(){var i;if(!this)return i=Object.create(m.prototype),m.apply(i,arguments),i;i=Error.apply(this,arguments),this.name="QtyError",this.message=i.message,this.stack=i.stack}m.prototype=Object.create(Error.prototype,{constructor:{value:m}});function S(i,s){throw new m("Incompatible units: "+i+" and "+s)}var k={"<googol>":[["googol"],1e100,"prefix"],"<kibi>":[["Ki","Kibi","kibi"],Math.pow(2,10),"prefix"],"<mebi>":[["Mi","Mebi","mebi"],Math.pow(2,20),"prefix"],"<gibi>":[["Gi","Gibi","gibi"],Math.pow(2,30),"prefix"],"<tebi>":[["Ti","Tebi","tebi"],Math.pow(2,40),"prefix"],"<pebi>":[["Pi","Pebi","pebi"],Math.pow(2,50),"prefix"],"<exi>":[["Ei","Exi","exi"],Math.pow(2,60),"prefix"],"<zebi>":[["Zi","Zebi","zebi"],Math.pow(2,70),"prefix"],"<yebi>":[["Yi","Yebi","yebi"],Math.pow(2,80),"prefix"],"<yotta>":[["Y","Yotta","yotta"],1e24,"prefix"],"<zetta>":[["Z","Zetta","zetta"],1e21,"prefix"],"<exa>":[["E","Exa","exa"],1e18,"prefix"],"<peta>":[["P","Peta","peta"],1e15,"prefix"],"<tera>":[["T","Tera","tera"],1e12,"prefix"],"<giga>":[["G","Giga","giga"],1e9,"prefix"],"<mega>":[["M","Mega","mega"],1e6,"prefix"],"<kilo>":[["k","kilo"],1e3,"prefix"],"<hecto>":[["h","Hecto","hecto"],100,"prefix"],"<deca>":[["da","Deca","deca","deka"],10,"prefix"],"<deci>":[["d","Deci","deci"],.1,"prefix"],"<centi>":[["c","Centi","centi"],.01,"prefix"],"<milli>":[["m","Milli","milli"],.001,"prefix"],"<micro>":[["u","\u03BC","\xB5","Micro","mc","micro"],1e-6,"prefix"],"<nano>":[["n","Nano","nano"],1e-9,"prefix"],"<pico>":[["p","Pico","pico"],1e-12,"prefix"],"<femto>":[["f","Femto","femto"],1e-15,"prefix"],"<atto>":[["a","Atto","atto"],1e-18,"prefix"],"<zepto>":[["z","Zepto","zepto"],1e-21,"prefix"],"<yocto>":[["y","Yocto","yocto"],1e-24,"prefix"],"<1>":[["1","<1>"],1,""],"<meter>":[["m","meter","meters","metre","metres"],1,"length",["<meter>"]],"<inch>":[["in","inch","inches",'"'],.0254,"length",["<meter>"]],"<foot>":[["ft","foot","feet","'"],.3048,"length",["<meter>"]],"<yard>":[["yd","yard","yards"],.9144,"length",["<meter>"]],"<mile>":[["mi","mile","miles"],1609.344,"length",["<meter>"]],"<naut-mile>":[["nmi","naut-mile"],1852,"length",["<meter>"]],"<league>":[["league","leagues"],4828,"length",["<meter>"]],"<furlong>":[["furlong","furlongs"],201.2,"length",["<meter>"]],"<rod>":[["rd","rod","rods"],5.029,"length",["<meter>"]],"<mil>":[["mil","mils"],254e-7,"length",["<meter>"]],"<angstrom>":[["ang","angstrom","angstroms"],1e-10,"length",["<meter>"]],"<fathom>":[["fathom","fathoms"],1.829,"length",["<meter>"]],"<pica>":[["pica","picas"],.00423333333,"length",["<meter>"]],"<point>":[["pt","point","points"],.000352777778,"length",["<meter>"]],"<redshift>":[["z","red-shift","redshift"],1302773e20,"length",["<meter>"]],"<AU>":[["AU","astronomical-unit"],1495979e5,"length",["<meter>"]],"<light-second>":[["ls","light-second"],299792500,"length",["<meter>"]],"<light-minute>":[["lmin","light-minute"],1798755e4,"length",["<meter>"]],"<light-year>":[["ly","light-year"],9460528e9,"length",["<meter>"]],"<parsec>":[["pc","parsec","parsecs"],3085678e10,"length",["<meter>"]],"<datamile>":[["DM","datamile"],1828.8,"length",["<meter>"]],"<kilogram>":[["kg","kilogram","kilograms"],1,"mass",["<kilogram>"]],"<AMU>":[["u","AMU","amu"],1660538921e-36,"mass",["<kilogram>"]],"<dalton>":[["Da","Dalton","Daltons","dalton","daltons"],1660538921e-36,"mass",["<kilogram>"]],"<slug>":[["slug","slugs"],14.5939029,"mass",["<kilogram>"]],"<short-ton>":[["tn","ton","short-ton"],907.18474,"mass",["<kilogram>"]],"<metric-ton>":[["t","tonne","metric-ton"],1e3,"mass",["<kilogram>"]],"<carat>":[["ct","carat","carats"],2e-4,"mass",["<kilogram>"]],"<pound>":[["lbs","lb","pound","pounds","#"],.45359237,"mass",["<kilogram>"]],"<ounce>":[["oz","ounce","ounces"],.0283495231,"mass",["<kilogram>"]],"<gram>":[["g","gram","grams","gramme","grammes"],.001,"mass",["<kilogram>"]],"<grain>":[["grain","grains","gr"],6479891e-11,"mass",["<kilogram>"]],"<dram>":[["dram","drams","dr"],.0017718452,"mass",["<kilogram>"]],"<stone>":[["stone","stones","st"],6.35029318,"mass",["<kilogram>"]],"<hectare>":[["hectare"],1e4,"area",["<meter>","<meter>"]],"<acre>":[["acre","acres"],4046.85642,"area",["<meter>","<meter>"]],"<sqft>":[["sqft"],1,"area",["<foot>","<foot>"]],"<liter>":[["l","L","liter","liters","litre","litres"],.001,"volume",["<meter>","<meter>","<meter>"]],"<gallon>":[["gal","gallon","gallons"],.0037854118,"volume",["<meter>","<meter>","<meter>"]],"<gallon-imp>":[["galimp","gallon-imp","gallons-imp"],.00454609,"volume",["<meter>","<meter>","<meter>"]],"<quart>":[["qt","quart","quarts"],.00094635295,"volume",["<meter>","<meter>","<meter>"]],"<pint>":[["pt","pint","pints"],.000473176475,"volume",["<meter>","<meter>","<meter>"]],"<pint-imp>":[["ptimp","pint-imp","pints-imp"],.00056826125,"volume",["<meter>","<meter>","<meter>"]],"<cup>":[["cu","cup","cups"],.000236588238,"volume",["<meter>","<meter>","<meter>"]],"<fluid-ounce>":[["floz","fluid-ounce","fluid-ounces"],295735297e-13,"volume",["<meter>","<meter>","<meter>"]],"<fluid-ounce-imp>":[["flozimp","floz-imp","fluid-ounce-imp","fluid-ounces-imp"],284130625e-13,"volume",["<meter>","<meter>","<meter>"]],"<tablespoon>":[["tb","tbsp","tbs","tablespoon","tablespoons"],147867648e-13,"volume",["<meter>","<meter>","<meter>"]],"<teaspoon>":[["tsp","teaspoon","teaspoons"],492892161e-14,"volume",["<meter>","<meter>","<meter>"]],"<bushel>":[["bu","bsh","bushel","bushels"],.035239072,"volume",["<meter>","<meter>","<meter>"]],"<oilbarrel>":[["bbl","oilbarrel","oilbarrels","oil-barrel","oil-barrels"],.158987294928,"volume",["<meter>","<meter>","<meter>"]],"<beerbarrel>":[["bl","bl-us","beerbarrel","beerbarrels","beer-barrel","beer-barrels"],.1173477658,"volume",["<meter>","<meter>","<meter>"]],"<beerbarrel-imp>":[["blimp","bl-imp","beerbarrel-imp","beerbarrels-imp","beer-barrel-imp","beer-barrels-imp"],.16365924,"volume",["<meter>","<meter>","<meter>"]],"<kph>":[["kph"],.277777778,"speed",["<meter>"],["<second>"]],"<mph>":[["mph"],.44704,"speed",["<meter>"],["<second>"]],"<knot>":[["kt","kn","kts","knot","knots"],.514444444,"speed",["<meter>"],["<second>"]],"<fps>":[["fps"],.3048,"speed",["<meter>"],["<second>"]],"<gee>":[["gee"],9.80665,"acceleration",["<meter>"],["<second>","<second>"]],"<Gal>":[["Gal"],.01,"acceleration",["<meter>"],["<second>","<second>"]],"<kelvin>":[["degK","kelvin"],1,"temperature",["<kelvin>"]],"<celsius>":[["degC","celsius","celsius","centigrade"],1,"temperature",["<kelvin>"]],"<fahrenheit>":[["degF","fahrenheit"],5/9,"temperature",["<kelvin>"]],"<rankine>":[["degR","rankine"],5/9,"temperature",["<kelvin>"]],"<temp-K>":[["tempK","temp-K"],1,"temperature",["<temp-K>"]],"<temp-C>":[["tempC","temp-C"],1,"temperature",["<temp-K>"]],"<temp-F>":[["tempF","temp-F"],5/9,"temperature",["<temp-K>"]],"<temp-R>":[["tempR","temp-R"],5/9,"temperature",["<temp-K>"]],"<second>":[["s","sec","secs","second","seconds"],1,"time",["<second>"]],"<minute>":[["min","mins","minute","minutes"],60,"time",["<second>"]],"<hour>":[["h","hr","hrs","hour","hours"],3600,"time",["<second>"]],"<day>":[["d","day","days"],3600*24,"time",["<second>"]],"<week>":[["wk","week","weeks"],7*3600*24,"time",["<second>"]],"<fortnight>":[["fortnight","fortnights"],1209600,"time",["<second>"]],"<year>":[["y","yr","year","years","annum"],31556926,"time",["<second>"]],"<decade>":[["decade","decades"],315569260,"time",["<second>"]],"<century>":[["century","centuries"],3155692600,"time",["<second>"]],"<pascal>":[["Pa","pascal","Pascal"],1,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<bar>":[["bar","bars"],1e5,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<mmHg>":[["mmHg"],133.322368,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<inHg>":[["inHg"],3386.3881472,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<torr>":[["torr"],133.322368,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<atm>":[["atm","ATM","atmosphere","atmospheres"],101325,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<psi>":[["psi"],6894.76,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<cmh2o>":[["cmH2O","cmh2o"],98.0638,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<inh2o>":[["inH2O","inh2o"],249.082052,"pressure",["<kilogram>"],["<meter>","<second>","<second>"]],"<poise>":[["P","poise"],.1,"viscosity",["<kilogram>"],["<meter>","<second>"]],"<stokes>":[["St","stokes"],1e-4,"viscosity",["<meter>","<meter>"],["<second>"]],"<mole>":[["mol","mole"],1,"substance",["<mole>"]],"<molar>":[["M","molar"],1e3,"molar_concentration",["<mole>"],["<meter>","<meter>","<meter>"]],"<wtpercent>":[["wt%","wtpercent"],10,"molar_concentration",["<kilogram>"],["<meter>","<meter>","<meter>"]],"<katal>":[["kat","katal","Katal"],1,"activity",["<mole>"],["<second>"]],"<unit>":[["U","enzUnit","unit"],16667e-19,"activity",["<mole>"],["<second>"]],"<farad>":[["F","farad","Farad"],1,"capacitance",["<second>","<second>","<second>","<second>","<ampere>","<ampere>"],["<meter>","<meter>","<kilogram>"]],"<coulomb>":[["C","coulomb","Coulomb"],1,"charge",["<ampere>","<second>"]],"<Ah>":[["Ah"],3600,"charge",["<ampere>","<second>"]],"<ampere>":[["A","Ampere","ampere","amp","amps"],1,"current",["<ampere>"]],"<siemens>":[["S","Siemens","siemens"],1,"conductance",["<second>","<second>","<second>","<ampere>","<ampere>"],["<kilogram>","<meter>","<meter>"]],"<henry>":[["H","Henry","henry"],1,"inductance",["<meter>","<meter>","<kilogram>"],["<second>","<second>","<ampere>","<ampere>"]],"<volt>":[["V","Volt","volt","volts"],1,"potential",["<meter>","<meter>","<kilogram>"],["<second>","<second>","<second>","<ampere>"]],"<ohm>":[["Ohm","ohm","\u03A9","\u2126"],1,"resistance",["<meter>","<meter>","<kilogram>"],["<second>","<second>","<second>","<ampere>","<ampere>"]],"<weber>":[["Wb","weber","webers"],1,"magnetism",["<meter>","<meter>","<kilogram>"],["<second>","<second>","<ampere>"]],"<tesla>":[["T","tesla","teslas"],1,"magnetism",["<kilogram>"],["<second>","<second>","<ampere>"]],"<gauss>":[["G","gauss"],1e-4,"magnetism",["<kilogram>"],["<second>","<second>","<ampere>"]],"<maxwell>":[["Mx","maxwell","maxwells"],1e-8,"magnetism",["<meter>","<meter>","<kilogram>"],["<second>","<second>","<ampere>"]],"<oersted>":[["Oe","oersted","oersteds"],250/Math.PI,"magnetism",["<ampere>"],["<meter>"]],"<joule>":[["J","joule","Joule","joules","Joules"],1,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<erg>":[["erg","ergs"],1e-7,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<btu>":[["BTU","btu","BTUs"],1055.056,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<calorie>":[["cal","calorie","calories"],4.184,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<Calorie>":[["Cal","Calorie","Calories"],4184,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<therm-US>":[["th","therm","therms","Therm","therm-US"],105480400,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<Wh>":[["Wh"],3600,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<electronvolt>":[["eV","electronvolt","electronvolts"],1602176634e-28,"energy",["<meter>","<meter>","<kilogram>"],["<second>","<second>"]],"<newton>":[["N","Newton","newton"],1,"force",["<kilogram>","<meter>"],["<second>","<second>"]],"<dyne>":[["dyn","dyne"],1e-5,"force",["<kilogram>","<meter>"],["<second>","<second>"]],"<pound-force>":[["lbf","pound-force"],4.448222,"force",["<kilogram>","<meter>"],["<second>","<second>"]],"<hertz>":[["Hz","hertz","Hertz"],1,"frequency",["<1>"],["<second>"]],"<radian>":[["rad","radian","radians"],1,"angle",["<radian>"]],"<degree>":[["deg","degree","degrees"],Math.PI/180,"angle",["<radian>"]],"<arcminute>":[["arcmin","arcminute","arcminutes"],Math.PI/10800,"angle",["<radian>"]],"<arcsecond>":[["arcsec","arcsecond","arcseconds"],Math.PI/648e3,"angle",["<radian>"]],"<gradian>":[["gon","grad","gradian","grads"],Math.PI/200,"angle",["<radian>"]],"<steradian>":[["sr","steradian","steradians"],1,"solid_angle",["<steradian>"]],"<rotation>":[["rotation"],2*Math.PI,"angle",["<radian>"]],"<rpm>":[["rpm"],2*Math.PI/60,"angular_velocity",["<radian>"],["<second>"]],"<byte>":[["B","byte","bytes"],1,"information",["<byte>"]],"<bit>":[["b","bit","bits"],.125,"information",["<byte>"]],"<Bps>":[["Bps"],1,"information_rate",["<byte>"],["<second>"]],"<bps>":[["bps"],.125,"information_rate",["<byte>"],["<second>"]],"<dollar>":[["USD","dollar"],1,"currency",["<dollar>"]],"<cents>":[["cents"],.01,"currency",["<dollar>"]],"<candela>":[["cd","candela"],1,"luminosity",["<candela>"]],"<lumen>":[["lm","lumen"],1,"luminous_power",["<candela>","<steradian>"]],"<lux>":[["lux"],1,"illuminance",["<candela>","<steradian>"],["<meter>","<meter>"]],"<watt>":[["W","watt","watts"],1,"power",["<kilogram>","<meter>","<meter>"],["<second>","<second>","<second>"]],"<volt-ampere>":[["VA","volt-ampere"],1,"power",["<kilogram>","<meter>","<meter>"],["<second>","<second>","<second>"]],"<volt-ampere-reactive>":[["var","Var","VAr","VAR","volt-ampere-reactive"],1,"power",["<kilogram>","<meter>","<meter>"],["<second>","<second>","<second>"]],"<horsepower>":[["hp","horsepower"],745.699872,"power",["<kilogram>","<meter>","<meter>"],["<second>","<second>","<second>"]],"<gray>":[["Gy","gray","grays"],1,"radiation",["<meter>","<meter>"],["<second>","<second>"]],"<roentgen>":[["R","roentgen"],.00933,"radiation",["<meter>","<meter>"],["<second>","<second>"]],"<sievert>":[["Sv","sievert","sieverts"],1,"radiation",["<meter>","<meter>"],["<second>","<second>"]],"<becquerel>":[["Bq","becquerel","becquerels"],1,"radiation",["<1>"],["<second>"]],"<curie>":[["Ci","curie","curies"],37e9,"radiation",["<1>"],["<second>"]],"<cpm>":[["cpm"],1/60,"rate",["<count>"],["<second>"]],"<dpm>":[["dpm"],1/60,"rate",["<count>"],["<second>"]],"<bpm>":[["bpm"],1/60,"rate",["<count>"],["<second>"]],"<dot>":[["dot","dots"],1,"resolution",["<each>"]],"<pixel>":[["pixel","px"],1,"resolution",["<each>"]],"<ppi>":[["ppi"],1,"resolution",["<pixel>"],["<inch>"]],"<dpi>":[["dpi"],1,"typography",["<dot>"],["<inch>"]],"<cell>":[["cells","cell"],1,"counting",["<each>"]],"<each>":[["each"],1,"counting",["<each>"]],"<count>":[["count"],1,"counting",["<each>"]],"<base-pair>":[["bp","base-pair"],1,"counting",["<each>"]],"<nucleotide>":[["nt","nucleotide"],1,"counting",["<each>"]],"<molecule>":[["molecule","molecules"],1,"counting",["<1>"]],"<dozen>":[["doz","dz","dozen"],12,"prefix_only",["<each>"]],"<percent>":[["%","percent"],.01,"prefix_only",["<1>"]],"<ppm>":[["ppm"],1e-6,"prefix_only",["<1>"]],"<ppb>":[["ppb"],1e-9,"prefix_only",["<1>"]],"<ppt>":[["ppt"],1e-12,"prefix_only",["<1>"]],"<ppq>":[["ppq"],1e-15,"prefix_only",["<1>"]],"<gross>":[["gr","gross"],144,"prefix_only",["<dozen>","<dozen>"]],"<decibel>":[["dB","decibel","decibels"],1,"logarithmic",["<decibel>"]]},W=["<meter>","<kilogram>","<second>","<mole>","<ampere>","<radian>","<kelvin>","<temp-K>","<byte>","<dollar>","<candela>","<each>","<steradian>","<decibel>"],Z="<1>",T=[Z];function er(i,s){var a=s[1],c=s[3]||[],u=s[4]||[];if(!e(a))throw new m(i+": Invalid unit definition. 'scalar' must be a number");c.forEach(function(d){if(k[d]===void 0)throw new m(i+": Invalid unit definition. Unit "+d+" in 'numerator' is not recognized")}),u.forEach(function(d){if(k[d]===void 0)throw new m(i+": Invalid unit definition. Unit "+d+" in 'denominator' is not recognized")})}var U={},ye={},E={},ee={},ve={};for(var H in k)if(k.hasOwnProperty(H)){var P=k[H];if(P[2]==="prefix"){U[H]=P[1];for(var $e=0;$e<P[0].length;$e++)ye[P[0][$e]]=H}else{er(H,P),E[H]={scalar:P[1],numerator:P[3],denominator:P[4]};for(var qe=0;qe<P[0].length;qe++)ee[P[0][qe]]=H}ve[H]=P[0][0]}function tr(i){var s,a=[],c=Object.keys(k);if(typeof i>"u")for(s=0;s<c.length;s++)["","prefix"].indexOf(k[c[s]][2])===-1&&a.push(c[s].substr(1,c[s].length-2));else{if(this.getKinds().indexOf(i)===-1)throw new m("Kind not recognized");for(s=0;s<c.length;s++)k[c[s]][2]===i&&a.push(c[s].substr(1,c[s].length-2))}return a.sort(function(u,d){return u.toLowerCase()<d.toLowerCase()?-1:u.toLowerCase()>d.toLowerCase()?1:0})}function ir(i){if(!ee[i])throw new m("Unit not recognized");return k[ee[i]][0]}var Ve=["length","time","temperature","mass","current","substance","luminosity","currency","information","angle"];function rr(){if(this.signature)return this.signature;for(var i=gt.call(this),s=0;s<i.length;s++)i[s]*=Math.pow(20,s);return i.reduce(function(a,c){return a+c},0)}function gt(){if(!this.isBase())return gt.call(this.toBase());for(var i=new Array(Ve.length),s=0;s<i.length;s++)i[s]=0;for(var a,c,u=0;u<this.numerator.length;u++)(a=k[this.numerator[u]])&&(c=Ve.indexOf(a[2]),c>=0&&(i[c]=i[c]+1));for(var d=0;d<this.denominator.length;d++)(a=k[this.denominator[d]])&&(c=Ve.indexOf(a[2]),c>=0&&(i[c]=i[c]-1));return i}var _t="[+-]",ze="\\d+",sr=_t+"?"+ze,bt="\\."+ze,nr="(?:"+ze+"(?:"+bt+")?)|(?:"+bt+")",ar="[Ee]"+sr,or="(?:"+nr+")(?:"+ar+")?",lr=_t+"?\\s*"+or,cr="("+lr+")?\\s*([^/]*)(?:/(.+))?",ur=new RegExp("^"+cr+"$"),yt="\\^|\\*{2}",vt="[01234]",dr=new RegExp("([^ \\*\\d]+?)(?:"+yt+")?(-?"+vt+"(?![a-zA-Z]))"),pr=new RegExp("([^ \\*\\d]+?)(?:"+yt+")?("+vt+"(?![a-zA-Z]))");function St(i){l(i)||(i=i.toString()),i=i.trim();var s=ur.exec(i);if(!s)throw new m(i+": Quantity not recognized");var a=s[1];a?(a=a.replace(/\s/g,""),this.scalar=parseFloat(a)):this.scalar=1;for(var c=s[2],u=s[3],d,C,v;s=dr.exec(c);){if(d=parseFloat(s[2]),isNaN(d))throw new m("Unit exponent is not a number");if(d===0&&!He.test(s[1]))throw new m("Unit not recognized");C=s[1]+" ",v="";for(var M=0;M<Math.abs(d);M++)v+=C;d>=0?c=c.replace(s[0],v):(u=u?u+v:v,c=c.replace(s[0],""))}for(;s=pr.exec(u);){if(d=parseFloat(s[2]),isNaN(d))throw new m("Unit exponent is not a number");if(d===0&&!He.test(s[1]))throw new m("Unit not recognized");C=s[1]+" ",v="";for(var I=0;I<d;I++)v+=C;u=u.replace(s[0],v)}c&&(this.numerator=Ct(c.trim())),u&&(this.denominator=Ct(u.trim()))}var mr=Object.keys(ye).sort(function(i,s){return s.length-i.length}).join("|"),hr=Object.keys(ee).sort(function(i,s){return s.length-i.length}).join("|"),fr="\\b|$",wt="("+mr+")??("+hr+")(?:"+fr+")",He=new RegExp("^\\s*("+wt+"[\\s\\*]*)+$"),gr=new RegExp(wt,"g"),kt={};function Ct(i){var s=kt[i];if(s)return s;var a,c=[];if(!He.test(i))throw new m("Unit not recognized");for(;a=gr.exec(i);)c.push(a.slice(1));return c=c.map(function(u){return ye[u[0]]?[ye[u[0]],ee[u[1]]]:[ee[u[1]]]}),c=c.reduce(function(u,d){return u.concat(d)},[]),c=c.filter(function(u){return u}),kt[i]=c,c}function _r(i){if(!l(i))throw new m("Argument should be a string");try{return this(i)}catch(s){return null}}function Se(i){return i instanceof h}function h(i,s){if(br.apply(null,arguments),!Se(this))return new h(i,s);if(this.scalar=null,this.baseScalar=null,this.signature=null,this._conversionCache={},this.numerator=T,this.denominator=T,Mt(i)?(this.scalar=i.scalar,this.numerator=i.numerator&&i.numerator.length!==0?i.numerator:T,this.denominator=i.denominator&&i.denominator.length!==0?i.denominator:T):s?(St.call(this,s),this.scalar=i):St.call(this,i),this.denominator.join("*").indexOf("temp")>=0)throw new m("Cannot divide with temperatures");if(this.numerator.join("*").indexOf("temp")>=0){if(this.numerator.length>1)throw new m("Cannot multiply by temperatures");if(!n(this.denominator,T))throw new m("Cannot divide with temperatures")}if(this.initValue=i,yr.call(this),this.isTemperature()&&this.baseScalar<0)throw new m("Temperatures must not be less than absolute zero")}h.prototype={constructor:h};function br(i,s){if(s){if(!(e(i)&&l(s)))throw new m("Only number accepted as initialization value when units are explicitly provided")}else if(!(l(i)||e(i)||Se(i)||Mt(i)))throw new m("Only string, number or quantity accepted as single initialization value")}function Mt(i){return i&&typeof i=="object"&&i.hasOwnProperty("scalar")}function yr(){if(this.baseScalar)return this.baseScalar;if(this.isBase())this.baseScalar=this.scalar,this.signature=rr.call(this);else{var i=this.toBase();this.baseScalar=i.scalar,this.signature=i.signature}}var Be={"-312078":"elastance","-312058":"resistance","-312038":"inductance","-152058":"potential","-152040":"magnetism","-152038":"magnetism","-7997":"specific_volume","-79":"snap","-59":"jolt","-39":"acceleration","-38":"radiation","-20":"frequency","-19":"speed","-18":"viscosity","-17":"volumetric_flow","-1":"wavenumber",0:"unitless",1:"length",2:"area",3:"volume",20:"time",400:"temperature",7941:"yank",7942:"power",7959:"pressure",7961:"force",7962:"energy",7979:"viscosity",7981:"momentum",7982:"angular_momentum",7997:"density",7998:"area_density",8e3:"mass",152020:"radiation_exposure",159999:"magnetism",16e4:"current",160020:"charge",312058:"conductance",312078:"capacitance",3199980:"activity",3199997:"molar_concentration",32e5:"substance",63999998:"illuminance",64e6:"luminous_power",128e7:"currency","25599999980":"information_rate","25600000000":"information","511999999980":"angular_velocity","512000000000":"angle"};function vr(){return r(Object.keys(Be).map(function(i){return Be[i]}))}h.prototype.kind=function(){return Be[this.signature.toString()]},o(h.prototype,{isDegrees:function(){return(this.signature===null||this.signature===400)&&this.numerator.length===1&&n(this.denominator,T)&&(this.numerator[0].match(/<temp-[CFRK]>/)||this.numerator[0].match(/<(kelvin|celsius|rankine|fahrenheit)>/))},isTemperature:function(){return this.isDegrees()&&this.numerator[0].match(/<temp-[CFRK]>/)}});function Sr(i,s){var a=i.units(),c=s.to(a),u=h(Ke(a));return h({scalar:i.scalar-c.scalar,numerator:u.numerator,denominator:u.denominator})}function wr(i,s){var a=s.to(Ke(i.units()));return h({scalar:i.scalar-a.scalar,numerator:i.numerator,denominator:i.denominator})}function Tt(i,s){var a=s.to(Ke(i.units()));return h({scalar:i.scalar+a.scalar,numerator:i.numerator,denominator:i.denominator})}function Ke(i){if(i==="tempK")return"degK";if(i==="tempC")return"degC";if(i==="tempF")return"degF";if(i==="tempR")return"degR";throw new m("Unknown type for temp conversion from: "+i)}function kr(i,s){var a=Cr(i),c=s.units(),u;if(c==="degK")u=a.scalar;else if(c==="degC")u=a.scalar;else if(c==="degF")u=a.scalar*9/5;else if(c==="degR")u=a.scalar*9/5;else throw new m("Unknown type for degree conversion to: "+c);return h({scalar:u,numerator:s.numerator,denominator:s.denominator})}function Cr(i){var s=i.units(),a;if(s.match(/(deg)[CFRK]/))a=i.baseScalar;else if(s==="tempK")a=i.scalar;else if(s==="tempC")a=i.scalar;else if(s==="tempF")a=i.scalar*5/9;else if(s==="tempR")a=i.scalar*5/9;else throw new m("Unknown type for temp conversion from: "+s);return h({scalar:a,numerator:["<kelvin>"],denominator:T})}function Mr(i,s){var a=s.units(),c;if(a==="tempK")c=i.baseScalar;else if(a==="tempC")c=i.baseScalar-273.15;else if(a==="tempF")c=i.baseScalar*9/5-459.67;else if(a==="tempR")c=i.baseScalar*9/5;else throw new m("Unknown type for temp conversion to: "+a);return h({scalar:c,numerator:s.numerator,denominator:s.denominator})}function Tr(i){var s=i.units(),a;if(s.match(/(deg)[CFRK]/))a=i.baseScalar;else if(s==="tempK")a=i.scalar;else if(s==="tempC")a=i.scalar+273.15;else if(s==="tempF")a=(i.scalar+459.67)*5/9;else if(s==="tempR")a=i.scalar*5/9;else throw new m("Unknown type for temp conversion from: "+s);return h({scalar:a,numerator:["<temp-K>"],denominator:T})}o(h.prototype,{to:function(i){var s,a;if(i==null)return this;if(!l(i))return this.to(i.units());if(s=this._conversionCache[i],s)return s;if(a=h(i),a.units()===this.units())return this;if(!this.isCompatible(a))this.isInverse(a)?a=this.inverse().to(i):S(this.units(),a.units());else if(a.isTemperature())a=Mr(this,a);else if(a.isDegrees())a=kr(this,a);else{var c=f(this.baseScalar,a.baseScalar);a=h({scalar:c,numerator:a.numerator,denominator:a.denominator})}return this._conversionCache[i]=a,a},toBase:function(){if(this.isBase())return this;if(this.isTemperature())return Tr(this);var i=Dt[this.units()];return i||(i=Or(this.numerator,this.denominator),Dt[this.units()]=i),i.mul(this.scalar)},toFloat:function(){if(this.isUnitless())return this.scalar;throw new m("Can't convert to Float unless unitless. Use Unit#scalar")},toPrec:function(i){if(l(i)&&(i=h(i)),e(i)&&(i=h(i+" "+this.units())),this.isUnitless()?i.isUnitless()||S(this.units(),i.units()):i=i.to(this.units()),i.scalar===0)throw new m("Divide by zero");var s=p(Math.round(this.scalar/i.scalar),i.scalar);return h(s+this.units())}});function Dr(i,s){var a=h(i),c=h(s);if(a.eq(c))return t;var u;return a.isTemperature()?u=function(d){return a.mul(d).to(c).scalar}:u=function(d){return d*a.baseScalar/c.baseScalar},function(C){var v,M,I;if(Array.isArray(C)){for(M=C.length,I=[],v=0;v<M;v++)I.push(u(C[v]));return I}else return u(C)}}var Dt={};function Or(i,s){for(var a=[],c=[],u=1,d,C=0;C<i.length;C++)d=i[C],U[d]?u=p(u,U[d]):E[d]&&(u*=E[d].scalar,E[d].numerator&&a.push(E[d].numerator),E[d].denominator&&c.push(E[d].denominator));for(var v=0;v<s.length;v++)d=s[v],U[d]?u/=U[d]:E[d]&&(u/=E[d].scalar,E[d].numerator&&c.push(E[d].numerator),E[d].denominator&&a.push(E[d].denominator));return a=a.reduce(function(M,I){return M.concat(I)},[]),c=c.reduce(function(M,I){return M.concat(I)},[]),h({scalar:u,numerator:a,denominator:c})}h.parse=_r,h.getUnits=tr,h.getAliases=ir,h.mulSafe=p,h.divSafe=f,h.getKinds=vr,h.swiftConverter=Dr,h.Error=m,o(h.prototype,{add:function(i){if(l(i)&&(i=h(i)),this.isCompatible(i)||S(this.units(),i.units()),this.isTemperature()&&i.isTemperature())throw new m("Cannot add two temperatures");return this.isTemperature()?Tt(this,i):i.isTemperature()?Tt(i,this):h({scalar:this.scalar+i.to(this).scalar,numerator:this.numerator,denominator:this.denominator})},sub:function(i){if(l(i)&&(i=h(i)),this.isCompatible(i)||S(this.units(),i.units()),this.isTemperature()&&i.isTemperature())return Sr(this,i);if(this.isTemperature())return wr(this,i);if(i.isTemperature())throw new m("Cannot subtract a temperature from a differential degree unit");return h({scalar:this.scalar-i.to(this).scalar,numerator:this.numerator,denominator:this.denominator})},mul:function(i){if(e(i))return h({scalar:p(this.scalar,i),numerator:this.numerator,denominator:this.denominator});if(l(i)&&(i=h(i)),(this.isTemperature()||i.isTemperature())&&!(this.isUnitless()||i.isUnitless()))throw new m("Cannot multiply by temperatures");var s=this,a=i;s.isCompatible(a)&&s.signature!==400&&(a=a.to(s));var c=Ot(s.numerator,s.denominator,a.numerator,a.denominator);return h({scalar:p(s.scalar,a.scalar,c[2]),numerator:c[0],denominator:c[1]})},div:function(i){if(e(i)){if(i===0)throw new m("Divide by zero");return h({scalar:this.scalar/i,numerator:this.numerator,denominator:this.denominator})}else l(i)&&(i=h(i));if(i.scalar===0)throw new m("Divide by zero");if(i.isTemperature())throw new m("Cannot divide with temperatures");if(this.isTemperature()&&!i.isUnitless())throw new m("Cannot divide with temperatures");var s=this,a=i;s.isCompatible(a)&&s.signature!==400&&(a=a.to(s));var c=Ot(s.numerator,s.denominator,a.denominator,a.numerator);return h({scalar:p(s.scalar,c[2])/a.scalar,numerator:c[0],denominator:c[1]})},inverse:function(){if(this.isTemperature())throw new m("Cannot divide with temperatures");if(this.scalar===0)throw new m("Divide by zero");return h({scalar:1/this.scalar,numerator:this.denominator,denominator:this.numerator})}});function Ot(i,s,a,c){function u(N){return N!==Z}i=i.filter(u),a=a.filter(u),s=s.filter(u),c=c.filter(u);var d={};function C(N,Y){for(var F,we,Ge,X=0;X<N.length;X++)if(U[N[X]]?(F=N[X+1],we=N[X],Ge=U[we],X++):(F=N[X],we=null,Ge=1),F&&F!==Z)if(d[F]){d[F][0]+=Y;var Ar=d[F][2]?U[d[F][2]]:1;d[F][Y===1?3:4]*=f(Ge,Ar)}else d[F]=[Y,F,we,1,1]}C(i,1),C(s,-1),C(a,1),C(c,-1);var v=[],M=[],I=1;for(var It in d)if(d.hasOwnProperty(It)){var D=d[It],te;if(D[0]>0)for(te=0;te<D[0];te++)v.push(D[2]===null?D[1]:[D[2],D[1]]);else if(D[0]<0)for(te=0;te<-D[0];te++)M.push(D[2]===null?D[1]:[D[2],D[1]]);I*=f(D[3],D[4])}return v.length===0&&(v=T),M.length===0&&(M=T),v=v.reduce(function(N,Y){return N.concat(Y)},[]),M=M.reduce(function(N,Y){return N.concat(Y)},[]),[v,M,I]}o(h.prototype,{eq:function(i){return this.compareTo(i)===0},lt:function(i){return this.compareTo(i)===-1},lte:function(i){return this.eq(i)||this.lt(i)},gt:function(i){return this.compareTo(i)===1},gte:function(i){return this.eq(i)||this.gt(i)},compareTo:function(i){if(l(i))return this.compareTo(h(i));if(this.isCompatible(i)||S(this.units(),i.units()),this.baseScalar<i.baseScalar)return-1;if(this.baseScalar===i.baseScalar)return 0;if(this.baseScalar>i.baseScalar)return 1},same:function(i){return this.scalar===i.scalar&&this.units()===i.units()}}),o(h.prototype,{isUnitless:function(){return[this.numerator,this.denominator].every(function(i){return n(i,T)})},isCompatible:function(i){return l(i)?this.isCompatible(h(i)):Se(i)&&i.signature!==void 0?this.signature===i.signature:!1},isInverse:function(i){return this.inverse().isCompatible(i)},isBase:function(){return this._isBase!==void 0?this._isBase:this.isDegrees()&&this.numerator[0].match(/<(kelvin|temp-K)>/)?(this._isBase=!0,this._isBase):(this.numerator.concat(this.denominator).forEach(function(i){i!==Z&&W.indexOf(i)===-1&&(this._isBase=!1)},this),this._isBase===!1?this._isBase:(this._isBase=!0,this._isBase))}});function je(){}je.prototype.get=function(i){return arguments.length>1&&(i=Array.apply(null,arguments)),i.reduce(function(s,a,c){if(s){var u=s[a];return c===i.length-1?u?u.data:void 0:u}},this)},je.prototype.set=function(i,s){return arguments.length>2&&(i=Array.prototype.slice.call(arguments,0,-1),s=arguments[arguments.length-1]),i.reduce(function(a,c,u){var d=a[c];return d===void 0&&(d=a[c]={}),u===i.length-1?(d.data=s,s):d},this)};function xr(i,s){return(i+" "+s).trim()}h.formatter=xr,o(h.prototype,{units:function(){if(this._units!==void 0)return this._units;var i=n(this.numerator,T),s=n(this.denominator,T);if(i&&s)return this._units="",this._units;var a=Et(this.numerator),c=Et(this.denominator);return this._units=a+(s?"":"/"+c),this._units},toString:function(i,s){var a;if(e(i))a=this.units(),s=i;else if(l(i))a=i;else if(Se(i))return this.toPrec(i).toString(s);var c=this.to(a),u=s!==void 0?y(c.scalar,s):c.scalar;return c=(u+" "+c.units()).trim(),c},format:function(i,s){arguments.length===1&&typeof i=="function"&&(s=i,i=void 0),s=s||h.formatter;var a=this.to(i);return s.call(this,a.scalar,a.units())}});var xt=new je;function Et(i){var s=xt.get(i);if(s)return s;var a=n(i,T);return a?s="1":s=Ir(Er(i)).join("*"),xt.set(i,s),s}function Er(i){for(var s=[],a,c,u=0;u<i.length;u++)a=i[u],c=i[u+1],U[a]?(s.push(ve[a]+ve[c]),u++):s.push(ve[a]);return s}function Ir(i){var s=i.reduce(function(a,c){var u=a[c];return u||a.push(u=a[c]=[c,0]),u[1]++,a},[]);return s.map(function(a){return a[0]+(a[1]>1?a[1]:"")})}return h.version="1.8.0",h})});var Nr={url:"",deserializer:l=>JSON.parse(l.data),serializer:l=>JSON.stringify(l)},Fr="WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }",Le=class l extends Pt{constructor(b,e){if(super(),this._socket=null,b instanceof Ye)this.destination=e,this.source=b;else{let t=this._config=Object.assign({},Nr);if(this._output=new w,typeof b=="string")t.url=b;else for(let r in b)b.hasOwnProperty(r)&&(t[r]=b[r]);if(!t.WebSocketCtor&&WebSocket)t.WebSocketCtor=WebSocket;else if(!t.WebSocketCtor)throw new Error("no WebSocket constructor can be found");this.destination=new ie}}lift(b){let e=new l(this._config,this.destination);return e.operator=b,e.source=this,e}_resetState(){this._socket=null,this.source||(this.destination=new ie),this._output=new w}multiplex(b,e,t){let r=this;return new Ye(n=>{try{r.next(b())}catch(p){n.error(p)}let o=r.subscribe({next:p=>{try{t(p)&&n.next(p)}catch(f){n.error(f)}},error:p=>n.error(p),complete:()=>n.complete()});return()=>{try{r.next(e())}catch(p){n.error(p)}o.unsubscribe()}})}_connectSocket(){let{WebSocketCtor:b,protocol:e,url:t,binaryType:r}=this._config,n=this._output,o=null;try{o=e?new b(t,e):new b(t),this._socket=o,r&&(this._socket.binaryType=r)}catch(f){n.error(f);return}let p=new At(()=>{this._socket=null,o&&o.readyState===1&&o.close()});o.onopen=f=>{let{_socket:y}=this;if(!y){o.close(),this._resetState();return}let{openObserver:R}=this._config;R&&R.next(f);let m=this.destination;this.destination=Rt.create(S=>{if(o.readyState===1)try{let{serializer:k}=this._config;o.send(k(S))}catch(k){this.destination.error(k)}},S=>{let{closingObserver:k}=this._config;k&&k.next(void 0),S&&S.code?o.close(S.code,S.reason):n.error(new TypeError(Fr)),this._resetState()},()=>{let{closingObserver:S}=this._config;S&&S.next(void 0),o.close(),this._resetState()}),m&&m instanceof ie&&p.add(m.subscribe(this.destination))},o.onerror=f=>{this._resetState(),n.error(f)},o.onclose=f=>{o===this._socket&&this._resetState();let{closeObserver:y}=this._config;y&&y.next(f),f.wasClean?n.complete():n.error(f)},o.onmessage=f=>{try{let{deserializer:y}=this._config;n.next(y(f))}catch(y){n.error(y)}}}_subscribe(b){let{source:e}=this;return e?e.subscribe(b):(this._socket||this._connectSocket(),this._output.subscribe(b),b.add(()=>{let{_socket:t}=this;this._output.observers.length===0&&(t&&(t.readyState===1||t.readyState===0)&&t.close(),this._resetState())}),b)}unsubscribe(){let{_socket:b}=this;b&&(b.readyState===1||b.readyState===0)&&b.close(),this._resetState(),super.unsubscribe()}};function dt(l){return new Le(l)}var Li=(()=>{class l{_destroyRef=g(Me);_skRequests$=new w;_skNotificationsMsg$=new w;_skValue$=new w;_skMetadata$=new w;_vesselSelfUrn$=new w;_selfUrn=void 0;streamEndpoint={operation:0,message:"Not connected",hasToken:!1};streamEndpoint$=new L(this.streamEndpoint);endpointWS=null;SubscriptionType="self";WS_CONNECTION_SUBSCRIBE="?subscribe=";WS_CONNECTION_META="&sendMeta=all";socketWS$;socketWSCloseEvent$=new w;socketWSOpenEvent$=new w;authToken=null;server=g(si);auth=g(ni);connectionStateMachine=g(ri);zones=g(De);FLATTEN_CONFIG={maxDepth:3,maxObjectSize:20,enableFlattening:!0};DO_NOT_FLATTEN_PATHS=["displays."];constructor(){this.connectionStateMachine.setWebSocketRetryCallback(()=>{console.log("[Delta Service] Executing WebSocket retry via callback"),this.retryWebSocketConnection()}),this.server.serverServiceEndpoint$.pipe(x(this._destroyRef)).subscribe(e=>{e.operation===2&&(this.endpointWS=e.WsServiceUrl,e.subscribeAll?this.SubscriptionType="all":this.SubscriptionType="self")}),this.connectionStateMachine.state$.pipe(x(this._destroyRef)).subscribe(e=>{switch(e){case Q.WebSocketConnecting:this.handleWebSocketConnecting();break;case Q.Connected:break;case Q.Disconnected:case Q.WebSocketError:case Q.PermanentFailure:this.handleDisconnection();break}}),this.auth.authToken$.pipe(x(this._destroyRef)).subscribe(e=>{this.authToken!=e&&(this.authToken=e,this.socketWS$&&this.connectionStateMachine.isFullyConnected()&&(this.closeWS("Token changed"),this.connectionStateMachine.startWebSocketConnection()))}),this.socketWSOpenEvent$.pipe(x(this._destroyRef)).subscribe(()=>{this.streamEndpoint.message="Connected",this.streamEndpoint.operation=2,this.authToken?console.log("[Delta Service] WebSocket connected with Authorization Token"):console.log("[Delta Service] WebSocket connected without Authorization Token"),this.streamEndpoint$.next(this.streamEndpoint),this.connectionStateMachine.onWebSocketConnected()}),this.socketWSCloseEvent$.pipe(x(this._destroyRef)).subscribe(e=>{e.wasClean?(console.log("[Delta Service] WebSocket closed cleanly"),this.streamEndpoint.message="WebSocket closed",this.streamEndpoint.operation=0):(console.log("[Delta Service] WebSocket terminated due to socket error"),this.streamEndpoint.message="WebSocket error",this.streamEndpoint.operation=3,this.connectionStateMachine.onWebSocketError("WebSocket connection lost")),this.streamEndpoint$.next(this.streamEndpoint)}),Ut(document,"visibilitychange").pipe(x(this._destroyRef)).subscribe(()=>{document.visibilityState==="visible"?(console.log("[Delta Service] App resumed, checking WebSocket connection..."),this.checkAndReconnect("App resumed")):document.visibilityState==="hidden"&&console.log("[Delta Service] App suspended")})}connectWS(e){this.streamEndpoint.message="Connecting",this.streamEndpoint.operation=1,console.log(`[Delta Service] ${e}: WebSocket opening...`),this.streamEndpoint$.next(this.streamEndpoint),this.socketWS$=this.getNewWebSocket(),this.zones.runOutsideAngular(()=>{this.socketWS$.pipe(x(this._destroyRef)).subscribe({next:t=>this.processWebsocketMessage(t),error:t=>{console.error("[Delta Service] WebSocket error:",t)}})})}retryWebSocketConnection(){if(console.log("[Delta Service] Retrying WebSocket connection"),!this.endpointWS){console.warn("[Delta Service] No WebSocket endpoint available for retry"),this.connectionStateMachine.onWebSocketError("No WebSocket endpoint available");return}this.socketWS$&&this.closeWS("Retrying connection"),this.connectWS("WebSocket retry attempt")}handleWebSocketConnecting(){if(!this.endpointWS){console.warn("[Delta Service] No WebSocket endpoint available"),this.connectionStateMachine.onWebSocketError("No WebSocket endpoint available");return}this.socketWS$&&this.closeWS("Starting new connection"),this.connectWS("ConnectionStateMachine request")}handleDisconnection(){this.socketWS$&&this.closeWS("ConnectionStateMachine disconnection"),this.streamEndpoint.message="Not connected",this.streamEndpoint.operation=0,this.streamEndpoint$.next(this.streamEndpoint)}getNewWebSocket(){let e=this.WS_CONNECTION_SUBSCRIBE+this.SubscriptionType+this.WS_CONNECTION_META;return this.authToken!=null?(e+="&token="+this.authToken.token,this.streamEndpoint.hasToken=!0):this.streamEndpoint.hasToken=!1,dt({url:this.endpointWS+e,closeObserver:this.socketWSCloseEvent$,openObserver:this.socketWSOpenEvent$})}closeWS(e){this.socketWS$&&(this.streamEndpoint.operation=4,console.log("[Delta Service] "+e+": WebSocket closing..."),this.socketWS$.complete())}publishDelta(e){this.socketWS$?(console.log("[Delta Service] WebSocket sending message"),this.socketWS$.next(e)):console.log("[Delta Service] No WebSocket present to send message - dropping message")}processWebsocketMessage(e){if(e.updates){this.parseUpdates(e.updates,e.context);return}if(e.requestId){this._skRequests$.next(e);return}if(e.errorMessage){console.warn("[Delta Service] Service received stream error message: "+e.errorMessage);return}if(e.self){this._selfUrn=e.self,this._vesselSelfUrn$.next(e.self),this.server.setServerInfo(e.name,e.version,e.roles);return}console.warn("[Delta Service] Unknown message type. Message content:"+e)}parseUpdates(e,t){e.forEach(r=>{r.meta!==void 0&&r.meta.forEach(n=>this.parseSkMeta(n,t)),r.values!==void 0&&r.values.forEach(n=>{if(n.path.startsWith("notifications."))this._skNotificationsMsg$.next(n);else if(typeof n.value=="object"&&n.value!==null)if(this.DO_NOT_FLATTEN_PATHS.some(o=>n.path.includes(o))){let o={context:t,path:n.path,source:r.$source,timestamp:r.timestamp,value:n.value};this._skValue$.next(o)}else this.FLATTEN_CONFIG.enableFlattening&&this.canFlattenCompletely(n.value,this.FLATTEN_CONFIG.maxDepth,this.FLATTEN_CONFIG.maxObjectSize)?this.flattenObjectValue(n.value,n.path).forEach(p=>{let f={context:t,path:p.path,source:r.$source,timestamp:r.timestamp,value:p.value};this._skValue$.next(f)}):Object.keys(n.value).forEach(o=>{let p={context:t,path:`${n.path}.${o}`,source:r.$source,timestamp:r.timestamp,value:n.value[o]};this._skValue$.next(p)});else{let o={context:t,path:n.path,source:r.$source,timestamp:r.timestamp,value:n.value};this._skValue$.next(o)}})})}canFlattenCompletely(e,t,r,n=0){if(n>=t)return!1;if(typeof e!="object"||e===null)return!0;let o=Object.keys(e);if(o.length>r)return!1;for(let p of o)if(!this.canFlattenCompletely(e[p],t,r,n+1))return!1;return!0}flattenObjectValue(e,t,r=0){let n=[];if(typeof e!="object"||e===null||r>=this.FLATTEN_CONFIG.maxDepth)return[{path:t,value:e}];let o=Object.keys(e);for(let p of o){let f=t?`${t}.${p}`:p,y=this.flattenObjectValue(e[p],f,r+1);n.push(...y)}return n}parseSkMeta(e,t){e.value.properties!==void 0?Object.keys(e.value.properties).forEach(r=>{this._skMetadata$.next({context:t,path:`${e.path}.${r}`,meta:e.value.properties[r]})}):this._skMetadata$.next({context:t,path:e.path,meta:e.value})}getDataStreamStatusAsO(){return this.streamEndpoint$.asObservable()}subscribeRequestUpdates(){return this._skRequests$.asObservable()}subscribeNotificationsUpdates(){return this._skNotificationsMsg$.asObservable()}subscribeDataPathsUpdates(){return this._skValue$.asObservable()}subscribeMetadataUpdates(){return this._skMetadata$.asObservable()}subscribeSelfUpdates(){return this._vesselSelfUrn$.asObservable()}checkAndReconnect(e){this.connectionStateMachine.isFullyConnected()?console.log(`[Delta Service] ${e}: Connection is active.`):this.connectionStateMachine.isHTTPConnected()&&this.connectionStateMachine.currentState!==Q.WebSocketRetrying?(console.log(`[Delta Service] ${e}: WebSocket disconnected, requesting reconnection...`),this.connectionStateMachine.startWebSocketConnection()):console.log(`[Delta Service] ${e}: HTTP not connected, cannot start WebSocket`)}ngOnDestroy(){this.closeWS("App terminated"),this._skRequests$.complete(),this._skNotificationsMsg$.complete(),this._skValue$.complete(),this._skMetadata$.complete(),this._vesselSelfUrn$.complete(),this.streamEndpoint$.complete(),this.socketWSOpenEvent$.complete(),this.socketWSCloseEvent$.complete(),this.socketWS$?.complete()}static \u0275fac=function(t){return new(t||l)};static \u0275prov=re({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();var le=(function(l){return l.Normal="normal",l.Nominal="nominal",l.Alert="alert",l.Warn="warn",l.Alarm="alarm",l.Emergency="emergency",l})(le||{});var Wr=(function(l){return l.Visual="visual",l.Sound="sound",l})(Wr||{});var Ur="self",$i=l=>isFinite(+(l instanceof Date?l:new Date(l)))?!!new RegExp("^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(.[0-9]+)?(([Zz])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))$").test(l):!1,qi=l=>{if(l)return l==="RFC 3339 (UTC)"?"Date":"number"},Vi=(()=>{class l{delta=g(Li);_destroyRef=g(Me);_deltaUpdatesCounter=0;_deltaUpdatesSubject=new ie(10);_isSkDataFullTreeActive=!1;_skDataSubject$=new L([]);_dataServiceMeta=[];_isSkMetaFullTreeActive=!1;_dataServiceMetaSubject$=new L([]);_skNotificationMsg$=new w;_skNotificationMeta$=new w;_isReset=new w;_selfUrn="self";_skData=[];_pathRegister=[];constructor(){Lt(1e3).pipe(x(this._destroyRef)).subscribe(()=>{let e={timestamp:Date.now(),value:this._deltaUpdatesCounter};this._deltaUpdatesSubject.next(e),this._deltaUpdatesCounter=0}),this.delta.subscribeDataPathsUpdates().pipe(x(this._destroyRef)).subscribe(e=>{this.updatePathData(e)}),this.delta.subscribeMetadataUpdates().pipe(x(this._destroyRef)).subscribe(e=>{this.setMeta(e)}),this.delta.subscribeNotificationsUpdates().pipe(x(this._destroyRef)).subscribe(e=>{let t=e.path.replace("notifications.","self."),r=this._skData.find(n=>n.path==t);if(r&&r.state!==e.value.state){r.state=e.value.state;let n=this._pathRegister.find(o=>o.path==t);n&&n._pathState$.next(r.state)}this._skNotificationMsg$.next(e)}),this.delta.subscribeSelfUpdates().pipe(x(this._destroyRef)).subscribe(e=>{this.setSelfUrn(e)})}getSignalkDeltaUpdateStatistics(){return this._deltaUpdatesSubject.asObservable()}resetSignalKData(){this._skData=[],this._selfUrn="self",this._isReset.next(!0)}unsubscribePath(e){let t=this._pathRegister.findIndex(r=>r.path===e);if(t!==-1){let r=this._pathRegister[t];r.combinedSub?.unsubscribe(),r._pathData$?.complete(),r._pathState$?.complete(),r.pathDataUpdate$?.complete(),r.pathMeta$?.complete(),this._pathRegister.splice(t,1)}}subscribePath(e,t){let r=this._pathRegister.find(W=>W.path===e&&W.source===t);if(r)return r.pathDataUpdate$;let n=null,o=null,p=null,f=le.Normal,y={data:{value:null,timestamp:null},state:f},R=null,m=this._skData.find(W=>W.path==e);this._skData.length&&m&&(n=t==="default"?m.pathValue:m.sources?.[t]?.sourceValue??null,o=t==="default"?m.pathTimestamp:m.sources?.[t]?.sourceTimestamp??null,p=o?new Date(o):null,y={data:{value:n,timestamp:p},state:m.state||f},f=m.state||f,R=m.meta||null);let S={path:e,source:t,_pathData$:new L(y.data),_pathState$:new L(y.state),pathDataUpdate$:new L(y),pathMeta$:new L(R?ge(R):null)},k=Ft([S._pathData$,S._pathState$]).pipe(ue(([W,Z])=>({data:W,state:Z})));return S.combinedSub=k.subscribe(W=>S.pathDataUpdate$.next(W)),this._pathRegister.push(S),S.pathDataUpdate$}updatePathData(e){this._deltaUpdatesCounter++;let t=this.setPathContext(e.context,e.path),r=this._skData.find(o=>o.path==t);if(r)r.defaultSource===void 0&&(r.defaultSource=e.source),r.type===void 0&&e.value!==null&&(r.type=typeof e.value,r.type==="string"&&$i(e.value)&&(r.type="Date")),r.pathValue=e.value,r.pathTimestamp=e.timestamp,r.sources[e.source]={sourceTimestamp:e.timestamp,sourceValue:e.value};else{let o=typeof e.value;o==="string"&&$i(e.value)&&(o="Date"),r={path:t,pathValue:e.value,pathTimestamp:e.timestamp,defaultSource:e.source,type:o,state:le.Normal,sources:{[e.source]:{sourceTimestamp:e.timestamp,sourceValue:e.value}}},this._skData.push(r)}let n=this._pathRegister.filter(o=>o.path===t);if(n.length){let o={value:r.pathValue,timestamp:new Date(r.pathTimestamp)},p=n.find(y=>y.source==="default");p&&p._pathData$.next(o);let f=n.find(y=>y.source===e.source);f&&f._pathData$.next(o)}this._isSkDataFullTreeActive&&this._skDataSubject$.next(this._skData)}setMeta(e){if(e.path.startsWith("notifications."))this._skNotificationMeta$.next(e);else{let t=this.setPathContext(e.context,e.path),r=this._skData.find(o=>o.path===t);r?(r.type==="object"&&e.meta.units&&(r.type=qi(e.meta.units)),r.meta=ii({},r.meta,e.meta)):(r={path:t,pathValue:void 0,pathTimestamp:void 0,type:qi(e.meta.units),state:le.Normal,defaultSource:void 0,sources:{},meta:e.meta?ge(e.meta):null},this._skData.push(r));let n=this._pathRegister.find(o=>o.path===t);n&&n.pathMeta$.next(r.meta?ge(r.meta):null),this._isSkMetaFullTreeActive&&(this._dataServiceMeta.push({path:t,meta:r.meta}),this._dataServiceMetaSubject$.next(this._dataServiceMeta))}}startSkMetaFullTree(){return this._isSkMetaFullTreeActive=!0,this._dataServiceMeta=this._skData.filter(e=>e.meta!==void 0&&e.path.startsWith("self.")).map(e=>({path:e.path,meta:e.meta})),this._dataServiceMetaSubject$.next(this._dataServiceMeta),this._dataServiceMetaSubject$}stopSkMetaFullTree(){this._isSkMetaFullTreeActive=!1,this._dataServiceMetaSubject$.next(null),this._dataServiceMeta=null}startSkDataFullTree(){return this._isSkDataFullTreeActive=!0,this._skDataSubject$.next(this._skData),this._skDataSubject$}stopSkDataFullTree(){this._isSkDataFullTreeActive=!1}setSelfUrn(e){e!==""&&e!==null?(console.debug("[Signal K Data Service] Setting self to: "+e),this._selfUrn=e):console.error("[Signal K Data Service] Invalid self URN: "+e)}setPathContext(e,t){return e!==this._selfUrn?`${e}.${t}`:`${Ur}.${t}`}getPathsByType(e,t){return this._skData.filter(r=>r.type===e&&(!t||r.path.startsWith("self"))).map(r=>r.path)}getPathsAndMetaByType(e,t=!1,r=!1,n=!0){return this._skData.filter(o=>{let f=["string","number","boolean","object","undefined","function","symbol","bigint","Date"].includes(e)?o.type===e:o.meta?.type===e,y=!n||o.path.startsWith("self"),R=t===!0?o.meta?.supportsPut===!0:!0,m=r===!0?Array.isArray(o.meta?.zones)&&o.meta.zones.length>0:!0;return f&&y&&R&&m}).map(o=>({path:o.path,meta:o.meta}))}getPathObject(e){return ge(this._skData.find(t=>t.path===e))||null}getPathUnitType(e){return this._skData.find(t=>t.path===e)?.meta?.units||null}timeoutPathObservable(e,t){let r=this._pathRegister.find(n=>n.path==e);if(r){let n;["string","Date","number","multiple"].includes(t)&&(n={data:{value:null,timestamp:null},state:le.Normal}),r.pathDataUpdate$.next(n)}}getNotificationMsgObservable(){return this._skNotificationMsg$.asObservable()}getNotificationMetaObservable(){return this._skNotificationMeta$.asObservable()}getPathMetaObservable(e){return this._pathRegister.find(r=>r.path==e)?.pathMeta$.asObservable()||Nt(null)}getPathMeta(e){return this._skData.find(t=>t.path===e)?.meta||null}isResetService(){return this._isReset.asObservable()}ngOnDestroy(){this._deltaUpdatesSubject?.complete(),this._skNotificationMsg$?.complete(),this._skNotificationMeta$?.complete(),this._isReset?.complete(),this._skDataSubject$?.complete(),this._dataServiceMetaSubject$?.complete()}static \u0275fac=function(t){return new(t||l)};static \u0275prov=re({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();var _=Pr(zi());var Us=(()=>{class l{AppSettingsService=g(ai);data=g(Vi);_defaultUnitsSub;_conversionList=[{group:"Unitless",units:[{measure:"unitless",description:"As-Is numeric value"},{measure:" ",description:"No unit label - As-Is numeric value"}]},{group:"Speed",units:[{measure:"knots",description:"Knots - Nautical miles per hour"},{measure:"kph",description:"kph - Kilometers per hour"},{measure:"mph",description:"mph - Miles per hour"},{measure:"m/s",description:"m/s - Meters per second (base)"}]},{group:"Flow",units:[{measure:"m3/s",description:"Cubic meters per second (base)"},{measure:"l/min",description:"Liters per minute"},{measure:"l/h",description:"Liters per hour"},{measure:"g/min",description:"Gallons per minute"},{measure:"g/h",description:"Gallons per hour"}]},{group:"Fuel Distance",units:[{measure:"m/m3",description:"Meters per cubic meter (base)"},{measure:"nm/l",description:"Nautical Miles per liter"},{measure:"nm/g",description:"Nautical Miles per gallon"},{measure:"km/l",description:"Kilometers per liter"},{measure:"mpg",description:"Miles per Gallon"}]},{group:"Energy Distance",units:[{measure:"m/J",description:"Meters per Joule (base)"},{measure:"nm/J",description:"Nautical Miles per Joule"},{measure:"km/J",description:"Kilometers per Joule"},{measure:"nm/kWh",description:"Nautical Miles per Kilowatt-hour"},{measure:"km/kWh",description:"Kilometers per Kilowatt-hour"}]},{group:"Temperature",units:[{measure:"K",description:"Kelvin (base)"},{measure:"celsius",description:"Celsius"},{measure:"fahrenheit",description:"Fahrenheit"}]},{group:"Length",units:[{measure:"m",description:"Meters (base)"},{measure:"mm",description:"Millimeters"},{measure:"fathom",description:"Fathoms"},{measure:"nm",description:"Nautical Miles"},{measure:"km",description:"Kilometers"},{measure:"mi",description:"Miles"},{measure:"feet",description:"Feet"},{measure:"inch",description:"Inches"}]},{group:"Volume",units:[{measure:"liter",description:"Liters (base)"},{measure:"m3",description:"Cubic Meters"},{measure:"gallon",description:"Gallons"}]},{group:"Current",units:[{measure:"A",description:"Amperes (base)"},{measure:"mA",description:"Milliamperes"}]},{group:"Potential",units:[{measure:"V",description:"Volts (base)"},{measure:"mV",description:"Millivolts"}]},{group:"Charge",units:[{measure:"C",description:"Coulomb (base)"},{measure:"Ah",description:"Ampere*Hours"}]},{group:"Power",units:[{measure:"W",description:"Watts (base)"},{measure:"mW",description:"Milliwatts"}]},{group:"Energy",units:[{measure:"J",description:"Joules (base)"},{measure:"kWh",description:"Kilowatt*Hours"}]},{group:"Resistance",units:[{measure:"ohm",description:"\u2126 (base)"},{measure:"kiloohm",description:"k\u2126"}]},{group:"Pressure",units:[{measure:"Pa",description:"Pa (base)"},{measure:"kPa",description:"kPa"},{measure:"hPa",description:"hPa"},{measure:"mbar",description:"mbar"},{measure:"bar",description:"Bars"},{measure:"psi",description:"psi"},{measure:"mmHg",description:"mmHg"},{measure:"inHg",description:"inHg"}]},{group:"Density",units:[{measure:"kg/m3",description:"Air density - kg/cubic meter (base)"}]},{group:"Time",units:[{measure:"s",description:"Seconds (base)"},{measure:"Minutes",description:"Minutes"},{measure:"Hours",description:"Hours"},{measure:"Days",description:"Days"},{measure:"D HH:MM:SS",description:"Day Hour:Minute:sec"}]},{group:"Angular Velocity",units:[{measure:"rad/s",description:"Radians per second (base)"},{measure:"deg/s",description:"Degrees per second"},{measure:"deg/min",description:"Degrees per minute"}]},{group:"Angle",units:[{measure:"rad",description:"Radians (base)"},{measure:"deg",description:"Degrees"},{measure:"grad",description:"Gradians"}]},{group:"Frequency",units:[{measure:"rpm",description:"RPM - Rotations per minute"},{measure:"Hz",description:"Hz - Hertz (base)"},{measure:"KHz",description:"KHz - Kilohertz"},{measure:"MHz",description:"MHz - Megahertz"},{measure:"GHz",description:"GHz - Gigahertz"}]},{group:"Ratio",units:[{measure:"percent",description:"As percentage value"},{measure:"percentraw",description:"As ratio 0-1 with % sign"},{measure:"ratio",description:"Ratio 0-1 (base)"}]},{group:"Position",units:[{measure:"pdeg",description:"Position Degrees"},{measure:"latitudeMin",description:"Latitude in minutes"},{measure:"latitudeSec",description:"Latitude in seconds"},{measure:"longitudeMin",description:"Longitude in minutes"},{measure:"longitudeSec",description:"Longitude in seconds"}]}];skBaseUnits=[{unit:"s",properties:{display:"s",quantity:"Time",quantityDisplay:"t",description:"Elapsed time (interval) in seconds"}},{unit:"Hz",properties:{display:"Hz",quantity:"Frequency",quantityDisplay:"f",description:"Frequency in Hertz"}},{unit:"m3",properties:{display:"m\xB3",quantity:"Volume",quantityDisplay:"V",description:"Volume in cubic meters"}},{unit:"m3/s",properties:{display:"m\xB3/s",quantity:"Flow",quantityDisplay:"Q",description:"Liquid or gas flow in cubic meters per second"}},{unit:"kg/s",properties:{display:"kg/s",quantity:"Mass flow rate",quantityDisplay:"\u1E41",description:"Liquid or gas flow in kilograms per second"}},{unit:"kg/m3",properties:{display:"kg/m\xB3",quantity:"Density",quantityDisplay:"\u03C1",description:"Density in kg per cubic meter"}},{unit:"deg",properties:{display:"Position",quantity:"Angle",quantityDisplay:"\u2220",description:"Latitude or longitude in decimal degrees"}},{unit:"rad",properties:{display:"\xB0",quantity:"Angle",quantityDisplay:"\u2220",description:"Angular arc in radians"}},{unit:"rad/s",properties:{display:"\u33AD/s",quantity:"Rotation",quantityDisplay:"\u03C9",description:"Angular rate in radians per second"}},{unit:"A",properties:{display:"A",quantity:"Current",quantityDisplay:"I",description:"Electrical current in ampere"}},{unit:"C",properties:{display:"C",quantity:"Charge",quantityDisplay:"Q",description:"Electrical charge in Coulomb"}},{unit:"V",properties:{display:"V",quantity:"Voltage",quantityDisplay:"V",description:"Electrical potential in volt"}},{unit:"W",properties:{display:"W",quantity:"Power",quantityDisplay:"P",description:"Power in watt"}},{unit:"Nm",properties:{display:"Nm",quantity:"Torque",quantityDisplay:"\u03C4",description:"Torque in Newton meter"}},{unit:"J",properties:{display:"J",quantity:"Energy",quantityDisplay:"E",description:"Electrical energy in joule"}},{unit:"ohm",properties:{display:"\u2126",quantity:"Resistance",quantityDisplay:"R",description:"Electrical resistance in ohm"}},{unit:"m",properties:{display:"m",quantity:"Distance",quantityDisplay:"d",description:"Distance in meters"}},{unit:"m/s",properties:{display:"m/s",quantity:"Speed",quantityDisplay:"v",description:"Speed in meters per second"}},{unit:"m2",properties:{display:"\u33A1",quantity:"Area",quantityDisplay:"A",description:"(Surface) area in square meters"}},{unit:"K",properties:{display:"K",quantity:"Temperature",quantityDisplay:"T",description:"Temperature in kelvin"}},{unit:"Pa",properties:{display:"Pa",quantity:"Pressure",quantityDisplay:"P",description:"Pressure in pascal"}},{unit:"kg",properties:{display:"kg",quantity:"Mass",quantityDisplay:"m",description:"Mass in kilogram"}},{unit:"ratio",properties:{display:"",quantity:"Ratio",quantityDisplay:"\u03C6",description:"Relative value compared to reference or normal value. 0 = 0%, 1 = 100%, 1e-3 = 1 ppt"}},{unit:"m/s2",properties:{display:"m/s\xB2",quantity:"Acceleration",quantityDisplay:"a",description:"Acceleration in meters per second squared"}},{unit:"rad/s2",properties:{display:"rad/s\xB2",quantity:"Angular acceleration",quantityDisplay:"a",description:"Angular acceleration in radians per second squared"}},{unit:"N",properties:{display:"N",quantity:"Force",quantityDisplay:"F",description:"Force in newton"}},{unit:"T",properties:{display:"T",quantity:"Magnetic field",quantityDisplay:"B",description:"Magnetic field strength in tesla"}},{unit:"Lux",properties:{display:"lx",quantity:"Light Intensity",quantityDisplay:"Ev",description:"Light Intensity in lux"}},{unit:"Pa/s",properties:{display:"Pa/s",quantity:"Pressure rate",quantityDisplay:"R",description:"Pressure change rate in pascal per second"}},{unit:"Pa.s",properties:{display:"Pa s",quantity:"Viscosity",quantityDisplay:"\u03BC",description:"Viscosity in pascal seconds"}}];_defaultUnits=null;constructor(){this._defaultUnitsSub=this.AppSettingsService.getDefaultUnitsAsO().subscribe(e=>{this._defaultUnits=e})}unitConversionFunctions={unitless:function(e){return e}," ":function(e){return e},knots:_.default.swiftConverter("m/s","kn"),kph:_.default.swiftConverter("m/s","kph"),"m/s":function(e){return e},mph:_.default.swiftConverter("m/s","mph"),liter:_.default.swiftConverter("m^3","liter"),gallon:_.default.swiftConverter("m^3","gallon"),m3:function(e){return e},"m3/s":function(e){return e},"l/min":_.default.swiftConverter("m^3/s","liter/minute"),"l/h":_.default.swiftConverter("m^3/s","liter/hour"),"g/min":_.default.swiftConverter("m^3/s","gallon/minute"),"g/h":_.default.swiftConverter("m^3/s","gallon/hour"),"m/m3":function(e){return e},"nm/l":_.default.swiftConverter("m/m^3","naut-mile/liter"),"nm/g":_.default.swiftConverter("m/m^3","naut-mile/gallon"),"km/l":_.default.swiftConverter("m/m^3","km/liter"),mpg:_.default.swiftConverter("m/m^3","mile/gallon"),"m/J":function(e){return e},"nm/J":_.default.swiftConverter("m/J","naut-mile/J"),"km/J":_.default.swiftConverter("km/J","km/J"),"nm/kWh":_.default.swiftConverter("m/J","naut-mile/kWh"),"km/kWh":_.default.swiftConverter("m/J","km/kWh"),K:function(e){return e},celsius:_.default.swiftConverter("tempK","tempC"),fahrenheit:_.default.swiftConverter("tempK","tempF"),m:function(e){return e},mm:function(e){return e*1e3},fathom:_.default.swiftConverter("m","fathom"),feet:_.default.swiftConverter("m","foot"),inch:_.default.swiftConverter("m","in"),km:_.default.swiftConverter("m","km"),nm:_.default.swiftConverter("m","nmi"),mi:_.default.swiftConverter("m","mi"),V:function(e){return e},mV:function(e){return e*1e3},A:function(e){return e},mA:function(e){return e*1e3},C:function(e){return e},Ah:_.default.swiftConverter("C","Ah"),W:function(e){return e},mW:function(e){return e*1e3},J:function(e){return e},kWh:_.default.swiftConverter("J","kWh"),ohm:function(e){return e},kiloohm:function(e){return e/1e3},Pa:function(e){return e},bar:_.default.swiftConverter("Pa","bar"),psi:_.default.swiftConverter("Pa","psi"),mmHg:_.default.swiftConverter("Pa","mmHg"),inHg:_.default.swiftConverter("Pa","inHg"),hPa:_.default.swiftConverter("Pa","hPa"),kPa:_.default.swiftConverter("Pa","kPa"),mbar:_.default.swiftConverter("Pa","millibar"),"kg/m3":function(e){return e},s:function(e){return e},Minutes:_.default.swiftConverter("s","minutes"),Hours:_.default.swiftConverter("s","hours"),Days:_.default.swiftConverter("s","days"),"D HH:MM:SS":function(e){e=parseInt(e,10);let t=e<0;e=Math.abs(e);let r=Math.floor(e/86400),n=Math.floor(e%86400/3600),o=Math.floor(e%3600/60),p=Math.floor(e%60),f=t?"-":"";return r>0?f+=r+"d "+n.toString()+":"+o.toString().padStart(2,"0")+":"+p.toString().padStart(2,"0"):f+=n.toString()+":"+o.toString().padStart(2,"0")+":"+p.toString().padStart(2,"0"),f},"rad/s":function(e){return e},"deg/s":_.default.swiftConverter("rad/s","deg/s"),"deg/min":_.default.swiftConverter("rad/s","deg/min"),rpm:function(e){return e*60},Hz:function(e){return e},KHz:function(e){return e/1e3},MHz:function(e){return e/1e6},GHz:function(e){return e/1e9},rad:function(e){return e},deg:_.default.swiftConverter("rad","deg"),grad:_.default.swiftConverter("rad","grad"),percent:function(e){return e*100},percentraw:function(e){return e},ratio:function(e){return e},pdeg:function(e){return e},latitudeMin:function(e){let t=Math.trunc(e),r="N";e<0&&(r="S",t=t*-1);let n=e%1*60;return r=="S"&&(n=n*-1),t+"\xB0 "+n.toFixed(2).padStart(5,"0")+"' "+r},latitudeSec:function(e){let t=Math.trunc(e),r="N";e<0&&(r="S",t=t*-1);let n=e%1*60;r=="S"&&(n=n*-1);let o=Math.trunc(n),p=n%1*60;return t+"\xB0 "+o+"' "+p.toFixed(2).padStart(5,"0")+'" '+r},longitudeMin:function(e){let t=Math.trunc(e),r="E";e<0&&(r="W",t=t*-1);let n=e%1*60;return r=="W"&&(n=n*-1),t+"\xB0 "+n.toFixed(2).padStart(5,"0")+"' "+r},longitudeSec:function(e){let t=Math.trunc(e),r="E";e<0&&(r="W",t=t*-1);let n=e%1*60;r=="W"&&(n=n*-1);let o=Math.trunc(n),p=n%1*60;return t+"\xB0 "+o+"' "+p.toFixed(2).padStart(5,"0")+'" '+r}};convertToUnit(e,t){if(!(e in this.unitConversionFunctions)||t===null)return null;let r=+t;return this.unitConversionFunctions[e](r)}getDefaults(){return this._defaultUnits}getConversions(){return this._conversionList}getConversionsForPath(e){let t=this.data.getPathUnitType(e),r="unitless",n="unitless";if(t===null||t==="RFC 3339 (UTC)")return{base:r,conversions:this._conversionList};{let o=this._conversionList.filter(p=>p.group=="Position"&&(e.includes("position.latitude")||e.includes("position.longitude"))?!0:p.units.find(y=>y.measure==t)?(n=this._defaultUnits[p.group],!0):!1);return o.length>0?{base:n,conversions:o}:(console.log("[Units Service] Unit type: "+t+", found for path: "+e+`
|
|
2
|
-
but Kip does not support it.`),{base:r,conversions:this._conversionList})}}ngOnDestroy(){this._defaultUnitsSub?.unsubscribe()}static \u0275fac=function(t){return new(t||l)};static \u0275prov=re({token:l,factory:l.\u0275fac})}return l})();var Lr=["tooltip"],Ki=20;var ji=new J("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let l=g(de);return()=>We(l,{scrollThrottle:Ki})}}),Gi=new J("mat-tooltip-default-options",{providedIn:"root",factory:()=>({showDelay:0,hideDelay:0,touchendHideDelay:1500})});var Hi="tooltip-panel",Bi=ci({passive:!0}),$r=8,qr=8,Vr=24,zr=200,Hr=(()=>{class l{_elementRef=g(se);_ngZone=g(De);_platform=g(li);_ariaDescriber=g(_i);_focusMonitor=g(ui);_dir=g(Pe);_injector=g(de);_viewContainerRef=g(Kt);_mediaMatcher=g(di);_animationsDisabled=_e();_defaultOptions=g(Gi,{optional:!0});_overlayRef=null;_tooltipInstance=null;_overlayPanelClass;_portal;_position="below";_positionAtOrigin=!1;_disabled=!1;_tooltipClass;_viewInitialized=!1;_pointerExitEventsInitialized=!1;_tooltipComponent=Yi;_viewportMargin=8;_currentPosition;_cssClassPrefix="mat-mdc";_ariaDescriptionPending=!1;_dirSubscribed=!1;get position(){return this._position}set position(e){e!==this._position&&(this._position=e,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(e){this._positionAtOrigin=ot(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){let t=ot(e);this._disabled!==t&&(this._disabled=t,t?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message))}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=nt(e)}_showDelay;get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=nt(e),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}_hideDelay;touchGestures="auto";get message(){return this._message}set message(e){let t=this._message;this._message=e!=null?String(e).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(t)}_message="";get tooltipClass(){return this._tooltipClass}set tooltipClass(e){this._tooltipClass=e,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}_passiveListeners=[];_touchstartTimeout=null;_destroyed=new w;_isDestroyed=!1;constructor(){let e=this._defaultOptions;e&&(this._showDelay=e.showDelay,this._hideDelay=e.hideDelay,e.position&&(this.position=e.position),e.positionAtOrigin&&(this.positionAtOrigin=e.positionAtOrigin),e.touchGestures&&(this.touchGestures=e.touchGestures),e.tooltipClass&&(this.tooltipClass=e.tooltipClass)),this._viewportMargin=$r}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(O(this._destroyed)).subscribe(e=>{e?e==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){let e=this._elementRef.nativeElement;this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([t,r])=>{e.removeEventListener(t,r,Bi)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=!0,this._ariaDescriber.removeDescription(e,this.message,"tooltip"),this._focusMonitor.stopMonitoring(e)}show(e=this.showDelay,t){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let r=this._createOverlay(t);this._detach(),this._portal=this._portal||new bi(this._tooltipComponent,this._viewContainerRef);let n=this._tooltipInstance=r.attach(this._portal).instance;n._triggerElement=this._elementRef.nativeElement,n._mouseLeaveHideDelay=this._hideDelay,n.afterHidden().pipe(O(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),n.show(e)}hide(e=this.hideDelay){let t=this._tooltipInstance;t&&(t.isVisible()?t.hide(e):(t._cancelPendingAnimations(),this._detach()))}toggle(e){this._isTooltipVisible()?this.hide():this.show(void 0,e)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(e){if(this._overlayRef){let o=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!e)&&o._origin instanceof se)return this._overlayRef;this._detach()}let t=this._injector.get(yi).getAncestorScrollContainers(this._elementRef),r=`${this._cssClassPrefix}-${Hi}`,n=Si(this._injector,this.positionAtOrigin?e||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(t).withPopoverLocation("global");return n.positionChanges.pipe(O(this._destroyed)).subscribe(o=>{this._updateCurrentPositionClass(o.connectionPair),this._tooltipInstance&&o.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=ki(this._injector,{direction:this._dir,positionStrategy:n,panelClass:this._overlayPanelClass?[...this._overlayPanelClass,r]:r,scrollStrategy:this._injector.get(ji)(),disableAnimations:this._animationsDisabled}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(O(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(O(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(O(this._destroyed)).subscribe(o=>{this._isTooltipVisible()&&o.keyCode===27&&!oe(o)&&(o.preventDefault(),o.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._dirSubscribed||(this._dirSubscribed=!0,this._dir.change.pipe(O(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(e){let t=e.getConfig().positionStrategy,r=this._getOrigin(),n=this._getOverlayPosition();t.withPositions([this._addOffset(ce(ce({},r.main),n.main)),this._addOffset(ce(ce({},r.fallback),n.fallback))])}_addOffset(e){let t=qr,r=!this._dir||this._dir.value=="ltr";return e.originY==="top"?e.offsetY=-t:e.originY==="bottom"?e.offsetY=t:e.originX==="start"?e.offsetX=r?-t:t:e.originX==="end"&&(e.offsetX=r?t:-t),e}_getOrigin(){let e=!this._dir||this._dir.value=="ltr",t=this.position,r;t=="above"||t=="below"?r={originX:"center",originY:t=="above"?"top":"bottom"}:t=="before"||t=="left"&&e||t=="right"&&!e?r={originX:"start",originY:"center"}:(t=="after"||t=="right"&&e||t=="left"&&!e)&&(r={originX:"end",originY:"center"});let{x:n,y:o}=this._invertPosition(r.originX,r.originY);return{main:r,fallback:{originX:n,originY:o}}}_getOverlayPosition(){let e=!this._dir||this._dir.value=="ltr",t=this.position,r;t=="above"?r={overlayX:"center",overlayY:"bottom"}:t=="below"?r={overlayX:"center",overlayY:"top"}:t=="before"||t=="left"&&e||t=="right"&&!e?r={overlayX:"end",overlayY:"center"}:(t=="after"||t=="right"&&e||t=="left"&&!e)&&(r={overlayX:"start",overlayY:"center"});let{x:n,y:o}=this._invertPosition(r.overlayX,r.overlayY);return{main:r,fallback:{overlayX:n,overlayY:o}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),Ze(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()},{injector:this._injector}))}_setTooltipClass(e){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=e,this._tooltipInstance._markForCheck())}_invertPosition(e,t){return this.position==="above"||this.position==="below"?t==="top"?t="bottom":t==="bottom"&&(t="top"):e==="end"?e="start":e==="start"&&(e="end"),{x:e,y:t}}_updateCurrentPositionClass(e){let{overlayY:t,originX:r,originY:n}=e,o;if(t==="center"?this._dir&&this._dir.value==="rtl"?o=r==="end"?"left":"right":o=r==="start"?"left":"right":o=t==="bottom"&&n==="top"?"above":"below",o!==this._currentPosition){let p=this._overlayRef;if(p){let f=`${this._cssClassPrefix}-${Hi}-`;p.removePanelClass(f+this._currentPosition),p.addPanelClass(f+o)}this._currentPosition=o}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._isTouchPlatform()?this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",e=>{let t=e.targetTouches?.[0],r=t?{x:t.clientX,y:t.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout);let n=500;this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,r)},this._defaultOptions?.touchLongPressShowDelay??n)}])):this._passiveListeners.push(["mouseenter",e=>{this._setupPointerExitEventsIfNeeded();let t;e.x!==void 0&&e.y!==void 0&&(t=e),this.show(void 0,t)}]),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;let e=[];if(!this._isTouchPlatform())e.push(["mouseleave",t=>{let r=t.relatedTarget;(!r||!this._overlayRef?.overlayElement.contains(r))&&this.hide()}],["wheel",t=>this._wheelListener(t)]);else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let t=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions?.touchendHideDelay)};e.push(["touchend",t],["touchcancel",t])}this._addListeners(e),this._passiveListeners.push(...e)}_addListeners(e){e.forEach(([t,r])=>{this._elementRef.nativeElement.addEventListener(t,r,Bi)})}_isTouchPlatform(){return this._platform.IOS||this._platform.ANDROID?!0:this._platform.isBrowser?!!this._defaultOptions?.detectHoverCapability&&this._mediaMatcher.matchMedia("(any-hover: none)").matches:!1}_wheelListener(e){if(this._isTooltipVisible()){let t=this._injector.get(Vt).elementFromPoint(e.clientX,e.clientY),r=this._elementRef.nativeElement;t!==r&&!r.contains(t)&&this.hide()}}_disableNativeGesturesIfNecessary(){let e=this.touchGestures;if(e!=="off"){let t=this._elementRef.nativeElement,r=t.style;(e==="on"||t.nodeName!=="INPUT"&&t.nodeName!=="TEXTAREA")&&(r.userSelect=r.msUserSelect=r.webkitUserSelect=r.MozUserSelect="none"),(e==="on"||!t.draggable)&&(r.webkitUserDrag="none"),r.touchAction="none",r.webkitTapHighlightColor="transparent"}}_syncAriaDescription(e){this._ariaDescriptionPending||(this._ariaDescriptionPending=!0,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,e,"tooltip"),this._isDestroyed||Ze({write:()=>{this._ariaDescriptionPending=!1,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")}},{injector:this._injector}))}static \u0275fac=function(t){return new(t||l)};static \u0275dir=et({type:l,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(t,r){t&2&&ae("mat-mdc-tooltip-disabled",r.disabled)},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]})}return l})(),Yi=(()=>{class l{_changeDetectorRef=g(Ae);_elementRef=g(se);_isMultiline=!1;message;tooltipClass;_showTimeoutId;_hideTimeoutId;_triggerElement;_mouseLeaveHideDelay;_animationsDisabled=_e();_tooltip;_closeOnInteraction=!1;_isVisible=!1;_onHide=new w;_showAnimation="mat-mdc-tooltip-show";_hideAnimation="mat-mdc-tooltip-hide";constructor(){}show(e){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},e)}hide(e){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},e)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:e}){(!e||!this._triggerElement.contains(e))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){let e=this._elementRef.nativeElement.getBoundingClientRect();return e.height>Vr&&e.width>=zr}_handleAnimationEnd({animationName:e}){(e===this._showAnimation||e===this._hideAnimation)&&this._finalizeAnimation(e===this._showAnimation)}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(e){e?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(e){let t=this._tooltip.nativeElement,r=this._showAnimation,n=this._hideAnimation;if(t.classList.remove(e?n:r),t.classList.add(e?r:n),this._isVisible!==e&&(this._isVisible=e,this._changeDetectorRef.markForCheck()),e&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let o=getComputedStyle(t);(o.getPropertyValue("animation-duration")==="0s"||o.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=!0)}e&&this._onShow(),this._animationsDisabled&&(t.classList.add("_mat-animation-noopable"),this._finalizeAnimation(e))}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=Oe({type:l,selectors:[["mat-tooltip-component"]],viewQuery:function(t,r){if(t&1&&Ie(Lr,7),t&2){let n;V(n=z())&&(r._tooltip=n.first)}},hostAttrs:["aria-hidden","true"],hostBindings:function(t,r){t&1&&j("mouseleave",function(o){return r._handleMouseLeave(o)})},decls:4,vars:4,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend","ngClass"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(t,r){if(t&1){let n=me();A(0,"div",1,0),j("animationend",function(p){return B(n),K(r._handleAnimationEnd(p))}),A(2,"div",2),he(3),q()()}t&2&&(ae("mdc-tooltip--multiline",r._isMultiline),pe("ngClass",r.tooltipClass),$(3),fe(r.message))},dependencies:[Re],styles:[`.mat-mdc-tooltip{position:relative;transform:scale(0);display:inline-flex}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-surface{word-break:normal;overflow-wrap:anywhere;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center;will-change:transform,opacity;background-color:var(--mat-tooltip-container-color, var(--mat-sys-inverse-surface));color:var(--mat-tooltip-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mat-tooltip-container-shape, var(--mat-sys-corner-extra-small));font-family:var(--mat-tooltip-supporting-text-font, var(--mat-sys-body-small-font));font-size:var(--mat-tooltip-supporting-text-size, var(--mat-sys-body-small-size));font-weight:var(--mat-tooltip-supporting-text-weight, var(--mat-sys-body-small-weight));line-height:var(--mat-tooltip-supporting-text-line-height, var(--mat-sys-body-small-line-height));letter-spacing:var(--mat-tooltip-supporting-text-tracking, var(--mat-sys-body-small-tracking))}.mat-mdc-tooltip-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:right}.mat-mdc-tooltip-panel{line-height:normal}.mat-mdc-tooltip-panel.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}
|
|
3
|
-
`],encapsulation:2,changeDetection:0})}return l})();var fn=(()=>{class l{static \u0275fac=function(t){return new(t||l)};static \u0275mod=xe({type:l});static \u0275inj=Ce({imports:[mi,Ue,Ne,Fe]})}return l})();var Gr=["trigger"],Yr=["panel"],Xr=[[["mat-select-trigger"]],"*"],Jr=["mat-select-trigger","*"];function Qr(l,b){if(l&1&&(A(0,"span",4),he(1),q()),l&2){let e=ne();$(),fe(e.placeholder)}}function Zr(l,b){l&1&&rt(0)}function es(l,b){if(l&1&&(A(0,"span",11),he(1),q()),l&2){let e=ne(2);$(),fe(e.triggerValue)}}function ts(l,b){if(l&1&&(A(0,"span",5),tt(1,Zr,1,0)(2,es,2,1,"span",11),q()),l&2){let e=ne();$(),it(e.customTrigger?1:2)}}function is(l,b){if(l&1){let e=me();A(0,"div",12,1),j("keydown",function(r){B(e);let n=ne();return K(n._handleKeydown(r))}),rt(2,1),q()}if(l&2){let e=ne();Qt(Zt("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",e._getPanelTheme())),ae("mat-select-panel-animations-enabled",!e._animationsDisabled),pe("ngClass",e.panelClass),Ee("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}var rs=new J("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let l=g(de);return()=>We(l)}}),ss=new J("MAT_SELECT_CONFIG"),ns=new J("MatSelectTrigger"),ft=class{source;value;constructor(b,e){this.source=b,this.value=e}},Gn=(()=>{class l{_viewportRuler=g(vi);_changeDetectorRef=g(Ae);_elementRef=g(se);_dir=g(Pe,{optional:!0});_idGenerator=g(hi);_renderer=g(Bt);_parentFormField=g(xi,{optional:!0});ngControl=g(Mi,{self:!0,optional:!0});_liveAnnouncer=g(pi);_defaultOptions=g(ss,{optional:!0});_animationsDisabled=_e();_popoverLocation;_initialized=new w;_cleanupDetach;options;optionGroups;customTrigger;_positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}];_scrollOptionIntoView(e){let t=this.options.toArray()[e];if(t){let r=this.panel.nativeElement,n=Fi(e,this.options,this.optionGroups),o=t._getHostElement();e===0&&n===1?r.scrollTop=0:r.scrollTop=Wi(o.offsetTop,o.offsetHeight,r.scrollTop,r.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new ft(this,e)}_scrollStrategyFactory=g(rs);_panelOpen=!1;_compareWith=(e,t)=>e===t;_uid=this._idGenerator.getId("mat-select-");_triggerAriaLabelledBy=null;_previousControl;_destroy=new w;_errorStateTracker;stateChanges=new w;disableAutomaticLabeling=!0;userAriaDescribedBy;_selectionModel;_keyManager;_preferredOverlayOrigin;_overlayWidth;_onChange=()=>{};_onTouched=()=>{};_valueId=this._idGenerator.getId("mat-select-value-");_scrollStrategy;_overlayPanelClass=this._defaultOptions?.overlayPanelClass||"";get focused(){return this._focused||this._panelOpen}_focused=!1;controlType="mat-select";trigger;panel;_overlayDir;panelClass;disabled=!1;get disableRipple(){return this._disableRipple()}set disableRipple(e){this._disableRipple.set(e)}_disableRipple=zt(!1);tabIndex=0;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1;get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}_placeholder;get required(){return this._required??this.ngControl?.control?.hasValidator(Ci.required)??!1}set required(e){this._required=e,this.stateChanges.next()}_required;get multiple(){return this._multiple}set multiple(e){this._selectionModel,this._multiple=e}_multiple=!1;disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1;get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}_value;ariaLabel="";ariaLabelledby;get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}typeaheadDebounceInterval;sortComparator;get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}_id;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto";canSelectNullableOptions=this._defaultOptions?.canSelectNullableOptions??!1;optionSelectionChanges=Wt(()=>{let e=this.options;return e?e.changes.pipe(Je(e),Qe(()=>ke(...e.map(t=>t.onSelectionChange)))):this._initialized.pipe(Qe(()=>this.optionSelectionChanges))});openedChange=new Te;_openedStream=this.openedChange.pipe(Xe(e=>e),ue(()=>{}));_closedStream=this.openedChange.pipe(Xe(e=>!e),ue(()=>{}));selectionChange=new Te;valueChange=new Te;constructor(){let e=g(Ii),t=g(Ti,{optional:!0}),r=g(Di,{optional:!0}),n=g(new ti("tabindex"),{optional:!0}),o=g(wi,{optional:!0});this.ngControl&&(this.ngControl.valueAccessor=this),this._defaultOptions?.typeaheadDebounceInterval!=null&&(this.typeaheadDebounceInterval=this._defaultOptions.typeaheadDebounceInterval),this._errorStateTracker=new Ai(e,this.ngControl,r,t,this.stateChanges),this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=n==null?0:parseInt(n)||0,this._popoverLocation=o?.usePopover===!1?null:"inline",this.id=this.id}ngOnInit(){this._selectionModel=new Ui(this.multiple),this.stateChanges.next(),this._viewportRuler.change().pipe(O(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe(O(this._destroy)).subscribe(e=>{e.added.forEach(t=>t.select()),e.removed.forEach(t=>t.deselect())}),this.options.changes.pipe(Je(null),O(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),t=this.ngControl;if(e!==this._triggerAriaLabelledBy){let r=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?r.setAttribute("aria-labelledby",e):r.removeAttribute("aria-labelledby")}t&&(this._previousControl!==t.control&&(this._previousControl!==void 0&&t.disabled!==null&&t.disabled!==this.disabled&&(this.disabled=t.disabled),this._previousControl=t.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}ngOnDestroy(){this._cleanupDetach?.(),this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._cleanupDetach?.(),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._applyModalPanelOwnership(),this._panelOpen=!0,this._overlayDir.positionChange.pipe($t(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()}),this._overlayDir.attachOverlay(),this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!0)))}_trackedModal=null;_applyModalPanelOwnership(){let e=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let t=`${this.id}-panel`;this._trackedModal&&at(this._trackedModal,"aria-owns",t),gi(e,"aria-owns",t),this._trackedModal=e}_clearFromModal(){if(!this._trackedModal)return;let e=`${this.id}-panel`;at(this._trackedModal,"aria-owns",e),this._trackedModal=null}close(){this._panelOpen&&(this._panelOpen=!1,this._exitAndDetach(),this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!1)))}_exitAndDetach(){if(this._animationsDisabled||!this.panel){this._detachOverlay();return}this._cleanupDetach?.(),this._cleanupDetach=()=>{t(),clearTimeout(r),this._cleanupDetach=void 0};let e=this.panel.nativeElement,t=this._renderer.listen(e,"animationend",n=>{n.animationName==="_mat-select-exit"&&(this._cleanupDetach?.(),this._detachOverlay())}),r=setTimeout(()=>{this._cleanupDetach?.(),this._detachOverlay()},200);e.classList.add("mat-select-panel-exit")}_detachOverlay(){this._overlayDir.detachOverlay(),this._changeDetectorRef.markForCheck()}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let e=this._selectionModel.selected.map(t=>t.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){let t=e.keyCode,r=t===40||t===38||t===37||t===39,n=t===13||t===32,o=this._keyManager;if(!o.isTyping()&&n&&!oe(e)||(this.multiple||e.altKey)&&r)e.preventDefault(),this.open();else if(!this.multiple){let p=this.selected;o.onKeydown(e);let f=this.selected;f&&p!==f&&this._liveAnnouncer.announce(f.viewValue,1e4)}}_handleOpenKeydown(e){let t=this._keyManager,r=e.keyCode,n=r===40||r===38,o=t.isTyping();if(n&&e.altKey)e.preventDefault(),this.close();else if(!o&&(r===13||r===32)&&t.activeItem&&!oe(e))e.preventDefault(),t.activeItem._selectViaInteraction();else if(!o&&this._multiple&&r===65&&e.ctrlKey){e.preventDefault();let p=this.options.some(f=>!f.disabled&&!f.selected);this.options.forEach(f=>{f.disabled||(p?f.select():f.deselect())})}else{let p=t.activeItemIndex;t.onKeydown(e),this._multiple&&n&&e.shiftKey&&t.activeItem&&t.activeItemIndex!==p&&t.activeItem._selectViaInteraction()}}_handleOverlayKeydown(e){e.keyCode===27&&!oe(e)&&(e.preventDefault(),this.close())}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(t=>t.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(t=>this._selectOptionByValue(t)),this._sortValues();else{let t=this._selectOptionByValue(e);t?this._keyManager.updateActiveItem(t):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){let t=this.options.find(r=>{if(this._selectionModel.isSelected(r))return!1;try{return(r.value!=null||this.canSelectNullableOptions)&&this._compareWith(r.value,e)}catch(n){return!1}});return t&&this._selectionModel.select(t),t}_assignValue(e){return e!==this._value||this._multiple&&Array.isArray(e)?(this.options&&this._setSelectionByValue(e),this._value=e,!0):!1}_skipPredicate=e=>this.panelOpen?!1:e.disabled;_getOverlayWidth(e){return this.panelWidth==="auto"?(e instanceof lt?e.elementRef:e||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new fi(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let e=ke(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(O(e)).subscribe(t=>{this._onSelect(t.source,t.isUserInput),t.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),ke(...this.options.map(t=>t._stateChanges)).pipe(O(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,t){let r=this._selectionModel.isSelected(e);!this.canSelectNullableOptions&&e.value==null&&!this._multiple?(e.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(e.value)):(r!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),t&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),t&&this.focus())),r!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((t,r)=>this.sortComparator?this.sortComparator(t,r,e):e.indexOf(t)-e.indexOf(r)),this.stateChanges.next()}}_propagateChanges(e){let t;this.multiple?t=this.selected.map(r=>r.value):t=this.selected?this.selected.value:e,this._value=t,this.valueChange.emit(t),this._onChange(t),this.selectionChange.emit(this._getChangeEvent(t)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let t=0;t<this.options.length;t++)if(!this.options.get(t).disabled){e=t;break}this._keyManager.setActiveItem(e)}else this._keyManager.setActiveItem(this._selectionModel.selected[0])}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0&&!!this._overlayDir}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||null,t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||"";return this.ariaLabelledby&&(e+=" "+this.ariaLabelledby),e||(e=this._valueId),e}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let t=this._elementRef.nativeElement;e.length?t.setAttribute("aria-describedby",e.join(" ")):t.removeAttribute("aria-describedby")}onContainerClick(e){let t=oi(e);t&&(t.tagName==="MAT-OPTION"||t.classList.contains("cdk-overlay-backdrop")||t.closest(".mat-mdc-select-panel"))||(this.focus(),this.open())}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=Oe({type:l,selectors:[["mat-select"]],contentQueries:function(t,r,n){if(t&1&&Xt(n,ns,5)(n,Ni,5)(n,Pi,5),t&2){let o;V(o=z())&&(r.customTrigger=o.first),V(o=z())&&(r.options=o),V(o=z())&&(r.optionGroups=o)}},viewQuery:function(t,r){if(t&1&&Ie(Gr,5)(Yr,5)(ct,5),t&2){let n;V(n=z())&&(r.trigger=n.first),V(n=z())&&(r.panel=n.first),V(n=z())&&(r._overlayDir=n.first)}},hostAttrs:["role","combobox","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:21,hostBindings:function(t,r){t&1&&j("keydown",function(o){return r._handleKeydown(o)})("focus",function(){return r._onFocus()})("blur",function(){return r._onBlur()}),t&2&&(Ee("id",r.id)("tabindex",r.disabled?-1:r.tabIndex)("aria-controls",r.panelOpen?r.id+"-panel":null)("aria-expanded",r.panelOpen)("aria-label",r.ariaLabel||null)("aria-required",r.required.toString())("aria-disabled",r.disabled.toString())("aria-invalid",r.errorState)("aria-activedescendant",r._getAriaActiveDescendant()),ae("mat-mdc-select-disabled",r.disabled)("mat-mdc-select-invalid",r.errorState)("mat-mdc-select-required",r.required)("mat-mdc-select-empty",r.empty)("mat-mdc-select-multiple",r.multiple)("mat-select-open",r.panelOpen))},inputs:{userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[2,"disabled","disabled",G],disableRipple:[2,"disableRipple","disableRipple",G],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:st(e)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",G],placeholder:"placeholder",required:[2,"required","required",G],multiple:[2,"multiple","multiple",G],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",G],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",st],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth",canSelectNullableOptions:[2,"canSelectNullableOptions","canSelectNullableOptions",G]},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[ei([{provide:Oi,useExisting:l},{provide:Ri,useExisting:l}]),Ht],ngContentSelectors:Jr,decls:11,vars:10,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"detach","backdropClick","overlayKeydown","cdkConnectedOverlayDisableClose","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","cdkConnectedOverlayFlexibleDimensions","cdkConnectedOverlayUsePopover"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"keydown","ngClass"]],template:function(t,r){if(t&1){let n=me();Yt(Xr),A(0,"div",2,0),j("click",function(){return B(n),K(r.open())}),A(3,"div",3),tt(4,Qr,2,1,"span",4)(5,ts,3,1,"span",5),q(),A(6,"div",6)(7,"div",7),qt(),A(8,"svg",8),Gt(9,"path",9),q()()()(),jt(10,is,3,10,"ng-template",10),j("detach",function(){return B(n),K(r.close())})("backdropClick",function(){return B(n),K(r.close())})("overlayKeydown",function(p){return B(n),K(r._handleOverlayKeydown(p))})}if(t&2){let n=Jt(1);$(3),Ee("id",r._valueId),$(),it(r.empty?4:5),$(6),pe("cdkConnectedOverlayDisableClose",!0)("cdkConnectedOverlayPanelClass",r._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",r._scrollStrategy)("cdkConnectedOverlayOrigin",r._preferredOverlayOrigin||n)("cdkConnectedOverlayPositions",r._positions)("cdkConnectedOverlayWidth",r._overlayWidth)("cdkConnectedOverlayFlexibleDimensions",!0)("cdkConnectedOverlayUsePopover",r._popoverLocation)}},dependencies:[lt,ct,Re],styles:[`@keyframes _mat-select-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}@keyframes _mat-select-exit{from{opacity:1}to{opacity:0}}.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var(--mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow,.mat-form-field-invalid:not(.mat-form-field-disabled) .mat-mdc-form-field-infix::after{color:var(--mat-select-invalid-arrow-color, var(--mat-sys-error))}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-select-open .mat-mdc-select-arrow{transform:rotate(180deg)}.mat-form-field-animations-enabled .mat-mdc-select-arrow{transition:transform 80ms linear}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@media(forced-colors: active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:relative;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-select-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-select-panel-animations-enabled{animation:_mat-select-enter 120ms cubic-bezier(0, 0, 0.2, 1)}.mat-select-panel-animations-enabled.mat-select-panel-exit{animation:_mat-select-exit 100ms linear}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field:not(.mat-form-field-animations-enabled) .mat-mdc-select-placeholder,._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:var(--mat-select-arrow-transform, translateY(-8px))}
|
|
4
|
-
`],encapsulation:2,changeDetection:0})}return l})();var Yn=(()=>{class l{static \u0275fac=function(t){return new(t||l)};static \u0275mod=xe({type:l});static \u0275inj=Ce({imports:[Ue,ut,Ne,Fe,Ei,ut]})}return l})();export{Gn as a,Yn as b,le as c,Wr as d,Li as e,Vi as f,Us as g,Gi as h,Hr as i,fn as j};
|
package/public/chunk-KXSGKJ7X.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import{b as Ae,d as qt,i as Xt,j as Zt,m as Vt,p as Yt,t as Qt}from"./chunk-ZQJMMQNG.js";import{$ as st,Aa as ye,Ab as _t,Bc as Ct,Da as R,Ea as we,Ed as Ie,Fb as xt,Ga as lt,Gb as Te,Gd as Ot,H as et,Hb as Re,Ib as Ce,J as A,Ja as ct,Jb as Q,K as tt,Kb as ue,Lc as ee,Ma as O,Na as ut,Nc as N,Oa as ht,Pb as yt,Q as nt,Qb as wt,R as it,Ra as ve,Rb as Ee,Rd as $t,Sb as he,Sd as Lt,Tb as L,U as rt,Ub as W,Ud as zt,Vb as z,Wb as vt,Xa as Z,Xb as Mt,Yb as K,Za as pt,Zb as G,_a as Me,a as b,ab as dt,b as T,ba as oe,be as De,ca as j,cb as mt,da as le,dc as J,eb as V,f as E,fc as St,g as ae,gc as Tt,hc as Rt,hd as P,he as Nt,ib as $,ie as Ft,jb as Se,k as M,kb as ce,kd as Et,ke as Bt,la as at,le as Ht,ma as xe,me as jt,nb as gt,oa as y,pb as ft,pd as Pt,qa as d,s as H,tc as Pe,td as It,ud as Dt,va as q,vb as bt,vd as At,wa as U,xa as ot,xb as Y,z as Je,za as X,zb as kt,ze as Ut}from"./chunk-GSMU2M4Y.js";function ze(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var D=ze();function nn(r){D=r}var re={exec:()=>null};function f(r,i=""){let e=typeof r=="string"?r:r.source,n={replace:(t,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(_.caret,"$1"),e=e.replace(t,a),n},getRegex:()=>new RegExp(e,i)};return n}var _n=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch(r){return!1}})(),_={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},xn=/^(?:[ \t]*(?:\n|$))+/,yn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,wn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,se=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,vn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ne=/(?:[*+-]|\d{1,9}[.)])/,rn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,sn=f(rn).replace(/bull/g,Ne).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Mn=f(rn).replace(/bull/g,Ne).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Fe=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Sn=/^[^\n]+/,Be=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Tn=f(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Be).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Rn=f(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ne).getRegex(),ge="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",He=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Cn=f("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",He).replace("tag",ge).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),an=f(Fe).replace("hr",se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ge).getRegex(),En=f(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",an).getRegex(),je={blockquote:En,code:yn,def:Tn,fences:wn,heading:vn,hr:se,html:Cn,lheading:sn,list:Rn,newline:xn,paragraph:an,table:re,text:Sn},Wt=f("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ge).getRegex(),Pn=T(b({},je),{lheading:Mn,table:Wt,paragraph:f(Fe).replace("hr",se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Wt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ge).getRegex()}),In=T(b({},je),{html:f(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",He).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:re,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:f(Fe).replace("hr",se).replace("heading",` *#{1,6} *[^
|
|
2
|
-
]`).replace("lheading",sn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),Dn=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,An=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,on=/^( {2,}|\\)\n(?!\s*$)/,On=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,fe=/[\p{P}\p{S}]/u,qe=/[\s\p{P}\p{S}]/u,ln=/[^\s\p{P}\p{S}]/u,$n=f(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,qe).getRegex(),cn=/(?!~)[\p{P}\p{S}]/u,Ln=/(?!~)[\s\p{P}\p{S}]/u,zn=/(?:[^\s\p{P}\p{S}]|~)/u,Nn=f(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",_n?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),un=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Fn=f(un,"u").replace(/punct/g,fe).getRegex(),Bn=f(un,"u").replace(/punct/g,cn).getRegex(),hn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Hn=f(hn,"gu").replace(/notPunctSpace/g,ln).replace(/punctSpace/g,qe).replace(/punct/g,fe).getRegex(),jn=f(hn,"gu").replace(/notPunctSpace/g,zn).replace(/punctSpace/g,Ln).replace(/punct/g,cn).getRegex(),qn=f("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ln).replace(/punctSpace/g,qe).replace(/punct/g,fe).getRegex(),Un=f(/\\(punct)/,"gu").replace(/punct/g,fe).getRegex(),Xn=f(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Zn=f(He).replace("(?:-->|$)","-->").getRegex(),Vn=f("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Zn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),de=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Yn=f(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",de).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),pn=f(/^!?\[(label)\]\[(ref)\]/).replace("label",de).replace("ref",Be).getRegex(),dn=f(/^!?\[(ref)\](?:\[\])?/).replace("ref",Be).getRegex(),Qn=f("reflink|nolink(?!\\()","g").replace("reflink",pn).replace("nolink",dn).getRegex(),Kt=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ue={_backpedal:re,anyPunctuation:Un,autolink:Xn,blockSkip:Nn,br:on,code:An,del:re,emStrongLDelim:Fn,emStrongRDelimAst:Hn,emStrongRDelimUnd:qn,escape:Dn,link:Yn,nolink:dn,punctuation:$n,reflink:pn,reflinkSearch:Qn,tag:Vn,text:On,url:re},Wn=T(b({},Ue),{link:f(/^!?\[(label)\]\((.*?)\)/).replace("label",de).getRegex(),reflink:f(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",de).getRegex()}),Oe=T(b({},Ue),{emStrongRDelimAst:jn,emStrongLDelim:Bn,url:f(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Kt).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:f(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Kt).getRegex()}),Kn=T(b({},Oe),{br:f(on).replace("{2,}","*").getRegex(),text:f(Oe.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),pe={normal:je,gfm:Pn,pedantic:In},te={normal:Ue,gfm:Oe,breaks:Kn,pedantic:Wn},Gn={"&":"&","<":"<",">":">",'"':""","'":"'"},Gt=r=>Gn[r];function S(r,i){if(i){if(_.escapeTest.test(r))return r.replace(_.escapeReplace,Gt)}else if(_.escapeTestNoEncode.test(r))return r.replace(_.escapeReplaceNoEncode,Gt);return r}function Jt(r){try{r=encodeURI(r).replace(_.percentDecode,"%")}catch(i){return null}return r}function en(r,i){let e=r.replace(_.findPipe,(s,a,l)=>{let o=!1,u=a;for(;--u>=0&&l[u]==="\\";)o=!o;return o?"|":" |"}),n=e.split(_.splitPipe),t=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),i)if(n.length>i)n.splice(i);else for(;n.length<i;)n.push("");for(;t<n.length;t++)n[t]=n[t].trim().replace(_.slashPipe,"|");return n}function ne(r,i,e){let n=r.length;if(n===0)return"";let t=0;for(;t<n;){let s=r.charAt(n-t-1);if(s===i&&!e)t++;else if(s!==i&&e)t++;else break}return r.slice(0,n-t)}function Jn(r,i){if(r.indexOf(i[1])===-1)return-1;let e=0;for(let n=0;n<r.length;n++)if(r[n]==="\\")n++;else if(r[n]===i[0])e++;else if(r[n]===i[1]&&(e--,e<0))return n;return e>0?-2:-1}function tn(r,i,e,n,t){let s=i.href,a=i.title||null,l=r[1].replace(t.other.outputLinkReplace,"$1");n.state.inLink=!0;let o={type:r[0].charAt(0)==="!"?"image":"link",raw:e,href:s,title:a,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,o}function ei(r,i,e){let n=r.match(e.other.indentCodeCompensation);if(n===null)return i;let t=n[1];return i.split(`
|
|
3
|
-
`).map(s=>{let a=s.match(e.other.beginningSpace);if(a===null)return s;let[l]=a;return l.length>=t.length?s.slice(t.length):s}).join(`
|
|
4
|
-
`)}var me=class{options;rules;lexer;constructor(r){this.options=r||D}space(r){let i=this.rules.block.newline.exec(r);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(r){let i=this.rules.block.code.exec(r);if(i){let e=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?e:ne(e,`
|
|
5
|
-
`)}}}fences(r){let i=this.rules.block.fences.exec(r);if(i){let e=i[0],n=ei(e,i[3]||"",this.rules);return{type:"code",raw:e,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:n}}}heading(r){let i=this.rules.block.heading.exec(r);if(i){let e=i[2].trim();if(this.rules.other.endingHash.test(e)){let n=ne(e,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(e=n.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(r){let i=this.rules.block.hr.exec(r);if(i)return{type:"hr",raw:ne(i[0],`
|
|
6
|
-
`)}}blockquote(r){let i=this.rules.block.blockquote.exec(r);if(i){let e=ne(i[0],`
|
|
7
|
-
`).split(`
|
|
8
|
-
`),n="",t="",s=[];for(;e.length>0;){let a=!1,l=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))l.push(e[o]),a=!0;else if(!a)l.push(e[o]);else break;e=e.slice(o);let u=l.join(`
|
|
9
|
-
`),c=u.replace(this.rules.other.blockquoteSetextReplace,`
|
|
10
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
11
|
-
${u}`:u,t=t?`${t}
|
|
12
|
-
${c}`:c;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,s,!0),this.lexer.state.top=p,e.length===0)break;let h=s.at(-1);if(h?.type==="code")break;if(h?.type==="blockquote"){let k=h,m=k.raw+`
|
|
13
|
-
`+e.join(`
|
|
14
|
-
`),x=this.blockquote(m);s[s.length-1]=x,n=n.substring(0,n.length-k.raw.length)+x.raw,t=t.substring(0,t.length-k.text.length)+x.text;break}else if(h?.type==="list"){let k=h,m=k.raw+`
|
|
15
|
-
`+e.join(`
|
|
16
|
-
`),x=this.list(m);s[s.length-1]=x,n=n.substring(0,n.length-h.raw.length)+x.raw,t=t.substring(0,t.length-k.raw.length)+x.raw,e=m.substring(s.at(-1).raw.length).split(`
|
|
17
|
-
`);continue}}return{type:"blockquote",raw:n,tokens:s,text:t}}}list(r){let i=this.rules.block.list.exec(r);if(i){let e=i[1].trim(),n=e.length>1,t={type:"list",raw:"",ordered:n,start:n?+e.slice(0,-1):"",loose:!1,items:[]};e=n?`\\d{1,9}\\${e.slice(-1)}`:`\\${e}`,this.options.pedantic&&(e=n?e:"[*+-]");let s=this.rules.other.listItemRegex(e),a=!1;for(;r;){let o=!1,u="",c="";if(!(i=s.exec(r))||this.rules.block.hr.test(r))break;u=i[0],r=r.substring(u.length);let p=i[2].split(`
|
|
18
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,x=>" ".repeat(3*x.length)),h=r.split(`
|
|
19
|
-
`,1)[0],k=!p.trim(),m=0;if(this.options.pedantic?(m=2,c=p.trimStart()):k?m=i[1].length+1:(m=i[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,c=p.slice(m),m+=i[1].length),k&&this.rules.other.blankLine.test(h)&&(u+=h+`
|
|
20
|
-
`,r=r.substring(h.length+1),o=!0),!o){let x=this.rules.other.nextBulletRegex(m),We=this.rules.other.hrRegex(m),Ke=this.rules.other.fencesBeginRegex(m),Ge=this.rules.other.headingBeginRegex(m),kn=this.rules.other.htmlBeginRegex(m);for(;r;){let _e=r.split(`
|
|
21
|
-
`,1)[0],B;if(h=_e,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),B=h):B=h.replace(this.rules.other.tabCharGlobal," "),Ke.test(h)||Ge.test(h)||kn.test(h)||x.test(h)||We.test(h))break;if(B.search(this.rules.other.nonSpaceChar)>=m||!h.trim())c+=`
|
|
22
|
-
`+B.slice(m);else{if(k||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Ke.test(p)||Ge.test(p)||We.test(p))break;c+=`
|
|
23
|
-
`+h}!k&&!h.trim()&&(k=!0),u+=_e+`
|
|
24
|
-
`,r=r.substring(_e.length+1),p=B.slice(m)}}t.loose||(a?t.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(a=!0)),t.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),t.raw+=u}let l=t.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;t.raw=t.raw.trimEnd();for(let o of t.items){if(this.lexer.state.top=!1,o.tokens=this.lexer.blockTokens(o.text,[]),o.task){if(o.text=o.text.replace(this.rules.other.listReplaceTask,""),o.tokens[0]?.type==="text"||o.tokens[0]?.type==="paragraph"){o.tokens[0].raw=o.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),o.tokens[0].text=o.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let c=this.lexer.inlineQueue.length-1;c>=0;c--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)){this.lexer.inlineQueue[c].src=this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask,"");break}}let u=this.rules.other.listTaskCheckbox.exec(o.raw);if(u){let c={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};o.checked=c.checked,t.loose?o.tokens[0]&&["paragraph","text"].includes(o.tokens[0].type)&&"tokens"in o.tokens[0]&&o.tokens[0].tokens?(o.tokens[0].raw=c.raw+o.tokens[0].raw,o.tokens[0].text=c.raw+o.tokens[0].text,o.tokens[0].tokens.unshift(c)):o.tokens.unshift({type:"paragraph",raw:c.raw,text:c.raw,tokens:[c]}):o.tokens.unshift(c)}}if(!t.loose){let u=o.tokens.filter(p=>p.type==="space"),c=u.length>0&&u.some(p=>this.rules.other.anyLine.test(p.raw));t.loose=c}}if(t.loose)for(let o of t.items){o.loose=!0;for(let u of o.tokens)u.type==="text"&&(u.type="paragraph")}return t}}html(r){let i=this.rules.block.html.exec(r);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(r){let i=this.rules.block.def.exec(r);if(i){let e=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",t=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:e,raw:i[0],href:n,title:t}}}table(r){let i=this.rules.block.table.exec(r);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;let e=en(i[1]),n=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),t=i[3]?.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
25
|
-
`):[],s={type:"table",raw:i[0],header:[],align:[],rows:[]};if(e.length===n.length){for(let a of n)this.rules.other.tableAlignRight.test(a)?s.align.push("right"):this.rules.other.tableAlignCenter.test(a)?s.align.push("center"):this.rules.other.tableAlignLeft.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a<e.length;a++)s.header.push({text:e[a],tokens:this.lexer.inline(e[a]),header:!0,align:s.align[a]});for(let a of t)s.rows.push(en(a,s.header.length).map((l,o)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[o]})));return s}}lheading(r){let i=this.rules.block.lheading.exec(r);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(r){let i=this.rules.block.paragraph.exec(r);if(i){let e=i[1].charAt(i[1].length-1)===`
|
|
26
|
-
`?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:e,tokens:this.lexer.inline(e)}}}text(r){let i=this.rules.block.text.exec(r);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(r){let i=this.rules.inline.escape.exec(r);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(r){let i=this.rules.inline.tag.exec(r);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(r){let i=this.rules.inline.link.exec(r);if(i){let e=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let s=ne(e.slice(0,-1),"\\");if((e.length-s.length)%2===0)return}else{let s=Jn(i[2],"()");if(s===-2)return;if(s>-1){let a=(i[0].indexOf("!")===0?5:4)+i[1].length+s;i[2]=i[2].substring(0,s),i[0]=i[0].substring(0,a).trim(),i[3]=""}}let n=i[2],t="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(n);s&&(n=s[1],t=s[3])}else t=i[3]?i[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n=n.slice(1):n=n.slice(1,-1)),tn(i,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:t&&t.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(r,i){let e;if((e=this.rules.inline.reflink.exec(r))||(e=this.rules.inline.nolink.exec(r))){let n=(e[2]||e[1]).replace(this.rules.other.multipleSpaceGlobal," "),t=i[n.toLowerCase()];if(!t){let s=e[0].charAt(0);return{type:"text",raw:s,text:s}}return tn(e,t,e[0],this.lexer,this.rules)}}emStrong(r,i,e=""){let n=this.rules.inline.emStrongLDelim.exec(r);if(!(!n||n[3]&&e.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!e||this.rules.inline.punctuation.exec(e))){let t=[...n[0]].length-1,s,a,l=t,o=0,u=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,i=i.slice(-1*r.length+t);(n=u.exec(i))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(a=[...s].length,n[3]||n[4]){l+=a;continue}else if((n[5]||n[6])&&t%3&&!((t+a)%3)){o+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+o);let c=[...n[0]][0].length,p=r.slice(0,t+n.index+c+a);if(Math.min(t,a)%2){let k=p.slice(1,-1);return{type:"em",raw:p,text:k,tokens:this.lexer.inlineTokens(k)}}let h=p.slice(2,-2);return{type:"strong",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(r){let i=this.rules.inline.code.exec(r);if(i){let e=i[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(e),t=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&t&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:i[0],text:e}}}br(r){let i=this.rules.inline.br.exec(r);if(i)return{type:"br",raw:i[0]}}del(r){let i=this.rules.inline.del.exec(r);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(r){let i=this.rules.inline.autolink.exec(r);if(i){let e,n;return i[2]==="@"?(e=i[1],n="mailto:"+e):(e=i[1],n=e),{type:"link",raw:i[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(r){let i;if(i=this.rules.inline.url.exec(r)){let e,n;if(i[2]==="@")e=i[0],n="mailto:"+e;else{let t;do t=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])?.[0]??"";while(t!==i[0]);e=i[0],i[1]==="www."?n="http://"+i[0]:n=i[0]}return{type:"link",raw:i[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(r){let i=this.rules.inline.text.exec(r);if(i){let e=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:e}}}},w=class $e{tokens;options;state;inlineQueue;tokenizer;constructor(i){this.tokens=[],this.tokens.links=Object.create(null),this.options=i||D,this.options.tokenizer=this.options.tokenizer||new me,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:_,block:pe.normal,inline:te.normal};this.options.pedantic?(e.block=pe.pedantic,e.inline=te.pedantic):this.options.gfm&&(e.block=pe.gfm,this.options.breaks?e.inline=te.breaks:e.inline=te.gfm),this.tokenizer.rules=e}static get rules(){return{block:pe,inline:te}}static lex(i,e){return new $e(e).lex(i)}static lexInline(i,e){return new $e(e).inlineTokens(i)}lex(i){i=i.replace(_.carriageReturn,`
|
|
27
|
-
`),this.blockTokens(i,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let n=this.inlineQueue[e];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(i,e=[],n=!1){for(this.options.pedantic&&(i=i.replace(_.tabCharGlobal," ").replace(_.spaceLine,""));i;){let t;if(this.options.extensions?.block?.some(a=>(t=a.call({lexer:this},i,e))?(i=i.substring(t.raw.length),e.push(t),!0):!1))continue;if(t=this.tokenizer.space(i)){i=i.substring(t.raw.length);let a=e.at(-1);t.raw.length===1&&a!==void 0?a.raw+=`
|
|
28
|
-
`:e.push(t);continue}if(t=this.tokenizer.code(i)){i=i.substring(t.raw.length);let a=e.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
29
|
-
`)?"":`
|
|
30
|
-
`)+t.raw,a.text+=`
|
|
31
|
-
`+t.text,this.inlineQueue.at(-1).src=a.text):e.push(t);continue}if(t=this.tokenizer.fences(i)){i=i.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.heading(i)){i=i.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.hr(i)){i=i.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.blockquote(i)){i=i.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.list(i)){i=i.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.html(i)){i=i.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.def(i)){i=i.substring(t.raw.length);let a=e.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
32
|
-
`)?"":`
|
|
33
|
-
`)+t.raw,a.text+=`
|
|
34
|
-
`+t.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title},e.push(t));continue}if(t=this.tokenizer.table(i)){i=i.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.lheading(i)){i=i.substring(t.raw.length),e.push(t);continue}let s=i;if(this.options.extensions?.startBlock){let a=1/0,l=i.slice(1),o;this.options.extensions.startBlock.forEach(u=>{o=u.call({lexer:this},l),typeof o=="number"&&o>=0&&(a=Math.min(a,o))}),a<1/0&&a>=0&&(s=i.substring(0,a+1))}if(this.state.top&&(t=this.tokenizer.paragraph(s))){let a=e.at(-1);n&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
|
|
35
|
-
`)?"":`
|
|
36
|
-
`)+t.raw,a.text+=`
|
|
37
|
-
`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(t),n=s.length!==i.length,i=i.substring(t.raw.length);continue}if(t=this.tokenizer.text(i)){i=i.substring(t.raw.length);let a=e.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
38
|
-
`)?"":`
|
|
39
|
-
`)+t.raw,a.text+=`
|
|
40
|
-
`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(t);continue}if(i){let a="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,e}inline(i,e=[]){return this.inlineQueue.push({src:i,tokens:e}),e}inlineTokens(i,e=[]){let n=i,t=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(t=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)o.includes(t[0].slice(t[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,t.index)+"["+"a".repeat(t[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(t=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,t.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(t=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)s=t[2]?t[2].length:0,n=n.slice(0,t.index+s)+"["+"a".repeat(t[0].length-s-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,l="";for(;i;){a||(l=""),a=!1;let o;if(this.options.extensions?.inline?.some(c=>(o=c.call({lexer:this},i,e))?(i=i.substring(o.raw.length),e.push(o),!0):!1))continue;if(o=this.tokenizer.escape(i)){i=i.substring(o.raw.length),e.push(o);continue}if(o=this.tokenizer.tag(i)){i=i.substring(o.raw.length),e.push(o);continue}if(o=this.tokenizer.link(i)){i=i.substring(o.raw.length),e.push(o);continue}if(o=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(o.raw.length);let c=e.at(-1);o.type==="text"&&c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):e.push(o);continue}if(o=this.tokenizer.emStrong(i,n,l)){i=i.substring(o.raw.length),e.push(o);continue}if(o=this.tokenizer.codespan(i)){i=i.substring(o.raw.length),e.push(o);continue}if(o=this.tokenizer.br(i)){i=i.substring(o.raw.length),e.push(o);continue}if(o=this.tokenizer.del(i)){i=i.substring(o.raw.length),e.push(o);continue}if(o=this.tokenizer.autolink(i)){i=i.substring(o.raw.length),e.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(i))){i=i.substring(o.raw.length),e.push(o);continue}let u=i;if(this.options.extensions?.startInline){let c=1/0,p=i.slice(1),h;this.options.extensions.startInline.forEach(k=>{h=k.call({lexer:this},p),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(u=i.substring(0,c+1))}if(o=this.tokenizer.inlineText(u)){i=i.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(l=o.raw.slice(-1)),a=!0;let c=e.at(-1);c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):e.push(o);continue}if(i){let c="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return e}},C=class{options;parser;constructor(r){this.options=r||D}space(r){return""}code({text:r,lang:i,escaped:e}){let n=(i||"").match(_.notSpaceStart)?.[0],t=r.replace(_.endingNewline,"")+`
|
|
41
|
-
`;return n?'<pre><code class="language-'+S(n)+'">'+(e?t:S(t,!0))+`</code></pre>
|
|
42
|
-
`:"<pre><code>"+(e?t:S(t,!0))+`</code></pre>
|
|
43
|
-
`}blockquote({tokens:r}){return`<blockquote>
|
|
44
|
-
${this.parser.parse(r)}</blockquote>
|
|
45
|
-
`}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:i}){return`<h${i}>${this.parser.parseInline(r)}</h${i}>
|
|
46
|
-
`}hr(r){return`<hr>
|
|
47
|
-
`}list(r){let i=r.ordered,e=r.start,n="";for(let a=0;a<r.items.length;a++){let l=r.items[a];n+=this.listitem(l)}let t=i?"ol":"ul",s=i&&e!==1?' start="'+e+'"':"";return"<"+t+s+`>
|
|
48
|
-
`+n+"</"+t+`>
|
|
49
|
-
`}listitem(r){return`<li>${this.parser.parse(r.tokens)}</li>
|
|
50
|
-
`}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
|
|
51
|
-
`}table(r){let i="",e="";for(let t=0;t<r.header.length;t++)e+=this.tablecell(r.header[t]);i+=this.tablerow({text:e});let n="";for(let t=0;t<r.rows.length;t++){let s=r.rows[t];e="";for(let a=0;a<s.length;a++)e+=this.tablecell(s[a]);n+=this.tablerow({text:e})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
52
|
-
<thead>
|
|
53
|
-
`+i+`</thead>
|
|
54
|
-
`+n+`</table>
|
|
55
|
-
`}tablerow({text:r}){return`<tr>
|
|
56
|
-
${r}</tr>
|
|
57
|
-
`}tablecell(r){let i=this.parser.parseInline(r.tokens),e=r.header?"th":"td";return(r.align?`<${e} align="${r.align}">`:`<${e}>`)+i+`</${e}>
|
|
58
|
-
`}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${S(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:i,tokens:e}){let n=this.parser.parseInline(e),t=Jt(r);if(t===null)return n;r=t;let s='<a href="'+r+'"';return i&&(s+=' title="'+S(i)+'"'),s+=">"+n+"</a>",s}image({href:r,title:i,text:e,tokens:n}){n&&(e=this.parser.parseInline(n,this.parser.textRenderer));let t=Jt(r);if(t===null)return S(e);r=t;let s=`<img src="${r}" alt="${e}"`;return i&&(s+=` title="${S(i)}"`),s+=">",s}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:S(r.text)}},Xe=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}checkbox({raw:r}){return r}},v=class Le{options;renderer;textRenderer;constructor(i){this.options=i||D,this.options.renderer=this.options.renderer||new C,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Xe}static parse(i,e){return new Le(e).parse(i)}static parseInline(i,e){return new Le(e).parseInline(i)}parse(i){let e="";for(let n=0;n<i.length;n++){let t=i[n];if(this.options.extensions?.renderers?.[t.type]){let a=t,l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){e+=l||"";continue}}let s=t;switch(s.type){case"space":{e+=this.renderer.space(s);break}case"hr":{e+=this.renderer.hr(s);break}case"heading":{e+=this.renderer.heading(s);break}case"code":{e+=this.renderer.code(s);break}case"table":{e+=this.renderer.table(s);break}case"blockquote":{e+=this.renderer.blockquote(s);break}case"list":{e+=this.renderer.list(s);break}case"checkbox":{e+=this.renderer.checkbox(s);break}case"html":{e+=this.renderer.html(s);break}case"def":{e+=this.renderer.def(s);break}case"paragraph":{e+=this.renderer.paragraph(s);break}case"text":{e+=this.renderer.text(s);break}default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return e}parseInline(i,e=this.renderer){let n="";for(let t=0;t<i.length;t++){let s=i[t];if(this.options.extensions?.renderers?.[s.type]){let l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=l||"";continue}}let a=s;switch(a.type){case"escape":{n+=e.text(a);break}case"html":{n+=e.html(a);break}case"link":{n+=e.link(a);break}case"image":{n+=e.image(a);break}case"checkbox":{n+=e.checkbox(a);break}case"strong":{n+=e.strong(a);break}case"em":{n+=e.em(a);break}case"codespan":{n+=e.codespan(a);break}case"br":{n+=e.br(a);break}case"del":{n+=e.del(a);break}case"text":{n+=e.text(a);break}default:{let l='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}},ie=class{options;block;constructor(r){this.options=r||D}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(){return this.block?w.lex:w.lexInline}provideParser(){return this.block?v.parse:v.parseInline}},ti=class{defaults=ze();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=v;Renderer=C;TextRenderer=Xe;Lexer=w;Tokenizer=me;Hooks=ie;constructor(...r){this.use(...r)}walkTokens(r,i){let e=[];for(let n of r)switch(e=e.concat(i.call(this,n)),n.type){case"table":{let t=n;for(let s of t.header)e=e.concat(this.walkTokens(s.tokens,i));for(let s of t.rows)for(let a of s)e=e.concat(this.walkTokens(a.tokens,i));break}case"list":{let t=n;e=e.concat(this.walkTokens(t.items,i));break}default:{let t=n;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(s=>{let a=t[s].flat(1/0);e=e.concat(this.walkTokens(a,i))}):t.tokens&&(e=e.concat(this.walkTokens(t.tokens,i)))}}return e}use(...r){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(e=>{let n=b({},e);if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let s=i.renderers[t.name];s?i.renderers[t.name]=function(...a){let l=t.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:i.renderers[t.name]=t.renderer}if("tokenizer"in t){if(!t.level||t.level!=="block"&&t.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=i[t.level];s?s.unshift(t.tokenizer):i[t.level]=[t.tokenizer],t.start&&(t.level==="block"?i.startBlock?i.startBlock.push(t.start):i.startBlock=[t.start]:t.level==="inline"&&(i.startInline?i.startInline.push(t.start):i.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(i.childTokens[t.name]=t.childTokens)}),n.extensions=i),e.renderer){let t=this.defaults.renderer||new C(this.defaults);for(let s in e.renderer){if(!(s in t))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,l=e.renderer[a],o=t[a];t[a]=(...u)=>{let c=l.apply(t,u);return c===!1&&(c=o.apply(t,u)),c||""}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new me(this.defaults);for(let s in e.tokenizer){if(!(s in t))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,l=e.tokenizer[a],o=t[a];t[a]=(...u)=>{let c=l.apply(t,u);return c===!1&&(c=o.apply(t,u)),c}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new ie;for(let s in e.hooks){if(!(s in t))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,l=e.hooks[a],o=t[a];ie.passThroughHooks.has(s)?t[a]=u=>{if(this.defaults.async&&ie.passThroughHooksRespectAsync.has(s))return E(this,null,function*(){let p=yield l.call(t,u);return o.call(t,p)});let c=l.call(t,u);return o.call(t,c)}:t[a]=(...u)=>{if(this.defaults.async)return E(this,null,function*(){let p=yield l.apply(t,u);return p===!1&&(p=yield o.apply(t,u)),p});let c=l.apply(t,u);return c===!1&&(c=o.apply(t,u)),c}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,s=e.walkTokens;n.walkTokens=function(a){let l=[];return l.push(s.call(this,a)),t&&(l=l.concat(t.call(this,a))),l}}this.defaults=b(b({},this.defaults),n)}),this}setOptions(r){return this.defaults=b(b({},this.defaults),r),this}lexer(r,i){return w.lex(r,i??this.defaults)}parser(r,i){return v.parse(r,i??this.defaults)}parseMarkdown(r){return(i,e)=>{let n=b({},e),t=b(b({},this.defaults),n),s=this.onError(!!t.silent,!!t.async);if(this.defaults.async===!0&&n.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(t.hooks&&(t.hooks.options=t,t.hooks.block=r),t.async)return E(this,null,function*(){let a=t.hooks?yield t.hooks.preprocess(i):i,l=yield(t.hooks?yield t.hooks.provideLexer():r?w.lex:w.lexInline)(a,t),o=t.hooks?yield t.hooks.processAllTokens(l):l;t.walkTokens&&(yield Promise.all(this.walkTokens(o,t.walkTokens)));let u=yield(t.hooks?yield t.hooks.provideParser():r?v.parse:v.parseInline)(o,t);return t.hooks?yield t.hooks.postprocess(u):u}).catch(s);try{t.hooks&&(i=t.hooks.preprocess(i));let a=(t.hooks?t.hooks.provideLexer():r?w.lex:w.lexInline)(i,t);t.hooks&&(a=t.hooks.processAllTokens(a)),t.walkTokens&&this.walkTokens(a,t.walkTokens);let l=(t.hooks?t.hooks.provideParser():r?v.parse:v.parseInline)(a,t);return t.hooks&&(l=t.hooks.postprocess(l)),l}catch(a){return s(a)}}}onError(r,i){return e=>{if(e.message+=`
|
|
59
|
-
Please report this to https://github.com/markedjs/marked.`,r){let n="<p>An error occurred:</p><pre>"+S(e.message+"",!0)+"</pre>";return i?Promise.resolve(n):n}if(i)return Promise.reject(e);throw e}}},I=new ti;function g(r,i){return I.parse(r,i)}g.options=g.setOptions=function(r){return I.setOptions(r),g.defaults=I.defaults,nn(g.defaults),g};g.getDefaults=ze;g.defaults=D;g.use=function(...r){return I.use(...r),g.defaults=I.defaults,nn(g.defaults),g};g.walkTokens=function(r,i){return I.walkTokens(r,i)};g.parseInline=I.parseInline;g.Parser=v;g.parser=v.parse;g.Renderer=C;g.TextRenderer=Xe;g.Lexer=w;g.lexer=w.lex;g.Tokenizer=me;g.Hooks=ie;g.parse=g;var Ai=g.options,Oi=g.setOptions,$i=g.use,Li=g.walkTokens,zi=g.parseInline;var Ni=v.parse,Fi=w.lex;var ii=["*"],ri="Copy",si="Copied",ai=(()=>{class r{constructor(){this._buttonClick$=new M,this.copied=Pt(this._buttonClick$.pipe(j(()=>A(H(!0),et(3e3).pipe(it(!1)))),rt(),st(1))),this.copiedText=Ct(()=>this.copied()?si:ri)}onCopyToClipboardClick(){this._buttonClick$.next()}static{this.\u0275fac=function(n){return new(n||r)}}static{this.\u0275cmp=$({type:r,selectors:[["markdown-clipboard"]],decls:2,vars:3,consts:[[1,"markdown-clipboard-button",3,"click"]],template:function(n,t){n&1&&(Q(0,"button",0),he("click",function(){return t.onCopyToClipboardClick()}),Tt(1),ue()),n&2&&(J("copied",t.copied()),Z(),Rt(t.copiedText()))},encapsulation:2,changeDetection:0})}}return r})(),oi=new y("CLIPBOARD_OPTIONS");var li=new y("MARKED_EXTENSIONS"),ci=new y("MARKED_OPTIONS"),ui=new y("MERMAID_OPTIONS"),hi=new y("SANITIZE");function pi(r){return typeof r=="function"}var di="[ngx-markdown] When using the `emoji` attribute you *have to* include Emoji-Toolkit files to `angular.json` or use imports. See README for more information",mi="[ngx-markdown] When using the `katex` attribute you *have to* include KaTeX files to `angular.json` or use imports. See README for more information",gi="[ngx-markdown] When using the `mermaid` attribute you *have to* include Mermaid files to `angular.json` or use imports. See README for more information",fi="[ngx-markdown] When using the `clipboard` attribute you *have to* include Clipboard files to `angular.json` or use imports. See README for more information",bi="[ngx-markdown] When using the `clipboard` attribute you *have to* provide the `viewContainerRef` parameter to `MarkdownService.render()` function",ki="[ngx-markdown] When using the `src` attribute you *have to* pass the `HttpClient` as a parameter of the `forRoot` method. See README for more information";var mn=(()=>{class r{get options(){return this._options}set options(e){this._options=b(b({},this.DEFAULT_MARKED_OPTIONS),e)}get renderer(){return this.options.renderer}set renderer(e){this.options.renderer=e}constructor(){this.clipboardOptions=d(oi,{optional:!0}),this.extensions=d(li,{optional:!0}),this.http=d(Et,{optional:!0}),this.mermaidOptions=d(ui,{optional:!0}),this.platform=d(ht),this.sanitize=d(hi,{optional:!0}),this.sanitizer=d(It),this.DEFAULT_MARKED_OPTIONS={renderer:new C},this.DEFAULT_KATEX_OPTIONS={delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}]},this.DEFAULT_MERMAID_OPTIONS={startOnLoad:!1},this.DEFAULT_CLIPBOARD_OPTIONS={buttonComponent:void 0},this.DEFAULT_PARSE_OPTIONS={decodeHtml:!1,inline:!1,emoji:!1,mermaid:!1,markedOptions:void 0,disableSanitizer:!1},this.DEFAULT_RENDER_OPTIONS={clipboard:!1,clipboardOptions:void 0,katex:!1,katexOptions:void 0,mermaid:!1,mermaidOptions:void 0},this.DEFAULT_SECURITY_CONTEXT=ve.HTML,this._options=null,this._reload$=new M,this.reload$=this._reload$.asObservable(),this.options=d(ci,{optional:!0})}parse(e,n=this.DEFAULT_PARSE_OPTIONS){let{decodeHtml:t,inline:s,emoji:a,mermaid:l,disableSanitizer:o}=n,u=b(b({},this.options),n.markedOptions),c=u.renderer||this.renderer||new C;this.extensions&&(this.renderer=this.extendsRendererForExtensions(c)),l&&(this.renderer=this.extendsRendererForMermaid(c));let p=this.trimIndentation(e),h=t?this.decodeHtml(p):p,k=a?this.parseEmoji(h):h,m=this.parseMarked(k,u,s);return o?m:this.sanitizeHtml(m)}render(e,n=this.DEFAULT_RENDER_OPTIONS,t){let{clipboard:s,clipboardOptions:a,katex:l,katexOptions:o,mermaid:u,mermaidOptions:c}=n;l&&this.renderKatex(e,b(b({},this.DEFAULT_KATEX_OPTIONS),o)),u&&this.renderMermaid(e,b(b(b({},this.DEFAULT_MERMAID_OPTIONS),this.mermaidOptions),c)),s&&this.renderClipboard(e,t,b(b(b({},this.DEFAULT_CLIPBOARD_OPTIONS),this.clipboardOptions),a)),this.highlight(e)}reload(){this._reload$.next()}getSource(e){if(!this.http)throw new Error(ki);return this.http.get(e,{responseType:"text"}).pipe(Je(n=>this.handleExtension(e,n)))}highlight(e){if(!P(this.platform)||typeof Prism>"u"||typeof Prism.highlightAllUnder>"u")return;e||(e=document);let n=e.querySelectorAll('pre code:not([class*="language-"])');Array.prototype.forEach.call(n,t=>t.classList.add("language-none")),Prism.highlightAllUnder(e)}decodeHtml(e){if(!P(this.platform))return e;let n=document.createElement("textarea");return n.innerHTML=e,n.value}extendsRendererForExtensions(e){let n=e;return n.\u0275NgxMarkdownRendererExtendedForExtensions===!0||(this.extensions&&this.extensions.length>0&&g.use(...this.extensions),n.\u0275NgxMarkdownRendererExtendedForExtensions=!0),e}extendsRendererForMermaid(e){let n=e;if(n.\u0275NgxMarkdownRendererExtendedForMermaid===!0)return e;let t=e.code;return e.code=s=>s.lang==="mermaid"?`<div class="mermaid">${s.text}</div>`:t(s),n.\u0275NgxMarkdownRendererExtendedForMermaid=!0,e}handleExtension(e,n){let t=e.lastIndexOf("://"),s=t>-1?e.substring(t+4):e,a=s.lastIndexOf("/"),l=a>-1?s.substring(a+1).split("?")[0]:"",o=l.lastIndexOf("."),u=o>-1?l.substring(o+1):"";return u&&u!=="md"?"```"+u+`
|
|
60
|
-
`+n+"\n```":n}parseMarked(e,n,t=!1){if(n.renderer){let s=b({},n.renderer);delete s.\u0275NgxMarkdownRendererExtendedForExtensions,delete s.\u0275NgxMarkdownRendererExtendedForMermaid,delete n.renderer,g.use({renderer:s})}return t?g.parseInline(e,n):g.parse(e,n)}parseEmoji(e){if(!P(this.platform))return e;if(typeof joypixels>"u"||typeof joypixels.shortnameToUnicode>"u")throw new Error(di);return joypixels.shortnameToUnicode(e)}renderKatex(e,n){if(P(this.platform)){if(typeof katex>"u"||typeof renderMathInElement>"u")throw new Error(mi);renderMathInElement(e,n)}}renderClipboard(e,n,t){if(!P(this.platform))return;if(typeof ClipboardJS>"u")throw new Error(fi);if(!n)throw new Error(bi);let{buttonComponent:s,buttonTemplate:a}=t,l=e.querySelectorAll("pre");for(let o=0;o<l.length;o++){let u=l.item(o),c=document.createElement("div");c.style.position="relative",u.parentNode.insertBefore(c,u),c.appendChild(u);let p=document.createElement("div");p.classList.add("markdown-clipboard-toolbar"),p.style.position="absolute",p.style.top=".5em",p.style.right=".5em",p.style.zIndex="1",c.insertAdjacentElement("beforeend",p),c.onmouseenter=()=>p.classList.add("hover"),c.onmouseleave=()=>p.classList.remove("hover");let h;if(s){let m=n.createComponent(s);h=m.hostView,m.changeDetectorRef.markForCheck()}else if(a)h=n.createEmbeddedView(a);else{let m=n.createComponent(ai);h=m.hostView,m.changeDetectorRef.markForCheck()}let k;h.rootNodes.forEach(m=>{p.appendChild(m),k=new ClipboardJS(m,{text:()=>u.innerText})}),h.onDestroy(()=>k.destroy())}}renderMermaid(e,n=this.DEFAULT_MERMAID_OPTIONS){if(!P(this.platform))return;if(typeof mermaid>"u"||typeof mermaid.initialize>"u")throw new Error(gi);let t=e.querySelectorAll(".mermaid");t.length!==0&&(mermaid.initialize(n),mermaid.run({nodes:t}))}trimIndentation(e){if(!e)return"";let n;return e.split(`
|
|
61
|
-
`).map(t=>{let s=n;return t.length>0&&(s=isNaN(s)?t.search(/\S|$/):Math.min(t.search(/\S|$/),s)),isNaN(n)&&(n=s),s?t.substring(s):t}).join(`
|
|
62
|
-
`)}sanitizeHtml(e){return E(this,null,function*(){return pi(this.sanitize)?this.sanitize(yield e):this.sanitize!==ve.NONE?this.sanitizer.sanitize(this.sanitize??this.DEFAULT_SECURITY_CONTEXT,e)??"":e})}static{this.\u0275fac=function(n){return new(n||r)}}static{this.\u0275prov=at({token:r,factory:r.\u0275fac})}}return r})(),Ze=(function(r){return r.CommandLine="command-line",r.LineHighlight="line-highlight",r.LineNumbers="line-numbers",r})(Ze||{}),ur=(()=>{class r{constructor(){this.element=d(O),this.markdownService=d(mn),this.viewContainerRef=d(V),this.error=new R,this.load=new R,this.ready=new R,this._clipboard=!1,this._commandLine=!1,this._disableSanitizer=!1,this._emoji=!1,this._inline=!1,this._katex=!1,this._lineHighlight=!1,this._lineNumbers=!1,this._mermaid=!1,this.destroyed$=new M}get disableSanitizer(){return this._disableSanitizer}set disableSanitizer(e){this._disableSanitizer=this.coerceBooleanProperty(e)}get inline(){return this._inline}set inline(e){this._inline=this.coerceBooleanProperty(e)}get clipboard(){return this._clipboard}set clipboard(e){this._clipboard=this.coerceBooleanProperty(e)}get emoji(){return this._emoji}set emoji(e){this._emoji=this.coerceBooleanProperty(e)}get katex(){return this._katex}set katex(e){this._katex=this.coerceBooleanProperty(e)}get mermaid(){return this._mermaid}set mermaid(e){this._mermaid=this.coerceBooleanProperty(e)}get lineHighlight(){return this._lineHighlight}set lineHighlight(e){this._lineHighlight=this.coerceBooleanProperty(e)}get lineNumbers(){return this._lineNumbers}set lineNumbers(e){this._lineNumbers=this.coerceBooleanProperty(e)}get commandLine(){return this._commandLine}set commandLine(e){this._commandLine=this.coerceBooleanProperty(e)}ngOnChanges(){this.loadContent()}loadContent(){if(this.data!=null){this.handleData();return}if(this.src!=null){this.handleSrc();return}}ngAfterViewInit(){!this.data&&!this.src&&this.handleTransclusion(),this.markdownService.reload$.pipe(le(this.destroyed$)).subscribe(()=>this.loadContent())}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}render(e,n=!1){return E(this,null,function*(){let t={decodeHtml:n,inline:this.inline,emoji:this.emoji,mermaid:this.mermaid,disableSanitizer:this.disableSanitizer},s={clipboard:this.clipboard,clipboardOptions:this.getClipboardOptions(),katex:this.katex,katexOptions:this.katexOptions,mermaid:this.mermaid,mermaidOptions:this.mermaidOptions},a=yield this.markdownService.parse(e,t);this.element.nativeElement.innerHTML=a,this.handlePlugins(),this.markdownService.render(this.element.nativeElement,s,this.viewContainerRef),this.ready.emit()})}coerceBooleanProperty(e){return e!=null&&`${String(e)}`!="false"}getClipboardOptions(){if(this.clipboardButtonComponent||this.clipboardButtonTemplate)return{buttonComponent:this.clipboardButtonComponent,buttonTemplate:this.clipboardButtonTemplate}}handleData(){this.render(this.data)}handleSrc(){this.markdownService.getSource(this.src).subscribe({next:e=>{this.render(e).then(()=>{this.load.emit(e)})},error:e=>this.error.emit(e)})}handleTransclusion(){this.render(this.element.nativeElement.innerHTML,!0)}handlePlugins(){this.commandLine&&(this.setPluginClass(this.element.nativeElement,Ze.CommandLine),this.setPluginOptions(this.element.nativeElement,{dataFilterOutput:this.filterOutput,dataHost:this.host,dataPrompt:this.prompt,dataOutput:this.output,dataUser:this.user})),this.lineHighlight&&this.setPluginOptions(this.element.nativeElement,{dataLine:this.line,dataLineOffset:this.lineOffset}),this.lineNumbers&&(this.setPluginClass(this.element.nativeElement,Ze.LineNumbers),this.setPluginOptions(this.element.nativeElement,{dataStart:this.start}))}setPluginClass(e,n){let t=e.querySelectorAll("pre");for(let s=0;s<t.length;s++){let a=n instanceof Array?n:[n];t.item(s).classList.add(...a)}}setPluginOptions(e,n){let t=e.querySelectorAll("pre");for(let s=0;s<t.length;s++)Object.keys(n).forEach(a=>{let l=n[a];if(l){let o=this.toLispCase(a);t.item(s).setAttribute(o,l.toString())}})}toLispCase(e){let n=e.match(/([A-Z])/g);if(!n)return e;let t=e.toString();for(let s=0,a=n.length;s<a;s++)t=t.replace(new RegExp(n[s]),"-"+n[s].toLowerCase());return t.slice(0,1)==="-"&&(t=t.slice(1)),t}static{this.\u0275fac=function(n){return new(n||r)}}static{this.\u0275cmp=$({type:r,selectors:[["markdown"],["","markdown",""]],inputs:{data:"data",src:"src",disableSanitizer:"disableSanitizer",inline:"inline",clipboard:"clipboard",clipboardButtonComponent:"clipboardButtonComponent",clipboardButtonTemplate:"clipboardButtonTemplate",emoji:"emoji",katex:"katex",katexOptions:"katexOptions",mermaid:"mermaid",mermaidOptions:"mermaidOptions",lineHighlight:"lineHighlight",line:"line",lineOffset:"lineOffset",lineNumbers:"lineNumbers",start:"start",commandLine:"commandLine",filterOutput:"filterOutput",host:"host",prompt:"prompt",output:"output",user:"user"},outputs:{error:"error",load:"load",ready:"ready"},features:[ct],ngContentSelectors:ii,decls:1,vars:0,template:function(n,t){n&1&&(W(),z(0))},encapsulation:2})}}return r})();function hr(r){return[mn,r?.loader??[],r?.clipboardOptions??[],r?.markedOptions??[],r?.mermaidOptions??[],r?.markedExtensions??[],r?.sanitize??[]]}var Mi=["mat-menu-item",""],Si=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],Ti=["mat-icon, [matMenuItemIcon]","*"];function Ri(r,i){r&1&&(ot(),Te(0,"svg",2),Ce(1,"polygon",3),Re())}var Ci=["*"];function Ei(r,i){if(r&1){let e=yt();Q(0,"div",0),he("click",function(){q(e);let t=L();return U(t.closed.emit("click"))})("animationstart",function(t){q(e);let s=L();return U(s._onAnimationStart(t.animationName))})("animationend",function(t){q(e);let s=L();return U(s._onAnimationDone(t.animationName))})("animationcancel",function(t){q(e);let s=L();return U(s._onAnimationDone(t.animationName))}),Q(1,"div",1),z(2),ue()()}if(r&2){let e=L();St(e._classList),J("mat-menu-panel-animations-disabled",e._animationsDisabled)("mat-menu-panel-exit-animation",e._panelAnimationState==="void")("mat-menu-panel-animating",e._isAnimating()),wt("id",e.panelId),Y("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}var Qe=new y("MAT_MENU_PANEL"),Ye=(()=>{class r{_elementRef=d(O);_document=d(ye);_focusMonitor=d(Ie);_parentMenu=d(Qe,{optional:!0});_changeDetectorRef=d(ee);role="menuitem";disabled=!1;disableRipple=!1;_hovered=new M;_focused=new M;_highlighted=!1;_triggersSubmenu=!1;constructor(){d(Ot).load(Ft),this._parentMenu?.addItem?.(this)}focus(e,n){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,n):this._getHostElement().focus(n),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let e=this._elementRef.nativeElement.cloneNode(!0),n=e.querySelectorAll("mat-icon, .material-icons");for(let t=0;t<n.length;t++)n[t].remove();return e.textContent?.trim()||""}_setHighlighted(e){this._highlighted=e,this._changeDetectorRef.markForCheck()}_setTriggersSubmenu(e){this._triggersSubmenu=e,this._changeDetectorRef.markForCheck()}_hasFocus(){return this._document&&this._document.activeElement===this._getHostElement()}static \u0275fac=function(n){return new(n||r)};static \u0275cmp=$({type:r,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-mdc-menu-item","mat-focus-indicator"],hostVars:8,hostBindings:function(n,t){n&1&&Ee("click",function(a){return t._checkDisabled(a)})("mouseenter",function(){return t._handleMouseEnter()}),n&2&&(Y("role",t.role)("tabindex",t._getTabIndex())("aria-disabled",t.disabled)("disabled",t.disabled||null),J("mat-mdc-menu-item-highlighted",t._highlighted)("mat-mdc-menu-item-submenu-trigger",t._triggersSubmenu))},inputs:{role:"role",disabled:[2,"disabled","disabled",N],disableRipple:[2,"disableRipple","disableRipple",N]},exportAs:["matMenuItem"],attrs:Mi,ngContentSelectors:Ti,decls:5,vars:3,consts:[[1,"mat-mdc-menu-item-text"],["matRipple","",1,"mat-mdc-menu-ripple",3,"matRippleDisabled","matRippleTrigger"],["viewBox","0 0 5 10","focusable","false","aria-hidden","true",1,"mat-mdc-menu-submenu-icon"],["points","0,0 5,5 0,10"]],template:function(n,t){n&1&&(W(Si),z(0),Te(1,"span",0),z(2,1),Re(),Ce(3,"div",1),kt(4,Ri,2,0,":svg:svg",2)),n&2&&(Z(3),xt("matRippleDisabled",t.disableRipple||t.disabled)("matRippleTrigger",t._getHostElement()),Z(),_t(t._triggersSubmenu?4:-1))},dependencies:[Nt],encapsulation:2,changeDetection:0})}return r})();var bn=new y("MatMenuContent"),jr=(()=>{class r{_template=d(Me);_appRef=d(bt);_injector=d(X);_viewContainerRef=d(V);_document=d(ye);_changeDetectorRef=d(ee);_portal;_outlet;_attached=new M;constructor(){}attach(e={}){this._portal||(this._portal=new Ae(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new qt(this._document.createElement("div"),this._appRef,this._injector));let n=this._template.elementRef.nativeElement;n.parentNode.insertBefore(this._outlet.outletElement,n),this._changeDetectorRef.markForCheck(),this._portal.attach(this._outlet,e),this._attached.next()}detach(){this._portal?.isAttached&&this._portal.detach()}ngOnDestroy(){this.detach(),this._outlet?.dispose()}static \u0275fac=function(n){return new(n||r)};static \u0275dir=ce({type:r,selectors:[["ng-template","matMenuContent",""]],features:[Pe([{provide:bn,useExisting:r}])]})}return r})(),Pi=new y("mat-menu-default-options",{providedIn:"root",factory:()=>({overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"})}),Ve="_mat-menu-enter",be="_mat-menu-exit",ke=(()=>{class r{_elementRef=d(O);_changeDetectorRef=d(ee);_injector=d(X);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled=De();_allItems;_directDescendantItems=new ut;_classList={};_panelAnimationState="void";_animationDone=new M;_isAnimating=lt(!1);parentMenu;direction;overlayPanelClass;backdropClass;ariaLabel;ariaLabelledby;ariaDescribedby;get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses()}templateRef;items;lazyContent;overlapTrigger=!1;hasBackdrop;set panelClass(e){let n=this._previousPanelClass,t=b({},this._classList);n&&n.length&&n.split(" ").forEach(s=>{t[s]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(s=>{t[s]=!0}),this._elementRef.nativeElement.className=""),this._classList=t}_previousPanelClass;get classList(){return this.panelClass}set classList(e){this.panelClass=e}closed=new R;close=this.closed;panelId=d($t).getId("mat-menu-panel-");constructor(){let e=d(Pi);this.overlayPanelClass=e.overlayPanelClass||"",this._xPosition=e.xPosition,this._yPosition=e.yPosition,this.backdropClass=e.backdropClass,this.overlapTrigger=e.overlapTrigger,this.hasBackdrop=e.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new zt(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(oe(this._directDescendantItems),j(e=>A(...e.map(n=>n._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let n=this._keyManager;if(this._panelAnimationState==="enter"&&n.activeItem?._hasFocus()){let t=e.toArray(),s=Math.max(0,Math.min(t.length-1,n.activeItemIndex||0));t[s]&&!t[s].disabled?n.setActiveItem(s):n.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy(),clearTimeout(this._exitFallbackTimeout)}_hovered(){return this._directDescendantItems.changes.pipe(oe(this._directDescendantItems),j(n=>A(...n.map(t=>t._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let n=e.keyCode,t=this._keyManager;switch(n){case 27:Lt(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(n===38||n===40)&&t.setFocusOrigin("keyboard"),t.onKeydown(e);return}}focusFirstItem(e="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=pt(()=>{let n=this._resolvePanel();if(!n||!n.contains(document.activeElement)){let t=this._keyManager;t.setFocusOrigin(e).setFirstItemActive(),!t.activeItem&&n&&n.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){}setPositionClasses(e=this.xPosition,n=this.yPosition){this._classList=T(b({},this._classList),{"mat-menu-before":e==="before","mat-menu-after":e==="after","mat-menu-above":n==="above","mat-menu-below":n==="below"}),this._changeDetectorRef.markForCheck()}_onAnimationDone(e){let n=e===be;(n||e===Ve)&&(n&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(n?"void":"enter"),this._isAnimating.set(!1))}_onAnimationStart(e){(e===Ve||e===be)&&this._isAnimating.set(!0)}_setIsOpen(e){if(this._panelAnimationState=e?"enter":"void",e){if(this._keyManager.activeItemIndex===0){let n=this._resolvePanel();n&&(n.scrollTop=0)}}else this._animationsDisabled||(this._exitFallbackTimeout=setTimeout(()=>this._onAnimationDone(be),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(e?Ve:be)}),this._changeDetectorRef.markForCheck()}_updateDirectDescendants(){this._allItems.changes.pipe(oe(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(n=>n._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}_resolvePanel(){let e=null;return this._directDescendantItems.length&&(e=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),e}static \u0275fac=function(n){return new(n||r)};static \u0275cmp=$({type:r,selectors:[["mat-menu"]],contentQueries:function(n,t,s){if(n&1&&vt(s,bn,5)(s,Ye,5)(s,Ye,4),n&2){let a;K(a=G())&&(t.lazyContent=a.first),K(a=G())&&(t._allItems=a),K(a=G())&&(t.items=a)}},viewQuery:function(n,t){if(n&1&&Mt(Me,5),n&2){let s;K(s=G())&&(t.templateRef=s.first)}},hostVars:3,hostBindings:function(n,t){n&2&&Y("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",N],hasBackdrop:[2,"hasBackdrop","hasBackdrop",e=>e==null?null:N(e)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],features:[Pe([{provide:Qe,useExisting:r}])],ngContentSelectors:Ci,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel",3,"click","animationstart","animationend","animationcancel","id"],[1,"mat-mdc-menu-content"]],template:function(n,t){n&1&&(W(),ft(0,Ei,3,12,"ng-template"))},styles:[`mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-menu-item-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-menu-item-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-menu-item-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-menu-item-label-text-weight, var(--mat-sys-label-large-weight))}@keyframes _mat-menu-enter{from{opacity:0;transform:scale(0.8)}to{opacity:1;transform:none}}@keyframes _mat-menu-exit{from{opacity:1}to{opacity:0}}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;box-sizing:border-box;outline:0;animation:_mat-menu-enter 120ms cubic-bezier(0, 0, 0.2, 1);border-radius:var(--mat-menu-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-menu-container-color, var(--mat-sys-surface-container));box-shadow:var(--mat-menu-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));will-change:transform,opacity}.mat-mdc-menu-panel.mat-menu-panel-exit-animation{animation:_mat-menu-exit 100ms 25ms linear forwards}.mat-mdc-menu-panel.mat-menu-panel-animations-disabled{animation:none}.mat-mdc-menu-panel.mat-menu-panel-animating{pointer-events:none}.mat-mdc-menu-panel.mat-menu-panel-animating:has(.mat-mdc-menu-content:empty){display:none}@media(forced-colors: active){.mat-mdc-menu-panel{outline:solid 1px}}.mat-mdc-menu-panel .mat-divider{border-top-color:var(--mat-menu-divider-color, var(--mat-sys-surface-variant));margin-bottom:var(--mat-menu-divider-bottom-spacing, 8px);margin-top:var(--mat-menu-divider-top-spacing, 8px)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px;padding-left:var(--mat-menu-item-leading-spacing, 12px);padding-right:var(--mat-menu-item-trailing-spacing, 12px);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-menu-item::-moz-focus-inner{border:0}[dir=rtl] .mat-mdc-menu-item{padding-left:var(--mat-menu-item-trailing-spacing, 12px);padding-right:var(--mat-menu-item-leading-spacing, 12px)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-trailing-spacing, 12px)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-trailing-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-leading-spacing, 12px)}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing, 12px);height:var(--mat-menu-item-icon-size, 24px);width:var(--mat-menu-item-icon-size, 24px)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing, 12px)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}@media(forced-colors: active){.mat-mdc-menu-item{margin-top:1px}}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size, 24px);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing, 12px)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing, 12px);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1);transform-origin:center}@media(forced-colors: active){.mat-mdc-menu-submenu-icon{fill:CanvasText}}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}
|
|
63
|
-
`],encapsulation:2,changeDetection:0})}return r})(),Ii=new y("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let r=d(X);return()=>Xt(r)}});var F=new WeakMap,Di=(()=>{class r{_canHaveBackdrop;_element=d(O);_viewContainerRef=d(V);_menuItemInstance=d(Ye,{optional:!0,self:!0});_dir=d(Bt,{optional:!0});_focusMonitor=d(Ie);_ngZone=d(we);_injector=d(X);_scrollStrategy=d(Ii);_changeDetectorRef=d(ee);_animationsDisabled=De();_portal;_overlayRef=null;_menuOpen=!1;_closingActionsSubscription=ae.EMPTY;_menuCloseSubscription=ae.EMPTY;_pendingRemoval;_parentMaterialMenu;_parentInnerPadding;_openedBy=void 0;get _menu(){return this._menuInternal}set _menu(e){e!==this._menuInternal&&(this._menuInternal=e,this._menuCloseSubscription.unsubscribe(),e&&(this._parentMaterialMenu,this._menuCloseSubscription=e.close.subscribe(n=>{this._destroyMenu(n),(n==="click"||n==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(n)})),this._menuItemInstance?._setTriggersSubmenu(this._triggersSubmenu()))}_menuInternal=null;constructor(e){this._canHaveBackdrop=e;let n=d(Qe,{optional:!0});this._parentMaterialMenu=n instanceof ke?n:void 0}ngOnDestroy(){this._menu&&this._ownsMenu(this._menu)&&F.delete(this._menu),this._pendingRemoval?.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null)}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this._menu)}_closeMenu(){this._menu?.close.emit()}_openMenu(e){if(this._triggerIsAriaDisabled())return;let n=this._menu;if(this._menuOpen||!n)return;this._pendingRemoval?.unsubscribe();let t=F.get(n);F.set(n,this),t&&t!==this&&t._closeMenu();let s=this._createOverlay(n),a=s.getConfig(),l=a.positionStrategy;this._setPosition(n,l),this._canHaveBackdrop?a.hasBackdrop=n.hasBackdrop==null?!this._triggersSubmenu():n.hasBackdrop:a.hasBackdrop=!1,s.hasAttached()||(s.attach(this._getPortal(n)),n.lazyContent?.attach(this.menuData)),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this._closeMenu()),n.parentMenu=this._triggersSubmenu()?this._parentMaterialMenu:void 0,n.direction=this.dir,e&&n.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0),n instanceof ke&&(n._setIsOpen(!0),n._directDescendantItems.changes.pipe(le(n.close)).subscribe(()=>{l.withLockedPosition(!1).reapplyLastPosition(),l.withLockedPosition(!0)}))}focus(e,n){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,n):this._element.nativeElement.focus(n)}_destroyMenu(e){let n=this._overlayRef,t=this._menu;!n||!this.menuOpen||(this._closingActionsSubscription.unsubscribe(),this._pendingRemoval?.unsubscribe(),t instanceof ke&&this._ownsMenu(t)?(this._pendingRemoval=t._animationDone.pipe(nt(1)).subscribe(()=>{n.detach(),F.has(t)||t.lazyContent?.detach()}),t._setIsOpen(!1)):(n.detach(),t?.lazyContent?.detach()),t&&this._ownsMenu(t)&&F.delete(t),this.restoreFocus&&(e==="keydown"||!this._openedBy||!this._triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,this._setIsMenuOpen(!1))}_setIsMenuOpen(e){e!==this._menuOpen&&(this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this._triggersSubmenu()&&this._menuItemInstance._setHighlighted(e),this._changeDetectorRef.markForCheck())}_createOverlay(e){if(!this._overlayRef){let n=this._getOverlayConfig(e);this._subscribeToPositions(e,n.positionStrategy),this._overlayRef=Yt(this._injector,n),this._overlayRef.keydownEvents().subscribe(t=>{this._menu instanceof ke&&this._menu._handleKeydown(t)})}return this._overlayRef}_getOverlayConfig(e){return new Zt({positionStrategy:Vt(this._injector,this._getOverlayOrigin()).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:e.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:e.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir||"ltr",disableAnimations:this._animationsDisabled})}_subscribeToPositions(e,n){e.setPositionClasses&&n.positionChanges.subscribe(t=>{this._ngZone.run(()=>{let s=t.connectionPair.overlayX==="start"?"after":"before",a=t.connectionPair.overlayY==="top"?"below":"above";e.setPositionClasses(s,a)})})}_setPosition(e,n){let[t,s]=e.xPosition==="before"?["end","start"]:["start","end"],[a,l]=e.yPosition==="above"?["bottom","top"]:["top","bottom"],[o,u]=[a,l],[c,p]=[t,s],h=0;if(this._triggersSubmenu()){if(p=t=e.xPosition==="before"?"start":"end",s=c=t==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let k=this._parentMaterialMenu.items.first;this._parentInnerPadding=k?k._getHostElement().offsetTop:0}h=a==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(o=a==="top"?"bottom":"top",u=l==="top"?"bottom":"top");n.withPositions([{originX:t,originY:o,overlayX:c,overlayY:a,offsetY:h},{originX:s,originY:o,overlayX:p,overlayY:a,offsetY:h},{originX:t,originY:u,overlayX:c,overlayY:l,offsetY:-h},{originX:s,originY:u,overlayX:p,overlayY:l,offsetY:-h}])}_menuClosingActions(){let e=this._getOutsideClickStream(this._overlayRef),n=this._overlayRef.detachments(),t=this._parentMaterialMenu?this._parentMaterialMenu.closed:H(),s=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(tt(a=>this._menuOpen&&a!==this._menuItemInstance)):H();return A(e,t,s,n)}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new Ae(e.templateRef,this._viewContainerRef)),this._portal}_ownsMenu(e){return F.get(e)===this}_triggerIsAriaDisabled(){return N(this._element.nativeElement.getAttribute("aria-disabled"))}static \u0275fac=function(n){mt()};static \u0275dir=ce({type:r})}return r})(),qr=(()=>{class r extends Di{_cleanupTouchstart;_hoverSubscription=ae.EMPTY;get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(e){this.menu=e}get menu(){return this._menu}set menu(e){this._menu=e}menuData;restoreFocus=!0;menuOpened=new R;onMenuOpen=this.menuOpened;menuClosed=new R;onMenuClose=this.menuClosed;constructor(){super(!0);let e=d(dt);this._cleanupTouchstart=e.listen(this._element.nativeElement,"touchstart",n=>{At(n)||(this._openedBy="touch")},{passive:!0})}triggersSubmenu(){return super._triggersSubmenu()}toggleMenu(){return this.menuOpen?this.closeMenu():this.openMenu()}openMenu(){this._openMenu(!0)}closeMenu(){this._closeMenu()}updatePosition(){this._overlayRef?.updatePosition()}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTouchstart(),this._hoverSubscription.unsubscribe()}_getOverlayOrigin(){return this._element}_getOutsideClickStream(e){return e.backdropClick()}_handleMousedown(e){Dt(e)||(this._openedBy=e.button===0?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){let n=e.keyCode;(n===13||n===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(n===39&&this.dir==="ltr"||n===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().subscribe(e=>{e===this._menuItemInstance&&!e.disabled&&this._parentMaterialMenu?._panelAnimationState!=="void"&&(this._openedBy="mouse",this._openMenu(!1))}))}static \u0275fac=function(n){return new(n||r)};static \u0275dir=ce({type:r,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(n,t){n&1&&Ee("click",function(a){return t._handleClick(a)})("mousedown",function(a){return t._handleMousedown(a)})("keydown",function(a){return t._handleKeydown(a)}),n&2&&Y("aria-haspopup",t.menu?"menu":null)("aria-expanded",t.menuOpen)("aria-controls",t.menuOpen?t.menu==null?null:t.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],features:[gt]})}return r})();var Ur=(()=>{class r{static \u0275fac=function(n){return new(n||r)};static \u0275mod=Se({type:r});static \u0275inj=xe({imports:[jt,Qt,Ht,Ut]})}return r})();export{ur as a,hr as b,Ye as c,jr as d,ke as e,qr as f,Ur as g};
|