@sap/cds 8.4.2 → 8.5.0
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/CHANGELOG.md +35 -1
- package/_i18n/messages.properties +99 -0
- package/bin/serve.js +2 -2
- package/lib/compile/cdsc.js +9 -4
- package/lib/compile/to/srvinfo.js +4 -4
- package/lib/core/entities.js +1 -0
- package/lib/core/types.js +1 -1
- package/lib/dbs/cds-deploy.js +4 -1
- package/lib/env/defaults.js +7 -6
- package/lib/env/schemas/cds-rc.js +132 -22
- package/lib/i18n/bundles.js +111 -0
- package/lib/i18n/files.js +134 -0
- package/lib/i18n/index.js +63 -0
- package/lib/i18n/localize.js +101 -237
- package/lib/i18n/resources.js +150 -0
- package/lib/index.js +1 -0
- package/lib/log/format/aspects/cls.js +6 -1
- package/lib/log/format/json.js +1 -1
- package/lib/ql/CREATE.js +1 -0
- package/lib/ql/DELETE.js +1 -0
- package/lib/ql/DROP.js +1 -0
- package/lib/ql/INSERT.js +9 -8
- package/lib/ql/Query.js +18 -8
- package/lib/ql/SELECT.js +1 -0
- package/lib/ql/UPDATE.js +2 -1
- package/lib/ql/UPSERT.js +1 -1
- package/lib/ql/Whereable.js +3 -3
- package/lib/ql/cds-ql.js +12 -18
- package/lib/req/user.js +1 -0
- package/lib/req/validate.js +12 -3
- package/lib/srv/factory.js +2 -2
- package/lib/{auth → srv/middlewares/auth}/basic-auth.js +1 -1
- package/lib/{auth → srv/middlewares/auth}/dummy-auth.js +1 -1
- package/lib/srv/middlewares/auth/ias-auth.js +96 -0
- package/lib/{auth → srv/middlewares/auth}/index.js +2 -2
- package/lib/srv/middlewares/auth/jwt-auth.js +62 -0
- package/lib/{auth → srv/middlewares/auth}/mocked-users.js +1 -1
- package/lib/srv/middlewares/auth/xssec.js +7 -0
- package/lib/srv/middlewares/index.js +1 -1
- package/lib/utils/cds-utils.js +15 -19
- package/lib/utils/tar.js +2 -2
- package/libx/_runtime/cds-services/adapter/odata-v4/OData.js +2 -2
- package/libx/_runtime/cds-services/adapter/odata-v4/handlers/read.js +1 -0
- package/libx/_runtime/cds-services/adapter/odata-v4/handlers/update.js +1 -1
- package/libx/_runtime/common/error/frontend.js +2 -6
- package/libx/_runtime/common/error/log.js +7 -8
- package/libx/_runtime/common/error/utils.js +3 -7
- package/libx/_runtime/common/generic/auth/capabilities.js +1 -1
- package/libx/_runtime/common/generic/input.js +41 -6
- package/libx/_runtime/common/i18n/index.js +8 -15
- package/libx/_runtime/common/utils/compareJson.js +10 -1
- package/libx/_runtime/common/utils/resolveView.js +1 -1
- package/libx/_runtime/fiori/lean-draft.js +77 -26
- package/libx/_runtime/messaging/enterprise-messaging-utils/registerEndpoints.js +5 -1
- package/libx/_runtime/messaging/kafka.js +1 -1
- package/libx/odata/index.js +3 -0
- package/libx/odata/middleware/create.js +8 -6
- package/libx/odata/middleware/update.js +24 -21
- package/libx/odata/parse/afterburner.js +15 -2
- package/libx/odata/parse/grammar.peggy +24 -7
- package/libx/odata/parse/parser.js +1 -1
- package/libx/odata/utils/postProcess.js +4 -1
- package/libx/rest/RestAdapter.js +2 -1
- package/libx/rest/middleware/error.js +0 -50
- package/package.json +1 -1
- package/lib/auth/ias-auth.js +0 -68
- package/lib/auth/ias-claims.js +0 -34
- package/lib/auth/jwt-auth.js +0 -70
- package/libx/_runtime/common/i18n/messages.properties +0 -99
- package/libx/_runtime/common/utils/require.js +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function peg$subclass(t,u){function r(){this.constructor=t}r.prototype=u.prototype,t.prototype=new r}function peg$SyntaxError(t,u,r,e){var n=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(n,peg$SyntaxError.prototype),n.expected=u,n.found=r,n.location=e,n.name="SyntaxError",n}function peg$padEnd(t,u,r){return r=r||" ",t.length>u?t:(u-=t.length,t+(r+=r.repeat(u)).slice(0,u))}function peg$parse(t,u){var r,e={},n=(u=void 0!==u?u:{}).grammarSource,s={ODataRelativeURI:ko},o=ko,a="/",c="?",i="&",f="$count",A="$ref",l="$value",h="=",p="$skiptoken=",C="$search=",d="$select=",F="$expand=",g="$filter=",B="$orderby=",b="$top=",v="$skip=",E="$count=",m="$apply=",D="$at",y="$from",w="$toInclusive",x="$to",$="*",L="/$count",S=";",T='"',j="\\\\",O='\\"',Z=":",k="any",z="all",_="asc",R="desc",q="$deltatoken=",N="'",I=",",P="[",M="]",U="@",G="$format=",H="eq",J="ne",K="lt",Q="gt",V="le",W="ge",X="in",Y="null",tt="{",ut="}",rt="contains",et="endswith",nt="startswith",st="matchespattern",ot="not",at="and",ct="or",it="aggregate",ft="groupby",At="filter",lt="search",ht="concat",pt="compute",Ct="top",dt="skip",Ft="orderby",gt="topcount",Bt="bottomcount",bt="topsum",vt="bottomsum",Et="toppercent",mt="bottompercent",Dt="with",yt="from",wt="as",xt="rollup",$t="$all",Lt="identity",St="true",Tt="false",jt="''",Ot="-",Zt="T",kt=".",zt="Z",_t="+",Rt="e",qt="binary'",Nt="==",It="(",Pt=")",Mt=/^[^&]/,Ut=/^[ ]/,Gt=/^[^"&]/,Ht=/^[^"]/,Jt=/^[^;)]/,Kt=/^[a-zA-Z0-9\-_.~!]/,Qt=/^[^}]/,Vt=/^[^\]]/,Wt=/^[a-zA-Z]/,Xt=/^[^)]/,Yt=/^[^']/,tu=/^[0-9]/,uu=/^[+\-]/,ru=/^[_a-zA-Z]/,eu=/^[_a-zA-Z0-9"."A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,nu=/^[0-9a-fA-F]/,su=/^[^\/?]/,ou=/^[a-zA-Z0-9\-"."_~!$'()*+,;=:@"\/""?"]/,au=/^[a-zA-Z0-9\-_]/,cu=/^[ \t\n]/,iu=$o("/",!1),fu=$o("?",!1),Au=$o("&",!1),lu=$o("$count",!1),hu=$o("$ref",!1),pu=$o("$value",!1),Cu=$o("=",!1),du=$o("$skiptoken=",!1),Fu=$o("$search=",!1),gu=$o("$select=",!1),Bu=$o("$expand=",!1),bu=$o("$filter=",!1),vu=$o("$orderby=",!1),Eu=$o("$top=",!1),mu=$o("$skip=",!1),Du=$o("$count=",!1),yu=$o("$apply=",!1),wu=Lo(["&"],!0,!1),xu=$o("$at",!1),$u=$o("$from",!1),Lu=$o("$toInclusive",!1),Su=$o("$to",!1),Tu=$o("*",!1),ju=$o("/$count",!1),Ou=$o(";",!1),Zu=Lo([" "],!1,!1),ku=Lo(['"',"&"],!0,!1),zu=$o('"',!1),_u=$o("\\\\",!1),Ru=$o('\\"',!1),qu=Lo(['"'],!0,!1),Nu=Lo([";",")"],!0,!1),Iu=$o(":",!1),Pu=$o("any",!1),Mu=$o("all",!1),Uu=$o("asc",!1),Gu=$o("desc",!1),Hu=$o("$deltatoken=",!1),Ju=So("value with double-quoted string"),Ku=$o("'",!1),Qu=$o(",",!1),Vu=$o("[",!1),Wu=$o("]",!1),Xu=Lo([["a","z"],["A","Z"],["0","9"],"-","_",".","~","!"],!1,!1),Yu=So("an aliased parameter (@param)"),tr=$o("@",!1),ur=$o("$format=",!1),rr=$o("eq",!1),er=$o("ne",!1),nr=$o("lt",!1),sr=$o("gt",!1),or=$o("le",!1),ar=$o("ge",!1),cr=$o("in",!1),ir=($o("add",!1),$o("sub",!1),$o("mul",!1),$o("div",!1),$o("mod",!1),So("navigation with $count")),fr=So("a reference"),Ar=So("null"),lr=$o("null",!1),hr=So("a json object"),pr=$o("{",!1),Cr=Lo(["}"],!0,!1),dr=$o("}",!1),Fr=So("a json array"),gr=Lo(["]"],!0,!1),Br=So("a list"),br=So("a function name"),vr=Lo([["a","z"],["A","Z"]],!1,!1),Er=$o("contains",!0),mr=$o("endswith",!0),Dr=$o("startswith",!0),yr=$o("matchespattern",!0),wr=$o("NOT",!0),xr=$o("AND",!0),$r=$o("OR",!0),Lr=$o("aggregate",!1),Sr=$o("groupby",!1),Tr=$o("filter",!1),jr=$o("search",!1),Or=$o("concat",!1),Zr=$o("compute",!1),kr=$o("top",!1),zr=$o("skip",!1),_r=$o("orderby",!1),Rr=$o("topcount",!0),qr=$o("bottomcount",!0),Nr=$o("topsum",!0),Ir=$o("bottomsum",!0),Pr=$o("toppercent",!0),Mr=$o("bottompercent",!0),Ur=$o("with",!1),Gr=$o("from",!1),Hr=$o("as",!1),Jr=$o("rollup",!1),Kr=$o("$all",!1),Qr=Lo([")"],!0,!1),Vr=$o("identity",!1),Wr=So("a boolean"),Xr=$o("true",!1),Yr=$o("false",!1),te=So("a single quoted string"),ue=$o("''",!1),re=Lo(["'"],!0,!1),ee=So("a doubled quoted string"),ne=(So("a string"),Lo([" ","\t","\n","(",")",'"',"&",";"],!0,!1),So("a time")),se=Lo([["0","9"]],!1,!1),oe=So("a date"),ae=$o("-",!1),ce=$o("T",!1),ie=$o(".",!1),fe=$o("Z",!1),Ae=$o("+",!1),le=So("a number"),he=Lo(["+","-"],!1,!1),pe=$o("e",!1),Ce=So("an integer"),de=So("an identifier"),Fe=Lo(["_",["a","z"],["A","Z"]],!1,!1),ge=Lo(["_",["a","z"],["A","Z"],["0","9"],'"',".",'"',["A","Z"],["a","z"],"ª","µ","º",["À","Ö"],["Ø","ö"],["ø","ˁ"],["ˆ","ˑ"],["ˠ","ˤ"],"ˬ","ˮ",["Ͱ","ʹ"],"Ͷ","ͷ",["ͺ","ͽ"],"Ά",["Έ","Ί"],"Ό",["Ύ","Ρ"],["Σ","ϵ"],["Ϸ","ҁ"],["Ҋ","ԧ"],["Ա","Ֆ"],"ՙ",["ա","և"],["א","ת"],["װ","ײ"],["ؠ","ي"],"ٮ","ٯ",["ٱ","ۓ"],"ە","ۥ","ۦ","ۮ","ۯ",["ۺ","ۼ"],"ۿ","ܐ",["ܒ","ܯ"],["ݍ","ޥ"],"ޱ",["ߊ","ߪ"],"ߴ","ߵ","ߺ",["ࠀ","ࠕ"],"ࠚ","ࠤ","ࠨ",["ࡀ","ࡘ"],"ࢠ",["ࢢ","ࢬ"],["ऄ","ह"],"ऽ","ॐ",["क़","ॡ"],["ॱ","ॷ"],["ॹ","ॿ"],["অ","ঌ"],"এ","ঐ",["ও","ন"],["প","র"],"ল",["শ","হ"],"ঽ","ৎ","ড়","ঢ়",["য়","ৡ"],"ৰ","ৱ",["ਅ","ਊ"],"ਏ","ਐ",["ਓ","ਨ"],["ਪ","ਰ"],"ਲ","ਲ਼","ਵ","ਸ਼","ਸ","ਹ",["ਖ਼","ੜ"],"ਫ਼",["ੲ","ੴ"],["અ","ઍ"],["એ","ઑ"],["ઓ","ન"],["પ","ર"],"લ","ળ",["વ","હ"],"ઽ","ૐ","ૠ","ૡ",["ଅ","ଌ"],"ଏ","ଐ",["ଓ","ନ"],["ପ","ର"],"ଲ","ଳ",["ଵ","ହ"],"ଽ","ଡ଼","ଢ଼",["ୟ","ୡ"],"ୱ","ஃ",["அ","ஊ"],["எ","ஐ"],["ஒ","க"],"ங","ச","ஜ","ஞ","ட","ண","த",["ந","ப"],["ம","ஹ"],"ௐ",["అ","ఌ"],["ఎ","ఐ"],["ఒ","న"],["ప","ళ"],["వ","హ"],"ఽ","ౘ","ౙ","ౠ","ౡ",["ಅ","ಌ"],["ಎ","ಐ"],["ಒ","ನ"],["ಪ","ಳ"],["ವ","ಹ"],"ಽ","ೞ","ೠ","ೡ","ೱ","ೲ",["അ","ഌ"],["എ","ഐ"],["ഒ","ഺ"],"ഽ","ൎ","ൠ","ൡ",["ൺ","ൿ"],["අ","ඖ"],["ක","න"],["ඳ","ර"],"ල",["ව","ෆ"],["ก","ะ"],"า","ำ",["เ","ๆ"],"ກ","ຂ","ຄ","ງ","ຈ","ຊ","ຍ",["ດ","ທ"],["ນ","ຟ"],["ມ","ຣ"],"ລ","ວ","ສ","ຫ",["ອ","ະ"],"າ","ຳ","ຽ",["ເ","ໄ"],"ໆ",["ໜ","ໟ"],"ༀ",["ཀ","ཇ"],["ཉ","ཬ"],["ྈ","ྌ"],["က","ဪ"],"ဿ",["ၐ","ၕ"],["ၚ","ၝ"],"ၡ","ၥ","ၦ",["ၮ","ၰ"],["ၵ","ႁ"],"ႎ",["Ⴀ","Ⴥ"],"Ⴧ","Ⴭ",["ა","ჺ"],["ჼ","ቈ"],["ቊ","ቍ"],["ቐ","ቖ"],"ቘ",["ቚ","ቝ"],["በ","ኈ"],["ኊ","ኍ"],["ነ","ኰ"],["ኲ","ኵ"],["ኸ","ኾ"],"ዀ",["ዂ","ዅ"],["ወ","ዖ"],["ዘ","ጐ"],["ጒ","ጕ"],["ጘ","ፚ"],["ᎀ","ᎏ"],["Ꭰ","Ᏼ"],["ᐁ","ᙬ"],["ᙯ","ᙿ"],["ᚁ","ᚚ"],["ᚠ","ᛪ"],["ᜀ","ᜌ"],["ᜎ","ᜑ"],["ᜠ","ᜱ"],["ᝀ","ᝑ"],["ᝠ","ᝬ"],["ᝮ","ᝰ"],["ក","ឳ"],"ៗ","ៜ",["ᠠ","ᡷ"],["ᢀ","ᢨ"],"ᢪ",["ᢰ","ᣵ"],["ᤀ","ᤜ"],["ᥐ","ᥭ"],["ᥰ","ᥴ"],["ᦀ","ᦫ"],["ᧁ","ᧇ"],["ᨀ","ᨖ"],["ᨠ","ᩔ"],"ᪧ",["ᬅ","ᬳ"],["ᭅ","ᭋ"],["ᮃ","ᮠ"],"ᮮ","ᮯ",["ᮺ","ᯥ"],["ᰀ","ᰣ"],["ᱍ","ᱏ"],["ᱚ","ᱽ"],["ᳩ","ᳬ"],["ᳮ","ᳱ"],"ᳵ","ᳶ",["ᴀ","ᶿ"],["Ḁ","ἕ"],["Ἐ","Ἕ"],["ἠ","ὅ"],["Ὀ","Ὅ"],["ὐ","ὗ"],"Ὑ","Ὓ","Ὕ",["Ὗ","ώ"],["ᾀ","ᾴ"],["ᾶ","ᾼ"],"ι",["ῂ","ῄ"],["ῆ","ῌ"],["ῐ","ΐ"],["ῖ","Ί"],["ῠ","Ῥ"],["ῲ","ῴ"],["ῶ","ῼ"],"ⁱ","ⁿ",["ₐ","ₜ"],"ℂ","ℇ",["ℊ","ℓ"],"ℕ",["ℙ","ℝ"],"ℤ","Ω","ℨ",["K","ℭ"],["ℯ","ℹ"],["ℼ","ℿ"],["ⅅ","ⅉ"],"ⅎ","Ↄ","ↄ",["Ⰰ","Ⱞ"],["ⰰ","ⱞ"],["Ⱡ","ⳤ"],["Ⳬ","ⳮ"],"Ⳳ","ⳳ",["ⴀ","ⴥ"],"ⴧ","ⴭ",["ⴰ","ⵧ"],"ⵯ",["ⶀ","ⶖ"],["ⶠ","ⶦ"],["ⶨ","ⶮ"],["ⶰ","ⶶ"],["ⶸ","ⶾ"],["ⷀ","ⷆ"],["ⷈ","ⷎ"],["ⷐ","ⷖ"],["ⷘ","ⷞ"],"ⸯ","々","〆",["〱","〵"],"〻","〼",["ぁ","ゖ"],["ゝ","ゟ"],["ァ","ヺ"],["ー","ヿ"],["ㄅ","ㄭ"],["ㄱ","ㆎ"],["ㆠ","ㆺ"],["ㇰ","ㇿ"],["㐀","䶵"],["一","鿌"],["ꀀ","ꒌ"],["ꓐ","ꓽ"],["ꔀ","ꘌ"],["ꘐ","ꘟ"],"ꘪ","ꘫ",["Ꙁ","ꙮ"],["ꙿ","ꚗ"],["ꚠ","ꛥ"],["ꜗ","ꜟ"],["Ꜣ","ꞈ"],["Ꞌ","ꞎ"],["Ꞑ","ꞓ"],["Ꞡ","Ɦ"],["ꟸ","ꠁ"],["ꠃ","ꠅ"],["ꠇ","ꠊ"],["ꠌ","ꠢ"],["ꡀ","ꡳ"],["ꢂ","ꢳ"],["ꣲ","ꣷ"],"ꣻ",["ꤊ","ꤥ"],["ꤰ","ꥆ"],["ꥠ","ꥼ"],["ꦄ","ꦲ"],"ꧏ",["ꨀ","ꨨ"],["ꩀ","ꩂ"],["ꩄ","ꩋ"],["ꩠ","ꩶ"],"ꩺ",["ꪀ","ꪯ"],"ꪱ","ꪵ","ꪶ",["ꪹ","ꪽ"],"ꫀ","ꫂ",["ꫛ","ꫝ"],["ꫠ","ꫪ"],["ꫲ","ꫴ"],["ꬁ","ꬆ"],["ꬉ","ꬎ"],["ꬑ","ꬖ"],["ꬠ","ꬦ"],["ꬨ","ꬮ"],["ꯀ","ꯢ"],["가","힣"],["ힰ","ퟆ"],["ퟋ","ퟻ"],["豈","舘"],["並","龎"],["ff","st"],["ﬓ","ﬗ"],"יִ",["ײַ","ﬨ"],["שׁ","זּ"],["טּ","לּ"],"מּ","נּ","סּ","ףּ","פּ",["צּ","ﮱ"],["ﯓ","ﴽ"],["ﵐ","ﶏ"],["ﶒ","ﷇ"],["ﷰ","ﷻ"],["ﹰ","ﹴ"],["ﹶ","ﻼ"],["A","Z"],["a","z"],["ヲ","ᄒ"],["ᅡ","ᅦ"],["ᅧ","ᅬ"],["ᅭ","ᅲ"],["ᅳ","ᅵ"]],!1,!1),Be=So("a guid"),be=So("a hex value"),ve=Lo([["0","9"],["a","f"],["A","F"]],!1,!1),Ee=Lo(["/","?"],!0,!1),me=Lo([["a","z"],["A","Z"],["0","9"],"-",'"',".",'"',"_","~","!","$","'","(",")","*","+",",",";","=",":","@",'"',"/",'"','"',"?",'"'],!1,!1),De=So("a binary"),ye=$o("binary'",!1),we=Lo([["a","z"],["A","Z"],["0","9"],"-","_"],!1,!1),xe=$o("==",!1),$e=$o("(",!1),Le=$o(")",!1),Se=So("an optional whitespace"),Te=Lo([" ","\t","\n"],!1,!1),je=So("a whitespace"),Oe=function(t){qa=t},Ze=function(){if(Na)return qa.columns=[{args:[{val:1}],as:"$count",func:"count"}],delete qa.expand,delete qa.limit,delete qa.orderBy,qa.apply?Ka(qa,qa.apply):{SELECT:qa};let t;if(qa.expand){qa.columns||(qa.columns=["*"],t=!0);for(const t of qa.expand){const u=qa.columns.findIndex(Ua(t));u>-1&&qa.columns.splice(u,1),qa.columns.push(t)}delete qa.expand}return qa.count&&qa.apply&&(qa.__countAggregated=!0),qa.apply?Ka(qa,qa.apply,t):{SELECT:qa}},ke=function(){Na=!0},ze=function(t){return!ja.includes(t)&&{from:{ref:[t]}}},_e=function(t){return[t]},Re=function(t,u){return u},qe=function(t,u){if(u=u&&u[1],!t&&!u)return{from:{ref:[""]}};if(!t&&u&&u.from)return u.from.ref.unshift(""),u;const[r,e]=t,n=[];if(e?e.length>2?n.push({id:r,where:e[1].map((t=>t.val&&t.val.match&&t.val.match(/^"(.*)"$/)?{val:t.val.match(/^"(.*)"$/)[1]}:t))}):n.push({id:r,where:[]}):_a?n.push(`${"object"==typeof r&&"val"in r?r.val:r}`):"object"==typeof r&&"string"==typeof r.val&&r.val.match(/^[1-9]\d*$|^0$/)?n.push({val:Ia(r.val)}):n.push(r),u&&u.from){const t=u.from.ref;Object.prototype.hasOwnProperty.call(t[0],"val")&&(n[n.length-1]={id:n[n.length-1],where:[t.shift()]}),n.push(...t)}const s={from:{ref:n}};return u&&u.columns&&(s.columns=u.columns),s},Ne=function(t){return[t]},Ie=function(t,u,r){const e=[t,"=",u];return r&&e.push("and",...r[1]),e},Pe=function(t){t&&(qa.search=t)},Me=function(t){t&&t.apply&&(qa.apply=t.apply)},Ue=function(t){qa.where=t},Ge=function(t,u){Ya(u)},He=function(t){Ya(t,!0)},Je=function(t){(qa.limit||(qa.limit={})).rows={val:t}},Ke=function(t){Xa(t)},Qe=function(t){t&&(qa.search=t)},Ve=function(){return cds.env.features.skip_apply_parsing},We=function(){return null},Xe=function(t){return t},Ye=function(){return null},tn=function(t){return qa.columns=Array.isArray(qa.columns)?qa.columns:[],qa.columns.find(Ua(t))||qa.columns.push(t),t},un=function(){const t=new Error('"/$count" is not supported for expand operation');throw t.statusCode=501,t},rn=function(t){return t},en=function(t){if(t.find((t=>t&&void 0!==t.apply))){const t=new Error('"$apply" is not supported for expand operation');throw t.statusCode=501,t}if(qa.columns){for(const t of qa.columns)qa.expand.find(Ua(t))||qa.expand.push(t);delete qa.columns}else Array.isArray(qa.expand)&&-1===qa.expand.indexOf("*")&&qa.expand.unshift("*")},nn=function(){Ra.push(qa),qa=qa.expand[qa.expand.length-1],qa.expand=[]},sn=function(){qa.expand.length||qa.expand.push("*"),qa=Ra.pop()},on=function(t){const u="*"===t?{}:t;return u.expand=["*"],Array.isArray(qa.expand)||(qa.expand=[]),qa.expand.find(Ua(u))||qa.expand.push(u),u},an=function(t){return t},cn=function(t){Pa(t,{SELECT:qa})},fn=function(t){return t},An=function(t){return t},ln=function(t){return[{val:t}]},hn=function(t){return[{val:t}]},pn=function(t){return t},Cn=function(t){return t?[t]:[]},dn=function(t,u){t.push({xpr:u})},Fn=function(t,u){t.push(...u)},gn=function(t,u){"not"===t[t.length-1]&&"not"===u[0]?t.push("(",...u,")"):t.push(...u)},Bn=function(t,u){t.push(u)},bn=function(t,u){t.push({val:u})},vn=function(t,u){t.push(...u)},En=function(t,u,r){t.push(u,...r)},mn=function(t){return t},Dn=function(t){return[t]},yn=function(t,u){t.push(u)},wn=function(t,u){let r=t.pop();if(!u)return["exists",{ref:[...t,{id:r}]}];let e=[];for(let t=0,n=0;t<u.length;++t){let s=u[t];s.ref&&0===s.ref.length&&"="===u[t+1]?e[n++]={func:"contains",args:[{ref:[r]},u[t+=2]]}:e[n++]=s}return e.length<u.length?t.length?(r=t.pop(),["exists",{ref:[...t,{id:r,where:e}]}]):e:["exists",{ref:[...t,{id:r,where:u}]}]},xn=function(t,u){let r=t.pop();return["not","exists",{ref:[...t,{id:r,where:["not",{xpr:[...u]}]}]}]},$n=function(t,u){return u},Ln=function(t){return t?[t]:[]},Sn=function(t,u){t.push({xpr:u})},Tn=function(t,u){t.push(...u)},jn=function(t,u){t.push(u)},On=function(t,u){t.push(...u)},Zn=function(t,u){t.push(...u)},kn=function(t,u,r){t.push(u,...r)},zn=function(t){return t},_n=function(t,u){return tc(t,u)},Rn=function(t){return t},qn=function(t){return t},Nn=function(){const t=new Error('"$orderby" does not support lambda');throw t.statusCode=501,t},In=function(t,u){return u},Pn=function(t,u){return ka(t,u&&{sort:u})},Mn=function(t){t&&(qa.count=!0)},Un=function(t,u){return u},Gn=function(t,u){if(void 0!==t){u=Array.isArray(u)?u:[u];for(let r of u)for(const u in r)if("limit"===u&&r.limit&&t.limit&&t.limit.offset&&r.limit.rows)t.limit.rows=r.limit.rows;else if(t[u]||"groupBy"===u&&(t.where||t.search)||"aggregate"===u&&"groupBy"in t&&!("groupBy"in r)){let e=t;t={apply:e},"limit"===u&&r[u].offset&&e.limit&&e.limit.offset&&e.limit.offset.val&&(r[u].offset+=e.limit.offset.val),e=t,e[u]=r[u]}else t[u]=r[u];return{apply:t}}},Hn=function(t){return t},Jn=function(t){return{val:t}},Kn=function(t){return t},Qn=function(t,u){return u},Vn=function(t,u){return[t,...u]},Wn=function(t){return{list:t}},Xn=function(t){return"@"+t},Yn=function(t,u){rc(qa,t,u)},ts=function(t){if("json"!==t.toLowerCase()){const t=new Error('Only query parameter "json" is allowed in "$format".');throw t.statusCode=501,t}},us=function(t,u,r){return[t,Oa[u]||u,r]},rs=function(t){return{list:t}},es=function(t,u){return[t,"in",u]},ns=function(t,u){return u},ss=function(t,u){return u?{id:t,where:u}:t},os=function(t,u){return{func:"count",as:"$count",args:[{ref:t}]}},as=function(t,u){return u},cs=function(t,u){return"null"===t?{val:null}:{ref:[t,...u]}},is=function(t){return{val:t}},fs=function(t){return{val:t}},As=function(t){return{val:t}},ls=function(t){return{val:t}},hs=function(t){return"number"==typeof t?{val:t}:{val:t,literal:"number"}},ps=function(t){return{val:t}},Cs=function(t){return{val:t}},ds=function(t){return{val:t}},Fs=function(){return{val:null}},gs=function(t){return{val:t}},Bs=function(t){return{val:t}},bs=function(t){return{list:t.replace(/"/g,"").split(",").map((t=>({val:t})))}},vs=function(t,u){return u},Es=function(t,u){return[t,...u]},ms=function(t){return{list:t}},Ds=function(t,u){if(za&&!(t.toLowerCase()in za.functions))throw Object.assign(new Error(`Function "${t}" is not supported`),{statusCode:501});return{func:t.toLowerCase(),args:u}},ys=function(t,u){return u},ws=function(t,u){return[t,...u]},xs=function(t){return t.length?t[0]:t},$s=function(t,u,r){return{func:t.toLowerCase(),args:[u,r]}},Ls=function(){return"not"},Ss=function(){return"and"},Ts=function(){return"or"},js=function(t){return t},Os=function(t){return t},Zs=function(t){return t},ks=function(t){return t},zs=function(t){return t},_s=function(t){return t},Rs=function(t){return t},qs=function(t){return t},Ns=function(t){return t},Is=function(t,u){if(t=t.toLowerCase(),!Za[t])throw Object.assign(new Error(`Transformation "${t}" in $apply is not yet supported.`),{statusCode:501});return{aggregate:[{func:t,args:u}]}},Ps=function(t){return t},Ms=function(t,u){return u},Us=function(t,u){return{aggregate:[t,...u]}},Gs=function(t){return{func:"count",args:[{val:1}],as:t}},Hs=function(t){return t},Js=function(t,u,r){return{func:u,args:[t],as:r}},Ks=function(t){return t.toLowerCase()},Qs=function(t){return t},Vs=function(t,u){return u},Ws=function(t,u){return{groupBy:[t,...u]}},Xs=function(t,u,r){return r},Ys=function(t,u,r){let e={};return e=r?{groupBy:[t,...u],...r.apply}:{groupBy:[t,...u]},e},to=function(t){return t},uo=function(t){const u=new Error("Rollup in groupby is not supported yet.");throw u.statusCode=501,u},ro=function(t){return t},eo=function(t){return{where:t}},no=function(t){if(t=t.trim())return{search:[{val:t}]}},so=function(t,u){return u},oo=function(t,u){return{concat:[t,...u]}},ao=function(t,u){return[t,u]},co=function(){return{identity:!0}},io=function(t){return{limit:{rows:{val:t}}}},fo=function(t){return{limit:{offset:{val:t}}}},Ao=function(t,u){return u},lo=function(t,u){return{orderBy:[t,...u]}},ho=function(t){return"true"===t},po=function(t){return t.replace(/''/g,"'")},Co=function(t){return t.replace(/\\\\/g,"\\").replace(/\\"/g,'"')},Fo=function(t){if(t.split("-")[0].length>4)throw Object.assign(new Error(`The type Edm.DateTimeOffset is not compatible with "${t}"`),{statusCode:400});return t},go=function(t){return Ia(t)},Bo=function(t){return parseInt(t)},bo=function(t){return t},vo=function(t){return{val:t}},Eo=function(t){return Ma(t)},mo=0,Do=[{line:1,column:1}],yo=0,wo=[],xo=0;if("startRule"in u){if(!(u.startRule in s))throw new Error("Can't start parsing from rule \""+u.startRule+'".');o=s[u.startRule]}function $o(t,u){return{type:"literal",text:t,ignoreCase:u}}function Lo(t,u,r){return{type:"class",parts:t,inverted:u,ignoreCase:r}}function So(t){return{type:"other",description:t}}function To(u){var r,e=Do[u];if(e)return e;for(r=u-1;!Do[r];)r--;for(e={line:(e=Do[r]).line,column:e.column};r<u;)10===t.charCodeAt(r)?(e.line++,e.column=1):e.column++,r++;return Do[u]=e,e}function jo(t,u,r){var e=To(t),s=To(u),o={source:n,start:{offset:t,line:e.line,column:e.column},end:{offset:u,line:s.line,column:s.column}};return r&&n&&"function"==typeof n.offset&&(o.start=n.offset(o.start),o.end=n.offset(o.end)),o}function Oo(t){mo<yo||(mo>yo&&(yo=mo,wo=[]),wo.push(t))}function Zo(t,u,r){return new peg$SyntaxError(peg$SyntaxError.buildMessage(t,u),t,u,r)}function ko(){var u,r,n,s,o,f,A,l,h,p,C,d,F,g,B,b,v;if(u=mo,47===t.charCodeAt(mo)?(r=a,mo++):(r=e,0===xo&&Oo(iu)),r===e&&(r=null),n=mo,(s=zo())!==e&&(n,s=Oe(s)),(n=s)!==e){if(s=mo,o=Sa(),63===t.charCodeAt(mo)?(f=c,mo++):(f=e,0===xo&&Oo(fu)),f!==e){if(A=Sa(),l=mo,38===t.charCodeAt(mo)?(h=i,mo++):(h=e,0===xo&&Oo(Au)),h===e&&(h=null),p=Sa(),(C=Ro())!==e){if(d=[],F=mo,g=Sa(),B=[],38===t.charCodeAt(mo)?(b=i,mo++):(b=e,0===xo&&Oo(Au)),b!==e)for(;b!==e;)B.push(b),38===t.charCodeAt(mo)?(b=i,mo++):(b=e,0===xo&&Oo(Au));else B=e;for(B!==e?(b=Sa(),(v=Ro())!==e?F=g=[g,B,b,v]:(mo=F,F=e)):(mo=F,F=e);F!==e;){if(d.push(F),F=mo,g=Sa(),B=[],38===t.charCodeAt(mo)?(b=i,mo++):(b=e,0===xo&&Oo(Au)),b!==e)for(;b!==e;)B.push(b),38===t.charCodeAt(mo)?(b=i,mo++):(b=e,0===xo&&Oo(Au));else B=e;B!==e?(b=Sa(),(v=Ro())!==e?F=g=[g,B,b,v]:(mo=F,F=e)):(mo=F,F=e)}l=h=[h,p,C,d]}else mo=l,l=e;l===e&&(l=null),s=o=[o,f,A,l]}else mo=s,s=e;s===e&&(s=null),o=Sa(),u,u=Ze()}else mo=u,u=e;return u}function zo(){var u,r,n,s,o,c,i;return u=mo,t.substr(mo,6)===f?(r=f,mo+=6):(r=e,0===xo&&Oo(lu)),r!==e&&(u,r=ke()),(u=r)===e&&(u=mo,r=mo,t.substr(mo,4)===A?(n=A,mo+=4):(n=e,0===xo&&Oo(hu)),n===e&&(t.substr(mo,6)===l?(n=l,mo+=6):(n=e,0===xo&&Oo(pu))),(r=n!==e?t.substring(r,mo):n)!==e&&(u,r=ze(r)),(u=r)===e&&(u=mo,r=mo,(n=ma())!==e?(s=mo,(o=$a())!==e&&(c=La())!==e?s=o=[o,c]:(mo=s,s=e),s===e&&(s=mo,(o=$a())!==e&&(c=_o())!==e&&(i=La())!==e?s=o=[o,c,i]:(mo=s,s=e)),s===e&&(s=null),o=mo,xo++,c=wa(),xo--,c===e?o=void 0:(mo=o,o=e),o!==e?r=n=[n,s,o]:(mo=r,r=e)):(mo=r,r=e),r===e&&(r=mo,(n=wa())!==e&&(r,n=_e(n)),r=n),r===e&&(r=null),n=mo,s=mo,47===t.charCodeAt(mo)?(o=a,mo++):(o=e,0===xo&&Oo(iu)),o!==e&&(s,o=Re(r,o)),(s=o)!==e?((o=zo())===e&&(o=null),n=s=[s,o]):(mo=n,n=e),n===e&&(n=null),u,u=qe(r,n))),u}function _o(){var u,r,n,s,o,a,c;return u=mo,(r=sa())!==e&&(u,r=Ne(r)),(u=r)===e&&(u=mo,(r=na())!==e?(Sa(),61===t.charCodeAt(mo)?(n=h,mo++):(n=e,0===xo&&Oo(Cu)),n!==e?(Sa(),(s=sa())!==e?(o=mo,(a=xa())!==e&&(c=_o())!==e?o=a=[a,c]:(mo=o,o=e),o===e&&(o=null),u,u=Ie(r,s,o)):(mo=u,u=e)):(mo=u,u=e)):(mo=u,u=e)),u}function Ro(){var u,r,n,s;return u=mo,t.substr(mo,11)===p?(r=p,mo+=11):(r=e,0===xo&&Oo(du)),r!==e?(n=Sa(),s=function(){var u,r;u=mo,r=function(){var u,r,n;u=mo,r=[],ou.test(t.charAt(mo))?(n=t.charAt(mo),mo++):(n=e,0===xo&&Oo(me));if(n!==e)for(;n!==e;)r.push(n),ou.test(t.charAt(mo))?(n=t.charAt(mo),mo++):(n=e,0===xo&&Oo(me));else r=e;u=r!==e?t.substring(u,mo):r;return u}(),r===e&&(r=null);return u,r=cn(r),u=r,u}(),u=r=[r,n,s]):(mo=u,u=e),u===e&&(u=mo,t.substr(mo,8)===C?(r=C,mo+=8):(r=e,0===xo&&Oo(Fu)),r!==e?(n=Sa(),s=function(){var u,r;u=mo,r=function(){var u,r,n,s,o,a,c,i,f,A,l,h;u=mo,r=mo,n=[],s=mo,o=mo,a=[],Ut.test(t.charAt(mo))?(c=t.charAt(mo),mo++):(c=e,0===xo&&Oo(Zu));for(;c!==e;)a.push(c),Ut.test(t.charAt(mo))?(c=t.charAt(mo),mo++):(c=e,0===xo&&Oo(Zu));o=t.substring(o,mo),a=[],Gt.test(t.charAt(mo))?(c=t.charAt(mo),mo++):(c=e,0===xo&&Oo(ku));if(c!==e)for(;c!==e;)a.push(c),Gt.test(t.charAt(mo))?(c=t.charAt(mo),mo++):(c=e,0===xo&&Oo(ku));else a=e;if(a===e){if(a=[],c=mo,34===t.charCodeAt(mo)?(i=T,mo++):(i=e,0===xo&&Oo(zu)),i!==e){if(f=[],t.substr(mo,2)===j?(A=j,mo+=2):(A=e,0===xo&&Oo(_u)),A===e&&(t.substr(mo,2)===O?(A=O,mo+=2):(A=e,0===xo&&Oo(Ru)),A===e&&(Ht.test(t.charAt(mo))?(A=t.charAt(mo),mo++):(A=e,0===xo&&Oo(qu)))),A!==e)for(;A!==e;)f.push(A),t.substr(mo,2)===j?(A=j,mo+=2):(A=e,0===xo&&Oo(_u)),A===e&&(t.substr(mo,2)===O?(A=O,mo+=2):(A=e,0===xo&&Oo(Ru)),A===e&&(Ht.test(t.charAt(mo))?(A=t.charAt(mo),mo++):(A=e,0===xo&&Oo(qu))));else f=e;if(f!==e)if(34===t.charCodeAt(mo)?(A=T,mo++):(A=e,0===xo&&Oo(zu)),A!==e){for(l=[],Ut.test(t.charAt(mo))?(h=t.charAt(mo),mo++):(h=e,0===xo&&Oo(Zu));h!==e;)l.push(h),Ut.test(t.charAt(mo))?(h=t.charAt(mo),mo++):(h=e,0===xo&&Oo(Zu));c=i=[i,f,A,l]}else mo=c,c=e;else mo=c,c=e}else mo=c,c=e;if(c!==e)for(;c!==e;)if(a.push(c),c=mo,34===t.charCodeAt(mo)?(i=T,mo++):(i=e,0===xo&&Oo(zu)),i!==e){if(f=[],t.substr(mo,2)===j?(A=j,mo+=2):(A=e,0===xo&&Oo(_u)),A===e&&(t.substr(mo,2)===O?(A=O,mo+=2):(A=e,0===xo&&Oo(Ru)),A===e&&(Ht.test(t.charAt(mo))?(A=t.charAt(mo),mo++):(A=e,0===xo&&Oo(qu)))),A!==e)for(;A!==e;)f.push(A),t.substr(mo,2)===j?(A=j,mo+=2):(A=e,0===xo&&Oo(_u)),A===e&&(t.substr(mo,2)===O?(A=O,mo+=2):(A=e,0===xo&&Oo(Ru)),A===e&&(Ht.test(t.charAt(mo))?(A=t.charAt(mo),mo++):(A=e,0===xo&&Oo(qu))));else f=e;if(f!==e)if(34===t.charCodeAt(mo)?(A=T,mo++):(A=e,0===xo&&Oo(zu)),A!==e){for(l=[],Ut.test(t.charAt(mo))?(h=t.charAt(mo),mo++):(h=e,0===xo&&Oo(Zu));h!==e;)l.push(h),Ut.test(t.charAt(mo))?(h=t.charAt(mo),mo++):(h=e,0===xo&&Oo(Zu));c=i=[i,f,A,l]}else mo=c,c=e;else mo=c,c=e}else mo=c,c=e;else a=e}a!==e?s=o=[o,a]:(mo=s,s=e);if(s!==e)for(;s!==e;){for(n.push(s),s=mo,o=mo,a=[],Ut.test(t.charAt(mo))?(c=t.charAt(mo),mo++):(c=e,0===xo&&Oo(Zu));c!==e;)a.push(c),Ut.test(t.charAt(mo))?(c=t.charAt(mo),mo++):(c=e,0===xo&&Oo(Zu));if(o=t.substring(o,mo),a=[],Gt.test(t.charAt(mo))?(c=t.charAt(mo),mo++):(c=e,0===xo&&Oo(ku)),c!==e)for(;c!==e;)a.push(c),Gt.test(t.charAt(mo))?(c=t.charAt(mo),mo++):(c=e,0===xo&&Oo(ku));else a=e;if(a===e){if(a=[],c=mo,34===t.charCodeAt(mo)?(i=T,mo++):(i=e,0===xo&&Oo(zu)),i!==e){if(f=[],t.substr(mo,2)===j?(A=j,mo+=2):(A=e,0===xo&&Oo(_u)),A===e&&(t.substr(mo,2)===O?(A=O,mo+=2):(A=e,0===xo&&Oo(Ru)),A===e&&(Ht.test(t.charAt(mo))?(A=t.charAt(mo),mo++):(A=e,0===xo&&Oo(qu)))),A!==e)for(;A!==e;)f.push(A),t.substr(mo,2)===j?(A=j,mo+=2):(A=e,0===xo&&Oo(_u)),A===e&&(t.substr(mo,2)===O?(A=O,mo+=2):(A=e,0===xo&&Oo(Ru)),A===e&&(Ht.test(t.charAt(mo))?(A=t.charAt(mo),mo++):(A=e,0===xo&&Oo(qu))));else f=e;if(f!==e)if(34===t.charCodeAt(mo)?(A=T,mo++):(A=e,0===xo&&Oo(zu)),A!==e){for(l=[],Ut.test(t.charAt(mo))?(h=t.charAt(mo),mo++):(h=e,0===xo&&Oo(Zu));h!==e;)l.push(h),Ut.test(t.charAt(mo))?(h=t.charAt(mo),mo++):(h=e,0===xo&&Oo(Zu));c=i=[i,f,A,l]}else mo=c,c=e;else mo=c,c=e}else mo=c,c=e;if(c!==e)for(;c!==e;)if(a.push(c),c=mo,34===t.charCodeAt(mo)?(i=T,mo++):(i=e,0===xo&&Oo(zu)),i!==e){if(f=[],t.substr(mo,2)===j?(A=j,mo+=2):(A=e,0===xo&&Oo(_u)),A===e&&(t.substr(mo,2)===O?(A=O,mo+=2):(A=e,0===xo&&Oo(Ru)),A===e&&(Ht.test(t.charAt(mo))?(A=t.charAt(mo),mo++):(A=e,0===xo&&Oo(qu)))),A!==e)for(;A!==e;)f.push(A),t.substr(mo,2)===j?(A=j,mo+=2):(A=e,0===xo&&Oo(_u)),A===e&&(t.substr(mo,2)===O?(A=O,mo+=2):(A=e,0===xo&&Oo(Ru)),A===e&&(Ht.test(t.charAt(mo))?(A=t.charAt(mo),mo++):(A=e,0===xo&&Oo(qu))));else f=e;if(f!==e)if(34===t.charCodeAt(mo)?(A=T,mo++):(A=e,0===xo&&Oo(zu)),A!==e){for(l=[],Ut.test(t.charAt(mo))?(h=t.charAt(mo),mo++):(h=e,0===xo&&Oo(Zu));h!==e;)l.push(h),Ut.test(t.charAt(mo))?(h=t.charAt(mo),mo++):(h=e,0===xo&&Oo(Zu));c=i=[i,f,A,l]}else mo=c,c=e;else mo=c,c=e}else mo=c,c=e;else a=e}a!==e?s=o=[o,a]:(mo=s,s=e)}else n=e;r=n!==e?t.substring(r,mo):n;r!==e&&(u,r=ln(r));return u=r,u}(),r!==e&&(u,r=An(r));u=r,u===e&&(u=Sa());return u}(),s!==e?(u,u=Pe(s)):(mo=u,u=e)):(mo=u,u=e),u===e&&(u=mo,(r=qo())!==e&&(u,r=Me(r)),(u=r)===e&&(u=function(){var u,r,n,s;u=mo,t.substr(mo,3)===D?(r=D,mo+=3):(r=e,0===xo&&Oo(xu));r===e&&(t.substr(mo,5)===y?(r=y,mo+=5):(r=e,0===xo&&Oo($u)),r===e&&(t.substr(mo,12)===w?(r=w,mo+=12):(r=e,0===xo&&Oo(Lu)),r===e&&(t.substr(mo,3)===x?(r=x,mo+=3):(r=e,0===xo&&Oo(Su)))));r!==e?(61===t.charCodeAt(mo)?(n=h,mo++):(n=e,0===xo&&Oo(Cu)),n!==e&&(s=va())!==e?u=r=[r,n,s]:(mo=u,u=e)):(mo=u,u=e);return u}(),u===e&&(u=function(){var u,r,n,s,o;u=mo,t.substr(mo,8)===G?(r=G,mo+=8):(r=e,0===xo&&Oo(ur));if(r!==e){for(n=mo,s=[],Mt.test(t.charAt(mo))?(o=t.charAt(mo),mo++):(o=e,0===xo&&Oo(wu));o!==e;)s.push(o),Mt.test(t.charAt(mo))?(o=t.charAt(mo),mo++):(o=e,0===xo&&Oo(wu));n=t.substring(n,mo),u,u=ts(n)}else mo=u,u=e;return u}(),u===e&&(u=function(){var u,r,n,s,o,a;u=mo,r=[],Kt.test(t.charAt(mo))?(n=t.charAt(mo),mo++):(n=e,0===xo&&Oo(Xu));if(n!==e)for(;n!==e;)r.push(n),Kt.test(t.charAt(mo))?(n=t.charAt(mo),mo++):(n=e,0===xo&&Oo(Xu));else r=e;if(r!==e){if(n=mo,61===t.charCodeAt(mo)?(s=h,mo++):(s=e,0===xo&&Oo(Cu)),s!==e){for(o=[],Mt.test(t.charAt(mo))?(a=t.charAt(mo),mo++):(a=e,0===xo&&Oo(wu));a!==e;)o.push(a),Mt.test(t.charAt(mo))?(a=t.charAt(mo),mo++):(a=e,0===xo&&Oo(wu));n=s=[s,o]}else mo=n,n=e;n===e&&(n=null),u=r=[r,n]}else mo=u,u=e;return u}(),u===e&&(u=function(){var u,r,n,s,o;u=mo,r=Yo(),r!==e?(61===t.charCodeAt(mo)?(n=h,mo++):(n=e,0===xo&&Oo(Cu)),n!==e?(s=mo,xo++,o=Yo(),xo--,o===e?s=void 0:(mo=s,s=e),s!==e?(o=function(){var u,r,n,s;u=sa(),u===e&&(u=oa())===e&&(u=aa())===e&&(u=mo,91===t.charCodeAt(mo)?(r=P,mo++):(r=e,0===xo&&Oo(Vu)),r!==e?(n=function(){var u,r,n,s,o,a;if(u=mo,r=Xo(),r!==e){for(n=[],s=mo,44===t.charCodeAt(mo)?(o=I,mo++):(o=e,0===xo&&Oo(Qu)),o!==e&&(a=Xo())!==e?(s,s=Qn(r,a)):(mo=s,s=e);s!==e;)n.push(s),s=mo,44===t.charCodeAt(mo)?(o=I,mo++):(o=e,0===xo&&Oo(Qu)),o!==e&&(a=Xo())!==e?(s,s=Qn(r,a)):(mo=s,s=e);u,u=Vn(r,n)}else mo=u,u=e;return u}(),n!==e?(93===t.charCodeAt(mo)?(s=M,mo++):(s=e,0===xo&&Oo(Wu)),s!==e?(u,u=Wn(n)):(mo=u,u=e)):(mo=u,u=e)):(mo=u,u=e));return u}(),o!==e?(u,u=Yn(r,o)):(mo=u,u=e)):(mo=u,u=e)):(mo=u,u=e)):(mo=u,u=e);return u}(),u===e&&(u=function(){var u,r,n,s;u=mo,t.substr(mo,12)===q?(r=q,mo+=12):(r=e,0===xo&&Oo(Hu));if(r!==e){for(Sa(),n=[],Mt.test(t.charAt(mo))?(s=t.charAt(mo),mo++):(s=e,0===xo&&Oo(wu));s!==e;)n.push(s),Mt.test(t.charAt(mo))?(s=t.charAt(mo),mo++):(s=e,0===xo&&Oo(wu));u,u=Hn(n)}else mo=u,u=e;return u}()))))))),u}function qo(){var u,r,n,s,o,a,c,i;if(u=mo,t.substr(mo,8)===d?(r=d,mo+=8):(r=e,0===xo&&Oo(gu)),r!==e)if(n=Sa(),(s=No())!==e){for(o=[],a=mo,(c=xa())!==e&&(i=No())!==e?a=c=[c,i]:(mo=a,a=e);a!==e;)o.push(a),a=mo,(c=xa())!==e&&(i=No())!==e?a=c=[c,i]:(mo=a,a=e);u=r=[r,n,s,o]}else mo=u,u=e;else mo=u,u=e;if(u===e){if(u=mo,t.substr(mo,8)===F?(r=F,mo+=8):(r=e,0===xo&&Oo(Bu)),r!==e)if(n=Sa(),(s=Po())!==e){for(o=[],a=mo,(c=xa())!==e&&(i=Po())!==e?a=c=[c,i]:(mo=a,a=e);a!==e;)o.push(a),a=mo,(c=xa())!==e&&(i=Po())!==e?a=c=[c,i]:(mo=a,a=e);a=function(){var u,r;u=mo,t.substr(mo,7)===L?(r=L,mo+=7):(r=e,0===xo&&Oo(ju));r!==e&&(u,r=un());return u=r,u}(),a===e&&(a=null),u=r=[r,n,s,o,a]}else mo=u,u=e;else mo=u,u=e;if(u===e&&(u=mo,t.substr(mo,8)===g?(r=g,mo+=8):(r=e,0===xo&&Oo(bu)),r!==e?(n=Sa(),(s=Go())!==e?(u,u=Ue(s)):(mo=u,u=e)):(mo=u,u=e),u===e)){if(u=mo,t.substr(mo,9)===B?(r=B,mo+=9):(r=e,0===xo&&Oo(vu)),r!==e)if(n=Sa(),(s=Vo())!==e){for(o=[],a=mo,(c=xa())!==e&&(i=Vo())!==e?(a,a=Ge(s,i)):(mo=a,a=e);a!==e;)o.push(a),a=mo,(c=xa())!==e&&(i=Vo())!==e?(a,a=Ge(s,i)):(mo=a,a=e);u,u=He(s)}else mo=u,u=e;else mo=u,u=e;if(u===e&&(u=mo,t.substr(mo,5)===b?(r=b,mo+=5):(r=e,0===xo&&Oo(Eu)),r!==e?(n=Sa(),(s=Mo())!==e?(u,u=Je(s)):(mo=u,u=e)):(mo=u,u=e),u===e&&(u=mo,t.substr(mo,6)===v?(r=v,mo+=6):(r=e,0===xo&&Oo(mu)),r!==e?(n=Sa(),(s=Uo())!==e?(u,u=Ke(s)):(mo=u,u=e)):(mo=u,u=e),u===e&&(u=mo,t.substr(mo,8)===C?(r=C,mo+=8):(r=e,0===xo&&Oo(Fu)),r!==e?(n=Sa(),s=function(){var u,r,n,s;u=mo,r=mo,n=[],Jt.test(t.charAt(mo))?(s=t.charAt(mo),mo++):(s=e,0===xo&&Oo(Nu));if(s!==e)for(;s!==e;)n.push(s),Jt.test(t.charAt(mo))?(s=t.charAt(mo),mo++):(s=e,0===xo&&Oo(Nu));else n=e;r=n!==e?t.substring(r,mo):n;r!==e&&(u,r=hn(r));u=r,u===e&&(u=Sa());return u}(),s!==e?(u,u=Qe(s)):(mo=u,u=e)):(mo=u,u=e),u===e&&(u=mo,t.substr(mo,7)===E?(r=E,mo+=7):(r=e,0===xo&&Oo(Du)),r!==e?(n=Sa(),s=function(){var t,u;t=mo,u=ba(),u!==e&&(t,u=Mn(u));return t=u,t}(),s!==e?u=r=[r,n,s]:(mo=u,u=e)):(mo=u,u=e),u===e))))){if(u=mo,t.substr(mo,7)===m?(r=m,mo+=7):(r=e,0===xo&&Oo(yu)),r!==e)if(mo,(n=(n=Ve())?void 0:e)!==e){for(s=Sa(),o=[],Mt.test(t.charAt(mo))?(a=t.charAt(mo),mo++):(a=e,0===xo&&Oo(wu));a!==e;)o.push(a),Mt.test(t.charAt(mo))?(a=t.charAt(mo),mo++):(a=e,0===xo&&Oo(wu));u,u=We()}else mo=u,u=e;else mo=u,u=e;u===e&&(u=mo,t.substr(mo,7)===m?(r=m,mo+=7):(r=e,0===xo&&Oo(yu)),r!==e?(n=Sa(),(s=Wo())!==e?(u,u=Xe(s)):(mo=u,u=e)):(mo=u,u=e),u===e&&(u=mo,t.substr(mo,8)===F?(r=F,mo+=8):(r=e,0===xo&&Oo(Bu)),r!==e&&(u,r=Ye()),u=r))}}}return u}function No(){var u,r;return u=mo,42===t.charCodeAt(mo)?(r=$,mo++):(r=e,0===xo&&Oo(Tu)),r===e&&(r=na()),r!==e&&(u,r=tn(r)),u=r}function Io(){var u,r,n,s,o;return u=mo,r=mo,(n=$a())!==e&&(r,n=nn()),(r=n)!==e?(n=function(){var u,r,n,s,o;for(u=mo,r=[],n=mo,(s=qo())!==e?(Sa(),59===t.charCodeAt(mo)?(o=S,mo++):(o=e,0===xo&&Oo(Ou)),o===e&&(o=null),n,n=rn(s)):(mo=n,n=e);n!==e;)r.push(n),n=mo,(s=qo())!==e?(Sa(),59===t.charCodeAt(mo)?(o=S,mo++):(o=e,0===xo&&Oo(Ou)),o===e&&(o=null),n,n=rn(s)):(mo=n,n=e);return u,en(r)}(),s=mo,(o=La())!==e&&(s,o=sn()),(s=o)!==e?u=r=[r,n,s]:(mo=u,u=e)):(mo=u,u=e),u}function Po(){var u,r,n;return u=mo,r=mo,42===t.charCodeAt(mo)?(n=$,mo++):(n=e,0===xo&&Oo(Tu)),n===e&&(n=na()),n!==e&&(r,n=on(n)),(r=n)!==e?((n=Io())===e&&(n=null),u=r=[r,n]):(mo=u,u=e),u}function Mo(){var t,u;return t=mo,(u=Ea())!==e&&(t,u=an(u)),t=u}function Uo(){var t,u;return t=mo,(u=Ea())!==e&&(t,u=fn(u)),t=u}function Go(){var t,u;return t=mo,(u=Ho())!==e&&(t,u=pn(u)),t=u}function Ho(){var u,r,n,s,o,a,c;if(u=mo,r=mo,(n=ia())===e&&(n=null),r,r=n=Cn(n),n=mo,(s=$a())!==e&&(o=Ho())!==e&&(a=La())!==e?(n,n=dn(r,o)):(mo=n,n=e),n===e&&(n=mo,(s=ta())!==e&&(n,s=Fn(r,s)),(n=s)===e&&(n=mo,(s=Jo())!==e&&(n,s=gn(r,s)),(n=s)===e&&(n=mo,s=function(){var u,r,n,s;u=mo,t.substr(mo,8).toLowerCase()===rt?(r=t.substr(mo,8),mo+=8):(r=e,0===xo&&Oo(Er));r===e&&(t.substr(mo,8).toLowerCase()===et?(r=t.substr(mo,8),mo+=8):(r=e,0===xo&&Oo(mr)),r===e&&(t.substr(mo,10).toLowerCase()===nt?(r=t.substr(mo,10),mo+=10):(r=e,0===xo&&Oo(Dr)),r===e&&(t.substr(mo,14).toLowerCase()===st?(r=t.substr(mo,14),mo+=14):(r=e,0===xo&&Oo(yr)))));r!==e&&$a()!==e&&(n=ea())!==e&&xa()!==e&&(s=ea())!==e&&La()!==e?(u,u=$s(r,n,s)):(mo=u,u=e);return u}(),s!==e&&(n,s=Bn(r,s)),(n=s)===e&&(n=mo,(s=ba())!==e&&(n,s=bn(r,s)),(n=s)===e&&(n=mo,(s=ra())!==e&&(n,s=vn(r,s)),n=s))))),n!==e){for(s=[],o=mo,(a=fa())===e&&(a=Aa()),a!==e&&(c=Ho())!==e?(o,o=En(r,a,c)):(mo=o,o=e);o!==e;)s.push(o),o=mo,(a=fa())===e&&(a=Aa()),a!==e&&(c=Ho())!==e?(o,o=En(r,a,c)):(mo=o,o=e);u,u=mn(r)}else mo=u,u=e;return u}function Jo(){var u,r,n,s,o,c,i;if(u=mo,r=mo,(n=ma())!==e&&(r,n=Dn(n)),(r=n)!==e)if(47===t.charCodeAt(mo)?(n=a,mo++):(n=e,0===xo&&Oo(iu)),n!==e){for(s=[],o=mo,(c=ma())!==e?(47===t.charCodeAt(mo)?(i=a,mo++):(i=e,0===xo&&Oo(iu)),i!==e?(o,o=yn(r,c)):(mo=o,o=e)):(mo=o,o=e);o!==e;)s.push(o),o=mo,(c=ma())!==e?(47===t.charCodeAt(mo)?(i=a,mo++):(i=e,0===xo&&Oo(iu)),i!==e?(o,o=yn(r,c)):(mo=o,o=e)):(mo=o,o=e);o=mo,c=function(){var u,r,n;u=mo,t.substr(mo,3)===k?(r=k,mo+=3):(r=e,0===xo&&Oo(Pu));r!==e&&$a()!==e?((n=Qo())===e&&(n=null),La()!==e?(u,u=Rn(n)):(mo=u,u=e)):(mo=u,u=e);return u}(),c!==e&&(o,c=wn(r,c)),(o=c)===e&&(o=mo,c=function(){var u,r,n;u=mo,t.substr(mo,3)===z?(r=z,mo+=3):(r=e,0===xo&&Oo(Mu));r!==e&&$a()!==e&&(n=Qo())!==e&&La()!==e?(u,u=qn(n)):(mo=u,u=e);return u}(),c!==e&&(o,c=xn(r,c)),o=c),o!==e?(u,u=$n(r,o)):(mo=u,u=e)}else mo=u,u=e;else mo=u,u=e;return u}function Ko(){var t,u,r,n,s,o,a;if(t=mo,u=mo,(r=ia())===e&&(r=null),u,u=r=Ln(r),r=mo,(n=$a())!==e&&(s=Ko())!==e&&(o=La())!==e?(r,r=Sn(u,s)):(mo=r,r=e),r===e&&(r=mo,(n=ta())!==e&&(r,n=Tn(u,n)),(r=n)===e&&(r=mo,(n=ca())!==e&&(r,n=jn(u,n)),(r=n)===e&&(r=mo,(n=Jo())!==e&&(r,n=On(u,n)),(r=n)===e&&(r=mo,(n=ra())!==e&&(r,n=Zn(u,n)),r=n)))),r!==e){for(n=[],s=mo,(o=fa())===e&&(o=Aa()),o!==e&&(a=Ko())!==e?(s,s=kn(u,o,a)):(mo=s,s=e);s!==e;)n.push(s),s=mo,(o=fa())===e&&(o=Aa()),o!==e&&(a=Ko())!==e?(s,s=kn(u,o,a)):(mo=s,s=e);t,t=zn(u)}else mo=t,t=e;return t}function Qo(){var u,r,n,s;return u=mo,(r=ma())!==e?(58===t.charCodeAt(mo)?(n=Z,mo++):(n=e,0===xo&&Oo(Iu)),n!==e&&(s=Ko())!==e?(u,u=_n(r,s)):(mo=u,u=e)):(mo=u,u=e),u}function Vo(){var u,r,n,s,o;return u=mo,r=mo,(n=Jo())!==e&&(r,n=Nn()),(r=n)===e&&(r=ca())===e&&(r=na()),r!==e?(n=mo,Ta()!==e?(s=mo,t.substr(mo,3)===_?(o=_,mo+=3):(o=e,0===xo&&Oo(Uu)),o===e&&(t.substr(mo,4)===R?(o=R,mo+=4):(o=e,0===xo&&Oo(Gu))),(s=o!==e?t.substring(s,mo):o)!==e?(n,n=In(r,s)):(mo=n,n=e)):(mo=n,n=e),n===e&&(n=null),u,u=Pn(r,n)):(mo=u,u=e),u}function Wo(){var u,r,n,s,o,c;if(u=mo,(r=la())!==e){for(n=[],s=mo,47===t.charCodeAt(mo)?(o=a,mo++):(o=e,0===xo&&Oo(iu)),o!==e&&(c=la())!==e?(s,s=Un(r,c)):(mo=s,s=e);s!==e;)n.push(s),s=mo,47===t.charCodeAt(mo)?(o=a,mo++):(o=e,0===xo&&Oo(iu)),o!==e&&(c=la())!==e?(s,s=Un(r,c)):(mo=s,s=e);u,u=Gn(r,n)}else mo=u,u=e;return u}function Xo(){var u,r,n;return xo++,u=mo,r=function(){var u,r,n,s,o;xo++,u=mo,34===t.charCodeAt(mo)?(r=T,mo++):(r=e,0===xo&&Oo(zu));if(r!==e){for(n=mo,s=[],t.substr(mo,2)===O?(o=O,mo+=2):(o=e,0===xo&&Oo(Ru)),o===e&&(t.substr(mo,2)===j?(o=j,mo+=2):(o=e,0===xo&&Oo(_u)),o===e&&(Ht.test(t.charAt(mo))?(o=t.charAt(mo),mo++):(o=e,0===xo&&Oo(qu))));o!==e;)s.push(o),t.substr(mo,2)===O?(o=O,mo+=2):(o=e,0===xo&&Oo(Ru)),o===e&&(t.substr(mo,2)===j?(o=j,mo+=2):(o=e,0===xo&&Oo(_u)),o===e&&(Ht.test(t.charAt(mo))?(o=t.charAt(mo),mo++):(o=e,0===xo&&Oo(qu))));n=t.substring(n,mo),34===t.charCodeAt(mo)?(s=T,mo++):(s=e,0===xo&&Oo(zu)),s!==e?(u,u=Co(n)):(mo=u,u=e)}else mo=u,u=e;xo--,u===e&&(r=e,0===xo&&Oo(ee));return u}(),r!==e&&(u,r=Jn(r)),(u=r)===e&&(u=mo,r=mo,xo++,39===t.charCodeAt(mo)?(n=N,mo++):(n=e,0===xo&&Oo(Ku)),xo--,n===e?r=void 0:(mo=r,r=e),r!==e&&(n=sa())!==e?(u,u=Kn(n)):(mo=u,u=e)),xo--,u===e&&(r=e,0===xo&&Oo(Ju)),u}function Yo(){var u,r,n;return xo++,u=mo,64===t.charCodeAt(mo)?(r=U,mo++):(r=e,0===xo&&Oo(tr)),r!==e&&(n=ma())!==e?(u,u=Xn(n)):(mo=u,u=e),xo--,u===e&&(r=e,0===xo&&Oo(Yu)),u}function ta(){var u,r,n,s,o;return u=mo,(r=ea())!==e&&Ta()!==e?(n=mo,t.substr(mo,2)===H?(s=H,mo+=2):(s=e,0===xo&&Oo(rr)),s===e&&(t.substr(mo,2)===J?(s=J,mo+=2):(s=e,0===xo&&Oo(er)),s===e&&(t.substr(mo,2)===K?(s=K,mo+=2):(s=e,0===xo&&Oo(nr)),s===e&&(t.substr(mo,2)===Q?(s=Q,mo+=2):(s=e,0===xo&&Oo(sr)),s===e&&(t.substr(mo,2)===V?(s=V,mo+=2):(s=e,0===xo&&Oo(or)),s===e&&(t.substr(mo,2)===W?(s=W,mo+=2):(s=e,0===xo&&Oo(ar))))))),(n=s!==e?t.substring(n,mo):s)!==e&&(s=Ta())!==e&&(o=ea())!==e?(u,u=us(r,n,o)):(mo=u,u=e)):(mo=u,u=e),u}function ua(){var u,r;return u=mo,(r=Yo())!==e&&(u,r=rs(r)),(u=r)===e&&(u=function(){var u,r,n;xo++,u=mo,r=$a(),r!==e?(n=function(){var u,r,n,s,o,a;if(u=mo,r=sa(),r!==e){for(n=[],s=mo,44===t.charCodeAt(mo)?(o=I,mo++):(o=e,0===xo&&Oo(Qu)),o!==e&&(a=sa())!==e?(s,s=vs(r,a)):(mo=s,s=e);s!==e;)n.push(s),s=mo,44===t.charCodeAt(mo)?(o=I,mo++):(o=e,0===xo&&Oo(Qu)),o!==e&&(a=sa())!==e?(s,s=vs(r,a)):(mo=s,s=e);u,u=Es(r,n)}else mo=u,u=e;return u}(),n!==e&&La()!==e?(u,u=ms(n)):(mo=u,u=e)):(mo=u,u=e);xo--,u===e&&(r=e,0===xo&&Oo(Br));return u}()),u}function ra(){var u,r,n,s;return u=mo,(r=ea())!==e&&Ta()!==e?(t.substr(mo,2)===X?(n=X,mo+=2):(n=e,0===xo&&Oo(cr)),n!==e&&Ta()!==e&&(s=ua())!==e?(u,u=es(r,s)):(mo=u,u=e)):(mo=u,u=e),u}function ea(){var u;return(u=function(){var u,r,n,s,o,c,i;xo++,u=mo,r=[],n=mo,(s=ma())!==e?(o=mo,(c=$a())!==e&&(i=_o())!==e&&La()!==e?(o,o=ns(s,i)):(mo=o,o=e),o===e&&(o=null),47===t.charCodeAt(mo)?(c=a,mo++):(c=e,0===xo&&Oo(iu)),c!==e?(n,n=ss(s,o)):(mo=n,n=e)):(mo=n,n=e);if(n!==e)for(;n!==e;)r.push(n),n=mo,(s=ma())!==e?(o=mo,(c=$a())!==e&&(i=_o())!==e&&La()!==e?(o,o=ns(s,i)):(mo=o,o=e),o===e&&(o=null),47===t.charCodeAt(mo)?(c=a,mo++):(c=e,0===xo&&Oo(iu)),c!==e?(n,n=ss(s,o)):(mo=n,n=e)):(mo=n,n=e);else r=e;r!==e?(t.substr(mo,6)===f?(n=f,mo+=6):(n=e,0===xo&&Oo(lu)),n!==e?(u,u=os(r,n)):(mo=u,u=e)):(mo=u,u=e);xo--,u===e&&(r=e,0===xo&&Oo(ir));return u}())===e&&(u=ca())===e&&(u=sa())===e&&(u=na())===e&&(u=oa())===e&&(u=aa())===e&&(u=function(){var u,r,n,s,o;xo++,u=mo,91===t.charCodeAt(mo)?(r=P,mo++):(r=e,0===xo&&Oo(Vu));if(r!==e){for(n=mo,s=[],Vt.test(t.charAt(mo))?(o=t.charAt(mo),mo++):(o=e,0===xo&&Oo(gr));o!==e;)s.push(o),Vt.test(t.charAt(mo))?(o=t.charAt(mo),mo++):(o=e,0===xo&&Oo(gr));n=t.substring(n,mo),93===t.charCodeAt(mo)?(s=M,mo++):(s=e,0===xo&&Oo(Wu)),s!==e?(u,u=bs(n)):(mo=u,u=e)}else mo=u,u=e;xo--,u===e&&(r=e,0===xo&&Oo(Br));return u}()),u}function na(){var u,r,n,s,o,c;if(xo++,u=mo,(r=ma())!==e){for(n=[],s=mo,47===t.charCodeAt(mo)?(o=a,mo++):(o=e,0===xo&&Oo(iu)),o!==e&&(c=ma())!==e?(s,s=as(r,c)):(mo=s,s=e);s!==e;)n.push(s),s=mo,47===t.charCodeAt(mo)?(o=a,mo++):(o=e,0===xo&&Oo(iu)),o!==e&&(c=ma())!==e?(s,s=as(r,c)):(mo=s,s=e);u,u=cs(r,n)}else mo=u,u=e;return xo--,u===e&&(r=e,0===xo&&Oo(fr)),u}function sa(){var u,r;return u=mo,(r=ba())!==e&&(u,r=is(r)),(u=r)===e&&(u=mo,(r=va())!==e&&(u,r=fs(r)),(u=r)===e&&(u=mo,r=function(){var u,r,n,s,o,a,c,i,f,A;xo++,u=mo,r=mo,tu.test(t.charAt(mo))?(n=t.charAt(mo),mo++):(n=e,0===xo&&Oo(se));n!==e?(tu.test(t.charAt(mo))?(s=t.charAt(mo),mo++):(s=e,0===xo&&Oo(se)),s!==e?(58===t.charCodeAt(mo)?(o=Z,mo++):(o=e,0===xo&&Oo(Iu)),o!==e?(tu.test(t.charAt(mo))?(a=t.charAt(mo),mo++):(a=e,0===xo&&Oo(se)),a!==e?(tu.test(t.charAt(mo))?(c=t.charAt(mo),mo++):(c=e,0===xo&&Oo(se)),c!==e?(58===t.charCodeAt(mo)?(i=Z,mo++):(i=e,0===xo&&Oo(Iu)),i!==e?(tu.test(t.charAt(mo))?(f=t.charAt(mo),mo++):(f=e,0===xo&&Oo(se)),f!==e?(tu.test(t.charAt(mo))?(A=t.charAt(mo),mo++):(A=e,0===xo&&Oo(se)),A!==e?r=n=[n,s,o,a,c,i,f,A]:(mo=r,r=e)):(mo=r,r=e)):(mo=r,r=e)):(mo=r,r=e)):(mo=r,r=e)):(mo=r,r=e)):(mo=r,r=e)):(mo=r,r=e);u=r!==e?t.substring(u,mo):r;xo--,u===e&&(r=e,0===xo&&Oo(ne));return u}(),r!==e&&(u,r=As(r)),(u=r)===e&&(u=mo,(r=Da())!==e&&(u,r=ls(r)),(u=r)===e&&(u=mo,r=function(){var u,r,n,s,o,a,c,i,f,A,l;xo++,u=mo,r=mo,xo++,n=function(){var u,r,n;u=mo,r=[],tu.test(t.charAt(mo))?(n=t.charAt(mo),mo++):(n=e,0===xo&&Oo(se));if(n!==e)for(;n!==e;)r.push(n),tu.test(t.charAt(mo))?(n=t.charAt(mo),mo++):(n=e,0===xo&&Oo(se));else r=e;r!==e?(45===t.charCodeAt(mo)?(n=Ot,mo++):(n=e,0===xo&&Oo(ae)),n!==e?u=r=[r,n]:(mo=u,u=e)):(mo=u,u=e);return u}(),xo--,n===e?r=void 0:(mo=r,r=e);if(r!==e){if(n=mo,s=mo,uu.test(t.charAt(mo))?(o=t.charAt(mo),mo++):(o=e,0===xo&&Oo(he)),o===e&&(o=null),a=[],tu.test(t.charAt(mo))?(c=t.charAt(mo),mo++):(c=e,0===xo&&Oo(se)),c!==e)for(;c!==e;)a.push(c),tu.test(t.charAt(mo))?(c=t.charAt(mo),mo++):(c=e,0===xo&&Oo(se));else a=e;if(a!==e){if(c=mo,46===t.charCodeAt(mo)?(i=kt,mo++):(i=e,0===xo&&Oo(ie)),i!==e){if(f=[],tu.test(t.charAt(mo))?(A=t.charAt(mo),mo++):(A=e,0===xo&&Oo(se)),A!==e)for(;A!==e;)f.push(A),tu.test(t.charAt(mo))?(A=t.charAt(mo),mo++):(A=e,0===xo&&Oo(se));else f=e;f!==e?c=i=[i,f]:(mo=c,c=e)}else mo=c,c=e;if(c===e&&(c=null),i=mo,101===t.charCodeAt(mo)?(f=Rt,mo++):(f=e,0===xo&&Oo(pe)),f!==e){if(A=[],tu.test(t.charAt(mo))?(l=t.charAt(mo),mo++):(l=e,0===xo&&Oo(se)),l!==e)for(;l!==e;)A.push(l),tu.test(t.charAt(mo))?(l=t.charAt(mo),mo++):(l=e,0===xo&&Oo(se));else A=e;A!==e?i=f=[f,A]:(mo=i,i=e)}else mo=i,i=e;i===e&&(i=null),s=o=[o,a,c,i]}else mo=s,s=e;(n=s!==e?t.substring(n,mo):s)!==e?(u,u=go(n)):(mo=u,u=e)}else mo=u,u=e;xo--,u===e&&(r=e,0===xo&&Oo(le));return u}(),r!==e&&(u,r=hs(r)),(u=r)===e&&(u=mo,r=function(){var u,r,n,s,o;xo++,u=mo,39===t.charCodeAt(mo)?(r=N,mo++):(r=e,0===xo&&Oo(Ku));if(r!==e){for(n=mo,s=[],t.substr(mo,2)===jt?(o=jt,mo+=2):(o=e,0===xo&&Oo(ue)),o===e&&(Yt.test(t.charAt(mo))?(o=t.charAt(mo),mo++):(o=e,0===xo&&Oo(re)));o!==e;)s.push(o),t.substr(mo,2)===jt?(o=jt,mo+=2):(o=e,0===xo&&Oo(ue)),o===e&&(Yt.test(t.charAt(mo))?(o=t.charAt(mo),mo++):(o=e,0===xo&&Oo(re)));n=t.substring(n,mo),39===t.charCodeAt(mo)?(s=N,mo++):(s=e,0===xo&&Oo(Ku)),s!==e?(u,u=po(n)):(mo=u,u=e)}else mo=u,u=e;xo--,u===e&&(r=e,0===xo&&Oo(te));return u}(),r!==e&&(u,r=ps(r)),(u=r)===e&&(u=mo,r=function(){var u,r,n,s,o,a;xo++,u=mo,t.substr(mo,7)===qt?(r=qt,mo+=7):(r=e,0===xo&&Oo(ye));if(r!==e){if(n=mo,s=mo,o=[],au.test(t.charAt(mo))?(a=t.charAt(mo),mo++):(a=e,0===xo&&Oo(we)),a!==e)for(;a!==e;)o.push(a),au.test(t.charAt(mo))?(a=t.charAt(mo),mo++):(a=e,0===xo&&Oo(we));else o=e;o!==e?(t.substr(mo,2)===Nt?(a=Nt,mo+=2):(a=e,0===xo&&Oo(xe)),a===e&&(61===t.charCodeAt(mo)?(a=h,mo++):(a=e,0===xo&&Oo(Cu))),a===e&&(a=null),s=o=[o,a]):(mo=s,s=e),(n=s!==e?t.substring(n,mo):s)!==e?(39===t.charCodeAt(mo)?(s=N,mo++):(s=e,0===xo&&Oo(Ku)),s!==e?(u,u=Eo(n)):(mo=u,u=e)):(mo=u,u=e)}else mo=u,u=e;xo--,u===e&&(r=e,0===xo&&Oo(De));return u}(),r!==e&&(u,r=Cs(r)),(u=r)===e&&(u=mo,(r=Yo())!==e&&(u,r=ds(r)),(u=r)===e&&(u=function(){var u,r;xo++,u=mo,t.substr(mo,4)===Y?(r=Y,mo+=4):(r=e,0===xo&&Oo(lr));r!==e&&(u,r=Fs());u=r,xo--,u===e&&(r=e,0===xo&&Oo(Ar));return u}())))))))),u}function oa(){var u,r,n,s,o,a;if(xo++,u=mo,r=mo,n=mo,123===t.charCodeAt(mo)?(s=tt,mo++):(s=e,0===xo&&Oo(pr)),s!==e){for(o=[],(a=oa())===e&&(Qt.test(t.charAt(mo))?(a=t.charAt(mo),mo++):(a=e,0===xo&&Oo(Cr)));a!==e;)o.push(a),(a=oa())===e&&(Qt.test(t.charAt(mo))?(a=t.charAt(mo),mo++):(a=e,0===xo&&Oo(Cr)));125===t.charCodeAt(mo)?(a=ut,mo++):(a=e,0===xo&&Oo(dr)),a!==e?n=s=[s,o,a]:(mo=n,n=e)}else mo=n,n=e;return(r=n!==e?t.substring(r,mo):n)!==e&&(u,r=gs(r)),xo--,(u=r)===e&&(r=e,0===xo&&Oo(hr)),u}function aa(){var u,r,n,s,o,a,c,i;if(xo++,u=mo,r=mo,n=mo,91===t.charCodeAt(mo)?(s=P,mo++):(s=e,0===xo&&Oo(Vu)),s!==e?(o=Sa(),93===t.charCodeAt(mo)?(a=M,mo++):(a=e,0===xo&&Oo(Wu)),a!==e?n=s=[s,o,a]:(mo=n,n=e)):(mo=n,n=e),n===e)if(n=mo,91===t.charCodeAt(mo)?(s=P,mo++):(s=e,0===xo&&Oo(Vu)),s!==e)if(o=Sa(),123===t.charCodeAt(mo)?(a=tt,mo++):(a=e,0===xo&&Oo(pr)),a!==e){for(c=[],(i=aa())===e&&(Vt.test(t.charAt(mo))?(i=t.charAt(mo),mo++):(i=e,0===xo&&Oo(gr)));i!==e;)c.push(i),(i=aa())===e&&(Vt.test(t.charAt(mo))?(i=t.charAt(mo),mo++):(i=e,0===xo&&Oo(gr)));93===t.charCodeAt(mo)?(i=M,mo++):(i=e,0===xo&&Oo(Wu)),i!==e?n=s=[s,o,a,c,i]:(mo=n,n=e)}else mo=n,n=e;else mo=n,n=e;return(r=n!==e?t.substring(r,mo):n)!==e&&(u,r=Bs(r)),xo--,(u=r)===e&&(r=e,0===xo&&Oo(Fr)),u}function ca(){var u,r,n;return u=mo,r=function(){var u,r,n;if(xo++,u=mo,r=[],Wt.test(t.charAt(mo))?(n=t.charAt(mo),mo++):(n=e,0===xo&&Oo(vr)),n!==e)for(;n!==e;)r.push(n),Wt.test(t.charAt(mo))?(n=t.charAt(mo),mo++):(n=e,0===xo&&Oo(vr));else r=e;return u=r!==e?t.substring(u,mo):r,xo--,u===e&&(r=e,0===xo&&Oo(br)),u}(),r!==e&&$a()!==e?(n=function(){var t,u,r,n,s,o,a;if(t=mo,u=[],r=mo,n=ea(),n!==e){for(s=[],o=mo,xa()!==e&&(a=ea())!==e?(o,o=ys(n,a)):(mo=o,o=e);o!==e;)s.push(o),o=mo,xa()!==e&&(a=ea())!==e?(o,o=ys(n,a)):(mo=o,o=e);r,r=ws(n,s)}else mo=r,r=e;for(;r!==e;)if(u.push(r),r=mo,(n=ea())!==e){for(s=[],o=mo,xa()!==e&&(a=ea())!==e?(o,o=ys(n,a)):(mo=o,o=e);o!==e;)s.push(o),o=mo,xa()!==e&&(a=ea())!==e?(o,o=ys(n,a)):(mo=o,o=e);r,r=ws(n,s)}else mo=r,r=e;return t,u=xs(u),t=u,t}(),La()!==e?(u,u=Ds(r,n)):(mo=u,u=e)):(mo=u,u=e),u}function ia(){var u,r;return u=mo,Sa(),t.substr(mo,3).toLowerCase()===ot?(r=t.substr(mo,3),mo+=3):(r=e,0===xo&&Oo(wr)),r!==e&&Ta()!==e?(u,u=Ls()):(mo=u,u=e),u}function fa(){var u,r;return u=mo,Ta()!==e?(t.substr(mo,3).toLowerCase()===at?(r=t.substr(mo,3),mo+=3):(r=e,0===xo&&Oo(xr)),r!==e&&Ta()!==e?(u,u=Ss()):(mo=u,u=e)):(mo=u,u=e),u}function Aa(){var u,r;return u=mo,Ta()!==e?(t.substr(mo,2).toLowerCase()===ct?(r=t.substr(mo,2),mo+=2):(r=e,0===xo&&Oo($r)),r!==e&&Ta()!==e?(u,u=Ts()):(mo=u,u=e)):(mo=u,u=e),u}function la(){var u,r,n;return u=mo,t.substr(mo,9)===it?(r=it,mo+=9):(r=e,0===xo&&Oo(Lr)),r!==e?(n=function(){var t,u,r,n,s,o;if(t=mo,u=$a(),u!==e)if(Sa(),(r=ha())!==e){for(n=[],s=mo,Sa(),xa()!==e?(Sa(),(o=ha())!==e?(s,s=Ms(r,o)):(mo=s,s=e)):(mo=s,s=e);s!==e;)n.push(s),s=mo,Sa(),xa()!==e?(Sa(),(o=ha())!==e?(s,s=Ms(r,o)):(mo=s,s=e)):(mo=s,s=e);s=Sa(),La()!==e?(t,t=Us(r,n)):(mo=t,t=e)}else mo=t,t=e;else mo=t,t=e;return t}(),n!==e?(u,u=js(n)):(mo=u,u=e)):(mo=u,u=e),u===e&&(u=mo,t.substr(mo,7)===ft?(r=ft,mo+=7):(r=e,0===xo&&Oo(Sr)),r!==e?(n=function(){var t,u,r,n,s,o,a,c;if(t=mo,u=$a(),u!==e)if($a()!==e)if((r=ga())!==e){for(n=[],s=mo,(o=xa())!==e&&(a=ga())!==e?(s,s=Vs(r,a)):(mo=s,s=e);s!==e;)n.push(s),s=mo,(o=xa())!==e&&(a=ga())!==e?(s,s=Vs(r,a)):(mo=s,s=e);s=mo,(o=La())!==e&&(s,o=Ws(r,n)),(s=o)!==e?(o=mo,(a=xa())!==e&&(c=Wo())!==e?(o,o=Xs(r,n,c)):(mo=o,o=e),o===e&&(o=null),(a=La())!==e?(t,t=Ys(r,n,o)):(mo=t,t=e)):(mo=t,t=e)}else mo=t,t=e;else mo=t,t=e;else mo=t,t=e;return t}(),n!==e?(u,u=Os(n)):(mo=u,u=e)):(mo=u,u=e),u===e&&(u=mo,t.substr(mo,6)===At?(r=At,mo+=6):(r=e,0===xo&&Oo(Tr)),r!==e?(n=function(){var t,u,r,n;t=mo,u=$a(),u!==e?(Sa(),r=mo,(n=Go())!==e&&(r,n=ro(n)),(r=n)!==e?(n=Sa(),La()!==e?(t,t=eo(r)):(mo=t,t=e)):(mo=t,t=e)):(mo=t,t=e);return t}(),n!==e?(u,u=Zs(n)):(mo=u,u=e)):(mo=u,u=e),u===e&&(u=mo,t.substr(mo,6)===lt?(r=lt,mo+=6):(r=e,0===xo&&Oo(jr)),r!==e?(n=function(){var u,r,n,s,o;if(u=mo,r=$a(),r!==e){for(n=mo,s=[],Xt.test(t.charAt(mo))?(o=t.charAt(mo),mo++):(o=e,0===xo&&Oo(Qr));o!==e;)s.push(o),Xt.test(t.charAt(mo))?(o=t.charAt(mo),mo++):(o=e,0===xo&&Oo(Qr));n=t.substring(n,mo),(s=La())!==e?(u,u=no(n)):(mo=u,u=e)}else mo=u,u=e;return u}(),n!==e?(u,u=ks(n)):(mo=u,u=e)):(mo=u,u=e),u===e&&(u=mo,t.substr(mo,6)===ht?(r=ht,mo+=6):(r=e,0===xo&&Oo(Or)),r!==e?(n=function(){var t,u,r,n,s,o;if(t=mo,u=$a(),u!==e)if(Sa(),(r=Wo())!==e){if(n=[],s=mo,Sa(),xa()!==e?(Sa(),(o=Wo())!==e?(s,s=so(r,o)):(mo=s,s=e)):(mo=s,s=e),s!==e)for(;s!==e;)n.push(s),s=mo,Sa(),xa()!==e?(Sa(),(o=Wo())!==e?(s,s=so(r,o)):(mo=s,s=e)):(mo=s,s=e);else n=e;n!==e?(s=Sa(),La()!==e?(t,t=oo(r,n)):(mo=t,t=e)):(mo=t,t=e)}else mo=t,t=e;else mo=t,t=e;return t}(),n!==e?(u,u=zs(n)):(mo=u,u=e)):(mo=u,u=e),u===e&&(u=mo,t.substr(mo,7)===pt?(r=pt,mo+=7):(r=e,0===xo&&Oo(Zr)),r!==e?(n=function(){var t,u,r,n,s,o,a,c,i,f;if(t=mo,u=$a(),u!==e)if(r=Sa(),(n=Ba())!==e){for(s=[],o=mo,a=Sa(),(c=xa())!==e?(i=Sa(),(f=Ba())!==e?o=a=[a,c,i,f]:(mo=o,o=e)):(mo=o,o=e);o!==e;)s.push(o),o=mo,a=Sa(),(c=xa())!==e?(i=Sa(),(f=Ba())!==e?o=a=[a,c,i,f]:(mo=o,o=e)):(mo=o,o=e);o=Sa(),(a=La())!==e?t=u=[u,r,n,s,o,a]:(mo=t,t=e)}else mo=t,t=e;else mo=t,t=e;return t}(),n!==e?(u,u=_s(n)):(mo=u,u=e)):(mo=u,u=e),u===e&&(u=mo,t.substr(mo,3)===Ct?(r=Ct,mo+=3):(r=e,0===xo&&Oo(kr)),r!==e?(n=function(){var t,u,r;t=mo,u=$a(),u!==e?(Sa(),(r=Mo())!==e?(Sa(),La()!==e?(t,t=io(r)):(mo=t,t=e)):(mo=t,t=e)):(mo=t,t=e);return t}(),n!==e?(u,u=Rs(n)):(mo=u,u=e)):(mo=u,u=e),u===e&&(u=mo,t.substr(mo,4)===dt?(r=dt,mo+=4):(r=e,0===xo&&Oo(zr)),r!==e?(n=function(){var t,u,r;t=mo,u=$a(),u!==e?(Sa(),(r=Uo())!==e?(Sa(),La()!==e?(t,t=fo(r)):(mo=t,t=e)):(mo=t,t=e)):(mo=t,t=e);return t}(),n!==e?(u,u=qs(n)):(mo=u,u=e)):(mo=u,u=e),u===e&&(u=mo,t.substr(mo,7)===Ft?(r=Ft,mo+=7):(r=e,0===xo&&Oo(_r)),r!==e?(n=function(){var t,u,r,n,s,o;if(t=mo,u=$a(),u!==e)if(Sa(),(r=Vo())!==e){for(n=[],s=mo,xa()!==e&&(o=Vo())!==e?(s,s=Ao(r,o)):(mo=s,s=e);s!==e;)n.push(s),s=mo,xa()!==e&&(o=Vo())!==e?(s,s=Ao(r,o)):(mo=s,s=e);s=Sa(),La()!==e?(t,t=lo(r,n)):(mo=t,t=e)}else mo=t,t=e;else mo=t,t=e;return t}(),n!==e?(u,u=Ns(n)):(mo=u,u=e)):(mo=u,u=e),u===e&&(u=mo,t.substr(mo,8).toLowerCase()===gt?(r=t.substr(mo,8),mo+=8):(r=e,0===xo&&Oo(Rr)),r===e&&(t.substr(mo,11).toLowerCase()===Bt?(r=t.substr(mo,11),mo+=11):(r=e,0===xo&&Oo(qr)),r===e&&(t.substr(mo,6).toLowerCase()===bt?(r=t.substr(mo,6),mo+=6):(r=e,0===xo&&Oo(Nr)),r===e&&(t.substr(mo,9).toLowerCase()===vt?(r=t.substr(mo,9),mo+=9):(r=e,0===xo&&Oo(Ir)),r===e&&(t.substr(mo,10).toLowerCase()===Et?(r=t.substr(mo,10),mo+=10):(r=e,0===xo&&Oo(Pr)),r===e&&(t.substr(mo,13).toLowerCase()===mt?(r=t.substr(mo,13),mo+=13):(r=e,0===xo&&Oo(Mr))))))),r!==e?(n=function(){var t,u,r,n;t=mo,u=$a(),u!==e?(Sa(),(r=ea())!==e?(Sa(),xa()!==e?(Sa(),(n=ea())!==e?(Sa(),La()!==e?(t,t=ao(r,n)):(mo=t,t=e)):(mo=t,t=e)):(mo=t,t=e)):(mo=t,t=e)):(mo=t,t=e);return t}(),n!==e?(u,u=Is(r,n)):(mo=u,u=e)):(mo=u,u=e),u===e&&(u=mo,r=function(){var u,r;u=mo,t.substr(mo,8)===Lt?(r=Lt,mo+=8):(r=e,0===xo&&Oo(Vr));r!==e&&(u,r=co());return u=r,u}(),r!==e&&(u,r=Ps(r)),u=r)))))))))),u}function ha(){var u,r,n,s;return u=mo,r=mo,t.substr(mo,6)===f?(n=f,mo+=6):(n=e,0===xo&&Oo(lu)),n!==e&&(s=Fa())!==e?(r,r=Gs(s)):(mo=r,r=e),r===e&&(r=pa()),r!==e&&(u,r=Hs(r)),u=r}function pa(){var t,u,r,n,s;return t=mo,(u=na())!==e?((r=Ca())===e&&(r=null),(n=da())===e&&(n=null),(s=Fa())===e&&(s=null),t,t=Js(u,r,s)):(mo=t,t=e),t===e&&(t=mo,(u=ma())!==e&&(r=$a())!==e&&(n=pa())!==e&&(s=La())!==e?t=u=[u,r,n,s]:(mo=t,t=e)),t}function Ca(){var u,r,n,s,o;if(u=mo,Ta()!==e)if(t.substr(mo,4)===Dt?(r=Dt,mo+=4):(r=e,0===xo&&Oo(Ur)),r!==e)if(Ta()!==e){if(n=mo,s=[],Wt.test(t.charAt(mo))?(o=t.charAt(mo),mo++):(o=e,0===xo&&Oo(vr)),o!==e)for(;o!==e;)s.push(o),Wt.test(t.charAt(mo))?(o=t.charAt(mo),mo++):(o=e,0===xo&&Oo(vr));else s=e;(n=s!==e?t.substring(n,mo):s)!==e?(u,u=Ks(n)):(mo=u,u=e)}else mo=u,u=e;else mo=u,u=e;else mo=u,u=e;return u}function da(){var u,r,n,s,o,a,c;return u=mo,(r=Ta())!==e?(t.substr(mo,4)===yt?(n=yt,mo+=4):(n=e,0===xo&&Oo(Gr)),n!==e&&(s=Ta())!==e&&(o=na())!==e&&(a=Ca())!==e?((c=da())===e&&(c=null),u=r=[r,n,s,o,a,c]):(mo=u,u=e)):(mo=u,u=e),u}function Fa(){var u,r,n;return u=mo,Ta()!==e?(t.substr(mo,2)===wt?(r=wt,mo+=2):(r=e,0===xo&&Oo(Hr)),r!==e&&Ta()!==e&&(n=ma())!==e?(u,u=Qs(n)):(mo=u,u=e)):(mo=u,u=e),u}function ga(){var u,r;return u=mo,r=function(){var u,r,n,s,o,a,c,i,f,A,l;u=mo,r=mo,t.substr(mo,6)===xt?(n=xt,mo+=6):(n=e,0===xo&&Oo(Jr));if(n!==e)if((s=$a())!==e)if(o=Sa(),t.substr(mo,4)===$t?(a=$t,mo+=4):(a=e,0===xo&&Oo(Kr)),a===e&&(a=na()),a!==e){if(c=[],i=mo,f=Sa(),(A=xa())!==e&&(l=na())!==e?i=f=[f,A,l]:(mo=i,i=e),i!==e)for(;i!==e;)c.push(i),i=mo,f=Sa(),(A=xa())!==e&&(l=na())!==e?i=f=[f,A,l]:(mo=i,i=e);else c=e;c!==e?(i=Sa(),(f=La())!==e?r=n=[n,s,o,a,c,i,f]:(mo=r,r=e)):(mo=r,r=e)}else mo=r,r=e;else mo=r,r=e;else mo=r,r=e;r!==e&&(u,r=uo(r));return u=r,u}(),r===e&&(r=na()),r!==e&&(u,r=to(r)),u=r}function Ba(){var t,u,r;return t=mo,(u=Ho())!==e&&(r=Fa())!==e?t=u=[u,r]:(mo=t,t=e),t}function ba(){var u,r;return xo++,u=mo,t.substr(mo,4)===St?(r=St,mo+=4):(r=e,0===xo&&Oo(Xr)),r===e&&(t.substr(mo,5)===Tt?(r=Tt,mo+=5):(r=e,0===xo&&Oo(Yr))),r!==e&&(u,r=ho(r)),xo--,(u=r)===e&&(r=e,0===xo&&Oo(Wr)),u}function va(){var u,r,n,s,o,a,c,i,f,A,l,h,p,C,d,F,g,B,b,v,E,m,D,y,w;if(xo++,u=mo,r=mo,n=mo,s=[],tu.test(t.charAt(mo))?(o=t.charAt(mo),mo++):(o=e,0===xo&&Oo(se)),o!==e)for(;o!==e;)s.push(o),tu.test(t.charAt(mo))?(o=t.charAt(mo),mo++):(o=e,0===xo&&Oo(se));else s=e;if(s!==e)if(45===t.charCodeAt(mo)?(o=Ot,mo++):(o=e,0===xo&&Oo(ae)),o!==e)if(tu.test(t.charAt(mo))?(a=t.charAt(mo),mo++):(a=e,0===xo&&Oo(se)),a!==e)if(tu.test(t.charAt(mo))?(c=t.charAt(mo),mo++):(c=e,0===xo&&Oo(se)),c!==e)if(45===t.charCodeAt(mo)?(i=Ot,mo++):(i=e,0===xo&&Oo(ae)),i!==e)if(tu.test(t.charAt(mo))?(f=t.charAt(mo),mo++):(f=e,0===xo&&Oo(se)),f!==e)if(tu.test(t.charAt(mo))?(A=t.charAt(mo),mo++):(A=e,0===xo&&Oo(se)),A!==e){if(l=mo,84===t.charCodeAt(mo)?(h=Zt,mo++):(h=e,0===xo&&Oo(ce)),h!==e)if(tu.test(t.charAt(mo))?(p=t.charAt(mo),mo++):(p=e,0===xo&&Oo(se)),p!==e)if(tu.test(t.charAt(mo))?(C=t.charAt(mo),mo++):(C=e,0===xo&&Oo(se)),C!==e)if(58===t.charCodeAt(mo)?(d=Z,mo++):(d=e,0===xo&&Oo(Iu)),d!==e)if(tu.test(t.charAt(mo))?(F=t.charAt(mo),mo++):(F=e,0===xo&&Oo(se)),F!==e)if(tu.test(t.charAt(mo))?(g=t.charAt(mo),mo++):(g=e,0===xo&&Oo(se)),g!==e){if(B=mo,58===t.charCodeAt(mo)?(b=Z,mo++):(b=e,0===xo&&Oo(Iu)),b!==e)if(tu.test(t.charAt(mo))?(v=t.charAt(mo),mo++):(v=e,0===xo&&Oo(se)),v!==e)if(tu.test(t.charAt(mo))?(E=t.charAt(mo),mo++):(E=e,0===xo&&Oo(se)),E!==e){if(m=mo,46===t.charCodeAt(mo)?(D=kt,mo++):(D=e,0===xo&&Oo(ie)),D!==e){if(y=[],tu.test(t.charAt(mo))?(w=t.charAt(mo),mo++):(w=e,0===xo&&Oo(se)),w!==e)for(;w!==e;)y.push(w),tu.test(t.charAt(mo))?(w=t.charAt(mo),mo++):(w=e,0===xo&&Oo(se));else y=e;y!==e?m=D=[D,y]:(mo=m,m=e)}else mo=m,m=e;m===e&&(m=null),B=b=[b,v,E,m]}else mo=B,B=e;else mo=B,B=e;else mo=B,B=e;B===e&&(B=null),90===t.charCodeAt(mo)?(b=zt,mo++):(b=e,0===xo&&Oo(fe)),b===e&&(b=mo,43===t.charCodeAt(mo)?(v=_t,mo++):(v=e,0===xo&&Oo(Ae)),v===e&&(45===t.charCodeAt(mo)?(v=Ot,mo++):(v=e,0===xo&&Oo(ae))),v!==e?(tu.test(t.charAt(mo))?(E=t.charAt(mo),mo++):(E=e,0===xo&&Oo(se)),E!==e?(tu.test(t.charAt(mo))?(m=t.charAt(mo),mo++):(m=e,0===xo&&Oo(se)),m!==e?(58===t.charCodeAt(mo)?(D=Z,mo++):(D=e,0===xo&&Oo(Iu)),D!==e?(tu.test(t.charAt(mo))?(y=t.charAt(mo),mo++):(y=e,0===xo&&Oo(se)),y!==e?(tu.test(t.charAt(mo))?(w=t.charAt(mo),mo++):(w=e,0===xo&&Oo(se)),w!==e?b=v=[v,E,m,D,y,w]:(mo=b,b=e)):(mo=b,b=e)):(mo=b,b=e)):(mo=b,b=e)):(mo=b,b=e)):(mo=b,b=e)),b===e&&(b=null),l=h=[h,p,C,d,F,g,B,b]}else mo=l,l=e;else mo=l,l=e;else mo=l,l=e;else mo=l,l=e;else mo=l,l=e;else mo=l,l=e;l===e&&(l=null),n=s=[s,o,a,c,i,f,A,l]}else mo=n,n=e;else mo=n,n=e;else mo=n,n=e;else mo=n,n=e;else mo=n,n=e;else mo=n,n=e;else mo=n,n=e;return(r=n!==e?t.substring(r,mo):n)!==e&&(u,r=Fo(r)),xo--,(u=r)===e&&(r=e,0===xo&&Oo(oe)),u}function Ea(){var u,r,n,s,o,a;if(xo++,u=mo,r=mo,n=mo,uu.test(t.charAt(mo))?(s=t.charAt(mo),mo++):(s=e,0===xo&&Oo(he)),s===e&&(s=null),o=[],tu.test(t.charAt(mo))?(a=t.charAt(mo),mo++):(a=e,0===xo&&Oo(se)),a!==e)for(;a!==e;)o.push(a),tu.test(t.charAt(mo))?(a=t.charAt(mo),mo++):(a=e,0===xo&&Oo(se));else o=e;return o!==e?n=s=[s,o]:(mo=n,n=e),(r=n!==e?t.substring(r,mo):n)!==e&&(u,r=Bo(r)),xo--,(u=r)===e&&(r=e,0===xo&&Oo(Ce)),u}function ma(){var u,r,n,s,o,a,c,i;if(xo++,u=mo,r=mo,xo++,n=ba(),xo--,n===e?r=void 0:(mo=r,r=e),r!==e)if(n=mo,xo++,s=Da(),xo--,s===e?n=void 0:(mo=n,n=e),n!==e){if(s=mo,o=mo,ru.test(t.charAt(mo))?(a=t.charAt(mo),mo++):(a=e,0===xo&&Oo(Fe)),a!==e){for(c=[],eu.test(t.charAt(mo))?(i=t.charAt(mo),mo++):(i=e,0===xo&&Oo(ge));i!==e;)c.push(i),eu.test(t.charAt(mo))?(i=t.charAt(mo),mo++):(i=e,0===xo&&Oo(ge));o=a=[a,c]}else mo=o,o=e;(s=o!==e?t.substring(s,mo):o)!==e?(u,u=bo(s)):(mo=u,u=e)}else mo=u,u=e;else mo=u,u=e;return xo--,u===e&&(r=e,0===xo&&Oo(de)),u}function Da(){var u,r,n,s,o,a,c,i,f,A,l,h,p,C;return xo++,u=mo,r=mo,(n=ya())!==e&&(s=ya())!==e?(45===t.charCodeAt(mo)?(o=Ot,mo++):(o=e,0===xo&&Oo(ae)),o===e&&(o=null),(a=ya())!==e?(45===t.charCodeAt(mo)?(c=Ot,mo++):(c=e,0===xo&&Oo(ae)),c===e&&(c=null),(i=ya())!==e?(45===t.charCodeAt(mo)?(f=Ot,mo++):(f=e,0===xo&&Oo(ae)),f===e&&(f=null),(A=ya())!==e?(45===t.charCodeAt(mo)?(l=Ot,mo++):(l=e,0===xo&&Oo(ae)),l===e&&(l=null),(h=ya())!==e&&(p=ya())!==e&&(C=ya())!==e?r=n=[n,s,o,a,c,i,f,A,l,h,p,C]:(mo=r,r=e)):(mo=r,r=e)):(mo=r,r=e)):(mo=r,r=e)):(mo=r,r=e),u=r!==e?t.substring(u,mo):r,xo--,u===e&&(r=e,0===xo&&Oo(Be)),u}function ya(){var u,r,n,s,o,a;return xo++,u=mo,r=mo,nu.test(t.charAt(mo))?(n=t.charAt(mo),mo++):(n=e,0===xo&&Oo(ve)),n!==e?(nu.test(t.charAt(mo))?(s=t.charAt(mo),mo++):(s=e,0===xo&&Oo(ve)),s!==e?(nu.test(t.charAt(mo))?(o=t.charAt(mo),mo++):(o=e,0===xo&&Oo(ve)),o!==e?(nu.test(t.charAt(mo))?(a=t.charAt(mo),mo++):(a=e,0===xo&&Oo(ve)),a!==e?r=n=[n,s,o,a]:(mo=r,r=e)):(mo=r,r=e)):(mo=r,r=e)):(mo=r,r=e),u=r!==e?t.substring(u,mo):r,xo--,u===e&&(r=e,0===xo&&Oo(be)),u}function wa(){var u,r,n,s;if(u=mo,r=mo,n=[],su.test(t.charAt(mo))?(s=t.charAt(mo),mo++):(s=e,0===xo&&Oo(Ee)),s!==e)for(;s!==e;)n.push(s),su.test(t.charAt(mo))?(s=t.charAt(mo),mo++):(s=e,0===xo&&Oo(Ee));else n=e;return(r=n!==e?t.substring(r,mo):n)!==e&&(u,r=vo(r)),u=r}function xa(){var u,r,n;return u=mo,r=Sa(),44===t.charCodeAt(mo)?(n=I,mo++):(n=e,0===xo&&Oo(Qu)),n!==e?u=r=[r,n,Sa()]:(mo=u,u=e),u}function $a(){var u,r,n;return u=mo,r=Sa(),40===t.charCodeAt(mo)?(n=It,mo++):(n=e,0===xo&&Oo($e)),n!==e?u=r=[r,n,Sa()]:(mo=u,u=e),u}function La(){var u,r,n;return u=mo,r=Sa(),41===t.charCodeAt(mo)?(n=Pt,mo++):(n=e,0===xo&&Oo(Le)),n!==e?u=r=[r,n]:(mo=u,u=e),u}function Sa(){var u,r,n;for(xo++,u=mo,r=[],cu.test(t.charAt(mo))?(n=t.charAt(mo),mo++):(n=e,0===xo&&Oo(Te));n!==e;)r.push(n),cu.test(t.charAt(mo))?(n=t.charAt(mo),mo++):(n=e,0===xo&&Oo(Te));return u=t.substring(u,mo),xo--,r=e,0===xo&&Oo(Se),u}function Ta(){var u,r,n;if(xo++,u=mo,r=[],cu.test(t.charAt(mo))?(n=t.charAt(mo),mo++):(n=e,0===xo&&Oo(Te)),n!==e)for(;n!==e;)r.push(n),cu.test(t.charAt(mo))?(n=t.charAt(mo),mo++):(n=e,0===xo&&Oo(Te));else r=e;return u=r!==e?t.substring(u,mo):r,xo--,u===e&&(r=e,0===xo&&Oo(je)),u}const ja=["$value"],Oa={eq:"=",ne:"!=",lt:"<",gt:">",le:"<=",ge:">="},Za={topcount:!0,bottomcount:!0,topsum:!1,bottomsum:!1,toppercent:!1,bottompercent:!1},ka=Object.assign,{strict:za,minimal:_a}=u,Ra=[];let qa,Na;const Ia=u.safeNumber||function(t){if("string"!=typeof t)return t;const u=parseFloat(t);if(!isNaN(u)&&String(u)===t)return u;const r=parseInt(t);return isNaN(r)||String(r)!==t.replace(/^-?\d+\.0+$/,t.split(".")[0])?t:r},Pa=u.skipToken,Ma=u.standardBase64||function(t){return Buffer.from(t,"base64").toString("base64")},Ua=t=>u=>t===u||t.as&&u.as&&t.as===u.as||u.as&&t.ref&&u.as===t.ref[t.ref.length-1]||t.ref&&u.ref&&t.ref.join("")===u.ref.join(""),Ga=t=>u=>{if(Array.isArray(u))return u.map(Ga(t));const r=u.ref&&t.find((t=>t.as&&t.func&&t.as===u.ref[0]));return r||u},Ha=t=>u=>Array.isArray(u)?u.map(Ha(t)):u.ref&&!t.find(Ua(u))?{val:null}:u,Ja=(t,u)=>{if(1===u.ref.length)t.find(Ua(u))||t.push(u);else{const r=u.ref.shift(),e=t.find((t=>t.ref&&t.ref[0]===r));if(e)Ja(e.expand,u);else{const e={ref:[r],expand:[]};Ja(e.expand,u),t.push(e)}}},Ka=(t,u,r=!1)=>{let e=Wa({from:t.from},u,r);if(Array.isArray(e))for(let u=0;u<e.length;u++)e[u]=Qa(e[u],t,r);else e=Qa(e,t,r);return e},Qa=(t,u,r)=>{if(!u)return t;u.apply&&delete u.apply;let e={};u.columns&&"$count"===u.columns[0].as||t.SELECT.where&&u.where||t.SELECT.limit&&u.limit||t.SELECT.orderBy&&u.orderBy||t.SELECT.search&&u.search?e.from=t:e=t.SELECT;for(const t in u)"columns"===t?(u.columns=u.columns.map((t=>e.columns&&e.columns.find((u=>t.ref&&t.ref[0]===u.as||u.ref&&t.ref&&t.ref[0]===u.ref[0]&&!t.expand))||t)),e.columns&&e.groupBy&&u.columns.push(...e.columns.filter((t=>r&&e.groupBy.find((u=>t.ref&&t.ref[0]===u.ref[0]))&&!u.columns.some((u=>u.ref&&u.ref[0]===t.as||u.ref&&t.ref&&u.ref[0]===t.ref[0]||u.as&&u.as===t.as))))||[]),e.columns=u.columns):"from"!==t&&(e[t]=u[t]);const n=[...e.columns&&e.columns.filter((t=>e.groupBy&&e.groupBy.find((u=>t.ref&&t.ref[0]===u.ref[0]))))||[],...e.columns&&e.columns.filter((t=>t&&"object"==typeof t&&"func"in t))||[]];return Va(e,n,r),{SELECT:e}},Va=(t,u,r)=>{u.length&&(t.columns=t.columns&&!r?t.columns.reduce(((t,r)=>{const e=u.find(Ua(r));return e&&t.push(e),t}),[]):u,t.where&&(t.where=t.where.map(Ga(t.columns)),t.groupBy&&(t.having=t.where.map(Ha(t.groupBy)),delete t.where)),t.columns=t.columns.reduce(((t,r)=>(r.ref&&r.ref.length>1&&u.find(Ua(r))?Ja(t,{ref:[...r.ref]}):t.push(r),t)),[]))},Wa=(t,u,r)=>{if(!u)return;if(t.apply&&delete t.apply,u.identity&&t.from.SELECT&&(t=t.from.SELECT),(u.apply||u.where&&t.where||u.search&&t.search||u.limit&&t.limit||u.orderBy&&t.orderBy)&&(t.from={SELECT:{...t}}),u.where&&(t.where=u.where),u.search&&(t.search=u.search),u.groupBy){t.groupBy=[];for(const r of u.groupBy)t.groupBy.find(Ua(r))||t.groupBy.push(r)}u.limit&&(t.limit=u.limit),u.orderBy&&(t.orderBy=u.orderBy);const e=[...t.groupBy||[],...u.aggregate||[]];if(Va(t,e,r),u.apply&&t.from&&Wa(t.from.SELECT,u.apply),u.concat&&Array.isArray(u.concat)){const r=[];for(let e of u.concat){e.from=1===Object.keys(t).length?t.from:{SELECT:t};const u=Wa(e,e.apply);Array.isArray(u)?r.push(...u):r.push(u)}t=r}return Array.isArray(t)?t:{SELECT:t}},Xa=t=>{qa.limit&&qa.limit.offset&&qa.limit.offset.val&&(t+=qa.limit.offset.val),(qa.limit||(qa.limit={})).offset={val:t}},Ya=(t,u=!1)=>{qa.orderBy=qa.orderBy?u?[t,...qa.orderBy]:[...qa.orderBy,t]:[t]},tc=(t,u)=>{for(const r of u)r.ref&&r.ref[0]===t&&r.ref.shift(),r.func&&tc(t,r.args),r.xpr&&tc(t,r.xpr);return u},uc=(t,u,r,e=!1)=>{t?.forEach((t=>{t.val===u?t.val="list"in r?r.list.map((t=>t.val)):r.val:t.list===u?t.list=r.list:t.func?t.args.forEach(((t,n)=>{t.val===u?t.val=r.val:t.func&&uc(t.args,u,r,e)})):t.SELECT&&rc(t.SELECT,u,r,e)}))},rc=(t,u,r,e=!1)=>{const{where:n,from:s}=t;uc(n,u,r),s?.ref?.forEach((t=>{uc(t.where,u,r,!0)}))};if((r=o())!==e&&mo===t.length)return r;throw r!==e&&mo<t.length&&Oo({type:"end"}),Zo(wo,yo<t.length?t.charAt(yo):null,yo<t.length?jo(yo,yo+1):jo(yo,yo))}peg$subclass(peg$SyntaxError,Error),peg$SyntaxError.prototype.format=function(t){var u="Error: "+this.message;if(this.location){var r,e=null;for(r=0;r<t.length;r++)if(t[r].source===this.location.source){e=t[r].text.split(/\r\n|\n|\r/g);break}var n=this.location.start,s=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(n):n,o=this.location.source+":"+s.line+":"+s.column;if(e){var a=this.location.end,c=peg$padEnd("",s.line.toString().length," "),i=e[n.line-1],f=(n.line===a.line?a.column:i.length+1)-n.column||1;u+="\n --\x3e "+o+"\n"+c+" |\n"+s.line+" | "+i+"\n"+c+" | "+peg$padEnd("",n.column-1," ")+peg$padEnd("",f,"^")}else u+="\n at "+o}return u},peg$SyntaxError.buildMessage=function(t,u){var r={literal:function(t){return'"'+n(t.text)+'"'},class:function(t){var u=t.parts.map((function(t){return Array.isArray(t)?s(t[0])+"-"+s(t[1]):s(t)}));return"["+(t.inverted?"^":"")+u.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(t){return t.description}};function e(t){return t.charCodeAt(0).toString(16).toUpperCase()}function n(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(t){return"\\x0"+e(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+e(t)}))}function s(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(t){return"\\x0"+e(t)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(t){return"\\x"+e(t)}))}function o(t){return r[t.type](t)}return"Expected "+function(t){var u,r,e=t.map(o);if(e.sort(),e.length>0){for(u=1,r=1;u<e.length;u++)e[u-1]!==e[u]&&(e[r]=e[u],r++);e.length=r}switch(e.length){case 1:return e[0];case 2:return e[0]+" or "+e[1];default:return e.slice(0,-1).join(", ")+", or "+e[e.length-1]}}(t)+" but "+function(t){return t?'"'+n(t)+'"':"end of input"}(u)+" found."},module.exports={SyntaxError:peg$SyntaxError,parse:peg$parse};
|
|
1
|
+
"use strict";function peg$subclass(u,t){function r(){this.constructor=u}r.prototype=t.prototype,u.prototype=new r}function peg$SyntaxError(u,t,r,e){var n=Error.call(this,u);return Object.setPrototypeOf&&Object.setPrototypeOf(n,peg$SyntaxError.prototype),n.expected=t,n.found=r,n.location=e,n.name="SyntaxError",n}function peg$padEnd(u,t,r){return r=r||" ",u.length>t?u:(t-=u.length,u+(r+=r.repeat(t)).slice(0,t))}function peg$parse(u,t){var r,e={},n=(t=void 0!==t?t:{}).grammarSource,s={ODataRelativeURI:Zo},o=Zo,i="/",a="?",c="&",f="$count",l="$ref",A="$value",h="=",p="$skiptoken=",C="$search=",d="$select=",F="$expand=",g="$filter=",B="$orderby=",v="$top=",m="$skip=",b="$count=",E="$apply=",D="$at",y="$from",$="$toInclusive",x="$to",w="*",L="/$count",S=";",T='"',j="\\\\",O='\\"',Z=":",_="any",k="all",z="asc",R="desc",I="$deltatoken=",q="'",N=",",P="[",U="]",M="@",G="$format=",H="eq",J="ne",K="lt",Q="gt",V="le",W="ge",X="in",Y="null",uu="{",tu="}",ru="contains",eu="endswith",nu="startswith",su="matchespattern",ou="not",iu="and",au="or",cu="aggregate",fu="groupby",lu="filter",Au="search",hu="concat",pu="compute",Cu="top",du="skip",Fu="orderby",gu="topcount",Bu="bottomcount",vu="topsum",mu="bottomsum",bu="toppercent",Eu="bottompercent",Du="with",yu="from",$u="as",xu="rollup",wu="$all",Lu="identity",Su="true",Tu="false",ju="''",Ou="-",Zu="T",_u=".",ku="Z",zu="e",Ru="binary'",Iu="==",qu="(",Nu=")",Pu=/^[^&]/,Uu=/^[ ]/,Mu=/^[^"&]/,Gu=/^[^"]/,Hu=/^[^;)]/,Ju=/^[a-zA-Z0-9\-_.~![\]]/,Ku=/^[^}]/,Qu=/^[^\]]/,Vu=/^[a-zA-Z]/,Wu=/^[^)]/,Xu=/^[^']/,Yu=/^[0-9]/,ut=/^[+\-]/,tt=/^[_a-zA-Z]/,rt=/^[_a-zA-Z0-9"."A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,et=/^[0-9a-fA-F]/,nt=/^[^\/?]/,st=/^[a-zA-Z0-9\-"."_~!$'()*+,;=:@"\/""?"]/,ot=/^[a-zA-Z0-9\-_]/,it=/^[ \t\n]/,at=xo("/",!1),ct=xo("?",!1),ft=xo("&",!1),lt=xo("$count",!1),At=xo("$ref",!1),ht=xo("$value",!1),pt=xo("=",!1),Ct=xo("$skiptoken=",!1),dt=xo("$search=",!1),Ft=xo("$select=",!1),gt=xo("$expand=",!1),Bt=xo("$filter=",!1),vt=xo("$orderby=",!1),mt=xo("$top=",!1),bt=xo("$skip=",!1),Et=xo("$count=",!1),Dt=xo("$apply=",!1),yt=wo(["&"],!0,!1),$t=xo("$at",!1),xt=xo("$from",!1),wt=xo("$toInclusive",!1),Lt=xo("$to",!1),St=xo("*",!1),Tt=xo("/$count",!1),jt=xo(";",!1),Ot=wo([" "],!1,!1),Zt=wo(['"',"&"],!0,!1),_t=xo('"',!1),kt=xo("\\\\",!1),zt=xo('\\"',!1),Rt=wo(['"'],!0,!1),It=wo([";",")"],!0,!1),qt=xo(":",!1),Nt=xo("any",!1),Pt=xo("all",!1),Ut=xo("asc",!1),Mt=xo("desc",!1),Gt=xo("$deltatoken=",!1),Ht=Lo("value with double-quoted string"),Jt=xo("'",!1),Kt=xo(",",!1),Qt=xo("[",!1),Vt=xo("]",!1),Wt=wo([["a","z"],["A","Z"],["0","9"],"-","_",".","~","!","[","]"],!1,!1),Xt=Lo("an aliased parameter (@param)"),Yt=xo("@",!1),ur=xo("$format=",!1),tr=xo("eq",!1),rr=xo("ne",!1),er=xo("lt",!1),nr=xo("gt",!1),sr=xo("le",!1),or=xo("ge",!1),ir=xo("in",!1),ar=(xo("add",!1),xo("sub",!1),xo("mul",!1),xo("div",!1),xo("mod",!1),Lo("navigation with $count")),cr=Lo("a reference"),fr=Lo("null"),lr=xo("null",!1),Ar=Lo("a json object"),hr=xo("{",!1),pr=wo(["}"],!0,!1),Cr=xo("}",!1),dr=Lo("a json array"),Fr=wo(["]"],!0,!1),gr=Lo("a list"),Br=Lo("a function name"),vr=wo([["a","z"],["A","Z"]],!1,!1),mr=xo("contains",!0),br=xo("endswith",!0),Er=xo("startswith",!0),Dr=xo("matchespattern",!0),yr=xo("NOT",!0),$r=xo("AND",!0),xr=xo("OR",!0),wr=xo("aggregate",!1),Lr=xo("groupby",!1),Sr=xo("filter",!1),Tr=xo("search",!1),jr=xo("concat",!1),Or=xo("compute",!1),Zr=xo("top",!1),_r=xo("skip",!1),kr=xo("orderby",!1),zr=xo("topcount",!0),Rr=xo("bottomcount",!0),Ir=xo("topsum",!0),qr=xo("bottomsum",!0),Nr=xo("toppercent",!0),Pr=xo("bottompercent",!0),Ur=xo("with",!1),Mr=xo("from",!1),Gr=xo("as",!1),Hr=xo("rollup",!1),Jr=xo("$all",!1),Kr=wo([")"],!0,!1),Qr=xo("identity",!1),Vr=Lo("a boolean"),Wr=xo("true",!1),Xr=xo("false",!1),Yr=Lo("a single quoted string"),ue=xo("''",!1),te=wo(["'"],!0,!1),re=Lo("a doubled quoted string"),ee=(Lo("a string"),wo([" ","\t","\n","(",")",'"',"&",";"],!0,!1),Lo("a time")),ne=wo([["0","9"]],!1,!1),se=Lo("a date"),oe=xo("-",!1),ie=xo("T",!1),ae=xo(".",!1),ce=xo("Z",!1),fe=wo(["+","-"],!1,!1),le=Lo("a number"),Ae=xo("e",!1),he=Lo("an integer"),pe=Lo("an identifier"),Ce=wo(["_",["a","z"],["A","Z"]],!1,!1),de=wo(["_",["a","z"],["A","Z"],["0","9"],'"',".",'"',["A","Z"],["a","z"],"ª","µ","º",["À","Ö"],["Ø","ö"],["ø","ˁ"],["ˆ","ˑ"],["ˠ","ˤ"],"ˬ","ˮ",["Ͱ","ʹ"],"Ͷ","ͷ",["ͺ","ͽ"],"Ά",["Έ","Ί"],"Ό",["Ύ","Ρ"],["Σ","ϵ"],["Ϸ","ҁ"],["Ҋ","ԧ"],["Ա","Ֆ"],"ՙ",["ա","և"],["א","ת"],["װ","ײ"],["ؠ","ي"],"ٮ","ٯ",["ٱ","ۓ"],"ە","ۥ","ۦ","ۮ","ۯ",["ۺ","ۼ"],"ۿ","ܐ",["ܒ","ܯ"],["ݍ","ޥ"],"ޱ",["ߊ","ߪ"],"ߴ","ߵ","ߺ",["ࠀ","ࠕ"],"ࠚ","ࠤ","ࠨ",["ࡀ","ࡘ"],"ࢠ",["ࢢ","ࢬ"],["ऄ","ह"],"ऽ","ॐ",["क़","ॡ"],["ॱ","ॷ"],["ॹ","ॿ"],["অ","ঌ"],"এ","ঐ",["ও","ন"],["প","র"],"ল",["শ","হ"],"ঽ","ৎ","ড়","ঢ়",["য়","ৡ"],"ৰ","ৱ",["ਅ","ਊ"],"ਏ","ਐ",["ਓ","ਨ"],["ਪ","ਰ"],"ਲ","ਲ਼","ਵ","ਸ਼","ਸ","ਹ",["ਖ਼","ੜ"],"ਫ਼",["ੲ","ੴ"],["અ","ઍ"],["એ","ઑ"],["ઓ","ન"],["પ","ર"],"લ","ળ",["વ","હ"],"ઽ","ૐ","ૠ","ૡ",["ଅ","ଌ"],"ଏ","ଐ",["ଓ","ନ"],["ପ","ର"],"ଲ","ଳ",["ଵ","ହ"],"ଽ","ଡ଼","ଢ଼",["ୟ","ୡ"],"ୱ","ஃ",["அ","ஊ"],["எ","ஐ"],["ஒ","க"],"ங","ச","ஜ","ஞ","ட","ண","த",["ந","ப"],["ம","ஹ"],"ௐ",["అ","ఌ"],["ఎ","ఐ"],["ఒ","న"],["ప","ళ"],["వ","హ"],"ఽ","ౘ","ౙ","ౠ","ౡ",["ಅ","ಌ"],["ಎ","ಐ"],["ಒ","ನ"],["ಪ","ಳ"],["ವ","ಹ"],"ಽ","ೞ","ೠ","ೡ","ೱ","ೲ",["അ","ഌ"],["എ","ഐ"],["ഒ","ഺ"],"ഽ","ൎ","ൠ","ൡ",["ൺ","ൿ"],["අ","ඖ"],["ක","න"],["ඳ","ර"],"ල",["ව","ෆ"],["ก","ะ"],"า","ำ",["เ","ๆ"],"ກ","ຂ","ຄ","ງ","ຈ","ຊ","ຍ",["ດ","ທ"],["ນ","ຟ"],["ມ","ຣ"],"ລ","ວ","ສ","ຫ",["ອ","ະ"],"າ","ຳ","ຽ",["ເ","ໄ"],"ໆ",["ໜ","ໟ"],"ༀ",["ཀ","ཇ"],["ཉ","ཬ"],["ྈ","ྌ"],["က","ဪ"],"ဿ",["ၐ","ၕ"],["ၚ","ၝ"],"ၡ","ၥ","ၦ",["ၮ","ၰ"],["ၵ","ႁ"],"ႎ",["Ⴀ","Ⴥ"],"Ⴧ","Ⴭ",["ა","ჺ"],["ჼ","ቈ"],["ቊ","ቍ"],["ቐ","ቖ"],"ቘ",["ቚ","ቝ"],["በ","ኈ"],["ኊ","ኍ"],["ነ","ኰ"],["ኲ","ኵ"],["ኸ","ኾ"],"ዀ",["ዂ","ዅ"],["ወ","ዖ"],["ዘ","ጐ"],["ጒ","ጕ"],["ጘ","ፚ"],["ᎀ","ᎏ"],["Ꭰ","Ᏼ"],["ᐁ","ᙬ"],["ᙯ","ᙿ"],["ᚁ","ᚚ"],["ᚠ","ᛪ"],["ᜀ","ᜌ"],["ᜎ","ᜑ"],["ᜠ","ᜱ"],["ᝀ","ᝑ"],["ᝠ","ᝬ"],["ᝮ","ᝰ"],["ក","ឳ"],"ៗ","ៜ",["ᠠ","ᡷ"],["ᢀ","ᢨ"],"ᢪ",["ᢰ","ᣵ"],["ᤀ","ᤜ"],["ᥐ","ᥭ"],["ᥰ","ᥴ"],["ᦀ","ᦫ"],["ᧁ","ᧇ"],["ᨀ","ᨖ"],["ᨠ","ᩔ"],"ᪧ",["ᬅ","ᬳ"],["ᭅ","ᭋ"],["ᮃ","ᮠ"],"ᮮ","ᮯ",["ᮺ","ᯥ"],["ᰀ","ᰣ"],["ᱍ","ᱏ"],["ᱚ","ᱽ"],["ᳩ","ᳬ"],["ᳮ","ᳱ"],"ᳵ","ᳶ",["ᴀ","ᶿ"],["Ḁ","ἕ"],["Ἐ","Ἕ"],["ἠ","ὅ"],["Ὀ","Ὅ"],["ὐ","ὗ"],"Ὑ","Ὓ","Ὕ",["Ὗ","ώ"],["ᾀ","ᾴ"],["ᾶ","ᾼ"],"ι",["ῂ","ῄ"],["ῆ","ῌ"],["ῐ","ΐ"],["ῖ","Ί"],["ῠ","Ῥ"],["ῲ","ῴ"],["ῶ","ῼ"],"ⁱ","ⁿ",["ₐ","ₜ"],"ℂ","ℇ",["ℊ","ℓ"],"ℕ",["ℙ","ℝ"],"ℤ","Ω","ℨ",["K","ℭ"],["ℯ","ℹ"],["ℼ","ℿ"],["ⅅ","ⅉ"],"ⅎ","Ↄ","ↄ",["Ⰰ","Ⱞ"],["ⰰ","ⱞ"],["Ⱡ","ⳤ"],["Ⳬ","ⳮ"],"Ⳳ","ⳳ",["ⴀ","ⴥ"],"ⴧ","ⴭ",["ⴰ","ⵧ"],"ⵯ",["ⶀ","ⶖ"],["ⶠ","ⶦ"],["ⶨ","ⶮ"],["ⶰ","ⶶ"],["ⶸ","ⶾ"],["ⷀ","ⷆ"],["ⷈ","ⷎ"],["ⷐ","ⷖ"],["ⷘ","ⷞ"],"ⸯ","々","〆",["〱","〵"],"〻","〼",["ぁ","ゖ"],["ゝ","ゟ"],["ァ","ヺ"],["ー","ヿ"],["ㄅ","ㄭ"],["ㄱ","ㆎ"],["ㆠ","ㆺ"],["ㇰ","ㇿ"],["㐀","䶵"],["一","鿌"],["ꀀ","ꒌ"],["ꓐ","ꓽ"],["ꔀ","ꘌ"],["ꘐ","ꘟ"],"ꘪ","ꘫ",["Ꙁ","ꙮ"],["ꙿ","ꚗ"],["ꚠ","ꛥ"],["ꜗ","ꜟ"],["Ꜣ","ꞈ"],["Ꞌ","ꞎ"],["Ꞑ","ꞓ"],["Ꞡ","Ɦ"],["ꟸ","ꠁ"],["ꠃ","ꠅ"],["ꠇ","ꠊ"],["ꠌ","ꠢ"],["ꡀ","ꡳ"],["ꢂ","ꢳ"],["ꣲ","ꣷ"],"ꣻ",["ꤊ","ꤥ"],["ꤰ","ꥆ"],["ꥠ","ꥼ"],["ꦄ","ꦲ"],"ꧏ",["ꨀ","ꨨ"],["ꩀ","ꩂ"],["ꩄ","ꩋ"],["ꩠ","ꩶ"],"ꩺ",["ꪀ","ꪯ"],"ꪱ","ꪵ","ꪶ",["ꪹ","ꪽ"],"ꫀ","ꫂ",["ꫛ","ꫝ"],["ꫠ","ꫪ"],["ꫲ","ꫴ"],["ꬁ","ꬆ"],["ꬉ","ꬎ"],["ꬑ","ꬖ"],["ꬠ","ꬦ"],["ꬨ","ꬮ"],["ꯀ","ꯢ"],["가","힣"],["ힰ","ퟆ"],["ퟋ","ퟻ"],["豈","舘"],["並","龎"],["ff","st"],["ﬓ","ﬗ"],"יִ",["ײַ","ﬨ"],["שׁ","זּ"],["טּ","לּ"],"מּ","נּ","סּ","ףּ","פּ",["צּ","ﮱ"],["ﯓ","ﴽ"],["ﵐ","ﶏ"],["ﶒ","ﷇ"],["ﷰ","ﷻ"],["ﹰ","ﹴ"],["ﹶ","ﻼ"],["A","Z"],["a","z"],["ヲ","ᄒ"],["ᅡ","ᅦ"],["ᅧ","ᅬ"],["ᅭ","ᅲ"],["ᅳ","ᅵ"]],!1,!1),Fe=Lo("a guid"),ge=Lo("a hex value"),Be=wo([["0","9"],["a","f"],["A","F"]],!1,!1),ve=wo(["/","?"],!0,!1),me=wo([["a","z"],["A","Z"],["0","9"],"-",'"',".",'"',"_","~","!","$","'","(",")","*","+",",",";","=",":","@",'"',"/",'"','"',"?",'"'],!1,!1),be=Lo("a binary"),Ee=xo("binary'",!1),De=wo([["a","z"],["A","Z"],["0","9"],"-","_"],!1,!1),ye=xo("==",!1),$e=xo("(",!1),xe=xo(")",!1),we=Lo("an optional whitespace"),Le=wo([" ","\t","\n"],!1,!1),Se=Lo("a whitespace"),Te=function(u){Ri=u},je=function(){if(Ii)return Ri.columns=[{args:[{val:1}],as:"$count",func:"count"}],delete Ri.expand,delete Ri.limit,delete Ri.orderBy,Ri.apply?Ji(Ri,Ri.apply):{SELECT:Ri};let u;if(Ri.expand){Ri.columns||(Ri.columns=["*"],u=!0);for(const u of Ri.expand){const t=Ri.columns.findIndex(Ui(u));t>-1&&Ri.columns.splice(t,1),Ri.columns.push(u)}delete Ri.expand}return Ri.count&&Ri.apply&&(Ri.__countAggregated=!0),Ri.apply?Ji(Ri,Ri.apply,u):{SELECT:Ri}},Oe=function(){Ii=!0},Ze=function(u){return!Ti.includes(u)&&{from:{ref:[u]}}},_e=function(u){return[u]},ke=function(u,t){return t},ze=function(u,t){if(t=t&&t[1],!u&&!t)return{from:{ref:[""]}};if(!u&&t&&t.from)return t.from.ref.unshift(""),t;const[r,e]=u,n=[];if(e?e.length>2?n.push({id:r,where:e[1].map((u=>u.val&&u.val.match&&u.val.match(/^"(.*)"$/)?{val:u.val.match(/^"(.*)"$/)[1]}:u))}):n.push({id:r,where:[]}):ki?n.push(`${"object"==typeof r&&"val"in r?r.val:r}`):"object"==typeof r&&"string"==typeof r.val&&r.val.match(/^[1-9]\d*$|^0$/)?n.push({val:qi(r.val)}):n.push(r),t&&t.from){const u=t.from.ref;Object.prototype.hasOwnProperty.call(u[0],"val")&&(n[n.length-1]={id:n[n.length-1],where:[u.shift()]}),n.push(...u)}const s={from:{ref:n}};return t&&t.columns&&(s.columns=t.columns),s},Re=function(u){return[u]},Ie=function(u,t,r){const e=[u,"=",t];return r&&e.push("and",...r[1]),e},qe=function(u){u&&(Ri.search=u)},Ne=function(u){u&&u.apply&&(Ri.apply=u.apply)},Pe=function(u){Ri.where=u},Ue=function(u,t){Xi(t)},Me=function(u){Xi(u,!0)},Ge=function(u){(Ri.limit||(Ri.limit={})).rows={val:u}},He=function(u){Wi(u)},Je=function(u){u&&(Ri.search=u)},Ke=function(){return cds.env.features.skip_apply_parsing},Qe=function(){return null},Ve=function(u){return u},We=function(){return null},Xe=function(u){return Ri.columns=Array.isArray(Ri.columns)?Ri.columns:[],Ri.columns.find(Ui(u))||Ri.columns.push(u),u},Ye=function(){const u=new Error('"/$count" is not supported for expand operation');throw u.statusCode=501,u},un=function(u){return u},tn=function(u){if(u.find((u=>u&&void 0!==u.apply))){const u=new Error('"$apply" is not supported for expand operation');throw u.statusCode=501,u}if(Ri.columns){for(const u of Ri.columns)Ri.expand.find(Ui(u))||Ri.expand.push(u);delete Ri.columns}else Array.isArray(Ri.expand)&&-1===Ri.expand.indexOf("*")&&Ri.expand.unshift("*")},rn=function(){zi.push(Ri),Ri=Ri.expand[Ri.expand.length-1],Ri.expand=[]},en=function(){Ri.expand.length||Ri.expand.push("*"),Ri=zi.pop()},nn=function(u){const t="*"===u?{}:u;return t.expand=["*"],Array.isArray(Ri.expand)||(Ri.expand=[]),Ri.expand.find(Ui(t))||Ri.expand.push(t),t},sn=function(u){return u},on=function(u){Ni(u,{SELECT:Ri})},an=function(u){return u},cn=function(u){return u},fn=function(u){return[{val:u}]},ln=function(u){return[{val:u}]},An=function(u){return u},hn=function(u){return u?[u]:[]},pn=function(u,t){u.push({xpr:t})},Cn=function(u,t){u.push(...t)},dn=function(u,t){"not"===u[u.length-1]&&"not"===t[0]?u.push({xpr:t}):u.push(...t)},Fn=function(u,t){u.push(t)},gn=function(u,t){u.push({val:t})},Bn=function(u,t){u.push(...t)},vn=function(u,t,r){u.push(t,...r)},mn=function(u){return u},bn=function(u){return[u]},En=function(u,t){u.push(t)},Dn=function(u,t){let r=u.pop();if(!t)return["exists",{ref:[...u,{id:r}]}];let e=[];for(let u=0,n=0;u<t.length;++u){let s=t[u];s.ref&&0===s.ref.length&&"="===t[u+1]?e[n++]={func:"contains",args:[{ref:[r]},t[u+=2]]}:e[n++]=s}return e.length<t.length?u.length?(r=u.pop(),["exists",{ref:[...u,{id:r,where:e}]}]):e:["exists",{ref:[...u,{id:r,where:t}]}]},yn=function(u,t){let r=u.pop();return["not","exists",{ref:[...u,{id:r,where:["not",{xpr:[...t]}]}]}]},$n=function(u,t){return t},xn=function(u){return u?[u]:[]},wn=function(u,t){u.push({xpr:t})},Ln=function(u,t){u.push(...t)},Sn=function(u,t){u.push(t)},Tn=function(u,t){u.push(...t)},jn=function(u,t){u.push(...t)},On=function(u,t,r){u.push(t,...r)},Zn=function(u){return u},_n=function(u,t){return Yi(u,t)},kn=function(u){return u},zn=function(u){return u},Rn=function(){const u=new Error('"$orderby" does not support lambda');throw u.statusCode=501,u},In=function(u,t){return t},qn=function(u,t){return Zi(u,t&&{sort:t})},Nn=function(u){u&&(Ri.count=!0)},Pn=function(u,t){return t},Un=function(u,t){if(void 0!==u){t=Array.isArray(t)?t:[t];for(let r of t)for(const t in r)if("limit"===t&&r.limit&&u.limit&&u.limit.offset&&r.limit.rows)u.limit.rows=r.limit.rows;else if(u[t]||"groupBy"===t&&(u.where||u.search)||"aggregate"===t&&"groupBy"in u&&!("groupBy"in r)){let e=u;u={apply:e},"limit"===t&&r[t].offset&&e.limit&&e.limit.offset&&e.limit.offset.val&&(r[t].offset+=e.limit.offset.val),e=u,e[t]=r[t]}else u[t]=r[t];return{apply:u}}},Mn=function(u){return u},Gn=function(u){return{val:u}},Hn=function(u){return u},Jn=function(u,t){return t},Kn=function(u,t){return[u,...t]},Qn=function(u){return{list:u}},Vn=function(u,t){"null"===t?t=null:"true"===t?t=!0:"false"===t&&(t=!1);let r=Ri.from._params??={},e=u.match(/^(\w+)\[(.*)\]$/);for(;e;)e[1]in r||(r[e[1]]=""===e[2]?[]:{}),r=r[e[1]],e=(u=e[2]).match(/^(\w+)\[(.*)\]$/);Array.isArray(r)?r.push(t):r[u]=t},Wn=function(u){return"@"+u},Xn=function(u,t){ta(Ri,u,t)},Yn=function(u){if("json"!==u.toLowerCase()){const u=new Error('Only query parameter "json" is allowed in "$format".');throw u.statusCode=501,u}},us=function(u,t,r){return[u,ji[t]||t,r]},ts=function(u){return{list:u}},rs=function(u,t){return[u,"in",t]},es=function(u,t){return t},ns=function(u,t){return t?{id:u,where:t}:u},ss=function(u,t){return{func:"count",as:"$count",args:[{ref:u}]}},os=function(u,t){return t},is=function(u,t){return"null"===u?{val:null}:{ref:[u,...t]}},as=function(u){return{val:u}},cs=function(u){return{val:u}},fs=function(u){return{val:u}},ls=function(u){return{val:u}},As=function(u){return"number"==typeof u?{val:u}:{val:u,literal:"number"}},hs=function(u){return{val:u}},ps=function(u){return{val:u}},Cs=function(u){return{val:u}},ds=function(){return{val:null}},Fs=function(u){return{val:u}},gs=function(u){return{val:u}},Bs=function(u){return{list:u.replace(/"/g,"").split(",").map((u=>({val:u})))}},vs=function(u,t){return t},ms=function(u,t){return[u,...t]},bs=function(u){return{list:u}},Es=function(u,t){if(_i&&!(u.toLowerCase()in _i.functions))throw Object.assign(new Error(`Function "${u}" is not supported`),{statusCode:501});return{func:u.toLowerCase(),args:t}},Ds=function(u,t){return t},ys=function(u,t){return[u,...t]},$s=function(u){return u.length?u[0]:u},xs=function(u,t,r){return{func:u.toLowerCase(),args:[t,r]}},ws=function(){return"not"},Ls=function(){return"and"},Ss=function(){return"or"},Ts=function(u){return u},js=function(u){return u},Os=function(u){return u},Zs=function(u){return u},_s=function(u){return u},ks=function(u){return u},zs=function(u){return u},Rs=function(u){return u},Is=function(u){return u},qs=function(u,t){if(u=u.toLowerCase(),!Oi[u])throw Object.assign(new Error(`Transformation "${u}" in $apply is not yet supported.`),{statusCode:501});return{aggregate:[{func:u,args:t}]}},Ns=function(u){return u},Ps=function(u,t){return t},Us=function(u,t){return{aggregate:[u,...t]}},Ms=function(u){return{func:"count",args:[{val:1}],as:u}},Gs=function(u){return u},Hs=function(u,t,r){return{func:t,args:[u],as:r}},Js=function(u){return u.toLowerCase()},Ks=function(u){return u},Qs=function(u,t){return t},Vs=function(u,t){return{groupBy:[u,...t]}},Ws=function(u,t,r){return r},Xs=function(u,t,r){let e={};return e=r?{groupBy:[u,...t],...r.apply}:{groupBy:[u,...t]},e},Ys=function(u){return u},uo=function(u){const t=new Error("Rollup in groupby is not supported yet.");throw t.statusCode=501,t},to=function(u){return u},ro=function(u){return{where:u}},eo=function(u){if(u=u.trim())return{search:[{val:u}]}},no=function(u,t){return t},so=function(u,t){return{concat:[u,...t]}},oo=function(u,t){return[u,t]},io=function(){return{identity:!0}},ao=function(u){return{limit:{rows:{val:u}}}},co=function(u){return{limit:{offset:{val:u}}}},fo=function(u,t){return t},lo=function(u,t){return{orderBy:[u,...t]}},Ao=function(u){return"true"===u},ho=function(u){return u.replace(/''/g,"'")},po=function(u){return u.replace(/\\\\/g,"\\").replace(/\\"/g,'"')},Co=function(u){if(u.split("-")[0].length>4)throw Object.assign(new Error(`The type Edm.DateTimeOffset is not compatible with "${u}"`),{statusCode:400});return u},Fo=function(u){return qi(u)},go=function(u){return parseInt(u)},Bo=function(u){return u},vo=function(u){return{val:u}},mo=function(u){return cds.env.features.base64_binaries?Pi(u):Buffer.from(u,"base64")},bo=0|t.peg$currPos,Eo=[{line:1,column:1}],Do=bo,yo=t.peg$maxFailExpected||[],$o=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in s))throw new Error("Can't start parsing from rule \""+t.startRule+'".');o=s[t.startRule]}function xo(u,t){return{type:"literal",text:u,ignoreCase:t}}function wo(u,t,r){return{type:"class",parts:u,inverted:t,ignoreCase:r}}function Lo(u){return{type:"other",description:u}}function So(t){var r,e=Eo[t];if(e)return e;if(t>=Eo.length)r=Eo.length-1;else for(r=t;!Eo[--r];);for(e={line:(e=Eo[r]).line,column:e.column};r<t;)10===u.charCodeAt(r)?(e.line++,e.column=1):e.column++,r++;return Eo[t]=e,e}function To(u,t,r){var e=So(u),s=So(t),o={source:n,start:{offset:u,line:e.line,column:e.column},end:{offset:t,line:s.line,column:s.column}};return r&&n&&"function"==typeof n.offset&&(o.start=n.offset(o.start),o.end=n.offset(o.end)),o}function jo(u){bo<Do||(bo>Do&&(Do=bo,yo=[]),yo.push(u))}function Oo(u,t,r){return new peg$SyntaxError(peg$SyntaxError.buildMessage(u,t),u,t,r)}function Zo(){var t,r,n,s,o,f,l,A,h,p,C,d,F,g,B,v,m;if(t=bo,47===u.charCodeAt(bo)?(r=i,bo++):(r=e,0===$o&&jo(at)),r===e&&(r=null),n=bo,(s=_o())!==e&&(s=Te(s)),(n=s)!==e){if(s=bo,o=Li(),63===u.charCodeAt(bo)?(f=a,bo++):(f=e,0===$o&&jo(ct)),f!==e){if(l=Li(),A=bo,38===u.charCodeAt(bo)?(h=c,bo++):(h=e,0===$o&&jo(ft)),h===e&&(h=null),p=Li(),(C=zo())!==e){if(d=[],F=bo,g=Li(),B=[],38===u.charCodeAt(bo)?(v=c,bo++):(v=e,0===$o&&jo(ft)),v!==e)for(;v!==e;)B.push(v),38===u.charCodeAt(bo)?(v=c,bo++):(v=e,0===$o&&jo(ft));else B=e;for(B!==e?(v=Li(),(m=zo())!==e?F=g=[g,B,v,m]:(bo=F,F=e)):(bo=F,F=e);F!==e;){if(d.push(F),F=bo,g=Li(),B=[],38===u.charCodeAt(bo)?(v=c,bo++):(v=e,0===$o&&jo(ft)),v!==e)for(;v!==e;)B.push(v),38===u.charCodeAt(bo)?(v=c,bo++):(v=e,0===$o&&jo(ft));else B=e;B!==e?(v=Li(),(m=zo())!==e?F=g=[g,B,v,m]:(bo=F,F=e)):(bo=F,F=e)}A=h=[h,p,C,d]}else bo=A,A=e;A===e&&(A=null),s=o=[o,f,l,A]}else bo=s,s=e;s===e&&(s=null),o=Li(),t=je()}else bo=t,t=e;return t}function _o(){var t,r,n,s,o,a,c;return t=bo,u.substr(bo,6)===f?(r=f,bo+=6):(r=e,0===$o&&jo(lt)),r!==e&&(r=Oe()),(t=r)===e&&(t=bo,r=bo,u.substr(bo,4)===l?(n=l,bo+=4):(n=e,0===$o&&jo(At)),n===e&&(u.substr(bo,6)===A?(n=A,bo+=6):(n=e,0===$o&&jo(ht))),(r=n!==e?u.substring(r,bo):n)!==e&&(r=Ze(r)),(t=r)===e&&(t=bo,r=bo,(n=bi())!==e?(s=bo,(o=xi())!==e&&(a=wi())!==e?s=o=[o,a]:(bo=s,s=e),s===e&&(s=bo,(o=xi())!==e&&(a=ko())!==e&&(c=wi())!==e?s=o=[o,a,c]:(bo=s,s=e)),s===e&&(s=null),o=bo,$o++,a=yi(),$o--,a===e?o=void 0:(bo=o,o=e),o!==e?r=n=[n,s,o]:(bo=r,r=e)):(bo=r,r=e),r===e&&(r=bo,(n=yi())!==e&&(n=_e(n)),r=n),r===e&&(r=null),n=bo,s=bo,47===u.charCodeAt(bo)?(o=i,bo++):(o=e,0===$o&&jo(at)),o!==e&&(o=ke(r,o)),(s=o)!==e?((o=_o())===e&&(o=null),n=s=[s,o]):(bo=n,n=e),n===e&&(n=null),t=ze(r,n))),t}function ko(){var t,r,n,s,o,i,a;return t=bo,(r=ni())!==e&&(r=Re(r)),(t=r)===e&&(t=bo,(r=ei())!==e?(Li(),61===u.charCodeAt(bo)?(n=h,bo++):(n=e,0===$o&&jo(pt)),n!==e?(Li(),(s=ni())!==e?(o=bo,(i=$i())!==e&&(a=ko())!==e?o=i=[i,a]:(bo=o,o=e),o===e&&(o=null),t=Ie(r,s,o)):(bo=t,t=e)):(bo=t,t=e)):(bo=t,t=e)),t}function zo(){var t,r,n,s;return t=bo,u.substr(bo,11)===p?(r=p,bo+=11):(r=e,0===$o&&jo(Ct)),r!==e?(n=Li(),s=function(){var t,r;t=bo,r=function(){var t,r,n;t=bo,r=[],n=u.charAt(bo),st.test(n)?bo++:(n=e,0===$o&&jo(me));if(n!==e)for(;n!==e;)r.push(n),n=u.charAt(bo),st.test(n)?bo++:(n=e,0===$o&&jo(me));else r=e;t=r!==e?u.substring(t,bo):r;return t}(),r===e&&(r=null);return r=on(r),t=r,t}(),t=r=[r,n,s]):(bo=t,t=e),t===e&&(t=bo,u.substr(bo,8)===C?(r=C,bo+=8):(r=e,0===$o&&jo(dt)),r!==e?(n=Li(),s=function(){var t,r;t=bo,r=function(){var t,r,n,s,o,i,a,c,f,l,A,h;t=bo,r=bo,n=[],s=bo,o=bo,i=[],a=u.charAt(bo),Uu.test(a)?bo++:(a=e,0===$o&&jo(Ot));for(;a!==e;)i.push(a),a=u.charAt(bo),Uu.test(a)?bo++:(a=e,0===$o&&jo(Ot));o=u.substring(o,bo),i=[],a=u.charAt(bo),Mu.test(a)?bo++:(a=e,0===$o&&jo(Zt));if(a!==e)for(;a!==e;)i.push(a),a=u.charAt(bo),Mu.test(a)?bo++:(a=e,0===$o&&jo(Zt));else i=e;if(i===e){if(i=[],a=bo,34===u.charCodeAt(bo)?(c=T,bo++):(c=e,0===$o&&jo(_t)),c!==e){if(f=[],u.substr(bo,2)===j?(l=j,bo+=2):(l=e,0===$o&&jo(kt)),l===e&&(u.substr(bo,2)===O?(l=O,bo+=2):(l=e,0===$o&&jo(zt)),l===e&&(l=u.charAt(bo),Gu.test(l)?bo++:(l=e,0===$o&&jo(Rt)))),l!==e)for(;l!==e;)f.push(l),u.substr(bo,2)===j?(l=j,bo+=2):(l=e,0===$o&&jo(kt)),l===e&&(u.substr(bo,2)===O?(l=O,bo+=2):(l=e,0===$o&&jo(zt)),l===e&&(l=u.charAt(bo),Gu.test(l)?bo++:(l=e,0===$o&&jo(Rt))));else f=e;if(f!==e)if(34===u.charCodeAt(bo)?(l=T,bo++):(l=e,0===$o&&jo(_t)),l!==e){for(A=[],h=u.charAt(bo),Uu.test(h)?bo++:(h=e,0===$o&&jo(Ot));h!==e;)A.push(h),h=u.charAt(bo),Uu.test(h)?bo++:(h=e,0===$o&&jo(Ot));a=c=[c,f,l,A]}else bo=a,a=e;else bo=a,a=e}else bo=a,a=e;if(a!==e)for(;a!==e;)if(i.push(a),a=bo,34===u.charCodeAt(bo)?(c=T,bo++):(c=e,0===$o&&jo(_t)),c!==e){if(f=[],u.substr(bo,2)===j?(l=j,bo+=2):(l=e,0===$o&&jo(kt)),l===e&&(u.substr(bo,2)===O?(l=O,bo+=2):(l=e,0===$o&&jo(zt)),l===e&&(l=u.charAt(bo),Gu.test(l)?bo++:(l=e,0===$o&&jo(Rt)))),l!==e)for(;l!==e;)f.push(l),u.substr(bo,2)===j?(l=j,bo+=2):(l=e,0===$o&&jo(kt)),l===e&&(u.substr(bo,2)===O?(l=O,bo+=2):(l=e,0===$o&&jo(zt)),l===e&&(l=u.charAt(bo),Gu.test(l)?bo++:(l=e,0===$o&&jo(Rt))));else f=e;if(f!==e)if(34===u.charCodeAt(bo)?(l=T,bo++):(l=e,0===$o&&jo(_t)),l!==e){for(A=[],h=u.charAt(bo),Uu.test(h)?bo++:(h=e,0===$o&&jo(Ot));h!==e;)A.push(h),h=u.charAt(bo),Uu.test(h)?bo++:(h=e,0===$o&&jo(Ot));a=c=[c,f,l,A]}else bo=a,a=e;else bo=a,a=e}else bo=a,a=e;else i=e}i!==e?s=o=[o,i]:(bo=s,s=e);if(s!==e)for(;s!==e;){for(n.push(s),s=bo,o=bo,i=[],a=u.charAt(bo),Uu.test(a)?bo++:(a=e,0===$o&&jo(Ot));a!==e;)i.push(a),a=u.charAt(bo),Uu.test(a)?bo++:(a=e,0===$o&&jo(Ot));if(o=u.substring(o,bo),i=[],a=u.charAt(bo),Mu.test(a)?bo++:(a=e,0===$o&&jo(Zt)),a!==e)for(;a!==e;)i.push(a),a=u.charAt(bo),Mu.test(a)?bo++:(a=e,0===$o&&jo(Zt));else i=e;if(i===e){if(i=[],a=bo,34===u.charCodeAt(bo)?(c=T,bo++):(c=e,0===$o&&jo(_t)),c!==e){if(f=[],u.substr(bo,2)===j?(l=j,bo+=2):(l=e,0===$o&&jo(kt)),l===e&&(u.substr(bo,2)===O?(l=O,bo+=2):(l=e,0===$o&&jo(zt)),l===e&&(l=u.charAt(bo),Gu.test(l)?bo++:(l=e,0===$o&&jo(Rt)))),l!==e)for(;l!==e;)f.push(l),u.substr(bo,2)===j?(l=j,bo+=2):(l=e,0===$o&&jo(kt)),l===e&&(u.substr(bo,2)===O?(l=O,bo+=2):(l=e,0===$o&&jo(zt)),l===e&&(l=u.charAt(bo),Gu.test(l)?bo++:(l=e,0===$o&&jo(Rt))));else f=e;if(f!==e)if(34===u.charCodeAt(bo)?(l=T,bo++):(l=e,0===$o&&jo(_t)),l!==e){for(A=[],h=u.charAt(bo),Uu.test(h)?bo++:(h=e,0===$o&&jo(Ot));h!==e;)A.push(h),h=u.charAt(bo),Uu.test(h)?bo++:(h=e,0===$o&&jo(Ot));a=c=[c,f,l,A]}else bo=a,a=e;else bo=a,a=e}else bo=a,a=e;if(a!==e)for(;a!==e;)if(i.push(a),a=bo,34===u.charCodeAt(bo)?(c=T,bo++):(c=e,0===$o&&jo(_t)),c!==e){if(f=[],u.substr(bo,2)===j?(l=j,bo+=2):(l=e,0===$o&&jo(kt)),l===e&&(u.substr(bo,2)===O?(l=O,bo+=2):(l=e,0===$o&&jo(zt)),l===e&&(l=u.charAt(bo),Gu.test(l)?bo++:(l=e,0===$o&&jo(Rt)))),l!==e)for(;l!==e;)f.push(l),u.substr(bo,2)===j?(l=j,bo+=2):(l=e,0===$o&&jo(kt)),l===e&&(u.substr(bo,2)===O?(l=O,bo+=2):(l=e,0===$o&&jo(zt)),l===e&&(l=u.charAt(bo),Gu.test(l)?bo++:(l=e,0===$o&&jo(Rt))));else f=e;if(f!==e)if(34===u.charCodeAt(bo)?(l=T,bo++):(l=e,0===$o&&jo(_t)),l!==e){for(A=[],h=u.charAt(bo),Uu.test(h)?bo++:(h=e,0===$o&&jo(Ot));h!==e;)A.push(h),h=u.charAt(bo),Uu.test(h)?bo++:(h=e,0===$o&&jo(Ot));a=c=[c,f,l,A]}else bo=a,a=e;else bo=a,a=e}else bo=a,a=e;else i=e}i!==e?s=o=[o,i]:(bo=s,s=e)}else n=e;r=n!==e?u.substring(r,bo):n;r!==e&&(r=fn(r));return t=r,t}(),r!==e&&(r=cn(r));t=r,t===e&&(t=Li());return t}(),s!==e?t=qe(s):(bo=t,t=e)):(bo=t,t=e),t===e&&(t=bo,(r=Ro())!==e&&(r=Ne(r)),(t=r)===e&&(t=function(){var t,r,n,s;t=bo,u.substr(bo,3)===D?(r=D,bo+=3):(r=e,0===$o&&jo($t));r===e&&(u.substr(bo,5)===y?(r=y,bo+=5):(r=e,0===$o&&jo(xt)),r===e&&(u.substr(bo,12)===$?(r=$,bo+=12):(r=e,0===$o&&jo(wt)),r===e&&(u.substr(bo,3)===x?(r=x,bo+=3):(r=e,0===$o&&jo(Lt)))));r!==e?(61===u.charCodeAt(bo)?(n=h,bo++):(n=e,0===$o&&jo(pt)),n!==e&&(s=vi())!==e?t=r=[r,n,s]:(bo=t,t=e)):(bo=t,t=e);return t}(),t===e&&(t=function(){var t,r,n,s,o;t=bo,u.substr(bo,8)===G?(r=G,bo+=8):(r=e,0===$o&&jo(ur));if(r!==e){for(n=bo,s=[],o=u.charAt(bo),Pu.test(o)?bo++:(o=e,0===$o&&jo(yt));o!==e;)s.push(o),o=u.charAt(bo),Pu.test(o)?bo++:(o=e,0===$o&&jo(yt));n=u.substring(n,bo),t=Yn(n)}else bo=t,t=e;return t}(),t===e&&(t=function(){var t,r,n,s,o,i;t=bo,r=bo,n=[],s=u.charAt(bo),Ju.test(s)?bo++:(s=e,0===$o&&jo(Wt));if(s!==e)for(;s!==e;)n.push(s),s=u.charAt(bo),Ju.test(s)?bo++:(s=e,0===$o&&jo(Wt));else n=e;r=n!==e?u.substring(r,bo):n;if(r!==e){for(61===u.charCodeAt(bo)?(n=h,bo++):(n=e,0===$o&&jo(pt)),n===e&&(n=null),s=bo,o=[],i=u.charAt(bo),Pu.test(i)?bo++:(i=e,0===$o&&jo(yt));i!==e;)o.push(i),i=u.charAt(bo),Pu.test(i)?bo++:(i=e,0===$o&&jo(yt));s=u.substring(s,bo),t=Vn(r,s)}else bo=t,t=e;return t}(),t===e&&(t=function(){var t,r,n,s,o;t=bo,r=Xo(),r!==e?(61===u.charCodeAt(bo)?(n=h,bo++):(n=e,0===$o&&jo(pt)),n!==e?(s=bo,$o++,o=Xo(),$o--,o===e?s=void 0:(bo=s,s=e),s!==e?(o=function(){var t,r,n,s;t=ni(),t===e&&(t=si())===e&&(t=oi())===e&&(t=bo,91===u.charCodeAt(bo)?(r=P,bo++):(r=e,0===$o&&jo(Qt)),r!==e?(n=function(){var t,r,n,s,o,i;if(t=bo,r=Wo(),r!==e){for(n=[],s=bo,44===u.charCodeAt(bo)?(o=N,bo++):(o=e,0===$o&&jo(Kt)),o!==e&&(i=Wo())!==e?s=Jn(r,i):(bo=s,s=e);s!==e;)n.push(s),s=bo,44===u.charCodeAt(bo)?(o=N,bo++):(o=e,0===$o&&jo(Kt)),o!==e&&(i=Wo())!==e?s=Jn(r,i):(bo=s,s=e);t=Kn(r,n)}else bo=t,t=e;return t}(),n!==e?(93===u.charCodeAt(bo)?(s=U,bo++):(s=e,0===$o&&jo(Vt)),s!==e?t=Qn(n):(bo=t,t=e)):(bo=t,t=e)):(bo=t,t=e));return t}(),o!==e?t=Xn(r,o):(bo=t,t=e)):(bo=t,t=e)):(bo=t,t=e)):(bo=t,t=e);return t}(),t===e&&(t=function(){var t,r,n,s;t=bo,u.substr(bo,12)===I?(r=I,bo+=12):(r=e,0===$o&&jo(Gt));if(r!==e){for(Li(),n=[],s=u.charAt(bo),Pu.test(s)?bo++:(s=e,0===$o&&jo(yt));s!==e;)n.push(s),s=u.charAt(bo),Pu.test(s)?bo++:(s=e,0===$o&&jo(yt));t=Mn(n)}else bo=t,t=e;return t}()))))))),t}function Ro(){var t,r,n,s,o,i,a,c;if(t=bo,u.substr(bo,8)===d?(r=d,bo+=8):(r=e,0===$o&&jo(Ft)),r!==e)if(n=Li(),(s=Io())!==e){for(o=[],i=bo,(a=$i())!==e&&(c=Io())!==e?i=a=[a,c]:(bo=i,i=e);i!==e;)o.push(i),i=bo,(a=$i())!==e&&(c=Io())!==e?i=a=[a,c]:(bo=i,i=e);t=r=[r,n,s,o]}else bo=t,t=e;else bo=t,t=e;if(t===e){if(t=bo,u.substr(bo,8)===F?(r=F,bo+=8):(r=e,0===$o&&jo(gt)),r!==e)if(n=Li(),(s=No())!==e){for(o=[],i=bo,(a=$i())!==e&&(c=No())!==e?i=a=[a,c]:(bo=i,i=e);i!==e;)o.push(i),i=bo,(a=$i())!==e&&(c=No())!==e?i=a=[a,c]:(bo=i,i=e);i=function(){var t,r;t=bo,u.substr(bo,7)===L?(r=L,bo+=7):(r=e,0===$o&&jo(Tt));r!==e&&(r=Ye());return t=r,t}(),i===e&&(i=null),t=r=[r,n,s,o,i]}else bo=t,t=e;else bo=t,t=e;if(t===e&&(t=bo,u.substr(bo,8)===g?(r=g,bo+=8):(r=e,0===$o&&jo(Bt)),r!==e?(n=Li(),(s=Mo())!==e?t=Pe(s):(bo=t,t=e)):(bo=t,t=e),t===e)){if(t=bo,u.substr(bo,9)===B?(r=B,bo+=9):(r=e,0===$o&&jo(vt)),r!==e)if(n=Li(),(s=Qo())!==e){for(o=[],i=bo,(a=$i())!==e&&(c=Qo())!==e?i=Ue(s,c):(bo=i,i=e);i!==e;)o.push(i),i=bo,(a=$i())!==e&&(c=Qo())!==e?i=Ue(s,c):(bo=i,i=e);t=Me(s)}else bo=t,t=e;else bo=t,t=e;if(t===e&&(t=bo,u.substr(bo,5)===v?(r=v,bo+=5):(r=e,0===$o&&jo(mt)),r!==e?(n=Li(),(s=Po())!==e?t=Ge(s):(bo=t,t=e)):(bo=t,t=e),t===e&&(t=bo,u.substr(bo,6)===m?(r=m,bo+=6):(r=e,0===$o&&jo(bt)),r!==e?(n=Li(),(s=Uo())!==e?t=He(s):(bo=t,t=e)):(bo=t,t=e),t===e&&(t=bo,u.substr(bo,8)===C?(r=C,bo+=8):(r=e,0===$o&&jo(dt)),r!==e?(n=Li(),s=function(){var t,r,n,s;t=bo,r=bo,n=[],s=u.charAt(bo),Hu.test(s)?bo++:(s=e,0===$o&&jo(It));if(s!==e)for(;s!==e;)n.push(s),s=u.charAt(bo),Hu.test(s)?bo++:(s=e,0===$o&&jo(It));else n=e;r=n!==e?u.substring(r,bo):n;r!==e&&(r=ln(r));t=r,t===e&&(t=Li());return t}(),s!==e?t=Je(s):(bo=t,t=e)):(bo=t,t=e),t===e&&(t=bo,u.substr(bo,7)===b?(r=b,bo+=7):(r=e,0===$o&&jo(Et)),r!==e?(n=Li(),s=function(){var u,t;u=bo,t=Bi(),t!==e&&(t=Nn(t));return u=t,u}(),s!==e?t=r=[r,n,s]:(bo=t,t=e)):(bo=t,t=e),t===e))))){if(t=bo,u.substr(bo,7)===E?(r=E,bo+=7):(r=e,0===$o&&jo(Dt)),r!==e)if((n=(n=Ke())?void 0:e)!==e){for(s=Li(),o=[],i=u.charAt(bo),Pu.test(i)?bo++:(i=e,0===$o&&jo(yt));i!==e;)o.push(i),i=u.charAt(bo),Pu.test(i)?bo++:(i=e,0===$o&&jo(yt));t=Qe()}else bo=t,t=e;else bo=t,t=e;t===e&&(t=bo,u.substr(bo,7)===E?(r=E,bo+=7):(r=e,0===$o&&jo(Dt)),r!==e?(n=Li(),(s=Vo())!==e?t=Ve(s):(bo=t,t=e)):(bo=t,t=e),t===e&&(t=bo,u.substr(bo,8)===F?(r=F,bo+=8):(r=e,0===$o&&jo(gt)),r!==e&&(r=We()),t=r))}}}return t}function Io(){var t,r;return t=bo,42===u.charCodeAt(bo)?(r=w,bo++):(r=e,0===$o&&jo(St)),r===e&&(r=ei()),r!==e&&(r=Xe(r)),t=r}function qo(){var t,r,n,s,o;return t=bo,r=bo,(n=xi())!==e&&(n=rn()),(r=n)!==e?(n=function(){var t,r,n,s,o;for(t=bo,r=[],n=bo,(s=Ro())!==e?(Li(),59===u.charCodeAt(bo)?(o=S,bo++):(o=e,0===$o&&jo(jt)),o===e&&(o=null),n=un(s)):(bo=n,n=e);n!==e;)r.push(n),n=bo,(s=Ro())!==e?(Li(),59===u.charCodeAt(bo)?(o=S,bo++):(o=e,0===$o&&jo(jt)),o===e&&(o=null),n=un(s)):(bo=n,n=e);return tn(r)}(),s=bo,(o=wi())!==e&&(o=en()),(s=o)!==e?t=r=[r,n,s]:(bo=t,t=e)):(bo=t,t=e),t}function No(){var t,r,n;return t=bo,r=bo,42===u.charCodeAt(bo)?(n=w,bo++):(n=e,0===$o&&jo(St)),n===e&&(n=ei()),n!==e&&(n=nn(n)),(r=n)!==e?((n=qo())===e&&(n=null),t=r=[r,n]):(bo=t,t=e),t}function Po(){var u,t;return u=bo,(t=mi())!==e&&(t=sn(t)),u=t}function Uo(){var u,t;return u=bo,(t=mi())!==e&&(t=an(t)),u=t}function Mo(){var u,t;return u=bo,(t=Go())!==e&&(t=An(t)),u=t}function Go(){var t,r,n,s,o,i,a;if(t=bo,r=bo,(n=ai())===e&&(n=null),r=n=hn(n),n=bo,(s=xi())!==e&&(o=Go())!==e&&(i=wi())!==e?n=pn(r,o):(bo=n,n=e),n===e&&(n=bo,(s=Yo())!==e&&(s=Cn(r,s)),(n=s)===e&&(n=bo,(s=Ho())!==e&&(s=dn(r,s)),(n=s)===e&&(n=bo,s=function(){var t,r,n,s;t=bo,r=u.substr(bo,8),r.toLowerCase()===ru?bo+=8:(r=e,0===$o&&jo(mr));r===e&&((r=u.substr(bo,8)).toLowerCase()===eu?bo+=8:(r=e,0===$o&&jo(br)),r===e&&((r=u.substr(bo,10)).toLowerCase()===nu?bo+=10:(r=e,0===$o&&jo(Er)),r===e&&((r=u.substr(bo,14)).toLowerCase()===su?bo+=14:(r=e,0===$o&&jo(Dr)))));r!==e&&xi()!==e&&(n=ri())!==e&&$i()!==e&&(s=ri())!==e&&wi()!==e?t=xs(r,n,s):(bo=t,t=e);return t}(),s!==e&&(s=Fn(r,s)),(n=s)===e&&(n=bo,(s=Bi())!==e&&(s=gn(r,s)),(n=s)===e&&(n=bo,(s=ti())!==e&&(s=Bn(r,s)),n=s))))),n!==e){for(s=[],o=bo,(i=ci())===e&&(i=fi()),i!==e&&(a=Go())!==e?o=vn(r,i,a):(bo=o,o=e);o!==e;)s.push(o),o=bo,(i=ci())===e&&(i=fi()),i!==e&&(a=Go())!==e?o=vn(r,i,a):(bo=o,o=e);t=mn(r)}else bo=t,t=e;return t}function Ho(){var t,r,n,s,o,a,c;if(t=bo,r=bo,(n=bi())!==e&&(n=bn(n)),(r=n)!==e)if(47===u.charCodeAt(bo)?(n=i,bo++):(n=e,0===$o&&jo(at)),n!==e){for(s=[],o=bo,(a=bi())!==e?(47===u.charCodeAt(bo)?(c=i,bo++):(c=e,0===$o&&jo(at)),c!==e?o=En(r,a):(bo=o,o=e)):(bo=o,o=e);o!==e;)s.push(o),o=bo,(a=bi())!==e?(47===u.charCodeAt(bo)?(c=i,bo++):(c=e,0===$o&&jo(at)),c!==e?o=En(r,a):(bo=o,o=e)):(bo=o,o=e);o=bo,a=function(){var t,r,n;t=bo,u.substr(bo,3)===_?(r=_,bo+=3):(r=e,0===$o&&jo(Nt));r!==e&&xi()!==e?((n=Ko())===e&&(n=null),wi()!==e?t=kn(n):(bo=t,t=e)):(bo=t,t=e);return t}(),a!==e&&(a=Dn(r,a)),(o=a)===e&&(o=bo,a=function(){var t,r,n;t=bo,u.substr(bo,3)===k?(r=k,bo+=3):(r=e,0===$o&&jo(Pt));r!==e&&xi()!==e&&(n=Ko())!==e&&wi()!==e?t=zn(n):(bo=t,t=e);return t}(),a!==e&&(a=yn(r,a)),o=a),o!==e?t=$n(r,o):(bo=t,t=e)}else bo=t,t=e;else bo=t,t=e;return t}function Jo(){var u,t,r,n,s,o,i;if(u=bo,t=bo,(r=ai())===e&&(r=null),t=r=xn(r),r=bo,(n=xi())!==e&&(s=Jo())!==e&&(o=wi())!==e?r=wn(t,s):(bo=r,r=e),r===e&&(r=bo,(n=Yo())!==e&&(n=Ln(t,n)),(r=n)===e&&(r=bo,(n=ii())!==e&&(n=Sn(t,n)),(r=n)===e&&(r=bo,(n=Ho())!==e&&(n=Tn(t,n)),(r=n)===e&&(r=bo,(n=ti())!==e&&(n=jn(t,n)),r=n)))),r!==e){for(n=[],s=bo,(o=ci())===e&&(o=fi()),o!==e&&(i=Jo())!==e?s=On(t,o,i):(bo=s,s=e);s!==e;)n.push(s),s=bo,(o=ci())===e&&(o=fi()),o!==e&&(i=Jo())!==e?s=On(t,o,i):(bo=s,s=e);u=Zn(t)}else bo=u,u=e;return u}function Ko(){var t,r,n,s;return t=bo,(r=bi())!==e?(58===u.charCodeAt(bo)?(n=Z,bo++):(n=e,0===$o&&jo(qt)),n!==e&&(s=Jo())!==e?t=_n(r,s):(bo=t,t=e)):(bo=t,t=e),t}function Qo(){var t,r,n,s,o;return t=bo,r=bo,(n=Ho())!==e&&(n=Rn()),(r=n)===e&&(r=ii())===e&&(r=ei()),r!==e?(n=bo,Si()!==e?(s=bo,u.substr(bo,3)===z?(o=z,bo+=3):(o=e,0===$o&&jo(Ut)),o===e&&(u.substr(bo,4)===R?(o=R,bo+=4):(o=e,0===$o&&jo(Mt))),(s=o!==e?u.substring(s,bo):o)!==e?n=In(r,s):(bo=n,n=e)):(bo=n,n=e),n===e&&(n=null),t=qn(r,n)):(bo=t,t=e),t}function Vo(){var t,r,n,s,o,a;if(t=bo,(r=li())!==e){for(n=[],s=bo,47===u.charCodeAt(bo)?(o=i,bo++):(o=e,0===$o&&jo(at)),o!==e&&(a=li())!==e?s=Pn(r,a):(bo=s,s=e);s!==e;)n.push(s),s=bo,47===u.charCodeAt(bo)?(o=i,bo++):(o=e,0===$o&&jo(at)),o!==e&&(a=li())!==e?s=Pn(r,a):(bo=s,s=e);t=Un(r,n)}else bo=t,t=e;return t}function Wo(){var t,r,n;return $o++,t=bo,r=function(){var t,r,n,s,o;$o++,t=bo,34===u.charCodeAt(bo)?(r=T,bo++):(r=e,0===$o&&jo(_t));if(r!==e){for(n=bo,s=[],u.substr(bo,2)===O?(o=O,bo+=2):(o=e,0===$o&&jo(zt)),o===e&&(u.substr(bo,2)===j?(o=j,bo+=2):(o=e,0===$o&&jo(kt)),o===e&&(o=u.charAt(bo),Gu.test(o)?bo++:(o=e,0===$o&&jo(Rt))));o!==e;)s.push(o),u.substr(bo,2)===O?(o=O,bo+=2):(o=e,0===$o&&jo(zt)),o===e&&(u.substr(bo,2)===j?(o=j,bo+=2):(o=e,0===$o&&jo(kt)),o===e&&(o=u.charAt(bo),Gu.test(o)?bo++:(o=e,0===$o&&jo(Rt))));n=u.substring(n,bo),34===u.charCodeAt(bo)?(s=T,bo++):(s=e,0===$o&&jo(_t)),s!==e?t=po(n):(bo=t,t=e)}else bo=t,t=e;$o--,t===e&&(r=e,0===$o&&jo(re));return t}(),r!==e&&(r=Gn(r)),(t=r)===e&&(t=bo,r=bo,$o++,39===u.charCodeAt(bo)?(n=q,bo++):(n=e,0===$o&&jo(Jt)),$o--,n===e?r=void 0:(bo=r,r=e),r!==e&&(n=ni())!==e?t=Hn(n):(bo=t,t=e)),$o--,t===e&&(r=e,0===$o&&jo(Ht)),t}function Xo(){var t,r,n;return $o++,t=bo,64===u.charCodeAt(bo)?(r=M,bo++):(r=e,0===$o&&jo(Yt)),r!==e&&(n=bi())!==e?t=Wn(n):(bo=t,t=e),$o--,t===e&&(r=e,0===$o&&jo(Xt)),t}function Yo(){var t,r,n,s,o;return t=bo,(r=ri())!==e&&Si()!==e?(n=bo,u.substr(bo,2)===H?(s=H,bo+=2):(s=e,0===$o&&jo(tr)),s===e&&(u.substr(bo,2)===J?(s=J,bo+=2):(s=e,0===$o&&jo(rr)),s===e&&(u.substr(bo,2)===K?(s=K,bo+=2):(s=e,0===$o&&jo(er)),s===e&&(u.substr(bo,2)===Q?(s=Q,bo+=2):(s=e,0===$o&&jo(nr)),s===e&&(u.substr(bo,2)===V?(s=V,bo+=2):(s=e,0===$o&&jo(sr)),s===e&&(u.substr(bo,2)===W?(s=W,bo+=2):(s=e,0===$o&&jo(or))))))),(n=s!==e?u.substring(n,bo):s)!==e&&(s=Si())!==e&&(o=ri())!==e?t=us(r,n,o):(bo=t,t=e)):(bo=t,t=e),t}function ui(){var t,r;return t=bo,(r=Xo())!==e&&(r=ts(r)),(t=r)===e&&(t=function(){var t,r,n;$o++,t=bo,r=xi(),r!==e?(n=function(){var t,r,n,s,o,i;if(t=bo,r=ni(),r!==e){for(n=[],s=bo,44===u.charCodeAt(bo)?(o=N,bo++):(o=e,0===$o&&jo(Kt)),o!==e&&(i=ni())!==e?s=vs(r,i):(bo=s,s=e);s!==e;)n.push(s),s=bo,44===u.charCodeAt(bo)?(o=N,bo++):(o=e,0===$o&&jo(Kt)),o!==e&&(i=ni())!==e?s=vs(r,i):(bo=s,s=e);t=ms(r,n)}else bo=t,t=e;return t}(),n!==e&&wi()!==e?t=bs(n):(bo=t,t=e)):(bo=t,t=e);$o--,t===e&&(r=e,0===$o&&jo(gr));return t}()),t}function ti(){var t,r,n,s;return t=bo,(r=ri())!==e&&Si()!==e?(u.substr(bo,2)===X?(n=X,bo+=2):(n=e,0===$o&&jo(ir)),n!==e&&Si()!==e&&(s=ui())!==e?t=rs(r,s):(bo=t,t=e)):(bo=t,t=e),t}function ri(){var t;return(t=function(){var t,r,n,s,o,a,c;$o++,t=bo,r=[],n=bo,(s=bi())!==e?(o=bo,(a=xi())!==e&&(c=ko())!==e&&wi()!==e?o=es(s,c):(bo=o,o=e),o===e&&(o=null),47===u.charCodeAt(bo)?(a=i,bo++):(a=e,0===$o&&jo(at)),a!==e?n=ns(s,o):(bo=n,n=e)):(bo=n,n=e);if(n!==e)for(;n!==e;)r.push(n),n=bo,(s=bi())!==e?(o=bo,(a=xi())!==e&&(c=ko())!==e&&wi()!==e?o=es(s,c):(bo=o,o=e),o===e&&(o=null),47===u.charCodeAt(bo)?(a=i,bo++):(a=e,0===$o&&jo(at)),a!==e?n=ns(s,o):(bo=n,n=e)):(bo=n,n=e);else r=e;r!==e?(u.substr(bo,6)===f?(n=f,bo+=6):(n=e,0===$o&&jo(lt)),n!==e?t=ss(r,n):(bo=t,t=e)):(bo=t,t=e);$o--,t===e&&(r=e,0===$o&&jo(ar));return t}())===e&&(t=ii())===e&&(t=ni())===e&&(t=ei())===e&&(t=si())===e&&(t=oi())===e&&(t=function(){var t,r,n,s,o;$o++,t=bo,91===u.charCodeAt(bo)?(r=P,bo++):(r=e,0===$o&&jo(Qt));if(r!==e){for(n=bo,s=[],o=u.charAt(bo),Qu.test(o)?bo++:(o=e,0===$o&&jo(Fr));o!==e;)s.push(o),o=u.charAt(bo),Qu.test(o)?bo++:(o=e,0===$o&&jo(Fr));n=u.substring(n,bo),93===u.charCodeAt(bo)?(s=U,bo++):(s=e,0===$o&&jo(Vt)),s!==e?t=Bs(n):(bo=t,t=e)}else bo=t,t=e;$o--,t===e&&(r=e,0===$o&&jo(gr));return t}()),t}function ei(){var t,r,n,s,o,a;if($o++,t=bo,(r=bi())!==e){for(n=[],s=bo,47===u.charCodeAt(bo)?(o=i,bo++):(o=e,0===$o&&jo(at)),o!==e&&(a=bi())!==e?s=os(r,a):(bo=s,s=e);s!==e;)n.push(s),s=bo,47===u.charCodeAt(bo)?(o=i,bo++):(o=e,0===$o&&jo(at)),o!==e&&(a=bi())!==e?s=os(r,a):(bo=s,s=e);t=is(r,n)}else bo=t,t=e;return $o--,t===e&&(r=e,0===$o&&jo(cr)),t}function ni(){var t,r;return t=bo,(r=Bi())!==e&&(r=as(r)),(t=r)===e&&(t=bo,(r=vi())!==e&&(r=cs(r)),(t=r)===e&&(t=bo,r=function(){var t,r,n,s,o,i,a,c,f,l;$o++,t=bo,r=bo,n=u.charAt(bo),Yu.test(n)?bo++:(n=e,0===$o&&jo(ne));n!==e?(s=u.charAt(bo),Yu.test(s)?bo++:(s=e,0===$o&&jo(ne)),s!==e?(58===u.charCodeAt(bo)?(o=Z,bo++):(o=e,0===$o&&jo(qt)),o!==e?(i=u.charAt(bo),Yu.test(i)?bo++:(i=e,0===$o&&jo(ne)),i!==e?(a=u.charAt(bo),Yu.test(a)?bo++:(a=e,0===$o&&jo(ne)),a!==e?(58===u.charCodeAt(bo)?(c=Z,bo++):(c=e,0===$o&&jo(qt)),c!==e?(f=u.charAt(bo),Yu.test(f)?bo++:(f=e,0===$o&&jo(ne)),f!==e?(l=u.charAt(bo),Yu.test(l)?bo++:(l=e,0===$o&&jo(ne)),l!==e?r=n=[n,s,o,i,a,c,f,l]:(bo=r,r=e)):(bo=r,r=e)):(bo=r,r=e)):(bo=r,r=e)):(bo=r,r=e)):(bo=r,r=e)):(bo=r,r=e)):(bo=r,r=e);t=r!==e?u.substring(t,bo):r;$o--,t===e&&(r=e,0===$o&&jo(ee));return t}(),r!==e&&(r=fs(r)),(t=r)===e&&(t=bo,(r=Ei())!==e&&(r=ls(r)),(t=r)===e&&(t=bo,r=function(){var t,r,n,s,o,i,a,c,f,l,A;$o++,t=bo,r=bo,$o++,n=function(){var t,r,n;t=bo,r=[],n=u.charAt(bo),Yu.test(n)?bo++:(n=e,0===$o&&jo(ne));if(n!==e)for(;n!==e;)r.push(n),n=u.charAt(bo),Yu.test(n)?bo++:(n=e,0===$o&&jo(ne));else r=e;r!==e?(45===u.charCodeAt(bo)?(n=Ou,bo++):(n=e,0===$o&&jo(oe)),n!==e?t=r=[r,n]:(bo=t,t=e)):(bo=t,t=e);return t}(),$o--,n===e?r=void 0:(bo=r,r=e);if(r!==e){if(n=bo,s=bo,o=u.charAt(bo),ut.test(o)?bo++:(o=e,0===$o&&jo(fe)),o===e&&(o=null),i=[],a=u.charAt(bo),Yu.test(a)?bo++:(a=e,0===$o&&jo(ne)),a!==e)for(;a!==e;)i.push(a),a=u.charAt(bo),Yu.test(a)?bo++:(a=e,0===$o&&jo(ne));else i=e;if(i!==e){if(a=bo,46===u.charCodeAt(bo)?(c=_u,bo++):(c=e,0===$o&&jo(ae)),c!==e){if(f=[],l=u.charAt(bo),Yu.test(l)?bo++:(l=e,0===$o&&jo(ne)),l!==e)for(;l!==e;)f.push(l),l=u.charAt(bo),Yu.test(l)?bo++:(l=e,0===$o&&jo(ne));else f=e;f!==e?a=c=[c,f]:(bo=a,a=e)}else bo=a,a=e;if(a===e&&(a=null),c=bo,101===u.charCodeAt(bo)?(f=zu,bo++):(f=e,0===$o&&jo(Ae)),f!==e){if(l=[],A=u.charAt(bo),Yu.test(A)?bo++:(A=e,0===$o&&jo(ne)),A!==e)for(;A!==e;)l.push(A),A=u.charAt(bo),Yu.test(A)?bo++:(A=e,0===$o&&jo(ne));else l=e;l!==e?c=f=[f,l]:(bo=c,c=e)}else bo=c,c=e;c===e&&(c=null),s=o=[o,i,a,c]}else bo=s,s=e;(n=s!==e?u.substring(n,bo):s)!==e?t=Fo(n):(bo=t,t=e)}else bo=t,t=e;$o--,t===e&&(r=e,0===$o&&jo(le));return t}(),r!==e&&(r=As(r)),(t=r)===e&&(t=bo,r=function(){var t,r,n,s,o;$o++,t=bo,39===u.charCodeAt(bo)?(r=q,bo++):(r=e,0===$o&&jo(Jt));if(r!==e){for(n=bo,s=[],u.substr(bo,2)===ju?(o=ju,bo+=2):(o=e,0===$o&&jo(ue)),o===e&&(o=u.charAt(bo),Xu.test(o)?bo++:(o=e,0===$o&&jo(te)));o!==e;)s.push(o),u.substr(bo,2)===ju?(o=ju,bo+=2):(o=e,0===$o&&jo(ue)),o===e&&(o=u.charAt(bo),Xu.test(o)?bo++:(o=e,0===$o&&jo(te)));n=u.substring(n,bo),39===u.charCodeAt(bo)?(s=q,bo++):(s=e,0===$o&&jo(Jt)),s!==e?t=ho(n):(bo=t,t=e)}else bo=t,t=e;$o--,t===e&&(r=e,0===$o&&jo(Yr));return t}(),r!==e&&(r=hs(r)),(t=r)===e&&(t=bo,r=function(){var t,r,n,s,o,i;$o++,t=bo,u.substr(bo,7)===Ru?(r=Ru,bo+=7):(r=e,0===$o&&jo(Ee));if(r!==e){if(n=bo,s=bo,o=[],i=u.charAt(bo),ot.test(i)?bo++:(i=e,0===$o&&jo(De)),i!==e)for(;i!==e;)o.push(i),i=u.charAt(bo),ot.test(i)?bo++:(i=e,0===$o&&jo(De));else o=e;o!==e?(u.substr(bo,2)===Iu?(i=Iu,bo+=2):(i=e,0===$o&&jo(ye)),i===e&&(61===u.charCodeAt(bo)?(i=h,bo++):(i=e,0===$o&&jo(pt))),i===e&&(i=null),s=o=[o,i]):(bo=s,s=e),(n=s!==e?u.substring(n,bo):s)!==e?(39===u.charCodeAt(bo)?(s=q,bo++):(s=e,0===$o&&jo(Jt)),s!==e?t=mo(n):(bo=t,t=e)):(bo=t,t=e)}else bo=t,t=e;$o--,t===e&&(r=e,0===$o&&jo(be));return t}(),r!==e&&(r=ps(r)),(t=r)===e&&(t=bo,(r=Xo())!==e&&(r=Cs(r)),(t=r)===e&&(t=function(){var t,r;$o++,t=bo,u.substr(bo,4)===Y?(r=Y,bo+=4):(r=e,0===$o&&jo(lr));r!==e&&(r=ds());t=r,$o--,t===e&&(r=e,0===$o&&jo(fr));return t}())))))))),t}function si(){var t,r,n,s,o,i;if($o++,t=bo,r=bo,n=bo,123===u.charCodeAt(bo)?(s=uu,bo++):(s=e,0===$o&&jo(hr)),s!==e){for(o=[],(i=si())===e&&(i=u.charAt(bo),Ku.test(i)?bo++:(i=e,0===$o&&jo(pr)));i!==e;)o.push(i),(i=si())===e&&(i=u.charAt(bo),Ku.test(i)?bo++:(i=e,0===$o&&jo(pr)));125===u.charCodeAt(bo)?(i=tu,bo++):(i=e,0===$o&&jo(Cr)),i!==e?n=s=[s,o,i]:(bo=n,n=e)}else bo=n,n=e;return(r=n!==e?u.substring(r,bo):n)!==e&&(r=Fs(r)),$o--,(t=r)===e&&(r=e,0===$o&&jo(Ar)),t}function oi(){var t,r,n,s,o,i,a,c;if($o++,t=bo,r=bo,n=bo,91===u.charCodeAt(bo)?(s=P,bo++):(s=e,0===$o&&jo(Qt)),s!==e?(o=Li(),93===u.charCodeAt(bo)?(i=U,bo++):(i=e,0===$o&&jo(Vt)),i!==e?n=s=[s,o,i]:(bo=n,n=e)):(bo=n,n=e),n===e)if(n=bo,91===u.charCodeAt(bo)?(s=P,bo++):(s=e,0===$o&&jo(Qt)),s!==e)if(o=Li(),123===u.charCodeAt(bo)?(i=uu,bo++):(i=e,0===$o&&jo(hr)),i!==e){for(a=[],(c=oi())===e&&(c=u.charAt(bo),Qu.test(c)?bo++:(c=e,0===$o&&jo(Fr)));c!==e;)a.push(c),(c=oi())===e&&(c=u.charAt(bo),Qu.test(c)?bo++:(c=e,0===$o&&jo(Fr)));93===u.charCodeAt(bo)?(c=U,bo++):(c=e,0===$o&&jo(Vt)),c!==e?n=s=[s,o,i,a,c]:(bo=n,n=e)}else bo=n,n=e;else bo=n,n=e;return(r=n!==e?u.substring(r,bo):n)!==e&&(r=gs(r)),$o--,(t=r)===e&&(r=e,0===$o&&jo(dr)),t}function ii(){var t,r,n;return t=bo,r=function(){var t,r,n;if($o++,t=bo,r=[],n=u.charAt(bo),Vu.test(n)?bo++:(n=e,0===$o&&jo(vr)),n!==e)for(;n!==e;)r.push(n),n=u.charAt(bo),Vu.test(n)?bo++:(n=e,0===$o&&jo(vr));else r=e;return t=r!==e?u.substring(t,bo):r,$o--,t===e&&(r=e,0===$o&&jo(Br)),t}(),r!==e&&xi()!==e?(n=function(){var u,t,r,n,s,o,i;if(u=bo,t=[],r=bo,n=ri(),n!==e){for(s=[],o=bo,$i()!==e&&(i=ri())!==e?o=Ds(n,i):(bo=o,o=e);o!==e;)s.push(o),o=bo,$i()!==e&&(i=ri())!==e?o=Ds(n,i):(bo=o,o=e);r=ys(n,s)}else bo=r,r=e;for(;r!==e;)if(t.push(r),r=bo,(n=ri())!==e){for(s=[],o=bo,$i()!==e&&(i=ri())!==e?o=Ds(n,i):(bo=o,o=e);o!==e;)s.push(o),o=bo,$i()!==e&&(i=ri())!==e?o=Ds(n,i):(bo=o,o=e);r=ys(n,s)}else bo=r,r=e;return t=$s(t),u=t,u}(),wi()!==e?t=Es(r,n):(bo=t,t=e)):(bo=t,t=e),t}function ai(){var t,r;return t=bo,Li(),(r=u.substr(bo,3)).toLowerCase()===ou?bo+=3:(r=e,0===$o&&jo(yr)),r!==e&&Si()!==e?t=ws():(bo=t,t=e),t}function ci(){var t,r;return t=bo,Si()!==e?((r=u.substr(bo,3)).toLowerCase()===iu?bo+=3:(r=e,0===$o&&jo($r)),r!==e&&Si()!==e?t=Ls():(bo=t,t=e)):(bo=t,t=e),t}function fi(){var t,r;return t=bo,Si()!==e?((r=u.substr(bo,2)).toLowerCase()===au?bo+=2:(r=e,0===$o&&jo(xr)),r!==e&&Si()!==e?t=Ss():(bo=t,t=e)):(bo=t,t=e),t}function li(){var t,r,n;return t=bo,u.substr(bo,9)===cu?(r=cu,bo+=9):(r=e,0===$o&&jo(wr)),r!==e?(n=function(){var u,t,r,n,s,o;if(u=bo,t=xi(),t!==e)if(Li(),(r=Ai())!==e){for(n=[],s=bo,Li(),$i()!==e?(Li(),(o=Ai())!==e?s=Ps(r,o):(bo=s,s=e)):(bo=s,s=e);s!==e;)n.push(s),s=bo,Li(),$i()!==e?(Li(),(o=Ai())!==e?s=Ps(r,o):(bo=s,s=e)):(bo=s,s=e);s=Li(),wi()!==e?u=Us(r,n):(bo=u,u=e)}else bo=u,u=e;else bo=u,u=e;return u}(),n!==e?t=Ts(n):(bo=t,t=e)):(bo=t,t=e),t===e&&(t=bo,u.substr(bo,7)===fu?(r=fu,bo+=7):(r=e,0===$o&&jo(Lr)),r!==e?(n=function(){var u,t,r,n,s,o,i,a;if(u=bo,t=xi(),t!==e)if(xi()!==e)if((r=Fi())!==e){for(n=[],s=bo,(o=$i())!==e&&(i=Fi())!==e?s=Qs(r,i):(bo=s,s=e);s!==e;)n.push(s),s=bo,(o=$i())!==e&&(i=Fi())!==e?s=Qs(r,i):(bo=s,s=e);s=bo,(o=wi())!==e&&(o=Vs(r,n)),(s=o)!==e?(o=bo,(i=$i())!==e&&(a=Vo())!==e?o=Ws(r,n,a):(bo=o,o=e),o===e&&(o=null),(i=wi())!==e?u=Xs(r,n,o):(bo=u,u=e)):(bo=u,u=e)}else bo=u,u=e;else bo=u,u=e;else bo=u,u=e;return u}(),n!==e?t=js(n):(bo=t,t=e)):(bo=t,t=e),t===e&&(t=bo,u.substr(bo,6)===lu?(r=lu,bo+=6):(r=e,0===$o&&jo(Sr)),r!==e?(n=function(){var u,t,r,n;u=bo,t=xi(),t!==e?(Li(),r=bo,(n=Mo())!==e&&(n=to(n)),(r=n)!==e?(n=Li(),wi()!==e?u=ro(r):(bo=u,u=e)):(bo=u,u=e)):(bo=u,u=e);return u}(),n!==e?t=Os(n):(bo=t,t=e)):(bo=t,t=e),t===e&&(t=bo,u.substr(bo,6)===Au?(r=Au,bo+=6):(r=e,0===$o&&jo(Tr)),r!==e?(n=function(){var t,r,n,s,o;if(t=bo,r=xi(),r!==e){for(n=bo,s=[],o=u.charAt(bo),Wu.test(o)?bo++:(o=e,0===$o&&jo(Kr));o!==e;)s.push(o),o=u.charAt(bo),Wu.test(o)?bo++:(o=e,0===$o&&jo(Kr));n=u.substring(n,bo),(s=wi())!==e?t=eo(n):(bo=t,t=e)}else bo=t,t=e;return t}(),n!==e?t=Zs(n):(bo=t,t=e)):(bo=t,t=e),t===e&&(t=bo,u.substr(bo,6)===hu?(r=hu,bo+=6):(r=e,0===$o&&jo(jr)),r!==e?(n=function(){var u,t,r,n,s,o;if(u=bo,t=xi(),t!==e)if(Li(),(r=Vo())!==e){if(n=[],s=bo,Li(),$i()!==e?(Li(),(o=Vo())!==e?s=no(r,o):(bo=s,s=e)):(bo=s,s=e),s!==e)for(;s!==e;)n.push(s),s=bo,Li(),$i()!==e?(Li(),(o=Vo())!==e?s=no(r,o):(bo=s,s=e)):(bo=s,s=e);else n=e;n!==e?(s=Li(),wi()!==e?u=so(r,n):(bo=u,u=e)):(bo=u,u=e)}else bo=u,u=e;else bo=u,u=e;return u}(),n!==e?t=_s(n):(bo=t,t=e)):(bo=t,t=e),t===e&&(t=bo,u.substr(bo,7)===pu?(r=pu,bo+=7):(r=e,0===$o&&jo(Or)),r!==e?(n=function(){var u,t,r,n,s,o,i,a,c,f;if(u=bo,t=xi(),t!==e)if(r=Li(),(n=gi())!==e){for(s=[],o=bo,i=Li(),(a=$i())!==e?(c=Li(),(f=gi())!==e?o=i=[i,a,c,f]:(bo=o,o=e)):(bo=o,o=e);o!==e;)s.push(o),o=bo,i=Li(),(a=$i())!==e?(c=Li(),(f=gi())!==e?o=i=[i,a,c,f]:(bo=o,o=e)):(bo=o,o=e);o=Li(),(i=wi())!==e?u=t=[t,r,n,s,o,i]:(bo=u,u=e)}else bo=u,u=e;else bo=u,u=e;return u}(),n!==e?t=ks(n):(bo=t,t=e)):(bo=t,t=e),t===e&&(t=bo,u.substr(bo,3)===Cu?(r=Cu,bo+=3):(r=e,0===$o&&jo(Zr)),r!==e?(n=function(){var u,t,r;u=bo,t=xi(),t!==e?(Li(),(r=Po())!==e?(Li(),wi()!==e?u=ao(r):(bo=u,u=e)):(bo=u,u=e)):(bo=u,u=e);return u}(),n!==e?t=zs(n):(bo=t,t=e)):(bo=t,t=e),t===e&&(t=bo,u.substr(bo,4)===du?(r=du,bo+=4):(r=e,0===$o&&jo(_r)),r!==e?(n=function(){var u,t,r;u=bo,t=xi(),t!==e?(Li(),(r=Uo())!==e?(Li(),wi()!==e?u=co(r):(bo=u,u=e)):(bo=u,u=e)):(bo=u,u=e);return u}(),n!==e?t=Rs(n):(bo=t,t=e)):(bo=t,t=e),t===e&&(t=bo,u.substr(bo,7)===Fu?(r=Fu,bo+=7):(r=e,0===$o&&jo(kr)),r!==e?(n=function(){var u,t,r,n,s,o;if(u=bo,t=xi(),t!==e)if(Li(),(r=Qo())!==e){for(n=[],s=bo,$i()!==e&&(o=Qo())!==e?s=fo(r,o):(bo=s,s=e);s!==e;)n.push(s),s=bo,$i()!==e&&(o=Qo())!==e?s=fo(r,o):(bo=s,s=e);s=Li(),wi()!==e?u=lo(r,n):(bo=u,u=e)}else bo=u,u=e;else bo=u,u=e;return u}(),n!==e?t=Is(n):(bo=t,t=e)):(bo=t,t=e),t===e&&(t=bo,(r=u.substr(bo,8)).toLowerCase()===gu?bo+=8:(r=e,0===$o&&jo(zr)),r===e&&((r=u.substr(bo,11)).toLowerCase()===Bu?bo+=11:(r=e,0===$o&&jo(Rr)),r===e&&((r=u.substr(bo,6)).toLowerCase()===vu?bo+=6:(r=e,0===$o&&jo(Ir)),r===e&&((r=u.substr(bo,9)).toLowerCase()===mu?bo+=9:(r=e,0===$o&&jo(qr)),r===e&&((r=u.substr(bo,10)).toLowerCase()===bu?bo+=10:(r=e,0===$o&&jo(Nr)),r===e&&((r=u.substr(bo,13)).toLowerCase()===Eu?bo+=13:(r=e,0===$o&&jo(Pr))))))),r!==e?(n=function(){var u,t,r,n;u=bo,t=xi(),t!==e?(Li(),(r=ri())!==e?(Li(),$i()!==e?(Li(),(n=ri())!==e?(Li(),wi()!==e?u=oo(r,n):(bo=u,u=e)):(bo=u,u=e)):(bo=u,u=e)):(bo=u,u=e)):(bo=u,u=e);return u}(),n!==e?t=qs(r,n):(bo=t,t=e)):(bo=t,t=e),t===e&&(t=bo,r=function(){var t,r;t=bo,u.substr(bo,8)===Lu?(r=Lu,bo+=8):(r=e,0===$o&&jo(Qr));r!==e&&(r=io());return t=r,t}(),r!==e&&(r=Ns(r)),t=r)))))))))),t}function Ai(){var t,r,n,s;return t=bo,r=bo,u.substr(bo,6)===f?(n=f,bo+=6):(n=e,0===$o&&jo(lt)),n!==e&&(s=di())!==e?r=Ms(s):(bo=r,r=e),r===e&&(r=hi()),r!==e&&(r=Gs(r)),t=r}function hi(){var u,t,r,n,s;return u=bo,(t=ei())!==e?((r=pi())===e&&(r=null),(n=Ci())===e&&(n=null),(s=di())===e&&(s=null),u=Hs(t,r,s)):(bo=u,u=e),u===e&&(u=bo,(t=bi())!==e&&(r=xi())!==e&&(n=hi())!==e&&(s=wi())!==e?u=t=[t,r,n,s]:(bo=u,u=e)),u}function pi(){var t,r,n,s,o;if(t=bo,Si()!==e)if(u.substr(bo,4)===Du?(r=Du,bo+=4):(r=e,0===$o&&jo(Ur)),r!==e)if(Si()!==e){if(n=bo,s=[],o=u.charAt(bo),Vu.test(o)?bo++:(o=e,0===$o&&jo(vr)),o!==e)for(;o!==e;)s.push(o),o=u.charAt(bo),Vu.test(o)?bo++:(o=e,0===$o&&jo(vr));else s=e;(n=s!==e?u.substring(n,bo):s)!==e?t=Js(n):(bo=t,t=e)}else bo=t,t=e;else bo=t,t=e;else bo=t,t=e;return t}function Ci(){var t,r,n,s,o,i,a;return t=bo,(r=Si())!==e?(u.substr(bo,4)===yu?(n=yu,bo+=4):(n=e,0===$o&&jo(Mr)),n!==e&&(s=Si())!==e&&(o=ei())!==e&&(i=pi())!==e?((a=Ci())===e&&(a=null),t=r=[r,n,s,o,i,a]):(bo=t,t=e)):(bo=t,t=e),t}function di(){var t,r,n;return t=bo,Si()!==e?(u.substr(bo,2)===$u?(r=$u,bo+=2):(r=e,0===$o&&jo(Gr)),r!==e&&Si()!==e&&(n=bi())!==e?t=Ks(n):(bo=t,t=e)):(bo=t,t=e),t}function Fi(){var t,r;return t=bo,r=function(){var t,r,n,s,o,i,a,c,f,l,A;t=bo,r=bo,u.substr(bo,6)===xu?(n=xu,bo+=6):(n=e,0===$o&&jo(Hr));if(n!==e)if((s=xi())!==e)if(o=Li(),u.substr(bo,4)===wu?(i=wu,bo+=4):(i=e,0===$o&&jo(Jr)),i===e&&(i=ei()),i!==e){if(a=[],c=bo,f=Li(),(l=$i())!==e&&(A=ei())!==e?c=f=[f,l,A]:(bo=c,c=e),c!==e)for(;c!==e;)a.push(c),c=bo,f=Li(),(l=$i())!==e&&(A=ei())!==e?c=f=[f,l,A]:(bo=c,c=e);else a=e;a!==e?(c=Li(),(f=wi())!==e?r=n=[n,s,o,i,a,c,f]:(bo=r,r=e)):(bo=r,r=e)}else bo=r,r=e;else bo=r,r=e;else bo=r,r=e;r!==e&&(r=uo(r));return t=r,t}(),r===e&&(r=ei()),r!==e&&(r=Ys(r)),t=r}function gi(){var u,t,r;return u=bo,(t=Go())!==e&&(r=di())!==e?u=t=[t,r]:(bo=u,u=e),u}function Bi(){var t,r;return $o++,t=bo,u.substr(bo,4)===Su?(r=Su,bo+=4):(r=e,0===$o&&jo(Wr)),r===e&&(u.substr(bo,5)===Tu?(r=Tu,bo+=5):(r=e,0===$o&&jo(Xr))),r!==e&&(r=Ao(r)),$o--,(t=r)===e&&(r=e,0===$o&&jo(Vr)),t}function vi(){var t,r,n,s,o,i,a,c,f,l,A,h,p,C,d,F,g,B,v,m,b,E,D,y,$;if($o++,t=bo,r=bo,n=bo,s=[],o=u.charAt(bo),Yu.test(o)?bo++:(o=e,0===$o&&jo(ne)),o!==e)for(;o!==e;)s.push(o),o=u.charAt(bo),Yu.test(o)?bo++:(o=e,0===$o&&jo(ne));else s=e;if(s!==e)if(45===u.charCodeAt(bo)?(o=Ou,bo++):(o=e,0===$o&&jo(oe)),o!==e)if(i=u.charAt(bo),Yu.test(i)?bo++:(i=e,0===$o&&jo(ne)),i!==e)if(a=u.charAt(bo),Yu.test(a)?bo++:(a=e,0===$o&&jo(ne)),a!==e)if(45===u.charCodeAt(bo)?(c=Ou,bo++):(c=e,0===$o&&jo(oe)),c!==e)if(f=u.charAt(bo),Yu.test(f)?bo++:(f=e,0===$o&&jo(ne)),f!==e)if(l=u.charAt(bo),Yu.test(l)?bo++:(l=e,0===$o&&jo(ne)),l!==e){if(A=bo,84===u.charCodeAt(bo)?(h=Zu,bo++):(h=e,0===$o&&jo(ie)),h!==e)if(p=u.charAt(bo),Yu.test(p)?bo++:(p=e,0===$o&&jo(ne)),p!==e)if(C=u.charAt(bo),Yu.test(C)?bo++:(C=e,0===$o&&jo(ne)),C!==e)if(58===u.charCodeAt(bo)?(d=Z,bo++):(d=e,0===$o&&jo(qt)),d!==e)if(F=u.charAt(bo),Yu.test(F)?bo++:(F=e,0===$o&&jo(ne)),F!==e)if(g=u.charAt(bo),Yu.test(g)?bo++:(g=e,0===$o&&jo(ne)),g!==e){if(B=bo,58===u.charCodeAt(bo)?(v=Z,bo++):(v=e,0===$o&&jo(qt)),v!==e)if(m=u.charAt(bo),Yu.test(m)?bo++:(m=e,0===$o&&jo(ne)),m!==e)if(b=u.charAt(bo),Yu.test(b)?bo++:(b=e,0===$o&&jo(ne)),b!==e){if(E=bo,46===u.charCodeAt(bo)?(D=_u,bo++):(D=e,0===$o&&jo(ae)),D!==e){if(y=[],$=u.charAt(bo),Yu.test($)?bo++:($=e,0===$o&&jo(ne)),$!==e)for(;$!==e;)y.push($),$=u.charAt(bo),Yu.test($)?bo++:($=e,0===$o&&jo(ne));else y=e;y!==e?E=D=[D,y]:(bo=E,E=e)}else bo=E,E=e;E===e&&(E=null),B=v=[v,m,b,E]}else bo=B,B=e;else bo=B,B=e;else bo=B,B=e;B===e&&(B=null),90===u.charCodeAt(bo)?(v=ku,bo++):(v=e,0===$o&&jo(ce)),v===e&&(v=bo,m=u.charAt(bo),ut.test(m)?bo++:(m=e,0===$o&&jo(fe)),m!==e?(b=u.charAt(bo),Yu.test(b)?bo++:(b=e,0===$o&&jo(ne)),b!==e?(E=u.charAt(bo),Yu.test(E)?bo++:(E=e,0===$o&&jo(ne)),E!==e?(58===u.charCodeAt(bo)?(D=Z,bo++):(D=e,0===$o&&jo(qt)),D!==e?(y=u.charAt(bo),Yu.test(y)?bo++:(y=e,0===$o&&jo(ne)),y!==e?($=u.charAt(bo),Yu.test($)?bo++:($=e,0===$o&&jo(ne)),$!==e?v=m=[m,b,E,D,y,$]:(bo=v,v=e)):(bo=v,v=e)):(bo=v,v=e)):(bo=v,v=e)):(bo=v,v=e)):(bo=v,v=e)),v===e&&(v=null),A=h=[h,p,C,d,F,g,B,v]}else bo=A,A=e;else bo=A,A=e;else bo=A,A=e;else bo=A,A=e;else bo=A,A=e;else bo=A,A=e;A===e&&(A=null),n=s=[s,o,i,a,c,f,l,A]}else bo=n,n=e;else bo=n,n=e;else bo=n,n=e;else bo=n,n=e;else bo=n,n=e;else bo=n,n=e;else bo=n,n=e;return(r=n!==e?u.substring(r,bo):n)!==e&&(r=Co(r)),$o--,(t=r)===e&&(r=e,0===$o&&jo(se)),t}function mi(){var t,r,n,s,o,i;if($o++,t=bo,r=bo,n=bo,s=u.charAt(bo),ut.test(s)?bo++:(s=e,0===$o&&jo(fe)),s===e&&(s=null),o=[],i=u.charAt(bo),Yu.test(i)?bo++:(i=e,0===$o&&jo(ne)),i!==e)for(;i!==e;)o.push(i),i=u.charAt(bo),Yu.test(i)?bo++:(i=e,0===$o&&jo(ne));else o=e;return o!==e?n=s=[s,o]:(bo=n,n=e),(r=n!==e?u.substring(r,bo):n)!==e&&(r=go(r)),$o--,(t=r)===e&&(r=e,0===$o&&jo(he)),t}function bi(){var t,r,n,s,o,i,a,c;if($o++,t=bo,r=bo,$o++,n=Bi(),$o--,n===e?r=void 0:(bo=r,r=e),r!==e)if(n=bo,$o++,s=Ei(),$o--,s===e?n=void 0:(bo=n,n=e),n!==e){if(s=bo,o=bo,i=u.charAt(bo),tt.test(i)?bo++:(i=e,0===$o&&jo(Ce)),i!==e){for(a=[],c=u.charAt(bo),rt.test(c)?bo++:(c=e,0===$o&&jo(de));c!==e;)a.push(c),c=u.charAt(bo),rt.test(c)?bo++:(c=e,0===$o&&jo(de));o=i=[i,a]}else bo=o,o=e;(s=o!==e?u.substring(s,bo):o)!==e?t=Bo(s):(bo=t,t=e)}else bo=t,t=e;else bo=t,t=e;return $o--,t===e&&(r=e,0===$o&&jo(pe)),t}function Ei(){var t,r,n,s,o,i,a,c,f,l,A,h,p,C;return $o++,t=bo,r=bo,(n=Di())!==e&&(s=Di())!==e?(45===u.charCodeAt(bo)?(o=Ou,bo++):(o=e,0===$o&&jo(oe)),o===e&&(o=null),(i=Di())!==e?(45===u.charCodeAt(bo)?(a=Ou,bo++):(a=e,0===$o&&jo(oe)),a===e&&(a=null),(c=Di())!==e?(45===u.charCodeAt(bo)?(f=Ou,bo++):(f=e,0===$o&&jo(oe)),f===e&&(f=null),(l=Di())!==e?(45===u.charCodeAt(bo)?(A=Ou,bo++):(A=e,0===$o&&jo(oe)),A===e&&(A=null),(h=Di())!==e&&(p=Di())!==e&&(C=Di())!==e?r=n=[n,s,o,i,a,c,f,l,A,h,p,C]:(bo=r,r=e)):(bo=r,r=e)):(bo=r,r=e)):(bo=r,r=e)):(bo=r,r=e),t=r!==e?u.substring(t,bo):r,$o--,t===e&&(r=e,0===$o&&jo(Fe)),t}function Di(){var t,r,n,s,o,i;return $o++,t=bo,r=bo,n=u.charAt(bo),et.test(n)?bo++:(n=e,0===$o&&jo(Be)),n!==e?(s=u.charAt(bo),et.test(s)?bo++:(s=e,0===$o&&jo(Be)),s!==e?(o=u.charAt(bo),et.test(o)?bo++:(o=e,0===$o&&jo(Be)),o!==e?(i=u.charAt(bo),et.test(i)?bo++:(i=e,0===$o&&jo(Be)),i!==e?r=n=[n,s,o,i]:(bo=r,r=e)):(bo=r,r=e)):(bo=r,r=e)):(bo=r,r=e),t=r!==e?u.substring(t,bo):r,$o--,t===e&&(r=e,0===$o&&jo(ge)),t}function yi(){var t,r,n,s;if(t=bo,r=bo,n=[],s=u.charAt(bo),nt.test(s)?bo++:(s=e,0===$o&&jo(ve)),s!==e)for(;s!==e;)n.push(s),s=u.charAt(bo),nt.test(s)?bo++:(s=e,0===$o&&jo(ve));else n=e;return(r=n!==e?u.substring(r,bo):n)!==e&&(r=vo(r)),t=r}function $i(){var t,r,n;return t=bo,r=Li(),44===u.charCodeAt(bo)?(n=N,bo++):(n=e,0===$o&&jo(Kt)),n!==e?t=r=[r,n,Li()]:(bo=t,t=e),t}function xi(){var t,r,n;return t=bo,r=Li(),40===u.charCodeAt(bo)?(n=qu,bo++):(n=e,0===$o&&jo($e)),n!==e?t=r=[r,n,Li()]:(bo=t,t=e),t}function wi(){var t,r,n;return t=bo,r=Li(),41===u.charCodeAt(bo)?(n=Nu,bo++):(n=e,0===$o&&jo(xe)),n!==e?t=r=[r,n]:(bo=t,t=e),t}function Li(){var t,r,n;for($o++,t=bo,r=[],n=u.charAt(bo),it.test(n)?bo++:(n=e,0===$o&&jo(Le));n!==e;)r.push(n),n=u.charAt(bo),it.test(n)?bo++:(n=e,0===$o&&jo(Le));return t=u.substring(t,bo),$o--,r=e,0===$o&&jo(we),t}function Si(){var t,r,n;if($o++,t=bo,r=[],n=u.charAt(bo),it.test(n)?bo++:(n=e,0===$o&&jo(Le)),n!==e)for(;n!==e;)r.push(n),n=u.charAt(bo),it.test(n)?bo++:(n=e,0===$o&&jo(Le));else r=e;return t=r!==e?u.substring(t,bo):r,$o--,t===e&&(r=e,0===$o&&jo(Se)),t}const Ti=["$value"],ji={eq:"=",ne:"!=",lt:"<",gt:">",le:"<=",ge:">="},Oi={topcount:!0,bottomcount:!0,topsum:!1,bottomsum:!1,toppercent:!1,bottompercent:!1},Zi=Object.assign,{strict:_i,minimal:ki}=t,zi=[];let Ri,Ii;const qi=t.safeNumber||function(u){if("string"!=typeof u)return u;const t=parseFloat(u);if(!isNaN(t)&&String(t)===u)return t;const r=parseInt(u);return isNaN(r)||String(r)!==u.replace(/^-?\d+\.0+$/,u.split(".")[0])?u:r},Ni=t.skipToken,Pi=t.standardBase64||function(u){return Buffer.from(u,"base64").toString("base64")},Ui=u=>t=>u===t||u.as&&t.as&&u.as===t.as||t.as&&u.ref&&t.as===u.ref[u.ref.length-1]||u.ref&&t.ref&&u.ref.join("")===t.ref.join(""),Mi=u=>t=>{if(Array.isArray(t))return t.map(Mi(u));const r=t.ref&&u.find((u=>u.as&&u.func&&u.as===t.ref[0]));return r||t},Gi=u=>t=>Array.isArray(t)?t.map(Gi(u)):t.ref&&!u.find(Ui(t))?{val:null}:t,Hi=(u,t)=>{if(1===t.ref.length)u.find(Ui(t))||u.push(t);else{const r=t.ref.shift(),e=u.find((u=>u.ref&&u.ref[0]===r));if(e)Hi(e.expand,t);else{const e={ref:[r],expand:[]};Hi(e.expand,t),u.push(e)}}},Ji=(u,t,r=!1)=>{let e=Vi({from:u.from},t,r);if(Array.isArray(e))for(let t=0;t<e.length;t++)e[t]=Ki(e[t],u,r);else e=Ki(e,u,r);return e},Ki=(u,t,r)=>{if(!t)return u;t.apply&&delete t.apply;let e={};t.columns&&"$count"===t.columns[0].as||u.SELECT.where&&t.where||u.SELECT.limit&&t.limit||u.SELECT.orderBy&&t.orderBy||u.SELECT.search&&t.search?e.from=u:e=u.SELECT;for(const u in t)"columns"===u?(t.columns=t.columns.map((u=>e.columns&&e.columns.find((t=>u.ref&&u.ref[0]===t.as||t.ref&&u.ref&&u.ref[0]===t.ref[0]&&!u.expand))||u)),e.columns&&e.groupBy&&t.columns.push(...e.columns.filter((u=>r&&e.groupBy.find((t=>u.ref&&u.ref[0]===t.ref[0]))&&!t.columns.some((t=>t.ref&&t.ref[0]===u.as||t.ref&&u.ref&&t.ref[0]===u.ref[0]||t.as&&t.as===u.as))))||[]),e.columns=t.columns):"from"!==u&&(e[u]=t[u]);const n=[...e.columns&&e.columns.filter((u=>e.groupBy&&e.groupBy.find((t=>u.ref&&u.ref[0]===t.ref[0]))))||[],...e.columns&&e.columns.filter((u=>u&&"object"==typeof u&&"func"in u))||[]];return Qi(e,n,r),{SELECT:e}},Qi=(u,t,r)=>{t.length&&(u.columns=u.columns&&!r?u.columns.reduce(((u,r)=>{const e=t.find(Ui(r));return e&&u.push(e),u}),[]):t,u.where&&(u.where=u.where.map(Mi(u.columns)),u.groupBy&&(u.having=u.where.map(Gi(u.groupBy)),delete u.where)),u.columns=u.columns.reduce(((u,r)=>(r.ref&&r.ref.length>1&&t.find(Ui(r))?Hi(u,{ref:[...r.ref]}):u.push(r),u)),[]))},Vi=(u,t,r)=>{if(!t)return;if(u.apply&&delete u.apply,t.identity&&u.from.SELECT&&(u=u.from.SELECT),(t.apply||t.where&&u.where||t.search&&u.search||t.limit&&u.limit||t.orderBy&&u.orderBy)&&(u.from={SELECT:{...u}}),t.where&&(u.where=t.where),t.search&&(u.search=t.search),t.groupBy){u.groupBy=[];for(const r of t.groupBy)u.groupBy.find(Ui(r))||u.groupBy.push(r)}t.limit&&(u.limit=t.limit),t.orderBy&&(u.orderBy=t.orderBy);const e=[...u.groupBy||[],...t.aggregate||[]];if(Qi(u,e,r),t.apply&&u.from&&Vi(u.from.SELECT,t.apply),t.concat&&Array.isArray(t.concat)){const r=[];for(let e of t.concat){e.from=1===Object.keys(u).length?u.from:{SELECT:u};const t=Vi(e,e.apply);Array.isArray(t)?r.push(...t):r.push(t)}u=r}return Array.isArray(u)?u:{SELECT:u}},Wi=u=>{Ri.limit&&Ri.limit.offset&&Ri.limit.offset.val&&(u+=Ri.limit.offset.val),(Ri.limit||(Ri.limit={})).offset={val:u}},Xi=(u,t=!1)=>{Ri.orderBy=Ri.orderBy?t?[u,...Ri.orderBy]:[...Ri.orderBy,u]:[u]},Yi=(u,t)=>{for(const r of t)r.ref&&r.ref[0]===u&&r.ref.shift(),r.func&&Yi(u,r.args),r.xpr&&Yi(u,r.xpr);return t},ua=(u,t,r,e=!1)=>{u?.forEach((u=>{u.val===t?u.val="list"in r?r.list.map((u=>u.val)):r.val:u.list===t?u.list=r.list:u.func?u.args.forEach(((u,n)=>{u.val===t?u.val=r.val:u.func&&ua(u.args,t,r,e)})):u.SELECT&&ta(u.SELECT,t,r,e)}))},ta=(u,t,r,e=!1)=>{const{where:n,from:s}=u;ua(n,t,r),s?.ref?.forEach((u=>{ua(u.where,t,r,!0)}))};if(r=o(),t.peg$library)return{peg$result:r,peg$currPos:bo,peg$FAILED:e,peg$maxFailExpected:yo,peg$maxFailPos:Do};if(r!==e&&bo===u.length)return r;throw r!==e&&bo<u.length&&jo({type:"end"}),Oo(yo,Do<u.length?u.charAt(Do):null,Do<u.length?To(Do,Do+1):To(Do,Do))}peg$subclass(peg$SyntaxError,Error),peg$SyntaxError.prototype.format=function(u){var t="Error: "+this.message;if(this.location){var r,e=null;for(r=0;r<u.length;r++)if(u[r].source===this.location.source){e=u[r].text.split(/\r\n|\n|\r/g);break}var n=this.location.start,s=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(n):n,o=this.location.source+":"+s.line+":"+s.column;if(e){var i=this.location.end,a=peg$padEnd("",s.line.toString().length," "),c=e[n.line-1],f=(n.line===i.line?i.column:c.length+1)-n.column||1;t+="\n --\x3e "+o+"\n"+a+" |\n"+s.line+" | "+c+"\n"+a+" | "+peg$padEnd("",n.column-1," ")+peg$padEnd("",f,"^")}else t+="\n at "+o}return t},peg$SyntaxError.buildMessage=function(u,t){var r={literal:function(u){return'"'+n(u.text)+'"'},class:function(u){var t=u.parts.map((function(u){return Array.isArray(u)?s(u[0])+"-"+s(u[1]):s(u)}));return"["+(u.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(u){return u.description}};function e(u){return u.charCodeAt(0).toString(16).toUpperCase()}function n(u){return u.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(u){return"\\x0"+e(u)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(u){return"\\x"+e(u)}))}function s(u){return u.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(u){return"\\x0"+e(u)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(u){return"\\x"+e(u)}))}function o(u){return r[u.type](u)}return"Expected "+function(u){var t,r,e=u.map(o);if(e.sort(),e.length>0){for(t=1,r=1;t<e.length;t++)e[t-1]!==e[t]&&(e[r]=e[t],r++);e.length=r}switch(e.length){case 1:return e[0];case 2:return e[0]+" or "+e[1];default:return e.slice(0,-1).join(", ")+", or "+e[e.length-1]}}(u)+" but "+function(u){return u?'"'+n(u)+'"':"end of input"}(t)+" found."},module.exports={StartRules:["ODataRelativeURI"],SyntaxError:peg$SyntaxError,parse:peg$parse};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const getTemplate = require('../../_runtime/common/utils/template')
|
|
2
|
+
const { toBase64url } = require('../../_runtime/common/utils/binary')
|
|
2
3
|
|
|
3
4
|
const _addEtags = (row, key) => {
|
|
4
5
|
if (!row[key]) return
|
|
@@ -21,8 +22,10 @@ const _processorFn = elementInfo => {
|
|
|
21
22
|
if (Buffer.isBuffer(row[key])) {
|
|
22
23
|
// if the result object gets serialize to json, the buffer shall become a base64 string
|
|
23
24
|
row[key].toJSON = function () {
|
|
24
|
-
return this
|
|
25
|
+
return toBase64url(this)
|
|
25
26
|
}
|
|
27
|
+
} else if (typeof row[key] === 'string') {
|
|
28
|
+
row[key] = toBase64url(row[key])
|
|
26
29
|
}
|
|
27
30
|
break
|
|
28
31
|
case 'array':
|
package/libx/rest/RestAdapter.js
CHANGED
|
@@ -125,7 +125,8 @@ class RestAdapter extends HttpAdapter {
|
|
|
125
125
|
})
|
|
126
126
|
|
|
127
127
|
// error handling
|
|
128
|
-
|
|
128
|
+
if (cds.env.features.rest_error_handler !== false) // REVISIT: unofficial hack for afc!!!
|
|
129
|
+
router.use(error(this))
|
|
129
130
|
|
|
130
131
|
return router
|
|
131
132
|
}
|
|
@@ -1,57 +1,7 @@
|
|
|
1
|
-
const cds = require('../../_runtime/cds')
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
|
|
5
|
-
// requesting logger without module on purpose!
|
|
6
|
-
const LOG = cds.log()
|
|
7
|
-
|
|
8
|
-
let _i18n
|
|
9
|
-
const i18n = (...args) => {
|
|
10
|
-
if (!_i18n) _i18n = require('../../_runtime/common/i18n')
|
|
11
|
-
return _i18n(...args)
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const { normalizeError, isClientError } = require('../../_runtime/common/error/frontend')
|
|
15
|
-
|
|
16
|
-
const _log = err => {
|
|
17
|
-
// REVISIT: how does level behave compared to _log in (legacy) odata adapter?
|
|
18
|
-
const level = isClientError(err) ? 'warn' : 'error'
|
|
19
|
-
if ((level === 'warn' && !LOG._warn) || (level === 'error' && !LOG._error)) return
|
|
20
|
-
|
|
21
|
-
// replace messages in toLog with developer texts (i.e., undefined locale)
|
|
22
|
-
const _message = err.message
|
|
23
|
-
const _details = err.details
|
|
24
|
-
err.message = i18n(err.message || err.code, undefined, err.args) || err.message
|
|
25
|
-
if (err.details) {
|
|
26
|
-
const details = []
|
|
27
|
-
for (const d of err.details) {
|
|
28
|
-
details.push(Object.assign({}, d, { message: i18n(d.message || d.code, undefined, d.args) || d.message }))
|
|
29
|
-
}
|
|
30
|
-
err.details = details
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// log it
|
|
34
|
-
LOG[level](err)
|
|
35
|
-
|
|
36
|
-
// restore
|
|
37
|
-
err.message = _message
|
|
38
|
-
if (_details) err.details = _details
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
1
|
const _log = require('../../_runtime/common/error/log')
|
|
44
|
-
|
|
45
2
|
const { normalizeError } = require('../../_runtime/common/error/frontend')
|
|
46
3
|
|
|
47
|
-
function noop_error_middleware(err, req, res, next) {
|
|
48
|
-
next(err)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
4
|
module.exports = () => {
|
|
52
|
-
// REVISIT: unofficial hack for afc!!!
|
|
53
|
-
if (cds.env.features.rest_error_handler === false) return noop_error_middleware
|
|
54
|
-
|
|
55
5
|
return function rest_error(err, req, res, next) {
|
|
56
6
|
if (err == 401 || err.code == 401) return next(err) // speed up logins, at least temporary until we reviewed and eliminated overhead that may be involved below
|
|
57
7
|
|
package/package.json
CHANGED
package/lib/auth/ias-auth.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
const cds = require('../')
|
|
2
|
-
const LOG = cds.log('auth')
|
|
3
|
-
|
|
4
|
-
// _require for better error message
|
|
5
|
-
const _require = require('../../libx/_runtime/common/utils/require')
|
|
6
|
-
|
|
7
|
-
let xssec = _require('@sap/xssec')
|
|
8
|
-
// use v3 compat api
|
|
9
|
-
if (xssec.v3) xssec = xssec.v3
|
|
10
|
-
|
|
11
|
-
module.exports = function ias_auth(config) {
|
|
12
|
-
const { kind, credentials, known_claims } = config
|
|
13
|
-
|
|
14
|
-
if (!credentials) {
|
|
15
|
-
let msg = `Authentication kind "${kind}" configured, but no IAS instance bound to application.`
|
|
16
|
-
msg += ' Either bind an IAS instance, or switch to an authentication kind that does not require a binding.'
|
|
17
|
-
throw new Error(msg)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// cds.env.requires.auth.known_claims is not an official config!
|
|
21
|
-
const KNOWN_CLAIMS = new Set(known_claims || require('./ias-claims'))
|
|
22
|
-
|
|
23
|
-
function getUser(tokenInfo) {
|
|
24
|
-
const payload = tokenInfo.getPayload()
|
|
25
|
-
|
|
26
|
-
const clientid = tokenInfo.getClientId()
|
|
27
|
-
if (clientid === payload.sub) {
|
|
28
|
-
//> grant_type === client_credentials or x509
|
|
29
|
-
const roles = ['system-user']
|
|
30
|
-
if (clientid === credentials.clientid) roles.push('internal-user')
|
|
31
|
-
return new cds.User({ id: 'system', roles, tokenInfo })
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// add all unknown attributes to req.user.attr in order to keep public API small
|
|
35
|
-
const attr = Object.keys(payload)
|
|
36
|
-
.filter(k => !KNOWN_CLAIMS.has(k))
|
|
37
|
-
.reduce((attr, k) => { attr[k] = payload[k]; return attr }, {})
|
|
38
|
-
|
|
39
|
-
// same api as xsuaa-auth for easier migration
|
|
40
|
-
if (attr.user_name) attr.logonName = attr.user_name
|
|
41
|
-
if (attr.given_name) attr.givenName = attr.given_name
|
|
42
|
-
if (attr.family_name) attr.familyName = attr.family_name
|
|
43
|
-
|
|
44
|
-
return new cds.User({ id: payload.sub, attr, tokenInfo })
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return (req, _, next) => {
|
|
48
|
-
if (!req.headers.authorization) return next()
|
|
49
|
-
|
|
50
|
-
const token = req.headers.authorization?.split(/^bearer /i)[1]
|
|
51
|
-
xssec.createSecurityContext(token, credentials, 'IAS', function (err, securityContext, tokenInfo) {
|
|
52
|
-
if (err) {
|
|
53
|
-
const level = (err.statusCode >= 400 && err.statusCode < 500) ? 'warn' : 'error'
|
|
54
|
-
LOG[level]('User could not be authenticated due to error:', err)
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
if (!securityContext) return next(new cds.error('Unauthorized', { code: 401 }))
|
|
58
|
-
|
|
59
|
-
const ctx = cds.context
|
|
60
|
-
ctx.user = getUser(tokenInfo)
|
|
61
|
-
ctx.tenant = tokenInfo.getZoneId()
|
|
62
|
-
|
|
63
|
-
req.authInfo = securityContext //> compat req.authInfo
|
|
64
|
-
|
|
65
|
-
next()
|
|
66
|
-
})
|
|
67
|
-
}
|
|
68
|
-
}
|
package/lib/auth/ias-claims.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
module.exports = Object.values({
|
|
2
|
-
/*
|
|
3
|
-
* JWT claims (https://datatracker.ietf.org/doc/html/rfc7519#section-4)
|
|
4
|
-
*/
|
|
5
|
-
ISSUER: 'iss',
|
|
6
|
-
SUBJECT: 'sub',
|
|
7
|
-
AUDIENCE: 'aud',
|
|
8
|
-
EXPIRATION_TIME: 'exp',
|
|
9
|
-
NOT_BEFORE: 'nbf',
|
|
10
|
-
ISSUED_AT: 'iat',
|
|
11
|
-
JWT_ID: 'jti',
|
|
12
|
-
/*
|
|
13
|
-
* TokenClaims (com.sap.cloud.security.token.TokenClaims)
|
|
14
|
-
*/
|
|
15
|
-
// ISSUER: "iss", //> already in JWT claims
|
|
16
|
-
IAS_ISSUER: 'ias_iss',
|
|
17
|
-
// EXPIRATION: "exp", //> already in JWT claims
|
|
18
|
-
// AUDIENCE: "aud", //> already in JWT claims
|
|
19
|
-
// NOT_BEFORE: "nbf", //> already in JWT claims
|
|
20
|
-
// SUBJECT: "sub", //> already in JWT claims
|
|
21
|
-
// USER_NAME: 'user_name', //> do not exclude
|
|
22
|
-
// GIVEN_NAME: 'given_name', //> do not exclude
|
|
23
|
-
// FAMILY_NAME: 'family_name', //> do not exclude
|
|
24
|
-
// EMAIL: 'email', //> do not exclude
|
|
25
|
-
SAP_GLOBAL_SCIM_ID: 'scim_id',
|
|
26
|
-
SAP_GLOBAL_USER_ID: 'user_uuid', //> exclude for now
|
|
27
|
-
SAP_GLOBAL_ZONE_ID: 'zone_uuid',
|
|
28
|
-
// GROUPS: 'groups', //> do not exclude
|
|
29
|
-
AUTHORIZATION_PARTY: 'azp',
|
|
30
|
-
CNF: 'cnf',
|
|
31
|
-
CNF_X5T: 'x5t#S256',
|
|
32
|
-
// own
|
|
33
|
-
APP_TENANT_ID: 'app_tid'
|
|
34
|
-
})
|