{"version":3,"sources":["../../src/server/accept-header.ts"],"names":["acceptLanguage","parse","raw","preferences","options","lowers","Map","header","replace","pos","preference","lower","toLowerCase","set","orig","prefixMatch","parts","split","pop","length","joined","join","has","selections","map","Set","i","part","params","Error","type","token","selection","q","pref","get","add","key","value","score","parseFloat","Number","isFinite","push","sort","a","b","undefined","values","preferred"],"mappings":";;;;+BAiIgBA;;;eAAAA;;;AArHhB,SAASC,MACPC,GAAW,EACXC,WAAiC,EACjCC,OAAgB;IAEhB,MAAMC,SAAS,IAAIC;IACnB,MAAMC,SAASL,IAAIM,OAAO,CAAC,UAAU;IAErC,IAAIL,aAAa;QACf,IAAIM,MAAM;QACV,KAAK,MAAMC,cAAcP,YAAa;YACpC,MAAMQ,QAAQD,WAAWE,WAAW;YACpCP,OAAOQ,GAAG,CAACF,OAAO;gBAAEG,MAAMJ;gBAAYD,KAAKA;YAAM;YACjD,IAAIL,QAAQW,WAAW,EAAE;gBACvB,MAAMC,QAAQL,MAAMM,KAAK,CAAC;gBAC1B,MAAQD,MAAME,GAAG,IAAIF,MAAMG,MAAM,GAAG,EAAI;oBACtC,MAAMC,SAASJ,MAAMK,IAAI,CAAC;oBAC1B,IAAI,CAAChB,OAAOiB,GAAG,CAACF,SAAS;wBACvBf,OAAOQ,GAAG,CAACO,QAAQ;4BAAEN,MAAMJ;4BAAYD,KAAKA;wBAAM;oBACpD;gBACF;YACF;QACF;IACF;IAEA,MAAMO,QAAQT,OAAOU,KAAK,CAAC;IAC3B,MAAMM,aAA0B,EAAE;IAClC,MAAMC,MAAM,IAAIC;IAEhB,IAAK,IAAIC,IAAI,GAAGA,IAAIV,MAAMG,MAAM,EAAE,EAAEO,EAAG;QACrC,MAAMC,OAAOX,KAAK,CAACU,EAAE;QACrB,IAAI,CAACC,MAAM;YACT;QACF;QAEA,MAAMC,SAASD,KAAKV,KAAK,CAAC;QAC1B,IAAIW,OAAOT,MAAM,GAAG,GAAG;YACrB,MAAM,IAAIU,MAAM,CAAC,QAAQ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