{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./.fable/fable-library.3.1.12/Util.js","webpack:///./.fable/fable-library.3.1.12/Types.js","webpack:///./.fable/fable-library.3.1.12/Reflection.js","webpack:///../TryTheseGames.Website.Shared/Shared.fs.js","webpack:///./.fable/fable-library.3.1.12/Option.js","webpack:///./.fable/fable-library.3.1.12/Int32.js","webpack:///./.fable/fable-library.3.1.12/Double.js","webpack:///./Helpers.fs.js","webpack:///./.fable/fable-library.3.1.12/Numeric.js","webpack:///./.fable/fable-library.3.1.12/lib/long.js","webpack:///./.fable/fable-library.3.1.12/Long.js","webpack:///./.fable/fable-library.3.1.12/Date.js","webpack:///./.fable/fable-library.3.1.12/RegExp.js","webpack:///./.fable/fable-library.3.1.12/String.js","webpack:///./.fable/fable-library.3.1.12/Array.js","webpack:///./.fable/fable-library.3.1.12/List.js","webpack:///./.fable/fable-library.3.1.12/AsyncBuilder.js","webpack:///./.fable/fable-library.3.1.12/Choice.js","webpack:///./.fable/fable-library.3.1.12/Async.js","webpack:///./.fable/Fable.Elmish.3.1.0/prelude.fs.js","webpack:///./.fable/Fable.Elmish.3.1.0/cmd.fs.js","webpack:///./.fable/Fable.Promise.2.2.2/Promise.fs.js","webpack:///./.fable/fable-library.3.1.12/FSharp.Collections.js","webpack:///./.fable/fable-library.3.1.12/System.Text.js","webpack:///./.fable/fable-library.3.1.12/FSharp.Core.js","webpack:///./.fable/fable-library.3.1.12/Seq.js","webpack:///./Debounce.fs.js","webpack:///./.fable/fable-library.3.1.12/MapUtil.js","webpack:///./.fable/Thoth.Json.6.0.0/Types.fs.js","webpack:///./.fable/fable-library.3.1.12/Guid.js","webpack:///./.fable/fable-library.3.1.12/BigInt/n.js","webpack:///./.fable/fable-library.3.1.12/lib/big.js","webpack:///./.fable/fable-library.3.1.12/Decimal.js","webpack:///./.fable/fable-library.3.1.12/BigInt/z.js","webpack:///./.fable/fable-library.3.1.12/BigInt.js","webpack:///./.fable/fable-library.3.1.12/DateOffset.js","webpack:///./.fable/fable-library.3.1.12/TimeSpan.js","webpack:///./.fable/fable-library.3.1.12/Map.js","webpack:///./.fable/fable-library.3.1.12/Set.js","webpack:///./.fable/Thoth.Json.6.0.0/Decode.fs.js","webpack:///./.fable/Fable.Fetch.2.3.1/Fetch.fs.js","webpack:///./FetchHelpers.fs.js","webpack:///./.fable/fable-library.3.1.12/Range.js","webpack:///./.fable/Fable.Elmish.3.1.0/ring.fs.js","webpack:///./.fable/Fable.Elmish.3.1.0/program.fs.js","webpack:///./.fable/Fable.Elmish.Browser.3.0.4/navigation.fs.js","webpack:///./.fable/Fable.Elmish.Browser.3.0.4/prelude.fs.js","webpack:///./.fable/Fable.Elmish.Browser.3.0.4/parser.fs.js","webpack:///./Pages.fs.js","webpack:///./.fable/Feliz.1.49.0/Interop.fs.js","webpack:///./.fable/Feliz.Bulma.2.17.0/ElementBuilders.fs.js","webpack:///./.fable/Fable.React.7.4.1/Fable.React.Props.fs.js","webpack:///./.fable/Fable.FontAwesome.2.0.0/FontAwesome.fs.js","webpack:///./Recommendations/GameSearcher.fs.js","webpack:///./.fable/Fable.React.7.4.1/Fable.React.Extensions.fs.js","webpack:///./Recommendations/RecommendationFilter.fs.js","webpack:///./.fable/Feliz.1.49.0/React.fs.js","webpack:///./.fable/Feliz.1.49.0/ReactInterop.js","webpack:///./DateFormat.fs.js","webpack:///./.fable/Fable.Recharts.1.1.2/Fable.Recharts.fs.js","webpack:///./Components.fs.js","webpack:///./PushStateLink.fs.js","webpack:///./Recommendations/RecommendationsPage.fs.js","webpack:///./Modals.fs.js","webpack:///./Ranking/RankingFilter.fs.js","webpack:///./.fable/Fable.React.7.4.1/Fable.React.Helpers.fs.js","webpack:///./Ranking/RankingPage.fs.js","webpack:///./.fable/Fable.Elmish.React.3.0.1/common.fs.js","webpack:///./.fable/Fable.Elmish.React.3.0.1/react.fs.js","webpack:///./App.fs.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","0","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","isArrayLike","x","Array","isArray","ArrayBuffer","isView","isHashable","GetHashCode","sameConstructor","y","getPrototypeOf","constructor","Enumerator","iter","this","current","cur","next","done","Error","getEnumerator","GetEnumerator","iterator","toIterator","en","hasNext","undefined","padWithZeros","str","toString","dateOffset","date","date1","offset","kind","getTimezoneOffset","int32ToString","radix","ObjectRef","idMap","has","set","count","stringHash","h","len","charCodeAt","numberHash","combineHashCodes","hashes","reduce","h1","h2","structuralHash","arrayHash","Date","getTime","dateHash","values","map","v","id","equalArraysWith","eq","equalArrays","equals","Equals","isEquatable","compareDates","xKeys","keys","yKeys","sort","equalObjects","xtime","ytime","comparePrimitives","compareArrays","comp","compareArraysWith","compare","CompareTo","isComparable","compareObjects","min","comparer","max","createObj","fields","obj","kv","WeakMap","uncurry","arity","f","uncurriedFn","a1","a2","a3","a4","a5","a6","a7","a8","curry","partialApply","args","concat","mapCurriedArgs","fn","mappings","arg","mapArg","idx","mapping","expectedArity","actualArity","res","seqToString","self","callStack","cons","entries","join","String","Union","cases","tag","fieldStr","withParens","indexOf","unionToString","other","recordToJSON","recordToString","recordGetHashCode","recordEquals","thisNames","recordCompareTo","Record","FSharpRef","contentsOrGetter","setter","CaseInfo","declaringType","TypeInfo","fullname","generics","construct","parent","enumCases","fullName","getHashCode","getGenerics","fullnameHash","genHashes","t1","t2","getRecordElements","k1","v1","k2","v2","class_type","record_type","union_type","caseNames","tuple_type","lambda_type","argType","returnType","option_type","generic","list_type","array_type","obj_type","unit_type","string_type","bool_type","int32_type","float64_type","info","lastIndexOf","substr","gen","endsWith","isEnum","getEnumValues","getEnumCase","parseEnum","parseInt","isNaN","getUnionCases","isTuple","startsWith","makeUnion","uci","expectedLength","RecommendationQuery","GameId","HideLinkedItems","HideMatchingDesigners","Players","HasMechanic","HasCategory","MinPlayingTime","MaxPlayingTime","PublishedBeforeYear","PublishedAfterYear","Skip","Mechanic","Id","Name","Mechanic$reflection","Category","Category$reflection","BoardGame","Thumbnail","YearPublished","MinPlayers","MaxPlayers","AlternativeName","RatingTrendCoefficients","RatingTrendStartDate","RatingTrendEndDate","MechanicIds","CategoryIds","BoardGame$reflection","TimeTrendData","TimeTrendData$reflection","BoardGameRecommendation","GameScore","UserScore","LikeScore","Strength","Surety","BoardGameRecommendation$reflection","RankedBoardGame","Rank","BggRank","TtgRating","GeekRating","RankedBoardGame$reflection","RankingTimePeriod","RankingTimePeriod$reflection","NewGameAdjustment","NewGameAdjustment$reflection","RankingQuery","TimePeriod","PseudoRaters","PlayerCount","MinPlayTime","MaxPlayTime","MinPublishYear","MaxPublishYear","Page$1","PageSize","TotalCount","Items","Page$1$reflection","gen0","Some","some","toArray","opt","defaultArg","defaultValue","binder","NumberStyles","getRange","unsigned","bitsize","isValid","style","exec","replace","prefix","digits","getInvalidDigits","AllowHexSpecifier","getRadix","test","regexMatch","sign","validResponse","parse","Number","umin","umax","tryParse","defValue","contents","_a","op_UnaryNegation_Int32","AsyncOperation$1","AsyncOperation$1$reflection","Deferred$1","Deferred$1$reflection","CancellableDeferred$1","CancellableDeferred$1$reflection","CancellablePagedDeferred$1","CancellablePagedDeferred$1$reflection","toQueryString","excludeKeys","queryComponents","filter","includes","encodeURIComponent","Option_toString","intTryParse","matchValue","outArg","Float_toFixed","dps","toFixed","symbol","isNumeric","multiply","dp","toPrecision","sd","toExponential","toHex","wasm","WebAssembly","Instance","Module","Uint8Array","e","Long","low","high","isLong","toJSON","fromBytes","toBytes","__isLong__","INT_CACHE","UINT_CACHE","fromInt","cachedObj","cache","fromBits","fromNumber","UZERO","ZERO","TWO_PWR_64_DBL","MAX_UNSIGNED_VALUE","TWO_PWR_63_DBL","MIN_VALUE","MAX_VALUE","negate","TWO_PWR_32_DBL","lowBits","highBits","pow_dbl","Math","pow","fromString","RangeError","substring","radixToPower","size","add","fromValue","val","TWO_PWR_16_DBL","TWO_PWR_24","ONE","UONE","NEG_ONE","toInt","$this","toNumber","isZero","isNegative","radixLong","div","divide","rem1","subtract","rem","remDiv","isOdd","lessThan","greaterThan","greaterThanOrEqual","thisNeg","otherNeg","not","addend","a48","a32","a16","a00","b48","b32","b16","c48","c32","c16","c00","subtrahend","multiplier","mul","get_high","b00","divisor","approx","div_u","div_s","toUnsigned","shiftRightUnsigned","shiftLeft","shiftRight","floor","log2","ceil","log","LN2","delta","approxRes","approxRem","numBits","le","hi","lo","toBytesLE","toBytesBE","bytes","fromBytesLE","fromBytesBE","LongLib","op_Addition","op_Multiply","op_Division","op_Modulus","rem_u","rem_s","op_UnaryNegation","op_BitwiseAnd","fromInteger","xh","offsetRegex","dateOffsetToString","isMinus","minutes","abs","dateToHalfUTCString","half","toISOString","dateToStringWithCustomFormat","format","utc","match","rep","NaN","getUTCFullYear","getFullYear","getUTCMonth","getMonth","getUTCDate","getDate","getUTCHours","getHours","getUTCMinutes","getMinutes","getUTCSeconds","getSeconds","getUTCMilliseconds","getMilliseconds","dateToStringWithOffset","_b","_c","dateWithOffset","dateToStringWithKind","toUTCString","toLocaleString","toLocaleDateString","toLocaleTimeString","printOffset","dateToISOString","_provider","DateTime","parseRaw","input","trim","baseDate","timeInSeconds","timeParts","split","parseFloat","toUpperCase","offsetParts","offsetInMinutes","detectUTC","_err","now","day","hour","minute","month","second","year","dayOfWeek","getUTCDay","getDay","ts","newDate","oldTzOffset","newTzOffset","op_Subtraction","that","pattern","options","flags","RegExp","escape","matches","reg","lastIndex","global","replacement","limit","replacer","arguments","withGroups","pLast","index","groups","tmp","_s","sub1","_matches","sub2","fsFormatRegExp","interpolateRegExp","formatRegExp","isLessThan","numericCompare","printf","cont","strParts","strIdx","matchIndex","createPrinter","_strParts","_result","padArg","_padLength","precision","padLength","formatReplacement","interpolate","valIdx","continuePrint","toText","toFail","toLowerCase","dateToString","zeroFlag","minusFlag","ch","padLeft","_","intPart","decimalPart","delimiter","xs","from","isRight","splitters","removeEmpty","splits","startIndex","Helpers_allocateArrayFromCons","differentLengths","fill","target","targetIndex","start","source","contains","array","i_mut","loop","initialize","initializer","fold","folder","state","delegateArg0","delegateArg1","equalsWith","array1","array2","length1","length2","compareWith","e1","e2","foldBack","reduceRight","foldBack2","acc","foldBackIndexed2","_arg1","reduction","reduction_1","FSharpList","head","tail","xs_1_mut","ys_1_mut","xs_1","ys_1","xt","yt","h_mut","_key","ListEnumerator$1","ListEnumerator$1_$ctor_3002E699","it","FSharpList_get_Empty","FSharpList_Cons_305B8EAC","FSharpList__get_IsEmpty","FSharpList__get_Length","FSharpList__get_Head","SR_inputListWasEmpty","FSharpList__get_Tail","empty","singleton","isEmpty","reverse","fold2","ys","iterate","action","unitVar0","ofArrayWithTail","tail_1","ofArray","ofSeq","xs_3","root","node","enumerator","Dispose","xs_5","t_2","append","collect","zs","tryPick","tryFind","replicate","xs_2","zip","map2","CancellationToken","cancelled","_id","_cancelled","_listeners","Map","listener","$","addListener","removeListener","OperationCanceledError","setPrototypeOf","protectedCont","ctx","cancelToken","isCancelled","onCancel","trampoline","incrementAndCheck","hijack","err","onError","protectedBind","computation","onSuccess","ex","protectedReturn","computation1","computation2","Bind","generator","sequence","body","While","Delay","compensation","catchHandler","ex2","resource","TryFinally","guard","Return","FSharpResult$2","Result_Map","Log_onError","text","console","error","Cmd_exec","dispatch","cmd","Cmd_none","Cmd_map","g","arg_1","Cmd_batch","cmds","lists","forEach","xs_6","Cmd_OfFunc_result","msg","Cmd_OfPromise_either","task","ofSuccess","ofError","then","arg_3","reject","reason","Promise","PromiseBuilder","ComparisonIdentity_Structural","Compare","x_1","LanguagePrimitives_FastGenericComparer","SR_notEnoughElements","Enumerator_notStarted","Enumerator_alreadyFinished","Enumerator_Seq","Enumerator_FromFunctions$1","dispose","Enumerator_noReset","Enumerator_FromFunctions$1_$ctor_58C54629","Enumerator_enumerateThenFinally","Enumerator_generateWhileSome","openf","compute","closef","started","curr","value_1","finish","matchValue_1","checkNonNull","argName","Operators_NullArg","mkSeq","Enumerator_Seq_$ctor_673A07F2","delay","sources","outerOpt","innerOpt","finished","inner","outer","inner_1","outer_1","ie","Enumerator_concat","unfold","st_1","Enumerator_unfold","ar","toArray_1","toList","ofArray_1","ofSeq_1","generate","generateIndexed","choose","chooser","e_1","found","skip","Model$1","Input","Output","OutputDone","Model$1__get_TimeUntilOutput","this$","Msg$1","delayCmd","resolve","setTimeout","f1","f2","er","er_1","catch","er_2","er_3","success","fail","_arg1_1","inputCmd","wrapMsg","updateWithCmd","model","wrapModel","cmdOnOutput","patternInput","updateInternal","cmd$0027","delay_1","CaseRules","dashify","separator","charAt","changeCase","caseRule","keyValueList","definedCaseRule","kvPair","assign","ErrorReason","CaseStrategy","Util_Cache$1","Util_Cache$1_$ctor","Util_Casing_lowerFirst","Util_Casing_convert","caseStrategy","fieldName","guidRegex","guidRegexNoHyphen","guidRegexHex","hyphenateGuid","wsTrimAndLowered","chars","BigNat","bound","BigNatModule_FFT_pow32","x_mut","n_mut","BigNatModule_FFT_maxTwoPower","Int32Array","BigNatModule_bound","BigNatModule_coeff","BigNatModule_coeff64","BigNatModule_setCoeff","BigNatModule_pow64","BigNatModule_pow32","BigNatModule_baseNi64","BigNatModule_baseMaski64","BigNatModule_createN","b","BigNatModule_normN","na_mut","na","findLeastBound","BigNatModule_embed","r_1","BigNatModule_boundInt","BigNatModule_eval32","BigNatModule_one","BigNatModule_zero","BigNatModule_degree","BigNatModule_isZero","BigNatModule_equal","q","pa_mut","qa_mut","pa","qa","check","BigNatModule_compare","BigNatModule_lt","BigNatModule_mulSchoolBookCarry","r_mut","c_mut","k_mut","k","rak","BigNatModule_mulSchoolBookOneSmall","bp","q_1","BigNatModule_mulSchoolBook","pSmall","qSmall","BigNatModule_mulSchoolBookBothSmall","ra","pai","qaj","BigNatModule_mulSchoolBookNeitherSmall","BigNatModule_encoding","bigL","twoToBigL","bigK","bigN","BigNatModule_mkEncoding","BigNatModule_table","BigNatModule_mul","BigNatModule_scaleSubInPlace","a","patternInput_1","ad","a_1","f_1","z","zLo","zHi","BigNatModule_scaleAddInPlace","BigNatModule_removeFactor","degx","dega","pn","qn","xa","aa","qai","BigNatModule_divmod","BigNatModule_copyN","BigNatModule_ofInt32","BigNatModule_ofInt64","BigNatModule_boundInt64","BigNatModule_embed64","BigNatModule_toString","degn","digits_4","isLeading_mut","digits_mut","n_1_mut","_arg1_mut","isLeading","n_1","n_2","prior_1","nL","nH","prior_mut","ten2k_mut","prior","ten2k","route","BigNatModule_isSmall","BigNatModule_getSmall","P","_this","cmp","NAME","INVALID","INVALID_DP","NUMERIC","nl","search","round","Big","DP","RM","rm","more","xc","findIndex","xci","unshift","pop","stringify","doExponential","isNonzero","isneg","yc","bl","bt","ri","bz","ai","al","rl","qc","qi","gt","gte","lt","lte","minus","sub","xlty","plus","xe","ye","mod","ygtx","times","one","prec","sqrt","NE","PE","strict","valueOf","_Big_","normalize","TypeError","Decimal","BigInteger","signInt","BigInteger__get_SignInt","BigInteger__get_V","BigInteger_op_Equality_56F059C0","BigNatModule_hash","nn","BigInteger_op_LessThan_56F059C0","BigInteger_$ctor_Z2BE94A1","BigInteger_nat_Z67CCE57D","smallLim","smallPosTab","BigInteger_$ctor_Z524259A4","BigInteger_get_One","BigInteger_get_Two","two","BigInteger_get_Zero","zero","DateTimeOffset","checkOffsetInRange","offsetMatch","signedRound","ms","fromTicks","ticks","days","firstDot","firstColon","MapTreeLeaf$2","MapTreeLeaf$2_$ctor_5BDDA1","MapTreeLeaf$2__get_Key","MapTreeLeaf$2__get_Value","MapTreeNode$2","left","right","MapTreeNode$2_$ctor_499A11FD","MapTreeNode$2__get_Left","MapTreeNode$2__get_Right","MapTreeNode$2__get_Height","MapTreeModule_size","MapTreeModule_sizeAux","acc_mut","m_mut","m2","MapTreeModule_mk","hl","hr","m_2","MapTreeModule_rebalance","m2_2","m_3","m2_3","t1h","t2h","matchValue_2","matchValue_3","MapTreeModule_add","MapTreeModule_empty","MapTreeModule_tryFind","comparer_mut","MapTreeModule_iter","MapTreeModule_iterOpt","f_mut","MapTreeModule_mapi","MapTreeModule_mapiOpt","l2","r2","MapTreeModule_copyToArray","arr","MapTreeModule_ofArray","forLoopVar","MapTreeModule_ofSeq","fold_1","tupledArg","MapTreeModule_ofList","e_mut","MapTreeModule_mkFromEnumerator","MapTreeModule_MapIterator$2","stack","MapTreeModule_collapseLHS","stack_mut","isEmpty_1","empty_1","rest","MapTreeModule_mkIterator","MapTreeModule_current","MapTreeModule_alreadyFinished","MapTreeModule_notStarted","MapTreeModule_mkIEnumerator","MapTreeModule_moveNext","FSharpMap","tree","combineHash","activePatternResult5257","FSharpMap__ComputeHashCode","m1","e1c","e2c","map_1","b1","b2","kvp1","kvp2","FSharpMap__ContainsKey","FSharpMap__get_Item","FSharpMap__get_Count","thisArg","iterate_1","FSharpMap_$ctor","FSharpMap_Create","MapTreeModule_find","MapTreeModule_mem","table","FSharpMap__Add","FSharpMap__TryFind","elements","SetTreeLeaf$1","SetTreeLeaf$1_$ctor_2B595","SetTreeLeaf$1__get_Key","SetTreeNode$1","SetTreeNode$1_$ctor_Z6E7BE5F7","SetTreeNode$1__get_Left","SetTreeNode$1__get_Right","SetTreeNode$1__get_Height","SetTreeModule_count","SetTreeModule_countAux","t_mut","SetTreeModule_mk","SetTreeModule_rebalance","t2_3","t_3","t2_4","SetTreeModule_add","c_1","SetTreeModule_empty","SetTreeModule_mem","SetTreeModule_iter","SetTreeModule_SetIterator$1","SetTreeModule_collapseLHS","x2","SetTreeModule_mkIterator","singleton_1","SetTreeModule_current","SetTreeModule_alreadyFinished","SetTreeModule_notStarted","SetTreeModule_mkIEnumerator","SetTreeModule_moveNext","SetTreeModule_compare","l1_mut","l2_mut","SetTreeModule_compareStacks","l1","x1_3","x2_3","pattern_matching_result","t1_6","x1_4","t2_6","x2_4","matchValue_4","pattern_matching_result_1","t1_7","x1_5","t2_7","x2_5","c_3","c_2","matchValue_5","pattern_matching_result_2","t1_8","x1_6","t2_8","x2_6","pattern_matching_result_3","t1_2","x1","t2_2","x2_1","pattern_matching_result_4","t1_4","x1_2","x2_2","SetTreeModule_copyToArray","SetTreeModule_ofArray","SetTreeModule_ofSeq","fold_2","SetTreeModule_ofList","SetTreeModule_mkFromEnumerator","FSharpSet","FSharpSet__ComputeHashCode","FSharpSet__get_Comparer","FSharpSet__get_Tree","FSharpSet__get_Count","FSharpSet__Contains","FSharpSet_$ctor","set$","genericMsg","newLine","JSON","errorToString","path","reason_1","decoder","SyntaxError","message","sbyte","value_2","path_1","value_3","value_4","isFinite","tryParse_3","byte","int16","name_1","uint16","int","uint32","datetime","tryParse_6","datetimeOffset","tryParse_7","requestedIndex","copyOfStruct","currentPath","vArray","list","list_1","tokens","acc_1","succeed","output","_arg2","andThen","cb","ctor","d1","tuple2","decoder1","decoder2","decoder_3","path_3","decoder_2","decoder_1","path_2","arg10$0040","arg20$0040","mixedArray","decoders","arg30","arg10","extra","predicate","name_3","find","uci_1","makeUnion_1","values_1","map_2","fi","autoDecoder","getUnionCaseFields","autoDecodeRecordsAndUnions","isOptional","decoderRef","extra_1","isRecord","makeRecord","decoderInfos","autoObject","isUnion","decoder_15","tryFind_1","getElementType","enumType","getEnumUnderlyingType","value_5","enumValue","path_4","value_7","path_5","value_8","enumValue_1","y_1","path_6","value_10","t_4","path_7","value_11","enumValue_2","x_2","y_2","path_8","value_13","t_5","path_9","value_14","enumValue_3","x_3","y_3","path_10","value_16","t_6","path_11","value_17","enumValue_4","x_4","y_4","path_12","value_19","t_7","path_13","value_20","matchValue_6","enumValue_5","x_5","y_5","clo2","arg20","clo3","isGenericType","t_8","getTupleElements","path_14","value_21","fullname_1","getGenericTypeDefinition","decoder_13","path_15","value_22","arg0","option","decoder_14","path_16","value_23","keyDecoder","valueDecoder","decoders_1","path_17","value_24","autoObject2","path_18","value_25","path_19","value_26","decoders_1_mut","errors_mut","errors","head_1","append_1","runner","oneOf","path_20","value_28","decoder_16","path_21","value_29","matchValue_7","ofSeq_2","path_22","value_31","path_23","value_32","path_24","value_33","path_25","value_34","path_26","value_35","path_27","value_36","path_28","value_37","path_29","value_38","tryParse_8","timespan","path_30","value_39","tryParse_2","guid","_arg1_6","makeExtra","map_3","Coders","Auto_generateBoxedDecoder_79988AEF","caseStrategy_1","Types_RequestProperties","fetchAs","url","pr_1","props","abortController","AbortController","fetch","signal","response","ok","json","status","statusText","abort","integralRangeStep","step","stop","stepFn","stepComparedWithZero","stepGreaterThanZero","comparedWithLast","makeRangeStepFunction","rangeDouble","RingState$1","RingBuffer$1","RingBuffer$1__Push_2B595","__","item","wix_1","rix","items_1","wix$0027","ix","items","RingBuffer$1__doubleSize","wix","Program$4","init","update","subscribe","view","setState","syncDispatch","ProgramModule_withSetState","program","ProgramModule_view","ProgramModule_runWith","rb","reentered","nextMsg","msg_1","model$0027","ex_1","rix$0027","RingBuffer$1__Pop","ex_3","ex_2","Navigable$1","ProgramModule_Internal_onChangeRef","ProgramModule_Internal_toNavigableWith","parser","urlUpdate","onLocationChange","mapInit","mapUpdate","mapView","mapSetState","mapSubscribe","ProgramModule_map","userInit","unitVar1","location","userUpdate","model_1","userView","model_4","dispatch_1","userSetState","model_3","userSubscribe","model_2","arg0_1","ofFunc","State$1","visited","unvisited","StateModule_mkState","custom","tipe","stringToSomething","str_1","subValue","parse_1","StateModule_map","states_mut","parseHelp","states","segments","segments_1","splitUrl","toKeyValuePair","segment","b_1","tuple","decodeURIComponent","parseParams","querystring","Page","toPath","parseBefore","parsers","pageParser","state_1","i32","state_3","urlParser","pathname","parsePath","Interop_reactApi","react","Helpers_extractClasses","classes","Helpers_combineClasses","cn","DOMAttr","HTMLAttr","Helpers_classes","std","booleans","complete_1","complete","Fa_ISize","Fa_IconOption","Fa_ofSize","Fa_IconOptions","Icon","Size","Border","Pull","HaveSpin","HavePulse","Rotation","Flip","IsInverse","Props","FixedWidth","IsLi","StackSize","CustomClass","Fa_toIconOptions","faOptions","Fa_displayIcon","baseElement","baseClass","opts","children","Fa_i","children_1","Fa_span","Fa_Stack_Option","Fa_Stack_Options","Fa_stack","Model","SearchText","GameOptions","ShowOptions","DebouncedSearchText","AutoFocus","Msg","boardGameListDecoder","autoFocus","init_1","currentModel","query","searchGames","newUrl","history","replaceState","inputRef","atom","isSetter","createAtom","render","props_2","Children","createElement","react$002Dautosuggest","suggestions","onSuggestionsFetchRequested","onSuggestionsClearRequested","getSuggestionValue","suggestion","renderSuggestion","game","details","props_1","alternativeNameString","itemClassNames","isHighlighted","className","backgroundImage","backgroundSize","onSuggestionSelected","delegateArg0_1","delegateArg1_1","inputProps","placeholder","ref","onChange","delegateArg0_2","delegateArg1_2","newValue","method","_arg4","focus","Browser_Types_Event__Event_get_Value","Filter","MobileFilterOpen","Mechanics","Categories","SelectedGameMechanicIds","SelectedGameCategoryIds","emptyFilter","props_14","props_12","children_2","props_20","props_18","children_4","props_26","props_24","children_6","props_33","props_31","children_8","props_39","props_37","children_12","props_54","children_10","children_16","props_68","children_14","props_78","onClick","ev","checked","htmlFor","ev_1","ev_2","ev_3","ev_4","ev_5","ev_6","label","m_1","m_4","c_5","c_4","_arg3","ReactInterop_useEffectWithDeps","getDisposable","deps","useEffectReact","disposable","Internal_memo_Z603636D8","renderElement","areEqual","withKey","memoElementType","memo","displayName","Internal_propsWithKey","React_createDisposable_3A5B6456","useReact_useEffect_Z101E1A95","effect","dependencies","React_memo_62A0F746","useState","useFeliz_React__React_useState_Static_1505","initial","Months","January","February","March","April","May","June","July","August","September","October","November","December","DaysOfWeek","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday","Date$","AbbreviatedMonths","Days","AbbreviatedDays","DefaultFormat","FirstDayOfTheWeek","Time","AM","PM","Localization","fromDayOfWeek","local","mod12","fromMonth","toString_1","padWith","takeLastChars","localFormat","formatString","token","day_2","month_2","year_1","getCharAtIndex","Props_Margin","top","bottom","Props_Chart","Props_Cartesian","Input_NonEmptyNumber","valueStr","Value","updateInternalValue","internalValue","updateEditing","OnChange","tryParse_1","Step","timeTrend","unixTimeOr0","offset2","fromDate","toUnixDay","unixSeconds","formatDate","trendData","props_10","props_8","lowerBound","rating","Float64Array","upperBound","min_1","x_6","x_7","ResponsiveContainer","aspect","LineChart","Line","dot","type","dataKey","stroke","strokeWidth","isAnimationActive","CartesianGrid","strokeDasharray","XAxis","interval","tickSize","tickMargin","YAxis","coeffs","end$0027","coeffsF","startDate","endDate","startValue","endValue","end$0027_1","start_1","labels","goToUrl","href","preventDefault","pushState","dispatchEvent","CustomEvent","viewLink","page","viewLinkButton","SelectedGame","TimeTrend","MoreInfoModalActive","GlossaryModalActive","GameSearcher","RecommendationFilter","SelectedGameId","Recommendations","mechanicsDecoder","getMechanicsCmd","arg0_2","categoriesDecoder","getCategoriesCmd","gameDecoder","timeTrendDecoder","gameId","recommendationDecoder","mapToSelectedGame","patternInput_2","inputRecord","inputRecord_1","inputRecord_2","inputRecord_3","inputRecord_4","inputRecord_5","inputRecord_6","inputRecord_7","inputRecord_8","update_1","newState_2","cmd_4","rs_2","cancel","patternInput_3","getRecommendationsCmd","Filter__ToRecommendationsFilter","cancel_1","Msg_1","Msg_2","patternInput_4","getGameCmd","promotedGame","rs_3","game_1","matchValue_11","game_3","matchValue_8","game_2","matchValue_9","matchValue_10","patternInput_5","getTimeTrendDataCmd","update_2","loadingSpinner","getRangeString","renderStars","num","renderRecommendation","value_45","value_49","value_54","value_72","value_76","thumbnailUrl","src","rel","props_5","elms","render_1","elms_1","value_44","value_48","timeTrend_1","renderSelectedGame","props_16","elms_3","props_27","props_23","props_25","r_2","render_2","isActive","closeDisplay","props_13","moreInfoModal","close","_arg5","props_21","RankingTimePeriod_toDisplayString","NewGameAdjustment_toDisplayString","RankingFilterModel","RankingFilterModel$reflection","withNewTimePeriod","newTimePeriod","RankingTimePeriod_fromString","withNewNewGameAdjustment","newAdjustment","NewGameAdjustment_1","NewGameAdjustment_fromString","withNewPseudoRaters","newPenalty","defThunk","onQueryPropChanged","prop","rankingFilter","props_11","props_29","props_35","props_43","props_41","props_50","props_48","children_18","props_56","children_22","children_20","children_26","props_79","children_24","props_89","OnMobileFilterToggled","OnFilterUpdated","filter_1","_arg1_2","filter_3","v_1","_arg1_4","prop_2","filter_5","filter_7","newCount","withNewPlayerCount","filter_9","newMinPlayTime","withNewMinPlayTime","filter_11","newMaxPlayTime","withNewMaxPlayTime","filter_13","newMinPublishYear","withNewMinPublishYear","filter_15","newMaxPublishYear","withNewMaxPublishYear","e_2","filter_17","newHasMechanic","withNewHasMechanic","e_3","filter_19","newHasCategory","withNewHasCategory","ClearFilter","OnFilter","xValue","Helpers_equalsButFunctions","RankedBoardGames","rankedGameDecoder","rs_1","getGamesCmd","sqrt3","renderHex","width","color","height","halfWidth","halfHeight","borderBottom","borderLeft","borderRight","backgroundColor","borderTop","renderRankRating","renderGame","value_46","value_50","props_3","props_17","props_15","props_36","elms_2","children_3","children_13","children_5","children_7","children_9","children_11","LazyProps$1","equal","Components_LazyView$1","nextProps","_nextState","Component","Common_lazyView2With","Program_Internal_withReactSynchronousUsing","lazyView2With","placeholderId","react$002Ddom","document","getElementById","PageModel","PageModel$reflection","Route","Model$reflection","Msg$reflection","init_2","msg_2","scrollTo","ProgramModule_run","Program_withReactSynchronous","lastLocation","addEventListener","arg10_1","arg10_2","ProgramModule_Internal_subscribe"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG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C,GAAWjB,IAAS,SAACvtB,IA1DxE,SAA0CA,GAC7C,IAAIswC,OAAe,EACnBjiB,GAAsC,SAAC30B,GAcnC,OAXoB,MAAhB42C,GACIA,IAAiB78D,OAAOy7C,SAAS0T,KACP,EAOJ,GAG1B,KAAK,EAED,MAEJ,KAAK,EACD0N,EAAe78D,OAAOy7C,SAAS0T,KACvB5iC,EAAS,IAAIouB,GAAY,EAAG36C,OAAOy7C,aAMvDz7C,OAAO88D,iBAAiB,YAAY,SAACtuB,GACjCoM,GAAmCpM,MAEvCxuC,OAAO88D,iBAAiB,cAAc,SAACC,GACnCniB,GAAmCmiB,MAEvC/8D,OAAO88D,iBAAiB,kBAAkB,SAACE,GACvCpiB,GAAmCoiB,MAuBnCC,CAAiC1wC","file":"app.5602bc6887b9a0e75ccd.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t0: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([364,1]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","// tslint:disable:ban-types\nexport function isIterable(x) {\n return x != null && typeof x === \"object\" && Symbol.iterator in x;\n}\nexport function isArrayLike(x) {\n return Array.isArray(x) || ArrayBuffer.isView(x);\n}\nfunction isComparer(x) {\n return typeof x.Compare === \"function\";\n}\nfunction isComparable(x) {\n return typeof x.CompareTo === \"function\";\n}\nfunction isEquatable(x) {\n return typeof x.Equals === \"function\";\n}\nfunction isHashable(x) {\n return typeof x.GetHashCode === \"function\";\n}\nexport function isDisposable(x) {\n return x != null && typeof x.Dispose === \"function\";\n}\nexport function sameConstructor(x, y) {\n return Object.getPrototypeOf(x).constructor === Object.getPrototypeOf(y).constructor;\n}\nexport class Enumerator {\n constructor(iter) {\n this.iter = iter;\n }\n [\"System.Collections.Generic.IEnumerator`1.get_Current\"]() {\n return this.current;\n }\n [\"System.Collections.IEnumerator.get_Current\"]() {\n return this.current;\n }\n [\"System.Collections.IEnumerator.MoveNext\"]() {\n const cur = this.iter.next();\n this.current = cur.value;\n return !cur.done;\n }\n [\"System.Collections.IEnumerator.Reset\"]() {\n throw new Error(\"JS iterators cannot be reset\");\n }\n Dispose() {\n return;\n }\n}\nexport function getEnumerator(o) {\n return typeof o.GetEnumerator === \"function\"\n ? o.GetEnumerator()\n : new Enumerator(o[Symbol.iterator]());\n}\nexport function toIterator(en) {\n return {\n [Symbol.iterator]() { return this; },\n next() {\n const hasNext = en[\"System.Collections.IEnumerator.MoveNext\"]();\n const current = hasNext ? en[\"System.Collections.IEnumerator.get_Current\"]() : undefined;\n return { done: !hasNext, value: current };\n },\n };\n}\nexport class Comparer {\n constructor(f) {\n this.Compare = f || compare;\n }\n}\nexport function comparerFromEqualityComparer(comparer) {\n // Sometimes IEqualityComparer also implements IComparer\n if (isComparer(comparer)) {\n return new Comparer(comparer.Compare);\n }\n else {\n return new Comparer((x, y) => {\n const xhash = comparer.GetHashCode(x);\n const yhash = comparer.GetHashCode(y);\n if (xhash === yhash) {\n return comparer.Equals(x, y) ? 0 : -1;\n }\n else {\n return xhash < yhash ? -1 : 1;\n }\n });\n }\n}\nexport function assertEqual(actual, expected, msg) {\n if (!equals(actual, expected)) {\n throw Object.assign(new Error(msg || `Expected: ${expected} - Actual: ${actual}`), {\n actual,\n expected,\n });\n }\n}\nexport function assertNotEqual(actual, expected, msg) {\n if (equals(actual, expected)) {\n throw Object.assign(new Error(msg || `Expected: ${expected} - Actual: ${actual}`), {\n actual,\n expected,\n });\n }\n}\nexport class Lazy {\n constructor(factory) {\n this.factory = factory;\n this.isValueCreated = false;\n }\n get Value() {\n if (!this.isValueCreated) {\n this.createdValue = this.factory();\n this.isValueCreated = true;\n }\n return this.createdValue;\n }\n get IsValueCreated() {\n return this.isValueCreated;\n }\n}\nexport function lazyFromValue(v) {\n return new Lazy(() => v);\n}\nexport function padWithZeros(i, length) {\n let str = i.toString(10);\n while (str.length < length) {\n str = \"0\" + str;\n }\n return str;\n}\nexport function padLeftAndRightWithZeros(i, lengthLeft, lengthRight) {\n let str = i.toString(10);\n while (str.length < lengthLeft) {\n str = \"0\" + str;\n }\n while (str.length < lengthRight) {\n str = str + \"0\";\n }\n return str;\n}\nexport function dateOffset(date) {\n const date1 = date;\n return typeof date1.offset === \"number\"\n ? date1.offset\n : (date.kind === 1 /* UTC */\n ? 0 : date.getTimezoneOffset() * -60000);\n}\nexport function int16ToString(i, radix) {\n i = i < 0 && radix != null && radix !== 10 ? 0xFFFF + i + 1 : i;\n return i.toString(radix);\n}\nexport function int32ToString(i, radix) {\n i = i < 0 && radix != null && radix !== 10 ? 0xFFFFFFFF + i + 1 : i;\n return i.toString(radix);\n}\nexport class ObjectRef {\n static id(o) {\n if (!ObjectRef.idMap.has(o)) {\n ObjectRef.idMap.set(o, ++ObjectRef.count);\n }\n return ObjectRef.idMap.get(o);\n }\n}\nObjectRef.idMap = new WeakMap();\nObjectRef.count = 0;\nexport function stringHash(s) {\n let i = 0;\n let h = 5381;\n const len = s.length;\n while (i < len) {\n h = (h * 33) ^ s.charCodeAt(i++);\n }\n return h;\n}\nexport function numberHash(x) {\n return x * 2654435761 | 0;\n}\n// From https://stackoverflow.com/a/37449594\nexport function combineHashCodes(hashes) {\n if (hashes.length === 0) {\n return 0;\n }\n return hashes.reduce((h1, h2) => {\n return ((h1 << 5) + h1) ^ h2;\n });\n}\nexport function physicalHash(x) {\n if (x == null) {\n return 0;\n }\n switch (typeof x) {\n case \"boolean\":\n return x ? 1 : 0;\n case \"number\":\n return numberHash(x);\n case \"string\":\n return stringHash(x);\n default:\n return numberHash(ObjectRef.id(x));\n }\n}\nexport function identityHash(x) {\n if (x == null) {\n return 0;\n }\n else if (isHashable(x)) {\n return x.GetHashCode();\n }\n else {\n return physicalHash(x);\n }\n}\nexport function dateHash(x) {\n return x.getTime();\n}\nexport function arrayHash(x) {\n const len = x.length;\n const hashes = new Array(len);\n for (let i = 0; i < len; i++) {\n hashes[i] = structuralHash(x[i]);\n }\n return combineHashCodes(hashes);\n}\nexport function structuralHash(x) {\n if (x == null) {\n return 0;\n }\n switch (typeof x) {\n case \"boolean\":\n return x ? 1 : 0;\n case \"number\":\n return numberHash(x);\n case \"string\":\n return stringHash(x);\n default: {\n if (isHashable(x)) {\n return x.GetHashCode();\n }\n else if (isArrayLike(x)) {\n return arrayHash(x);\n }\n else if (x instanceof Date) {\n return dateHash(x);\n }\n else if (Object.getPrototypeOf(x).constructor === Object) {\n // TODO: check call-stack to prevent cyclic objects?\n const hashes = Object.values(x).map((v) => structuralHash(v));\n return combineHashCodes(hashes);\n }\n else {\n // Classes don't implement GetHashCode by default, but must use identity hashing\n return numberHash(ObjectRef.id(x));\n // return stringHash(String(x));\n }\n }\n }\n}\n// Intended for custom numeric types, like long or decimal\nexport function fastStructuralHash(x) {\n return stringHash(String(x));\n}\n// Intended for declared types that may or may not implement GetHashCode\nexport function safeHash(x) {\n return x == null ? 0 : isHashable(x) ? x.GetHashCode() : numberHash(ObjectRef.id(x));\n}\nexport function equalArraysWith(x, y, eq) {\n if (x == null) {\n return y == null;\n }\n if (y == null) {\n return false;\n }\n if (x.length !== y.length) {\n return false;\n }\n for (let i = 0; i < x.length; i++) {\n if (!eq(x[i], y[i])) {\n return false;\n }\n }\n return true;\n}\nexport function equalArrays(x, y) {\n return equalArraysWith(x, y, equals);\n}\nfunction equalObjects(x, y) {\n const xKeys = Object.keys(x);\n const yKeys = Object.keys(y);\n if (xKeys.length !== yKeys.length) {\n return false;\n }\n xKeys.sort();\n yKeys.sort();\n for (let i = 0; i < xKeys.length; i++) {\n if (xKeys[i] !== yKeys[i] || !equals(x[xKeys[i]], y[yKeys[i]])) {\n return false;\n }\n }\n return true;\n}\nexport function equals(x, y) {\n if (x === y) {\n return true;\n }\n else if (x == null) {\n return y == null;\n }\n else if (y == null) {\n return false;\n }\n else if (typeof x !== \"object\") {\n return false;\n }\n else if (isEquatable(x)) {\n return x.Equals(y);\n }\n else if (isArrayLike(x)) {\n return isArrayLike(y) && equalArrays(x, y);\n }\n else if (x instanceof Date) {\n return (y instanceof Date) && compareDates(x, y) === 0;\n }\n else {\n return Object.getPrototypeOf(x).constructor === Object && equalObjects(x, y);\n }\n}\nexport function compareDates(x, y) {\n let xtime;\n let ytime;\n // DateTimeOffset and DateTime deals with equality differently.\n if (\"offset\" in x && \"offset\" in y) {\n xtime = x.getTime();\n ytime = y.getTime();\n }\n else {\n xtime = x.getTime() + dateOffset(x);\n ytime = y.getTime() + dateOffset(y);\n }\n return xtime === ytime ? 0 : (xtime < ytime ? -1 : 1);\n}\nexport function comparePrimitives(x, y) {\n return x === y ? 0 : (x < y ? -1 : 1);\n}\nexport function compareArraysWith(x, y, comp) {\n if (x == null) {\n return y == null ? 0 : 1;\n }\n if (y == null) {\n return -1;\n }\n if (x.length !== y.length) {\n return x.length < y.length ? -1 : 1;\n }\n for (let i = 0, j = 0; i < x.length; i++) {\n j = comp(x[i], y[i]);\n if (j !== 0) {\n return j;\n }\n }\n return 0;\n}\nexport function compareArrays(x, y) {\n return compareArraysWith(x, y, compare);\n}\nfunction compareObjects(x, y) {\n const xKeys = Object.keys(x);\n const yKeys = Object.keys(y);\n if (xKeys.length !== yKeys.length) {\n return xKeys.length < yKeys.length ? -1 : 1;\n }\n xKeys.sort();\n yKeys.sort();\n for (let i = 0, j = 0; i < xKeys.length; i++) {\n const key = xKeys[i];\n if (key !== yKeys[i]) {\n return key < yKeys[i] ? -1 : 1;\n }\n else {\n j = compare(x[key], y[key]);\n if (j !== 0) {\n return j;\n }\n }\n }\n return 0;\n}\nexport function compare(x, y) {\n if (x === y) {\n return 0;\n }\n else if (x == null) {\n return y == null ? 0 : -1;\n }\n else if (y == null) {\n return 1;\n }\n else if (typeof x !== \"object\") {\n return x < y ? -1 : 1;\n }\n else if (isComparable(x)) {\n return x.CompareTo(y);\n }\n else if (isArrayLike(x)) {\n return isArrayLike(y) ? compareArrays(x, y) : -1;\n }\n else if (x instanceof Date) {\n return y instanceof Date ? compareDates(x, y) : -1;\n }\n else {\n return Object.getPrototypeOf(x).constructor === Object ? compareObjects(x, y) : -1;\n }\n}\nexport function min(comparer, x, y) {\n return comparer(x, y) < 0 ? x : y;\n}\nexport function max(comparer, x, y) {\n return comparer(x, y) > 0 ? x : y;\n}\nexport function clamp(comparer, value, min, max) {\n return (comparer(value, min) < 0) ? min : (comparer(value, max) > 0) ? max : value;\n}\nexport function createAtom(value) {\n let atom = value;\n return (value, isSetter) => {\n if (!isSetter) {\n return atom;\n }\n else {\n atom = value;\n return void 0;\n }\n };\n}\nexport function createObj(fields) {\n const obj = {};\n for (const kv of fields) {\n obj[kv[0]] = kv[1];\n }\n return obj;\n}\nexport function jsOptions(mutator) {\n const opts = {};\n mutator(opts);\n return opts;\n}\nexport function round(value, digits = 0) {\n const m = Math.pow(10, digits);\n const n = +(digits ? value * m : value).toFixed(8);\n const i = Math.floor(n);\n const f = n - i;\n const e = 1e-8;\n const r = (f > 0.5 - e && f < 0.5 + e) ? ((i % 2 === 0) ? i : i + 1) : Math.round(n);\n return digits ? r / m : r;\n}\nexport function sign(x) {\n return x > 0 ? 1 : x < 0 ? -1 : 0;\n}\nexport function randomNext(min, max) {\n return Math.floor(Math.random() * (max - min)) + min;\n}\nexport function randomBytes(buffer) {\n if (buffer == null) {\n throw new Error(\"Buffer cannot be null\");\n }\n for (let i = 0; i < buffer.length; i += 6) {\n // Pick random 48-bit number. Fill buffer in 2 24-bit chunks to avoid bitwise truncation.\n let r = Math.floor(Math.random() * 281474976710656); // Low 24 bits = chunk 1.\n const rhi = Math.floor(r / 16777216); // High 24 bits shifted via division = chunk 2.\n for (let j = 0; j < 6 && i + j < buffer.length; j++) {\n if (j === 3) {\n r = rhi;\n }\n buffer[i + j] = r & 255;\n r >>>= 8;\n }\n }\n}\nexport function unescapeDataString(s) {\n // https://stackoverflow.com/a/4458580/524236\n return decodeURIComponent((s).replace(/\\+/g, \"%20\"));\n}\nexport function escapeDataString(s) {\n return encodeURIComponent(s).replace(/!/g, \"%21\")\n .replace(/'/g, \"%27\")\n .replace(/\\(/g, \"%28\")\n .replace(/\\)/g, \"%29\")\n .replace(/\\*/g, \"%2A\");\n}\nexport function escapeUriString(s) {\n return encodeURI(s);\n}\n// ICollection.Clear and Count members can be called on Arrays\n// or Dictionaries so we need a runtime check (see #1120)\nexport function count(col) {\n if (isArrayLike(col)) {\n return col.length;\n }\n else {\n let count = 0;\n for (const _ of col) {\n count++;\n }\n return count;\n }\n}\nexport function clear(col) {\n if (isArrayLike(col)) {\n col.splice(0);\n }\n else {\n col.clear();\n }\n}\nconst CURRIED_KEY = \"__CURRIED__\";\nexport function uncurry(arity, f) {\n // f may be a function option with None value\n if (f == null || f.length > 1) {\n return f;\n }\n let uncurriedFn;\n switch (arity) {\n case 2:\n uncurriedFn = (a1, a2) => f(a1)(a2);\n break;\n case 3:\n uncurriedFn = (a1, a2, a3) => f(a1)(a2)(a3);\n break;\n case 4:\n uncurriedFn = (a1, a2, a3, a4) => f(a1)(a2)(a3)(a4);\n break;\n case 5:\n uncurriedFn = (a1, a2, a3, a4, a5) => f(a1)(a2)(a3)(a4)(a5);\n break;\n case 6:\n uncurriedFn = (a1, a2, a3, a4, a5, a6) => f(a1)(a2)(a3)(a4)(a5)(a6);\n break;\n case 7:\n uncurriedFn = (a1, a2, a3, a4, a5, a6, a7) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7);\n break;\n case 8:\n uncurriedFn = (a1, a2, a3, a4, a5, a6, a7, a8) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8);\n break;\n default:\n throw new Error(\"Uncurrying to more than 8-arity is not supported: \" + arity);\n }\n uncurriedFn[CURRIED_KEY] = f;\n return uncurriedFn;\n}\nexport function curry(arity, f) {\n if (f == null || f.length === 1) {\n return f;\n }\n if (CURRIED_KEY in f) {\n return f[CURRIED_KEY];\n }\n switch (arity) {\n case 2:\n return (a1) => (a2) => f(a1, a2);\n case 3:\n return (a1) => (a2) => (a3) => f(a1, a2, a3);\n case 4:\n return (a1) => (a2) => (a3) => (a4) => f(a1, a2, a3, a4);\n case 5:\n return (a1) => (a2) => (a3) => (a4) => (a5) => f(a1, a2, a3, a4, a5);\n case 6:\n return (a1) => (a2) => (a3) => (a4) => (a5) => (a6) => f(a1, a2, a3, a4, a5, a6);\n case 7:\n return (a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => f(a1, a2, a3, a4, a5, a6, a7);\n case 8:\n return (a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => f(a1, a2, a3, a4, a5, a6, a7, a8);\n default:\n throw new Error(\"Currying to more than 8-arity is not supported: \" + arity);\n }\n}\nexport function checkArity(arity, f) {\n return f.length > arity\n ? (...args1) => (...args2) => f.apply(undefined, args1.concat(args2))\n : f;\n}\nexport function partialApply(arity, f, args) {\n if (f == null) {\n return undefined;\n }\n else if (CURRIED_KEY in f) {\n f = f[CURRIED_KEY];\n for (let i = 0; i < args.length; i++) {\n f = f(args[i]);\n }\n return f;\n }\n else {\n switch (arity) {\n case 1:\n // Wrap arguments to make sure .concat doesn't destruct arrays. Example\n // [1,2].concat([3,4],5) --> [1,2,3,4,5] // fails\n // [1,2].concat([[3,4],5]) --> [1,2,[3,4],5] // ok\n return (a1) => f.apply(undefined, args.concat([a1]));\n case 2:\n return (a1) => (a2) => f.apply(undefined, args.concat([a1, a2]));\n case 3:\n return (a1) => (a2) => (a3) => f.apply(undefined, args.concat([a1, a2, a3]));\n case 4:\n return (a1) => (a2) => (a3) => (a4) => f.apply(undefined, args.concat([a1, a2, a3, a4]));\n case 5:\n return (a1) => (a2) => (a3) => (a4) => (a5) => f.apply(undefined, args.concat([a1, a2, a3, a4, a5]));\n case 6:\n return (a1) => (a2) => (a3) => (a4) => (a5) => (a6) => f.apply(undefined, args.concat([a1, a2, a3, a4, a5, a6]));\n case 7:\n return (a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => f.apply(undefined, args.concat([a1, a2, a3, a4, a5, a6, a7]));\n case 8:\n return (a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => f.apply(undefined, args.concat([a1, a2, a3, a4, a5, a6, a7, a8]));\n default:\n throw new Error(\"Partially applying to more than 8-arity is not supported: \" + arity);\n }\n }\n}\nexport function mapCurriedArgs(fn, mappings) {\n function mapArg(fn, arg, mappings, idx) {\n const mapping = mappings[idx];\n if (mapping !== 0) {\n const expectedArity = mapping[0];\n const actualArity = mapping[1];\n if (expectedArity > 1) {\n arg = curry(expectedArity, arg);\n }\n if (actualArity > 1) {\n arg = uncurry(actualArity, arg);\n }\n }\n const res = fn(arg);\n if (idx + 1 === mappings.length) {\n return res;\n }\n else {\n return (arg) => mapArg(res, arg, mappings, idx + 1);\n }\n }\n return (arg) => mapArg(fn, arg, mappings, 0);\n}\n","import { combineHashCodes, compare, compareArrays, equalArrays, equals, sameConstructor, numberHash, structuralHash } from \"./Util.js\";\nexport function seqToString(self) {\n let count = 0;\n let str = \"[\";\n for (const x of self) {\n if (count === 0) {\n str += toString(x);\n }\n else if (count === 100) {\n str += \"; ...\";\n break;\n }\n else {\n str += \"; \" + toString(x);\n }\n count++;\n }\n return str + \"]\";\n}\nexport function toString(x, callStack = 0) {\n if (x != null && typeof x === \"object\") {\n if (typeof x.toString === \"function\") {\n return x.toString();\n }\n else if (Symbol.iterator in x) {\n return seqToString(x);\n }\n else { // TODO: Date?\n const cons = Object.getPrototypeOf(x).constructor;\n return cons === Object && callStack < 10\n // Same format as recordToString\n ? \"{ \" + Object.entries(x).map(([k, v]) => k + \" = \" + toString(v, callStack + 1)).join(\"\\n \") + \" }\"\n : cons.name;\n }\n }\n return String(x);\n}\nexport function unionToString(name, fields) {\n if (fields.length === 0) {\n return name;\n }\n else {\n let fieldStr = \"\";\n let withParens = true;\n if (fields.length === 1) {\n fieldStr = toString(fields[0]);\n withParens = fieldStr.indexOf(\" \") >= 0;\n }\n else {\n fieldStr = fields.map((x) => toString(x)).join(\", \");\n }\n return name + (withParens ? \" (\" : \" \") + fieldStr + (withParens ? \")\" : \"\");\n }\n}\nexport class Union {\n get name() {\n return this.cases()[this.tag];\n }\n toJSON() {\n return this.fields.length === 0 ? this.name : [this.name].concat(this.fields);\n }\n toString() {\n return unionToString(this.name, this.fields);\n }\n GetHashCode() {\n const hashes = this.fields.map((x) => structuralHash(x));\n hashes.splice(0, 0, numberHash(this.tag));\n return combineHashCodes(hashes);\n }\n Equals(other) {\n if (this === other) {\n return true;\n }\n else if (!sameConstructor(this, other)) {\n return false;\n }\n else if (this.tag === other.tag) {\n return equalArrays(this.fields, other.fields);\n }\n else {\n return false;\n }\n }\n CompareTo(other) {\n if (this === other) {\n return 0;\n }\n else if (!sameConstructor(this, other)) {\n return -1;\n }\n else if (this.tag === other.tag) {\n return compareArrays(this.fields, other.fields);\n }\n else {\n return this.tag < other.tag ? -1 : 1;\n }\n }\n}\nfunction recordToJSON(self) {\n const o = {};\n const keys = Object.keys(self);\n for (let i = 0; i < keys.length; i++) {\n o[keys[i]] = self[keys[i]];\n }\n return o;\n}\nfunction recordToString(self) {\n return \"{ \" + Object.entries(self).map(([k, v]) => k + \" = \" + toString(v)).join(\"\\n \") + \" }\";\n}\nfunction recordGetHashCode(self) {\n const hashes = Object.values(self).map((v) => structuralHash(v));\n return combineHashCodes(hashes);\n}\nfunction recordEquals(self, other) {\n if (self === other) {\n return true;\n }\n else if (!sameConstructor(self, other)) {\n return false;\n }\n else {\n const thisNames = Object.keys(self);\n for (let i = 0; i < thisNames.length; i++) {\n if (!equals(self[thisNames[i]], other[thisNames[i]])) {\n return false;\n }\n }\n return true;\n }\n}\nfunction recordCompareTo(self, other) {\n if (self === other) {\n return 0;\n }\n else if (!sameConstructor(self, other)) {\n return -1;\n }\n else {\n const thisNames = Object.keys(self);\n for (let i = 0; i < thisNames.length; i++) {\n const result = compare(self[thisNames[i]], other[thisNames[i]]);\n if (result !== 0) {\n return result;\n }\n }\n return 0;\n }\n}\nexport class Record {\n toJSON() { return recordToJSON(this); }\n toString() { return recordToString(this); }\n GetHashCode() { return recordGetHashCode(this); }\n Equals(other) { return recordEquals(this, other); }\n CompareTo(other) { return recordCompareTo(this, other); }\n}\nexport class FSharpRef {\n constructor(contentsOrGetter, setter) {\n if (typeof setter === \"function\") {\n this.getter = contentsOrGetter;\n this.setter = setter;\n }\n else {\n this.getter = () => contentsOrGetter;\n this.setter = (v) => { contentsOrGetter = v; };\n }\n }\n get contents() {\n return this.getter();\n }\n set contents(v) {\n this.setter(v);\n }\n}\n// EXCEPTIONS\n// Exception is intentionally not derived from Error, for performance reasons (see #2160)\nexport class Exception {\n constructor(message) {\n this.message = message;\n }\n}\nexport function isException(x) {\n return x instanceof Exception || x instanceof Error;\n}\nexport class FSharpException extends Exception {\n toJSON() { return recordToJSON(this); }\n toString() { return recordToString(this); }\n GetHashCode() { return recordGetHashCode(this); }\n Equals(other) { return recordEquals(this, other); }\n CompareTo(other) { return recordCompareTo(this, other); }\n}\nexport class MatchFailureException extends FSharpException {\n constructor(arg1, arg2, arg3) {\n super();\n this.arg1 = arg1;\n this.arg2 = arg2 | 0;\n this.arg3 = arg3 | 0;\n this.message = \"The match cases were incomplete\";\n }\n}\nexport class Attribute {\n}\n","import { Record, Union } from \"./Types.js\";\nimport { combineHashCodes, equalArraysWith, stringHash } from \"./Util.js\";\nexport class CaseInfo {\n constructor(declaringType, tag, name, fields) {\n this.declaringType = declaringType;\n this.tag = tag;\n this.name = name;\n this.fields = fields;\n }\n}\nexport class TypeInfo {\n constructor(fullname, generics, construct, parent, fields, cases, enumCases) {\n this.fullname = fullname;\n this.generics = generics;\n this.construct = construct;\n this.parent = parent;\n this.fields = fields;\n this.cases = cases;\n this.enumCases = enumCases;\n }\n toString() {\n return fullName(this);\n }\n GetHashCode() {\n return getHashCode(this);\n }\n Equals(other) {\n return equals(this, other);\n }\n}\nexport function getGenerics(t) {\n return t.generics != null ? t.generics : [];\n}\nexport function getHashCode(t) {\n const fullnameHash = stringHash(t.fullname);\n const genHashes = getGenerics(t).map(getHashCode);\n return combineHashCodes([fullnameHash, ...genHashes]);\n}\nexport function equals(t1, t2) {\n if (t1.fullname === \"\") { // Anonymous records\n return t2.fullname === \"\"\n && equalArraysWith(getRecordElements(t1), getRecordElements(t2), ([k1, v1], [k2, v2]) => k1 === k2 && equals(v1, v2));\n }\n else {\n return t1.fullname === t2.fullname\n && equalArraysWith(getGenerics(t1), getGenerics(t2), equals);\n }\n}\nexport function class_type(fullname, generics, construct, parent) {\n return new TypeInfo(fullname, generics, construct, parent);\n}\nexport function record_type(fullname, generics, construct, fields) {\n return new TypeInfo(fullname, generics, construct, undefined, fields);\n}\nexport function anonRecord_type(...fields) {\n return new TypeInfo(\"\", undefined, undefined, undefined, () => fields);\n}\nexport function union_type(fullname, generics, construct, cases) {\n const t = new TypeInfo(fullname, generics, construct, undefined, undefined, () => {\n const caseNames = construct.prototype.cases();\n return cases().map((fields, i) => new CaseInfo(t, i, caseNames[i], fields));\n });\n return t;\n}\nexport function tuple_type(...generics) {\n return new TypeInfo(\"System.Tuple`\" + generics.length, generics);\n}\nexport function delegate_type(...generics) {\n return new TypeInfo(\"System.Func`\" + generics.length, generics);\n}\nexport function lambda_type(argType, returnType) {\n return new TypeInfo(\"Microsoft.FSharp.Core.FSharpFunc`2\", [argType, returnType]);\n}\nexport function option_type(generic) {\n return new TypeInfo(\"Microsoft.FSharp.Core.FSharpOption`1\", [generic]);\n}\nexport function list_type(generic) {\n return new TypeInfo(\"Microsoft.FSharp.Collections.FSharpList`1\", [generic]);\n}\nexport function array_type(generic) {\n return new TypeInfo(generic.fullname + \"[]\", [generic]);\n}\nexport function enum_type(fullname, underlyingType, enumCases) {\n return new TypeInfo(fullname, [underlyingType], undefined, undefined, undefined, undefined, enumCases);\n}\nexport const obj_type = new TypeInfo(\"System.Object\");\nexport const unit_type = new TypeInfo(\"Microsoft.FSharp.Core.Unit\");\nexport const char_type = new TypeInfo(\"System.Char\");\nexport const string_type = new TypeInfo(\"System.String\");\nexport const bool_type = new TypeInfo(\"System.Boolean\");\nexport const int8_type = new TypeInfo(\"System.SByte\");\nexport const uint8_type = new TypeInfo(\"System.Byte\");\nexport const int16_type = new TypeInfo(\"System.Int16\");\nexport const uint16_type = new TypeInfo(\"System.UInt16\");\nexport const int32_type = new TypeInfo(\"System.Int32\");\nexport const uint32_type = new TypeInfo(\"System.UInt32\");\nexport const float32_type = new TypeInfo(\"System.Single\");\nexport const float64_type = new TypeInfo(\"System.Double\");\nexport const decimal_type = new TypeInfo(\"System.Decimal\");\nexport function name(info) {\n if (Array.isArray(info)) {\n return info[0];\n }\n else if (info instanceof CaseInfo) {\n return info.name;\n }\n else {\n const i = info.fullname.lastIndexOf(\".\");\n return i === -1 ? info.fullname : info.fullname.substr(i + 1);\n }\n}\nexport function fullName(t) {\n const gen = t.generics != null && !isArray(t) ? t.generics : [];\n if (gen.length > 0) {\n return t.fullname + \"[\" + gen.map((x) => fullName(x)).join(\",\") + \"]\";\n }\n else {\n return t.fullname;\n }\n}\nexport function namespace(t) {\n const i = t.fullname.lastIndexOf(\".\");\n return i === -1 ? \"\" : t.fullname.substr(0, i);\n}\nexport function isArray(t) {\n return t.fullname.endsWith(\"[]\");\n}\nexport function getElementType(t) {\n var _a;\n return isArray(t) ? (_a = t.generics) === null || _a === void 0 ? void 0 : _a[0] : undefined;\n}\nexport function isGenericType(t) {\n return t.generics != null && t.generics.length > 0;\n}\nexport function isEnum(t) {\n return t.enumCases != null && t.enumCases.length > 0;\n}\nexport function isSubclassOf(t1, t2) {\n var _a, _b;\n return (_b = (_a = t1.parent) === null || _a === void 0 ? void 0 : _a.Equals(t2)) !== null && _b !== void 0 ? _b : false;\n}\n/**\n * This doesn't replace types for fields (records) or cases (unions)\n * but it should be enough for type comparison purposes\n */\nexport function getGenericTypeDefinition(t) {\n return t.generics == null ? t : new TypeInfo(t.fullname, t.generics.map(() => obj_type));\n}\nexport function getEnumUnderlyingType(t) {\n var _a;\n return (_a = t.generics) === null || _a === void 0 ? void 0 : _a[0];\n}\nexport function getEnumValues(t) {\n if (isEnum(t) && t.enumCases != null) {\n return t.enumCases.map((kv) => kv[1]);\n }\n else {\n throw new Error(`${t.fullname} is not an enum type`);\n }\n}\nexport function getEnumNames(t) {\n if (isEnum(t) && t.enumCases != null) {\n return t.enumCases.map((kv) => kv[0]);\n }\n else {\n throw new Error(`${t.fullname} is not an enum type`);\n }\n}\nfunction getEnumCase(t, v) {\n if (t.enumCases != null) {\n if (typeof v === \"string\") {\n for (const kv of t.enumCases) {\n if (kv[0] === v) {\n return kv;\n }\n }\n throw new Error(`'${v}' was not found in ${t.fullname}`);\n }\n else {\n for (const kv of t.enumCases) {\n if (kv[1] === v) {\n return kv;\n }\n }\n // .NET returns the number even if it doesn't match any of the cases\n return [\"\", v];\n }\n }\n else {\n throw new Error(`${t.fullname} is not an enum type`);\n }\n}\nexport function parseEnum(t, str) {\n // TODO: better int parsing here, parseInt ceils floats: \"4.8\" -> 4\n const value = parseInt(str, 10);\n return getEnumCase(t, isNaN(value) ? str : value)[1];\n}\nexport function tryParseEnum(t, str, defValue) {\n try {\n defValue.contents = parseEnum(t, str);\n return true;\n }\n catch (_a) {\n return false;\n }\n}\nexport function getEnumName(t, v) {\n return getEnumCase(t, v)[0];\n}\nexport function isEnumDefined(t, v) {\n try {\n const kv = getEnumCase(t, v);\n return kv[0] != null && kv[0] !== \"\";\n }\n catch (_a) {\n // supress error\n }\n return false;\n}\n// FSharpType\nexport function getUnionCases(t) {\n if (t.cases != null) {\n return t.cases();\n }\n else {\n throw new Error(`${t.fullname} is not an F# union type`);\n }\n}\nexport function getRecordElements(t) {\n if (t.fields != null) {\n return t.fields();\n }\n else {\n throw new Error(`${t.fullname} is not an F# record type`);\n }\n}\nexport function getTupleElements(t) {\n if (isTuple(t) && t.generics != null) {\n return t.generics;\n }\n else {\n throw new Error(`${t.fullname} is not a tuple type`);\n }\n}\nexport function getFunctionElements(t) {\n if (isFunction(t) && t.generics != null) {\n const gen = t.generics;\n return [gen[0], gen[1]];\n }\n else {\n throw new Error(`${t.fullname} is not an F# function type`);\n }\n}\nexport function isUnion(t) {\n return t instanceof TypeInfo ? t.cases != null : t instanceof Union;\n}\nexport function isRecord(t) {\n return t instanceof TypeInfo ? t.fields != null : t instanceof Record;\n}\nexport function isTuple(t) {\n return t.fullname.startsWith(\"System.Tuple\") && !isArray(t);\n}\n// In .NET this is false for delegates\nexport function isFunction(t) {\n return t.fullname === \"Microsoft.FSharp.Core.FSharpFunc`2\";\n}\n// FSharpValue\nexport function getUnionFields(v, t) {\n const cases = getUnionCases(t);\n const case_ = cases[v.tag];\n if (case_ == null) {\n throw new Error(`Cannot find case ${v.name} in union type`);\n }\n return [case_, v.fields];\n}\nexport function getUnionCaseFields(uci) {\n return uci.fields == null ? [] : uci.fields;\n}\n// This is used as replacement of `FSharpValue.GetRecordFields`\n// For `FSharpTypes.GetRecordFields` see `getRecordElements`\n// Object.keys returns keys in the order they were added to the object\nexport function getRecordFields(v) {\n return Object.keys(v).map((k) => v[k]);\n}\nexport function getRecordField(v, field) {\n return v[field[0]];\n}\nexport function getTupleFields(v) {\n return v;\n}\nexport function getTupleField(v, i) {\n return v[i];\n}\nexport function makeUnion(uci, values) {\n const expectedLength = (uci.fields || []).length;\n if (values.length !== expectedLength) {\n throw new Error(`Expected an array of length ${expectedLength} but got ${values.length}`);\n }\n return uci.declaringType.construct != null\n ? new uci.declaringType.construct(uci.tag, ...values)\n : {};\n}\nexport function makeRecord(t, values) {\n const fields = getRecordElements(t);\n if (fields.length !== values.length) {\n throw new Error(`Expected an array of length ${fields.length} but got ${values.length}`);\n }\n return t.construct != null\n ? new t.construct(...values)\n : fields.reduce((obj, [key, _t], i) => {\n obj[key] = values[i];\n return obj;\n }, {});\n}\nexport function makeTuple(values, _t) {\n return values;\n}\nexport function makeGenericType(t, generics) {\n return new TypeInfo(t.fullname, generics, t.construct, t.parent, t.fields, t.cases);\n}\nexport function createInstance(t, consArgs) {\n // TODO: Check if consArgs length is same as t.construct?\n // (Arg types can still be different)\n if (typeof t.construct === \"function\") {\n return new t.construct(...(consArgs !== null && consArgs !== void 0 ? consArgs : []));\n }\n else {\n throw new Error(`Cannot access constructor of ${t.fullname}`);\n }\n}\nexport function getValue(propertyInfo, v) {\n return v[propertyInfo[0]];\n}\n// Fable.Core.Reflection\nfunction assertUnion(x) {\n if (!(x instanceof Union)) {\n throw new Error(`Value is not an F# union type`);\n }\n}\nexport function getCaseTag(x) {\n assertUnion(x);\n return x.tag;\n}\nexport function getCaseName(x) {\n assertUnion(x);\n return x.cases()[x.tag];\n}\nexport function getCaseFields(x) {\n assertUnion(x);\n return x.fields;\n}\n","import { Union, Record } from \"../TryTheseGames.Website.Client/.fable/fable-library.3.1.12/Types.js\";\nimport { list_type, union_type, class_type, array_type, float64_type, string_type, record_type, option_type, bool_type, int32_type } from \"../TryTheseGames.Website.Client/.fable/fable-library.3.1.12/Reflection.js\";\n\nexport class RecommendationQuery extends Record {\n constructor(GameId, HideLinkedItems, HideMatchingDesigners, Players, HasMechanic, HasCategory, MinPlayingTime, MaxPlayingTime, PublishedBeforeYear, PublishedAfterYear, Skip) {\n super();\n this.GameId = (GameId | 0);\n this.HideLinkedItems = HideLinkedItems;\n this.HideMatchingDesigners = HideMatchingDesigners;\n this.Players = Players;\n this.HasMechanic = HasMechanic;\n this.HasCategory = HasCategory;\n this.MinPlayingTime = MinPlayingTime;\n this.MaxPlayingTime = MaxPlayingTime;\n this.PublishedBeforeYear = PublishedBeforeYear;\n this.PublishedAfterYear = PublishedAfterYear;\n this.Skip = (Skip | 0);\n }\n}\n\nexport function RecommendationQuery$reflection() {\n return record_type(\"Shared.RecommendationQuery\", [], RecommendationQuery, () => [[\"GameId\", int32_type], [\"HideLinkedItems\", bool_type], [\"HideMatchingDesigners\", bool_type], [\"Players\", option_type(int32_type)], [\"HasMechanic\", option_type(int32_type)], [\"HasCategory\", option_type(int32_type)], [\"MinPlayingTime\", option_type(int32_type)], [\"MaxPlayingTime\", option_type(int32_type)], [\"PublishedBeforeYear\", option_type(int32_type)], [\"PublishedAfterYear\", option_type(int32_type)], [\"Skip\", int32_type]]);\n}\n\nexport class Mechanic extends Record {\n constructor(Id, Name) {\n super();\n this.Id = (Id | 0);\n this.Name = Name;\n }\n}\n\nexport function Mechanic$reflection() {\n return record_type(\"Shared.Mechanic\", [], Mechanic, () => [[\"Id\", int32_type], [\"Name\", string_type]]);\n}\n\nexport class Category extends Record {\n constructor(Id, Name) {\n super();\n this.Id = (Id | 0);\n this.Name = Name;\n }\n}\n\nexport function Category$reflection() {\n return record_type(\"Shared.Category\", [], Category, () => [[\"Id\", int32_type], [\"Name\", string_type]]);\n}\n\nexport class BoardGame extends Record {\n constructor(Id, Name, Thumbnail, YearPublished, MinPlayers, MaxPlayers, MinPlayingTime, MaxPlayingTime, AlternativeName, RatingTrendCoefficients, RatingTrendStartDate, RatingTrendEndDate, MechanicIds, CategoryIds) {\n super();\n this.Id = (Id | 0);\n this.Name = Name;\n this.Thumbnail = Thumbnail;\n this.YearPublished = (YearPublished | 0);\n this.MinPlayers = (MinPlayers | 0);\n this.MaxPlayers = (MaxPlayers | 0);\n this.MinPlayingTime = (MinPlayingTime | 0);\n this.MaxPlayingTime = (MaxPlayingTime | 0);\n this.AlternativeName = AlternativeName;\n this.RatingTrendCoefficients = RatingTrendCoefficients;\n this.RatingTrendStartDate = RatingTrendStartDate;\n this.RatingTrendEndDate = RatingTrendEndDate;\n this.MechanicIds = MechanicIds;\n this.CategoryIds = CategoryIds;\n }\n}\n\nexport function BoardGame$reflection() {\n return record_type(\"Shared.BoardGame\", [], BoardGame, () => [[\"Id\", int32_type], [\"Name\", string_type], [\"Thumbnail\", option_type(string_type)], [\"YearPublished\", int32_type], [\"MinPlayers\", int32_type], [\"MaxPlayers\", int32_type], [\"MinPlayingTime\", int32_type], [\"MaxPlayingTime\", int32_type], [\"AlternativeName\", option_type(string_type)], [\"RatingTrendCoefficients\", option_type(array_type(float64_type))], [\"RatingTrendStartDate\", option_type(class_type(\"System.DateTime\"))], [\"RatingTrendEndDate\", option_type(class_type(\"System.DateTime\"))], [\"MechanicIds\", array_type(int32_type)], [\"CategoryIds\", array_type(int32_type)]]);\n}\n\nexport class TimeTrendData extends Record {\n constructor(RatingTrendCoefficients, RatingTrendStartDate, RatingTrendEndDate) {\n super();\n this.RatingTrendCoefficients = RatingTrendCoefficients;\n this.RatingTrendStartDate = RatingTrendStartDate;\n this.RatingTrendEndDate = RatingTrendEndDate;\n }\n}\n\nexport function TimeTrendData$reflection() {\n return record_type(\"Shared.TimeTrendData\", [], TimeTrendData, () => [[\"RatingTrendCoefficients\", option_type(array_type(float64_type))], [\"RatingTrendStartDate\", option_type(class_type(\"System.DateTime\"))], [\"RatingTrendEndDate\", option_type(class_type(\"System.DateTime\"))]]);\n}\n\nexport class BoardGameRecommendation extends Record {\n constructor(Id, Name, Thumbnail, YearPublished, GameScore, UserScore, LikeScore, Strength, Surety, MinPlayers, MaxPlayers, MinPlayingTime, MaxPlayingTime, MechanicIds, CategoryIds) {\n super();\n this.Id = (Id | 0);\n this.Name = Name;\n this.Thumbnail = Thumbnail;\n this.YearPublished = (YearPublished | 0);\n this.GameScore = GameScore;\n this.UserScore = UserScore;\n this.LikeScore = LikeScore;\n this.Strength = (Strength | 0);\n this.Surety = (Surety | 0);\n this.MinPlayers = (MinPlayers | 0);\n this.MaxPlayers = (MaxPlayers | 0);\n this.MinPlayingTime = (MinPlayingTime | 0);\n this.MaxPlayingTime = (MaxPlayingTime | 0);\n this.MechanicIds = MechanicIds;\n this.CategoryIds = CategoryIds;\n }\n}\n\nexport function BoardGameRecommendation$reflection() {\n return record_type(\"Shared.BoardGameRecommendation\", [], BoardGameRecommendation, () => [[\"Id\", int32_type], [\"Name\", string_type], [\"Thumbnail\", option_type(string_type)], [\"YearPublished\", int32_type], [\"GameScore\", float64_type], [\"UserScore\", float64_type], [\"LikeScore\", float64_type], [\"Strength\", int32_type], [\"Surety\", int32_type], [\"MinPlayers\", int32_type], [\"MaxPlayers\", int32_type], [\"MinPlayingTime\", int32_type], [\"MaxPlayingTime\", int32_type], [\"MechanicIds\", array_type(int32_type)], [\"CategoryIds\", array_type(int32_type)]]);\n}\n\nexport class RankedBoardGame extends Record {\n constructor(Id, Name, Thumbnail, YearPublished, MinPlayers, MaxPlayers, MinPlayingTime, MaxPlayingTime, Rank, BggRank, TtgRating, GeekRating, RatingTrendCoefficients, RatingTrendStartDate, RatingTrendEndDate) {\n super();\n this.Id = (Id | 0);\n this.Name = Name;\n this.Thumbnail = Thumbnail;\n this.YearPublished = (YearPublished | 0);\n this.MinPlayers = (MinPlayers | 0);\n this.MaxPlayers = (MaxPlayers | 0);\n this.MinPlayingTime = (MinPlayingTime | 0);\n this.MaxPlayingTime = (MaxPlayingTime | 0);\n this.Rank = (Rank | 0);\n this.BggRank = (BggRank | 0);\n this.TtgRating = TtgRating;\n this.GeekRating = GeekRating;\n this.RatingTrendCoefficients = RatingTrendCoefficients;\n this.RatingTrendStartDate = RatingTrendStartDate;\n this.RatingTrendEndDate = RatingTrendEndDate;\n }\n}\n\nexport function RankedBoardGame$reflection() {\n return record_type(\"Shared.RankedBoardGame\", [], RankedBoardGame, () => [[\"Id\", int32_type], [\"Name\", string_type], [\"Thumbnail\", option_type(string_type)], [\"YearPublished\", int32_type], [\"MinPlayers\", int32_type], [\"MaxPlayers\", int32_type], [\"MinPlayingTime\", int32_type], [\"MaxPlayingTime\", int32_type], [\"Rank\", int32_type], [\"BggRank\", int32_type], [\"TtgRating\", float64_type], [\"GeekRating\", float64_type], [\"RatingTrendCoefficients\", option_type(array_type(float64_type))], [\"RatingTrendStartDate\", option_type(class_type(\"System.DateTime\"))], [\"RatingTrendEndDate\", option_type(class_type(\"System.DateTime\"))]]);\n}\n\nexport class RankingTimePeriod extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"All\", \"OneYear\", \"TwoYears\", \"FourYears\"];\n }\n}\n\nexport function RankingTimePeriod$reflection() {\n return union_type(\"Shared.RankingTimePeriod\", [], RankingTimePeriod, () => [[], [], [], []]);\n}\n\nexport class NewGameAdjustment extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"NoAdjustment\", \"Base\", \"Mild\", \"Moderate\", \"Severe\"];\n }\n}\n\nexport function NewGameAdjustment$reflection() {\n return union_type(\"Shared.NewGameAdjustment\", [], NewGameAdjustment, () => [[], [], [], [], []]);\n}\n\nexport class RankingQuery extends Record {\n constructor(TimePeriod, NewGameAdjustment, PseudoRaters, PlayerCount, MinPlayTime, MaxPlayTime, MinPublishYear, MaxPublishYear, HasMechanic, HasCategory, Skip) {\n super();\n this.TimePeriod = TimePeriod;\n this.NewGameAdjustment = NewGameAdjustment;\n this.PseudoRaters = (PseudoRaters | 0);\n this.PlayerCount = PlayerCount;\n this.MinPlayTime = MinPlayTime;\n this.MaxPlayTime = MaxPlayTime;\n this.MinPublishYear = MinPublishYear;\n this.MaxPublishYear = MaxPublishYear;\n this.HasMechanic = HasMechanic;\n this.HasCategory = HasCategory;\n this.Skip = (Skip | 0);\n }\n}\n\nexport function RankingQuery$reflection() {\n return record_type(\"Shared.RankingQuery\", [], RankingQuery, () => [[\"TimePeriod\", RankingTimePeriod$reflection()], [\"NewGameAdjustment\", NewGameAdjustment$reflection()], [\"PseudoRaters\", int32_type], [\"PlayerCount\", option_type(int32_type)], [\"MinPlayTime\", option_type(int32_type)], [\"MaxPlayTime\", option_type(int32_type)], [\"MinPublishYear\", option_type(int32_type)], [\"MaxPublishYear\", option_type(int32_type)], [\"HasMechanic\", option_type(int32_type)], [\"HasCategory\", option_type(int32_type)], [\"Skip\", int32_type]]);\n}\n\nexport class Page$1 extends Record {\n constructor(PageSize, TotalCount, Items) {\n super();\n this.PageSize = (PageSize | 0);\n this.TotalCount = (TotalCount | 0);\n this.Items = Items;\n }\n}\n\nexport function Page$1$reflection(gen0) {\n return record_type(\"Shared.Page`1\", [gen0], Page$1, () => [[\"PageSize\", int32_type], [\"TotalCount\", int32_type], [\"Items\", list_type(gen0)]]);\n}\n\n","import { compare, equals, structuralHash } from \"./Util.js\";\n// Using a class here for better compatibility with TS files importing Some\nexport class Some {\n constructor(value) {\n this.value = value;\n }\n toJSON() {\n return this.value;\n }\n // Don't add \"Some\" for consistency with erased options\n toString() {\n return String(this.value);\n }\n GetHashCode() {\n return structuralHash(this.value);\n }\n Equals(other) {\n if (other == null) {\n return false;\n }\n else {\n return equals(this.value, other instanceof Some ? other.value : other);\n }\n }\n CompareTo(other) {\n if (other == null) {\n return 1;\n }\n else {\n return compare(this.value, other instanceof Some ? other.value : other);\n }\n }\n}\nexport function some(x) {\n return x == null || x instanceof Some ? new Some(x) : x;\n}\nexport function value(x) {\n if (x == null) {\n throw new Error(\"Option has no value\");\n }\n else {\n return x instanceof Some ? x.value : x;\n }\n}\nexport function ofNullable(x) {\n // This will fail with unit probably, an alternative would be:\n // return x === null ? undefined : (x === undefined ? new Some(x) : x);\n return x == null ? undefined : x;\n}\nexport function toNullable(x) {\n return x == null ? null : value(x);\n}\nexport function flatten(x) {\n return x == null ? undefined : value(x);\n}\nexport function toArray(opt) {\n return (opt == null) ? [] : [value(opt)];\n}\nexport function defaultArg(opt, defaultValue) {\n return (opt != null) ? value(opt) : defaultValue;\n}\nexport function defaultArgWith(opt, defThunk) {\n return (opt != null) ? value(opt) : defThunk();\n}\nexport function filter(predicate, opt) {\n return (opt != null) ? (predicate(value(opt)) ? opt : undefined) : opt;\n}\nexport function map(mapping, opt) {\n return (opt != null) ? some(mapping(value(opt))) : undefined;\n}\nexport function map2(mapping, opt1, opt2) {\n return (opt1 != null && opt2 != null) ? mapping(value(opt1), value(opt2)) : undefined;\n}\nexport function map3(mapping, opt1, opt2, opt3) {\n return (opt1 != null && opt2 != null && opt3 != null) ? mapping(value(opt1), value(opt2), value(opt3)) : undefined;\n}\nexport function bind(binder, opt) {\n return opt != null ? binder(value(opt)) : undefined;\n}\nexport function tryOp(op, arg) {\n try {\n return some(op(arg));\n }\n catch (_a) {\n return undefined;\n }\n}\n","// export type decimal = Decimal;\nexport var NumberStyles;\n(function (NumberStyles) {\n // None = 0x00000000,\n // AllowLeadingWhite = 0x00000001,\n // AllowTrailingWhite = 0x00000002,\n // AllowLeadingSign = 0x00000004,\n // AllowTrailingSign = 0x00000008,\n // AllowParentheses = 0x00000010,\n // AllowDecimalPoint = 0x00000020,\n // AllowThousands = 0x00000040,\n // AllowExponent = 0x00000080,\n // AllowCurrencySymbol = 0x00000100,\n NumberStyles[NumberStyles[\"AllowHexSpecifier\"] = 512] = \"AllowHexSpecifier\";\n // Integer = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign,\n // HexNumber = AllowLeadingWhite | AllowTrailingWhite | AllowHexSpecifier,\n // Number = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign |\n // AllowTrailingSign | AllowDecimalPoint | AllowThousands,\n // Float = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign |\n // AllowDecimalPoint | AllowExponent,\n // Currency = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign | AllowTrailingSign |\n // AllowParentheses | AllowDecimalPoint | AllowThousands | AllowCurrencySymbol,\n // Any = AllowLeadingWhite | AllowTrailingWhite | AllowLeadingSign | AllowTrailingSign |\n // AllowParentheses | AllowDecimalPoint | AllowThousands | AllowCurrencySymbol | AllowExponent,\n})(NumberStyles || (NumberStyles = {}));\nfunction validResponse(regexMatch, radix) {\n const [/*all*/ , sign, prefix, digits] = regexMatch;\n return {\n sign: sign || \"\",\n prefix: prefix || \"\",\n digits,\n radix,\n };\n}\nfunction getRange(unsigned, bitsize) {\n switch (bitsize) {\n case 8: return unsigned ? [0, 255] : [-128, 127];\n case 16: return unsigned ? [0, 65535] : [-32768, 32767];\n case 32: return unsigned ? [0, 4294967295] : [-2147483648, 2147483647];\n default: throw new Error(\"Invalid bit size.\");\n }\n}\nfunction getInvalidDigits(radix) {\n switch (radix) {\n case 2: return /[^0-1]/;\n case 8: return /[^0-7]/;\n case 10: return /[^0-9]/;\n case 16: return /[^0-9a-fA-F]/;\n default:\n throw new Error(\"Invalid Base.\");\n }\n}\nfunction getRadix(prefix, style) {\n if (style & NumberStyles.AllowHexSpecifier) {\n return 16;\n }\n else {\n switch (prefix) {\n case \"0b\":\n case \"0B\": return 2;\n case \"0o\":\n case \"0O\": return 8;\n case \"0x\":\n case \"0X\": return 16;\n default: return 10;\n }\n }\n}\nexport function isValid(str, style, radix) {\n const integerRegex = /^\\s*([\\+\\-])?(0[xXoObB])?([0-9a-fA-F]+)\\s*$/;\n const res = integerRegex.exec(str.replace(/_/g, \"\"));\n if (res != null) {\n const [/*all*/ , /*sign*/ , prefix, digits] = res;\n radix = radix || getRadix(prefix, style);\n const invalidDigits = getInvalidDigits(radix);\n if (!invalidDigits.test(digits)) {\n return validResponse(res, radix);\n }\n }\n return null;\n}\nexport function parse(str, style, unsigned, bitsize, radix) {\n const res = isValid(str, style, radix);\n if (res != null) {\n let v = Number.parseInt(res.sign + res.digits, res.radix);\n if (!Number.isNaN(v)) {\n const [umin, umax] = getRange(true, bitsize);\n if (!unsigned && res.radix !== 10 && v >= umin && v <= umax) {\n v = v << (32 - bitsize) >> (32 - bitsize);\n }\n const [min, max] = getRange(unsigned, bitsize);\n if (v >= min && v <= max) {\n return v;\n }\n }\n }\n throw new Error(\"Input string was not in a correct format.\");\n}\nexport function tryParse(str, style, unsigned, bitsize, defValue) {\n try {\n defValue.contents = parse(str, style, unsigned, bitsize);\n return true;\n }\n catch (_a) {\n return false;\n }\n}\nexport function op_UnaryNegation_Int8(x) {\n return x === -128 ? x : -x;\n}\nexport function op_UnaryNegation_Int16(x) {\n return x === -32768 ? x : -x;\n}\nexport function op_UnaryNegation_Int32(x) {\n return x === -2147483648 ? x : -x;\n}\n","import { FSharpRef } from \"./Types.js\";\nexport function tryParse(str, defValue) {\n // TODO: test if value is valid and in range\n if (str != null && /\\S/.test(str)) {\n const v = +str.replace(\"_\", \"\");\n if (!Number.isNaN(v)) {\n defValue.contents = v;\n return true;\n }\n }\n return false;\n}\nexport function parse(str) {\n const defValue = new FSharpRef(0);\n if (tryParse(str, defValue)) {\n return defValue.contents;\n }\n else {\n throw new Error(\"Input string was not in a correct format.\");\n }\n}\n// JS Number.isFinite function evals false for NaN\nexport function isInfinity(x) {\n return x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY;\n}\n","import { FSharpRef, toString, Union } from \"./.fable/fable-library.3.1.12/Types.js\";\nimport { bool_type, lambda_type, unit_type, union_type } from \"./.fable/fable-library.3.1.12/Reflection.js\";\nimport { map, defaultArg } from \"./.fable/fable-library.3.1.12/Option.js\";\nimport { tryParse } from \"./.fable/fable-library.3.1.12/Int32.js\";\nimport { tryParse as tryParse_1 } from \"./.fable/fable-library.3.1.12/Double.js\";\n\nexport class AsyncOperation$1 extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Started\", \"Finished\"];\n }\n}\n\nexport function AsyncOperation$1$reflection(gen0) {\n return union_type(\"Client.Helpers.AsyncOperation`1\", [gen0], AsyncOperation$1, () => [[], [[\"Item\", gen0]]]);\n}\n\nexport class Deferred$1 extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"HasNotStarted\", \"InProgress\", \"Finished\"];\n }\n}\n\nexport function Deferred$1$reflection(gen0) {\n return union_type(\"Client.Helpers.Deferred`1\", [gen0], Deferred$1, () => [[], [], [[\"Item\", gen0]]]);\n}\n\nexport class CancellableDeferred$1 extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"HasNotStarted\", \"InProgress\", \"Finished\"];\n }\n}\n\nexport function CancellableDeferred$1$reflection(gen0) {\n return union_type(\"Client.Helpers.CancellableDeferred`1\", [gen0], CancellableDeferred$1, () => [[], [[\"Item\", lambda_type(unit_type, unit_type)]], [[\"Item\", gen0]]]);\n}\n\nexport class CancellablePagedDeferred$1 extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"HasNotStarted\", \"GettingFirstPage\", \"GettingNextPage\", \"Finished\"];\n }\n}\n\nexport function CancellablePagedDeferred$1$reflection(gen0) {\n return union_type(\"Client.Helpers.CancellablePagedDeferred`1\", [gen0], CancellablePagedDeferred$1, () => [[], [[\"Item\", lambda_type(unit_type, unit_type)]], [[\"Item1\", gen0], [\"Item2\", lambda_type(unit_type, unit_type)]], [[\"Item1\", gen0], [\"Item2\", bool_type]]]);\n}\n\nexport function toQueryString(o, excludeKeys) {\n const queryComponents = Object.entries(o)\n .filter(([key,]) => !excludeKeys.includes(key))\n .filter(([,value]) => value !== null && value !== undefined)\n .map(([key, value]) => encodeURIComponent(key) + '=' + encodeURIComponent(value));\n return queryComponents.length ? '?' + queryComponents.join('&') : '';;\n}\n\nexport function Option_toString(o) {\n return defaultArg(map((value) => toString(value), o), \"\");\n}\n\nexport function intTryParse(str) {\n let matchValue;\n let outArg = 0;\n matchValue = [tryParse(str, 511, false, 32, new FSharpRef(() => outArg, (v) => {\n outArg = v;\n })), outArg];\n if (matchValue[0]) {\n return matchValue[1];\n }\n else {\n return void 0;\n }\n}\n\nexport function floatTryParse(str) {\n let matchValue;\n let outArg = 0;\n matchValue = [tryParse_1(str, new FSharpRef(() => outArg, (v) => {\n outArg = v;\n })), outArg];\n if (matchValue[0]) {\n return matchValue[1];\n }\n else {\n return void 0;\n }\n}\n\nexport function Float_toFixed(dps, x) {\n return x.toFixed(dps);\n}\n\n","export const symbol = Symbol(\"numeric\");\nexport function isNumeric(x) {\n return typeof x === \"number\" || (x === null || x === void 0 ? void 0 : x[symbol]);\n}\nexport function compare(x, y) {\n if (typeof x === \"number\") {\n return x < y ? -1 : (x > y ? 1 : 0);\n }\n else {\n return x.CompareTo(y);\n }\n}\nexport function multiply(x, y) {\n if (typeof x === \"number\") {\n return x * y;\n }\n else {\n return x[symbol]().multiply(y);\n }\n}\nexport function toFixed(x, dp) {\n if (typeof x === \"number\") {\n return x.toFixed(dp);\n }\n else {\n return x[symbol]().toFixed(dp);\n }\n}\nexport function toPrecision(x, sd) {\n if (typeof x === \"number\") {\n return x.toPrecision(sd);\n }\n else {\n return x[symbol]().toPrecision(sd);\n }\n}\nexport function toExponential(x, dp) {\n if (typeof x === \"number\") {\n return x.toExponential(dp);\n }\n else {\n return x[symbol]().toExponential(dp);\n }\n}\nexport function toHex(x) {\n if (typeof x === \"number\") {\n return (Number(x) >>> 0).toString(16);\n }\n else {\n return x[symbol]().toHex();\n }\n}\n","// Adapted from: https://github.com/dcodeIO/long.js/blob/master/src/long.js\n// Apache License 2.0: https://github.com/dcodeIO/long.js/blob/master/LICENSE\n/* tslint:disable */\nimport { symbol } from \"../Numeric.js\";\n/**\n * wasm optimizations, to do native i64 multiplication and divide\n */\nvar wasm = null;\ntry {\n wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([\n 0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11\n ])), {}).exports;\n}\ncatch (e) {\n // no wasm support :(\n}\n/**\n * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers.\n * See the from* functions below for more convenient ways of constructing Longs.\n * @exports Long\n * @class A Long class for representing a 64 bit two's-complement integer value.\n * @param {number} low The low (signed) 32 bits of the long\n * @param {number} high The high (signed) 32 bits of the long\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @constructor\n */\nexport function Long(low, high, unsigned) {\n /**\n * The low 32 bits as a signed value.\n * @type {number}\n */\n this.low = low | 0;\n /**\n * The high 32 bits as a signed value.\n * @type {number}\n */\n this.high = high | 0;\n /**\n * Whether unsigned or not.\n * @type {boolean}\n */\n this.unsigned = !!unsigned;\n}\nLong.prototype.GetHashCode = function () {\n let h1 = this.unsigned ? 1 : 0;\n h1 = ((h1 << 5) + h1) ^ this.high;\n h1 = ((h1 << 5) + h1) ^ this.low;\n return h1;\n};\nLong.prototype.Equals = function (x) { return equals(this, x); };\nLong.prototype.CompareTo = function (x) { return compare(this, x); };\nLong.prototype.toString = function (radix) { return toString(this, radix); };\nLong.prototype.toJSON = function () { return toString(this); };\nLong.prototype[symbol] = function () {\n const x = this;\n return {\n multiply: y => multiply(x, y),\n toPrecision: sd => String(x) + (0).toPrecision(sd).substr(1),\n toExponential: dp => String(x) + (0).toExponential(dp).substr(1),\n toFixed: dp => String(x) + (0).toFixed(dp).substr(1),\n toHex: () => toString(x.unsigned ? x : fromBytes(toBytes(x), true), 16),\n };\n};\n// The internal representation of a long is the two given signed, 32-bit values.\n// We use 32-bit pieces because these are the size of integers on which\n// Javascript performs bit-operations. For operations like addition and\n// multiplication, we split each number into 16 bit pieces, which can easily be\n// multiplied within Javascript's floating-point representation without overflow\n// or change in sign.\n//\n// In the algorithms below, we frequently reduce the negative case to the\n// positive case by negating the input(s) and then post-processing the result.\n// Note that we must ALWAYS check specially whether those values are MIN_VALUE\n// (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as\n// a positive number, it overflows back into a negative). Not handling this\n// case would often result in infinite recursion.\n//\n// Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from*\n// methods on which they depend.\n/**\n * An indicator used to reliably determine if an object is a Long or not.\n * @type {boolean}\n * @const\n * @private\n */\nLong.prototype.__isLong__;\nObject.defineProperty(Long.prototype, \"__isLong__\", { value: true });\n/**\n * @function\n * @param {*} obj Object\n * @returns {boolean}\n * @inner\n */\nexport function isLong(obj) {\n return (obj && obj[\"__isLong__\"]) === true;\n}\n/**\n * Tests if the specified object is a Long.\n * @function\n * @param {*} obj Object\n * @returns {boolean}\n */\n// Long.isLong = isLong;\n/**\n * A cache of the Long representations of small integer values.\n * @type {!Object}\n * @inner\n */\nvar INT_CACHE = {};\n/**\n * A cache of the Long representations of small unsigned integer values.\n * @type {!Object}\n * @inner\n */\nvar UINT_CACHE = {};\n/**\n * @param {number} value\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\nexport function fromInt(value, unsigned) {\n var obj, cachedObj, cache;\n if (unsigned) {\n value >>>= 0;\n if (cache = (0 <= value && value < 256)) {\n cachedObj = UINT_CACHE[value];\n if (cachedObj)\n return cachedObj;\n }\n obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true);\n if (cache)\n UINT_CACHE[value] = obj;\n return obj;\n }\n else {\n value |= 0;\n if (cache = (-128 <= value && value < 128)) {\n cachedObj = INT_CACHE[value];\n if (cachedObj)\n return cachedObj;\n }\n obj = fromBits(value, value < 0 ? -1 : 0, false);\n if (cache)\n INT_CACHE[value] = obj;\n return obj;\n }\n}\n/**\n * Returns a Long representing the given 32 bit integer value.\n * @function\n * @param {number} value The 32 bit integer in question\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long} The corresponding Long value\n */\n// Long.fromInt = fromInt;\n/**\n * @param {number} value\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\nexport function fromNumber(value, unsigned) {\n if (isNaN(value))\n return unsigned ? UZERO : ZERO;\n if (unsigned) {\n if (value < 0)\n return UZERO;\n if (value >= TWO_PWR_64_DBL)\n return MAX_UNSIGNED_VALUE;\n }\n else {\n if (value <= -TWO_PWR_63_DBL)\n return MIN_VALUE;\n if (value + 1 >= TWO_PWR_63_DBL)\n return MAX_VALUE;\n }\n if (value < 0)\n return negate(fromNumber(-value, unsigned));\n return fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);\n}\n/**\n * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.\n * @function\n * @param {number} value The number in question\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long} The corresponding Long value\n */\n// Long.fromNumber = fromNumber;\n/**\n * @param {number} lowBits\n * @param {number} highBits\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\nexport function fromBits(lowBits, highBits, unsigned) {\n return new Long(lowBits, highBits, unsigned);\n}\n/**\n * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is\n * assumed to use 32 bits.\n * @function\n * @param {number} lowBits The low 32 bits\n * @param {number} highBits The high 32 bits\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long} The corresponding Long value\n */\n// Long.fromBits = fromBits;\n/**\n * @function\n * @param {number} base\n * @param {number} exponent\n * @returns {number}\n * @inner\n */\nvar pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4)\n/**\n * @param {string} str\n * @param {(boolean|number)=} unsigned\n * @param {number=} radix\n * @returns {!Long}\n * @inner\n */\nexport function fromString(str, unsigned, radix) {\n if (str.length === 0)\n throw Error('empty string');\n if (str === \"NaN\" || str === \"Infinity\" || str === \"+Infinity\" || str === \"-Infinity\")\n return ZERO;\n if (typeof unsigned === 'number') {\n // For goog.math.long compatibility\n radix = unsigned,\n unsigned = false;\n }\n else {\n unsigned = !!unsigned;\n }\n radix = radix || 10;\n if (radix < 2 || 36 < radix)\n throw RangeError('radix');\n var p = str.indexOf('-');\n if (p > 0)\n throw Error('interior hyphen');\n else if (p === 0) {\n return negate(fromString(str.substring(1), unsigned, radix));\n }\n // Do several (8) digits each time through the loop, so as to\n // minimize the calls to the very expensive emulated div.\n var radixToPower = fromNumber(pow_dbl(radix, 8));\n var result = ZERO;\n for (var i = 0; i < str.length; i += 8) {\n var size = Math.min(8, str.length - i), value = parseInt(str.substring(i, i + size), radix);\n if (size < 8) {\n var power = fromNumber(pow_dbl(radix, size));\n result = add(multiply(result, power), fromNumber(value));\n }\n else {\n result = multiply(result, radixToPower);\n result = add(result, fromNumber(value));\n }\n }\n result.unsigned = unsigned;\n return result;\n}\n/**\n * Returns a Long representation of the given string, written using the specified radix.\n * @function\n * @param {string} str The textual representation of the Long\n * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to signed\n * @param {number=} radix The radix in which the text is written (2-36), defaults to 10\n * @returns {!Long} The corresponding Long value\n */\n// Long.fromString = fromString;\n/**\n * @function\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\nexport function fromValue(val, unsigned) {\n if (typeof val === 'number')\n return fromNumber(val, unsigned);\n if (typeof val === 'string')\n return fromString(val, unsigned);\n // Throws for non-objects, converts non-instanceof Long:\n return fromBits(val.low, val.high, typeof unsigned === 'boolean' ? unsigned : val.unsigned);\n}\n/**\n * Converts the specified value to a Long using the appropriate from* function for its type.\n * @function\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long}\n */\n// Long.fromValue = fromValue;\n// NOTE: the compiler should inline these constant values below and then remove these variables, so there should be\n// no runtime penalty for these.\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar TWO_PWR_16_DBL = 1 << 16;\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar TWO_PWR_24_DBL = 1 << 24;\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;\n/**\n * @type {!Long}\n * @const\n * @inner\n */\nvar TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);\n/**\n * @type {!Long}\n * @inner\n */\nexport var ZERO = fromInt(0);\n/**\n * Signed zero.\n * @type {!Long}\n */\n// Long.ZERO = ZERO;\n/**\n * @type {!Long}\n * @inner\n */\nexport var UZERO = fromInt(0, true);\n/**\n * Unsigned zero.\n * @type {!Long}\n */\n// Long.UZERO = UZERO;\n/**\n * @type {!Long}\n * @inner\n */\nexport var ONE = fromInt(1);\n/**\n * Signed one.\n * @type {!Long}\n */\n// Long.ONE = ONE;\n/**\n * @type {!Long}\n * @inner\n */\nexport var UONE = fromInt(1, true);\n/**\n * Unsigned one.\n * @type {!Long}\n */\n// Long.UONE = UONE;\n/**\n * @type {!Long}\n * @inner\n */\nexport var NEG_ONE = fromInt(-1);\n/**\n * Signed negative one.\n * @type {!Long}\n */\n// Long.NEG_ONE = NEG_ONE;\n/**\n * @type {!Long}\n * @inner\n */\nexport var MAX_VALUE = fromBits(0xFFFFFFFF | 0, 0x7FFFFFFF | 0, false);\n/**\n * Maximum signed value.\n * @type {!Long}\n */\n// Long.MAX_VALUE = MAX_VALUE;\n/**\n * @type {!Long}\n * @inner\n */\nexport var MAX_UNSIGNED_VALUE = fromBits(0xFFFFFFFF | 0, 0xFFFFFFFF | 0, true);\n/**\n * Maximum unsigned value.\n * @type {!Long}\n */\n// Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;\n/**\n * @type {!Long}\n * @inner\n */\nexport var MIN_VALUE = fromBits(0, 0x80000000 | 0, false);\n/**\n * Minimum signed value.\n * @type {!Long}\n */\n// Long.MIN_VALUE = MIN_VALUE;\n/**\n * @alias Long.prototype\n * @inner\n */\n// var LongPrototype = Long.prototype;\n/**\n * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.\n * @this {!Long}\n * @returns {number}\n */\nexport function toInt($this) {\n return $this.unsigned ? $this.low >>> 0 : $this.low;\n}\n;\n/**\n * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).\n * @this {!Long}\n * @returns {number}\n */\nexport function toNumber($this) {\n if ($this.unsigned)\n return (($this.high >>> 0) * TWO_PWR_32_DBL) + ($this.low >>> 0);\n return $this.high * TWO_PWR_32_DBL + ($this.low >>> 0);\n}\n;\n/**\n * Converts the Long to a string written in the specified radix.\n * @this {!Long}\n * @param {number=} radix Radix (2-36), defaults to 10\n * @returns {string}\n * @override\n * @throws {RangeError} If `radix` is out of range\n */\nexport function toString($this, radix) {\n radix = radix || 10;\n if (radix < 2 || 36 < radix)\n throw RangeError('radix');\n if (isZero($this))\n return '0';\n if (isNegative($this)) { // Unsigned Longs are never negative\n if (equals($this, MIN_VALUE)) {\n // We need to change the Long value before it can be negated, so we remove\n // the bottom-most digit in this base and then recurse to do the rest.\n var radixLong = fromNumber(radix), div = divide($this, radixLong), rem1 = subtract(multiply(div, radixLong), $this);\n return toString(div, radix) + toInt(rem1).toString(radix);\n }\n else\n return '-' + toString(negate($this), radix);\n }\n // Do several (6) digits each time through the loop, so as to\n // minimize the calls to the very expensive emulated div.\n var radixToPower = fromNumber(pow_dbl(radix, 6), $this.unsigned), rem = $this;\n var result = '';\n while (true) {\n var remDiv = divide(rem, radixToPower), intval = toInt(subtract(rem, multiply(remDiv, radixToPower))) >>> 0, digits = intval.toString(radix);\n rem = remDiv;\n if (isZero(rem))\n return digits + result;\n else {\n while (digits.length < 6)\n digits = '0' + digits;\n result = '' + digits + result;\n }\n }\n}\n;\n/**\n * Gets the high 32 bits as a signed integer.\n * @this {!Long}\n * @returns {number} Signed high bits\n */\nexport function getHighBits($this) {\n return $this.high;\n}\n;\n/**\n * Gets the high 32 bits as an unsigned integer.\n * @this {!Long}\n * @returns {number} Unsigned high bits\n */\nexport function getHighBitsUnsigned($this) {\n return $this.high >>> 0;\n}\n;\n/**\n * Gets the low 32 bits as a signed integer.\n * @this {!Long}\n * @returns {number} Signed low bits\n */\nexport function getLowBits($this) {\n return $this.low;\n}\n;\n/**\n * Gets the low 32 bits as an unsigned integer.\n * @this {!Long}\n * @returns {number} Unsigned low bits\n */\nexport function getLowBitsUnsigned($this) {\n return $this.low >>> 0;\n}\n;\n/**\n * Gets the number of bits needed to represent the absolute value of this Long.\n * @this {!Long}\n * @returns {number}\n */\nexport function getNumBitsAbs($this) {\n if (isNegative($this)) // Unsigned Longs are never negative\n return equals($this, MIN_VALUE) ? 64 : getNumBitsAbs(negate($this));\n var val = $this.high != 0 ? $this.high : $this.low;\n for (var bit = 31; bit > 0; bit--)\n if ((val & (1 << bit)) != 0)\n break;\n return $this.high != 0 ? bit + 33 : bit + 1;\n}\n;\n/**\n * Tests if this Long's value equals zero.\n * @this {!Long}\n * @returns {boolean}\n */\nexport function isZero($this) {\n return $this.high === 0 && $this.low === 0;\n}\n;\n/**\n * Tests if this Long's value equals zero. This is an alias of {@link Long#isZero}.\n * @returns {boolean}\n */\n// LongPrototype.eqz = LongPrototype.isZero;\n/**\n * Tests if this Long's value is negative.\n * @this {!Long}\n * @returns {boolean}\n */\nexport function isNegative($this) {\n return !$this.unsigned && $this.high < 0;\n}\n;\n/**\n * Tests if this Long's value is positive.\n * @this {!Long}\n * @returns {boolean}\n */\nexport function isPositive($this) {\n return $this.unsigned || $this.high >= 0;\n}\n;\n/**\n * Tests if this Long's value is odd.\n * @this {!Long}\n * @returns {boolean}\n */\nexport function isOdd($this) {\n return ($this.low & 1) === 1;\n}\n;\n/**\n * Tests if this Long's value is even.\n * @this {!Long}\n * @returns {boolean}\n */\nexport function isEven($this) {\n return ($this.low & 1) === 0;\n}\n;\n/**\n * Tests if this Long's value equals the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nexport function equals($this, other) {\n if (!isLong(other))\n other = fromValue(other);\n if ($this.unsigned !== other.unsigned && ($this.high >>> 31) === 1 && (other.high >>> 31) === 1)\n return false;\n return $this.high === other.high && $this.low === other.low;\n}\n;\n/**\n * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\n// LongPrototype.eq = LongPrototype.equals;\n/**\n * Tests if this Long's value differs from the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nexport function notEquals($this, other) {\n return !equals($this, /* validates */ other);\n}\n;\n/**\n * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\n// LongPrototype.neq = LongPrototype.notEquals;\n/**\n * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\n// LongPrototype.ne = LongPrototype.notEquals;\n/**\n * Tests if this Long's value is less than the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nexport function lessThan($this, other) {\n return compare($this, /* validates */ other) < 0;\n}\n;\n/**\n * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\n// LongPrototype.lt = LongPrototype.lessThan;\n/**\n * Tests if this Long's value is less than or equal the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nexport function lessThanOrEqual($this, other) {\n return compare($this, /* validates */ other) <= 0;\n}\n;\n/**\n * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\n// LongPrototype.lte = LongPrototype.lessThanOrEqual;\n/**\n * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\n// LongPrototype.le = LongPrototype.lessThanOrEqual;\n/**\n * Tests if this Long's value is greater than the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nexport function greaterThan($this, other) {\n return compare($this, /* validates */ other) > 0;\n}\n;\n/**\n * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\n// LongPrototype.gt = LongPrototype.greaterThan;\n/**\n * Tests if this Long's value is greater than or equal the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nexport function greaterThanOrEqual($this, other) {\n return compare($this, /* validates */ other) >= 0;\n}\n;\n/**\n * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\n// LongPrototype.gte = LongPrototype.greaterThanOrEqual;\n/**\n * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\n// LongPrototype.ge = LongPrototype.greaterThanOrEqual;\n/**\n * Compares this Long's value with the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\n * if the given one is greater\n */\nexport function compare($this, other) {\n if (!isLong(other))\n other = fromValue(other);\n if (equals($this, other))\n return 0;\n var thisNeg = isNegative($this), otherNeg = isNegative(other);\n if (thisNeg && !otherNeg)\n return -1;\n if (!thisNeg && otherNeg)\n return 1;\n // At this point the sign bits are the same\n if (!$this.unsigned)\n return isNegative(subtract($this, other)) ? -1 : 1;\n // Both are positive if at least one is unsigned\n return (other.high >>> 0) > ($this.high >>> 0) || (other.high === $this.high && (other.low >>> 0) > ($this.low >>> 0)) ? -1 : 1;\n}\n;\n/**\n * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\n * if the given one is greater\n */\n// LongPrototype.comp = LongPrototype.compare;\n/**\n * Negates this Long's value.\n * @this {!Long}\n * @returns {!Long} Negated Long\n */\nexport function negate($this) {\n if (!$this.unsigned && equals($this, MIN_VALUE))\n return MIN_VALUE;\n return add(not($this), ONE);\n}\n;\n/**\n * Negates this Long's value. This is an alias of {@link Long#negate}.\n * @function\n * @returns {!Long} Negated Long\n */\n// LongPrototype.neg = LongPrototype.negate;\n/**\n * Returns the sum of this and the specified Long.\n * @this {!Long}\n * @param {!Long|number|string} addend Addend\n * @returns {!Long} Sum\n */\nexport function add($this, addend) {\n if (!isLong(addend))\n addend = fromValue(addend);\n // Divide each number into 4 chunks of 16 bits, and then sum the chunks.\n var a48 = $this.high >>> 16;\n var a32 = $this.high & 0xFFFF;\n var a16 = $this.low >>> 16;\n var a00 = $this.low & 0xFFFF;\n var b48 = addend.high >>> 16;\n var b32 = addend.high & 0xFFFF;\n var b16 = addend.low >>> 16;\n var b00 = addend.low & 0xFFFF;\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\n c00 += a00 + b00;\n c16 += c00 >>> 16;\n c00 &= 0xFFFF;\n c16 += a16 + b16;\n c32 += c16 >>> 16;\n c16 &= 0xFFFF;\n c32 += a32 + b32;\n c48 += c32 >>> 16;\n c32 &= 0xFFFF;\n c48 += a48 + b48;\n c48 &= 0xFFFF;\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, $this.unsigned);\n}\n;\n/**\n * Returns the difference of this and the specified Long.\n * @this {!Long}\n * @param {!Long|number|string} subtrahend Subtrahend\n * @returns {!Long} Difference\n */\nexport function subtract($this, subtrahend) {\n if (!isLong(subtrahend))\n subtrahend = fromValue(subtrahend);\n return add($this, negate(subtrahend));\n}\n;\n/**\n * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}.\n * @function\n * @param {!Long|number|string} subtrahend Subtrahend\n * @returns {!Long} Difference\n */\n// LongPrototype.sub = LongPrototype.subtract;\n/**\n * Returns the product of this and the specified Long.\n * @this {!Long}\n * @param {!Long|number|string} multiplier Multiplier\n * @returns {!Long} Product\n */\nexport function multiply($this, multiplier) {\n if (isZero($this))\n return $this.unsigned ? UZERO : ZERO;\n if (!isLong(multiplier))\n multiplier = fromValue(multiplier);\n // use wasm support if present\n if (wasm) {\n var low = wasm.mul($this.low, $this.high, multiplier.low, multiplier.high);\n return fromBits(low, wasm.get_high(), $this.unsigned);\n }\n if (isZero(multiplier))\n return $this.unsigned ? UZERO : ZERO;\n if (equals($this, MIN_VALUE))\n return isOdd(multiplier) ? MIN_VALUE : ZERO;\n if (equals(multiplier, MIN_VALUE))\n return isOdd($this) ? MIN_VALUE : ZERO;\n if (isNegative($this)) {\n if (isNegative(multiplier))\n return multiply(negate($this), negate(multiplier));\n else\n return negate(multiply(negate($this), multiplier));\n }\n else if (isNegative(multiplier))\n return negate(multiply($this, negate(multiplier)));\n // If both longs are small, use float multiplication\n if (lessThan($this, TWO_PWR_24) && lessThan(multiplier, TWO_PWR_24))\n return fromNumber(toNumber($this) * toNumber(multiplier), $this.unsigned);\n // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products.\n // We can skip products that would overflow.\n var a48 = $this.high >>> 16;\n var a32 = $this.high & 0xFFFF;\n var a16 = $this.low >>> 16;\n var a00 = $this.low & 0xFFFF;\n var b48 = multiplier.high >>> 16;\n var b32 = multiplier.high & 0xFFFF;\n var b16 = multiplier.low >>> 16;\n var b00 = multiplier.low & 0xFFFF;\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\n c00 += a00 * b00;\n c16 += c00 >>> 16;\n c00 &= 0xFFFF;\n c16 += a16 * b00;\n c32 += c16 >>> 16;\n c16 &= 0xFFFF;\n c16 += a00 * b16;\n c32 += c16 >>> 16;\n c16 &= 0xFFFF;\n c32 += a32 * b00;\n c48 += c32 >>> 16;\n c32 &= 0xFFFF;\n c32 += a16 * b16;\n c48 += c32 >>> 16;\n c32 &= 0xFFFF;\n c32 += a00 * b32;\n c48 += c32 >>> 16;\n c32 &= 0xFFFF;\n c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;\n c48 &= 0xFFFF;\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, $this.unsigned);\n}\n;\n/**\n * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}.\n * @function\n * @param {!Long|number|string} multiplier Multiplier\n * @returns {!Long} Product\n */\n// LongPrototype.mul = LongPrototype.multiply;\n/**\n * Returns this Long divided by the specified. The result is signed if this Long is signed or\n * unsigned if this Long is unsigned.\n * @this {!Long}\n * @param {!Long|number|string} divisor Divisor\n * @returns {!Long} Quotient\n */\nexport function divide($this, divisor) {\n if (!isLong(divisor))\n divisor = fromValue(divisor);\n if (isZero(divisor))\n throw Error('division by zero');\n // use wasm support if present\n if (wasm) {\n // guard against signed division overflow: the largest\n // negative number / -1 would be 1 larger than the largest\n // positive number, due to two's complement.\n if (!$this.unsigned &&\n $this.high === -0x80000000 &&\n divisor.low === -1 && divisor.high === -1) {\n // be consistent with non-wasm code path\n return $this;\n }\n var low = ($this.unsigned ? wasm.div_u : wasm.div_s)($this.low, $this.high, divisor.low, divisor.high);\n return fromBits(low, wasm.get_high(), $this.unsigned);\n }\n if (isZero($this))\n return $this.unsigned ? UZERO : ZERO;\n var approx, rem, res;\n if (!$this.unsigned) {\n // This section is only relevant for signed longs and is derived from the\n // closure library as a whole.\n if (equals($this, MIN_VALUE)) {\n if (equals(divisor, ONE) || equals(divisor, NEG_ONE))\n return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE\n else if (equals(divisor, MIN_VALUE))\n return ONE;\n else {\n // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.\n var halfThis = shiftRight($this, 1);\n approx = shiftLeft(divide(halfThis, divisor), 1);\n if (equals(approx, ZERO)) {\n return isNegative(divisor) ? ONE : NEG_ONE;\n }\n else {\n rem = subtract($this, multiply(divisor, approx));\n res = add(approx, divide(rem, divisor));\n return res;\n }\n }\n }\n else if (equals(divisor, MIN_VALUE))\n return $this.unsigned ? UZERO : ZERO;\n if (isNegative($this)) {\n if (isNegative(divisor))\n return divide(negate($this), negate(divisor));\n return negate(divide(negate($this), divisor));\n }\n else if (isNegative(divisor))\n return negate(divide($this, negate(divisor)));\n res = ZERO;\n }\n else {\n // The algorithm below has not been made for unsigned longs. It's therefore\n // required to take special care of the MSB prior to running it.\n if (!divisor.unsigned)\n divisor = toUnsigned(divisor);\n if (greaterThan(divisor, $this))\n return UZERO;\n if (greaterThan(divisor, shiftRightUnsigned($this, 1))) // 15 >>> 1 = 7 ; with divisor = 8 ; true\n return UONE;\n res = UZERO;\n }\n // Repeat the following until the remainder is less than other: find a\n // floating-point that approximates remainder / other *from below*, add this\n // into the result, and subtract it from the remainder. It is critical that\n // the approximate value is less than or equal to the real value so that the\n // remainder never becomes negative.\n rem = $this;\n while (greaterThanOrEqual(rem, divisor)) {\n // Approximate the result of division. This may be a little greater or\n // smaller than the actual value.\n approx = Math.max(1, Math.floor(toNumber(rem) / toNumber(divisor)));\n // We will tweak the approximate result by changing it in the 48-th digit or\n // the smallest non-fractional digit, whichever is larger.\n var log2 = Math.ceil(Math.log(approx) / Math.LN2), delta = (log2 <= 48) ? 1 : pow_dbl(2, log2 - 48), \n // Decrease the approximation until it is smaller than the remainder. Note\n // that if it is too large, the product overflows and is negative.\n approxRes = fromNumber(approx), approxRem = multiply(approxRes, divisor);\n while (isNegative(approxRem) || greaterThan(approxRem, rem)) {\n approx -= delta;\n approxRes = fromNumber(approx, $this.unsigned);\n approxRem = multiply(approxRes, divisor);\n }\n // We know the answer can't be zero... and actually, zero would cause\n // infinite recursion since we would make no progress.\n if (isZero(approxRes))\n approxRes = ONE;\n res = add(res, approxRes);\n rem = subtract(rem, approxRem);\n }\n return res;\n}\n;\n/**\n * Returns this Long divided by the specified. This is an alias of {@link Long#divide}.\n * @function\n * @param {!Long|number|string} divisor Divisor\n * @returns {!Long} Quotient\n */\n// LongPrototype.div = LongPrototype.divide;\n/**\n * Returns this Long modulo the specified.\n * @this {!Long}\n * @param {!Long|number|string} divisor Divisor\n * @returns {!Long} Remainder\n */\nexport function modulo($this, divisor) {\n if (!isLong(divisor))\n divisor = fromValue(divisor);\n // use wasm support if present\n if (wasm) {\n var low = ($this.unsigned ? wasm.rem_u : wasm.rem_s)($this.low, $this.high, divisor.low, divisor.high);\n return fromBits(low, wasm.get_high(), $this.unsigned);\n }\n return subtract($this, multiply(divide($this, divisor), divisor));\n}\n;\n/**\n * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\n * @function\n * @param {!Long|number|string} divisor Divisor\n * @returns {!Long} Remainder\n */\n// LongPrototype.mod = LongPrototype.modulo;\n/**\n * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\n * @function\n * @param {!Long|number|string} divisor Divisor\n * @returns {!Long} Remainder\n */\n// LongPrototype.rem = LongPrototype.modulo;\n/**\n * Returns the bitwise NOT of this Long.\n * @this {!Long}\n * @returns {!Long}\n */\nexport function not($this) {\n return fromBits(~$this.low, ~$this.high, $this.unsigned);\n}\n;\n/**\n * Returns the bitwise AND of this Long and the specified.\n * @this {!Long}\n * @param {!Long|number|string} other Other Long\n * @returns {!Long}\n */\nexport function and($this, other) {\n if (!isLong(other))\n other = fromValue(other);\n return fromBits($this.low & other.low, $this.high & other.high, $this.unsigned);\n}\n;\n/**\n * Returns the bitwise OR of this Long and the specified.\n * @this {!Long}\n * @param {!Long|number|string} other Other Long\n * @returns {!Long}\n */\nexport function or($this, other) {\n if (!isLong(other))\n other = fromValue(other);\n return fromBits($this.low | other.low, $this.high | other.high, $this.unsigned);\n}\n;\n/**\n * Returns the bitwise XOR of this Long and the given one.\n * @this {!Long}\n * @param {!Long|number|string} other Other Long\n * @returns {!Long}\n */\nexport function xor($this, other) {\n if (!isLong(other))\n other = fromValue(other);\n return fromBits($this.low ^ other.low, $this.high ^ other.high, $this.unsigned);\n}\n;\n/**\n * Returns this Long with bits shifted to the left by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nexport function shiftLeft($this, numBits) {\n if (isLong(numBits))\n numBits = toInt(numBits);\n if ((numBits &= 63) === 0)\n return $this;\n else if (numBits < 32)\n return fromBits($this.low << numBits, ($this.high << numBits) | ($this.low >>> (32 - numBits)), $this.unsigned);\n else\n return fromBits(0, $this.low << (numBits - 32), $this.unsigned);\n}\n;\n/**\n * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\n// LongPrototype.shl = LongPrototype.shiftLeft;\n/**\n * Returns this Long with bits arithmetically shifted to the right by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nexport function shiftRight($this, numBits) {\n if (isLong(numBits))\n numBits = toInt(numBits);\n if ((numBits &= 63) === 0)\n return $this;\n else if (numBits < 32)\n return fromBits(($this.low >>> numBits) | ($this.high << (32 - numBits)), $this.high >> numBits, $this.unsigned);\n else\n return fromBits($this.high >> (numBits - 32), $this.high >= 0 ? 0 : -1, $this.unsigned);\n}\n;\n/**\n * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\n// LongPrototype.shr = LongPrototype.shiftRight;\n/**\n * Returns this Long with bits logically shifted to the right by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nexport function shiftRightUnsigned($this, numBits) {\n if (isLong(numBits))\n numBits = toInt(numBits);\n numBits &= 63;\n if (numBits === 0)\n return $this;\n else {\n var high = $this.high;\n if (numBits < 32) {\n var low = $this.low;\n return fromBits((low >>> numBits) | (high << (32 - numBits)), high >>> numBits, $this.unsigned);\n }\n else if (numBits === 32)\n return fromBits(high, 0, $this.unsigned);\n else\n return fromBits(high >>> (numBits - 32), 0, $this.unsigned);\n }\n}\n;\n/**\n * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\n// LongPrototype.shru = LongPrototype.shiftRightUnsigned;\n/**\n * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\n// LongPrototype.shr_u = LongPrototype.shiftRightUnsigned;\n/**\n * Returns this Long with bits rotated to the left by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\nexport const rotateLeft = function rotateLeft(numBits) {\n var b;\n if (isLong(numBits))\n numBits = numBits.toInt();\n if ((numBits &= 63) === 0)\n return this;\n if (numBits === 32)\n return fromBits(this.high, this.low, this.unsigned);\n if (numBits < 32) {\n b = (32 - numBits);\n return fromBits(((this.low << numBits) | (this.high >>> b)), ((this.high << numBits) | (this.low >>> b)), this.unsigned);\n }\n numBits -= 32;\n b = (32 - numBits);\n return fromBits(((this.high << numBits) | (this.low >>> b)), ((this.low << numBits) | (this.high >>> b)), this.unsigned);\n};\n/**\n * Returns this Long with bits rotated to the left by the given amount. This is an alias of {@link Long#rotateLeft}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\n// LongPrototype.rotl = LongPrototype.rotateLeft;\n/**\n * Returns this Long with bits rotated to the right by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\nexport const rotateRight = function rotateRight(numBits) {\n var b;\n if (isLong(numBits))\n numBits = numBits.toInt();\n if ((numBits &= 63) === 0)\n return this;\n if (numBits === 32)\n return fromBits(this.high, this.low, this.unsigned);\n if (numBits < 32) {\n b = (32 - numBits);\n return fromBits(((this.high << b) | (this.low >>> numBits)), ((this.low << b) | (this.high >>> numBits)), this.unsigned);\n }\n numBits -= 32;\n b = (32 - numBits);\n return fromBits(((this.low << b) | (this.high >>> numBits)), ((this.high << b) | (this.low >>> numBits)), this.unsigned);\n};\n/**\n * Returns this Long with bits rotated to the right by the given amount. This is an alias of {@link Long#rotateRight}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\n// LongPrototype.rotr = LongPrototype.rotateRight;\n/**\n * Converts this Long to signed.\n * @this {!Long}\n * @returns {!Long} Signed long\n */\nexport function toSigned($this) {\n if (!$this.unsigned)\n return $this;\n return fromBits($this.low, $this.high, false);\n}\n;\n/**\n * Converts this Long to unsigned.\n * @this {!Long}\n * @returns {!Long} Unsigned long\n */\nexport function toUnsigned($this) {\n if ($this.unsigned)\n return $this;\n return fromBits($this.low, $this.high, true);\n}\n;\n/**\n * Converts this Long to its byte representation.\n * @param {boolean=} le Whether little or big endian, defaults to big endian\n * @this {!Long}\n * @returns {!Array.} Byte representation\n */\nexport function toBytes($this, le) {\n return le ? toBytesLE($this) : toBytesBE($this);\n}\n;\n/**\n * Converts this Long to its little endian byte representation.\n * @this {!Long}\n * @returns {!Array.} Little endian byte representation\n */\nexport function toBytesLE($this) {\n var hi = $this.high, lo = $this.low;\n return [\n lo & 0xff,\n lo >>> 8 & 0xff,\n lo >>> 16 & 0xff,\n lo >>> 24,\n hi & 0xff,\n hi >>> 8 & 0xff,\n hi >>> 16 & 0xff,\n hi >>> 24\n ];\n}\n;\n/**\n * Converts this Long to its big endian byte representation.\n * @this {!Long}\n * @returns {!Array.} Big endian byte representation\n */\nexport function toBytesBE($this) {\n var hi = $this.high, lo = $this.low;\n return [\n hi >>> 24,\n hi >>> 16 & 0xff,\n hi >>> 8 & 0xff,\n hi & 0xff,\n lo >>> 24,\n lo >>> 16 & 0xff,\n lo >>> 8 & 0xff,\n lo & 0xff\n ];\n}\n;\n/**\n * Creates a Long from its byte representation.\n * @param {!Array.} bytes Byte representation\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @param {boolean=} le Whether little or big endian, defaults to big endian\n * @returns {Long} The corresponding Long value\n */\nexport function fromBytes(bytes, unsigned, le) {\n return le ? fromBytesLE(bytes, unsigned) : fromBytesBE(bytes, unsigned);\n}\n;\n/**\n * Creates a Long from its little endian byte representation.\n * @param {!Array.} bytes Little endian byte representation\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {Long} The corresponding Long value\n */\nexport function fromBytesLE(bytes, unsigned) {\n return new Long(bytes[0] |\n bytes[1] << 8 |\n bytes[2] << 16 |\n bytes[3] << 24, bytes[4] |\n bytes[5] << 8 |\n bytes[6] << 16 |\n bytes[7] << 24, unsigned);\n}\n;\n/**\n * Creates a Long from its big endian byte representation.\n * @param {!Array.} bytes Big endian byte representation\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {Long} The corresponding Long value\n */\nexport function fromBytesBE(bytes, unsigned) {\n return new Long(bytes[4] << 24 |\n bytes[5] << 16 |\n bytes[6] << 8 |\n bytes[7], bytes[0] << 24 |\n bytes[1] << 16 |\n bytes[2] << 8 |\n bytes[3], unsigned);\n}\n;\n","import { isValid } from \"./Int32.js\";\nimport * as LongLib from \"./lib/long.js\";\nexport default LongLib.Long;\nexport const get_Zero = LongLib.ZERO;\nexport const get_One = LongLib.ONE;\nexport const op_Addition = LongLib.add;\nexport const op_Subtraction = LongLib.subtract;\nexport const op_Multiply = LongLib.multiply;\nexport const op_Division = LongLib.divide;\nexport const op_Modulus = LongLib.modulo;\nexport const op_UnaryNegation = LongLib.negate;\nexport const op_LeftShift = LongLib.shiftLeft;\nexport const op_RightShift = LongLib.shiftRight;\nexport const op_RightShiftUnsigned = LongLib.shiftRightUnsigned;\nexport const op_BitwiseAnd = LongLib.and;\nexport const op_BitwiseOr = LongLib.or;\nexport const op_ExclusiveOr = LongLib.xor;\nexport const op_LogicalNot = LongLib.not;\nexport const op_LessThan = LongLib.lessThan;\nexport const op_LessThanOrEqual = LongLib.lessThanOrEqual;\nexport const op_GreaterThan = LongLib.greaterThan;\nexport const op_GreaterThanOrEqual = LongLib.greaterThanOrEqual;\nexport const op_Equality = LongLib.equals;\nexport const op_Inequality = LongLib.notEquals;\nexport const equals = LongLib.equals;\nexport const compare = LongLib.compare;\nexport const fromInt = LongLib.fromInt;\nexport const fromBits = LongLib.fromBits;\nexport const fromBytes = LongLib.fromBytes;\nexport const fromNumber = LongLib.fromNumber;\nexport const fromString = LongLib.fromString;\nexport const fromValue = LongLib.fromValue;\nexport const toInt = LongLib.toInt;\nexport const toBytes = LongLib.toBytes;\nexport const toNumber = LongLib.toNumber;\nexport const toString = LongLib.toString;\nexport const getLowBits = LongLib.getLowBits;\nexport const getHighBits = LongLib.getHighBits;\nexport const getLowBitsUnsigned = LongLib.getLowBitsUnsigned;\nexport const getHighBitsUnsigned = LongLib.getHighBitsUnsigned;\nfunction getMaxValue(unsigned, radix, isNegative) {\n switch (radix) {\n case 2: return unsigned ?\n \"1111111111111111111111111111111111111111111111111111111111111111\" :\n (isNegative ? \"1000000000000000000000000000000000000000000000000000000000000000\"\n : \"111111111111111111111111111111111111111111111111111111111111111\");\n case 8: return unsigned ?\n \"1777777777777777777777\" :\n (isNegative ? \"1000000000000000000000\" : \"777777777777777777777\");\n case 10: return unsigned ?\n \"18446744073709551615\" :\n (isNegative ? \"9223372036854775808\" : \"9223372036854775807\");\n case 16: return unsigned ?\n \"FFFFFFFFFFFFFFFF\" :\n (isNegative ? \"8000000000000000\" : \"7FFFFFFFFFFFFFFF\");\n default: throw new Error(\"Invalid radix.\");\n }\n}\nexport function abs(x) {\n if (!x.unsigned && LongLib.isNegative(x)) {\n return op_UnaryNegation(x);\n }\n else {\n return x;\n }\n}\nexport function fromInteger(value, unsigned, kind) {\n let x = value;\n let xh = 0;\n switch (kind) {\n case 0:\n x = value << 24 >> 24;\n xh = x;\n break;\n case 4:\n x = value << 24 >>> 24;\n break;\n case 1:\n x = value << 16 >> 16;\n xh = x;\n break;\n case 5:\n x = value << 16 >>> 16;\n break;\n case 2:\n x = value >> 0;\n xh = x;\n break;\n case 6:\n x = value >>> 0;\n break;\n }\n return LongLib.fromBits(x, xh >> 31, unsigned);\n}\nexport function parse(str, style, unsigned, _bitsize, radix) {\n const res = isValid(str, style, radix);\n if (res != null) {\n const lessOrEqual = (x, y) => {\n const len = Math.max(x.length, y.length);\n return x.padStart(len, \"0\") <= y.padStart(len, \"0\");\n };\n const isNegative = res.sign === \"-\";\n const maxValue = getMaxValue(unsigned || res.radix !== 10, res.radix, isNegative);\n if (lessOrEqual(res.digits.toUpperCase(), maxValue)) {\n str = isNegative ? res.sign + res.digits : res.digits;\n return LongLib.fromString(str, unsigned, res.radix);\n }\n }\n throw new Error(\"Input string was not in a correct format.\");\n}\nexport function tryParse(str, style, unsigned, bitsize, defValue) {\n try {\n defValue.contents = parse(str, style, unsigned, bitsize);\n return true;\n }\n catch (_a) {\n return false;\n }\n}\nexport function unixEpochMillisecondsToTicks(ms, offset) {\n return op_Multiply(op_Addition(op_Addition(LongLib.fromNumber(ms), 62135596800000), offset), 10000);\n}\nexport function ticksToUnixEpochMilliseconds(ticks) {\n return LongLib.toNumber(op_Subtraction(op_Division(ticks, 10000), 62135596800000));\n}\n// export function makeRangeStepFunction(step: Long, last: Long, unsigned: boolean) {\n// const stepComparedWithZero = LongLib.compare(step, unsigned ? LongLib.UZERO : LongLib.ZERO);\n// if (stepComparedWithZero === 0) {\n// throw new Error(\"The step of a range cannot be zero\");\n// }\n// const stepGreaterThanZero = stepComparedWithZero > 0;\n// return (x: Long) => {\n// const comparedWithLast = LongLib.compare(x, last);\n// if ((stepGreaterThanZero && comparedWithLast <= 0)\n// || (!stepGreaterThanZero && comparedWithLast >= 0)) {\n// return [x, op_Addition(x, step)];\n// } else {\n// return undefined;\n// }\n// };\n// }\n","/**\n * DateTimeOffset functions.\n *\n * Note: Date instances are always DateObjects in local\n * timezone (because JS dates are all kinds of messed up).\n * A local date returns UTC epoc when `.getTime()` is called.\n *\n * Basically; invariant: date.getTime() always return UTC time.\n */\nimport { fromValue, ticksToUnixEpochMilliseconds, unixEpochMillisecondsToTicks } from \"./Long.js\";\nimport { compareDates, dateOffset, padWithZeros } from \"./Util.js\";\nexport const offsetRegex = /(?:Z|[+-](\\d+):?([0-5]?\\d)?)\\s*$/;\nexport function dateOffsetToString(offset) {\n const isMinus = offset < 0;\n offset = Math.abs(offset);\n const hours = ~~(offset / 3600000);\n const minutes = (offset % 3600000) / 60000;\n return (isMinus ? \"-\" : \"+\") +\n padWithZeros(hours, 2) + \":\" +\n padWithZeros(minutes, 2);\n}\nexport function dateToHalfUTCString(date, half) {\n const str = date.toISOString();\n return half === \"first\"\n ? str.substring(0, str.indexOf(\"T\"))\n : str.substring(str.indexOf(\"T\") + 1, str.length - 1);\n}\nfunction dateToISOString(d, utc) {\n if (utc) {\n return d.toISOString();\n }\n else {\n // JS Date is always local\n const printOffset = d.kind == null ? true : d.kind === 2 /* Local */;\n return padWithZeros(d.getFullYear(), 4) + \"-\" +\n padWithZeros(d.getMonth() + 1, 2) + \"-\" +\n padWithZeros(d.getDate(), 2) + \"T\" +\n padWithZeros(d.getHours(), 2) + \":\" +\n padWithZeros(d.getMinutes(), 2) + \":\" +\n padWithZeros(d.getSeconds(), 2) + \".\" +\n padWithZeros(d.getMilliseconds(), 3) +\n (printOffset ? dateOffsetToString(d.getTimezoneOffset() * -60000) : \"\");\n }\n}\nfunction dateToISOStringWithOffset(dateWithOffset, offset) {\n const str = dateWithOffset.toISOString();\n return str.substring(0, str.length - 1) + dateOffsetToString(offset);\n}\nfunction dateToStringWithCustomFormat(date, format, utc) {\n return format.replace(/(\\w)\\1*/g, (match) => {\n let rep = Number.NaN;\n switch (match.substring(0, 1)) {\n case \"y\":\n const y = utc ? date.getUTCFullYear() : date.getFullYear();\n rep = match.length < 4 ? y % 100 : y;\n break;\n case \"M\":\n rep = (utc ? date.getUTCMonth() : date.getMonth()) + 1;\n break;\n case \"d\":\n rep = utc ? date.getUTCDate() : date.getDate();\n break;\n case \"H\":\n rep = utc ? date.getUTCHours() : date.getHours();\n break;\n case \"h\":\n const h = utc ? date.getUTCHours() : date.getHours();\n rep = h > 12 ? h % 12 : h;\n break;\n case \"m\":\n rep = utc ? date.getUTCMinutes() : date.getMinutes();\n break;\n case \"s\":\n rep = utc ? date.getUTCSeconds() : date.getSeconds();\n break;\n case \"f\":\n rep = utc ? date.getUTCMilliseconds() : date.getMilliseconds();\n break;\n }\n if (Number.isNaN(rep)) {\n return match;\n }\n else {\n return (rep < 10 && match.length > 1) ? \"0\" + rep : \"\" + rep;\n }\n });\n}\nfunction dateToStringWithOffset(date, format) {\n var _a, _b, _c;\n const d = new Date(date.getTime() + ((_a = date.offset) !== null && _a !== void 0 ? _a : 0));\n if (typeof format !== \"string\") {\n return d.toISOString().replace(/\\.\\d+/, \"\").replace(/[A-Z]|\\.\\d+/g, \" \") + dateOffsetToString(((_b = date.offset) !== null && _b !== void 0 ? _b : 0));\n }\n else if (format.length === 1) {\n switch (format) {\n case \"D\":\n case \"d\": return dateToHalfUTCString(d, \"first\");\n case \"T\":\n case \"t\": return dateToHalfUTCString(d, \"second\");\n case \"O\":\n case \"o\": return dateToISOStringWithOffset(d, ((_c = date.offset) !== null && _c !== void 0 ? _c : 0));\n default: throw new Error(\"Unrecognized Date print format\");\n }\n }\n else {\n return dateToStringWithCustomFormat(d, format, true);\n }\n}\nfunction dateToStringWithKind(date, format) {\n const utc = date.kind === 1 /* UTC */;\n if (typeof format !== \"string\") {\n return utc ? date.toUTCString() : date.toLocaleString();\n }\n else if (format.length === 1) {\n switch (format) {\n case \"D\":\n case \"d\":\n return utc ? dateToHalfUTCString(date, \"first\") : date.toLocaleDateString();\n case \"T\":\n case \"t\":\n return utc ? dateToHalfUTCString(date, \"second\") : date.toLocaleTimeString();\n case \"O\":\n case \"o\":\n return dateToISOString(date, utc);\n default:\n throw new Error(\"Unrecognized Date print format\");\n }\n }\n else {\n return dateToStringWithCustomFormat(date, format, utc);\n }\n}\nexport function toString(date, format, _provider) {\n return date.offset != null\n ? dateToStringWithOffset(date, format)\n : dateToStringWithKind(date, format);\n}\nexport function DateTime(value, kind) {\n const d = new Date(value);\n d.kind = (kind == null ? 0 /* Unspecified */ : kind) | 0;\n return d;\n}\nexport function fromTicks(ticks, kind) {\n ticks = fromValue(ticks);\n kind = kind != null ? kind : 0 /* Unspecified */;\n let date = DateTime(ticksToUnixEpochMilliseconds(ticks), kind);\n // Ticks are local to offset (in this case, either UTC or Local/Unknown).\n // If kind is anything but UTC, that means that the tick number was not\n // in utc, thus getTime() cannot return UTC, and needs to be shifted.\n if (kind !== 1 /* UTC */) {\n date = DateTime(date.getTime() - dateOffset(date), kind);\n }\n return date;\n}\nexport function fromDateTimeOffset(date, kind) {\n var _a;\n switch (kind) {\n case 1 /* UTC */: return DateTime(date.getTime(), 1 /* UTC */);\n case 2 /* Local */: return DateTime(date.getTime(), 2 /* Local */);\n default:\n const d = DateTime(date.getTime() + ((_a = date.offset) !== null && _a !== void 0 ? _a : 0), kind);\n return DateTime(d.getTime() - dateOffset(d), kind);\n }\n}\nexport function getTicks(date) {\n return unixEpochMillisecondsToTicks(date.getTime(), dateOffset(date));\n}\nexport function minValue() {\n // This is \"0001-01-01T00:00:00.000Z\", actual JS min value is -8640000000000000\n return DateTime(-62135596800000, 0 /* Unspecified */);\n}\nexport function maxValue() {\n // This is \"9999-12-31T23:59:59.999Z\", actual JS max value is 8640000000000000\n return DateTime(253402300799999, 0 /* Unspecified */);\n}\nexport function parseRaw(input) {\n if (input === null) {\n throw new Error(\"Value cannot be null when parsing DateTime\");\n }\n if (input.trim() === \"\") {\n throw new Error(\"An empty string is not recognized as a valid DateTime\");\n }\n let date = new Date(input);\n if (isNaN(date.getTime())) {\n // Try to check strings JS Date cannot parse (see #1045, #1422)\n // tslint:disable-next-line:max-line-length\n const m = /^\\s*(\\d+[^\\w\\s:]\\d+[^\\w\\s:]\\d+)?\\s*(\\d+:\\d+(?::\\d+(?:\\.\\d+)?)?)?\\s*([AaPp][Mm])?\\s*([+-]\\d+(?::\\d+)?)?\\s*$/.exec(input);\n if (m != null) {\n let baseDate;\n let timeInSeconds = 0;\n if (m[2] != null) {\n const timeParts = m[2].split(\":\");\n timeInSeconds =\n parseInt(timeParts[0], 10) * 3600 +\n parseInt(timeParts[1] || \"0\", 10) * 60 +\n parseFloat(timeParts[2] || \"0\");\n if (m[3] != null && m[3].toUpperCase() === \"PM\") {\n timeInSeconds += 720;\n }\n }\n if (m[4] != null) { // There's an offset, parse as UTC\n if (m[1] != null) {\n baseDate = new Date(m[1] + \" UTC\");\n }\n else {\n const d = new Date();\n baseDate = new Date(d.getUTCFullYear() + \"/\" + (d.getUTCMonth() + 1) + \"/\" + d.getUTCDate());\n }\n const offsetParts = m[4].substr(1).split(\":\");\n let offsetInMinutes = parseInt(offsetParts[0], 10) * 60 + parseInt(offsetParts[1] || \"0\", 10);\n if (m[4][0] === \"+\") {\n offsetInMinutes *= -1;\n }\n timeInSeconds += offsetInMinutes * 60;\n }\n else {\n if (m[1] != null) {\n baseDate = new Date(m[1]);\n }\n else {\n const d = new Date();\n baseDate = new Date(d.getFullYear() + \"/\" + (d.getMonth() + 1) + \"/\" + d.getDate());\n }\n }\n date = new Date(baseDate.getTime() + timeInSeconds * 1000);\n // correct for daylight savings time\n date = new Date(date.getTime() + (date.getTimezoneOffset() - baseDate.getTimezoneOffset()) * 60000);\n }\n else {\n throw new Error(\"The string is not a valid Date.\");\n }\n }\n return date;\n}\nexport function parse(str, detectUTC = false) {\n const date = parseRaw(str);\n const offset = offsetRegex.exec(str);\n // .NET always parses DateTime as Local if there's offset info (even \"Z\")\n // Newtonsoft.Json uses UTC if the offset is \"Z\"\n const kind = offset != null\n ? (detectUTC && offset[0] === \"Z\" ? 1 /* UTC */ : 2 /* Local */)\n : 0 /* Unspecified */;\n return DateTime(date.getTime(), kind);\n}\nexport function tryParse(v, defValue) {\n try {\n defValue.contents = parse(v);\n return true;\n }\n catch (_err) {\n return false;\n }\n}\nexport function create(year, month, day, h = 0, m = 0, s = 0, ms = 0, kind) {\n const dateValue = kind === 1 /* UTC */\n ? Date.UTC(year, month - 1, day, h, m, s, ms)\n : new Date(year, month - 1, day, h, m, s, ms).getTime();\n if (isNaN(dateValue)) {\n throw new Error(\"The parameters describe an unrepresentable Date.\");\n }\n const date = DateTime(dateValue, kind);\n if (year <= 99) {\n date.setFullYear(year, month - 1, day);\n }\n return date;\n}\nexport function now() {\n return DateTime(Date.now(), 2 /* Local */);\n}\nexport function utcNow() {\n return DateTime(Date.now(), 1 /* UTC */);\n}\nexport function today() {\n return date(now());\n}\nexport function isLeapYear(year) {\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n}\nexport function daysInMonth(year, month) {\n return month === 2\n ? (isLeapYear(year) ? 29 : 28)\n : (month >= 8 ? (month % 2 === 0 ? 31 : 30) : (month % 2 === 0 ? 30 : 31));\n}\nexport function toUniversalTime(date) {\n return date.kind === 1 /* UTC */ ? date : DateTime(date.getTime(), 1 /* UTC */);\n}\nexport function toLocalTime(date) {\n return date.kind === 2 /* Local */ ? date : DateTime(date.getTime(), 2 /* Local */);\n}\nexport function specifyKind(d, kind) {\n return create(year(d), month(d), day(d), hour(d), minute(d), second(d), millisecond(d), kind);\n}\nexport function timeOfDay(d) {\n return hour(d) * 3600000\n + minute(d) * 60000\n + second(d) * 1000\n + millisecond(d);\n}\nexport function date(d) {\n return create(year(d), month(d), day(d), 0, 0, 0, 0, d.kind);\n}\nexport function day(d) {\n return d.kind === 1 /* UTC */ ? d.getUTCDate() : d.getDate();\n}\nexport function hour(d) {\n return d.kind === 1 /* UTC */ ? d.getUTCHours() : d.getHours();\n}\nexport function millisecond(d) {\n return d.kind === 1 /* UTC */ ? d.getUTCMilliseconds() : d.getMilliseconds();\n}\nexport function minute(d) {\n return d.kind === 1 /* UTC */ ? d.getUTCMinutes() : d.getMinutes();\n}\nexport function month(d) {\n return (d.kind === 1 /* UTC */ ? d.getUTCMonth() : d.getMonth()) + 1;\n}\nexport function second(d) {\n return d.kind === 1 /* UTC */ ? d.getUTCSeconds() : d.getSeconds();\n}\nexport function year(d) {\n return d.kind === 1 /* UTC */ ? d.getUTCFullYear() : d.getFullYear();\n}\nexport function dayOfWeek(d) {\n return d.kind === 1 /* UTC */ ? d.getUTCDay() : d.getDay();\n}\nexport function dayOfYear(d) {\n const _year = year(d);\n const _month = month(d);\n let _day = day(d);\n for (let i = 1; i < _month; i++) {\n _day += daysInMonth(_year, i);\n }\n return _day;\n}\nexport function add(d, ts) {\n const newDate = DateTime(d.getTime() + ts, d.kind);\n if (d.kind === 2 /* Local */) {\n const oldTzOffset = d.getTimezoneOffset();\n const newTzOffset = newDate.getTimezoneOffset();\n return oldTzOffset !== newTzOffset\n ? DateTime(newDate.getTime() + (newTzOffset - oldTzOffset) * 60000, d.kind)\n : newDate;\n }\n else {\n return newDate;\n }\n}\nexport function addDays(d, v) {\n return add(d, v * 86400000);\n}\nexport function addHours(d, v) {\n return add(d, v * 3600000);\n}\nexport function addMinutes(d, v) {\n return add(d, v * 60000);\n}\nexport function addSeconds(d, v) {\n return add(d, v * 1000);\n}\nexport function addMilliseconds(d, v) {\n return add(d, v);\n}\nexport function addYears(d, v) {\n const newMonth = month(d);\n const newYear = year(d) + v;\n const _daysInMonth = daysInMonth(newYear, newMonth);\n const newDay = Math.min(_daysInMonth, day(d));\n return create(newYear, newMonth, newDay, hour(d), minute(d), second(d), millisecond(d), d.kind);\n}\nexport function addMonths(d, v) {\n let newMonth = month(d) + v;\n let newMonth_ = 0;\n let yearOffset = 0;\n if (newMonth > 12) {\n newMonth_ = newMonth % 12;\n yearOffset = Math.floor(newMonth / 12);\n newMonth = newMonth_;\n }\n else if (newMonth < 1) {\n newMonth_ = 12 + newMonth % 12;\n yearOffset = Math.floor(newMonth / 12) + (newMonth_ === 12 ? -1 : 0);\n newMonth = newMonth_;\n }\n const newYear = year(d) + yearOffset;\n const _daysInMonth = daysInMonth(newYear, newMonth);\n const newDay = Math.min(_daysInMonth, day(d));\n return create(newYear, newMonth, newDay, hour(d), minute(d), second(d), millisecond(d), d.kind);\n}\nexport function subtract(d, that) {\n return typeof that === \"number\"\n ? add(d, -that)\n : d.getTime() - that.getTime();\n}\nexport function toLongDateString(d) {\n return d.toDateString();\n}\nexport function toShortDateString(d) {\n return d.toLocaleDateString();\n}\nexport function toLongTimeString(d) {\n return d.toLocaleTimeString();\n}\nexport function toShortTimeString(d) {\n return d.toLocaleTimeString().replace(/:\\d\\d(?!:)/, \"\");\n}\nexport function equals(d1, d2) {\n return d1.getTime() === d2.getTime();\n}\nexport const compare = compareDates;\nexport const compareTo = compareDates;\nexport function op_Addition(x, y) {\n return add(x, y);\n}\nexport function op_Subtraction(x, y) {\n return subtract(x, y);\n}\nexport function isDaylightSavingTime(x) {\n const jan = new Date(x.getFullYear(), 0, 1);\n const jul = new Date(x.getFullYear(), 6, 1);\n return isDST(jan.getTimezoneOffset(), jul.getTimezoneOffset(), x.getTimezoneOffset());\n}\nfunction isDST(janOffset, julOffset, tOffset) {\n return Math.min(janOffset, julOffset) === tOffset;\n}\nexport default DateTime;\n","export function create(pattern, options = 0) {\n // Supported RegexOptions\n // * IgnoreCase: 0x0001\n // * Multiline: 0x0002\n // * Singleline: 0x0010\n // * ECMAScript: 0x0100 (ignored)\n if ((options & ~(1 ^ 2 ^ 16 ^ 256)) !== 0) {\n throw new Error(\"RegexOptions only supports: IgnoreCase, Multiline, Singleline and ECMAScript\");\n }\n let flags = \"g\";\n flags += options & 1 ? \"i\" : \"\"; // 0x0001 RegexOptions.IgnoreCase\n flags += options & 2 ? \"m\" : \"\";\n flags += options & 16 ? \"s\" : \"\";\n return new RegExp(pattern, flags);\n}\n// From http://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex\nexport function escape(str) {\n return str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, \"\\\\$&\");\n}\nexport function unescape(str) {\n return str.replace(/\\\\([\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|])/g, \"$1\");\n}\nexport function isMatch(str, pattern, options = 0) {\n let reg;\n reg = str instanceof RegExp\n ? (reg = str, str = pattern, reg.lastIndex = options, reg)\n : reg = create(pattern, options);\n return reg.test(str);\n}\nexport function match(str, pattern, options = 0) {\n let reg;\n reg = str instanceof RegExp\n ? (reg = str, str = pattern, reg.lastIndex = options, reg)\n : reg = create(pattern, options);\n return reg.exec(str);\n}\nexport function matches(str, pattern, options = 0) {\n let reg;\n reg = str instanceof RegExp\n ? (reg = str, str = pattern, reg.lastIndex = options, reg)\n : reg = create(pattern, options);\n if (!reg.global) {\n throw new Error(\"Non-global RegExp\"); // Prevent infinite loop\n }\n let m = reg.exec(str);\n const matches = [];\n while (m !== null) {\n matches.push(m);\n m = reg.exec(str);\n }\n return matches;\n}\nexport function options(reg) {\n let options = 256; // ECMAScript\n options |= reg.ignoreCase ? 1 : 0;\n options |= reg.multiline ? 2 : 0;\n return options;\n}\nexport function replace(reg, input, replacement, limit, offset = 0) {\n function replacer() {\n let res = arguments[0];\n if (limit) {\n limit--;\n const match = [];\n const len = arguments.length;\n // arguments: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_function_as_a_parameter\n // * match: matched substring\n // * p1, p2, ...: nth capture group string\n // * offset: offset of matched substring\n // * string: whole string examined\n // * groups: named capturing groups\n // ONLY if regex contains a named capture group AND browser supports named groups\n // -> last element can be groups OR input string\n // -> check if last element is string\n const withGroups = typeof arguments[len - 1] !== \"string\";\n let pLast = withGroups ? len - 3 : len - 2;\n for (let i = 0; i < pLast; i++) {\n match.push(arguments[i]);\n }\n match.index = arguments[pLast++];\n match.input = arguments[pLast++];\n if (withGroups) {\n match.groups = arguments[pLast];\n }\n res = replacement(match);\n }\n return res;\n }\n if (typeof reg === \"string\") {\n const tmp = reg;\n reg = create(input, limit !== null && limit !== void 0 ? limit : 0);\n input = tmp;\n limit = undefined;\n }\n if (typeof replacement === \"function\") {\n limit = limit == null ? -1 : limit;\n return input.substring(0, offset) + input.substring(offset).replace(reg, replacer);\n }\n else {\n replacement =\n replacement\n // $0 doesn't work with JS regex, see #1155\n .replace(/\\$0/g, (_s) => \"$&\")\n // named groups in replacement are `${name}` in .Net, but `$` in JS (in regex: groups are `(?...)` in both)\n .replace(/\\${([^}]+)}/g, \"\\$<$1>\");\n if (limit != null) {\n let m;\n const sub1 = input.substring(offset);\n const _matches = matches(reg, sub1);\n const sub2 = matches.length > limit ? (m = _matches[limit - 1], sub1.substring(0, m.index + m[0].length)) : sub1;\n return input.substring(0, offset) + sub2.replace(reg, replacement)\n + input.substring(offset + sub2.length);\n }\n else {\n return input.replace(reg, replacement);\n }\n }\n}\nexport function split(reg, input, limit, offset = 0) {\n if (typeof reg === \"string\") {\n const tmp = reg;\n reg = create(input, limit !== null && limit !== void 0 ? limit : 0);\n input = tmp;\n limit = undefined;\n }\n input = input.substring(offset);\n return input.split(reg, limit);\n}\n","import { toString as dateToString } from \"./Date.js\";\nimport { compare as numericCompare, isNumeric, multiply, toExponential, toFixed, toHex, toPrecision } from \"./Numeric.js\";\nimport { escape } from \"./RegExp.js\";\nimport { toString } from \"./Types.js\";\nconst fsFormatRegExp = /(^|[^%])%([0+\\- ]*)(\\*|\\d+)?(?:\\.(\\d+))?(\\w)/g;\nconst interpolateRegExp = /(?:(^|[^%])%([0+\\- ]*)(\\d+)?(?:\\.(\\d+))?(\\w))?%P\\(\\)/g;\nconst formatRegExp = /\\{(\\d+)(,-?\\d+)?(?:\\:([a-zA-Z])(\\d{0,2})|\\:(.+?))?\\}/g;\nfunction isLessThan(x, y) {\n return numericCompare(x, y) < 0;\n}\nfunction cmp(x, y, ic) {\n function isIgnoreCase(i) {\n return i === true ||\n i === 1 /* CurrentCultureIgnoreCase */ ||\n i === 3 /* InvariantCultureIgnoreCase */ ||\n i === 5 /* OrdinalIgnoreCase */;\n }\n function isOrdinal(i) {\n return i === 4 /* Ordinal */ ||\n i === 5 /* OrdinalIgnoreCase */;\n }\n if (x == null) {\n return y == null ? 0 : -1;\n }\n if (y == null) {\n return 1;\n } // everything is bigger than null\n if (isOrdinal(ic)) {\n if (isIgnoreCase(ic)) {\n x = x.toLowerCase();\n y = y.toLowerCase();\n }\n return (x === y) ? 0 : (x < y ? -1 : 1);\n }\n else {\n if (isIgnoreCase(ic)) {\n x = x.toLocaleLowerCase();\n y = y.toLocaleLowerCase();\n }\n return x.localeCompare(y);\n }\n}\nexport function compare(...args) {\n switch (args.length) {\n case 2: return cmp(args[0], args[1], false);\n case 3: return cmp(args[0], args[1], args[2]);\n case 4: return cmp(args[0], args[1], args[2] === true);\n case 5: return cmp(args[0].substr(args[1], args[4]), args[2].substr(args[3], args[4]), false);\n case 6: return cmp(args[0].substr(args[1], args[4]), args[2].substr(args[3], args[4]), args[5]);\n case 7: return cmp(args[0].substr(args[1], args[4]), args[2].substr(args[3], args[4]), args[5] === true);\n default: throw new Error(\"String.compare: Unsupported number of parameters\");\n }\n}\nexport function compareOrdinal(x, y) {\n return cmp(x, y, 4 /* Ordinal */);\n}\nexport function compareTo(x, y) {\n return cmp(x, y, 0 /* CurrentCulture */);\n}\nexport function startsWith(str, pattern, ic) {\n if (str.length >= pattern.length) {\n return cmp(str.substr(0, pattern.length), pattern, ic) === 0;\n }\n return false;\n}\nexport function indexOfAny(str, anyOf, ...args) {\n if (str == null || str === \"\") {\n return -1;\n }\n const startIndex = (args.length > 0) ? args[0] : 0;\n if (startIndex < 0) {\n throw new Error(\"Start index cannot be negative\");\n }\n const length = (args.length > 1) ? args[1] : str.length - startIndex;\n if (length < 0) {\n throw new Error(\"Length cannot be negative\");\n }\n if (length > str.length - startIndex) {\n throw new Error(\"Invalid startIndex and length\");\n }\n str = str.substr(startIndex, length);\n for (const c of anyOf) {\n const index = str.indexOf(c);\n if (index > -1) {\n return index + startIndex;\n }\n }\n return -1;\n}\nexport function printf(input) {\n return {\n input,\n cont: fsFormat(input),\n };\n}\nexport function interpolate(str, values) {\n let valIdx = 0;\n let strIdx = 0;\n let result = \"\";\n interpolateRegExp.lastIndex = 0;\n let match = interpolateRegExp.exec(str);\n while (match) {\n // The first group corresponds to the no-escape char (^|[^%]), the actual pattern starts in the next char\n // Note: we don't use negative lookbehind because some browsers don't support it yet\n const matchIndex = match.index + (match[1] || \"\").length;\n result += str.substring(strIdx, matchIndex).replace(/%%/g, \"%\");\n const [, , flags, padLength, precision, format] = match;\n result += formatReplacement(values[valIdx++], flags, padLength, precision, format);\n strIdx = interpolateRegExp.lastIndex;\n // Likewise we need to move interpolateRegExp.lastIndex one char behind to make sure we match the no-escape char next time\n interpolateRegExp.lastIndex -= 1;\n match = interpolateRegExp.exec(str);\n }\n result += str.substring(strIdx).replace(/%%/g, \"%\");\n return result;\n}\nfunction continuePrint(cont, arg) {\n return typeof arg === \"string\" ? cont(arg) : arg.cont(cont);\n}\nexport function toConsole(arg) {\n // Don't remove the lambda here, see #1357\n return continuePrint((x) => console.log(x), arg);\n}\nexport function toConsoleError(arg) {\n return continuePrint((x) => console.error(x), arg);\n}\nexport function toText(arg) {\n return continuePrint((x) => x, arg);\n}\nexport function toFail(arg) {\n return continuePrint((x) => {\n throw new Error(x);\n }, arg);\n}\nfunction formatReplacement(rep, flags, padLength, precision, format) {\n let sign = \"\";\n flags = flags || \"\";\n format = format || \"\";\n if (isNumeric(rep)) {\n if (format.toLowerCase() !== \"x\") {\n if (isLessThan(rep, 0)) {\n rep = multiply(rep, -1);\n sign = \"-\";\n }\n else {\n if (flags.indexOf(\" \") >= 0) {\n sign = \" \";\n }\n else if (flags.indexOf(\"+\") >= 0) {\n sign = \"+\";\n }\n }\n }\n precision = precision == null ? null : parseInt(precision, 10);\n switch (format) {\n case \"f\":\n case \"F\":\n precision = precision != null ? precision : 6;\n rep = toFixed(rep, precision);\n break;\n case \"g\":\n case \"G\":\n rep = precision != null ? toPrecision(rep, precision) : toPrecision(rep);\n break;\n case \"e\":\n case \"E\":\n rep = precision != null ? toExponential(rep, precision) : toExponential(rep);\n break;\n case \"x\":\n rep = toHex(rep);\n break;\n case \"X\":\n rep = toHex(rep).toUpperCase();\n break;\n default: // AOid\n rep = String(rep);\n break;\n }\n }\n else if (rep instanceof Date) {\n rep = dateToString(rep);\n }\n else {\n rep = toString(rep);\n }\n padLength = typeof padLength === \"number\" ? padLength : parseInt(padLength, 10);\n if (!isNaN(padLength)) {\n const zeroFlag = flags.indexOf(\"0\") >= 0; // Use '0' for left padding\n const minusFlag = flags.indexOf(\"-\") >= 0; // Right padding\n const ch = minusFlag || !zeroFlag ? \" \" : \"0\";\n if (ch === \"0\") {\n rep = padLeft(rep, padLength - sign.length, ch, minusFlag);\n rep = sign + rep;\n }\n else {\n rep = padLeft(sign + rep, padLength, ch, minusFlag);\n }\n }\n else {\n rep = sign + rep;\n }\n return rep;\n}\nfunction createPrinter(cont, _strParts, _matches, _result = \"\", padArg = -1) {\n return (...args) => {\n // Make copies of the values passed by reference because the function can be used multiple times\n let result = _result;\n const strParts = _strParts.slice();\n const matches = _matches.slice();\n for (const arg of args) {\n const [, , flags, _padLength, precision, format] = matches[0];\n let padLength = _padLength;\n if (padArg >= 0) {\n padLength = padArg;\n padArg = -1;\n }\n else if (padLength === \"*\") {\n if (arg < 0) {\n throw new Error(\"Non-negative number required\");\n }\n padArg = arg;\n continue;\n }\n result += strParts[0];\n result += formatReplacement(arg, flags, padLength, precision, format);\n strParts.splice(0, 1);\n matches.splice(0, 1);\n }\n if (matches.length === 0) {\n result += strParts[0];\n return cont(result);\n }\n else {\n return createPrinter(cont, strParts, matches, result, padArg);\n }\n };\n}\nexport function fsFormat(str) {\n return (cont) => {\n fsFormatRegExp.lastIndex = 0;\n const strParts = [];\n const matches = [];\n let strIdx = 0;\n let match = fsFormatRegExp.exec(str);\n while (match) {\n // The first group corresponds to the no-escape char (^|[^%]), the actual pattern starts in the next char\n // Note: we don't use negative lookbehind because some browsers don't support it yet\n const matchIndex = match.index + (match[1] || \"\").length;\n strParts.push(str.substring(strIdx, matchIndex).replace(/%%/g, \"%\"));\n matches.push(match);\n strIdx = fsFormatRegExp.lastIndex;\n // Likewise we need to move fsFormatRegExp.lastIndex one char behind to make sure we match the no-escape char next time\n fsFormatRegExp.lastIndex -= 1;\n match = fsFormatRegExp.exec(str);\n }\n if (strParts.length === 0) {\n return cont(str.replace(/%%/g, \"%\"));\n }\n else {\n strParts.push(str.substring(strIdx).replace(/%%/g, \"%\"));\n return createPrinter(cont, strParts, matches);\n }\n };\n}\nexport function format(str, ...args) {\n if (typeof str === \"object\" && args.length > 0) {\n // Called with culture info\n str = args[0];\n args.shift();\n }\n return str.replace(formatRegExp, (_, idx, padLength, format, precision, pattern) => {\n let rep = args[idx];\n if (isNumeric(rep)) {\n precision = precision == null ? null : parseInt(precision, 10);\n switch (format) {\n case \"f\":\n case \"F\":\n precision = precision != null ? precision : 2;\n rep = toFixed(rep, precision);\n break;\n case \"g\":\n case \"G\":\n rep = precision != null ? toPrecision(rep, precision) : toPrecision(rep);\n break;\n case \"e\":\n case \"E\":\n rep = precision != null ? toExponential(rep, precision) : toExponential(rep);\n break;\n case \"p\":\n case \"P\":\n precision = precision != null ? precision : 2;\n rep = toFixed(multiply(rep, 100), precision) + \" %\";\n break;\n case \"d\":\n case \"D\":\n rep = precision != null ? padLeft(String(rep), precision, \"0\") : String(rep);\n break;\n case \"x\":\n case \"X\":\n rep = precision != null ? padLeft(toHex(rep), precision, \"0\") : toHex(rep);\n if (format === \"X\") {\n rep = rep.toUpperCase();\n }\n break;\n default:\n if (pattern) {\n let sign = \"\";\n rep = pattern.replace(/(0+)(\\.0+)?/, (_, intPart, decimalPart) => {\n if (isLessThan(rep, 0)) {\n rep = multiply(rep, -1);\n sign = \"-\";\n }\n rep = toFixed(rep, decimalPart != null ? decimalPart.length - 1 : 0);\n return padLeft(rep, (intPart || \"\").length - sign.length + (decimalPart != null ? decimalPart.length : 0), \"0\");\n });\n rep = sign + rep;\n }\n }\n }\n else if (rep instanceof Date) {\n rep = dateToString(rep, pattern || format);\n }\n else {\n rep = toString(rep);\n }\n padLength = parseInt((padLength || \" \").substring(1), 10);\n if (!isNaN(padLength)) {\n rep = padLeft(String(rep), Math.abs(padLength), \" \", padLength < 0);\n }\n return rep;\n });\n}\nexport function endsWith(str, search) {\n const idx = str.lastIndexOf(search);\n return idx >= 0 && idx === str.length - search.length;\n}\nexport function initialize(n, f) {\n if (n < 0) {\n throw new Error(\"String length must be non-negative\");\n }\n const xs = new Array(n);\n for (let i = 0; i < n; i++) {\n xs[i] = f(i);\n }\n return xs.join(\"\");\n}\nexport function insert(str, startIndex, value) {\n if (startIndex < 0 || startIndex > str.length) {\n throw new Error(\"startIndex is negative or greater than the length of this instance.\");\n }\n return str.substring(0, startIndex) + value + str.substring(startIndex);\n}\nexport function isNullOrEmpty(str) {\n return typeof str !== \"string\" || str.length === 0;\n}\nexport function isNullOrWhiteSpace(str) {\n return typeof str !== \"string\" || /^\\s*$/.test(str);\n}\nexport function concat(...xs) {\n return xs.map((x) => String(x)).join(\"\");\n}\nexport function join(delimiter, xs) {\n if (Array.isArray(xs)) {\n return xs.join(delimiter);\n }\n else {\n return Array.from(xs).join(delimiter);\n }\n}\nexport function joinWithIndices(delimiter, xs, startIndex, count) {\n const endIndexPlusOne = startIndex + count;\n if (endIndexPlusOne > xs.length) {\n throw new Error(\"Index and count must refer to a location within the buffer.\");\n }\n return xs.slice(startIndex, endIndexPlusOne).join(delimiter);\n}\nfunction notSupported(name) {\n throw new Error(\"The environment doesn't support '\" + name + \"', please use a polyfill.\");\n}\nexport function toBase64String(inArray) {\n let str = \"\";\n for (let i = 0; i < inArray.length; i++) {\n str += String.fromCharCode(inArray[i]);\n }\n return typeof btoa === \"function\" ? btoa(str) : notSupported(\"btoa\");\n}\nexport function fromBase64String(b64Encoded) {\n const binary = typeof atob === \"function\" ? atob(b64Encoded) : notSupported(\"atob\");\n const bytes = new Uint8Array(binary.length);\n for (let i = 0; i < binary.length; i++) {\n bytes[i] = binary.charCodeAt(i);\n }\n return bytes;\n}\nexport function padLeft(str, len, ch, isRight) {\n ch = ch || \" \";\n len = len - str.length;\n for (let i = 0; i < len; i++) {\n str = isRight ? str + ch : ch + str;\n }\n return str;\n}\nexport function padRight(str, len, ch) {\n return padLeft(str, len, ch, true);\n}\nexport function remove(str, startIndex, count) {\n if (startIndex >= str.length) {\n throw new Error(\"startIndex must be less than length of string\");\n }\n if (typeof count === \"number\" && (startIndex + count) > str.length) {\n throw new Error(\"Index and count must refer to a location within the string.\");\n }\n return str.slice(0, startIndex) + (typeof count === \"number\" ? str.substr(startIndex + count) : \"\");\n}\nexport function replace(str, search, replace) {\n return str.replace(new RegExp(escape(search), \"g\"), replace);\n}\nexport function replicate(n, x) {\n return initialize(n, () => x);\n}\nexport function getCharAtIndex(input, index) {\n if (index < 0 || index >= input.length) {\n throw new Error(\"Index was outside the bounds of the array.\");\n }\n return input[index];\n}\nexport function split(str, splitters, count, removeEmpty) {\n count = typeof count === \"number\" ? count : undefined;\n removeEmpty = typeof removeEmpty === \"number\" ? removeEmpty : undefined;\n if (count && count < 0) {\n throw new Error(\"Count cannot be less than zero\");\n }\n if (count === 0) {\n return [];\n }\n if (!Array.isArray(splitters)) {\n if (removeEmpty === 0) {\n return str.split(splitters, count);\n }\n const len = arguments.length;\n splitters = Array(len - 1);\n for (let key = 1; key < len; key++) {\n splitters[key - 1] = arguments[key];\n }\n }\n splitters = splitters.map((x) => escape(x));\n splitters = splitters.length > 0 ? splitters : [\" \"];\n let i = 0;\n const splits = [];\n const reg = new RegExp(splitters.join(\"|\"), \"g\");\n while (count == null || count > 1) {\n const m = reg.exec(str);\n if (m === null) {\n break;\n }\n if (!removeEmpty || (m.index - i) > 0) {\n count = count != null ? count - 1 : count;\n splits.push(str.substring(i, m.index));\n }\n i = reg.lastIndex;\n }\n if (!removeEmpty || (str.length - i) > 0) {\n splits.push(str.substring(i));\n }\n return splits;\n}\nexport function trim(str, ...chars) {\n if (chars.length === 0) {\n return str.trim();\n }\n const pattern = \"[\" + escape(chars.join(\"\")) + \"]+\";\n return str.replace(new RegExp(\"^\" + pattern), \"\").replace(new RegExp(pattern + \"$\"), \"\");\n}\nexport function trimStart(str, ...chars) {\n return chars.length === 0\n ? str.trimStart()\n : str.replace(new RegExp(\"^[\" + escape(chars.join(\"\")) + \"]+\"), \"\");\n}\nexport function trimEnd(str, ...chars) {\n return chars.length === 0\n ? str.trimEnd()\n : str.replace(new RegExp(\"[\" + escape(chars.join(\"\")) + \"]+$\"), \"\");\n}\nexport function filter(pred, x) {\n return x.split(\"\").filter((c) => pred(c)).join(\"\");\n}\nexport function substring(str, startIndex, length) {\n if ((startIndex + (length || 0) > str.length)) {\n throw new Error(\"Invalid startIndex and/or length\");\n }\n return length != null ? str.substr(startIndex, length) : str.substr(startIndex);\n}\n","import { value as value_2, defaultArg, some } from \"./Option.js\";\nimport { min as min_1, compare, getEnumerator, comparePrimitives, max as max_1 } from \"./Util.js\";\n\nexport function Helpers_allocateArrayFromCons(cons, len) {\n if ((typeof cons) === \"function\") {\n return new cons(len);\n }\n else {\n return new Array(len);\n }\n}\n\nfunction indexNotFound() {\n throw (new Error(\"An index satisfying the predicate was not found in the collection.\"));\n}\n\nfunction differentLengths() {\n throw (new Error(\"Arrays had different lengths\"));\n}\n\nexport function append(array1, array2, cons) {\n const len1 = array1.length | 0;\n const len2 = array2.length | 0;\n const newArray = Helpers_allocateArrayFromCons(cons, len1 + len2);\n for (let i = 0; i <= (len1 - 1); i++) {\n newArray[i] = array1[i];\n }\n for (let i_1 = 0; i_1 <= (len2 - 1); i_1++) {\n newArray[i_1 + len1] = array2[i_1];\n }\n return newArray;\n}\n\nexport function filter(predicate, array) {\n return array.filter(predicate);\n}\n\nexport function fill(target, targetIndex, count, value) {\n const start = targetIndex | 0;\n return target.fill(value, start, (start + count));\n}\n\nexport function getSubArray(array, start, count) {\n const start_1 = start | 0;\n return array.slice(start_1, (start_1 + count));\n}\n\nexport function last(array) {\n if (array.length === 0) {\n throw (new Error(\"The input array was empty\\\\nParameter name: array\"));\n }\n return array[array.length - 1];\n}\n\nexport function tryLast(array) {\n if (array.length === 0) {\n return void 0;\n }\n else {\n return some(array[array.length - 1]);\n }\n}\n\nexport function mapIndexed(f, source, cons) {\n const len = source.length | 0;\n const target = Helpers_allocateArrayFromCons(cons, len);\n for (let i = 0; i <= (len - 1); i++) {\n target[i] = f(i, source[i]);\n }\n return target;\n}\n\nexport function map(f, source, cons) {\n const len = source.length | 0;\n const target = Helpers_allocateArrayFromCons(cons, len);\n for (let i = 0; i <= (len - 1); i++) {\n target[i] = f(source[i]);\n }\n return target;\n}\n\nexport function mapIndexed2(f, source1, source2, cons) {\n if (source1.length !== source2.length) {\n throw (new Error(\"Arrays had different lengths\"));\n }\n const result = Helpers_allocateArrayFromCons(cons, source1.length);\n for (let i = 0; i <= (source1.length - 1); i++) {\n result[i] = f(i, source1[i], source2[i]);\n }\n return result;\n}\n\nexport function map2(f, source1, source2, cons) {\n if (source1.length !== source2.length) {\n throw (new Error(\"Arrays had different lengths\"));\n }\n const result = Helpers_allocateArrayFromCons(cons, source1.length);\n for (let i = 0; i <= (source1.length - 1); i++) {\n result[i] = f(source1[i], source2[i]);\n }\n return result;\n}\n\nexport function mapIndexed3(f, source1, source2, source3, cons) {\n if ((source1.length !== source2.length) ? true : (source2.length !== source3.length)) {\n throw (new Error(\"Arrays had different lengths\"));\n }\n const result = Helpers_allocateArrayFromCons(cons, source1.length);\n for (let i = 0; i <= (source1.length - 1); i++) {\n result[i] = f(i, source1[i], source2[i], source3[i]);\n }\n return result;\n}\n\nexport function map3(f, source1, source2, source3, cons) {\n if ((source1.length !== source2.length) ? true : (source2.length !== source3.length)) {\n throw (new Error(\"Arrays had different lengths\"));\n }\n const result = Helpers_allocateArrayFromCons(cons, source1.length);\n for (let i = 0; i <= (source1.length - 1); i++) {\n result[i] = f(source1[i], source2[i], source3[i]);\n }\n return result;\n}\n\nexport function mapFold(mapping, state, array, cons) {\n const matchValue = array.length | 0;\n if (matchValue === 0) {\n return [[], state];\n }\n else {\n let acc = state;\n const res = Helpers_allocateArrayFromCons(cons, matchValue);\n for (let i = 0; i <= (array.length - 1); i++) {\n const patternInput = mapping(acc, array[i]);\n res[i] = patternInput[0];\n acc = patternInput[1];\n }\n return [res, acc];\n }\n}\n\nexport function mapFoldBack(mapping, array, state, cons) {\n const matchValue = array.length | 0;\n if (matchValue === 0) {\n return [[], state];\n }\n else {\n let acc = state;\n const res = Helpers_allocateArrayFromCons(cons, matchValue);\n for (let i = array.length - 1; i >= 0; i--) {\n const patternInput = mapping(array[i], acc);\n res[i] = patternInput[0];\n acc = patternInput[1];\n }\n return [res, acc];\n }\n}\n\nexport function indexed(source) {\n const len = source.length | 0;\n const target = new Array(len);\n for (let i = 0; i <= (len - 1); i++) {\n target[i] = [i, source[i]];\n }\n return target;\n}\n\nexport function truncate(count, array) {\n const count_1 = max_1((x, y) => comparePrimitives(x, y), 0, count) | 0;\n const start = 0;\n return array.slice(start, (start + count_1));\n}\n\nexport function concat(arrays, cons) {\n const arrays_1 = Array.isArray(arrays) ? arrays : (Array.from(arrays));\n const matchValue = arrays_1.length | 0;\n switch (matchValue) {\n case 0: {\n return Helpers_allocateArrayFromCons(cons, 0);\n }\n case 1: {\n return arrays_1[0];\n }\n default: {\n let totalIdx = 0;\n let totalLength = 0;\n for (let idx = 0; idx <= (arrays_1.length - 1); idx++) {\n const arr_1 = arrays_1[idx];\n totalLength = ((totalLength + arr_1.length) | 0);\n }\n const result = Helpers_allocateArrayFromCons(cons, totalLength);\n for (let idx_1 = 0; idx_1 <= (arrays_1.length - 1); idx_1++) {\n const arr_2 = arrays_1[idx_1];\n for (let j = 0; j <= (arr_2.length - 1); j++) {\n result[totalIdx] = arr_2[j];\n totalIdx = ((totalIdx + 1) | 0);\n }\n }\n return result;\n }\n }\n}\n\nexport function collect(mapping, array, cons) {\n return concat(map(mapping, array, null), cons);\n}\n\nexport function where(predicate, array) {\n return array.filter(predicate);\n}\n\nexport function contains(value, array, eq) {\n const loop = (i_mut) => {\n loop:\n while (true) {\n const i = i_mut;\n if (i >= array.length) {\n return false;\n }\n else if (eq.Equals(value, array[i])) {\n return true;\n }\n else {\n i_mut = (i + 1);\n continue loop;\n }\n break;\n }\n };\n return loop(0);\n}\n\nexport function empty(cons) {\n return Helpers_allocateArrayFromCons(cons, 0);\n}\n\nexport function singleton(value, cons) {\n const ar = Helpers_allocateArrayFromCons(cons, 1);\n ar[0] = value;\n return ar;\n}\n\nexport function initialize(count, initializer, cons) {\n if (count < 0) {\n throw (new Error(\"The input must be non-negative\\\\nParameter name: count\"));\n }\n const result = Helpers_allocateArrayFromCons(cons, count);\n for (let i = 0; i <= (count - 1); i++) {\n result[i] = initializer(i);\n }\n return result;\n}\n\nexport function pairwise(array) {\n if (array.length < 2) {\n return [];\n }\n else {\n const count = (array.length - 1) | 0;\n const result = new Array(count);\n for (let i = 0; i <= (count - 1); i++) {\n result[i] = [array[i], array[i + 1]];\n }\n return result;\n }\n}\n\nexport function replicate(count, initial, cons) {\n if (count < 0) {\n throw (new Error(\"The input must be non-negative\\\\nParameter name: count\"));\n }\n const result = Helpers_allocateArrayFromCons(cons, count);\n for (let i = 0; i <= (result.length - 1); i++) {\n result[i] = initial;\n }\n return result;\n}\n\nexport function copy(array) {\n return array.slice();\n}\n\nexport function reverse(array) {\n const array_2 = array.slice();\n return array_2.reverse();\n}\n\nexport function scan(folder, state, array, cons) {\n const res = Helpers_allocateArrayFromCons(cons, array.length + 1);\n res[0] = state;\n for (let i = 0; i <= (array.length - 1); i++) {\n res[i + 1] = folder(res[i], array[i]);\n }\n return res;\n}\n\nexport function scanBack(folder, array, state, cons) {\n const res = Helpers_allocateArrayFromCons(cons, array.length + 1);\n res[array.length] = state;\n for (let i = array.length - 1; i >= 0; i--) {\n res[i] = folder(array[i], res[i + 1]);\n }\n return res;\n}\n\nexport function skip(count, array, cons) {\n if (count > array.length) {\n throw (new Error(\"count is greater than array length\\\\nParameter name: count\"));\n }\n if (count === array.length) {\n return Helpers_allocateArrayFromCons(cons, 0);\n }\n else {\n const count_1 = ((count < 0) ? 0 : count) | 0;\n return array.slice(count_1);\n }\n}\n\nexport function skipWhile(predicate, array, cons) {\n let count = 0;\n while ((count < array.length) ? predicate(array[count]) : false) {\n count = ((count + 1) | 0);\n }\n if (count === array.length) {\n return Helpers_allocateArrayFromCons(cons, 0);\n }\n else {\n const count_1 = count | 0;\n return array.slice(count_1);\n }\n}\n\nexport function take(count, array, cons) {\n if (count < 0) {\n throw (new Error(\"The input must be non-negative\\\\nParameter name: count\"));\n }\n if (count > array.length) {\n throw (new Error(\"count is greater than array length\\\\nParameter name: count\"));\n }\n if (count === 0) {\n return Helpers_allocateArrayFromCons(cons, 0);\n }\n else {\n const start = 0;\n return array.slice(start, (start + count));\n }\n}\n\nexport function takeWhile(predicate, array, cons) {\n let count = 0;\n while ((count < array.length) ? predicate(array[count]) : false) {\n count = ((count + 1) | 0);\n }\n if (count === 0) {\n return Helpers_allocateArrayFromCons(cons, 0);\n }\n else {\n const start = 0;\n const count_1 = count | 0;\n return array.slice(start, (start + count_1));\n }\n}\n\nexport function addInPlace(x, array) {\n void (array.push(x));\n}\n\nexport function addRangeInPlace(range, array) {\n const enumerator = getEnumerator(range);\n try {\n while (enumerator[\"System.Collections.IEnumerator.MoveNext\"]()) {\n addInPlace(enumerator[\"System.Collections.Generic.IEnumerator`1.get_Current\"](), array);\n }\n }\n finally {\n enumerator.Dispose();\n }\n}\n\nexport function insertRangeInPlace(index, range, array) {\n let index_1;\n let i = index | 0;\n const enumerator = getEnumerator(range);\n try {\n while (enumerator[\"System.Collections.IEnumerator.MoveNext\"]()) {\n const x = enumerator[\"System.Collections.Generic.IEnumerator`1.get_Current\"]();\n void (index_1 = (i | 0), array.splice(index_1, 0, x));\n i = ((i + 1) | 0);\n }\n }\n finally {\n enumerator.Dispose();\n }\n}\n\nexport function removeInPlace(item_1, array) {\n const i = array.indexOf(item_1, 0);\n if (i > -1) {\n void (array.splice(i, 1));\n return true;\n }\n else {\n return false;\n }\n}\n\nexport function removeAllInPlace(predicate, array) {\n const countRemoveAll = (count) => {\n const i = array.findIndex(predicate);\n if (i > -1) {\n void (array.splice(i, 1));\n return (countRemoveAll(count) + 1) | 0;\n }\n else {\n return count | 0;\n }\n };\n return countRemoveAll(0) | 0;\n}\n\nexport function copyTo(source, sourceIndex, target, targetIndex, count) {\n const diff = (targetIndex - sourceIndex) | 0;\n for (let i = sourceIndex; i <= ((sourceIndex + count) - 1); i++) {\n target[i + diff] = source[i];\n }\n}\n\nexport function copyToTypedArray(source, sourceIndex, target, targetIndex, count) {\n try {\n target.set(source.subarray(sourceIndex, sourceIndex + count), targetIndex);\n }\n catch (matchValue) {\n copyTo(source, sourceIndex, target, targetIndex, count);\n }\n}\n\nexport function indexOf(array, item_1, start, count) {\n const start_1 = defaultArg(start, 0) | 0;\n const i = array.indexOf(item_1, start_1);\n if ((count != null) ? (i >= (start_1 + value_2(count))) : false) {\n return -1;\n }\n else {\n return i | 0;\n }\n}\n\nexport function partition(f, source, cons) {\n const len = source.length | 0;\n const res1 = Helpers_allocateArrayFromCons(cons, len);\n const res2 = Helpers_allocateArrayFromCons(cons, len);\n let iTrue = 0;\n let iFalse = 0;\n for (let i = 0; i <= (len - 1); i++) {\n if (f(source[i])) {\n res1[iTrue] = source[i];\n iTrue = ((iTrue + 1) | 0);\n }\n else {\n res2[iFalse] = source[i];\n iFalse = ((iFalse + 1) | 0);\n }\n }\n return [truncate(iTrue, res1), truncate(iFalse, res2)];\n}\n\nexport function find(predicate, array) {\n const matchValue = array.find(predicate);\n if (matchValue == null) {\n return indexNotFound();\n }\n else {\n return value_2(matchValue);\n }\n}\n\nexport function tryFind(predicate, array) {\n return array.find(predicate);\n}\n\nexport function findIndex(predicate, array) {\n const matchValue = array.findIndex(predicate);\n if (matchValue > -1) {\n return matchValue | 0;\n }\n else {\n return indexNotFound();\n }\n}\n\nexport function tryFindIndex(predicate, array) {\n const matchValue = array.findIndex(predicate);\n if (matchValue > -1) {\n return matchValue;\n }\n else {\n return void 0;\n }\n}\n\nexport function pick(chooser, array) {\n const loop = (i_mut) => {\n loop:\n while (true) {\n const i = i_mut;\n if (i >= array.length) {\n return indexNotFound();\n }\n else {\n const matchValue = chooser(array[i]);\n if (matchValue != null) {\n return value_2(matchValue);\n }\n else {\n i_mut = (i + 1);\n continue loop;\n }\n }\n break;\n }\n };\n return loop(0);\n}\n\nexport function tryPick(chooser, array) {\n const loop = (i_mut) => {\n loop:\n while (true) {\n const i = i_mut;\n if (i >= array.length) {\n return void 0;\n }\n else {\n const matchValue = chooser(array[i]);\n if (matchValue == null) {\n i_mut = (i + 1);\n continue loop;\n }\n else {\n return matchValue;\n }\n }\n break;\n }\n };\n return loop(0);\n}\n\nexport function findBack(predicate, array) {\n const loop = (i_mut) => {\n loop:\n while (true) {\n const i = i_mut;\n if (i < 0) {\n return indexNotFound();\n }\n else if (predicate(array[i])) {\n return array[i];\n }\n else {\n i_mut = (i - 1);\n continue loop;\n }\n break;\n }\n };\n return loop(array.length - 1);\n}\n\nexport function tryFindBack(predicate, array) {\n const loop = (i_mut) => {\n loop:\n while (true) {\n const i = i_mut;\n if (i < 0) {\n return void 0;\n }\n else if (predicate(array[i])) {\n return some(array[i]);\n }\n else {\n i_mut = (i - 1);\n continue loop;\n }\n break;\n }\n };\n return loop(array.length - 1);\n}\n\nexport function findLastIndex(predicate, array) {\n const loop = (i_mut) => {\n loop:\n while (true) {\n const i = i_mut;\n if (i < 0) {\n return -1;\n }\n else if (predicate(array[i])) {\n return i | 0;\n }\n else {\n i_mut = (i - 1);\n continue loop;\n }\n break;\n }\n };\n return loop(array.length - 1) | 0;\n}\n\nexport function findIndexBack(predicate, array) {\n const loop = (i_mut) => {\n loop:\n while (true) {\n const i = i_mut;\n if (i < 0) {\n return indexNotFound();\n }\n else if (predicate(array[i])) {\n return i | 0;\n }\n else {\n i_mut = (i - 1);\n continue loop;\n }\n break;\n }\n };\n return loop(array.length - 1) | 0;\n}\n\nexport function tryFindIndexBack(predicate, array) {\n const loop = (i_mut) => {\n loop:\n while (true) {\n const i = i_mut;\n if (i < 0) {\n return void 0;\n }\n else if (predicate(array[i])) {\n return i;\n }\n else {\n i_mut = (i - 1);\n continue loop;\n }\n break;\n }\n };\n return loop(array.length - 1);\n}\n\nexport function choose(chooser, array, cons) {\n const res = [];\n for (let i = 0; i <= (array.length - 1); i++) {\n const matchValue = chooser(array[i]);\n if (matchValue != null) {\n const y = value_2(matchValue);\n void (res.push(y));\n }\n }\n if ((typeof cons) === \"function\") {\n return map((x) => x, res, cons);\n }\n else {\n return res;\n }\n}\n\nexport function foldIndexed(folder, state, array) {\n return array.reduce(((delegateArg0, delegateArg1, delegateArg2) => folder(delegateArg2, delegateArg0, delegateArg1)), state);\n}\n\nexport function fold(folder, state, array) {\n return array.reduce(((delegateArg0, delegateArg1) => folder(delegateArg0, delegateArg1)), state);\n}\n\nexport function iterate(action, array) {\n for (let i = 0; i <= (array.length - 1); i++) {\n action(array[i]);\n }\n}\n\nexport function iterateIndexed(action, array) {\n for (let i = 0; i <= (array.length - 1); i++) {\n action(i, array[i]);\n }\n}\n\nexport function iterate2(action, array1, array2) {\n if (array1.length !== array2.length) {\n differentLengths();\n }\n for (let i = 0; i <= (array1.length - 1); i++) {\n action(array1[i], array2[i]);\n }\n}\n\nexport function iterateIndexed2(action, array1, array2) {\n if (array1.length !== array2.length) {\n differentLengths();\n }\n for (let i = 0; i <= (array1.length - 1); i++) {\n action(i, array1[i], array2[i]);\n }\n}\n\nexport function isEmpty(array) {\n return array.length === 0;\n}\n\nexport function forAll(predicate, array) {\n return array.every(predicate);\n}\n\nexport function permute(f, array) {\n const size = array.length | 0;\n const res = array.slice();\n const checkFlags = new Array(size);\n iterateIndexed((i, x) => {\n const j = f(i) | 0;\n if ((j < 0) ? true : (j >= size)) {\n throw (new Error(\"Not a valid permutation\"));\n }\n res[j] = x;\n checkFlags[j] = 1;\n }, array);\n if (!(checkFlags.every(((y) => (1 === y))))) {\n throw (new Error(\"Not a valid permutation\"));\n }\n return res;\n}\n\nexport function setSlice(target, lower, upper, source) {\n const lower_1 = defaultArg(lower, 0) | 0;\n const upper_1 = defaultArg(upper, 0) | 0;\n const length = (((upper_1 > 0) ? upper_1 : (target.length - 1)) - lower_1) | 0;\n for (let i = 0; i <= length; i++) {\n target[i + lower_1] = source[i];\n }\n}\n\nexport function sortInPlaceBy(projection, xs, comparer) {\n xs.sort(((x, y) => comparer.Compare(projection(x), projection(y))));\n}\n\nexport function sortInPlace(xs, comparer) {\n xs.sort(((x, y) => comparer.Compare(x, y)));\n}\n\nexport function sort(xs, comparer) {\n const xs_1 = xs.slice();\n xs_1.sort(((x, y) => comparer.Compare(x, y)));\n return xs_1;\n}\n\nexport function sortBy(projection, xs, comparer) {\n const xs_1 = xs.slice();\n xs_1.sort(((x, y) => comparer.Compare(projection(x), projection(y))));\n return xs_1;\n}\n\nexport function sortDescending(xs, comparer) {\n const xs_1 = xs.slice();\n xs_1.sort(((x, y) => (comparer.Compare(x, y) * -1)));\n return xs_1;\n}\n\nexport function sortByDescending(projection, xs, comparer) {\n const xs_1 = xs.slice();\n xs_1.sort(((x, y) => (comparer.Compare(projection(x), projection(y)) * -1)));\n return xs_1;\n}\n\nexport function sortWith(comparer, xs) {\n const comparer_1 = comparer;\n const xs_1 = xs.slice();\n xs_1.sort(comparer_1);\n return xs_1;\n}\n\nexport function allPairs(xs, ys) {\n const len1 = xs.length | 0;\n const len2 = ys.length | 0;\n const res = new Array((len1 * len2));\n for (let i = 0; i <= (xs.length - 1); i++) {\n for (let j = 0; j <= (ys.length - 1); j++) {\n res[(i * len2) + j] = [xs[i], ys[j]];\n }\n }\n return res;\n}\n\nexport function unfold(generator, state) {\n const res = [];\n const loop = (state_1_mut) => {\n loop:\n while (true) {\n const state_1 = state_1_mut;\n const matchValue = generator(state_1);\n if (matchValue != null) {\n const x = matchValue[0];\n const s = matchValue[1];\n void (res.push(x));\n state_1_mut = s;\n continue loop;\n }\n break;\n }\n };\n loop(state);\n return res;\n}\n\nexport function unzip(array) {\n const len = array.length | 0;\n const res1 = new Array(len);\n const res2 = new Array(len);\n iterateIndexed((i, tupledArg) => {\n res1[i] = tupledArg[0];\n res2[i] = tupledArg[1];\n }, array);\n return [res1, res2];\n}\n\nexport function unzip3(array) {\n const len = array.length | 0;\n const res1 = new Array(len);\n const res2 = new Array(len);\n const res3 = new Array(len);\n iterateIndexed((i, tupledArg) => {\n res1[i] = tupledArg[0];\n res2[i] = tupledArg[1];\n res3[i] = tupledArg[2];\n }, array);\n return [res1, res2, res3];\n}\n\nexport function zip(array1, array2) {\n if (array1.length !== array2.length) {\n differentLengths();\n }\n const result = new Array(array1.length);\n for (let i = 0; i <= (array1.length - 1); i++) {\n result[i] = [array1[i], array2[i]];\n }\n return result;\n}\n\nexport function zip3(array1, array2, array3) {\n if ((array1.length !== array2.length) ? true : (array2.length !== array3.length)) {\n differentLengths();\n }\n const result = new Array(array1.length);\n for (let i = 0; i <= (array1.length - 1); i++) {\n result[i] = [array1[i], array2[i], array3[i]];\n }\n return result;\n}\n\nexport function chunkBySize(chunkSize, array) {\n if (chunkSize < 1) {\n throw (new Error(\"The input must be positive.\\\\nParameter name: size\"));\n }\n if (array.length === 0) {\n return [[]];\n }\n else {\n const result = [];\n for (let x = 0; x <= ((~(~Math.ceil(array.length / chunkSize))) - 1); x++) {\n let slice;\n const start_1 = (x * chunkSize) | 0;\n slice = (array.slice(start_1, (start_1 + chunkSize)));\n void (result.push(slice));\n }\n return result;\n }\n}\n\nexport function splitAt(index, array) {\n let start;\n if (index < 0) {\n throw (new Error(\"The input must be non-negative\\\\nParameter name: index\"));\n }\n if (index > array.length) {\n throw (new Error(\"The input sequence has an insufficient number of elements.\\\\nParameter name: index\"));\n }\n return [(start = 0, array.slice(start, (start + index))), array.slice(index)];\n}\n\nexport function compareWith(comparer, array1, array2) {\n if (array1 == null) {\n if (array2 == null) {\n return 0;\n }\n else {\n return -1;\n }\n }\n else if (array2 == null) {\n return 1;\n }\n else {\n let i = 0;\n let result = 0;\n const length1 = array1.length | 0;\n const length2 = array2.length | 0;\n if (length1 > length2) {\n return 1;\n }\n else if (length1 < length2) {\n return -1;\n }\n else {\n while ((i < length1) ? (result === 0) : false) {\n result = (comparer(array1[i], array2[i]) | 0);\n i = ((i + 1) | 0);\n }\n return result | 0;\n }\n }\n}\n\nexport function equalsWith(comparer, array1, array2) {\n return compareWith((e1, e2) => compare(e1, e2), array1, array2) === 0;\n}\n\nexport function exactlyOne(array) {\n if (array.length === 1) {\n return array[0];\n }\n else if (array.length === 0) {\n throw (new Error(\"The input sequence was empty\\\\nParameter name: array\"));\n }\n else {\n throw (new Error(\"Input array too long\\\\nParameter name: array\"));\n }\n}\n\nexport function tryExactlyOne(array) {\n if (array.length === 1) {\n return some(array[0]);\n }\n else {\n return void 0;\n }\n}\n\nexport function head(array) {\n if (array.length === 0) {\n throw (new Error(\"The input array was empty\\\\nParameter name: array\"));\n }\n else {\n return array[0];\n }\n}\n\nexport function tryHead(array) {\n if (array.length === 0) {\n return void 0;\n }\n else {\n return some(array[0]);\n }\n}\n\nexport function tail(array) {\n if (array.length === 0) {\n throw (new Error(\"Not enough elements\\\\nParameter name: array\"));\n }\n return array.slice(1);\n}\n\nexport function item(index, array) {\n return array[index];\n}\n\nexport function tryItem(index, array) {\n if ((index < 0) ? true : (index >= array.length)) {\n return void 0;\n }\n else {\n return some(array[index]);\n }\n}\n\nexport function foldBackIndexed(folder, array, state) {\n return array.reduceRight(((delegateArg0, delegateArg1, delegateArg2) => folder(delegateArg2, delegateArg1, delegateArg0)), state);\n}\n\nexport function foldBack(folder, array, state) {\n return array.reduceRight(((delegateArg0, delegateArg1) => folder(delegateArg1, delegateArg0)), state);\n}\n\nexport function foldIndexed2(folder, state, array1, array2) {\n let acc = state;\n if (array1.length !== array2.length) {\n throw (new Error(\"Arrays have different lengths\"));\n }\n for (let i = 0; i <= (array1.length - 1); i++) {\n acc = folder(i, acc, array1[i], array2[i]);\n }\n return acc;\n}\n\nexport function fold2(folder, state, array1, array2) {\n return foldIndexed2((_arg1, acc, x, y) => folder(acc, x, y), state, array1, array2);\n}\n\nexport function foldBackIndexed2(folder, array1, array2, state) {\n let acc = state;\n if (array1.length !== array2.length) {\n differentLengths();\n }\n const size = array1.length | 0;\n for (let i = 1; i <= size; i++) {\n acc = folder(i - 1, array1[size - i], array2[size - i], acc);\n }\n return acc;\n}\n\nexport function foldBack2(f, array1, array2, state) {\n return foldBackIndexed2((_arg1, x, y, acc) => f(x, y, acc), array1, array2, state);\n}\n\nexport function reduce(reduction, array) {\n if (array.length === 0) {\n throw (new Error(\"The input array was empty\"));\n }\n const reduction_1 = reduction;\n return array.reduce(reduction_1);\n}\n\nexport function reduceBack(reduction, array) {\n if (array.length === 0) {\n throw (new Error(\"The input array was empty\"));\n }\n const reduction_1 = reduction;\n return array.reduceRight(reduction_1);\n}\n\nexport function forAll2(predicate, array1, array2) {\n return fold2((acc, x, y) => (acc ? predicate(x, y) : false), true, array1, array2);\n}\n\nexport function existsOffset(predicate_mut, array_mut, index_mut) {\n existsOffset:\n while (true) {\n const predicate = predicate_mut, array = array_mut, index = index_mut;\n if (index === array.length) {\n return false;\n }\n else if (predicate(array[index])) {\n return true;\n }\n else {\n predicate_mut = predicate;\n array_mut = array;\n index_mut = (index + 1);\n continue existsOffset;\n }\n break;\n }\n}\n\nexport function exists(predicate, array) {\n return existsOffset(predicate, array, 0);\n}\n\nexport function existsOffset2(predicate_mut, array1_mut, array2_mut, index_mut) {\n existsOffset2:\n while (true) {\n const predicate = predicate_mut, array1 = array1_mut, array2 = array2_mut, index = index_mut;\n if (index === array1.length) {\n return false;\n }\n else if (predicate(array1[index], array2[index])) {\n return true;\n }\n else {\n predicate_mut = predicate;\n array1_mut = array1;\n array2_mut = array2;\n index_mut = (index + 1);\n continue existsOffset2;\n }\n break;\n }\n}\n\nexport function exists2(predicate, array1, array2) {\n if (array1.length !== array2.length) {\n differentLengths();\n }\n return existsOffset2(predicate, array1, array2, 0);\n}\n\nexport function sum(array, adder) {\n let acc = adder.GetZero();\n for (let i = 0; i <= (array.length - 1); i++) {\n acc = adder.Add(acc, array[i]);\n }\n return acc;\n}\n\nexport function sumBy(projection, array, adder) {\n let acc = adder.GetZero();\n for (let i = 0; i <= (array.length - 1); i++) {\n acc = adder.Add(acc, projection(array[i]));\n }\n return acc;\n}\n\nexport function maxBy(projection, xs, comparer) {\n return reduce((x, y) => ((comparer.Compare(projection(y), projection(x)) > 0) ? y : x), xs);\n}\n\nexport function max(xs, comparer) {\n return reduce((x, y) => ((comparer.Compare(y, x) > 0) ? y : x), xs);\n}\n\nexport function minBy(projection, xs, comparer) {\n return reduce((x, y) => ((comparer.Compare(projection(y), projection(x)) > 0) ? x : y), xs);\n}\n\nexport function min(xs, comparer) {\n return reduce((x, y) => ((comparer.Compare(y, x) > 0) ? x : y), xs);\n}\n\nexport function average(array, averager) {\n if (array.length === 0) {\n throw (new Error(\"The input array was empty\\\\nParameter name: array\"));\n }\n let total = averager.GetZero();\n for (let i = 0; i <= (array.length - 1); i++) {\n total = averager.Add(total, array[i]);\n }\n return averager.DivideByInt(total, array.length);\n}\n\nexport function averageBy(projection, array, averager) {\n if (array.length === 0) {\n throw (new Error(\"The input array was empty\\\\nParameter name: array\"));\n }\n let total = averager.GetZero();\n for (let i = 0; i <= (array.length - 1); i++) {\n total = averager.Add(total, projection(array[i]));\n }\n return averager.DivideByInt(total, array.length);\n}\n\nexport function windowed(windowSize, source) {\n if (windowSize <= 0) {\n throw (new Error(\"windowSize must be positive\"));\n }\n let res;\n const len = max_1((x, y) => comparePrimitives(x, y), 0, source.length - windowSize) | 0;\n res = (new Array(len));\n for (let i = windowSize; i <= source.length; i++) {\n res[i - windowSize] = source.slice(i - windowSize, (i - 1) + 1);\n }\n return res;\n}\n\nexport function splitInto(chunks, array) {\n if (chunks < 1) {\n throw (new Error(\"The input must be positive.\\\\nParameter name: chunks\"));\n }\n if (array.length === 0) {\n return [[]];\n }\n else {\n const result = [];\n const chunks_1 = min_1((x, y) => comparePrimitives(x, y), chunks, array.length) | 0;\n const minChunkSize = (~(~(array.length / chunks_1))) | 0;\n const chunksWithExtraItem = (array.length % chunks_1) | 0;\n for (let i = 0; i <= (chunks_1 - 1); i++) {\n const chunkSize = ((i < chunksWithExtraItem) ? (minChunkSize + 1) : minChunkSize) | 0;\n let slice;\n const start_1 = ((i * minChunkSize) + min_1((x_1, y_1) => comparePrimitives(x_1, y_1), chunksWithExtraItem, i)) | 0;\n slice = (array.slice(start_1, (start_1 + chunkSize)));\n void (result.push(slice));\n }\n return result;\n }\n}\n\nexport function transpose(arrays, cons) {\n const arrays_1 = Array.isArray(arrays) ? arrays : (Array.from(arrays));\n const len = arrays_1.length | 0;\n if (len === 0) {\n return new Array(0);\n }\n else {\n const lenInner = arrays_1[0].length | 0;\n if (!forAll((a) => (a.length === lenInner), arrays_1)) {\n differentLengths();\n }\n const result = new Array(lenInner);\n for (let i = 0; i <= (lenInner - 1); i++) {\n result[i] = Helpers_allocateArrayFromCons(cons, len);\n for (let j = 0; j <= (len - 1); j++) {\n result[i][j] = arrays_1[j][i];\n }\n }\n return result;\n }\n}\n\n","import { join } from \"./String.js\";\nimport { uncurry, isArrayLike, getEnumerator, toIterator, compare, structuralHash, equals } from \"./Util.js\";\nimport { Record } from \"./Types.js\";\nimport { class_type, record_type, option_type } from \"./Reflection.js\";\nimport { defaultArg, value as value_1, some } from \"./Option.js\";\nimport { transpose as transpose_1, splitInto as splitInto_1, windowed as windowed_1, pairwise as pairwise_1, chunkBySize as chunkBySize_1, map as map_1, permute as permute_1, tryFindIndexBack as tryFindIndexBack_1, tryFindBack as tryFindBack_1, scanBack as scanBack_1, foldBack2 as foldBack2_1, foldBack as foldBack_1, fill } from \"./Array.js\";\n\nexport const SR_indexOutOfBounds = \"The index was outside the range of elements in the list.\";\n\nexport const SR_inputListWasEmpty = \"List was empty\";\n\nexport const SR_inputMustBeNonNegative = \"The input must be non-negative.\";\n\nexport const SR_inputSequenceEmpty = \"The input sequence was empty.\";\n\nexport const SR_inputSequenceTooLong = \"The input sequence contains more than one element.\";\n\nexport const SR_keyNotFoundAlt = \"An index satisfying the predicate was not found in the collection.\";\n\nexport const SR_listsHadDifferentLengths = \"The lists had different lengths.\";\n\nexport const SR_notEnoughElements = \"The input sequence has an insufficient number of elements.\";\n\nexport class FSharpList extends Record {\n constructor(head, tail) {\n super();\n this.head = head;\n this.tail = tail;\n }\n toString() {\n const xs = this;\n return (\"[\" + join(\"; \", xs)) + \"]\";\n }\n Equals(other) {\n const xs = this;\n if (xs === other) {\n return true;\n }\n else {\n const loop = (xs_1_mut, ys_1_mut) => {\n loop:\n while (true) {\n const xs_1 = xs_1_mut, ys_1 = ys_1_mut;\n const matchValue = [xs_1.tail, ys_1.tail];\n if (matchValue[0] != null) {\n if (matchValue[1] != null) {\n const xt = matchValue[0];\n const yt = matchValue[1];\n if (equals(xs_1.head, ys_1.head)) {\n xs_1_mut = xt;\n ys_1_mut = yt;\n continue loop;\n }\n else {\n return false;\n }\n }\n else {\n return false;\n }\n }\n else if (matchValue[1] != null) {\n return false;\n }\n else {\n return true;\n }\n break;\n }\n };\n return loop(xs, other);\n }\n }\n GetHashCode() {\n const xs = this;\n const loop = (i_mut, h_mut, xs_1_mut) => {\n loop:\n while (true) {\n const i = i_mut, h = h_mut, xs_1 = xs_1_mut;\n const matchValue = xs_1.tail;\n if (matchValue != null) {\n const t = matchValue;\n if (i > 18) {\n return h | 0;\n }\n else {\n i_mut = (i + 1);\n h_mut = (((h << 1) + structuralHash(xs_1.head)) + (631 * i));\n xs_1_mut = t;\n continue loop;\n }\n }\n else {\n return h | 0;\n }\n break;\n }\n };\n return loop(0, 0, xs) | 0;\n }\n toJSON(_key) {\n const this$ = this;\n return Array.from(this$);\n }\n CompareTo(other) {\n const xs = this;\n const loop = (xs_1_mut, ys_1_mut) => {\n loop:\n while (true) {\n const xs_1 = xs_1_mut, ys_1 = ys_1_mut;\n const matchValue = [xs_1.tail, ys_1.tail];\n if (matchValue[0] != null) {\n if (matchValue[1] != null) {\n const xt = matchValue[0];\n const yt = matchValue[1];\n const c = compare(xs_1.head, ys_1.head) | 0;\n if (c === 0) {\n xs_1_mut = xt;\n ys_1_mut = yt;\n continue loop;\n }\n else {\n return c | 0;\n }\n }\n else {\n return 1;\n }\n }\n else if (matchValue[1] != null) {\n return -1;\n }\n else {\n return 0;\n }\n break;\n }\n };\n return loop(xs, other) | 0;\n }\n GetEnumerator() {\n const xs = this;\n return ListEnumerator$1_$ctor_3002E699(xs);\n }\n [Symbol.iterator]() {\n return toIterator(this.GetEnumerator());\n }\n [\"System.Collections.IEnumerable.GetEnumerator\"]() {\n const xs = this;\n return getEnumerator(xs);\n }\n}\n\nexport function FSharpList$reflection(gen0) {\n return record_type(\"ListModule.FSharpList\", [gen0], FSharpList, () => [[\"head\", gen0], [\"tail\", option_type(FSharpList$reflection(gen0))]]);\n}\n\nexport class ListEnumerator$1 {\n constructor(xs) {\n this.xs = xs;\n this.it = this.xs;\n this.current = null;\n }\n [\"System.Collections.Generic.IEnumerator`1.get_Current\"]() {\n const __ = this;\n return __.current;\n }\n [\"System.Collections.IEnumerator.get_Current\"]() {\n const __ = this;\n return __.current;\n }\n [\"System.Collections.IEnumerator.MoveNext\"]() {\n const __ = this;\n const matchValue = __.it.tail;\n if (matchValue != null) {\n const t = matchValue;\n __.current = __.it.head;\n __.it = t;\n return true;\n }\n else {\n return false;\n }\n }\n [\"System.Collections.IEnumerator.Reset\"]() {\n const __ = this;\n __.it = __.xs;\n __.current = null;\n }\n Dispose() {\n }\n}\n\nexport function ListEnumerator$1$reflection(gen0) {\n return class_type(\"ListModule.ListEnumerator`1\", [gen0], ListEnumerator$1);\n}\n\nexport function ListEnumerator$1_$ctor_3002E699(xs) {\n return new ListEnumerator$1(xs);\n}\n\nexport function FSharpList_get_Empty() {\n return new FSharpList(null, void 0);\n}\n\nexport function FSharpList_Cons_305B8EAC(x, xs) {\n return new FSharpList(x, xs);\n}\n\nexport function FSharpList__get_IsEmpty(xs) {\n return xs.tail == null;\n}\n\nexport function FSharpList__get_Length(xs) {\n const loop = (i_mut, xs_1_mut) => {\n loop:\n while (true) {\n const i = i_mut, xs_1 = xs_1_mut;\n const matchValue = xs_1.tail;\n if (matchValue != null) {\n i_mut = (i + 1);\n xs_1_mut = matchValue;\n continue loop;\n }\n else {\n return i | 0;\n }\n break;\n }\n };\n return loop(0, xs) | 0;\n}\n\nexport function FSharpList__get_Head(xs) {\n const matchValue = xs.tail;\n if (matchValue != null) {\n return xs.head;\n }\n else {\n throw (new Error((SR_inputListWasEmpty + \"\\\\nParameter name: \") + \"list\"));\n }\n}\n\nexport function FSharpList__get_Tail(xs) {\n const matchValue = xs.tail;\n if (matchValue != null) {\n return matchValue;\n }\n else {\n throw (new Error((SR_inputListWasEmpty + \"\\\\nParameter name: \") + \"list\"));\n }\n}\n\nexport function FSharpList__get_Item_Z524259A4(xs, index) {\n const loop = (i_mut, xs_1_mut) => {\n loop:\n while (true) {\n const i = i_mut, xs_1 = xs_1_mut;\n const matchValue = xs_1.tail;\n if (matchValue != null) {\n if (i === index) {\n return xs_1.head;\n }\n else {\n i_mut = (i + 1);\n xs_1_mut = matchValue;\n continue loop;\n }\n }\n else {\n throw (new Error((SR_indexOutOfBounds + \"\\\\nParameter name: \") + \"index\"));\n }\n break;\n }\n };\n return loop(0, xs);\n}\n\nexport function empty() {\n return FSharpList_get_Empty();\n}\n\nexport function cons(x, xs) {\n return FSharpList_Cons_305B8EAC(x, xs);\n}\n\nexport function singleton(x) {\n return FSharpList_Cons_305B8EAC(x, FSharpList_get_Empty());\n}\n\nexport function isEmpty(xs) {\n return FSharpList__get_IsEmpty(xs);\n}\n\nexport function length(xs) {\n return FSharpList__get_Length(xs);\n}\n\nexport function head(xs) {\n return FSharpList__get_Head(xs);\n}\n\nexport function tryHead(xs) {\n if (FSharpList__get_IsEmpty(xs)) {\n return void 0;\n }\n else {\n return some(FSharpList__get_Head(xs));\n }\n}\n\nexport function tail(xs) {\n return FSharpList__get_Tail(xs);\n}\n\nexport function tryLast(xs_mut) {\n tryLast:\n while (true) {\n const xs = xs_mut;\n if (FSharpList__get_IsEmpty(xs)) {\n return void 0;\n }\n else {\n const t = FSharpList__get_Tail(xs);\n if (FSharpList__get_IsEmpty(t)) {\n return some(FSharpList__get_Head(xs));\n }\n else {\n xs_mut = t;\n continue tryLast;\n }\n }\n break;\n }\n}\n\nexport function last(xs) {\n const matchValue = tryLast(xs);\n if (matchValue == null) {\n throw (new Error(SR_inputListWasEmpty));\n }\n else {\n return value_1(matchValue);\n }\n}\n\nexport function compareWith(comparer, xs, ys) {\n const loop = (xs_1_mut, ys_1_mut) => {\n loop:\n while (true) {\n const xs_1 = xs_1_mut, ys_1 = ys_1_mut;\n const matchValue = [FSharpList__get_IsEmpty(xs_1), FSharpList__get_IsEmpty(ys_1)];\n if (matchValue[0]) {\n if (matchValue[1]) {\n return 0;\n }\n else {\n return -1;\n }\n }\n else if (matchValue[1]) {\n return 1;\n }\n else {\n const c = comparer(FSharpList__get_Head(xs_1), FSharpList__get_Head(ys_1)) | 0;\n if (c === 0) {\n xs_1_mut = FSharpList__get_Tail(xs_1);\n ys_1_mut = FSharpList__get_Tail(ys_1);\n continue loop;\n }\n else {\n return c | 0;\n }\n }\n break;\n }\n };\n return loop(xs, ys) | 0;\n}\n\nexport function toArray(xs) {\n const len = FSharpList__get_Length(xs) | 0;\n const res = fill(new Array(len), 0, len, null);\n const loop = (i_mut, xs_1_mut) => {\n loop:\n while (true) {\n const i = i_mut, xs_1 = xs_1_mut;\n if (!FSharpList__get_IsEmpty(xs_1)) {\n res[i] = FSharpList__get_Head(xs_1);\n i_mut = (i + 1);\n xs_1_mut = FSharpList__get_Tail(xs_1);\n continue loop;\n }\n break;\n }\n };\n loop(0, xs);\n return res;\n}\n\nexport function fold(folder, state, xs) {\n let acc = state;\n let xs_1 = xs;\n while (!FSharpList__get_IsEmpty(xs_1)) {\n acc = folder(acc, FSharpList__get_Head(xs_1));\n xs_1 = FSharpList__get_Tail(xs_1);\n }\n return acc;\n}\n\nexport function reverse(xs) {\n return fold((acc, x) => FSharpList_Cons_305B8EAC(x, acc), FSharpList_get_Empty(), xs);\n}\n\nexport function foldBack(folder, xs, state) {\n return foldBack_1(folder, toArray(xs), state);\n}\n\nexport function foldIndexed(folder, state, xs) {\n const loop = (i_mut, acc_mut, xs_1_mut) => {\n loop:\n while (true) {\n const i = i_mut, acc = acc_mut, xs_1 = xs_1_mut;\n if (FSharpList__get_IsEmpty(xs_1)) {\n return acc;\n }\n else {\n i_mut = (i + 1);\n acc_mut = folder(i, acc, FSharpList__get_Head(xs_1));\n xs_1_mut = FSharpList__get_Tail(xs_1);\n continue loop;\n }\n break;\n }\n };\n return loop(0, state, xs);\n}\n\nexport function fold2(folder, state, xs, ys) {\n let acc = state;\n let xs_1 = xs;\n let ys_1 = ys;\n while ((!FSharpList__get_IsEmpty(xs_1)) ? (!FSharpList__get_IsEmpty(ys_1)) : false) {\n acc = folder(acc, FSharpList__get_Head(xs_1), FSharpList__get_Head(ys_1));\n xs_1 = FSharpList__get_Tail(xs_1);\n ys_1 = FSharpList__get_Tail(ys_1);\n }\n return acc;\n}\n\nexport function foldBack2(folder, xs, ys, state) {\n return foldBack2_1(folder, toArray(xs), toArray(ys), state);\n}\n\nexport function unfold(gen, state) {\n const loop = (acc_mut, node_mut) => {\n let t;\n loop:\n while (true) {\n const acc = acc_mut, node = node_mut;\n const matchValue = gen(acc);\n if (matchValue != null) {\n acc_mut = matchValue[1];\n node_mut = (t = (new FSharpList(matchValue[0], void 0)), (node.tail = t, t));\n continue loop;\n }\n else {\n return node;\n }\n break;\n }\n };\n const root = FSharpList_get_Empty();\n const node_1 = loop(state, root);\n const t_2 = FSharpList_get_Empty();\n node_1.tail = t_2;\n return FSharpList__get_Tail(root);\n}\n\nexport function iterate(action, xs) {\n return fold((unitVar0, x) => {\n action(x);\n }, void 0, xs);\n}\n\nexport function iterate2(action, xs, ys) {\n return fold2((unitVar0, x, y) => {\n action(x, y);\n }, void 0, xs, ys);\n}\n\nexport function iterateIndexed(action, xs) {\n void fold((i, x) => {\n action(i, x);\n return (i + 1) | 0;\n }, 0, xs);\n}\n\nexport function iterateIndexed2(action, xs, ys) {\n void fold2((i, x, y) => {\n action(i, x, y);\n return (i + 1) | 0;\n }, 0, xs, ys);\n}\n\nexport function toSeq(xs) {\n return xs;\n}\n\nexport function ofArrayWithTail(xs, tail_1) {\n let res = tail_1;\n for (let i = xs.length - 1; i >= 0; i--) {\n res = FSharpList_Cons_305B8EAC(xs[i], res);\n }\n return res;\n}\n\nexport function ofArray(xs) {\n return ofArrayWithTail(xs, FSharpList_get_Empty());\n}\n\nexport function ofSeq(xs) {\n let xs_3, t;\n if (isArrayLike(xs)) {\n return ofArray(xs);\n }\n else if (xs instanceof FSharpList) {\n return xs;\n }\n else {\n const root = FSharpList_get_Empty();\n let node = root;\n const enumerator = getEnumerator(xs);\n try {\n while (enumerator[\"System.Collections.IEnumerator.MoveNext\"]()) {\n const x = enumerator[\"System.Collections.Generic.IEnumerator`1.get_Current\"]();\n node = (xs_3 = node, (t = (new FSharpList(x, void 0)), (xs_3.tail = t, t)));\n }\n }\n finally {\n enumerator.Dispose();\n }\n const xs_5 = node;\n const t_2 = FSharpList_get_Empty();\n xs_5.tail = t_2;\n return FSharpList__get_Tail(root);\n }\n}\n\nexport function concat(lists) {\n const root = FSharpList_get_Empty();\n let node = root;\n const action = (xs) => {\n node = fold((acc, x) => {\n const t = new FSharpList(x, void 0);\n acc.tail = t;\n return t;\n }, node, xs);\n };\n if (isArrayLike(lists)) {\n lists.forEach(action);\n }\n else if (lists instanceof FSharpList) {\n iterate(action, lists);\n }\n else {\n const enumerator = getEnumerator(lists);\n try {\n while (enumerator[\"System.Collections.IEnumerator.MoveNext\"]()) {\n action(enumerator[\"System.Collections.Generic.IEnumerator`1.get_Current\"]());\n }\n }\n finally {\n enumerator.Dispose();\n }\n }\n const xs_6 = node;\n const t_2 = FSharpList_get_Empty();\n xs_6.tail = t_2;\n return FSharpList__get_Tail(root);\n}\n\nexport function scan(folder, state, xs) {\n let xs_4, t_2;\n const root = FSharpList_get_Empty();\n let node;\n const t = new FSharpList(state, void 0);\n root.tail = t;\n node = t;\n let acc = state;\n let xs_3 = xs;\n while (!FSharpList__get_IsEmpty(xs_3)) {\n acc = folder(acc, FSharpList__get_Head(xs_3));\n node = (xs_4 = node, (t_2 = (new FSharpList(acc, void 0)), (xs_4.tail = t_2, t_2)));\n xs_3 = FSharpList__get_Tail(xs_3);\n }\n const xs_6 = node;\n const t_4 = FSharpList_get_Empty();\n xs_6.tail = t_4;\n return FSharpList__get_Tail(root);\n}\n\nexport function scanBack(folder, xs, state) {\n return ofArray(scanBack_1(folder, toArray(xs), state));\n}\n\nexport function append(xs, ys) {\n return fold((acc, x) => FSharpList_Cons_305B8EAC(x, acc), ys, reverse(xs));\n}\n\nexport function collect(mapping, xs) {\n let xs_1, t;\n const root = FSharpList_get_Empty();\n let node = root;\n let ys = xs;\n while (!FSharpList__get_IsEmpty(ys)) {\n let zs = mapping(FSharpList__get_Head(ys));\n while (!FSharpList__get_IsEmpty(zs)) {\n node = (xs_1 = node, (t = (new FSharpList(FSharpList__get_Head(zs), void 0)), (xs_1.tail = t, t)));\n zs = FSharpList__get_Tail(zs);\n }\n ys = FSharpList__get_Tail(ys);\n }\n const xs_3 = node;\n const t_2 = FSharpList_get_Empty();\n xs_3.tail = t_2;\n return FSharpList__get_Tail(root);\n}\n\nexport function mapIndexed(mapping, xs) {\n const root = FSharpList_get_Empty();\n const node = foldIndexed((i, acc, x) => {\n const t = new FSharpList(mapping(i, x), void 0);\n acc.tail = t;\n return t;\n }, root, xs);\n const t_2 = FSharpList_get_Empty();\n node.tail = t_2;\n return FSharpList__get_Tail(root);\n}\n\nexport function map(mapping, xs) {\n const root = FSharpList_get_Empty();\n const node = fold((acc, x) => {\n const t = new FSharpList(mapping(x), void 0);\n acc.tail = t;\n return t;\n }, root, xs);\n const t_2 = FSharpList_get_Empty();\n node.tail = t_2;\n return FSharpList__get_Tail(root);\n}\n\nexport function indexed(xs) {\n return mapIndexed((i, x) => [i, x], xs);\n}\n\nexport function map2(mapping, xs, ys) {\n const root = FSharpList_get_Empty();\n const node = fold2((acc, x, y) => {\n const t = new FSharpList(mapping(x, y), void 0);\n acc.tail = t;\n return t;\n }, root, xs, ys);\n const t_2 = FSharpList_get_Empty();\n node.tail = t_2;\n return FSharpList__get_Tail(root);\n}\n\nexport function mapIndexed2(mapping, xs, ys) {\n const loop = (i_mut, acc_mut, xs_1_mut, ys_1_mut) => {\n let t;\n loop:\n while (true) {\n const i = i_mut, acc = acc_mut, xs_1 = xs_1_mut, ys_1 = ys_1_mut;\n if (FSharpList__get_IsEmpty(xs_1) ? true : FSharpList__get_IsEmpty(ys_1)) {\n return acc;\n }\n else {\n i_mut = (i + 1);\n acc_mut = (t = (new FSharpList(mapping(i, FSharpList__get_Head(xs_1), FSharpList__get_Head(ys_1)), void 0)), (acc.tail = t, t));\n xs_1_mut = FSharpList__get_Tail(xs_1);\n ys_1_mut = FSharpList__get_Tail(ys_1);\n continue loop;\n }\n break;\n }\n };\n const root = FSharpList_get_Empty();\n const node_1 = loop(0, root, xs, ys);\n const t_2 = FSharpList_get_Empty();\n node_1.tail = t_2;\n return FSharpList__get_Tail(root);\n}\n\nexport function map3(mapping, xs, ys, zs) {\n const loop = (acc_mut, xs_1_mut, ys_1_mut, zs_1_mut) => {\n let t;\n loop:\n while (true) {\n const acc = acc_mut, xs_1 = xs_1_mut, ys_1 = ys_1_mut, zs_1 = zs_1_mut;\n if ((FSharpList__get_IsEmpty(xs_1) ? true : FSharpList__get_IsEmpty(ys_1)) ? true : FSharpList__get_IsEmpty(zs_1)) {\n return acc;\n }\n else {\n acc_mut = (t = (new FSharpList(mapping(FSharpList__get_Head(xs_1), FSharpList__get_Head(ys_1), FSharpList__get_Head(zs_1)), void 0)), (acc.tail = t, t));\n xs_1_mut = FSharpList__get_Tail(xs_1);\n ys_1_mut = FSharpList__get_Tail(ys_1);\n zs_1_mut = FSharpList__get_Tail(zs_1);\n continue loop;\n }\n break;\n }\n };\n const root = FSharpList_get_Empty();\n const node_1 = loop(root, xs, ys, zs);\n const t_2 = FSharpList_get_Empty();\n node_1.tail = t_2;\n return FSharpList__get_Tail(root);\n}\n\nexport function mapFold(mapping, state, xs) {\n const root = FSharpList_get_Empty();\n const patternInput_1 = fold((tupledArg, x) => {\n let t;\n const patternInput = mapping(tupledArg[1], x);\n return [(t = (new FSharpList(patternInput[0], void 0)), (tupledArg[0].tail = t, t)), patternInput[1]];\n }, [root, state], xs);\n const t_2 = FSharpList_get_Empty();\n patternInput_1[0].tail = t_2;\n return [FSharpList__get_Tail(root), patternInput_1[1]];\n}\n\nexport function mapFoldBack(mapping, xs, state) {\n return mapFold((acc, x) => mapping(x, acc), state, reverse(xs));\n}\n\nexport function tryPick(f, xs) {\n const loop = (xs_1_mut) => {\n loop:\n while (true) {\n const xs_1 = xs_1_mut;\n if (FSharpList__get_IsEmpty(xs_1)) {\n return void 0;\n }\n else {\n const matchValue = f(FSharpList__get_Head(xs_1));\n if (matchValue == null) {\n xs_1_mut = FSharpList__get_Tail(xs_1);\n continue loop;\n }\n else {\n return matchValue;\n }\n }\n break;\n }\n };\n return loop(xs);\n}\n\nexport function pick(f, xs) {\n const matchValue = tryPick(f, xs);\n if (matchValue == null) {\n throw (new Error(SR_keyNotFoundAlt));\n }\n else {\n return value_1(matchValue);\n }\n}\n\nexport function tryFind(f, xs) {\n return tryPick((x) => (f(x) ? some(x) : (void 0)), xs);\n}\n\nexport function find(f, xs) {\n const matchValue = tryFind(f, xs);\n if (matchValue == null) {\n throw (new Error(SR_keyNotFoundAlt));\n }\n else {\n return value_1(matchValue);\n }\n}\n\nexport function tryFindBack(f, xs) {\n return tryFindBack_1(f, toArray(xs));\n}\n\nexport function findBack(f, xs) {\n const matchValue = tryFindBack(f, xs);\n if (matchValue == null) {\n throw (new Error(SR_keyNotFoundAlt));\n }\n else {\n return value_1(matchValue);\n }\n}\n\nexport function tryFindIndex(f, xs) {\n const loop = (i_mut, xs_1_mut) => {\n loop:\n while (true) {\n const i = i_mut, xs_1 = xs_1_mut;\n if (FSharpList__get_IsEmpty(xs_1)) {\n return void 0;\n }\n else if (f(FSharpList__get_Head(xs_1))) {\n return i;\n }\n else {\n i_mut = (i + 1);\n xs_1_mut = FSharpList__get_Tail(xs_1);\n continue loop;\n }\n break;\n }\n };\n return loop(0, xs);\n}\n\nexport function findIndex(f, xs) {\n const matchValue = tryFindIndex(f, xs);\n if (matchValue == null) {\n throw (new Error(SR_keyNotFoundAlt));\n }\n else {\n return matchValue | 0;\n }\n}\n\nexport function tryFindIndexBack(f, xs) {\n return tryFindIndexBack_1(f, toArray(xs));\n}\n\nexport function findIndexBack(f, xs) {\n const matchValue = tryFindIndexBack(f, xs);\n if (matchValue == null) {\n throw (new Error(SR_keyNotFoundAlt));\n }\n else {\n return matchValue | 0;\n }\n}\n\nexport function tryItem(n, xs) {\n const loop = (i_mut, xs_1_mut) => {\n loop:\n while (true) {\n const i = i_mut, xs_1 = xs_1_mut;\n if (FSharpList__get_IsEmpty(xs_1)) {\n return void 0;\n }\n else if (i === n) {\n return some(FSharpList__get_Head(xs_1));\n }\n else {\n i_mut = (i + 1);\n xs_1_mut = FSharpList__get_Tail(xs_1);\n continue loop;\n }\n break;\n }\n };\n return loop(0, xs);\n}\n\nexport function item(n, xs) {\n return FSharpList__get_Item_Z524259A4(xs, n);\n}\n\nexport function filter(f, xs) {\n const root = FSharpList_get_Empty();\n const node = fold((acc, x) => {\n if (f(x)) {\n const t = new FSharpList(x, void 0);\n acc.tail = t;\n return t;\n }\n else {\n return acc;\n }\n }, root, xs);\n const t_2 = FSharpList_get_Empty();\n node.tail = t_2;\n return FSharpList__get_Tail(root);\n}\n\nexport function partition(f, xs) {\n const patternInput = [FSharpList_get_Empty(), FSharpList_get_Empty()];\n const root2 = patternInput[1];\n const root1 = patternInput[0];\n const patternInput_1 = fold(uncurry(2, (tupledArg) => {\n const lacc = tupledArg[0];\n const racc = tupledArg[1];\n return (x) => {\n let t, t_2;\n return f(x) ? [(t = (new FSharpList(x, void 0)), (lacc.tail = t, t)), racc] : [lacc, (t_2 = (new FSharpList(x, void 0)), (racc.tail = t_2, t_2))];\n };\n }), [root1, root2], xs);\n const t_4 = FSharpList_get_Empty();\n patternInput_1[0].tail = t_4;\n const t_5 = FSharpList_get_Empty();\n patternInput_1[1].tail = t_5;\n return [FSharpList__get_Tail(root1), FSharpList__get_Tail(root2)];\n}\n\nexport function choose(f, xs) {\n const root = FSharpList_get_Empty();\n const node = fold((acc, x) => {\n const matchValue = f(x);\n if (matchValue == null) {\n return acc;\n }\n else {\n const t = new FSharpList(value_1(matchValue), void 0);\n acc.tail = t;\n return t;\n }\n }, root, xs);\n const t_2 = FSharpList_get_Empty();\n node.tail = t_2;\n return FSharpList__get_Tail(root);\n}\n\nexport function contains(value, xs, eq) {\n return tryFindIndex((v) => eq.Equals(value, v), xs) != null;\n}\n\nexport function initialize(n, f) {\n let xs, t;\n const root = FSharpList_get_Empty();\n let node = root;\n for (let i = 0; i <= (n - 1); i++) {\n node = (xs = node, (t = (new FSharpList(f(i), void 0)), (xs.tail = t, t)));\n }\n const xs_2 = node;\n const t_2 = FSharpList_get_Empty();\n xs_2.tail = t_2;\n return FSharpList__get_Tail(root);\n}\n\nexport function replicate(n, x) {\n return initialize(n, (_arg1) => x);\n}\n\nexport function reduce(f, xs) {\n if (FSharpList__get_IsEmpty(xs)) {\n throw (new Error(SR_inputListWasEmpty));\n }\n else {\n return fold(f, head(xs), tail(xs));\n }\n}\n\nexport function reduceBack(f, xs) {\n if (FSharpList__get_IsEmpty(xs)) {\n throw (new Error(SR_inputListWasEmpty));\n }\n else {\n return foldBack(f, tail(xs), head(xs));\n }\n}\n\nexport function forAll(f, xs) {\n return fold((acc, x) => (acc ? f(x) : false), true, xs);\n}\n\nexport function forAll2(f, xs, ys) {\n return fold2((acc, x, y) => (acc ? f(x, y) : false), true, xs, ys);\n}\n\nexport function exists(f, xs) {\n return tryFindIndex(f, xs) != null;\n}\n\nexport function exists2(f_mut, xs_mut, ys_mut) {\n exists2:\n while (true) {\n const f = f_mut, xs = xs_mut, ys = ys_mut;\n const matchValue = [FSharpList__get_IsEmpty(xs), FSharpList__get_IsEmpty(ys)];\n let pattern_matching_result;\n if (matchValue[0]) {\n if (matchValue[1]) {\n pattern_matching_result = 0;\n }\n else {\n pattern_matching_result = 2;\n }\n }\n else if (matchValue[1]) {\n pattern_matching_result = 2;\n }\n else {\n pattern_matching_result = 1;\n }\n switch (pattern_matching_result) {\n case 0: {\n return false;\n }\n case 1: {\n if (f(FSharpList__get_Head(xs), FSharpList__get_Head(ys))) {\n return true;\n }\n else {\n f_mut = f;\n xs_mut = FSharpList__get_Tail(xs);\n ys_mut = FSharpList__get_Tail(ys);\n continue exists2;\n }\n }\n case 2: {\n throw (new Error((SR_listsHadDifferentLengths + \"\\\\nParameter name: \") + \"list2\"));\n }\n }\n break;\n }\n}\n\nexport function unzip(xs) {\n return foldBack((tupledArg, tupledArg_1) => [FSharpList_Cons_305B8EAC(tupledArg[0], tupledArg_1[0]), FSharpList_Cons_305B8EAC(tupledArg[1], tupledArg_1[1])], xs, [FSharpList_get_Empty(), FSharpList_get_Empty()]);\n}\n\nexport function unzip3(xs) {\n return foldBack((tupledArg, tupledArg_1) => [FSharpList_Cons_305B8EAC(tupledArg[0], tupledArg_1[0]), FSharpList_Cons_305B8EAC(tupledArg[1], tupledArg_1[1]), FSharpList_Cons_305B8EAC(tupledArg[2], tupledArg_1[2])], xs, [FSharpList_get_Empty(), FSharpList_get_Empty(), FSharpList_get_Empty()]);\n}\n\nexport function zip(xs, ys) {\n return map2((x, y) => [x, y], xs, ys);\n}\n\nexport function zip3(xs, ys, zs) {\n return map3((x, y, z) => [x, y, z], xs, ys, zs);\n}\n\nexport function sortWith(comparer, xs) {\n const arr = toArray(xs);\n arr.sort(comparer);\n return ofArray(arr);\n}\n\nexport function sort(xs, comparer) {\n return sortWith((x, y) => comparer.Compare(x, y), xs);\n}\n\nexport function sortBy(projection, xs, comparer) {\n return sortWith((x, y) => comparer.Compare(projection(x), projection(y)), xs);\n}\n\nexport function sortDescending(xs, comparer) {\n return sortWith((x, y) => (comparer.Compare(x, y) * -1), xs);\n}\n\nexport function sortByDescending(projection, xs, comparer) {\n return sortWith((x, y) => (comparer.Compare(projection(x), projection(y)) * -1), xs);\n}\n\nexport function sum(xs, adder) {\n return fold((acc, x) => adder.Add(acc, x), adder.GetZero(), xs);\n}\n\nexport function sumBy(f, xs, adder) {\n return fold((acc, x) => adder.Add(acc, f(x)), adder.GetZero(), xs);\n}\n\nexport function maxBy(projection, xs, comparer) {\n return reduce((x, y) => ((comparer.Compare(projection(y), projection(x)) > 0) ? y : x), xs);\n}\n\nexport function max(xs, comparer) {\n return reduce((x, y) => ((comparer.Compare(y, x) > 0) ? y : x), xs);\n}\n\nexport function minBy(projection, xs, comparer) {\n return reduce((x, y) => ((comparer.Compare(projection(y), projection(x)) > 0) ? x : y), xs);\n}\n\nexport function min(xs, comparer) {\n return reduce((x, y) => ((comparer.Compare(y, x) > 0) ? x : y), xs);\n}\n\nexport function average(xs, averager) {\n let count = 0;\n return averager.DivideByInt(fold((acc, x) => {\n count = ((count + 1) | 0);\n return averager.Add(acc, x);\n }, averager.GetZero(), xs), count);\n}\n\nexport function averageBy(f, xs, averager) {\n let count = 0;\n return averager.DivideByInt(fold((acc, x) => {\n count = ((count + 1) | 0);\n return averager.Add(acc, f(x));\n }, averager.GetZero(), xs), count);\n}\n\nexport function permute(f, xs) {\n return ofArray(permute_1(f, toArray(xs)));\n}\n\nexport function chunkBySize(chunkSize, xs) {\n return ofArray(map_1((xs_1) => ofArray(xs_1), chunkBySize_1(chunkSize, toArray(xs))));\n}\n\nexport function allPairs(xs, ys) {\n const root = FSharpList_get_Empty();\n let node = root;\n iterate((x) => {\n iterate((y) => {\n let xs_1, t;\n node = (xs_1 = node, (t = (new FSharpList([x, y], void 0)), (xs_1.tail = t, t)));\n }, ys);\n }, xs);\n const xs_3 = node;\n const t_2 = FSharpList_get_Empty();\n xs_3.tail = t_2;\n return FSharpList__get_Tail(root);\n}\n\nexport function skip(count_mut, xs_mut) {\n skip:\n while (true) {\n const count = count_mut, xs = xs_mut;\n if (count <= 0) {\n return xs;\n }\n else if (FSharpList__get_IsEmpty(xs)) {\n throw (new Error((SR_notEnoughElements + \"\\\\nParameter name: \") + \"list\"));\n }\n else {\n count_mut = (count - 1);\n xs_mut = FSharpList__get_Tail(xs);\n continue skip;\n }\n break;\n }\n}\n\nexport function skipWhile(predicate_mut, xs_mut) {\n skipWhile:\n while (true) {\n const predicate = predicate_mut, xs = xs_mut;\n if (FSharpList__get_IsEmpty(xs)) {\n return xs;\n }\n else if (!predicate(FSharpList__get_Head(xs))) {\n return xs;\n }\n else {\n predicate_mut = predicate;\n xs_mut = FSharpList__get_Tail(xs);\n continue skipWhile;\n }\n break;\n }\n}\n\nexport function take(count, xs) {\n if (count < 0) {\n throw (new Error((SR_inputMustBeNonNegative + \"\\\\nParameter name: \") + \"count\"));\n }\n const loop = (i_mut, acc_mut, xs_1_mut) => {\n let t;\n loop:\n while (true) {\n const i = i_mut, acc = acc_mut, xs_1 = xs_1_mut;\n if (i <= 0) {\n return acc;\n }\n else if (FSharpList__get_IsEmpty(xs_1)) {\n throw (new Error((SR_notEnoughElements + \"\\\\nParameter name: \") + \"list\"));\n }\n else {\n i_mut = (i - 1);\n acc_mut = (t = (new FSharpList(FSharpList__get_Head(xs_1), void 0)), (acc.tail = t, t));\n xs_1_mut = FSharpList__get_Tail(xs_1);\n continue loop;\n }\n break;\n }\n };\n const root = FSharpList_get_Empty();\n const node = loop(count, root, xs);\n const t_2 = FSharpList_get_Empty();\n node.tail = t_2;\n return FSharpList__get_Tail(root);\n}\n\nexport function takeWhile(predicate, xs) {\n const loop = (acc_mut, xs_1_mut) => {\n let t;\n loop:\n while (true) {\n const acc = acc_mut, xs_1 = xs_1_mut;\n if (FSharpList__get_IsEmpty(xs_1)) {\n return acc;\n }\n else if (!predicate(FSharpList__get_Head(xs_1))) {\n return acc;\n }\n else {\n acc_mut = (t = (new FSharpList(FSharpList__get_Head(xs_1), void 0)), (acc.tail = t, t));\n xs_1_mut = FSharpList__get_Tail(xs_1);\n continue loop;\n }\n break;\n }\n };\n const root = FSharpList_get_Empty();\n const node = loop(root, xs);\n const t_2 = FSharpList_get_Empty();\n node.tail = t_2;\n return FSharpList__get_Tail(root);\n}\n\nexport function truncate(count, xs) {\n const loop = (i_mut, acc_mut, xs_1_mut) => {\n let t;\n loop:\n while (true) {\n const i = i_mut, acc = acc_mut, xs_1 = xs_1_mut;\n if (i <= 0) {\n return acc;\n }\n else if (FSharpList__get_IsEmpty(xs_1)) {\n return acc;\n }\n else {\n i_mut = (i - 1);\n acc_mut = (t = (new FSharpList(FSharpList__get_Head(xs_1), void 0)), (acc.tail = t, t));\n xs_1_mut = FSharpList__get_Tail(xs_1);\n continue loop;\n }\n break;\n }\n };\n const root = FSharpList_get_Empty();\n const node = loop(count, root, xs);\n const t_2 = FSharpList_get_Empty();\n node.tail = t_2;\n return FSharpList__get_Tail(root);\n}\n\nexport function getSlice(startIndex, endIndex, xs) {\n const len = length(xs) | 0;\n const startIndex_1 = defaultArg(startIndex, 0) | 0;\n const endIndex_1 = defaultArg(endIndex, len - 1) | 0;\n if (startIndex_1 < 0) {\n throw (new Error((SR_indexOutOfBounds + \"\\\\nParameter name: \") + \"startIndex\"));\n }\n else if (endIndex_1 >= len) {\n throw (new Error((SR_indexOutOfBounds + \"\\\\nParameter name: \") + \"endIndex\"));\n }\n else if (endIndex_1 < startIndex_1) {\n return FSharpList_get_Empty();\n }\n else {\n return take((endIndex_1 - startIndex_1) + 1, skip(startIndex_1, xs));\n }\n}\n\nexport function splitAt(index, xs) {\n if (index < 0) {\n throw (new Error((SR_inputMustBeNonNegative + \"\\\\nParameter name: \") + \"index\"));\n }\n if (index > FSharpList__get_Length(xs)) {\n throw (new Error((SR_notEnoughElements + \"\\\\nParameter name: \") + \"index\"));\n }\n return [take(index, xs), skip(index, xs)];\n}\n\nexport function exactlyOne(xs) {\n if (FSharpList__get_IsEmpty(xs)) {\n throw (new Error((SR_inputSequenceEmpty + \"\\\\nParameter name: \") + \"list\"));\n }\n else if (FSharpList__get_IsEmpty(FSharpList__get_Tail(xs))) {\n return FSharpList__get_Head(xs);\n }\n else {\n throw (new Error((SR_inputSequenceTooLong + \"\\\\nParameter name: \") + \"list\"));\n }\n}\n\nexport function tryExactlyOne(xs) {\n if ((!FSharpList__get_IsEmpty(xs)) ? FSharpList__get_IsEmpty(FSharpList__get_Tail(xs)) : false) {\n return some(FSharpList__get_Head(xs));\n }\n else {\n return void 0;\n }\n}\n\nexport function where(predicate, xs) {\n return filter(predicate, xs);\n}\n\nexport function pairwise(xs) {\n return ofArray(pairwise_1(toArray(xs)));\n}\n\nexport function windowed(windowSize, xs) {\n return ofArray(map_1((xs_1) => ofArray(xs_1), windowed_1(windowSize, toArray(xs))));\n}\n\nexport function splitInto(chunks, xs) {\n return ofArray(map_1((xs_1) => ofArray(xs_1), splitInto_1(chunks, toArray(xs))));\n}\n\nexport function transpose(lists) {\n return ofArray(map_1((xs_1) => ofArray(xs_1), transpose_1(map_1((xs) => toArray(xs), Array.from(lists)))));\n}\n\n","export class CancellationToken {\n constructor(cancelled = false) {\n this._id = 0;\n this._cancelled = cancelled;\n this._listeners = new Map();\n }\n get isCancelled() {\n return this._cancelled;\n }\n cancel() {\n if (!this._cancelled) {\n this._cancelled = true;\n for (const [, listener] of this._listeners) {\n listener();\n }\n }\n }\n addListener(f) {\n const id = this._id;\n this._listeners.set(this._id++, f);\n return id;\n }\n removeListener(id) {\n return this._listeners.delete(id);\n }\n register(f, state) {\n const $ = this;\n const id = this.addListener(state == null ? f : () => f(state));\n return { Dispose() { $.removeListener(id); } };\n }\n}\nexport class OperationCanceledError extends Error {\n constructor() {\n super(\"The operation was canceled\");\n Object.setPrototypeOf(this, OperationCanceledError.prototype);\n }\n}\nexport class Trampoline {\n constructor() {\n this.callCount = 0;\n }\n static get maxTrampolineCallCount() {\n return 2000;\n }\n incrementAndCheck() {\n return this.callCount++ > Trampoline.maxTrampolineCallCount;\n }\n hijack(f) {\n this.callCount = 0;\n setTimeout(f, 0);\n }\n}\nexport function protectedCont(f) {\n return (ctx) => {\n if (ctx.cancelToken.isCancelled) {\n ctx.onCancel(new OperationCanceledError());\n }\n else if (ctx.trampoline.incrementAndCheck()) {\n ctx.trampoline.hijack(() => {\n try {\n f(ctx);\n }\n catch (err) {\n ctx.onError(err);\n }\n });\n }\n else {\n try {\n f(ctx);\n }\n catch (err) {\n ctx.onError(err);\n }\n }\n };\n}\nexport function protectedBind(computation, binder) {\n return protectedCont((ctx) => {\n computation({\n onSuccess: (x) => {\n try {\n binder(x)(ctx);\n }\n catch (ex) {\n ctx.onError(ex);\n }\n },\n onError: ctx.onError,\n onCancel: ctx.onCancel,\n cancelToken: ctx.cancelToken,\n trampoline: ctx.trampoline,\n });\n });\n}\nexport function protectedReturn(value) {\n return protectedCont((ctx) => ctx.onSuccess(value));\n}\nexport class AsyncBuilder {\n Bind(computation, binder) {\n return protectedBind(computation, binder);\n }\n Combine(computation1, computation2) {\n return this.Bind(computation1, () => computation2);\n }\n Delay(generator) {\n return protectedCont((ctx) => generator()(ctx));\n }\n For(sequence, body) {\n const iter = sequence[Symbol.iterator]();\n let cur = iter.next();\n return this.While(() => !cur.done, this.Delay(() => {\n const res = body(cur.value);\n cur = iter.next();\n return res;\n }));\n }\n Return(value) {\n return protectedReturn(value);\n }\n ReturnFrom(computation) {\n return computation;\n }\n TryFinally(computation, compensation) {\n return protectedCont((ctx) => {\n computation({\n onSuccess: (x) => {\n compensation();\n ctx.onSuccess(x);\n },\n onError: (x) => {\n compensation();\n ctx.onError(x);\n },\n onCancel: (x) => {\n compensation();\n ctx.onCancel(x);\n },\n cancelToken: ctx.cancelToken,\n trampoline: ctx.trampoline,\n });\n });\n }\n TryWith(computation, catchHandler) {\n return protectedCont((ctx) => {\n computation({\n onSuccess: ctx.onSuccess,\n onCancel: ctx.onCancel,\n cancelToken: ctx.cancelToken,\n trampoline: ctx.trampoline,\n onError: (ex) => {\n try {\n catchHandler(ex)(ctx);\n }\n catch (ex2) {\n ctx.onError(ex2);\n }\n },\n });\n });\n }\n Using(resource, binder) {\n return this.TryFinally(binder(resource), () => resource.Dispose());\n }\n While(guard, computation) {\n if (guard()) {\n return this.Bind(computation, () => this.While(guard, computation));\n }\n else {\n return this.Return(void 0);\n }\n }\n Zero() {\n return protectedCont((ctx) => ctx.onSuccess(void 0));\n }\n}\nexport const singleton = new AsyncBuilder();\n","import { Union } from \"./Types.js\";\nimport { union_type } from \"./Reflection.js\";\nimport { some } from \"./Option.js\";\n\nexport class FSharpResult$2 extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Ok\", \"Error\"];\n }\n}\n\nexport function FSharpResult$2$reflection(gen0, gen1) {\n return union_type(\"FSharp.Core.FSharpResult`2\", [gen0, gen1], FSharpResult$2, () => [[[\"ResultValue\", gen0]], [[\"ErrorValue\", gen1]]]);\n}\n\nexport function Result_Map(mapping, result) {\n if (result.tag === 0) {\n return new FSharpResult$2(0, mapping(result.fields[0]));\n }\n else {\n return new FSharpResult$2(1, result.fields[0]);\n }\n}\n\nexport function Result_MapError(mapping, result) {\n if (result.tag === 0) {\n return new FSharpResult$2(0, result.fields[0]);\n }\n else {\n return new FSharpResult$2(1, mapping(result.fields[0]));\n }\n}\n\nexport function Result_Bind(binder, result) {\n if (result.tag === 0) {\n return binder(result.fields[0]);\n }\n else {\n return new FSharpResult$2(1, result.fields[0]);\n }\n}\n\nexport class FSharpChoice$2 extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Choice1Of2\", \"Choice2Of2\"];\n }\n}\n\nexport function FSharpChoice$2$reflection(gen0, gen1) {\n return union_type(\"FSharp.Core.FSharpChoice`2\", [gen0, gen1], FSharpChoice$2, () => [[[\"Item\", gen0]], [[\"Item\", gen1]]]);\n}\n\nexport class FSharpChoice$3 extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Choice1Of3\", \"Choice2Of3\", \"Choice3Of3\"];\n }\n}\n\nexport function FSharpChoice$3$reflection(gen0, gen1, gen2) {\n return union_type(\"FSharp.Core.FSharpChoice`3\", [gen0, gen1, gen2], FSharpChoice$3, () => [[[\"Item\", gen0]], [[\"Item\", gen1]], [[\"Item\", gen2]]]);\n}\n\nexport class FSharpChoice$4 extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Choice1Of4\", \"Choice2Of4\", \"Choice3Of4\", \"Choice4Of4\"];\n }\n}\n\nexport function FSharpChoice$4$reflection(gen0, gen1, gen2, gen3) {\n return union_type(\"FSharp.Core.FSharpChoice`4\", [gen0, gen1, gen2, gen3], FSharpChoice$4, () => [[[\"Item\", gen0]], [[\"Item\", gen1]], [[\"Item\", gen2]], [[\"Item\", gen3]]]);\n}\n\nexport class FSharpChoice$5 extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Choice1Of5\", \"Choice2Of5\", \"Choice3Of5\", \"Choice4Of5\", \"Choice5Of5\"];\n }\n}\n\nexport function FSharpChoice$5$reflection(gen0, gen1, gen2, gen3, gen4) {\n return union_type(\"FSharp.Core.FSharpChoice`5\", [gen0, gen1, gen2, gen3, gen4], FSharpChoice$5, () => [[[\"Item\", gen0]], [[\"Item\", gen1]], [[\"Item\", gen2]], [[\"Item\", gen3]], [[\"Item\", gen4]]]);\n}\n\nexport class FSharpChoice$6 extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Choice1Of6\", \"Choice2Of6\", \"Choice3Of6\", \"Choice4Of6\", \"Choice5Of6\", \"Choice6Of6\"];\n }\n}\n\nexport function FSharpChoice$6$reflection(gen0, gen1, gen2, gen3, gen4, gen5) {\n return union_type(\"FSharp.Core.FSharpChoice`6\", [gen0, gen1, gen2, gen3, gen4, gen5], FSharpChoice$6, () => [[[\"Item\", gen0]], [[\"Item\", gen1]], [[\"Item\", gen2]], [[\"Item\", gen3]], [[\"Item\", gen4]], [[\"Item\", gen5]]]);\n}\n\nexport class FSharpChoice$7 extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Choice1Of7\", \"Choice2Of7\", \"Choice3Of7\", \"Choice4Of7\", \"Choice5Of7\", \"Choice6Of7\", \"Choice7Of7\"];\n }\n}\n\nexport function FSharpChoice$7$reflection(gen0, gen1, gen2, gen3, gen4, gen5, gen6) {\n return union_type(\"FSharp.Core.FSharpChoice`7\", [gen0, gen1, gen2, gen3, gen4, gen5, gen6], FSharpChoice$7, () => [[[\"Item\", gen0]], [[\"Item\", gen1]], [[\"Item\", gen2]], [[\"Item\", gen3]], [[\"Item\", gen4]], [[\"Item\", gen5]], [[\"Item\", gen6]]]);\n}\n\nexport function Choice_makeChoice1Of2(x) {\n return new FSharpChoice$2(0, x);\n}\n\nexport function Choice_makeChoice2Of2(x) {\n return new FSharpChoice$2(1, x);\n}\n\nexport function Choice_tryValueIfChoice1Of2(x) {\n if (x.tag === 0) {\n return some(x.fields[0]);\n }\n else {\n return void 0;\n }\n}\n\nexport function Choice_tryValueIfChoice2Of2(x) {\n if (x.tag === 1) {\n return some(x.fields[0]);\n }\n else {\n return void 0;\n }\n}\n\n","import { OperationCanceledError, Trampoline } from \"./AsyncBuilder.js\";\nimport { CancellationToken } from \"./AsyncBuilder.js\";\nimport { protectedCont } from \"./AsyncBuilder.js\";\nimport { protectedBind } from \"./AsyncBuilder.js\";\nimport { protectedReturn } from \"./AsyncBuilder.js\";\nimport { Choice_makeChoice1Of2, Choice_makeChoice2Of2 } from \"./Choice.js\";\n// Implemented just for type references\nexport class Async {\n}\nfunction emptyContinuation(_x) {\n // NOP\n}\n// MakeAsync: body:(AsyncActivation<'T> -> AsyncReturn) -> Async<'T>\nexport function makeAsync(body) {\n return body;\n}\n// Invoke: computation: Async<'T> -> ctxt:AsyncActivation<'T> -> AsyncReturn\nexport function invoke(computation, ctx) {\n return computation(ctx);\n}\n// CallThenInvoke: ctxt:AsyncActivation<'T> -> result1:'U -> part2:('U -> Async<'T>) -> AsyncReturn\nexport function callThenInvoke(ctx, result1, part2) {\n return part2(result1)(ctx);\n}\n// Bind: ctxt:AsyncActivation<'T> -> part1:Async<'U> -> part2:('U -> Async<'T>) -> AsyncReturn\nexport function bind(ctx, part1, part2) {\n return protectedBind(part1, part2)(ctx);\n}\nexport function createCancellationToken(arg) {\n const token = new CancellationToken(typeof arg === \"boolean\" ? arg : false);\n if (typeof arg === \"number\") {\n setTimeout(() => { token.cancel(); }, arg);\n }\n return token;\n}\nexport function cancel(token) {\n token.cancel();\n}\nexport function cancelAfter(token, ms) {\n setTimeout(() => { token.cancel(); }, ms);\n}\nexport function isCancellationRequested(token) {\n return token != null && token.isCancelled;\n}\nexport function throwIfCancellationRequested(token) {\n if (token != null && token.isCancelled) {\n throw new Error(\"Operation is cancelled\");\n }\n}\nexport function startChild(computation) {\n const promise = startAsPromise(computation);\n // JS Promises are hot, computation has already started\n // but we delay returning the result\n return protectedCont((ctx) => protectedReturn(awaitPromise(promise))(ctx));\n}\nexport function awaitPromise(p) {\n return fromContinuations((conts) => p.then(conts[0]).catch((err) => (err instanceof OperationCanceledError\n ? conts[2] : conts[1])(err)));\n}\nexport function cancellationToken() {\n return protectedCont((ctx) => ctx.onSuccess(ctx.cancelToken));\n}\nexport const defaultCancellationToken = new CancellationToken();\nexport function catchAsync(work) {\n return protectedCont((ctx) => {\n work({\n onSuccess: (x) => ctx.onSuccess(Choice_makeChoice1Of2(x)),\n onError: (ex) => ctx.onSuccess(Choice_makeChoice2Of2(ex)),\n onCancel: ctx.onCancel,\n cancelToken: ctx.cancelToken,\n trampoline: ctx.trampoline,\n });\n });\n}\nexport function fromContinuations(f) {\n return protectedCont((ctx) => f([ctx.onSuccess, ctx.onError, ctx.onCancel]));\n}\nexport function ignore(computation) {\n return protectedBind(computation, (_x) => protectedReturn(void 0));\n}\nexport function parallel(computations) {\n return awaitPromise(Promise.all(Array.from(computations, (w) => startAsPromise(w))));\n}\nexport function sleep(millisecondsDueTime) {\n return protectedCont((ctx) => {\n let tokenId;\n const timeoutId = setTimeout(() => {\n ctx.cancelToken.removeListener(tokenId);\n ctx.onSuccess(void 0);\n }, millisecondsDueTime);\n tokenId = ctx.cancelToken.addListener(() => {\n clearTimeout(timeoutId);\n ctx.onCancel(new OperationCanceledError());\n });\n });\n}\nexport function start(computation, cancellationToken) {\n return startWithContinuations(computation, cancellationToken);\n}\nexport function startImmediate(computation, cancellationToken) {\n return start(computation, cancellationToken);\n}\nexport function startWithContinuations(computation, continuation, exceptionContinuation, cancellationContinuation, cancelToken) {\n if (typeof continuation !== \"function\") {\n cancelToken = continuation;\n continuation = undefined;\n }\n const trampoline = new Trampoline();\n computation({\n onSuccess: continuation ? continuation : emptyContinuation,\n onError: exceptionContinuation ? exceptionContinuation : emptyContinuation,\n onCancel: cancellationContinuation ? cancellationContinuation : emptyContinuation,\n cancelToken: cancelToken ? cancelToken : defaultCancellationToken,\n trampoline,\n });\n}\nexport function startAsPromise(computation, cancellationToken) {\n return new Promise((resolve, reject) => startWithContinuations(computation, resolve, reject, reject, cancellationToken ? cancellationToken : defaultCancellationToken));\n}\nexport default Async;\n","import { some } from \"../fable-library.3.1.12/Option.js\";\nimport Timer from \"../fable-library.3.1.12/Timer.js\";\nimport { add } from \"../fable-library.3.1.12/Observable.js\";\n\nexport function Log_onError(text, ex) {\n console.error(some(text), ex);\n}\n\nexport function Log_toConsole(text, o) {\n console.log(some(text), o);\n}\n\nexport function Timer_delay(interval, callback) {\n let t;\n let returnVal = new Timer(interval);\n returnVal.AutoReset = false;\n t = returnVal;\n add(callback, t.Elapsed);\n t.Enabled = true;\n t.Start();\n}\n\n","import { singleton, concat, map, empty, iterate } from \"../fable-library.3.1.12/List.js\";\nimport { singleton as singleton_1 } from \"../fable-library.3.1.12/AsyncBuilder.js\";\nimport { startImmediate, catchAsync } from \"../fable-library.3.1.12/Async.js\";\nimport { Timer_delay } from \"./prelude.fs.js\";\n\nexport function Cmd_exec(onError, dispatch, cmd) {\n iterate((call) => {\n try {\n call(dispatch);\n }\n catch (ex) {\n onError(ex);\n }\n }, cmd);\n}\n\nexport function Cmd_none() {\n return empty();\n}\n\nexport function Cmd_map(f, cmd) {\n return map((g) => ((arg_1) => {\n g((arg) => {\n arg_1(f(arg));\n });\n }), cmd);\n}\n\nexport function Cmd_batch(cmds) {\n return concat(cmds);\n}\n\nexport function Cmd_ofSub(sub) {\n return singleton(sub);\n}\n\nexport function Cmd_OfFunc_either(task, arg, ofSuccess, ofError) {\n return singleton((dispatch) => {\n try {\n return dispatch(ofSuccess(task(arg)));\n }\n catch (x) {\n return dispatch(ofError(x));\n }\n });\n}\n\nexport function Cmd_OfFunc_perform(task, arg, ofSuccess) {\n return singleton((dispatch) => {\n try {\n dispatch(ofSuccess(task(arg)));\n }\n catch (x) {\n }\n });\n}\n\nexport function Cmd_OfFunc_attempt(task, arg, ofError) {\n return singleton((dispatch) => {\n try {\n task(arg);\n }\n catch (x) {\n dispatch(ofError(x));\n }\n });\n}\n\nexport function Cmd_OfFunc_result(msg) {\n return singleton((dispatch) => {\n dispatch(msg);\n });\n}\n\nexport function Cmd_OfAsyncWith_either(start, task, arg, ofSuccess, ofError) {\n return singleton((arg_1) => {\n start(singleton_1.Delay(() => singleton_1.Bind(catchAsync(task(arg)), (_arg1) => {\n const r = _arg1;\n arg_1((r.tag === 1) ? ofError(r.fields[0]) : ofSuccess(r.fields[0]));\n return singleton_1.Zero();\n })));\n });\n}\n\nexport function Cmd_OfAsyncWith_perform(start, task, arg, ofSuccess) {\n return singleton((arg_1) => {\n start(singleton_1.Delay(() => singleton_1.Bind(catchAsync(task(arg)), (_arg1) => {\n const r = _arg1;\n if (r.tag === 0) {\n arg_1(ofSuccess(r.fields[0]));\n return singleton_1.Zero();\n }\n else {\n return singleton_1.Zero();\n }\n })));\n });\n}\n\nexport function Cmd_OfAsyncWith_attempt(start, task, arg, ofError) {\n return singleton((arg_1) => {\n start(singleton_1.Delay(() => singleton_1.Bind(catchAsync(task(arg)), (_arg1) => {\n const r = _arg1;\n if (r.tag === 1) {\n arg_1(ofError(r.fields[0]));\n return singleton_1.Zero();\n }\n else {\n return singleton_1.Zero();\n }\n })));\n });\n}\n\nexport function Cmd_OfAsyncWith_result(start, task) {\n return singleton((arg) => {\n start(singleton_1.Delay(() => singleton_1.Bind(task, (_arg1) => {\n arg(_arg1);\n return singleton_1.Zero();\n })));\n });\n}\n\nexport function Cmd_OfAsync_start(x) {\n Timer_delay(0, (_arg1) => {\n startImmediate(x);\n });\n}\n\nexport function Cmd_OfPromise_either(task, arg, ofSuccess, ofError) {\n return singleton((dispatch) => {\n void task(arg).then((arg_1) => dispatch(ofSuccess(arg_1))).catch((arg_3) => dispatch(ofError(arg_3)));\n });\n}\n\nexport function Cmd_OfPromise_perform(task, arg, ofSuccess) {\n return singleton((dispatch) => {\n void task(arg).then((arg_1) => dispatch(ofSuccess(arg_1)));\n });\n}\n\nexport function Cmd_OfPromise_attempt(task, arg, ofError) {\n return singleton((dispatch) => {\n void task(arg).catch((arg_2) => {\n dispatch(ofError(arg_2));\n });\n });\n}\n\nexport function Cmd_OfPromise_result(task) {\n return singleton((dispatch) => {\n void task.then(dispatch);\n });\n}\n\nexport function Cmd_attemptFunc(task, arg, ofError) {\n return Cmd_OfFunc_attempt(task, arg, ofError);\n}\n\n","import { Result_MapError, Result_Map, FSharpResult$2 } from \"../fable-library.3.1.12/Choice.js\";\nimport { class_type } from \"../fable-library.3.1.12/Reflection.js\";\nimport { equals, getEnumerator } from \"../fable-library.3.1.12/Util.js\";\n\nexport function reject(reason) {\n return Promise.reject(reason);\n}\n\nexport function result(a) {\n return a.then(((arg) => (new FSharpResult$2(0, arg))),((arg_1) => (new FSharpResult$2(1, arg_1))));\n}\n\nexport function mapResult(fn, a) {\n return a.then(((result_1) => Result_Map(fn, result_1)));\n}\n\nexport function bindResult(fn, a) {\n return a.then(((a_1) => {\n if (a_1.tag === 1) {\n return Promise.resolve((new FSharpResult$2(1, a_1.fields[0])));\n }\n else {\n return result(fn(a_1.fields[0]));\n }\n }));\n}\n\nexport function mapResultError(fn, a) {\n return a.then(((result_1) => Result_MapError(fn, result_1)));\n}\n\nexport function tap(fn, a) {\n return a.then(((x) => {\n fn(x);\n return x;\n }));\n}\n\nexport class PromiseBuilder {\n constructor() {\n }\n}\n\nexport function PromiseBuilder$reflection() {\n return class_type(\"Promise.PromiseBuilder\", void 0, PromiseBuilder);\n}\n\nexport function PromiseBuilder_$ctor() {\n return new PromiseBuilder();\n}\n\nexport function PromiseBuilder__For_1565554B(x, seq, body) {\n let p = Promise.resolve(undefined);\n const enumerator = getEnumerator(seq);\n try {\n while (enumerator[\"System.Collections.IEnumerator.MoveNext\"]()) {\n const a = enumerator[\"System.Collections.Generic.IEnumerator`1.get_Current\"]();\n p = (p.then((() => body(a))));\n }\n }\n finally {\n enumerator.Dispose();\n }\n return p;\n}\n\nexport function PromiseBuilder__While_2044D34(x, guard, p) {\n if (guard()) {\n return p.then((() => PromiseBuilder__While_2044D34(x, guard, p)));\n }\n else {\n return Promise.resolve(undefined);\n }\n}\n\nexport function PromiseBuilder__TryFinally_7D49A2FD(x, p, compensation) {\n return p.then(((x_1) => {\n compensation();\n return x_1;\n }),((er) => {\n compensation();\n throw er;\n }));\n}\n\nexport function PromiseBuilder__Delay_62FBFDE1(x, generator) {\n return {\n then: (f1, f2) => {\n try {\n return generator().then(f1, f2);\n }\n catch (er) {\n if (equals(f2, null)) {\n return Promise.reject(er);\n }\n else {\n try {\n return Promise.resolve(f2(er));\n }\n catch (er_1) {\n return Promise.reject(er_1);\n }\n }\n }\n },\n catch: (f) => {\n try {\n return generator().catch(f);\n }\n catch (er_2) {\n try {\n return Promise.resolve(f(er_2));\n }\n catch (er_3) {\n return Promise.reject(er_3);\n }\n }\n },\n };\n}\n\nexport function PromiseBuilder__Run_212F1D4B(x, p) {\n return new Promise(((success, fail) => {\n try {\n const p_1 = Promise.resolve(p);\n p_1.then(success, fail);\n }\n catch (er) {\n fail(er);\n }\n }));\n}\n\nexport function PromiseBuilder__Using_74F7E79D(x, resource, binder) {\n return PromiseBuilder__TryFinally_7D49A2FD(x, binder(resource), () => {\n let copyOfStruct = resource;\n copyOfStruct.Dispose();\n });\n}\n\n","import { compare, physicalHash, equals, structuralHash } from \"./Util.js\";\n\nexport function HashIdentity_FromFunctions(hash, eq) {\n return {\n Equals(x, y) {\n return eq(x, y);\n },\n GetHashCode(x_1) {\n return hash(x_1);\n },\n };\n}\n\nexport function HashIdentity_Structural() {\n return HashIdentity_FromFunctions((obj) => structuralHash(obj), (e1, e2) => equals(e1, e2));\n}\n\nexport function HashIdentity_Reference() {\n return HashIdentity_FromFunctions((obj) => physicalHash(obj), (e1, e2) => (e1 === e2));\n}\n\nexport function ComparisonIdentity_FromFunction(comparer) {\n return {\n Compare(x, y) {\n return comparer(x, y);\n },\n };\n}\n\nexport function ComparisonIdentity_Structural() {\n return ComparisonIdentity_FromFunction((e1, e2) => compare(e1, e2));\n}\n\n","import { substring, format, isNullOrEmpty, join } from \"./String.js\";\nimport { class_type } from \"./Reflection.js\";\nimport { clear, int32ToString } from \"./Util.js\";\nimport { toString } from \"./Types.js\";\n\nexport class StringBuilder {\n constructor(value, capacity) {\n this.buf = [];\n if (!isNullOrEmpty(value)) {\n void (this.buf.push(value));\n }\n }\n toString() {\n const __ = this;\n return join(\"\", __.buf);\n }\n}\n\nexport function StringBuilder$reflection() {\n return class_type(\"System.Text.StringBuilder\", void 0, StringBuilder);\n}\n\nexport function StringBuilder_$ctor_Z18115A39(value, capacity) {\n return new StringBuilder(value, capacity);\n}\n\nexport function StringBuilder_$ctor_Z524259A4(capacity) {\n return StringBuilder_$ctor_Z18115A39(\"\", capacity);\n}\n\nexport function StringBuilder_$ctor_Z721C83C5(value) {\n return StringBuilder_$ctor_Z18115A39(value, 16);\n}\n\nexport function StringBuilder_$ctor() {\n return StringBuilder_$ctor_Z18115A39(\"\", 16);\n}\n\nexport function StringBuilder__Append_Z721C83C5(x, s) {\n void (x.buf.push(s));\n return x;\n}\n\nexport function StringBuilder__Append_244C7CD6(x, c) {\n void (x.buf.push(c));\n return x;\n}\n\nexport function StringBuilder__Append_Z524259A4(x, o) {\n void (x.buf.push(int32ToString(o)));\n return x;\n}\n\nexport function StringBuilder__Append_5E38073B(x, o) {\n void (x.buf.push(o.toString()));\n return x;\n}\n\nexport function StringBuilder__Append_Z1FBCCD16(x, o) {\n void (x.buf.push(toString(o)));\n return x;\n}\n\nexport function StringBuilder__Append_4E60E31B(x, o) {\n void (x.buf.push(toString(o)));\n return x;\n}\n\nexport function StringBuilder__Append_695F1130(x, cs) {\n void (x.buf.push(cs.join('')));\n return x;\n}\n\nexport function StringBuilder__Append_43A65C09(x, s) {\n void (x.buf.push(toString(s)));\n return x;\n}\n\nexport function StringBuilder__AppendFormat_433E080(x, fmt, o) {\n void (x.buf.push(format(fmt, o)));\n return x;\n}\n\nexport function StringBuilder__AppendLine(x) {\n void (x.buf.push(\"\\n\"));\n return x;\n}\n\nexport function StringBuilder__AppendLine_Z721C83C5(x, s) {\n void (x.buf.push(s));\n void (x.buf.push(\"\\n\"));\n return x;\n}\n\nexport function StringBuilder__get_Length(x) {\n let len = 0;\n for (let i = x.buf.length - 1; i >= 0; i--) {\n len = ((len + x.buf[i].length) | 0);\n }\n return len | 0;\n}\n\nexport function StringBuilder__ToString_Z37302880(x, firstIndex, length) {\n return substring(toString(x), firstIndex, length);\n}\n\nexport function StringBuilder__Clear(x) {\n clear(x.buf);\n return x;\n}\n\n","import { structuralHash, equals } from \"./Util.js\";\nimport { HashIdentity_Structural, ComparisonIdentity_Structural } from \"./FSharp.Collections.js\";\nimport { StringBuilder__Append_Z721C83C5 } from \"./System.Text.js\";\n\nexport const LanguagePrimitives_GenericEqualityComparer = {\n [\"System.Collections.IEqualityComparer.Equals541DA560\"](x, y) {\n return equals(x, y);\n },\n [\"System.Collections.IEqualityComparer.GetHashCode4E60E31B\"](x_1) {\n return structuralHash(x_1);\n },\n};\n\nexport const LanguagePrimitives_GenericEqualityERComparer = {\n [\"System.Collections.IEqualityComparer.Equals541DA560\"](x, y) {\n return equals(x, y);\n },\n [\"System.Collections.IEqualityComparer.GetHashCode4E60E31B\"](x_1) {\n return structuralHash(x_1);\n },\n};\n\nexport function LanguagePrimitives_FastGenericComparer() {\n return ComparisonIdentity_Structural();\n}\n\nexport function LanguagePrimitives_FastGenericComparerFromTable() {\n return ComparisonIdentity_Structural();\n}\n\nexport function LanguagePrimitives_FastGenericEqualityComparer() {\n return HashIdentity_Structural();\n}\n\nexport function LanguagePrimitives_FastGenericEqualityComparerFromTable() {\n return HashIdentity_Structural();\n}\n\nexport function Operators_Failure(message) {\n return new Error(message);\n}\n\nexport function Operators_FailurePattern(exn) {\n return exn.message;\n}\n\nexport function Operators_NullArg(x) {\n throw (new Error(x));\n}\n\nexport function Operators_Using(resource, action) {\n try {\n return action(resource);\n }\n finally {\n if (equals(resource, null)) {\n }\n else {\n resource.Dispose();\n }\n }\n}\n\nexport function Operators_Lock(_lockObj, action) {\n return action();\n}\n\nexport function ExtraTopLevelOperators_LazyPattern(input) {\n return input.Value;\n}\n\nexport function PrintfModule_PrintFormatToStringBuilderThen(continuation, builder, format) {\n return format.cont((s) => {\n void StringBuilder__Append_Z721C83C5(builder, s);\n return continuation();\n });\n}\n\nexport function PrintfModule_PrintFormatToStringBuilder(builder, format) {\n return PrintfModule_PrintFormatToStringBuilderThen(() => {\n }, builder, format);\n}\n\n","import { equals, isArrayLike, isDisposable, toIterator, getEnumerator } from \"./Util.js\";\nimport { toString } from \"./Types.js\";\nimport { class_type } from \"./Reflection.js\";\nimport { some, value as value_1 } from \"./Option.js\";\nimport { Operators_NullArg } from \"./FSharp.Core.js\";\nimport { chunkBySize as chunkBySize_1, permute as permute_1, transpose as transpose_1, windowed as windowed_1, splitInto as splitInto_1, map as map_1, pairwise as pairwise_1, scanBack as scanBack_1, reverse as reverse_1, mapFoldBack as mapFoldBack_1, mapFold as mapFold_1, tryItem as tryItem_1, tryHead as tryHead_1, foldBack2 as foldBack2_1, foldBack as foldBack_1, tryFindIndexBack as tryFindIndexBack_1, tryFindBack as tryFindBack_1, singleton as singleton_1 } from \"./Array.js\";\nimport { length as length_1, tryItem as tryItem_2, isEmpty as isEmpty_1, tryHead as tryHead_2, ofSeq as ofSeq_1, ofArray as ofArray_1, toArray as toArray_1, FSharpList } from \"./List.js\";\n\nexport const SR_enumerationAlreadyFinished = \"Enumeration already finished.\";\n\nexport const SR_enumerationNotStarted = \"Enumeration has not started. Call MoveNext.\";\n\nexport const SR_inputSequenceEmpty = \"The input sequence was empty.\";\n\nexport const SR_inputSequenceTooLong = \"The input sequence contains more than one element.\";\n\nexport const SR_keyNotFoundAlt = \"An index satisfying the predicate was not found in the collection.\";\n\nexport const SR_notEnoughElements = \"The input sequence has an insufficient number of elements.\";\n\nexport const SR_resetNotSupported = \"Reset is not supported on this enumerator.\";\n\nexport function Enumerator_noReset() {\n throw (new Error(SR_resetNotSupported));\n}\n\nexport function Enumerator_notStarted() {\n throw (new Error(SR_enumerationNotStarted));\n}\n\nexport function Enumerator_alreadyFinished() {\n throw (new Error(SR_enumerationAlreadyFinished));\n}\n\nexport class Enumerator_Seq {\n constructor(f) {\n this.f = f;\n }\n toString() {\n const xs = this;\n const maxCount = 4;\n let i = 0;\n let str = \"seq [\";\n const e = getEnumerator(xs);\n try {\n while ((i < maxCount) ? e[\"System.Collections.IEnumerator.MoveNext\"]() : false) {\n if (i > 0) {\n str = (str + \"; \");\n }\n str = (str + toString(e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]()));\n i = ((i + 1) | 0);\n }\n if (i === maxCount) {\n str = (str + \"; ...\");\n }\n return str + \"]\";\n }\n finally {\n e.Dispose();\n }\n }\n GetEnumerator() {\n const x = this;\n return x.f();\n }\n [Symbol.iterator]() {\n return toIterator(this.GetEnumerator());\n }\n [\"System.Collections.IEnumerable.GetEnumerator\"]() {\n const x = this;\n return x.f();\n }\n}\n\nexport function Enumerator_Seq$reflection(gen0) {\n return class_type(\"SeqModule.Enumerator.Seq\", [gen0], Enumerator_Seq);\n}\n\nexport function Enumerator_Seq_$ctor_673A07F2(f) {\n return new Enumerator_Seq(f);\n}\n\nexport class Enumerator_FromFunctions$1 {\n constructor(current, next, dispose) {\n this.current = current;\n this.next = next;\n this.dispose = dispose;\n }\n [\"System.Collections.Generic.IEnumerator`1.get_Current\"]() {\n const __ = this;\n return __.current();\n }\n [\"System.Collections.IEnumerator.get_Current\"]() {\n const __ = this;\n return __.current();\n }\n [\"System.Collections.IEnumerator.MoveNext\"]() {\n const __ = this;\n return __.next();\n }\n [\"System.Collections.IEnumerator.Reset\"]() {\n return Enumerator_noReset();\n }\n Dispose() {\n const __ = this;\n __.dispose();\n }\n}\n\nexport function Enumerator_FromFunctions$1$reflection(gen0) {\n return class_type(\"SeqModule.Enumerator.FromFunctions`1\", [gen0], Enumerator_FromFunctions$1);\n}\n\nexport function Enumerator_FromFunctions$1_$ctor_58C54629(current, next, dispose) {\n return new Enumerator_FromFunctions$1(current, next, dispose);\n}\n\nexport function Enumerator_cast(e) {\n return Enumerator_FromFunctions$1_$ctor_58C54629(() => e[\"System.Collections.IEnumerator.get_Current\"](), () => e[\"System.Collections.IEnumerator.MoveNext\"](), () => {\n if (isDisposable(e)) {\n e.Dispose();\n }\n });\n}\n\nexport function Enumerator_concat(sources) {\n let outerOpt = void 0;\n let innerOpt = void 0;\n let started = false;\n let finished = false;\n let curr = void 0;\n const finish = () => {\n finished = true;\n if (innerOpt != null) {\n const inner = innerOpt;\n try {\n inner.Dispose();\n }\n finally {\n innerOpt = (void 0);\n }\n }\n if (outerOpt != null) {\n const outer = outerOpt;\n try {\n outer.Dispose();\n }\n finally {\n outerOpt = (void 0);\n }\n }\n };\n return Enumerator_FromFunctions$1_$ctor_58C54629(() => {\n if (!started) {\n Enumerator_notStarted();\n }\n else if (finished) {\n Enumerator_alreadyFinished();\n }\n if (curr != null) {\n return value_1(curr);\n }\n else {\n return Enumerator_alreadyFinished();\n }\n }, () => {\n let copyOfStruct;\n if (!started) {\n started = true;\n }\n if (finished) {\n return false;\n }\n else {\n let res = void 0;\n while (res == null) {\n const matchValue = [outerOpt, innerOpt];\n if (matchValue[0] != null) {\n if (matchValue[1] != null) {\n const inner_1 = matchValue[1];\n if (inner_1[\"System.Collections.IEnumerator.MoveNext\"]()) {\n curr = some(inner_1[\"System.Collections.Generic.IEnumerator`1.get_Current\"]());\n res = true;\n }\n else {\n try {\n inner_1.Dispose();\n }\n finally {\n innerOpt = (void 0);\n }\n }\n }\n else {\n const outer_1 = matchValue[0];\n if (outer_1[\"System.Collections.IEnumerator.MoveNext\"]()) {\n const ie = outer_1[\"System.Collections.Generic.IEnumerator`1.get_Current\"]();\n innerOpt = (copyOfStruct = ie, getEnumerator(copyOfStruct));\n }\n else {\n finish();\n res = false;\n }\n }\n }\n else {\n outerOpt = getEnumerator(sources);\n }\n }\n return value_1(res);\n }\n }, () => {\n if (!finished) {\n finish();\n }\n });\n}\n\nexport function Enumerator_enumerateThenFinally(f, e) {\n return Enumerator_FromFunctions$1_$ctor_58C54629(() => e[\"System.Collections.Generic.IEnumerator`1.get_Current\"](), () => e[\"System.Collections.IEnumerator.MoveNext\"](), () => {\n try {\n e.Dispose();\n }\n finally {\n f();\n }\n });\n}\n\nexport function Enumerator_generateWhileSome(openf, compute, closef) {\n let started = false;\n let curr = void 0;\n let state = some(openf());\n const dispose = () => {\n if (state != null) {\n const x_1 = value_1(state);\n try {\n closef(x_1);\n }\n finally {\n state = (void 0);\n }\n }\n };\n const finish = () => {\n try {\n dispose();\n }\n finally {\n curr = (void 0);\n }\n };\n return Enumerator_FromFunctions$1_$ctor_58C54629(() => {\n if (!started) {\n Enumerator_notStarted();\n }\n if (curr != null) {\n return value_1(curr);\n }\n else {\n return Enumerator_alreadyFinished();\n }\n }, () => {\n if (!started) {\n started = true;\n }\n if (state != null) {\n const s = value_1(state);\n let matchValue_1;\n try {\n matchValue_1 = compute(s);\n }\n catch (matchValue) {\n finish();\n throw matchValue;\n }\n if (matchValue_1 != null) {\n curr = matchValue_1;\n return true;\n }\n else {\n finish();\n return false;\n }\n }\n else {\n return false;\n }\n }, dispose);\n}\n\nexport function Enumerator_unfold(f, state) {\n let curr = void 0;\n let acc = state;\n return Enumerator_FromFunctions$1_$ctor_58C54629(() => {\n if (curr != null) {\n const st = curr[1];\n return curr[0];\n }\n else {\n return Enumerator_notStarted();\n }\n }, () => {\n curr = f(acc);\n if (curr != null) {\n const x_1 = curr[0];\n const st_1 = curr[1];\n acc = st_1;\n return true;\n }\n else {\n return false;\n }\n }, () => {\n });\n}\n\nexport function indexNotFound() {\n throw (new Error(SR_keyNotFoundAlt));\n}\n\nexport function checkNonNull(argName, arg) {\n if (arg == null) {\n Operators_NullArg(argName);\n }\n}\n\nexport function mkSeq(f) {\n return Enumerator_Seq_$ctor_673A07F2(f);\n}\n\nexport function ofSeq(xs) {\n checkNonNull(\"source\", xs);\n return getEnumerator(xs);\n}\n\nexport function delay(generator) {\n return mkSeq(() => getEnumerator(generator()));\n}\n\nexport function concat(sources) {\n return mkSeq(() => Enumerator_concat(sources));\n}\n\nexport function unfold(generator, state) {\n return mkSeq(() => Enumerator_unfold(generator, state));\n}\n\nexport function empty() {\n return delay(() => (new Array(0)));\n}\n\nexport function singleton(x) {\n return delay(() => singleton_1(x));\n}\n\nexport function ofArray(arr) {\n return arr;\n}\n\nexport function toArray(xs) {\n if (isArrayLike(xs)) {\n return xs;\n }\n else if (xs instanceof FSharpList) {\n return toArray_1(xs);\n }\n else {\n return Array.from(xs);\n }\n}\n\nexport function ofList(xs) {\n return xs;\n}\n\nexport function toList(xs) {\n if (isArrayLike(xs)) {\n return ofArray_1(xs);\n }\n else if (xs instanceof FSharpList) {\n return xs;\n }\n else {\n return ofSeq_1(xs);\n }\n}\n\nexport function generate(create, compute, dispose) {\n return mkSeq(() => Enumerator_generateWhileSome(create, compute, dispose));\n}\n\nexport function generateIndexed(create, compute, dispose) {\n return mkSeq(() => {\n let i = -1;\n return Enumerator_generateWhileSome(create, (x) => {\n i = ((i + 1) | 0);\n return compute(i, x);\n }, dispose);\n });\n}\n\nexport function append(xs, ys) {\n return concat([xs, ys]);\n}\n\nexport function cast(xs) {\n return mkSeq(() => {\n checkNonNull(\"source\", xs);\n return Enumerator_cast(getEnumerator(xs));\n });\n}\n\nexport function choose(chooser, xs) {\n return generate(() => ofSeq(xs), (e) => {\n let curr = void 0;\n while ((curr == null) ? e[\"System.Collections.IEnumerator.MoveNext\"]() : false) {\n curr = chooser(e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]());\n }\n return curr;\n }, (e_1) => {\n e_1.Dispose();\n });\n}\n\nexport function compareWith(comparer, xs, ys) {\n const e1 = ofSeq(xs);\n try {\n const e2 = ofSeq(ys);\n try {\n let c = 0;\n let b1 = e1[\"System.Collections.IEnumerator.MoveNext\"]();\n let b2 = e2[\"System.Collections.IEnumerator.MoveNext\"]();\n while (((c === 0) ? b1 : false) ? b2 : false) {\n c = (comparer(e1[\"System.Collections.Generic.IEnumerator`1.get_Current\"](), e2[\"System.Collections.Generic.IEnumerator`1.get_Current\"]()) | 0);\n if (c === 0) {\n b1 = e1[\"System.Collections.IEnumerator.MoveNext\"]();\n b2 = e2[\"System.Collections.IEnumerator.MoveNext\"]();\n }\n }\n return ((c !== 0) ? c : (b1 ? 1 : (b2 ? -1 : 0))) | 0;\n }\n finally {\n e2.Dispose();\n }\n }\n finally {\n e1.Dispose();\n }\n}\n\nexport function contains(value, xs, comparer) {\n const e = ofSeq(xs);\n try {\n let found = false;\n while ((!found) ? e[\"System.Collections.IEnumerator.MoveNext\"]() : false) {\n found = comparer.Equals(value, e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]());\n }\n return found;\n }\n finally {\n e.Dispose();\n }\n}\n\nexport function enumerateFromFunctions(create, moveNext, current) {\n return generate(create, (x) => (moveNext(x) ? some(current(x)) : (void 0)), (x_1) => {\n const matchValue = x_1;\n if (isDisposable(matchValue)) {\n matchValue.Dispose();\n }\n });\n}\n\nexport function enumerateThenFinally(source, compensation) {\n const compensation_1 = compensation;\n return mkSeq(() => {\n try {\n return Enumerator_enumerateThenFinally(compensation_1, ofSeq(source));\n }\n catch (matchValue) {\n compensation_1();\n throw matchValue;\n }\n });\n}\n\nexport function enumerateUsing(resource, source) {\n const compensation = () => {\n if (equals(resource, null)) {\n }\n else {\n let copyOfStruct = resource;\n copyOfStruct.Dispose();\n }\n };\n return mkSeq(() => {\n try {\n return Enumerator_enumerateThenFinally(compensation, ofSeq(source(resource)));\n }\n catch (matchValue_1) {\n compensation();\n throw matchValue_1;\n }\n });\n}\n\nexport function enumerateWhile(guard, xs) {\n return concat(unfold((i) => (guard() ? [xs, i + 1] : (void 0)), 0));\n}\n\nexport function filter(f, xs) {\n return choose((x) => {\n if (f(x)) {\n return some(x);\n }\n else {\n return void 0;\n }\n }, xs);\n}\n\nexport function exists(predicate, xs) {\n const e = ofSeq(xs);\n try {\n let found = false;\n while ((!found) ? e[\"System.Collections.IEnumerator.MoveNext\"]() : false) {\n found = predicate(e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]());\n }\n return found;\n }\n finally {\n e.Dispose();\n }\n}\n\nexport function exists2(predicate, xs, ys) {\n const e1 = ofSeq(xs);\n try {\n const e2 = ofSeq(ys);\n try {\n let found = false;\n while (((!found) ? e1[\"System.Collections.IEnumerator.MoveNext\"]() : false) ? e2[\"System.Collections.IEnumerator.MoveNext\"]() : false) {\n found = predicate(e1[\"System.Collections.Generic.IEnumerator`1.get_Current\"](), e2[\"System.Collections.Generic.IEnumerator`1.get_Current\"]());\n }\n return found;\n }\n finally {\n e2.Dispose();\n }\n }\n finally {\n e1.Dispose();\n }\n}\n\nexport function exactlyOne(xs) {\n const e = ofSeq(xs);\n try {\n if (e[\"System.Collections.IEnumerator.MoveNext\"]()) {\n const v = e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]();\n if (e[\"System.Collections.IEnumerator.MoveNext\"]()) {\n throw (new Error((SR_inputSequenceTooLong + \"\\\\nParameter name: \") + \"source\"));\n }\n else {\n return v;\n }\n }\n else {\n throw (new Error((SR_inputSequenceEmpty + \"\\\\nParameter name: \") + \"source\"));\n }\n }\n finally {\n e.Dispose();\n }\n}\n\nexport function tryExactlyOne(xs) {\n const e = ofSeq(xs);\n try {\n if (e[\"System.Collections.IEnumerator.MoveNext\"]()) {\n const v = e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]();\n return e[\"System.Collections.IEnumerator.MoveNext\"]() ? (void 0) : some(v);\n }\n else {\n return void 0;\n }\n }\n finally {\n e.Dispose();\n }\n}\n\nexport function tryFind(predicate, xs) {\n const e = ofSeq(xs);\n try {\n let res = void 0;\n while ((res == null) ? e[\"System.Collections.IEnumerator.MoveNext\"]() : false) {\n const c = e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]();\n if (predicate(c)) {\n res = some(c);\n }\n }\n return res;\n }\n finally {\n e.Dispose();\n }\n}\n\nexport function find(predicate, xs) {\n const matchValue = tryFind(predicate, xs);\n if (matchValue == null) {\n return indexNotFound();\n }\n else {\n return value_1(matchValue);\n }\n}\n\nexport function tryFindBack(predicate, xs) {\n return tryFindBack_1(predicate, toArray(xs));\n}\n\nexport function findBack(predicate, xs) {\n const matchValue = tryFindBack(predicate, xs);\n if (matchValue == null) {\n return indexNotFound();\n }\n else {\n return value_1(matchValue);\n }\n}\n\nexport function tryFindIndex(predicate, xs) {\n const e = ofSeq(xs);\n try {\n const loop = (i_mut) => {\n loop:\n while (true) {\n const i = i_mut;\n if (e[\"System.Collections.IEnumerator.MoveNext\"]()) {\n if (predicate(e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]())) {\n return i;\n }\n else {\n i_mut = (i + 1);\n continue loop;\n }\n }\n else {\n return void 0;\n }\n break;\n }\n };\n return loop(0);\n }\n finally {\n e.Dispose();\n }\n}\n\nexport function findIndex(predicate, xs) {\n const matchValue = tryFindIndex(predicate, xs);\n if (matchValue == null) {\n return indexNotFound();\n }\n else {\n return matchValue | 0;\n }\n}\n\nexport function tryFindIndexBack(predicate, xs) {\n return tryFindIndexBack_1(predicate, toArray(xs));\n}\n\nexport function findIndexBack(predicate, xs) {\n const matchValue = tryFindIndexBack(predicate, xs);\n if (matchValue == null) {\n return indexNotFound();\n }\n else {\n return matchValue | 0;\n }\n}\n\nexport function fold(folder, state, xs) {\n const e = ofSeq(xs);\n try {\n let acc = state;\n while (e[\"System.Collections.IEnumerator.MoveNext\"]()) {\n acc = folder(acc, e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]());\n }\n return acc;\n }\n finally {\n e.Dispose();\n }\n}\n\nexport function foldBack(folder, xs, state) {\n return foldBack_1(folder, toArray(xs), state);\n}\n\nexport function fold2(folder, state, xs, ys) {\n const e1 = ofSeq(xs);\n try {\n const e2 = ofSeq(ys);\n try {\n let acc = state;\n while (e1[\"System.Collections.IEnumerator.MoveNext\"]() ? e2[\"System.Collections.IEnumerator.MoveNext\"]() : false) {\n acc = folder(acc, e1[\"System.Collections.Generic.IEnumerator`1.get_Current\"](), e2[\"System.Collections.Generic.IEnumerator`1.get_Current\"]());\n }\n return acc;\n }\n finally {\n e2.Dispose();\n }\n }\n finally {\n e1.Dispose();\n }\n}\n\nexport function foldBack2(folder, xs, ys, state) {\n return foldBack2_1(folder, toArray(xs), toArray(ys), state);\n}\n\nexport function forAll(predicate, xs) {\n return !exists((x) => (!predicate(x)), xs);\n}\n\nexport function forAll2(predicate, xs, ys) {\n return !exists2((x, y) => (!predicate(x, y)), xs, ys);\n}\n\nexport function tryHead(xs) {\n if (isArrayLike(xs)) {\n return tryHead_1(xs);\n }\n else if (xs instanceof FSharpList) {\n return tryHead_2(xs);\n }\n else {\n const e = ofSeq(xs);\n try {\n return e[\"System.Collections.IEnumerator.MoveNext\"]() ? some(e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]()) : (void 0);\n }\n finally {\n e.Dispose();\n }\n }\n}\n\nexport function head(xs) {\n const matchValue = tryHead(xs);\n if (matchValue == null) {\n throw (new Error((SR_inputSequenceEmpty + \"\\\\nParameter name: \") + \"source\"));\n }\n else {\n return value_1(matchValue);\n }\n}\n\nexport function initialize(count, f) {\n return unfold((i) => ((i < count) ? [f(i), i + 1] : (void 0)), 0);\n}\n\nexport function initializeInfinite(f) {\n return initialize(2147483647, f);\n}\n\nexport function isEmpty(xs) {\n if (isArrayLike(xs)) {\n return xs.length === 0;\n }\n else if (xs instanceof FSharpList) {\n return isEmpty_1(xs);\n }\n else {\n const e = ofSeq(xs);\n try {\n return !e[\"System.Collections.IEnumerator.MoveNext\"]();\n }\n finally {\n e.Dispose();\n }\n }\n}\n\nexport function tryItem(index, xs) {\n if (isArrayLike(xs)) {\n return tryItem_1(index, xs);\n }\n else if (xs instanceof FSharpList) {\n return tryItem_2(index, xs);\n }\n else {\n const e = ofSeq(xs);\n try {\n const loop = (index_1_mut) => {\n loop:\n while (true) {\n const index_1 = index_1_mut;\n if (!e[\"System.Collections.IEnumerator.MoveNext\"]()) {\n return void 0;\n }\n else if (index_1 === 0) {\n return some(e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]());\n }\n else {\n index_1_mut = (index_1 - 1);\n continue loop;\n }\n break;\n }\n };\n return loop(index);\n }\n finally {\n e.Dispose();\n }\n }\n}\n\nexport function item(index, xs) {\n const matchValue = tryItem(index, xs);\n if (matchValue == null) {\n throw (new Error((SR_notEnoughElements + \"\\\\nParameter name: \") + \"index\"));\n }\n else {\n return value_1(matchValue);\n }\n}\n\nexport function iterate(action, xs) {\n return fold((unitVar0, x) => {\n action(x);\n }, void 0, xs);\n}\n\nexport function iterate2(action, xs, ys) {\n return fold2((unitVar0, x, y) => {\n action(x, y);\n }, void 0, xs, ys);\n}\n\nexport function iterateIndexed(action, xs) {\n void fold((i, x) => {\n action(i, x);\n return (i + 1) | 0;\n }, 0, xs);\n}\n\nexport function iterateIndexed2(action, xs, ys) {\n void fold2((i, x, y) => {\n action(i, x, y);\n return (i + 1) | 0;\n }, 0, xs, ys);\n}\n\nexport function tryLast(xs) {\n const e = ofSeq(xs);\n try {\n const loop = (acc_mut) => {\n loop:\n while (true) {\n const acc = acc_mut;\n if (!e[\"System.Collections.IEnumerator.MoveNext\"]()) {\n return acc;\n }\n else {\n acc_mut = e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]();\n continue loop;\n }\n break;\n }\n };\n return e[\"System.Collections.IEnumerator.MoveNext\"]() ? some(loop(e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]())) : (void 0);\n }\n finally {\n e.Dispose();\n }\n}\n\nexport function last(xs) {\n const matchValue = tryLast(xs);\n if (matchValue == null) {\n throw (new Error((SR_notEnoughElements + \"\\\\nParameter name: \") + \"source\"));\n }\n else {\n return value_1(matchValue);\n }\n}\n\nexport function length(xs) {\n if (isArrayLike(xs)) {\n return xs.length | 0;\n }\n else if (xs instanceof FSharpList) {\n return length_1(xs) | 0;\n }\n else {\n const e = ofSeq(xs);\n try {\n let count = 0;\n while (e[\"System.Collections.IEnumerator.MoveNext\"]()) {\n count = ((count + 1) | 0);\n }\n return count | 0;\n }\n finally {\n e.Dispose();\n }\n }\n}\n\nexport function map(mapping, xs) {\n return generate(() => ofSeq(xs), (e) => (e[\"System.Collections.IEnumerator.MoveNext\"]() ? some(mapping(e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]())) : (void 0)), (e_1) => {\n e_1.Dispose();\n });\n}\n\nexport function mapIndexed(mapping, xs) {\n return generateIndexed(() => ofSeq(xs), (i, e) => (e[\"System.Collections.IEnumerator.MoveNext\"]() ? some(mapping(i, e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]())) : (void 0)), (e_1) => {\n e_1.Dispose();\n });\n}\n\nexport function indexed(xs) {\n return mapIndexed((i, x) => [i, x], xs);\n}\n\nexport function map2(mapping, xs, ys) {\n return generate(() => [ofSeq(xs), ofSeq(ys)], (tupledArg) => {\n const e1 = tupledArg[0];\n const e2 = tupledArg[1];\n return (e1[\"System.Collections.IEnumerator.MoveNext\"]() ? e2[\"System.Collections.IEnumerator.MoveNext\"]() : false) ? some(mapping(e1[\"System.Collections.Generic.IEnumerator`1.get_Current\"](), e2[\"System.Collections.Generic.IEnumerator`1.get_Current\"]())) : (void 0);\n }, (tupledArg_1) => {\n try {\n tupledArg_1[0].Dispose();\n }\n finally {\n tupledArg_1[1].Dispose();\n }\n });\n}\n\nexport function mapIndexed2(mapping, xs, ys) {\n return generateIndexed(() => [ofSeq(xs), ofSeq(ys)], (i, tupledArg) => {\n const e1 = tupledArg[0];\n const e2 = tupledArg[1];\n return (e1[\"System.Collections.IEnumerator.MoveNext\"]() ? e2[\"System.Collections.IEnumerator.MoveNext\"]() : false) ? some(mapping(i, e1[\"System.Collections.Generic.IEnumerator`1.get_Current\"](), e2[\"System.Collections.Generic.IEnumerator`1.get_Current\"]())) : (void 0);\n }, (tupledArg_1) => {\n try {\n tupledArg_1[0].Dispose();\n }\n finally {\n tupledArg_1[1].Dispose();\n }\n });\n}\n\nexport function map3(mapping, xs, ys, zs) {\n return generate(() => [ofSeq(xs), ofSeq(ys), ofSeq(zs)], (tupledArg) => {\n const e1 = tupledArg[0];\n const e2 = tupledArg[1];\n const e3 = tupledArg[2];\n return ((e1[\"System.Collections.IEnumerator.MoveNext\"]() ? e2[\"System.Collections.IEnumerator.MoveNext\"]() : false) ? e3[\"System.Collections.IEnumerator.MoveNext\"]() : false) ? some(mapping(e1[\"System.Collections.Generic.IEnumerator`1.get_Current\"](), e2[\"System.Collections.Generic.IEnumerator`1.get_Current\"](), e3[\"System.Collections.Generic.IEnumerator`1.get_Current\"]())) : (void 0);\n }, (tupledArg_1) => {\n try {\n tupledArg_1[0].Dispose();\n }\n finally {\n try {\n tupledArg_1[1].Dispose();\n }\n finally {\n tupledArg_1[2].Dispose();\n }\n }\n });\n}\n\nexport function readOnly(xs) {\n checkNonNull(\"source\", xs);\n return map((x) => x, xs);\n}\n\nexport function cache(xs) {\n let cached = false;\n const xsCache = [];\n return delay(() => {\n if (!cached) {\n cached = true;\n return map((x) => {\n void (xsCache.push(x));\n return x;\n }, xs);\n }\n else {\n return xsCache;\n }\n });\n}\n\nexport function allPairs(xs, ys) {\n const ysCache = cache(ys);\n return delay(() => concat(map((x) => map((y) => [x, y], ysCache), xs)));\n}\n\nexport function mapFold(mapping, state, xs) {\n const patternInput = mapFold_1(mapping, state, toArray(xs));\n return [readOnly(patternInput[0]), patternInput[1]];\n}\n\nexport function mapFoldBack(mapping, xs, state) {\n const patternInput = mapFoldBack_1(mapping, toArray(xs), state);\n return [readOnly(patternInput[0]), patternInput[1]];\n}\n\nexport function tryPick(chooser, xs) {\n const e = ofSeq(xs);\n try {\n let res = void 0;\n while ((res == null) ? e[\"System.Collections.IEnumerator.MoveNext\"]() : false) {\n res = chooser(e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]());\n }\n return res;\n }\n finally {\n e.Dispose();\n }\n}\n\nexport function pick(chooser, xs) {\n const matchValue = tryPick(chooser, xs);\n if (matchValue == null) {\n return indexNotFound();\n }\n else {\n return value_1(matchValue);\n }\n}\n\nexport function reduce(folder, xs) {\n const e = ofSeq(xs);\n try {\n const loop = (acc_mut) => {\n loop:\n while (true) {\n const acc = acc_mut;\n if (e[\"System.Collections.IEnumerator.MoveNext\"]()) {\n acc_mut = folder(acc, e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]());\n continue loop;\n }\n else {\n return acc;\n }\n break;\n }\n };\n if (e[\"System.Collections.IEnumerator.MoveNext\"]()) {\n return loop(e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]());\n }\n else {\n throw (new Error(SR_inputSequenceEmpty));\n }\n }\n finally {\n e.Dispose();\n }\n}\n\nexport function reduceBack(folder, xs) {\n const arr = toArray(xs);\n if (arr.length > 0) {\n return arr.reduceRight(folder);\n }\n else {\n throw (new Error(SR_inputSequenceEmpty));\n }\n}\n\nexport function replicate(n, x) {\n return initialize(n, (_arg1) => x);\n}\n\nexport function reverse(xs) {\n return delay(() => ofArray(reverse_1(toArray(xs))));\n}\n\nexport function scan(folder, state, xs) {\n return delay(() => {\n let acc = state;\n return concat([singleton(state), map((x) => {\n acc = folder(acc, x);\n return acc;\n }, xs)]);\n });\n}\n\nexport function scanBack(folder, xs, state) {\n return delay(() => ofArray(scanBack_1(folder, toArray(xs), state)));\n}\n\nexport function skip(count, xs) {\n return mkSeq(() => {\n const e = ofSeq(xs);\n try {\n for (let i = 1; i <= count; i++) {\n if (!e[\"System.Collections.IEnumerator.MoveNext\"]()) {\n throw (new Error((SR_notEnoughElements + \"\\\\nParameter name: \") + \"source\"));\n }\n }\n return Enumerator_enumerateThenFinally(() => {\n }, e);\n }\n catch (matchValue) {\n e.Dispose();\n throw matchValue;\n }\n });\n}\n\nexport function skipWhile(predicate, xs) {\n return delay(() => {\n let skipped = true;\n return filter((x) => {\n if (skipped) {\n skipped = predicate(x);\n }\n return !skipped;\n }, xs);\n });\n}\n\nexport function tail(xs) {\n return skip(1, xs);\n}\n\nexport function take(count, xs) {\n return generateIndexed(() => ofSeq(xs), (i, e) => {\n if (i < count) {\n if (e[\"System.Collections.IEnumerator.MoveNext\"]()) {\n return some(e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]());\n }\n else {\n throw (new Error((SR_notEnoughElements + \"\\\\nParameter name: \") + \"source\"));\n }\n }\n else {\n return void 0;\n }\n }, (e_1) => {\n e_1.Dispose();\n });\n}\n\nexport function takeWhile(predicate, xs) {\n return generate(() => ofSeq(xs), (e) => ((e[\"System.Collections.IEnumerator.MoveNext\"]() ? predicate(e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]()) : false) ? some(e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]()) : (void 0)), (e_1) => {\n e_1.Dispose();\n });\n}\n\nexport function truncate(count, xs) {\n return generateIndexed(() => ofSeq(xs), (i, e) => (((i < count) ? e[\"System.Collections.IEnumerator.MoveNext\"]() : false) ? some(e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]()) : (void 0)), (e_1) => {\n e_1.Dispose();\n });\n}\n\nexport function zip(xs, ys) {\n return map2((x, y) => [x, y], xs, ys);\n}\n\nexport function zip3(xs, ys, zs) {\n return map3((x, y, z) => [x, y, z], xs, ys, zs);\n}\n\nexport function collect(mapping, xs) {\n return delay(() => concat(map(mapping, xs)));\n}\n\nexport function where(predicate, xs) {\n return filter(predicate, xs);\n}\n\nexport function pairwise(xs) {\n return delay(() => ofArray(pairwise_1(toArray(xs))));\n}\n\nexport function splitInto(chunks, xs) {\n return delay(() => ofArray(map_1((arr) => ofArray(arr), splitInto_1(chunks, toArray(xs)))));\n}\n\nexport function windowed(windowSize, xs) {\n return delay(() => ofArray(map_1((arr) => ofArray(arr), windowed_1(windowSize, toArray(xs)))));\n}\n\nexport function transpose(xss) {\n return delay(() => ofArray(map_1((arr) => ofArray(arr), transpose_1(map_1((xs_1) => toArray(xs_1), toArray(xss))))));\n}\n\nexport function sortWith(comparer, xs) {\n return delay(() => {\n const arr = toArray(xs);\n arr.sort(comparer);\n return ofArray(arr);\n });\n}\n\nexport function sort(xs, comparer) {\n return sortWith((x, y) => comparer.Compare(x, y), xs);\n}\n\nexport function sortBy(projection, xs, comparer) {\n return sortWith((x, y) => comparer.Compare(projection(x), projection(y)), xs);\n}\n\nexport function sortDescending(xs, comparer) {\n return sortWith((x, y) => (comparer.Compare(x, y) * -1), xs);\n}\n\nexport function sortByDescending(projection, xs, comparer) {\n return sortWith((x, y) => (comparer.Compare(projection(x), projection(y)) * -1), xs);\n}\n\nexport function sum(xs, adder) {\n return fold((acc, x) => adder.Add(acc, x), adder.GetZero(), xs);\n}\n\nexport function sumBy(f, xs, adder) {\n return fold((acc, x) => adder.Add(acc, f(x)), adder.GetZero(), xs);\n}\n\nexport function maxBy(projection, xs, comparer) {\n return reduce((x, y) => ((comparer.Compare(projection(y), projection(x)) > 0) ? y : x), xs);\n}\n\nexport function max(xs, comparer) {\n return reduce((x, y) => ((comparer.Compare(y, x) > 0) ? y : x), xs);\n}\n\nexport function minBy(projection, xs, comparer) {\n return reduce((x, y) => ((comparer.Compare(projection(y), projection(x)) > 0) ? x : y), xs);\n}\n\nexport function min(xs, comparer) {\n return reduce((x, y) => ((comparer.Compare(y, x) > 0) ? x : y), xs);\n}\n\nexport function average(xs, averager) {\n let count = 0;\n return averager.DivideByInt(fold((acc, x) => {\n count = ((count + 1) | 0);\n return averager.Add(acc, x);\n }, averager.GetZero(), xs), count);\n}\n\nexport function averageBy(f, xs, averager) {\n let count = 0;\n return averager.DivideByInt(fold((acc, x) => {\n count = ((count + 1) | 0);\n return averager.Add(acc, f(x));\n }, averager.GetZero(), xs), count);\n}\n\nexport function permute(f, xs) {\n return delay(() => ofArray(permute_1(f, toArray(xs))));\n}\n\nexport function chunkBySize(chunkSize, xs) {\n return delay(() => ofArray(map_1((arr) => ofArray(arr), chunkBySize_1(chunkSize, toArray(xs)))));\n}\n\n","import { Union, Record } from \"./.fable/fable-library.3.1.12/Types.js\";\nimport { union_type, record_type, bool_type, tuple_type, class_type } from \"./.fable/fable-library.3.1.12/Reflection.js\";\nimport { comparePrimitives, max } from \"./.fable/fable-library.3.1.12/Util.js\";\nimport { now, op_Addition, op_Subtraction } from \"./.fable/fable-library.3.1.12/Date.js\";\nimport { Cmd_map, Cmd_batch, Cmd_OfFunc_result, Cmd_none, Cmd_OfPromise_either } from \"./.fable/Fable.Elmish.3.1.0/cmd.fs.js\";\nimport { PromiseBuilder__Delay_62FBFDE1, PromiseBuilder__Run_212F1D4B } from \"./.fable/Fable.Promise.2.2.2/Promise.fs.js\";\nimport { promise } from \"./.fable/Fable.Promise.2.2.2/PromiseImpl.fs.js\";\nimport { empty, singleton, append, delay as delay_1, toList } from \"./.fable/fable-library.3.1.12/Seq.js\";\n\nexport class Model$1 extends Record {\n constructor(Delay, Input, Output, OutputDone) {\n super();\n this.Delay = Delay;\n this.Input = Input;\n this.Output = Output;\n this.OutputDone = OutputDone;\n }\n}\n\nexport function Model$1$reflection(gen0) {\n return record_type(\"Elmish.Debounce.Model`1\", [gen0], Model$1, () => [[\"Delay\", class_type(\"System.TimeSpan\")], [\"Input\", tuple_type(gen0, class_type(\"System.DateTime\"))], [\"Output\", gen0], [\"OutputDone\", bool_type]]);\n}\n\nexport function Model$1__get_TimeUntilOutput(this$) {\n return max((x, y) => comparePrimitives(x, y), op_Subtraction(op_Addition(this$.Input[1], this$.Delay), now()), 0);\n}\n\nexport function init(delay, value) {\n return new Model$1(delay, [value, op_Subtraction(now(), delay)], value, true);\n}\n\nexport class Msg$1 extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Input\", \"TryOutput\", \"Output\"];\n }\n}\n\nexport function Msg$1$reflection(gen0) {\n return union_type(\"Elmish.Debounce.Msg`1\", [gen0], Msg$1, () => [[[\"Item\", gen0]], [], [[\"Item\", gen0]]]);\n}\n\nfunction delayCmd(delay, msg) {\n return Cmd_OfPromise_either(() => PromiseBuilder__Run_212F1D4B(promise, PromiseBuilder__Delay_62FBFDE1(promise, () => ((new Promise(resolve => setTimeout(resolve, (~(~delay))))).then((() => (Promise.resolve(undefined))))))), void 0, () => msg, (_arg1_1) => msg);\n}\n\nfunction updateInternal(msg, model) {\n switch (msg.tag) {\n case 1: {\n return [model, model.OutputDone ? Cmd_none() : ((Model$1__get_TimeUntilOutput(model) <= 0) ? Cmd_OfFunc_result(new Msg$1(2, model.Input[0])) : delayCmd(Model$1__get_TimeUntilOutput(model), new Msg$1(1)))];\n }\n case 2: {\n return [model.OutputDone ? model : (new Model$1(model.Delay, model.Input, msg.fields[0], true)), Cmd_none()];\n }\n default: {\n return [new Model$1(model.Delay, [msg.fields[0], now()], model.Output, false), delayCmd(Model$1__get_TimeUntilOutput(model), new Msg$1(1))];\n }\n }\n}\n\nexport function inputCmd(value, wrapMsg) {\n return Cmd_OfFunc_result(wrapMsg(new Msg$1(0, value)));\n}\n\nexport function updateWithCmd(msg, wrapMsg, model, wrapModel, cmdOnOutput) {\n const patternInput = updateInternal(msg, model);\n const cmd$0027 = Cmd_batch(toList(delay_1(() => append(singleton(Cmd_map(wrapMsg, patternInput[1])), delay_1(() => {\n if (msg.tag === 2) {\n return singleton(cmdOnOutput(msg.fields[0]));\n }\n else {\n return empty();\n }\n })))));\n return [wrapModel(patternInput[0]), cmd$0027];\n}\n\nexport function update(msg, wrapMsg, model, wrapModel) {\n return updateWithCmd(msg, wrapMsg, model, wrapModel, (_arg1) => Cmd_none());\n}\n\n","import { equals } from \"./Util.js\";\nimport { Union } from \"./Types.js\";\nconst CaseRules = {\n None: 0,\n LowerFirst: 1,\n SnakeCase: 2,\n SnakeCaseAllCaps: 3,\n KebabCase: 4,\n};\nfunction dashify(str, separator) {\n return str.replace(/[a-z]?[A-Z]/g, (m) => m.length === 1\n ? m.toLowerCase()\n : m.charAt(0) + separator + m.charAt(1).toLowerCase());\n}\nfunction changeCase(str, caseRule) {\n switch (caseRule) {\n case CaseRules.LowerFirst:\n return str.charAt(0).toLowerCase() + str.slice(1);\n case CaseRules.SnakeCase:\n return dashify(str, \"_\");\n case CaseRules.SnakeCaseAllCaps:\n return dashify(str, \"_\").toUpperCase();\n case CaseRules.KebabCase:\n return dashify(str, \"-\");\n case CaseRules.None:\n default:\n return str;\n }\n}\nexport function keyValueList(fields, caseRule = CaseRules.None) {\n const obj = {};\n const definedCaseRule = caseRule;\n function fail(kvPair) {\n throw new Error(\"Cannot infer key and value of \" + String(kvPair));\n }\n function assign(key, caseRule, value) {\n key = changeCase(key, caseRule);\n obj[key] = value;\n }\n for (let kvPair of fields) {\n let caseRule = CaseRules.None;\n if (kvPair == null) {\n fail(kvPair);\n }\n // Deflate unions and use the defined case rule\n if (kvPair instanceof Union) {\n const name = kvPair.cases()[kvPair.tag];\n kvPair = kvPair.fields.length === 0 ? name : [name].concat(kvPair.fields);\n caseRule = definedCaseRule;\n }\n if (Array.isArray(kvPair)) {\n switch (kvPair.length) {\n case 0:\n fail(kvPair);\n break;\n case 1:\n assign(kvPair[0], caseRule, true);\n break;\n case 2:\n const value = kvPair[1];\n assign(kvPair[0], caseRule, value);\n break;\n default:\n assign(kvPair[0], caseRule, kvPair.slice(1));\n }\n }\n else if (typeof kvPair === \"string\") {\n assign(kvPair, caseRule, true);\n }\n else {\n fail(kvPair);\n }\n }\n return obj;\n}\n// TODO: Move these methods to Map and Set modules\nexport function containsValue(v, map) {\n for (const kv of map) {\n if (equals(v, kv[1])) {\n return true;\n }\n }\n return false;\n}\nexport function tryGetValue(map, key, defaultValue) {\n if (map.has(key)) {\n defaultValue.contents = map.get(key);\n return true;\n }\n return false;\n}\nexport function addToSet(v, set) {\n if (set.has(v)) {\n return false;\n }\n set.add(v);\n return true;\n}\nexport function addToDict(dict, k, v) {\n if (dict.has(k)) {\n throw new Error(\"An item with the same key has already been added. Key: \" + k);\n }\n dict.set(k, v);\n}\nexport function getItemFromDict(map, key) {\n if (map.has(key)) {\n return map.get(key);\n }\n else {\n throw new Error(`The given key '${key}' was not present in the dictionary.`);\n }\n}\n","import { FSharpRef, Record, Union } from \"../fable-library.3.1.12/Types.js\";\nimport { record_type, class_type, tuple_type, lambda_type, union_type, list_type, obj_type, string_type } from \"../fable-library.3.1.12/Reflection.js\";\nimport { FSharpResult$2 } from \"../fable-library.3.1.12/Choice.js\";\nimport { addToDict, tryGetValue } from \"../fable-library.3.1.12/MapUtil.js\";\nimport { replace } from \"../fable-library.3.1.12/RegExp.js\";\n\nexport class ErrorReason extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"BadPrimitive\", \"BadPrimitiveExtra\", \"BadType\", \"BadField\", \"BadPath\", \"TooSmallArray\", \"FailMessage\", \"BadOneOf\"];\n }\n}\n\nexport function ErrorReason$reflection() {\n return union_type(\"Thoth.Json.ErrorReason\", [], ErrorReason, () => [[[\"Item1\", string_type], [\"Item2\", obj_type]], [[\"Item1\", string_type], [\"Item2\", obj_type], [\"Item3\", string_type]], [[\"Item1\", string_type], [\"Item2\", obj_type]], [[\"Item1\", string_type], [\"Item2\", obj_type]], [[\"Item1\", string_type], [\"Item2\", obj_type], [\"Item3\", string_type]], [[\"Item1\", string_type], [\"Item2\", obj_type]], [[\"Item\", string_type]], [[\"Item\", list_type(string_type)]]]);\n}\n\nexport class CaseStrategy extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"PascalCase\", \"CamelCase\", \"SnakeCase\"];\n }\n}\n\nexport function CaseStrategy$reflection() {\n return union_type(\"Thoth.Json.CaseStrategy\", [], CaseStrategy, () => [[], [], []]);\n}\n\nexport class ExtraCoders extends Record {\n constructor(Hash, Coders) {\n super();\n this.Hash = Hash;\n this.Coders = Coders;\n }\n}\n\nexport function ExtraCoders$reflection() {\n return record_type(\"Thoth.Json.ExtraCoders\", [], ExtraCoders, () => [[\"Hash\", string_type], [\"Coders\", class_type(\"Microsoft.FSharp.Collections.FSharpMap`2\", [string_type, tuple_type(lambda_type(obj_type, obj_type), lambda_type(string_type, lambda_type(obj_type, union_type(\"Microsoft.FSharp.Core.FSharpResult`2\", [obj_type, tuple_type(string_type, ErrorReason$reflection())], FSharpResult$2, () => [[[\"ResultValue\", obj_type]], [[\"ErrorValue\", tuple_type(string_type, ErrorReason$reflection())]]]))))])]]);\n}\n\nexport class Util_Cache$1 {\n constructor() {\n this.cache = (new Map([]));\n }\n}\n\nexport function Util_Cache$1$reflection(gen0) {\n return class_type(\"Thoth.Json.Util.Cache`1\", [gen0], Util_Cache$1);\n}\n\nexport function Util_Cache$1_$ctor() {\n return new Util_Cache$1();\n}\n\nexport function Util_Cache$1__GetOrAdd_43981464(__, key, factory) {\n let matchValue;\n let outArg = null;\n matchValue = [tryGetValue(__.cache, key, new FSharpRef(() => outArg, (v) => {\n outArg = v;\n })), outArg];\n if (matchValue[0]) {\n return matchValue[1];\n }\n else {\n const x_1 = factory();\n addToDict(__.cache, key, x_1);\n return x_1;\n }\n}\n\nexport const Util_CachedEncoders = Util_Cache$1_$ctor();\n\nexport const Util_CachedDecoders = Util_Cache$1_$ctor();\n\nexport function Util_Casing_lowerFirst(str) {\n return str.slice(void 0, 0 + 1).toLowerCase() + str.slice(1, str.length);\n}\n\nexport function Util_Casing_convert(caseStrategy, fieldName) {\n switch (caseStrategy.tag) {\n case 2: {\n return replace(Util_Casing_lowerFirst(fieldName), \"[A-Z]\", \"_$0\").toLowerCase();\n }\n case 0: {\n return fieldName;\n }\n default: {\n return Util_Casing_lowerFirst(fieldName);\n }\n }\n}\n\n","import { trim } from \"./String.js\";\n// RFC 4122 compliant. From https://stackoverflow.com/a/13653180/3922220\n// const guidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;\n// Relax GUID parsing, see #1637\nconst guidRegex = /^[\\(\\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\\)\\}]{0,2}$/;\nconst guidRegexNoHyphen = /^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/;\nconst guidRegexHex = /^\\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\\}\\}$/;\nconst guidHexCaptures = /^([0-9a-f]{8})-(([0-9a-f]{4})-)(([0-9a-f]{4})-)([0-9a-f]{2})([0-9a-f]{2})-([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/;\nexport function toString(str, format, _provider) {\n if (format && (format === null || format === void 0 ? void 0 : format.length) > 0) {\n switch (format) {\n case \"N\":\n return str.replace(/-/g, '');\n case \"D\":\n return str;\n case \"B\":\n return \"{\" + str + \"}\";\n case \"P\":\n return \"(\" + str + \")\";\n case \"X\":\n return str.replace(guidHexCaptures, \"{0x$1,0x$3,0x$5,{0x$6,0x$7,0x$8,0x$9,0x$10,0x$11,0x$12,0x$13}}\");\n default:\n throw new Error(\"Unrecognized Guid print format\");\n }\n }\n else {\n return str;\n }\n}\n/** Validates UUID as specified in RFC4122 (versions 1-5). */\nexport function parse(str) {\n function hyphenateGuid(str) {\n return str.replace(guidRegexNoHyphen, \"$1-$2-$3-$4-$5\");\n }\n const wsTrimAndLowered = str.trim().toLowerCase();\n if (guidRegex.test(wsTrimAndLowered)) {\n return trim(wsTrimAndLowered, \"{\", \"}\", \"(\", \")\");\n }\n else if (guidRegexNoHyphen.test(wsTrimAndLowered)) {\n return hyphenateGuid(wsTrimAndLowered);\n }\n else if (guidRegexHex.test(wsTrimAndLowered)) {\n return hyphenateGuid(wsTrimAndLowered.replace(/[\\{\\},]|0x/g, ''));\n }\n else {\n throw new Error(\"Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\");\n }\n}\nexport function tryParse(str, defValue) {\n try {\n defValue.contents = parse(str);\n return true;\n }\n catch (_a) {\n return false;\n }\n}\n// From https://gist.github.com/LeverOne/1308368\nexport function newGuid() {\n let b = \"\";\n for (let a = 0; a++ < 36;) {\n b += a * 51 & 52\n ? (a ^ 15 ? 8 ^ Math.random() * (a ^ 20 ? 16 : 4) : 4).toString(16)\n : \"-\";\n }\n return b;\n}\n// Maps for number <-> hex string conversion\nlet _convertMapsInitialized = false;\nlet _byteToHex;\nlet _hexToByte;\nfunction initConvertMaps() {\n _byteToHex = new Array(256);\n _hexToByte = {};\n for (let i = 0; i < 256; i++) {\n _byteToHex[i] = (i + 0x100).toString(16).substr(1);\n _hexToByte[_byteToHex[i]] = i;\n }\n _convertMapsInitialized = true;\n}\n/** Parse a UUID into it's component bytes */\n// Adapted from https://github.com/zefferus/uuid-parse\nexport function guidToArray(s) {\n if (!_convertMapsInitialized) {\n initConvertMaps();\n }\n let i = 0;\n const buf = new Uint8Array(16);\n s.toLowerCase().replace(/[0-9a-f]{2}/g, ((oct) => {\n switch (i) {\n // .NET saves first three byte groups with different endianness\n // See https://stackoverflow.com/a/16722909/3922220\n case 0:\n case 1:\n case 2:\n case 3:\n buf[3 - i++] = _hexToByte[oct];\n break;\n case 4:\n case 5:\n buf[9 - i++] = _hexToByte[oct];\n break;\n case 6:\n case 7:\n buf[13 - i++] = _hexToByte[oct];\n break;\n case 8:\n case 9:\n case 10:\n case 11:\n case 12:\n case 13:\n case 14:\n case 15:\n buf[i++] = _hexToByte[oct];\n break;\n }\n }));\n // Zero out remaining bytes if string was short\n while (i < 16) {\n buf[i++] = 0;\n }\n return buf;\n}\n/** Convert UUID byte array into a string */\nexport function arrayToGuid(buf) {\n if (buf.length !== 16) {\n throw new Error(\"Byte array for GUID must be exactly 16 bytes long\");\n }\n if (!_convertMapsInitialized) {\n initConvertMaps();\n }\n const guid = _byteToHex[buf[3]] + _byteToHex[buf[2]] +\n _byteToHex[buf[1]] + _byteToHex[buf[0]] + \"-\" +\n _byteToHex[buf[5]] + _byteToHex[buf[4]] + \"-\" +\n _byteToHex[buf[7]] + _byteToHex[buf[6]] + \"-\" +\n _byteToHex[buf[8]] + _byteToHex[buf[9]] + \"-\" +\n _byteToHex[buf[10]] + _byteToHex[buf[11]] +\n _byteToHex[buf[12]] + _byteToHex[buf[13]] +\n _byteToHex[buf[14]] + _byteToHex[buf[15]];\n return guid;\n}\n","import { Record } from \"../Types.js\";\nimport { record_type, array_type, int32_type } from \"../Reflection.js\";\nimport { op_LeftShift, op_BitwiseAnd, op_Addition, compare, op_Subtraction, op_Division, equals, fromInteger, op_Multiply, op_Modulus, toInt, fromBits } from \"../Long.js\";\nimport { copy, initialize, map, fill } from \"../Array.js\";\nimport { toArray, empty, head, tail, isEmpty, cons } from \"../List.js\";\nimport { int32ToString } from \"../Util.js\";\nimport { isNullOrEmpty, join } from \"../String.js\";\n\nexport class BigNat extends Record {\n constructor(bound, digits) {\n super();\n this.bound = (bound | 0);\n this.digits = digits;\n }\n}\n\nexport function BigNat$reflection() {\n return record_type(\"BigInt.BigNat\", [], BigNat, () => [[\"bound\", int32_type], [\"digits\", array_type(int32_type)]]);\n}\n\nexport function BigNatModule_FFT_pow32(x_mut, n_mut) {\n BigNatModule_FFT_pow32:\n while (true) {\n const x = x_mut, n = n_mut;\n if (n === 0) {\n return 1;\n }\n else if ((n % 2) === 0) {\n x_mut = (x * x);\n n_mut = (~(~(n / 2)));\n continue BigNatModule_FFT_pow32;\n }\n else {\n return (x * BigNatModule_FFT_pow32(x * x, ~(~(n / 2)))) | 0;\n }\n break;\n }\n}\n\nexport function BigNatModule_FFT_leastBounding2Power(b) {\n const findBounding2Power = (b_1_mut, tp_mut, i_mut) => {\n findBounding2Power:\n while (true) {\n const b_1 = b_1_mut, tp = tp_mut, i = i_mut;\n if (b_1 <= tp) {\n return [tp, i];\n }\n else {\n b_1_mut = b_1;\n tp_mut = (tp * 2);\n i_mut = (i + 1);\n continue findBounding2Power;\n }\n break;\n }\n };\n return findBounding2Power(b, 1, 0);\n}\n\nexport const BigNatModule_FFT_p = fromBits(2013265921, 0, false);\n\nconst BigNatModule_FFT_patternInput$004075 = [27, 15, 31, 440564289];\n\nexport const BigNatModule_FFT_w = BigNatModule_FFT_patternInput$004075[3];\n\nexport const BigNatModule_FFT_m = BigNatModule_FFT_patternInput$004075[1];\n\nexport const BigNatModule_FFT_k = BigNatModule_FFT_patternInput$004075[0];\n\nexport const BigNatModule_FFT_g = BigNatModule_FFT_patternInput$004075[2];\n\nexport const BigNatModule_FFT_primeP = BigNatModule_FFT_p;\n\nexport const BigNatModule_FFT_maxBitsInsideFp = 30;\n\nexport const BigNatModule_FFT_Fp_p = 2013265921;\n\nexport const BigNatModule_FFT_Fp_p64 = fromBits(2013265921, 0, true);\n\nexport function BigNatModule_FFT_Fp_toInt(x) {\n return ~(~x);\n}\n\nexport function BigNatModule_FFT_Fp_ofInt32(x) {\n return x >>> 0;\n}\n\nexport const BigNatModule_FFT_Fp_mzero = 0;\n\nexport const BigNatModule_FFT_Fp_mone = 1;\n\nexport const BigNatModule_FFT_Fp_mtwo = 2;\n\nexport function BigNatModule_FFT_Fp_mpow(x_mut, n_mut) {\n BigNatModule_FFT_Fp_mpow:\n while (true) {\n const x = x_mut, n = n_mut;\n if (n === 0) {\n return BigNatModule_FFT_Fp_mone;\n }\n else if ((n % 2) === 0) {\n x_mut = (toInt(op_Modulus(op_Multiply(fromInteger(x, true, 6), fromInteger(x, true, 6)), BigNatModule_FFT_Fp_p64)) >>> 0);\n n_mut = (~(~(n / 2)));\n continue BigNatModule_FFT_Fp_mpow;\n }\n else {\n const y_2 = BigNatModule_FFT_Fp_mpow(toInt(op_Modulus(op_Multiply(fromInteger(x, true, 6), fromInteger(x, true, 6)), BigNatModule_FFT_Fp_p64)) >>> 0, ~(~(n / 2)));\n return toInt(op_Modulus(op_Multiply(fromInteger(x, true, 6), fromInteger(y_2, true, 6)), BigNatModule_FFT_Fp_p64)) >>> 0;\n }\n break;\n }\n}\n\nexport function BigNatModule_FFT_Fp_mpowL(x_mut, n_mut) {\n BigNatModule_FFT_Fp_mpowL:\n while (true) {\n const x = x_mut, n = n_mut;\n if (equals(n, fromBits(0, 0, false))) {\n return BigNatModule_FFT_Fp_mone;\n }\n else if (equals(op_Modulus(n, fromBits(2, 0, false)), fromBits(0, 0, false))) {\n x_mut = (toInt(op_Modulus(op_Multiply(fromInteger(x, true, 6), fromInteger(x, true, 6)), BigNatModule_FFT_Fp_p64)) >>> 0);\n n_mut = op_Division(n, fromBits(2, 0, false));\n continue BigNatModule_FFT_Fp_mpowL;\n }\n else {\n const y_2 = BigNatModule_FFT_Fp_mpowL(toInt(op_Modulus(op_Multiply(fromInteger(x, true, 6), fromInteger(x, true, 6)), BigNatModule_FFT_Fp_p64)) >>> 0, op_Division(n, fromBits(2, 0, false)));\n return toInt(op_Modulus(op_Multiply(fromInteger(x, true, 6), fromInteger(y_2, true, 6)), BigNatModule_FFT_Fp_p64)) >>> 0;\n }\n break;\n }\n}\n\nexport function BigNatModule_FFT_Fp_m2PowNthRoot(n) {\n return BigNatModule_FFT_Fp_mpow(BigNatModule_FFT_w >>> 0, BigNatModule_FFT_pow32(2, BigNatModule_FFT_k - n));\n}\n\nexport function BigNatModule_FFT_Fp_minv(x) {\n return BigNatModule_FFT_Fp_mpowL(x, op_Subtraction(BigNatModule_FFT_primeP, fromBits(2, 0, false)));\n}\n\nexport function BigNatModule_FFT_computeFFT(lambda, mu, n, w, u, res, offset) {\n let x_1, x_3, y_5;\n if (n === 1) {\n res[offset] = u[mu];\n }\n else {\n const halfN = (~(~(n / 2))) | 0;\n const ww = toInt(op_Modulus(op_Multiply(fromInteger(w, true, 6), fromInteger(w, true, 6)), BigNatModule_FFT_Fp_p64)) >>> 0;\n const offsetHalfN = (offset + halfN) | 0;\n BigNatModule_FFT_computeFFT(lambda * 2, mu, halfN, ww, u, res, offset);\n BigNatModule_FFT_computeFFT(lambda * 2, lambda + mu, halfN, ww, u, res, offsetHalfN);\n let wj = BigNatModule_FFT_Fp_mone;\n for (let j = 0; j <= (halfN - 1); j++) {\n const even = res[offset + j];\n const odd = res[offsetHalfN + j];\n res[offset + j] = ((even + (x_1 = wj, toInt(op_Modulus(op_Multiply(fromInteger(x_1, true, 6), fromInteger(odd, true, 6)), BigNatModule_FFT_Fp_p64)) >>> 0)) % BigNatModule_FFT_Fp_p);\n res[offsetHalfN + j] = (((even + BigNatModule_FFT_Fp_p) - (x_3 = wj, toInt(op_Modulus(op_Multiply(fromInteger(x_3, true, 6), fromInteger(odd, true, 6)), BigNatModule_FFT_Fp_p64)) >>> 0)) % BigNatModule_FFT_Fp_p);\n wj = (y_5 = wj, toInt(op_Modulus(op_Multiply(fromInteger(w, true, 6), fromInteger(y_5, true, 6)), BigNatModule_FFT_Fp_p64)) >>> 0);\n }\n }\n}\n\nexport function BigNatModule_FFT_computFftInPlace(n, w, u) {\n const res = fill(new Uint32Array(n), 0, n, BigNatModule_FFT_Fp_mzero);\n BigNatModule_FFT_computeFFT(1, 0, n, w, u, res, 0);\n return res;\n}\n\nexport function BigNatModule_FFT_computeInverseFftInPlace(n, w, uT) {\n const bigKInv = BigNatModule_FFT_Fp_minv(n >>> 0);\n return map((y) => (toInt(op_Modulus(op_Multiply(fromInteger(bigKInv, true, 6), fromInteger(y, true, 6)), BigNatModule_FFT_Fp_p64)) >>> 0), BigNatModule_FFT_computFftInPlace(n, BigNatModule_FFT_Fp_minv(w), uT), Uint32Array);\n}\n\nexport const BigNatModule_FFT_maxTwoPower = 29;\n\nexport const BigNatModule_FFT_twoPowerTable = initialize(BigNatModule_FFT_maxTwoPower - 1, (i) => BigNatModule_FFT_pow32(2, i), Int32Array);\n\nexport function BigNatModule_FFT_computeFftPaddedPolynomialProduct(bigK, k, u, v) {\n const w = BigNatModule_FFT_Fp_m2PowNthRoot(k);\n const n = bigK | 0;\n const uT = BigNatModule_FFT_computFftInPlace(n, w, u);\n const vT = BigNatModule_FFT_computFftInPlace(n, w, v);\n return BigNatModule_FFT_computeInverseFftInPlace(n, w, initialize(n, (i) => {\n const x = uT[i];\n const y = vT[i];\n return toInt(op_Modulus(op_Multiply(fromInteger(x, true, 6), fromInteger(y, true, 6)), BigNatModule_FFT_Fp_p64)) >>> 0;\n }, Uint32Array));\n}\n\nexport function BigNatModule_FFT_padTo(n, u) {\n const uBound = u.length | 0;\n return initialize(n, (i) => ((i < uBound) ? BigNatModule_FFT_Fp_ofInt32(u[i]) : BigNatModule_FFT_Fp_mzero), Uint32Array);\n}\n\nexport function BigNatModule_FFT_computeFftPolynomialProduct(degu, u, degv, v) {\n const patternInput = BigNatModule_FFT_leastBounding2Power((degu + degv) + 1);\n const bigK = patternInput[0] | 0;\n const w = BigNatModule_FFT_Fp_m2PowNthRoot(patternInput[1]);\n const u_1 = BigNatModule_FFT_padTo(bigK, u);\n const v_1 = BigNatModule_FFT_padTo(bigK, v);\n const n = bigK | 0;\n const uT = BigNatModule_FFT_computFftInPlace(n, w, u_1);\n const vT = BigNatModule_FFT_computFftInPlace(n, w, v_1);\n return map((x_1) => BigNatModule_FFT_Fp_toInt(x_1), BigNatModule_FFT_computeInverseFftInPlace(n, w, initialize(n, (i) => {\n const x = uT[i];\n const y = vT[i];\n return toInt(op_Modulus(op_Multiply(fromInteger(x, true, 6), fromInteger(y, true, 6)), BigNatModule_FFT_Fp_p64)) >>> 0;\n }, Uint32Array)), Int32Array);\n}\n\nexport const BigNatModule_FFT_mzero = BigNatModule_FFT_Fp_mzero;\n\nexport const BigNatModule_FFT_mone = BigNatModule_FFT_Fp_mone;\n\nexport const BigNatModule_FFT_maxFp = ((BigNatModule_FFT_Fp_p + BigNatModule_FFT_Fp_p) - BigNatModule_FFT_mone) % BigNatModule_FFT_Fp_p;\n\nexport function BigNatModule_bound(n) {\n return n.bound;\n}\n\nexport function BigNatModule_setBound(n, v) {\n n.bound = (v | 0);\n}\n\nexport function BigNatModule_coeff(n, i) {\n return n.digits[i];\n}\n\nexport function BigNatModule_coeff64(n, i) {\n return fromInteger(BigNatModule_coeff(n, i), false, 2);\n}\n\nexport function BigNatModule_setCoeff(n, i, v) {\n n.digits[i] = (v | 0);\n}\n\nexport function BigNatModule_pow64(x_mut, n_mut) {\n BigNatModule_pow64:\n while (true) {\n const x = x_mut, n = n_mut;\n if (n === 0) {\n return fromBits(1, 0, false);\n }\n else if ((n % 2) === 0) {\n x_mut = op_Multiply(x, x);\n n_mut = (~(~(n / 2)));\n continue BigNatModule_pow64;\n }\n else {\n return op_Multiply(x, BigNatModule_pow64(op_Multiply(x, x), ~(~(n / 2))));\n }\n break;\n }\n}\n\nexport function BigNatModule_pow32(x_mut, n_mut) {\n BigNatModule_pow32:\n while (true) {\n const x = x_mut, n = n_mut;\n if (n === 0) {\n return 1;\n }\n else if ((n % 2) === 0) {\n x_mut = (x * x);\n n_mut = (~(~(n / 2)));\n continue BigNatModule_pow32;\n }\n else {\n return (x * BigNatModule_pow32(x * x, ~(~(n / 2)))) | 0;\n }\n break;\n }\n}\n\nexport function BigNatModule_hash(n) {\n let res = 0;\n for (let i = 0; i <= (n.bound - 1); i++) {\n res = ((n.digits[i] + (res << 3)) | 0);\n }\n return res | 0;\n}\n\nexport function BigNatModule_maxInt(a, b) {\n if (a < b) {\n return b | 0;\n }\n else {\n return a | 0;\n }\n}\n\nexport function BigNatModule_minInt(a, b) {\n if (a < b) {\n return a | 0;\n }\n else {\n return b | 0;\n }\n}\n\nexport const BigNatModule_baseBits = 24;\n\nexport const BigNatModule_baseN = 16777216;\n\nexport const BigNatModule_baseMask = 16777215;\n\nexport const BigNatModule_baseNi64 = fromBits(16777216, 0, false);\n\nexport const BigNatModule_baseMaski64 = fromBits(16777215, 0, false);\n\nexport const BigNatModule_baseMaskU = fromBits(16777215, 0, true);\n\nexport const BigNatModule_baseMask32A = 16777215;\n\nexport const BigNatModule_baseMask32B = 255;\n\nexport const BigNatModule_baseShift32B = 24;\n\nexport const BigNatModule_baseMask64A = 16777215;\n\nexport const BigNatModule_baseMask64B = 16777215;\n\nexport const BigNatModule_baseMask64C = 65535;\n\nexport const BigNatModule_baseShift64B = 24;\n\nexport const BigNatModule_baseShift64C = 48;\n\nexport function BigNatModule_divbase(x) {\n return ~(~((x >>> 0) >>> BigNatModule_baseBits));\n}\n\nexport function BigNatModule_modbase(x) {\n return x & BigNatModule_baseMask;\n}\n\nexport function BigNatModule_createN(b) {\n return new BigNat(b, new Int32Array(b));\n}\n\nexport function BigNatModule_copyN(x) {\n return new BigNat(x.bound, copy(x.digits));\n}\n\nexport function BigNatModule_normN(n) {\n const findLeastBound = (na_mut, i_mut) => {\n findLeastBound:\n while (true) {\n const na = na_mut, i = i_mut;\n if ((i === -1) ? true : (na[i] !== 0)) {\n return (i + 1) | 0;\n }\n else {\n na_mut = na;\n i_mut = (i - 1);\n continue findLeastBound;\n }\n break;\n }\n };\n const bound = findLeastBound(n.digits, n.bound - 1) | 0;\n n.bound = (bound | 0);\n return n;\n}\n\nexport const BigNatModule_boundInt = 2;\n\nexport const BigNatModule_boundInt64 = 3;\n\nexport const BigNatModule_boundBase = 1;\n\nexport function BigNatModule_embed(x) {\n const x_1 = ((x < 0) ? 0 : x) | 0;\n if (x_1 < BigNatModule_baseN) {\n const r = BigNatModule_createN(1);\n r.digits[0] = (x_1 | 0);\n return BigNatModule_normN(r);\n }\n else {\n const r_1 = BigNatModule_createN(BigNatModule_boundInt);\n for (let i = 0; i <= (BigNatModule_boundInt - 1); i++) {\n r_1.digits[i] = (((~(~(x_1 / BigNatModule_pow32(BigNatModule_baseN, i)))) % BigNatModule_baseN) | 0);\n }\n return BigNatModule_normN(r_1);\n }\n}\n\nexport function BigNatModule_embed64(x) {\n const x_1 = (compare(x, fromBits(0, 0, false)) < 0) ? fromBits(0, 0, false) : x;\n const r = BigNatModule_createN(BigNatModule_boundInt64);\n for (let i = 0; i <= (BigNatModule_boundInt64 - 1); i++) {\n r.digits[i] = ((~(~toInt(op_Modulus(op_Division(x_1, BigNatModule_pow64(BigNatModule_baseNi64, i)), BigNatModule_baseNi64)))) | 0);\n }\n return BigNatModule_normN(r);\n}\n\nexport function BigNatModule_eval32(n) {\n if (n.bound === 1) {\n return n.digits[0] | 0;\n }\n else {\n let acc = 0;\n for (let i = n.bound - 1; i >= 0; i--) {\n acc = ((n.digits[i] + (BigNatModule_baseN * acc)) | 0);\n }\n return acc | 0;\n }\n}\n\nexport function BigNatModule_eval64(n) {\n if (n.bound === 1) {\n return fromInteger(n.digits[0], false, 2);\n }\n else {\n let acc = fromBits(0, 0, false);\n for (let i = n.bound - 1; i >= 0; i--) {\n acc = op_Addition(fromInteger(n.digits[i], false, 2), op_Multiply(BigNatModule_baseNi64, acc));\n }\n return acc;\n }\n}\n\nexport const BigNatModule_one = BigNatModule_embed(1);\n\nexport const BigNatModule_zero = BigNatModule_embed(0);\n\nexport function BigNatModule_restrictTo(d, n) {\n return new BigNat(BigNatModule_minInt(d, n.bound), n.digits);\n}\n\nexport function BigNatModule_shiftUp(d, n) {\n const m = BigNatModule_createN(n.bound + d);\n for (let i = 0; i <= (n.bound - 1); i++) {\n m.digits[i + d] = (n.digits[i] | 0);\n }\n return m;\n}\n\nexport function BigNatModule_shiftDown(d, n) {\n if ((n.bound - d) <= 0) {\n return BigNatModule_zero;\n }\n else {\n const m = BigNatModule_createN(n.bound - d);\n for (let i = 0; i <= (m.bound - 1); i++) {\n m.digits[i] = (n.digits[i + d] | 0);\n }\n return m;\n }\n}\n\nexport function BigNatModule_degree(n) {\n return n.bound - 1;\n}\n\nexport function BigNatModule_addP(i_mut, n_mut, c_mut, p_mut, q_mut, r_mut) {\n let z, i_1, z_1, i_2;\n BigNatModule_addP:\n while (true) {\n const i = i_mut, n = n_mut, c = c_mut, p = p_mut, q = q_mut, r = r_mut;\n if (i < n) {\n const x = (((z = p, (i_1 = (i | 0), (i_1 < z.bound) ? z.digits[i_1] : 0)) + (z_1 = q, (i_2 = (i | 0), (i_2 < z_1.bound) ? z_1.digits[i_2] : 0))) + c) | 0;\n r.digits[i] = (BigNatModule_modbase(x) | 0);\n i_mut = (i + 1);\n n_mut = n;\n c_mut = BigNatModule_divbase(x);\n p_mut = p;\n q_mut = q;\n r_mut = r;\n continue BigNatModule_addP;\n }\n break;\n }\n}\n\nexport function BigNatModule_add(p, q) {\n const rbound = (1 + BigNatModule_maxInt(p.bound, q.bound)) | 0;\n const r = BigNatModule_createN(rbound);\n BigNatModule_addP(0, rbound, 0, p, q, r);\n return BigNatModule_normN(r);\n}\n\nexport function BigNatModule_subP(i_mut, n_mut, c_mut, p_mut, q_mut, r_mut) {\n let z, i_1, z_1, i_2;\n BigNatModule_subP:\n while (true) {\n const i = i_mut, n = n_mut, c = c_mut, p = p_mut, q = q_mut, r = r_mut;\n if (i < n) {\n const x = (((z = p, (i_1 = (i | 0), (i_1 < z.bound) ? z.digits[i_1] : 0)) - (z_1 = q, (i_2 = (i | 0), (i_2 < z_1.bound) ? z_1.digits[i_2] : 0))) + c) | 0;\n if (x > 0) {\n r.digits[i] = (BigNatModule_modbase(x) | 0);\n i_mut = (i + 1);\n n_mut = n;\n c_mut = BigNatModule_divbase(x);\n p_mut = p;\n q_mut = q;\n r_mut = r;\n continue BigNatModule_subP;\n }\n else {\n const x_1 = (x + BigNatModule_baseN) | 0;\n r.digits[i] = (BigNatModule_modbase(x_1) | 0);\n i_mut = (i + 1);\n n_mut = n;\n c_mut = (BigNatModule_divbase(x_1) - 1);\n p_mut = p;\n q_mut = q;\n r_mut = r;\n continue BigNatModule_subP;\n }\n }\n else {\n return c !== 0;\n }\n break;\n }\n}\n\nexport function BigNatModule_sub(p, q) {\n const rbound = BigNatModule_maxInt(p.bound, q.bound) | 0;\n const r = BigNatModule_createN(rbound);\n if (BigNatModule_subP(0, rbound, 0, p, q, r)) {\n return BigNatModule_embed(0);\n }\n else {\n return BigNatModule_normN(r);\n }\n}\n\nexport function BigNatModule_isZero(p) {\n return p.bound === 0;\n}\n\nexport function BigNatModule_IsZero(p) {\n return BigNatModule_isZero(p);\n}\n\nexport function BigNatModule_isOne(p) {\n if (p.bound === 1) {\n return p.digits[0] === 1;\n }\n else {\n return false;\n }\n}\n\nexport function BigNatModule_equal(p, q) {\n if (p.bound === q.bound) {\n const check = (pa_mut, qa_mut, i_mut) => {\n check:\n while (true) {\n const pa = pa_mut, qa = qa_mut, i = i_mut;\n if (i === -1) {\n return true;\n }\n else if (pa[i] === qa[i]) {\n pa_mut = pa;\n qa_mut = qa;\n i_mut = (i - 1);\n continue check;\n }\n else {\n return false;\n }\n break;\n }\n };\n return check(p.digits, q.digits, p.bound - 1);\n }\n else {\n return false;\n }\n}\n\nexport function BigNatModule_shiftCompare(p, pn, q, qn) {\n if ((p.bound + pn) < (q.bound + qn)) {\n return -1;\n }\n else if ((p.bound + pn) > (q.bound + pn)) {\n return 1;\n }\n else {\n const check = (pa_mut, qa_mut, i_mut) => {\n check:\n while (true) {\n const pa = pa_mut, qa = qa_mut, i = i_mut;\n if (i === -1) {\n return 0;\n }\n else {\n const pai = ((i < pn) ? 0 : pa[i - pn]) | 0;\n const qai = ((i < qn) ? 0 : qa[i - qn]) | 0;\n if (pai === qai) {\n pa_mut = pa;\n qa_mut = qa;\n i_mut = (i - 1);\n continue check;\n }\n else if (pai < qai) {\n return -1;\n }\n else {\n return 1;\n }\n }\n break;\n }\n };\n return check(p.digits, q.digits, (p.bound + pn) - 1) | 0;\n }\n}\n\nexport function BigNatModule_compare(p, q) {\n if (p.bound < q.bound) {\n return -1;\n }\n else if (p.bound > q.bound) {\n return 1;\n }\n else {\n const check = (pa_mut, qa_mut, i_mut) => {\n check:\n while (true) {\n const pa = pa_mut, qa = qa_mut, i = i_mut;\n if (i === -1) {\n return 0;\n }\n else if (pa[i] === qa[i]) {\n pa_mut = pa;\n qa_mut = qa;\n i_mut = (i - 1);\n continue check;\n }\n else if (pa[i] < qa[i]) {\n return -1;\n }\n else {\n return 1;\n }\n break;\n }\n };\n return check(p.digits, q.digits, p.bound - 1) | 0;\n }\n}\n\nexport function BigNatModule_lt(p, q) {\n return BigNatModule_compare(p, q) === -1;\n}\n\nexport function BigNatModule_gt(p, q) {\n return BigNatModule_compare(p, q) === 1;\n}\n\nexport function BigNatModule_lte(p, q) {\n return BigNatModule_compare(p, q) !== 1;\n}\n\nexport function BigNatModule_gte(p, q) {\n return BigNatModule_compare(p, q) !== -1;\n}\n\nexport function BigNatModule_min(a, b) {\n if (BigNatModule_lt(a, b)) {\n return a;\n }\n else {\n return b;\n }\n}\n\nexport function BigNatModule_max(a, b) {\n if (BigNatModule_lt(a, b)) {\n return b;\n }\n else {\n return a;\n }\n}\n\nexport function BigNatModule_contributeArr(a_mut, i_mut, c_mut) {\n BigNatModule_contributeArr:\n while (true) {\n const a = a_mut, i = i_mut, c = c_mut;\n const x = op_Addition(fromInteger(a[i], false, 2), c);\n const c_1 = op_Division(x, BigNatModule_baseNi64);\n const x_3 = (~(~toInt(op_BitwiseAnd(x, BigNatModule_baseMaski64)))) | 0;\n a[i] = (x_3 | 0);\n if (compare(c_1, fromBits(0, 0, false)) > 0) {\n a_mut = a;\n i_mut = (i + 1);\n c_mut = c_1;\n continue BigNatModule_contributeArr;\n }\n break;\n }\n}\n\nexport function BigNatModule_scale(k, p) {\n const r = BigNatModule_createN(p.bound + BigNatModule_boundInt);\n const k_1 = fromInteger(k, false, 2);\n for (let i = 0; i <= (p.bound - 1); i++) {\n BigNatModule_contributeArr(r.digits, i, op_Multiply(k_1, fromInteger(p.digits[i], false, 2)));\n }\n return BigNatModule_normN(r);\n}\n\nexport function BigNatModule_mulSchoolBookBothSmall(p, q) {\n const r = BigNatModule_createN(2);\n const rak = op_Multiply(fromInteger(p, false, 2), fromInteger(q, false, 2));\n BigNatModule_setCoeff(r, 0, ~(~toInt(op_BitwiseAnd(rak, BigNatModule_baseMaski64))));\n BigNatModule_setCoeff(r, 1, ~(~toInt(op_Division(rak, BigNatModule_baseNi64))));\n return BigNatModule_normN(r);\n}\n\nexport function BigNatModule_mulSchoolBookCarry(r_mut, c_mut, k_mut) {\n BigNatModule_mulSchoolBookCarry:\n while (true) {\n const r = r_mut, c = c_mut, k = k_mut;\n if (compare(c, fromBits(0, 0, false)) > 0) {\n const rak = op_Addition(BigNatModule_coeff64(r, k), c);\n BigNatModule_setCoeff(r, k, ~(~toInt(op_BitwiseAnd(rak, BigNatModule_baseMaski64))));\n r_mut = r;\n c_mut = op_Division(rak, BigNatModule_baseNi64);\n k_mut = (k + 1);\n continue BigNatModule_mulSchoolBookCarry;\n }\n break;\n }\n}\n\nexport function BigNatModule_mulSchoolBookOneSmall(p, q) {\n const bp = BigNatModule_bound(p) | 0;\n const r = BigNatModule_createN(bp + 1);\n const q_1 = fromInteger(q, false, 2);\n let c = fromBits(0, 0, false);\n for (let i = 0; i <= (bp - 1); i++) {\n const rak = op_Addition(op_Addition(c, BigNatModule_coeff64(r, i)), op_Multiply(BigNatModule_coeff64(p, i), q_1));\n BigNatModule_setCoeff(r, i, ~(~toInt(op_BitwiseAnd(rak, BigNatModule_baseMaski64))));\n c = op_Division(rak, BigNatModule_baseNi64);\n }\n BigNatModule_mulSchoolBookCarry(r, c, bp);\n return BigNatModule_normN(r);\n}\n\nexport function BigNatModule_mulSchoolBookNeitherSmall(p, q) {\n const r = BigNatModule_createN(p.bound + q.bound);\n const ra = r.digits;\n for (let i = 0; i <= (p.bound - 1); i++) {\n const pai = fromInteger(p.digits[i], false, 2);\n let c = fromBits(0, 0, false);\n let k = i | 0;\n for (let j = 0; j <= (q.bound - 1); j++) {\n const qaj = fromInteger(q.digits[j], false, 2);\n const rak = op_Addition(op_Addition(fromInteger(ra[k], false, 2), c), op_Multiply(pai, qaj));\n ra[k] = ((~(~toInt(op_BitwiseAnd(rak, BigNatModule_baseMaski64)))) | 0);\n c = op_Division(rak, BigNatModule_baseNi64);\n k = ((k + 1) | 0);\n }\n BigNatModule_mulSchoolBookCarry(r, c, k);\n }\n return BigNatModule_normN(r);\n}\n\nexport function BigNatModule_mulSchoolBook(p, q) {\n const pSmall = BigNatModule_bound(p) === 1;\n const qSmall = BigNatModule_bound(q) === 1;\n if (pSmall ? qSmall : false) {\n return BigNatModule_mulSchoolBookBothSmall(BigNatModule_coeff(p, 0), BigNatModule_coeff(q, 0));\n }\n else if (pSmall) {\n return BigNatModule_mulSchoolBookOneSmall(q, BigNatModule_coeff(p, 0));\n }\n else if (qSmall) {\n return BigNatModule_mulSchoolBookOneSmall(p, BigNatModule_coeff(q, 0));\n }\n else {\n return BigNatModule_mulSchoolBookNeitherSmall(p, q);\n }\n}\n\nexport class BigNatModule_encoding extends Record {\n constructor(bigL, twoToBigL, k, bigK, bigN, split, splits) {\n super();\n this.bigL = (bigL | 0);\n this.twoToBigL = (twoToBigL | 0);\n this.k = (k | 0);\n this.bigK = (bigK | 0);\n this.bigN = (bigN | 0);\n this.split = (split | 0);\n this.splits = splits;\n }\n}\n\nexport function BigNatModule_encoding$reflection() {\n return record_type(\"BigInt.BigNatModule.encoding\", [], BigNatModule_encoding, () => [[\"bigL\", int32_type], [\"twoToBigL\", int32_type], [\"k\", int32_type], [\"bigK\", int32_type], [\"bigN\", int32_type], [\"split\", int32_type], [\"splits\", array_type(int32_type)]]);\n}\n\nexport function BigNatModule_mkEncoding(bigL, k, bigK, bigN) {\n return new BigNatModule_encoding(bigL, BigNatModule_pow32(2, bigL), k, bigK, bigN, ~(~(BigNatModule_baseBits / bigL)), initialize(~(~(BigNatModule_baseBits / bigL)), (i) => BigNatModule_pow32(2, bigL * i), Int32Array));\n}\n\nexport const BigNatModule_table = [BigNatModule_mkEncoding(1, 28, 268435456, 268435456), BigNatModule_mkEncoding(2, 26, 67108864, 134217728), BigNatModule_mkEncoding(3, 24, 16777216, 50331648), BigNatModule_mkEncoding(4, 22, 4194304, 16777216), BigNatModule_mkEncoding(5, 20, 1048576, 5242880), BigNatModule_mkEncoding(6, 18, 262144, 1572864), BigNatModule_mkEncoding(7, 16, 65536, 458752), BigNatModule_mkEncoding(8, 14, 16384, 131072), BigNatModule_mkEncoding(9, 12, 4096, 36864), BigNatModule_mkEncoding(10, 10, 1024, 10240), BigNatModule_mkEncoding(11, 8, 256, 2816), BigNatModule_mkEncoding(12, 6, 64, 768), BigNatModule_mkEncoding(13, 4, 16, 208)];\n\nexport function BigNatModule_calculateTableTow(bigL) {\n const k = (BigNatModule_FFT_maxBitsInsideFp - (2 * bigL)) | 0;\n const bigK = BigNatModule_pow64(fromBits(2, 0, false), k);\n return [bigL, k, bigK, op_Multiply(bigK, fromInteger(bigL, false, 2))];\n}\n\nexport function BigNatModule_encodingGivenResultBits(bitsRes) {\n const selectFrom = (i_mut) => {\n selectFrom:\n while (true) {\n const i = i_mut;\n if (((i + 1) < BigNatModule_table.length) ? (bitsRes < BigNatModule_table[i + 1].bigN) : false) {\n i_mut = (i + 1);\n continue selectFrom;\n }\n else {\n return BigNatModule_table[i];\n }\n break;\n }\n };\n if (bitsRes >= BigNatModule_table[0].bigN) {\n throw (new Error(\"Product is huge, around 268435456 bits, beyond quickmul\"));\n }\n else {\n return selectFrom(0);\n }\n}\n\nexport const BigNatModule_bitmask = initialize(BigNatModule_baseBits, (i) => (BigNatModule_pow32(2, i) - 1), Int32Array);\n\nexport const BigNatModule_twopowers = initialize(BigNatModule_baseBits, (i) => BigNatModule_pow32(2, i), Int32Array);\n\nexport const BigNatModule_twopowersI64 = initialize(BigNatModule_baseBits, (i) => BigNatModule_pow64(fromBits(2, 0, false), i));\n\nexport function BigNatModule_wordBits(word) {\n const hi = (k_mut) => {\n hi:\n while (true) {\n const k = k_mut;\n if (k === 0) {\n return 0;\n }\n else if ((word & BigNatModule_twopowers[k - 1]) !== 0) {\n return k | 0;\n }\n else {\n k_mut = (k - 1);\n continue hi;\n }\n break;\n }\n };\n return hi(BigNatModule_baseBits) | 0;\n}\n\nexport function BigNatModule_bits(u) {\n if (u.bound === 0) {\n return 0;\n }\n else {\n return ((BigNatModule_degree(u) * BigNatModule_baseBits) + BigNatModule_wordBits(u.digits[BigNatModule_degree(u)])) | 0;\n }\n}\n\nexport function BigNatModule_extractBits(n, enc, bi) {\n let z, i, z_1, i_1, z_2, i_2;\n const biw = (~(~(bi / BigNatModule_baseBits))) | 0;\n const bjw = (~(~(((bi + enc.bigL) - 1) / BigNatModule_baseBits))) | 0;\n if (biw !== bjw) {\n const xbit = (bi % BigNatModule_baseBits) | 0;\n return ((((z = n, (i = (biw | 0), (i < z.bound) ? z.digits[i] : 0)) >> xbit) | ((z_1 = n, (i_1 = (bjw | 0), (i_1 < z_1.bound) ? z_1.digits[i_1] : 0)) << (BigNatModule_baseBits - xbit))) & BigNatModule_bitmask[enc.bigL]) | 0;\n }\n else {\n return (((z_2 = n, (i_2 = (biw | 0), (i_2 < z_2.bound) ? z_2.digits[i_2] : 0)) >> (bi % BigNatModule_baseBits)) & BigNatModule_bitmask[enc.bigL]) | 0;\n }\n}\n\nexport function BigNatModule_encodePoly(enc, n) {\n const poly = fill(new Uint32Array(enc.bigK), 0, enc.bigK, BigNatModule_FFT_Fp_ofInt32(0));\n const biMax = (n.bound * BigNatModule_baseBits) | 0;\n const encoder = (i_mut, bi_mut) => {\n encoder:\n while (true) {\n const i = i_mut, bi = bi_mut;\n if ((i === enc.bigK) ? true : (bi > biMax)) {\n }\n else {\n const pi = BigNatModule_extractBits(n, enc, bi) | 0;\n poly[i] = BigNatModule_FFT_Fp_ofInt32(pi);\n i_mut = (i + 1);\n bi_mut = (bi + enc.bigL);\n continue encoder;\n }\n break;\n }\n };\n encoder(0, 0);\n return poly;\n}\n\nexport function BigNatModule_decodeResultBits(enc, poly) {\n let n = 0;\n for (let i = 0; i <= (poly.length - 1); i++) {\n if (poly[i] !== BigNatModule_FFT_mzero) {\n n = (i | 0);\n }\n }\n return (((BigNatModule_FFT_maxBitsInsideFp + (enc.bigL * n)) + 1) + 1) | 0;\n}\n\nexport function BigNatModule_decodePoly(enc, poly) {\n const rbound = ((~(~(BigNatModule_decodeResultBits(enc, poly) / BigNatModule_baseBits))) + 1) | 0;\n const r = BigNatModule_createN(rbound);\n const evaluate = (i_mut, j_mut, d_mut) => {\n evaluate:\n while (true) {\n const i = i_mut, j = j_mut, d = d_mut;\n if (i === enc.bigK) {\n }\n else {\n if (j >= rbound) {\n }\n else {\n BigNatModule_contributeArr(r.digits, j, op_Multiply(fromInteger(BigNatModule_FFT_Fp_toInt(poly[i]), false, 2), BigNatModule_twopowersI64[d]));\n }\n const d_1 = (d + enc.bigL) | 0;\n const patternInput = (d_1 >= BigNatModule_baseBits) ? [j + 1, d_1 - BigNatModule_baseBits] : [j, d_1];\n i_mut = (i + 1);\n j_mut = patternInput[0];\n d_mut = patternInput[1];\n continue evaluate;\n }\n break;\n }\n };\n evaluate(0, 0, 0);\n return BigNatModule_normN(r);\n}\n\nexport function BigNatModule_quickMulUsingFft(u, v) {\n const enc = BigNatModule_encodingGivenResultBits(BigNatModule_bits(u) + BigNatModule_bits(v));\n return BigNatModule_normN(BigNatModule_decodePoly(enc, BigNatModule_FFT_computeFftPaddedPolynomialProduct(enc.bigK, enc.k, BigNatModule_encodePoly(enc, u), BigNatModule_encodePoly(enc, v))));\n}\n\nexport const BigNatModule_minDigitsKaratsuba = 16;\n\nexport function BigNatModule_recMulKaratsuba(mul, p, q) {\n const bmax = BigNatModule_maxInt(p.bound, q.bound) | 0;\n if (bmax > BigNatModule_minDigitsKaratsuba) {\n const k = (~(~(bmax / 2))) | 0;\n const a0 = BigNatModule_restrictTo(k, p);\n const a1 = BigNatModule_shiftDown(k, p);\n const b0 = BigNatModule_restrictTo(k, q);\n const b1 = BigNatModule_shiftDown(k, q);\n const q0 = mul(a0, b0);\n const q1 = mul(BigNatModule_add(a0, a1), BigNatModule_add(b0, b1));\n const q2 = mul(a1, b1);\n return BigNatModule_add(q0, BigNatModule_shiftUp(k, BigNatModule_add(BigNatModule_sub(q1, BigNatModule_add(q0, q2)), BigNatModule_shiftUp(k, q2))));\n }\n else {\n return BigNatModule_mulSchoolBook(p, q);\n }\n}\n\nexport function BigNatModule_mulKaratsuba(x, y) {\n return BigNatModule_recMulKaratsuba((x_1, y_1) => BigNatModule_mulKaratsuba(x_1, y_1), x, y);\n}\n\nexport const BigNatModule_productDigitsUpperSchoolBook = ~(~(64000 / BigNatModule_baseBits));\n\nexport const BigNatModule_singleDigitForceSchoolBook = ~(~(32000 / BigNatModule_baseBits));\n\nexport const BigNatModule_productDigitsUpperFft = ~(~(BigNatModule_table[0].bigN / BigNatModule_baseBits));\n\nexport function BigNatModule_mul(p, q) {\n return BigNatModule_mulSchoolBook(p, q);\n}\n\nexport function BigNatModule_scaleSubInPlace(x, f, a, n) {\n const patternInput = [x.digits, BigNatModule_degree(x)];\n const x_1 = patternInput[0];\n const patternInput_1 = [a.digits, BigNatModule_degree(a)];\n const ad = patternInput_1[1] | 0;\n const a_1 = patternInput_1[0];\n const f_1 = fromInteger(f, false, 2);\n let j = 0;\n let z = op_Multiply(f_1, fromInteger(a_1[0], false, 2));\n while ((compare(z, fromBits(0, 0, false)) > 0) ? true : (j < ad)) {\n if (j > patternInput[1]) {\n throw (new Error(\"scaleSubInPlace: pre-condition did not apply, result would be -ve\"));\n }\n let zLo = (~(~toInt(op_BitwiseAnd(z, BigNatModule_baseMaski64)))) | 0;\n let zHi = op_Division(z, BigNatModule_baseNi64);\n if (zLo <= x_1[j + n]) {\n x_1[j + n] = ((x_1[j + n] - zLo) | 0);\n }\n else {\n x_1[j + n] = ((x_1[j + n] + (BigNatModule_baseN - zLo)) | 0);\n zHi = op_Addition(zHi, fromBits(1, 0, false));\n }\n if (j < ad) {\n z = op_Addition(zHi, op_Multiply(f_1, fromInteger(a_1[j + 1], false, 2)));\n }\n else {\n z = zHi;\n }\n j = ((j + 1) | 0);\n }\n void BigNatModule_normN(x);\n}\n\nexport function BigNatModule_scaleSub(x, f, a, n) {\n const freshx = BigNatModule_add(x, BigNatModule_zero);\n BigNatModule_scaleSubInPlace(freshx, f, a, n);\n return BigNatModule_normN(freshx);\n}\n\nexport function BigNatModule_scaleAddInPlace(x, f, a, n) {\n const patternInput = [x.digits, BigNatModule_degree(x)];\n const x_1 = patternInput[0];\n const patternInput_1 = [a.digits, BigNatModule_degree(a)];\n const ad = patternInput_1[1] | 0;\n const a_1 = patternInput_1[0];\n const f_1 = fromInteger(f, false, 2);\n let j = 0;\n let z = op_Multiply(f_1, fromInteger(a_1[0], false, 2));\n while ((compare(z, fromBits(0, 0, false)) > 0) ? true : (j < ad)) {\n if (j > patternInput[1]) {\n throw (new Error(\"scaleSubInPlace: pre-condition did not apply, result would be -ve\"));\n }\n let zLo = (~(~toInt(op_BitwiseAnd(z, BigNatModule_baseMaski64)))) | 0;\n let zHi = op_Division(z, BigNatModule_baseNi64);\n if (zLo < (BigNatModule_baseN - x_1[j + n])) {\n x_1[j + n] = ((x_1[j + n] + zLo) | 0);\n }\n else {\n x_1[j + n] = ((zLo - (BigNatModule_baseN - x_1[j + n])) | 0);\n zHi = op_Addition(zHi, fromBits(1, 0, false));\n }\n if (j < ad) {\n z = op_Addition(zHi, op_Multiply(f_1, fromInteger(a_1[j + 1], false, 2)));\n }\n else {\n z = zHi;\n }\n j = ((j + 1) | 0);\n }\n void BigNatModule_normN(x);\n}\n\nexport function BigNatModule_scaleAdd(x, f, a, n) {\n const freshx = BigNatModule_add(x, BigNatModule_zero);\n BigNatModule_scaleAddInPlace(freshx, f, a, n);\n return BigNatModule_normN(freshx);\n}\n\nexport function BigNatModule_removeFactor(x, a, n) {\n const patternInput = [BigNatModule_degree(a), BigNatModule_degree(x)];\n const degx = patternInput[1] | 0;\n const dega = patternInput[0] | 0;\n if (degx < (dega + n)) {\n return 0;\n }\n else {\n const patternInput_1 = [a.digits, x.digits];\n const xa = patternInput_1[1];\n const aa = patternInput_1[0];\n const f = ((dega === 0) ? ((degx === n) ? (~(~(xa[n] / aa[0]))) : (~(~toInt(op_Division(op_Addition(op_Multiply(fromInteger(xa[degx], false, 2), BigNatModule_baseNi64), fromInteger(xa[degx - 1], false, 2)), fromInteger(aa[0], false, 2)))))) : ((degx === (dega + n)) ? (~(~(xa[degx] / (aa[dega] + 1)))) : (~(~toInt(op_Division(op_Addition(op_Multiply(fromInteger(xa[degx], false, 2), BigNatModule_baseNi64), fromInteger(xa[degx - 1], false, 2)), op_Addition(fromInteger(aa[dega], false, 2), fromBits(1, 0, false)))))))) | 0;\n if (f === 0) {\n if (BigNatModule_shiftCompare(a, n, x, 0) !== 1) {\n return 1;\n }\n else {\n return 0;\n }\n }\n else {\n return f | 0;\n }\n }\n}\n\nexport function BigNatModule_divmod(b, a) {\n if (BigNatModule_isZero(a)) {\n throw (new Error());\n }\n else if (BigNatModule_degree(b) < BigNatModule_degree(a)) {\n return [BigNatModule_zero, b];\n }\n else {\n const x = BigNatModule_copyN(b);\n const d = BigNatModule_createN(((BigNatModule_degree(b) - BigNatModule_degree(a)) + 1) + 1);\n let p = BigNatModule_degree(b) | 0;\n const m = BigNatModule_degree(a) | 0;\n let n = (p - m) | 0;\n const Invariant = (tupledArg) => {\n };\n let finished = false;\n while (!finished) {\n Invariant([d, x, n, p]);\n const f = BigNatModule_removeFactor(x, a, n) | 0;\n if (f > 0) {\n BigNatModule_scaleSubInPlace(x, f, a, n);\n BigNatModule_scaleAddInPlace(d, f, BigNatModule_one, n);\n Invariant([d, x, n, p]);\n }\n else {\n finished = ((f === 0) ? (n === 0) : false);\n if (!finished) {\n if (p === (m + n)) {\n Invariant([d, x, n - 1, p]);\n n = ((n - 1) | 0);\n }\n else {\n Invariant([d, x, n - 1, p - 1]);\n n = ((n - 1) | 0);\n p = ((p - 1) | 0);\n }\n }\n }\n }\n return [BigNatModule_normN(d), BigNatModule_normN(x)];\n }\n}\n\nexport function BigNatModule_div(b, a) {\n return BigNatModule_divmod(b, a)[0];\n}\n\nexport function BigNatModule_rem(b, a) {\n return BigNatModule_divmod(b, a)[1];\n}\n\nexport function BigNatModule_bitAnd(a, b) {\n const r = BigNatModule_createN(BigNatModule_minInt(a.bound, b.bound));\n for (let i = 0; i <= (r.bound - 1); i++) {\n r.digits[i] = ((a.digits[i] & b.digits[i]) | 0);\n }\n return BigNatModule_normN(r);\n}\n\nexport function BigNatModule_bitOr(a, b) {\n const r = BigNatModule_createN(BigNatModule_maxInt(a.bound, b.bound));\n for (let i = 0; i <= (a.bound - 1); i++) {\n r.digits[i] = ((r.digits[i] | a.digits[i]) | 0);\n }\n for (let i_1 = 0; i_1 <= (b.bound - 1); i_1++) {\n r.digits[i_1] = ((r.digits[i_1] | b.digits[i_1]) | 0);\n }\n return BigNatModule_normN(r);\n}\n\nexport function BigNatModule_bitXor(a, b) {\n const r = BigNatModule_createN(BigNatModule_maxInt(a.bound, b.bound));\n for (let i = 0; i <= (a.bound - 1); i++) {\n r.digits[i] = ((r.digits[i] ^ a.digits[i]) | 0);\n }\n for (let i_1 = 0; i_1 <= (b.bound - 1); i_1++) {\n r.digits[i_1] = ((r.digits[i_1] ^ b.digits[i_1]) | 0);\n }\n return BigNatModule_normN(r);\n}\n\nexport function BigNatModule_hcf(a, b) {\n const hcfloop = (a_1_mut, b_1_mut) => {\n hcfloop:\n while (true) {\n const a_1 = a_1_mut, b_1 = b_1_mut;\n if (BigNatModule_equal(BigNatModule_zero, a_1)) {\n return b_1;\n }\n else {\n a_1_mut = BigNatModule_divmod(b_1, a_1)[1];\n b_1_mut = a_1;\n continue hcfloop;\n }\n break;\n }\n };\n if (BigNatModule_lt(a, b)) {\n return hcfloop(a, b);\n }\n else {\n return hcfloop(b, a);\n }\n}\n\nexport const BigNatModule_two = BigNatModule_embed(2);\n\nexport function BigNatModule_powi(x, n) {\n const power = (acc_mut, x_1_mut, n_1_mut) => {\n power:\n while (true) {\n const acc = acc_mut, x_1 = x_1_mut, n_1 = n_1_mut;\n if (n_1 === 0) {\n return acc;\n }\n else if ((n_1 % 2) === 0) {\n acc_mut = acc;\n x_1_mut = BigNatModule_mul(x_1, x_1);\n n_1_mut = (~(~(n_1 / 2)));\n continue power;\n }\n else {\n acc_mut = BigNatModule_mul(x_1, acc);\n x_1_mut = BigNatModule_mul(x_1, x_1);\n n_1_mut = (~(~(n_1 / 2)));\n continue power;\n }\n break;\n }\n };\n return power(BigNatModule_one, x, n);\n}\n\nexport function BigNatModule_pow(x, n) {\n const power = (acc_mut, x_1_mut, n_1_mut) => {\n power:\n while (true) {\n const acc = acc_mut, x_1 = x_1_mut, n_1 = n_1_mut;\n if (BigNatModule_isZero(n_1)) {\n return acc;\n }\n else {\n const patternInput = BigNatModule_divmod(n_1, BigNatModule_two);\n const ndiv2 = patternInput[0];\n if (BigNatModule_isZero(patternInput[1])) {\n acc_mut = acc;\n x_1_mut = BigNatModule_mul(x_1, x_1);\n n_1_mut = ndiv2;\n continue power;\n }\n else {\n acc_mut = BigNatModule_mul(x_1, acc);\n x_1_mut = BigNatModule_mul(x_1, x_1);\n n_1_mut = ndiv2;\n continue power;\n }\n }\n break;\n }\n };\n return power(BigNatModule_one, x, n);\n}\n\nexport function BigNatModule_toFloat(n) {\n const evalFloat = (acc_mut, k_mut, i_mut) => {\n evalFloat:\n while (true) {\n const acc = acc_mut, k = k_mut, i = i_mut;\n if (i === n.bound) {\n return acc;\n }\n else {\n acc_mut = (acc + (k * n.digits[i]));\n k_mut = (k * BigNatModule_baseN);\n i_mut = (i + 1);\n continue evalFloat;\n }\n break;\n }\n };\n return evalFloat(0, 1, 0);\n}\n\nexport function BigNatModule_ofInt32(n) {\n return BigNatModule_embed(n);\n}\n\nexport function BigNatModule_ofInt64(n) {\n return BigNatModule_embed64(n);\n}\n\nexport function BigNatModule_toUInt32(n) {\n const matchValue = n.bound | 0;\n switch (matchValue) {\n case 0: {\n return 0;\n }\n case 1: {\n const value = n.digits[0] | 0;\n return value >>> 0;\n }\n case 2: {\n const patternInput = [n.digits[0], n.digits[1]];\n const xB = patternInput[1] | 0;\n if (xB > BigNatModule_baseMask32B) {\n throw (new Error());\n }\n return ((patternInput[0] & BigNatModule_baseMask32A) >>> 0) + ((((xB & BigNatModule_baseMask32B) >>> 0) << BigNatModule_baseShift32B) >>> 0);\n }\n default: {\n throw (new Error());\n }\n }\n}\n\nexport function BigNatModule_toUInt64(n) {\n const matchValue = n.bound | 0;\n switch (matchValue) {\n case 0: {\n return fromBits(0, 0, true);\n }\n case 1: {\n return fromInteger(n.digits[0], true, 2);\n }\n case 2: {\n const patternInput = [n.digits[0], n.digits[1]];\n return op_Addition(fromInteger(patternInput[0] & BigNatModule_baseMask64A, true, 2), op_LeftShift(fromInteger(patternInput[1] & BigNatModule_baseMask64B, true, 2), BigNatModule_baseShift64B));\n }\n case 3: {\n const patternInput_1 = [n.digits[0], n.digits[1], n.digits[2]];\n const xC = patternInput_1[2] | 0;\n if (xC > BigNatModule_baseMask64C) {\n throw (new Error());\n }\n return op_Addition(op_Addition(fromInteger(patternInput_1[0] & BigNatModule_baseMask64A, true, 2), op_LeftShift(fromInteger(patternInput_1[1] & BigNatModule_baseMask64B, true, 2), BigNatModule_baseShift64B)), op_LeftShift(fromInteger(xC & BigNatModule_baseMask64C, true, 2), BigNatModule_baseShift64C));\n }\n default: {\n throw (new Error());\n }\n }\n}\n\nexport function BigNatModule_toString(n) {\n const degn = BigNatModule_degree(n) | 0;\n const route = (prior_mut, k_mut, ten2k_mut) => {\n route:\n while (true) {\n const prior = prior_mut, k = k_mut, ten2k = ten2k_mut;\n if (BigNatModule_degree(ten2k) > degn) {\n return cons([k, ten2k], prior);\n }\n else {\n prior_mut = cons([k, ten2k], prior);\n k_mut = (k + 1);\n ten2k_mut = BigNatModule_mul(ten2k, ten2k);\n continue route;\n }\n break;\n }\n };\n const collect = (isLeading_mut, digits_mut, n_1_mut, _arg1_mut) => {\n collect:\n while (true) {\n const isLeading = isLeading_mut, digits = digits_mut, n_1 = n_1_mut, _arg1 = _arg1_mut;\n if (!isEmpty(_arg1)) {\n const prior_1 = tail(_arg1);\n const patternInput = BigNatModule_divmod(n_1, head(_arg1)[1]);\n const nL = patternInput[1];\n const nH = patternInput[0];\n if (isLeading ? BigNatModule_isZero(nH) : false) {\n isLeading_mut = isLeading;\n digits_mut = digits;\n n_1_mut = nL;\n _arg1_mut = prior_1;\n continue collect;\n }\n else {\n isLeading_mut = isLeading;\n digits_mut = collect(false, digits, nL, prior_1);\n n_1_mut = nH;\n _arg1_mut = prior_1;\n continue collect;\n }\n }\n else {\n const n_2 = BigNatModule_eval32(n_1) | 0;\n if (isLeading ? (n_2 === 0) : false) {\n return digits;\n }\n else {\n return cons(int32ToString(n_2), digits);\n }\n }\n break;\n }\n };\n const digits_4 = collect(true, empty(), n, route(empty(), 0, BigNatModule_embed(10)));\n if (isEmpty(digits_4)) {\n return \"0\";\n }\n else {\n return join(\"\", toArray(digits_4));\n }\n}\n\nexport function BigNatModule_ofString(str) {\n const len = str.length | 0;\n if (isNullOrEmpty(str)) {\n throw (new Error(\"empty string\\\\nParameter name: str\"));\n }\n const ten = BigNatModule_embed(10);\n const build = (acc_mut, i_mut) => {\n build:\n while (true) {\n const acc = acc_mut, i = i_mut;\n if (i === len) {\n return acc;\n }\n else {\n const d = (str[i].charCodeAt(0) - \"0\".charCodeAt(0)) | 0;\n if ((0 <= d) ? (d <= 9) : false) {\n acc_mut = BigNatModule_add(BigNatModule_mul(ten, acc), BigNatModule_embed(d));\n i_mut = (i + 1);\n continue build;\n }\n else {\n throw (new Error());\n }\n }\n break;\n }\n };\n return build(BigNatModule_embed(0), 0);\n}\n\nexport function BigNatModule_isSmall(n) {\n return n.bound <= 1;\n}\n\nexport function BigNatModule_getSmall(n) {\n const z = n;\n const i = 0;\n if (i < z.bound) {\n return z.digits[i] | 0;\n }\n else {\n return 0;\n }\n}\n\nexport function BigNatModule_factorial(n) {\n const productR = (a, b) => {\n if (BigNatModule_equal(a, b)) {\n return a;\n }\n else {\n const m = BigNatModule_div(BigNatModule_add(a, b), BigNatModule_ofInt32(2));\n return BigNatModule_mul(productR(a, m), productR(BigNatModule_add(m, BigNatModule_one), b));\n }\n };\n return productR(BigNatModule_one, n);\n}\n\n","// Adapted from https://github.com/MikeMcl/big.js/blob/0f94dc9110d55c4f324a47ba6a2e832ce23ac589/big.mjs\n/* tslint:disable */\nimport { combineHashCodes } from \"../Util.js\";\nimport { symbol } from \"../Numeric.js\";\n// The shared prototype object.\nvar P = {\n GetHashCode() { return combineHashCodes([this.s, this.e].concat(this.c)); },\n Equals(x) { return !this.cmp(x); },\n CompareTo(x) { return this.cmp(x); },\n [symbol]() {\n const _this = this;\n return {\n multiply: y => _this.mul(y),\n toPrecision: sd => _this.toPrecision(sd),\n toExponential: dp => _this.toExponential(dp),\n toFixed: dp => _this.toFixed(dp),\n toHex: () => (Number(_this) >>> 0).toString(16),\n };\n }\n};\n/*\n * big.js v6.0.3\n * A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic.\n * Copyright (c) 2020 Michael Mclaughlin\n * https://github.com/MikeMcl/big.js/LICENCE.md\n */\n/************************************** EDITABLE DEFAULTS *****************************************/\n// The default values below must be integers within the stated ranges.\n/*\n * The maximum number of decimal places (DP) of the results of operations involving division:\n * div and sqrt, and pow with negative exponents.\n */\nvar DP = 28, // 0 to MAX_DP\n/*\n * The rounding mode (RM) used when rounding to the above decimal places.\n *\n * 0 Towards zero (i.e. truncate, no rounding). (ROUND_DOWN)\n * 1 To nearest neighbour. If equidistant, round up. (ROUND_HALF_UP)\n * 2 To nearest neighbour. If equidistant, to even. (ROUND_HALF_EVEN)\n * 3 Away from zero. (ROUND_UP)\n */\nRM = 1, // 0, 1, 2 or 3\n// The maximum value of DP and Big.DP.\nMAX_DP = 1E6, // 0 to 1000000\n// The maximum magnitude of the exponent argument to the pow method.\nMAX_POWER = 1E6, // 1 to 1000000\n/*\n * The negative exponent (NE) at and beneath which toString returns exponential notation.\n * (JavaScript numbers: -7)\n * -1000000 is the minimum recommended exponent value of a Big.\n */\nNE = -29, // 0 to -1000000\n/*\n * The positive exponent (PE) at and above which toString returns exponential notation.\n * (JavaScript numbers: 21)\n * 1000000 is the maximum recommended exponent value of a Big, but this limit is not enforced.\n */\nPE = 29, // 0 to 1000000\n/*\n * When true, an error will be thrown if a primitive number is passed to the Big constructor,\n * or if valueOf is called, or if toNumber is called on a Big which cannot be converted to a\n * primitive number without a loss of precision.\n */\nSTRICT = false, // true or false\n/**************************************************************************************************/\n// Error messages.\nNAME = '[big.js] ', INVALID = NAME + 'Invalid ', INVALID_DP = INVALID + 'decimal places', INVALID_RM = INVALID + 'rounding mode', DIV_BY_ZERO = NAME + 'Division by zero', UNDEFINED = void 0, NUMERIC = /^-?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i;\n/*\n * Create and return a Big constructor.\n */\nfunction _Big_() {\n /*\n * The Big constructor and exported function.\n * Create and return a new instance of a Big number object.\n *\n * n {number|string|Big} A numeric value.\n */\n function Big(n) {\n var x = this;\n // Enable constructor usage without new.\n if (!(x instanceof Big))\n return n === UNDEFINED ? _Big_() : new Big(n);\n // Duplicate.\n if (n instanceof Big) {\n x.s = n.s;\n x.e = n.e;\n x.c = n.c.slice();\n normalize(x);\n }\n else {\n if (typeof n !== 'string') {\n if (Big.strict === true) {\n throw TypeError(INVALID + 'number');\n }\n // Minus zero?\n n = n === 0 && 1 / n < 0 ? '-0' : String(n);\n }\n parse(x, n);\n }\n // Retain a reference to this Big constructor.\n // Shadow Big.prototype.constructor which points to Object.\n x.constructor = Big;\n }\n Big.prototype = P;\n Big.DP = DP;\n Big.RM = RM;\n Big.NE = NE;\n Big.PE = PE;\n Big.strict = STRICT;\n return Big;\n}\nfunction normalize(x) {\n // x = round(x, DP, 0);\n if (x.c.length > 1 && !x.c[0]) {\n let i = x.c.findIndex(x => x);\n x.c = x.c.slice(i);\n x.e = x.e - i;\n }\n}\n/*\n * Parse the number or string value passed to a Big constructor.\n *\n * x {Big} A Big number instance.\n * n {number|string} A numeric value.\n */\nfunction parse(x, n) {\n var e, i, nl;\n if (!NUMERIC.test(n)) {\n throw Error(INVALID + 'number');\n }\n // Determine sign.\n x.s = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1;\n // Decimal point?\n if ((e = n.indexOf('.')) > -1)\n n = n.replace('.', '');\n // Exponential form?\n if ((i = n.search(/e/i)) > 0) {\n // Determine exponent.\n if (e < 0)\n e = i;\n e += +n.slice(i + 1);\n n = n.substring(0, i);\n }\n else if (e < 0) {\n // Integer.\n e = n.length;\n }\n nl = n.length;\n // Determine leading zeros before decimal point.\n for (i = 0; i < e && i < nl && n.charAt(i) == '0';)\n ++i;\n // original version (ignores decimal point).\n // // Determine leading zeros.\n // for (i = 0; i < nl && n.charAt(i) == '0';) ++i;\n if (i == nl) {\n // Zero.\n x.c = [x.e = 0];\n }\n else {\n x.e = e - i - 1;\n x.c = [];\n // Convert string to array of digits without leading zeros\n for (e = 0; i < nl;)\n x.c[e++] = +n.charAt(i++);\n // older version (doesn't keep trailing zeroes).\n // // Determine trailing zeros.\n // for (; nl > 0 && n.charAt(--nl) == '0';);\n // // Convert string to array of digits without leading/trailing zeros.\n // for (e = 0; i <= nl;) x.c[e++] = +n.charAt(i++);\n }\n x = round(x, Big.DP + 1, Big.RM);\n return x;\n}\n/*\n * Round Big x to a maximum of sd significant digits using rounding mode rm.\n *\n * x {Big} The Big to round.\n * sd {number} Significant digits: integer, 0 to MAX_DP inclusive.\n * rm {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n * [more] {boolean} Whether the result of division was truncated.\n */\nfunction round(x, sd, rm, more) {\n var xc = x.c;\n if (rm === UNDEFINED)\n rm = Big.RM;\n if (rm !== 0 && rm !== 1 && rm !== 2 && rm !== 3) {\n throw Error(INVALID_RM);\n }\n if (sd < 1) {\n more =\n rm === 3 && (more || !!xc[0]) || sd === 0 && (rm === 1 && xc[0] >= 5 ||\n rm === 2 && (xc[0] > 5 || xc[0] === 5 && (more || xc[1] !== UNDEFINED)));\n xc.length = 1;\n if (more) {\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\n x.e = x.e - sd + 1;\n xc[0] = 1;\n }\n else {\n // Zero.\n xc[0] = x.e = 0;\n }\n }\n else if (sd < xc.length) {\n // xc[sd] is the digit after the digit that may be rounded up.\n const isZero = xc.findIndex((xci, idx) => idx >= sd && xci > 0) < 0;\n more =\n rm === 1 && xc[sd] >= 5 ||\n rm === 2 && (xc[sd] > 5 || xc[sd] === 5 &&\n (more || xc[sd + 1] !== UNDEFINED || xc[sd - 1] & 1)) ||\n rm === 3 && (more || !isZero);\n // Remove any digits after the required precision.\n xc.length = sd--;\n // Round up?\n if (more) {\n // Rounding up may mean the previous digit has to be rounded up.\n for (; ++xc[sd] > 9;) {\n xc[sd] = 0;\n if (!sd--) {\n ++x.e;\n xc.unshift(1);\n }\n }\n }\n // Remove trailing zeros.\n for (sd = xc.length; !xc[--sd];)\n xc.pop();\n }\n return x;\n}\n/*\n * Return a string representing the value of Big x in normal or exponential notation.\n * Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf.\n */\nfunction stringify(x, doExponential, isNonzero) {\n var e = x.e, s = x.c.join(''), n = s.length;\n // Exponential notation?\n if (doExponential) {\n s = s.charAt(0) + (n > 1 ? '.' + s.slice(1) : '') + (e < 0 ? 'e' : 'e+') + e;\n // Normal notation.\n }\n else if (e < 0) {\n for (; ++e;)\n s = '0' + s;\n s = '0.' + s;\n }\n else if (e > 0) {\n if (++e > n) {\n for (e -= n; e--;)\n s += '0';\n }\n else if (e < n) {\n s = s.slice(0, e) + '.' + s.slice(e);\n }\n }\n else if (n > 1) {\n s = s.charAt(0) + '.' + s.slice(1);\n }\n return x.s < 0 && isNonzero ? '-' + s : s;\n}\n// Prototype/instance methods\n/*\n * Return a new Big whose value is the absolute value of this Big.\n */\nP.abs = function () {\n var x = new this.constructor(this);\n x.s = 1;\n return x;\n};\n/*\n * Return 1 if the value of this Big is greater than the value of Big y,\n * -1 if the value of this Big is less than the value of Big y, or\n * 0 if they have the same value.\n */\nP.cmp = function (y) {\n var isneg, Big = this.constructor, x = new Big(this), y = new Big(y), xc = x.c, yc = y.c, i = x.s, j = y.s, k = x.e, l = y.e;\n // Either zero?\n if (!xc[0] || !yc[0])\n return !xc[0] ? !yc[0] ? 0 : -j : i;\n // Signs differ?\n if (i != j)\n return i;\n isneg = i < 0;\n // Compare exponents.\n if (k != l)\n return k > l ^ isneg ? 1 : -1;\n // Compare digit by digit.\n j = Math.max(xc.length, yc.length);\n for (i = 0; i < j; i++) {\n k = i < xc.length ? xc[i] : 0;\n l = i < yc.length ? yc[i] : 0;\n if (k != l)\n return k > l ^ isneg ? 1 : -1;\n }\n return 0;\n // original version (doesn't compare well trailing zeroes, e.g. 1.0 with 1.00)\n // j = (k = xc.length) < (l = yc.length) ? k : l;\n // // Compare digit by digit.\n // for (i = -1; ++i < j;) {\n // if (xc[i] != yc[i]) return xc[i] > yc[i] ^ isneg ? 1 : -1;\n // }\n // // Compare lengths.\n // return k == l ? 0 : k > l ^ isneg ? 1 : -1;\n};\n/*\n * Return a new Big whose value is the value of this Big divided by the value of Big y, rounded,\n * if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\n */\nP.div = function (y) {\n var Big = this.constructor, x = new Big(this), y = new Big(y), a = x.c, // dividend\n b = y.c, // divisor\n k = x.s == y.s ? 1 : -1, dp = Big.DP;\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n // Divisor is zero?\n if (!b[0]) {\n throw Error(DIV_BY_ZERO);\n }\n // Dividend is 0? Return +-0.\n if (!a[0]) {\n y.s = k;\n y.c = [y.e = 0];\n return y;\n }\n var bl, bt, n, cmp, ri, bz = b.slice(), ai = bl = b.length, al = a.length, r = a.slice(0, bl), // remainder\n rl = r.length, q = y, // quotient\n qc = q.c = [], qi = 0, p = dp + (q.e = x.e - y.e) + 1; // precision of the result\n q.s = k;\n k = p < 0 ? 0 : p;\n // Create version of divisor with leading zero.\n bz.unshift(0);\n // Add zeros to make remainder as long as divisor.\n for (; rl++ < bl;)\n r.push(0);\n do {\n // n is how many times the divisor goes into current remainder.\n for (n = 0; n < 10; n++) {\n // Compare divisor and remainder.\n if (bl != (rl = r.length)) {\n cmp = bl > rl ? 1 : -1;\n }\n else {\n for (ri = -1, cmp = 0; ++ri < bl;) {\n if (b[ri] != r[ri]) {\n cmp = b[ri] > r[ri] ? 1 : -1;\n break;\n }\n }\n }\n // If divisor < remainder, subtract divisor from remainder.\n if (cmp < 0) {\n // Remainder can't be more than 1 digit longer than divisor.\n // Equalise lengths using divisor with extra leading zero?\n for (bt = rl == bl ? b : bz; rl;) {\n if (r[--rl] < bt[rl]) {\n ri = rl;\n for (; ri && !r[--ri];)\n r[ri] = 9;\n --r[ri];\n r[rl] += 10;\n }\n r[rl] -= bt[rl];\n }\n for (; !r[0];)\n r.shift();\n }\n else {\n break;\n }\n }\n // Add the digit n to the result array.\n qc[qi++] = cmp ? n : ++n;\n // Update the remainder.\n if (r[0] && cmp)\n r[rl] = a[ai] || 0;\n else\n r = [a[ai]];\n } while ((ai++ < al || r[0] !== UNDEFINED) && k--);\n // Leading zero? Do not remove if result is simply zero (qi == 1).\n if (!qc[0] && qi != 1) {\n // There can't be more than one zero.\n qc.shift();\n q.e--;\n p--;\n }\n // Round?\n if (qi > p)\n round(q, p, Big.RM, r[0] !== UNDEFINED);\n return q;\n};\n/*\n * Return true if the value of this Big is equal to the value of Big y, otherwise return false.\n */\nP.eq = function (y) {\n return this.cmp(y) === 0;\n};\n/*\n * Return true if the value of this Big is greater than the value of Big y, otherwise return\n * false.\n */\nP.gt = function (y) {\n return this.cmp(y) > 0;\n};\n/*\n * Return true if the value of this Big is greater than or equal to the value of Big y, otherwise\n * return false.\n */\nP.gte = function (y) {\n return this.cmp(y) > -1;\n};\n/*\n * Return true if the value of this Big is less than the value of Big y, otherwise return false.\n */\nP.lt = function (y) {\n return this.cmp(y) < 0;\n};\n/*\n * Return true if the value of this Big is less than or equal to the value of Big y, otherwise\n * return false.\n */\nP.lte = function (y) {\n return this.cmp(y) < 1;\n};\n/*\n * Return a new Big whose value is the value of this Big minus the value of Big y.\n */\nP.minus = P.sub = function (y) {\n var i, j, t, xlty, Big = this.constructor, x = new Big(this), y = new Big(y), a = x.s, b = y.s;\n // Signs differ?\n if (a != b) {\n y.s = -b;\n return x.plus(y);\n }\n var xc = x.c.slice(), xe = x.e, yc = y.c, ye = y.e;\n // Either zero?\n if (!xc[0] || !yc[0]) {\n if (yc[0]) {\n y.s = -b;\n }\n else if (xc[0]) {\n y = new Big(x);\n }\n else {\n y.s = 1;\n }\n return y;\n }\n // Determine which is the bigger number. Prepend zeros to equalise exponents.\n if (a = xe - ye) {\n if (xlty = a < 0) {\n a = -a;\n t = xc;\n }\n else {\n ye = xe;\n t = yc;\n }\n t.reverse();\n for (b = a; b--;)\n t.push(0);\n t.reverse();\n }\n else {\n // Exponents equal. Check digit by digit.\n j = ((xlty = xc.length < yc.length) ? xc : yc).length;\n for (a = b = 0; b < j; b++) {\n if (xc[b] != yc[b]) {\n xlty = xc[b] < yc[b];\n break;\n }\n }\n }\n // x < y? Point xc to the array of the bigger number.\n if (xlty) {\n t = xc;\n xc = yc;\n yc = t;\n y.s = -y.s;\n }\n /*\n * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only\n * needs to start at yc.length.\n */\n if ((b = (j = yc.length) - (i = xc.length)) > 0)\n for (; b--;)\n xc[i++] = 0;\n // Subtract yc from xc.\n for (b = i; j > a;) {\n if (xc[--j] < yc[j]) {\n for (i = j; i && !xc[--i];)\n xc[i] = 9;\n --xc[i];\n xc[j] += 10;\n }\n xc[j] -= yc[j];\n }\n // Remove trailing zeros.\n for (; xc[--b] === 0;)\n xc.pop();\n // Remove leading zeros and adjust exponent accordingly.\n for (; xc[0] === 0;) {\n xc.shift();\n --ye;\n }\n if (!xc[0]) {\n // n - n = +0\n y.s = 1;\n // Result must be zero.\n xc = [ye = 0];\n }\n y.c = xc;\n y.e = ye;\n return y;\n};\n/*\n * Return a new Big whose value is the value of this Big modulo the value of Big y.\n */\nP.mod = function (y) {\n var ygtx, Big = this.constructor, x = new Big(this), y = new Big(y), a = x.s, b = y.s;\n if (!y.c[0]) {\n throw Error(DIV_BY_ZERO);\n }\n x.s = y.s = 1;\n ygtx = y.cmp(x) == 1;\n x.s = a;\n y.s = b;\n if (ygtx)\n return new Big(x);\n a = Big.DP;\n b = Big.RM;\n Big.DP = Big.RM = 0;\n x = x.div(y);\n Big.DP = a;\n Big.RM = b;\n return this.minus(x.times(y));\n};\n/*\n * Return a new Big whose value is the value of this Big plus the value of Big y.\n */\nP.plus = P.add = function (y) {\n var e, k, t, Big = this.constructor, x = new Big(this), y = new Big(y);\n // Signs differ?\n if (x.s != y.s) {\n y.s = -y.s;\n return x.minus(y);\n }\n var xe = x.e, xc = x.c, ye = y.e, yc = y.c;\n // Either zero?\n if (!xc[0] || !yc[0]) {\n if (!yc[0]) {\n if (xc[0]) {\n y = new Big(x);\n }\n else {\n y.s = x.s;\n }\n }\n return y;\n }\n xc = xc.slice();\n // Prepend zeros to equalise exponents.\n // Note: reverse faster than unshifts.\n if (e = xe - ye) {\n if (e > 0) {\n ye = xe;\n t = yc;\n }\n else {\n e = -e;\n t = xc;\n }\n t.reverse();\n for (; e--;)\n t.push(0);\n t.reverse();\n }\n // Point xc to the longer array.\n if (xc.length - yc.length < 0) {\n t = yc;\n yc = xc;\n xc = t;\n }\n e = yc.length;\n // Only start adding at yc.length - 1 as the further digits of xc can be left as they are.\n for (k = 0; e; xc[e] %= 10)\n k = (xc[--e] = xc[e] + yc[e] + k) / 10 | 0;\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\n if (k) {\n xc.unshift(k);\n ++ye;\n }\n // Remove trailing zeros.\n for (e = xc.length; xc[--e] === 0;)\n xc.pop();\n y.c = xc;\n y.e = ye;\n return y;\n};\n/*\n * Return a Big whose value is the value of this Big raised to the power n.\n * If n is negative, round to a maximum of Big.DP decimal places using rounding\n * mode Big.RM.\n *\n * n {number} Integer, -MAX_POWER to MAX_POWER inclusive.\n */\nP.pow = function (n) {\n var Big = this.constructor, x = new Big(this), y = new Big('1'), one = new Big('1'), isneg = n < 0;\n if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) {\n throw Error(INVALID + 'exponent');\n }\n if (isneg)\n n = -n;\n for (;;) {\n if (n & 1)\n y = y.times(x);\n n >>= 1;\n if (!n)\n break;\n x = x.times(x);\n }\n return isneg ? one.div(y) : y;\n};\n/*\n * Return a new Big whose value is the value of this Big rounded to a maximum precision of sd\n * significant digits using rounding mode rm, or Big.RM if rm is not specified.\n *\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n */\nP.prec = function (sd, rm) {\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\n throw Error(INVALID + 'precision');\n }\n return round(new this.constructor(this), sd, rm);\n};\n/*\n * Return a new Big whose value is the value of this Big rounded to a maximum of dp decimal places\n * using rounding mode rm, or Big.RM if rm is not specified.\n * If dp is negative, round to an integer which is a multiple of 10**-dp.\n * If dp is not specified, round to 0 decimal places.\n *\n * dp? {number} Integer, -MAX_DP to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n */\nP.round = function (dp, rm) {\n if (dp === UNDEFINED)\n dp = 0;\n else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n return round(new this.constructor(this), dp + this.e + 1, rm);\n};\n/*\n * Return a new Big whose value is the square root of the value of this Big, rounded, if\n * necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.\n */\nP.sqrt = function () {\n var r, c, t, Big = this.constructor, x = new Big(this), s = x.s, e = x.e, half = new Big('0.5');\n // Zero?\n if (!x.c[0])\n return new Big(x);\n // Negative?\n if (s < 0) {\n throw Error(NAME + 'No square root');\n }\n // Estimate.\n s = Math.sqrt(x + '');\n // Math.sqrt underflow/overflow?\n // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent.\n if (s === 0 || s === 1 / 0) {\n c = x.c.join('');\n if (!(c.length + e & 1))\n c += '0';\n s = Math.sqrt(c);\n e = ((e + 1) / 2 | 0) - (e < 0 || e & 1);\n r = new Big((s == 1 / 0 ? '5e' : (s = s.toExponential()).slice(0, s.indexOf('e') + 1)) + e);\n }\n else {\n r = new Big(s + '');\n }\n e = r.e + (Big.DP += 4);\n // Newton-Raphson iteration.\n do {\n t = r;\n r = half.times(t.plus(x.div(t)));\n } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join(''));\n return round(r, (Big.DP -= 4) + r.e + 1, Big.RM);\n};\n/*\n * Return a new Big whose value is the value of this Big times the value of Big y.\n */\nP.times = P.mul = function (y) {\n var c, Big = this.constructor, x = new Big(this), y = new Big(y), xc = x.c, yc = y.c, a = xc.length, b = yc.length, i = x.e, j = y.e;\n // Determine sign of result.\n y.s = x.s == y.s ? 1 : -1;\n // Return signed 0 if either 0.\n if (!xc[0] || !yc[0]) {\n y.c = [y.e = 0];\n return y;\n }\n // Initialise exponent of result as x.e + y.e.\n y.e = i + j;\n // If array xc has fewer digits than yc, swap xc and yc, and lengths.\n if (a < b) {\n c = xc;\n xc = yc;\n yc = c;\n j = a;\n a = b;\n b = j;\n }\n // Initialise coefficient array of result with zeros.\n for (c = new Array(j = a + b); j--;)\n c[j] = 0;\n // Multiply.\n // i is initially xc.length.\n for (i = b; i--;) {\n b = 0;\n // a is yc.length.\n for (j = a + i; j > i;) {\n // Current sum of products at this digit position, plus carry.\n b = c[j] + yc[i] * xc[j - i - 1] + b;\n c[j--] = b % 10;\n // carry\n b = b / 10 | 0;\n }\n c[j] = b;\n }\n // Increment result exponent if there is a final carry, otherwise remove leading zero.\n if (b)\n ++y.e;\n else\n c.shift();\n // Remove trailing zeros.\n for (i = c.length; !c[--i];)\n c.pop();\n y.c = c;\n return y;\n};\n/*\n * Return a string representing the value of this Big in exponential notation rounded to dp fixed\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\n *\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n */\nP.toExponential = function (dp, rm) {\n var x = this, n = x.c[0];\n if (dp !== UNDEFINED) {\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n x = round(new x.constructor(x), ++dp, rm);\n for (; x.c.length < dp;)\n x.c.push(0);\n }\n return stringify(x, true, !!n);\n};\n/*\n * Return a string representing the value of this Big in normal notation rounded to dp fixed\n * decimal places using rounding mode rm, or Big.RM if rm is not specified.\n *\n * dp? {number} Decimal places: integer, 0 to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n *\n * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.\n * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.\n */\nP.toFixed = function (dp, rm) {\n var x = this, n = x.c[0];\n if (dp !== UNDEFINED) {\n if (dp !== ~~dp || dp < 0 || dp > MAX_DP) {\n throw Error(INVALID_DP);\n }\n x = round(new x.constructor(x), dp + x.e + 1, rm);\n // x.e may have changed if the value is rounded up.\n for (dp = dp + x.e + 1; x.c.length < dp;)\n x.c.push(0);\n }\n return stringify(x, false, !!n);\n};\n/*\n * Return a string representing the value of this Big.\n * Return exponential notation if this Big has a positive exponent equal to or greater than\n * Big.PE, or a negative exponent equal to or less than Big.NE.\n * Omit the sign for negative zero.\n */\nP.toJSON = P.toString = function () {\n var x = this, Big = x.constructor;\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, !!x.c[0]);\n};\n/*\n * Return the value of this Big as a primitve number.\n */\nP.toNumber = function () {\n var n = Number(stringify(this, true, true));\n if (this.constructor.strict === true && !this.eq(n.toString())) {\n throw Error(NAME + 'Imprecise conversion');\n }\n return n;\n};\n/*\n * Return a string representing the value of this Big rounded to sd significant digits using\n * rounding mode rm, or Big.RM if rm is not specified.\n * Use exponential notation if sd is less than the number of digits necessary to represent\n * the integer part of the value in normal notation.\n *\n * sd {number} Significant digits: integer, 1 to MAX_DP inclusive.\n * rm? {number} Rounding mode: 0 (down), 1 (half-up), 2 (half-even) or 3 (up).\n */\nP.toPrecision = function (sd, rm) {\n var x = this, Big = x.constructor, n = x.c[0];\n if (sd !== UNDEFINED) {\n if (sd !== ~~sd || sd < 1 || sd > MAX_DP) {\n throw Error(INVALID + 'precision');\n }\n x = round(new Big(x), sd, rm);\n for (; x.c.length < sd;)\n x.c.push(0);\n }\n return stringify(x, sd <= x.e || x.e <= Big.NE || x.e >= Big.PE, !!n);\n};\n/*\n * Return a string representing the value of this Big.\n * Return exponential notation if this Big has a positive exponent equal to or greater than\n * Big.PE, or a negative exponent equal to or less than Big.NE.\n * Include the sign for negative zero.\n */\nP.valueOf = function () {\n var x = this, Big = x.constructor;\n if (Big.strict === true) {\n throw Error(NAME + 'valueOf disallowed');\n }\n return stringify(x, x.e <= Big.NE || x.e >= Big.PE, true);\n};\n// Export\nexport var Big = _Big_();\n/// \nexport default Big;\n","import Decimal from \"./lib/big.js\";\nimport { FSharpRef } from \"./Types.js\";\nexport default Decimal;\nexport const get_Zero = new Decimal(0);\nexport const get_One = new Decimal(1);\nexport const get_MinusOne = new Decimal(-1);\nexport const get_MaxValue = new Decimal(\"79228162514264337593543950335\");\nexport const get_MinValue = new Decimal(\"-79228162514264337593543950335\");\nexport function compare(x, y) {\n return x.cmp(y);\n}\nexport function equals(x, y) {\n return !x.cmp(y);\n}\nexport function abs(x) {\n return x.abs();\n}\nexport function round(x, digits = 0) {\n return x.round(digits, 2 /* ROUND_HALF_EVEN */);\n}\nexport function truncate(x) {\n return x.round(0, 0 /* ROUND_DOWN */);\n}\nexport function ceiling(x) {\n return x.round(0, x.cmp(0) >= 0 ? 3 /* ROUND_UP */ : 0 /* ROUND_DOWN */);\n}\nexport function floor(x) {\n return x.round(0, x.cmp(0) >= 0 ? 0 /* ROUND_DOWN */ : 3 /* ROUND_UP */);\n}\nexport function pow(x, n) {\n return x.pow(n);\n}\nexport function sqrt(x) {\n return x.sqrt();\n}\nexport function op_Addition(x, y) {\n return x.add(y);\n}\nexport function op_Subtraction(x, y) {\n return x.sub(y);\n}\nexport function op_Multiply(x, y) {\n return x.mul(y);\n}\nexport function op_Division(x, y) {\n return x.div(y);\n}\nexport function op_Modulus(x, y) {\n return x.mod(y);\n}\nexport function op_UnaryNegation(x) {\n const x2 = new Decimal(x);\n x2.s = -x2.s || 0;\n return x2;\n}\nexport const add = op_Addition;\nexport const subtract = op_Subtraction;\nexport const multiply = op_Multiply;\nexport const divide = op_Division;\nexport const remainder = op_Modulus;\nexport const negate = op_UnaryNegation;\nexport function toString(x) {\n return x.toString();\n}\nexport function tryParse(str, defValue) {\n try {\n defValue.contents = new Decimal(str.trim());\n return true;\n }\n catch (_a) {\n return false;\n }\n}\nexport function parse(str) {\n const defValue = new FSharpRef(get_Zero);\n if (tryParse(str, defValue)) {\n return defValue.contents;\n }\n else {\n throw new Error(\"Input string was not in a correct format.\");\n }\n}\nexport function toNumber(x) {\n return +x;\n}\nfunction decimalToHex(dec, bitSize) {\n const hex = new Uint8Array(bitSize / 4 | 0);\n let hexCount = 1;\n for (let d = 0; d < dec.length; d++) {\n let value = dec[d];\n for (let i = 0; i < hexCount; i++) {\n const digit = hex[i] * 10 + value | 0;\n hex[i] = digit & 0xF;\n value = digit >> 4;\n }\n if (value !== 0) {\n hex[hexCount++] = value;\n }\n }\n return hex.slice(0, hexCount); // digits in reverse order\n}\nfunction hexToDecimal(hex, bitSize) {\n const dec = new Uint8Array(bitSize * 301 / 1000 + 1 | 0);\n let decCount = 1;\n for (let d = hex.length - 1; d >= 0; d--) {\n let carry = hex[d];\n for (let i = 0; i < decCount; i++) {\n const val = dec[i] * 16 + carry | 0;\n dec[i] = (val % 10) | 0;\n carry = (val / 10) | 0;\n }\n while (carry > 0) {\n dec[decCount++] = (carry % 10) | 0;\n carry = (carry / 10) | 0;\n }\n }\n return dec.slice(0, decCount); // digits in reverse order\n}\nfunction setInt32Bits(hexDigits, bits, offset) {\n for (let i = 0; i < 8; i++) {\n hexDigits[offset + i] = (bits >> (i * 4)) & 0xF;\n }\n}\nfunction getInt32Bits(hexDigits, offset) {\n let bits = 0;\n for (let i = 0; i < 8; i++) {\n bits = bits | (hexDigits[offset + i] << (i * 4));\n }\n return bits;\n}\nexport function fromIntArray(bits) {\n return fromInts(bits[0], bits[1], bits[2], bits[3]);\n}\nexport function fromInts(low, mid, high, signExp) {\n const isNegative = signExp < 0;\n const scale = (signExp >> 16) & 0x7F;\n return fromParts(low, mid, high, isNegative, scale);\n}\nexport function fromParts(low, mid, high, isNegative, scale) {\n const bitSize = 96;\n const hexDigits = new Uint8Array(bitSize / 4);\n setInt32Bits(hexDigits, low, 0);\n setInt32Bits(hexDigits, mid, 8);\n setInt32Bits(hexDigits, high, 16);\n const decDigits = hexToDecimal(hexDigits, bitSize);\n scale = scale & 0x7F;\n const big = new Decimal(0);\n big.c = Array.from(decDigits.reverse());\n big.e = decDigits.length - scale - 1;\n big.s = isNegative ? -1 : 1;\n const d = new Decimal(big);\n return d;\n}\nexport function getBits(d) {\n const bitSize = 96;\n const decDigits = Uint8Array.from(d.c);\n const hexDigits = decimalToHex(decDigits, bitSize);\n const low = getInt32Bits(hexDigits, 0);\n const mid = getInt32Bits(hexDigits, 8);\n const high = getInt32Bits(hexDigits, 16);\n const decStr = d.toString();\n const dotPos = decStr.indexOf(\".\");\n const scale = dotPos < 0 ? 0 : decStr.length - dotPos - 1;\n const signExp = ((scale & 0x7F) << 16) | (d.s < 0 ? 0x80000000 : 0);\n return [low, mid, high, signExp];\n}\n// export function makeRangeStepFunction(step: Decimal, last: Decimal) {\n// const stepComparedWithZero = step.cmp(get_Zero);\n// if (stepComparedWithZero === 0) {\n// throw new Error(\"The step of a range cannot be zero\");\n// }\n// const stepGreaterThanZero = stepComparedWithZero > 0;\n// return (x: Decimal) => {\n// const comparedWithLast = x.cmp(last);\n// if ((stepGreaterThanZero && comparedWithLast <= 0)\n// || (!stepGreaterThanZero && comparedWithLast >= 0)) {\n// return [x, op_Addition(x, step)];\n// } else {\n// return undefined;\n// }\n// };\n// }\n","import { BigNatModule_factorial, BigNatModule_ofString, BigNatModule_toFloat, BigNatModule_toUInt64, BigNatModule_toUInt32, BigNatModule_pow, BigNatModule_two, BigNatModule_rem, BigNatModule_lte, BigNatModule_hcf, BigNatModule_bitXor, BigNatModule_bitOr, BigNatModule_bitAnd, BigNatModule_divmod, BigNatModule_mul, BigNatModule_isOne, BigNatModule_sub, BigNatModule_gte, BigNatModule_scale, BigNatModule_one, BigNatModule_add, BigNatModule_ofInt64, BigNatModule_hash, BigNatModule_gt, BigNatModule_lt, BigNatModule_equal, BigNatModule_getSmall, BigNatModule_isSmall, BigNatModule_ofInt32, BigNatModule_toString, BigNatModule_isZero } from \"./n.js\";\nimport { Record, toString } from \"../Types.js\";\nimport { class_type } from \"../Reflection.js\";\nimport { initialize } from \"../Array.js\";\nimport { op_Addition, op_Multiply, fromValue, equals, fromBits, compare, fromInteger, op_UnaryNegation } from \"../Long.js\";\nimport { op_UnaryNegation_Int32 } from \"../Int32.js\";\nimport Decimal from \"../Decimal.js\";\n\nexport class BigInteger extends Record {\n constructor(signInt, v) {\n super();\n this.signInt = (signInt | 0);\n this.v = v;\n }\n toString() {\n const x = this;\n const matchValue = BigInteger__get_SignInt(x) | 0;\n switch (matchValue) {\n case -1: {\n return BigNatModule_isZero(BigInteger__get_V(x)) ? \"0\" : (\"-\" + BigNatModule_toString(BigInteger__get_V(x)));\n }\n case 0: {\n return \"0\";\n }\n case 1: {\n return BigNatModule_toString(BigInteger__get_V(x));\n }\n default: {\n throw (new Error(\"signs should be +/- 1 or 0\"));\n }\n }\n }\n Equals(obj) {\n const this$ = this;\n return (obj instanceof BigInteger) ? BigInteger_op_Equality_56F059C0(this$, obj) : false;\n }\n GetHashCode() {\n const x = this;\n return BigInteger_hash_Z665282C2(x) | 0;\n }\n toJSON(_key) {\n const this$ = this;\n return toString(this$);\n }\n CompareTo(obj) {\n const this$ = this;\n if (obj instanceof BigInteger) {\n return BigInteger_compare_56F059C0(this$, obj) | 0;\n }\n else {\n throw (new Error(\"the objects are not comparable\\\\nParameter name: obj\"));\n }\n }\n}\n\nexport function BigInteger$reflection() {\n return class_type(\"BigInt.BigInteger\", void 0, BigInteger, class_type(\"System.ValueType\"));\n}\n\nexport function BigInteger_$ctor_Z2BE94A1(signInt, v) {\n return new BigInteger(signInt, v);\n}\n\n(() => {\n BigInteger.smallLim = 4096;\n BigInteger.smallPosTab = initialize(BigInteger.smallLim, (n) => BigNatModule_ofInt32(n));\n BigInteger.one = BigInteger_$ctor_Z524259A4(1);\n BigInteger.two = BigInteger_$ctor_Z524259A4(2);\n BigInteger.zero = BigInteger_$ctor_Z524259A4(0);\n})();\n\nexport function BigInteger_nat_Z67CCE57D(n) {\n if (BigNatModule_isSmall(n) ? (BigNatModule_getSmall(n) < BigInteger.smallLim) : false) {\n return BigInteger.smallPosTab[BigNatModule_getSmall(n)];\n }\n else {\n return n;\n }\n}\n\nexport function BigInteger_create_Z2BE94A1(s, n) {\n return BigInteger_$ctor_Z2BE94A1(s, BigInteger_nat_Z67CCE57D(n));\n}\n\nexport function BigInteger_posn_Z67CCE57D(n) {\n return BigInteger_$ctor_Z2BE94A1(1, BigInteger_nat_Z67CCE57D(n));\n}\n\nexport function BigInteger_negn_Z67CCE57D(n) {\n return BigInteger_$ctor_Z2BE94A1(-1, BigInteger_nat_Z67CCE57D(n));\n}\n\nexport function BigInteger__get_Sign(x) {\n if (BigInteger__get_IsZero(x)) {\n return 0;\n }\n else {\n return x.signInt | 0;\n }\n}\n\nexport function BigInteger__get_SignInt(x) {\n return x.signInt;\n}\n\nexport function BigInteger__get_V(x) {\n return x.v;\n}\n\nexport function BigInteger_op_Equality_56F059C0(x, y) {\n const matchValue = [BigInteger__get_SignInt(x), BigInteger__get_SignInt(y)];\n let pattern_matching_result;\n if (matchValue[0] === -1) {\n if (matchValue[1] === -1) {\n pattern_matching_result = 1;\n }\n else if (matchValue[1] === 0) {\n pattern_matching_result = 8;\n }\n else if (matchValue[1] === 1) {\n pattern_matching_result = 3;\n }\n else {\n pattern_matching_result = 9;\n }\n }\n else if (matchValue[0] === 0) {\n if (matchValue[1] === -1) {\n pattern_matching_result = 6;\n }\n else if (matchValue[1] === 0) {\n pattern_matching_result = 4;\n }\n else if (matchValue[1] === 1) {\n pattern_matching_result = 5;\n }\n else {\n pattern_matching_result = 9;\n }\n }\n else if (matchValue[0] === 1) {\n if (matchValue[1] === -1) {\n pattern_matching_result = 2;\n }\n else if (matchValue[1] === 0) {\n pattern_matching_result = 7;\n }\n else if (matchValue[1] === 1) {\n pattern_matching_result = 0;\n }\n else {\n pattern_matching_result = 9;\n }\n }\n else {\n pattern_matching_result = 9;\n }\n switch (pattern_matching_result) {\n case 0: {\n return BigNatModule_equal(BigInteger__get_V(x), BigInteger__get_V(y));\n }\n case 1: {\n return BigNatModule_equal(BigInteger__get_V(x), BigInteger__get_V(y));\n }\n case 2: {\n if (BigNatModule_isZero(BigInteger__get_V(x))) {\n return BigNatModule_isZero(BigInteger__get_V(y));\n }\n else {\n return false;\n }\n }\n case 3: {\n if (BigNatModule_isZero(BigInteger__get_V(x))) {\n return BigNatModule_isZero(BigInteger__get_V(y));\n }\n else {\n return false;\n }\n }\n case 4: {\n return true;\n }\n case 5: {\n return BigNatModule_isZero(BigInteger__get_V(y));\n }\n case 6: {\n return BigNatModule_isZero(BigInteger__get_V(y));\n }\n case 7: {\n return BigNatModule_isZero(BigInteger__get_V(x));\n }\n case 8: {\n return BigNatModule_isZero(BigInteger__get_V(x));\n }\n case 9: {\n throw (new Error(\"signs should be +/- 1 or 0\\\\nParameter name: x\"));\n }\n }\n}\n\nexport function BigInteger_op_Inequality_56F059C0(x, y) {\n return !BigInteger_op_Equality_56F059C0(x, y);\n}\n\nexport function BigInteger_op_LessThan_56F059C0(x, y) {\n const matchValue = [BigInteger__get_SignInt(x), BigInteger__get_SignInt(y)];\n let pattern_matching_result;\n if (matchValue[0] === -1) {\n if (matchValue[1] === -1) {\n pattern_matching_result = 1;\n }\n else if (matchValue[1] === 0) {\n pattern_matching_result = 8;\n }\n else if (matchValue[1] === 1) {\n pattern_matching_result = 3;\n }\n else {\n pattern_matching_result = 9;\n }\n }\n else if (matchValue[0] === 0) {\n if (matchValue[1] === -1) {\n pattern_matching_result = 6;\n }\n else if (matchValue[1] === 0) {\n pattern_matching_result = 4;\n }\n else if (matchValue[1] === 1) {\n pattern_matching_result = 5;\n }\n else {\n pattern_matching_result = 9;\n }\n }\n else if (matchValue[0] === 1) {\n if (matchValue[1] === -1) {\n pattern_matching_result = 2;\n }\n else if (matchValue[1] === 0) {\n pattern_matching_result = 7;\n }\n else if (matchValue[1] === 1) {\n pattern_matching_result = 0;\n }\n else {\n pattern_matching_result = 9;\n }\n }\n else {\n pattern_matching_result = 9;\n }\n switch (pattern_matching_result) {\n case 0: {\n return BigNatModule_lt(BigInteger__get_V(x), BigInteger__get_V(y));\n }\n case 1: {\n return BigNatModule_lt(BigInteger__get_V(y), BigInteger__get_V(x));\n }\n case 2: {\n return false;\n }\n case 3: {\n if (!BigNatModule_isZero(BigInteger__get_V(x))) {\n return true;\n }\n else {\n return !BigNatModule_isZero(BigInteger__get_V(y));\n }\n }\n case 4: {\n return false;\n }\n case 5: {\n return !BigNatModule_isZero(BigInteger__get_V(y));\n }\n case 6: {\n return false;\n }\n case 7: {\n return false;\n }\n case 8: {\n return !BigNatModule_isZero(BigInteger__get_V(x));\n }\n case 9: {\n throw (new Error(\"signs should be +/- 1 or 0\\\\nParameter name: x\"));\n }\n }\n}\n\nexport function BigInteger_op_GreaterThan_56F059C0(x, y) {\n const matchValue = [BigInteger__get_SignInt(x), BigInteger__get_SignInt(y)];\n let pattern_matching_result;\n if (matchValue[0] === -1) {\n if (matchValue[1] === -1) {\n pattern_matching_result = 1;\n }\n else if (matchValue[1] === 0) {\n pattern_matching_result = 8;\n }\n else if (matchValue[1] === 1) {\n pattern_matching_result = 3;\n }\n else {\n pattern_matching_result = 9;\n }\n }\n else if (matchValue[0] === 0) {\n if (matchValue[1] === -1) {\n pattern_matching_result = 6;\n }\n else if (matchValue[1] === 0) {\n pattern_matching_result = 4;\n }\n else if (matchValue[1] === 1) {\n pattern_matching_result = 5;\n }\n else {\n pattern_matching_result = 9;\n }\n }\n else if (matchValue[0] === 1) {\n if (matchValue[1] === -1) {\n pattern_matching_result = 2;\n }\n else if (matchValue[1] === 0) {\n pattern_matching_result = 7;\n }\n else if (matchValue[1] === 1) {\n pattern_matching_result = 0;\n }\n else {\n pattern_matching_result = 9;\n }\n }\n else {\n pattern_matching_result = 9;\n }\n switch (pattern_matching_result) {\n case 0: {\n return BigNatModule_gt(BigInteger__get_V(x), BigInteger__get_V(y));\n }\n case 1: {\n return BigNatModule_gt(BigInteger__get_V(y), BigInteger__get_V(x));\n }\n case 2: {\n if (!BigNatModule_isZero(BigInteger__get_V(x))) {\n return true;\n }\n else {\n return !BigNatModule_isZero(BigInteger__get_V(y));\n }\n }\n case 3: {\n return false;\n }\n case 4: {\n return false;\n }\n case 5: {\n return false;\n }\n case 6: {\n return !BigNatModule_isZero(BigInteger__get_V(y));\n }\n case 7: {\n return !BigNatModule_isZero(BigInteger__get_V(x));\n }\n case 8: {\n return false;\n }\n case 9: {\n throw (new Error(\"signs should be +/- 1 or 0\\\\nParameter name: x\"));\n }\n }\n}\n\nexport function BigInteger_compare_56F059C0(n, nn) {\n if (BigInteger_op_LessThan_56F059C0(n, nn)) {\n return -1;\n }\n else if (BigInteger_op_Equality_56F059C0(n, nn)) {\n return 0;\n }\n else {\n return 1;\n }\n}\n\nexport function BigInteger_hash_Z665282C2(z) {\n if (BigInteger__get_SignInt(z) === 0) {\n return 1;\n }\n else {\n return (BigInteger__get_SignInt(z) + BigNatModule_hash(BigInteger__get_V(z))) | 0;\n }\n}\n\nexport function BigInteger__get_StructuredDisplayString(x) {\n return toString(x);\n}\n\nexport function BigInteger_$ctor_Z524259A4(n) {\n if (n >= 0) {\n return BigInteger_$ctor_Z2BE94A1(1, BigInteger_nat_Z67CCE57D(BigNatModule_ofInt32(n)));\n }\n else if (n === -2147483648) {\n return BigInteger_$ctor_Z2BE94A1(-1, BigInteger_nat_Z67CCE57D(BigNatModule_ofInt64(op_UnaryNegation(fromInteger(n, false, 2)))));\n }\n else {\n return BigInteger_$ctor_Z2BE94A1(-1, BigInteger_nat_Z67CCE57D(BigNatModule_ofInt32(op_UnaryNegation_Int32(n))));\n }\n}\n\nexport function BigInteger_$ctor_Z524259C1(n) {\n if (compare(n, fromBits(0, 0, false)) >= 0) {\n return BigInteger_$ctor_Z2BE94A1(1, BigInteger_nat_Z67CCE57D(BigNatModule_ofInt64(n)));\n }\n else if (equals(n, fromBits(0, 2147483648, false))) {\n return BigInteger_$ctor_Z2BE94A1(-1, BigInteger_nat_Z67CCE57D(BigNatModule_add(BigNatModule_ofInt64(fromBits(4294967295, 2147483647, false)), BigNatModule_one)));\n }\n else {\n return BigInteger_$ctor_Z2BE94A1(-1, BigInteger_nat_Z67CCE57D(BigNatModule_ofInt64(op_UnaryNegation(n))));\n }\n}\n\nexport function BigInteger_get_One() {\n return BigInteger.one;\n}\n\nexport function BigInteger_get_Two() {\n return BigInteger.two;\n}\n\nexport function BigInteger_get_Zero() {\n return BigInteger.zero;\n}\n\nexport function BigInteger_op_UnaryNegation_Z665282C2(z) {\n const matchValue = BigInteger__get_SignInt(z) | 0;\n if (matchValue === 0) {\n return BigInteger_get_Zero();\n }\n else {\n return BigInteger_create_Z2BE94A1(op_UnaryNegation_Int32(matchValue), BigInteger__get_V(z));\n }\n}\n\nexport function BigInteger_Scale_Z320F31E(k, z) {\n if (BigInteger__get_SignInt(z) === 0) {\n return BigInteger_get_Zero();\n }\n else if (k < 0) {\n return BigInteger_create_Z2BE94A1(op_UnaryNegation_Int32(BigInteger__get_SignInt(z)), BigNatModule_scale(op_UnaryNegation_Int32(k), BigInteger__get_V(z)));\n }\n else {\n return BigInteger_create_Z2BE94A1(BigInteger__get_SignInt(z), BigNatModule_scale(k, BigInteger__get_V(z)));\n }\n}\n\nexport function BigInteger_subnn_6A57060(nx, ny) {\n if (BigNatModule_gte(nx, ny)) {\n return BigInteger_posn_Z67CCE57D(BigNatModule_sub(nx, ny));\n }\n else {\n return BigInteger_negn_Z67CCE57D(BigNatModule_sub(ny, nx));\n }\n}\n\nexport function BigInteger_addnn_6A57060(nx, ny) {\n return BigInteger_posn_Z67CCE57D(BigNatModule_add(nx, ny));\n}\n\nexport function BigInteger__get_IsZero(x) {\n if (BigInteger__get_SignInt(x) === 0) {\n return true;\n }\n else {\n return BigNatModule_isZero(BigInteger__get_V(x));\n }\n}\n\nexport function BigInteger__get_IsOne(x) {\n if (BigInteger__get_SignInt(x) === 1) {\n return BigNatModule_isOne(BigInteger__get_V(x));\n }\n else {\n return false;\n }\n}\n\nexport function BigInteger_op_Addition_56F059C0(x, y) {\n if (BigInteger__get_IsZero(y)) {\n return x;\n }\n else if (BigInteger__get_IsZero(x)) {\n return y;\n }\n else {\n const matchValue = [BigInteger__get_SignInt(x), BigInteger__get_SignInt(y)];\n let pattern_matching_result;\n if (matchValue[0] === -1) {\n if (matchValue[1] === -1) {\n pattern_matching_result = 1;\n }\n else if (matchValue[1] === 1) {\n pattern_matching_result = 3;\n }\n else {\n pattern_matching_result = 4;\n }\n }\n else if (matchValue[0] === 1) {\n if (matchValue[1] === -1) {\n pattern_matching_result = 2;\n }\n else if (matchValue[1] === 1) {\n pattern_matching_result = 0;\n }\n else {\n pattern_matching_result = 4;\n }\n }\n else {\n pattern_matching_result = 4;\n }\n switch (pattern_matching_result) {\n case 0: {\n return BigInteger_addnn_6A57060(BigInteger__get_V(x), BigInteger__get_V(y));\n }\n case 1: {\n return BigInteger_op_UnaryNegation_Z665282C2(BigInteger_addnn_6A57060(BigInteger__get_V(x), BigInteger__get_V(y)));\n }\n case 2: {\n return BigInteger_subnn_6A57060(BigInteger__get_V(x), BigInteger__get_V(y));\n }\n case 3: {\n return BigInteger_subnn_6A57060(BigInteger__get_V(y), BigInteger__get_V(x));\n }\n case 4: {\n throw (new Error(\"signs should be +/- 1\\\\nParameter name: x\"));\n }\n }\n }\n}\n\nexport function BigInteger_op_Subtraction_56F059C0(x, y) {\n if (BigInteger__get_IsZero(y)) {\n return x;\n }\n else if (BigInteger__get_IsZero(x)) {\n return BigInteger_op_UnaryNegation_Z665282C2(y);\n }\n else {\n const matchValue = [BigInteger__get_SignInt(x), BigInteger__get_SignInt(y)];\n let pattern_matching_result;\n if (matchValue[0] === -1) {\n if (matchValue[1] === -1) {\n pattern_matching_result = 1;\n }\n else if (matchValue[1] === 1) {\n pattern_matching_result = 3;\n }\n else {\n pattern_matching_result = 4;\n }\n }\n else if (matchValue[0] === 1) {\n if (matchValue[1] === -1) {\n pattern_matching_result = 2;\n }\n else if (matchValue[1] === 1) {\n pattern_matching_result = 0;\n }\n else {\n pattern_matching_result = 4;\n }\n }\n else {\n pattern_matching_result = 4;\n }\n switch (pattern_matching_result) {\n case 0: {\n return BigInteger_subnn_6A57060(BigInteger__get_V(x), BigInteger__get_V(y));\n }\n case 1: {\n return BigInteger_subnn_6A57060(BigInteger__get_V(y), BigInteger__get_V(x));\n }\n case 2: {\n return BigInteger_addnn_6A57060(BigInteger__get_V(x), BigInteger__get_V(y));\n }\n case 3: {\n return BigInteger_op_UnaryNegation_Z665282C2(BigInteger_addnn_6A57060(BigInteger__get_V(x), BigInteger__get_V(y)));\n }\n case 4: {\n throw (new Error(\"signs should be +/- 1\\\\nParameter name: x\"));\n }\n }\n }\n}\n\nexport function BigInteger_op_Multiply_56F059C0(x, y) {\n if (BigInteger__get_IsZero(x)) {\n return x;\n }\n else if (BigInteger__get_IsZero(y)) {\n return y;\n }\n else if (BigInteger__get_IsOne(x)) {\n return y;\n }\n else if (BigInteger__get_IsOne(y)) {\n return x;\n }\n else {\n const m = BigNatModule_mul(BigInteger__get_V(x), BigInteger__get_V(y));\n return BigInteger_create_Z2BE94A1(BigInteger__get_SignInt(x) * BigInteger__get_SignInt(y), m);\n }\n}\n\nexport function BigInteger_DivRem_56F059C0(x, y) {\n if (BigInteger__get_IsZero(y)) {\n throw (new Error());\n }\n if (BigInteger__get_IsZero(x)) {\n return [BigInteger_get_Zero(), BigInteger_get_Zero()];\n }\n else {\n const patternInput = BigNatModule_divmod(BigInteger__get_V(x), BigInteger__get_V(y));\n const r = patternInput[1];\n const d = patternInput[0];\n const matchValue = [BigInteger__get_SignInt(x), BigInteger__get_SignInt(y)];\n let pattern_matching_result;\n if (matchValue[0] === -1) {\n if (matchValue[1] === -1) {\n pattern_matching_result = 1;\n }\n else if (matchValue[1] === 1) {\n pattern_matching_result = 3;\n }\n else {\n pattern_matching_result = 4;\n }\n }\n else if (matchValue[0] === 1) {\n if (matchValue[1] === -1) {\n pattern_matching_result = 2;\n }\n else if (matchValue[1] === 1) {\n pattern_matching_result = 0;\n }\n else {\n pattern_matching_result = 4;\n }\n }\n else {\n pattern_matching_result = 4;\n }\n switch (pattern_matching_result) {\n case 0: {\n return [BigInteger_posn_Z67CCE57D(d), BigInteger_posn_Z67CCE57D(r)];\n }\n case 1: {\n return [BigInteger_posn_Z67CCE57D(d), BigInteger_negn_Z67CCE57D(r)];\n }\n case 2: {\n return [BigInteger_negn_Z67CCE57D(d), BigInteger_posn_Z67CCE57D(r)];\n }\n case 3: {\n return [BigInteger_negn_Z67CCE57D(d), BigInteger_negn_Z67CCE57D(r)];\n }\n case 4: {\n throw (new Error(\"signs should be +/- 1\\\\nParameter name: x\"));\n }\n }\n }\n}\n\nexport function BigInteger_op_Division_56F059C0(x, y) {\n return BigInteger_DivRem_56F059C0(x, y)[0];\n}\n\nexport function BigInteger_op_Modulus_56F059C0(x, y) {\n return BigInteger_DivRem_56F059C0(x, y)[1];\n}\n\nexport function BigInteger_op_RightShift_62E082A2(x, y) {\n return BigInteger_op_Division_56F059C0(x, BigInteger_Pow_62E082A2(BigInteger_get_Two(), y));\n}\n\nexport function BigInteger_op_LeftShift_62E082A2(x, y) {\n return BigInteger_op_Multiply_56F059C0(x, BigInteger_Pow_62E082A2(BigInteger_get_Two(), y));\n}\n\nexport function BigInteger_op_BitwiseAnd_56F059C0(x, y) {\n return BigInteger_posn_Z67CCE57D(BigNatModule_bitAnd(BigInteger__get_V(x), BigInteger__get_V(y)));\n}\n\nexport function BigInteger_op_BitwiseOr_56F059C0(x, y) {\n return BigInteger_posn_Z67CCE57D(BigNatModule_bitOr(BigInteger__get_V(x), BigInteger__get_V(y)));\n}\n\nexport function BigInteger_op_ExclusiveOr_56F059C0(x, y) {\n return BigInteger_posn_Z67CCE57D(BigNatModule_bitXor(BigInteger__get_V(x), BigInteger__get_V(y)));\n}\n\nexport function BigInteger_GreatestCommonDivisor_56F059C0(x, y) {\n const matchValue = [BigInteger__get_SignInt(x), BigInteger__get_SignInt(y)];\n if (matchValue[0] === 0) {\n if (matchValue[1] === 0) {\n return BigInteger_get_Zero();\n }\n else {\n return BigInteger_posn_Z67CCE57D(BigInteger__get_V(y));\n }\n }\n else if (matchValue[1] === 0) {\n return BigInteger_posn_Z67CCE57D(BigInteger__get_V(x));\n }\n else {\n return BigInteger_posn_Z67CCE57D(BigNatModule_hcf(BigInteger__get_V(x), BigInteger__get_V(y)));\n }\n}\n\nexport function BigInteger__get_IsNegative(x) {\n if (BigInteger__get_SignInt(x) === -1) {\n return !BigInteger__get_IsZero(x);\n }\n else {\n return false;\n }\n}\n\nexport function BigInteger__get_IsPositive(x) {\n if (BigInteger__get_SignInt(x) === 1) {\n return !BigInteger__get_IsZero(x);\n }\n else {\n return false;\n }\n}\n\nexport function BigInteger_Abs_Z665282C2(x) {\n if (BigInteger__get_SignInt(x) === -1) {\n return BigInteger_op_UnaryNegation_Z665282C2(x);\n }\n else {\n return x;\n }\n}\n\nexport function BigInteger_op_LessThanOrEqual_56F059C0(x, y) {\n const matchValue = [BigInteger__get_SignInt(x), BigInteger__get_SignInt(y)];\n let pattern_matching_result;\n if (matchValue[0] === -1) {\n if (matchValue[1] === -1) {\n pattern_matching_result = 1;\n }\n else if (matchValue[1] === 0) {\n pattern_matching_result = 6;\n }\n else if (matchValue[1] === 1) {\n pattern_matching_result = 3;\n }\n else {\n pattern_matching_result = 9;\n }\n }\n else if (matchValue[0] === 0) {\n if (matchValue[1] === -1) {\n pattern_matching_result = 8;\n }\n else if (matchValue[1] === 0) {\n pattern_matching_result = 4;\n }\n else if (matchValue[1] === 1) {\n pattern_matching_result = 7;\n }\n else {\n pattern_matching_result = 9;\n }\n }\n else if (matchValue[0] === 1) {\n if (matchValue[1] === -1) {\n pattern_matching_result = 2;\n }\n else if (matchValue[1] === 0) {\n pattern_matching_result = 5;\n }\n else if (matchValue[1] === 1) {\n pattern_matching_result = 0;\n }\n else {\n pattern_matching_result = 9;\n }\n }\n else {\n pattern_matching_result = 9;\n }\n switch (pattern_matching_result) {\n case 0: {\n return BigNatModule_lte(BigInteger__get_V(x), BigInteger__get_V(y));\n }\n case 1: {\n return BigNatModule_lte(BigInteger__get_V(y), BigInteger__get_V(x));\n }\n case 2: {\n if (BigNatModule_isZero(BigInteger__get_V(x))) {\n return BigNatModule_isZero(BigInteger__get_V(y));\n }\n else {\n return false;\n }\n }\n case 3: {\n return true;\n }\n case 4: {\n return true;\n }\n case 5: {\n return BigNatModule_isZero(BigInteger__get_V(x));\n }\n case 6: {\n return true;\n }\n case 7: {\n return true;\n }\n case 8: {\n return BigNatModule_isZero(BigInteger__get_V(y));\n }\n case 9: {\n throw (new Error(\"signs should be +/- 1 or 0\\\\nParameter name: x\"));\n }\n }\n}\n\nexport function BigInteger_op_GreaterThanOrEqual_56F059C0(x, y) {\n const matchValue = [BigInteger__get_SignInt(x), BigInteger__get_SignInt(y)];\n let pattern_matching_result;\n if (matchValue[0] === -1) {\n if (matchValue[1] === -1) {\n pattern_matching_result = 1;\n }\n else if (matchValue[1] === 0) {\n pattern_matching_result = 6;\n }\n else if (matchValue[1] === 1) {\n pattern_matching_result = 3;\n }\n else {\n pattern_matching_result = 9;\n }\n }\n else if (matchValue[0] === 0) {\n if (matchValue[1] === -1) {\n pattern_matching_result = 8;\n }\n else if (matchValue[1] === 0) {\n pattern_matching_result = 4;\n }\n else if (matchValue[1] === 1) {\n pattern_matching_result = 7;\n }\n else {\n pattern_matching_result = 9;\n }\n }\n else if (matchValue[0] === 1) {\n if (matchValue[1] === -1) {\n pattern_matching_result = 2;\n }\n else if (matchValue[1] === 0) {\n pattern_matching_result = 5;\n }\n else if (matchValue[1] === 1) {\n pattern_matching_result = 0;\n }\n else {\n pattern_matching_result = 9;\n }\n }\n else {\n pattern_matching_result = 9;\n }\n switch (pattern_matching_result) {\n case 0: {\n return BigNatModule_gte(BigInteger__get_V(x), BigInteger__get_V(y));\n }\n case 1: {\n return BigNatModule_gte(BigInteger__get_V(y), BigInteger__get_V(x));\n }\n case 2: {\n return true;\n }\n case 3: {\n if (BigNatModule_isZero(BigInteger__get_V(x))) {\n return BigNatModule_isZero(BigInteger__get_V(y));\n }\n else {\n return false;\n }\n }\n case 4: {\n return true;\n }\n case 5: {\n return true;\n }\n case 6: {\n return BigNatModule_isZero(BigInteger__get_V(x));\n }\n case 7: {\n return BigNatModule_isZero(BigInteger__get_V(y));\n }\n case 8: {\n return true;\n }\n case 9: {\n throw (new Error(\"signs should be +/- 1 or 0\\\\nParameter name: x\"));\n }\n }\n}\n\nexport function BigInteger_Pow_62E082A2(x, y) {\n if (y < 0) {\n throw (new Error(\"y\"));\n }\n const matchValue = [BigInteger__get_IsZero(x), y];\n if (matchValue[0]) {\n if (matchValue[1] === 0) {\n return BigInteger_get_One();\n }\n else {\n return BigInteger_get_Zero();\n }\n }\n else {\n const yval = BigInteger_$ctor_Z524259A4(y);\n return BigInteger_create_Z2BE94A1(BigNatModule_isZero(BigNatModule_rem(BigInteger__get_V(yval), BigNatModule_two)) ? 1 : BigInteger__get_SignInt(x), BigNatModule_pow(BigInteger__get_V(x), BigInteger__get_V(yval)));\n }\n}\n\nexport function BigInteger__get_ToInt32(x) {\n if (BigInteger__get_IsZero(x)) {\n return 0;\n }\n else {\n const u = BigNatModule_toUInt32(BigInteger__get_V(x));\n if (u <= (2147483647 >>> 0)) {\n return (BigInteger__get_SignInt(x) * (~(~u))) | 0;\n }\n else if ((BigInteger__get_SignInt(x) === -1) ? (u === ((2147483647 + 1) >>> 0)) : false) {\n return -2147483648;\n }\n else {\n throw (new Error());\n }\n }\n}\n\nexport function BigInteger__get_ToUInt32(x) {\n if (BigInteger__get_IsZero(x)) {\n return 0;\n }\n else {\n return BigNatModule_toUInt32(BigInteger__get_V(x));\n }\n}\n\nexport function BigInteger__get_ToInt64(x) {\n if (BigInteger__get_IsZero(x)) {\n return fromBits(0, 0, false);\n }\n else {\n const u = BigNatModule_toUInt64(BigInteger__get_V(x));\n if (compare(u, fromValue(fromBits(4294967295, 2147483647, false), true)) <= 0) {\n return op_Multiply(fromInteger(BigInteger__get_SignInt(x), false, 2), fromValue(u, false));\n }\n else if ((BigInteger__get_SignInt(x) === -1) ? equals(u, fromValue(op_Addition(fromBits(4294967295, 2147483647, false), fromBits(1, 0, false)), true)) : false) {\n return fromBits(0, 2147483648, false);\n }\n else {\n throw (new Error());\n }\n }\n}\n\nexport function BigInteger__get_ToUInt64(x) {\n if (BigInteger__get_IsZero(x)) {\n return fromBits(0, 0, true);\n }\n else {\n return BigNatModule_toUInt64(BigInteger__get_V(x));\n }\n}\n\nexport function BigInteger__get_ToDouble(x) {\n const matchValue = BigInteger__get_SignInt(x) | 0;\n switch (matchValue) {\n case -1: {\n return -BigNatModule_toFloat(BigInteger__get_V(x));\n }\n case 0: {\n return 0;\n }\n case 1: {\n return BigNatModule_toFloat(BigInteger__get_V(x));\n }\n default: {\n throw (new Error(\"signs should be +/- 1 or 0\\\\nParameter name: x\"));\n }\n }\n}\n\nexport function BigInteger__get_ToSByte(x) {\n return (BigInteger__get_ToInt32(x) + 0x80 & 0xFF) - 0x80;\n}\n\nexport function BigInteger__get_ToByte(x) {\n return BigInteger__get_ToUInt32(x) & 0xFF;\n}\n\nexport function BigInteger__get_ToInt16(x) {\n return (BigInteger__get_ToInt32(x) + 0x8000 & 0xFFFF) - 0x8000;\n}\n\nexport function BigInteger__get_ToUInt16(x) {\n return BigInteger__get_ToUInt32(x) & 0xFFFF;\n}\n\nexport function BigInteger__get_ToSingle(x) {\n return BigInteger__get_ToDouble(x);\n}\n\nexport function BigInteger__get_ToDecimal(x) {\n return new Decimal(BigInteger__get_ToDouble(x));\n}\n\nexport function BigInteger_Parse_Z721C83C5(text) {\n if (text == null) {\n throw (new Error(\"text\"));\n }\n const text_1 = text.trim();\n const len = text_1.length | 0;\n if (len === 0) {\n throw (new Error());\n }\n const matchValue = [text_1[0], len];\n if (matchValue[0] === \"+\") {\n if (matchValue[1] === 1) {\n throw (new Error());\n }\n else {\n return BigInteger_posn_Z67CCE57D(BigNatModule_ofString(text_1.slice(1, (len - 1) + 1)));\n }\n }\n else if (matchValue[0] === \"-\") {\n if (matchValue[1] === 1) {\n throw (new Error());\n }\n else {\n return BigInteger_negn_Z67CCE57D(BigNatModule_ofString(text_1.slice(1, (len - 1) + 1)));\n }\n }\n else {\n return BigInteger_posn_Z67CCE57D(BigNatModule_ofString(text_1));\n }\n}\n\nexport function BigInteger__get_IsSmall(x) {\n if (BigInteger__get_IsZero(x)) {\n return true;\n }\n else {\n return BigNatModule_isSmall(BigInteger__get_V(x));\n }\n}\n\nexport function BigInteger_Factorial_Z665282C2(x) {\n if (BigInteger__get_IsNegative(x)) {\n throw (new Error(\"mustBeNonNegative\\\\nParameter name: x\"));\n }\n if (BigInteger__get_IsPositive(x)) {\n return BigInteger_posn_Z67CCE57D(BigNatModule_factorial(BigInteger__get_V(x)));\n }\n else {\n return BigInteger_get_One();\n }\n}\n\nexport function BigInteger_op_UnaryPlus_Z665282C2(n1) {\n return n1;\n}\n\nexport function BigInteger_FromInt64_Z524259C1(x) {\n return BigInteger_$ctor_Z524259C1(x);\n}\n\nexport function BigInteger_FromInt32_Z524259A4(x) {\n return BigInteger_$ctor_Z524259A4(x);\n}\n\n","import { BigInteger_op_Inequality_56F059C0, BigInteger_op_Equality_56F059C0, BigInteger_op_GreaterThanOrEqual_56F059C0, BigInteger_op_GreaterThan_56F059C0, BigInteger_op_LessThanOrEqual_56F059C0, BigInteger_op_LessThan_56F059C0, BigInteger_op_ExclusiveOr_56F059C0, BigInteger_op_BitwiseOr_56F059C0, BigInteger_op_BitwiseAnd_56F059C0, BigInteger_op_LeftShift_62E082A2, BigInteger_op_RightShift_62E082A2, BigInteger_op_UnaryPlus_Z665282C2, BigInteger_op_UnaryNegation_Z665282C2, BigInteger_op_Modulus_56F059C0, BigInteger_op_Division_56F059C0, BigInteger_op_Multiply_56F059C0, BigInteger_op_Subtraction_56F059C0, BigInteger_op_Addition_56F059C0, BigInteger__get_IsOne, BigInteger__get_IsZero, BigInteger__get_Sign, BigInteger__get_ToDecimal, BigInteger__get_ToDouble, BigInteger__get_ToSingle, BigInteger__get_ToUInt64, BigInteger__get_ToInt64, BigInteger__get_ToUInt32, BigInteger__get_ToInt32, BigInteger__get_ToUInt16, BigInteger__get_ToInt16, BigInteger__get_ToByte, BigInteger__get_ToSByte, BigInteger_$ctor_Z524259A4, BigInteger_$ctor_Z524259C1, BigInteger_get_Two, BigInteger_get_One, BigInteger_get_Zero, BigInteger_Abs_Z665282C2, BigInteger_Pow_62E082A2, BigInteger_GreatestCommonDivisor_56F059C0, BigInteger_DivRem_56F059C0, BigInteger_Parse_Z721C83C5, BigInteger } from \"./BigInt/z.js\";\nimport { fromInteger } from \"./Long.js\";\nimport { comparePrimitives, min, compare as compare_1, equals as equals_1, safeHash } from \"./Util.js\";\nimport { toString as toString_1 } from \"./Types.js\";\nimport { fold, empty, ofArrayWithTail, cons, toArray, head, skipWhile } from \"./List.js\";\nimport { fill, reverse } from \"./Array.js\";\n\nexport function isBigInt(x) {\n return x instanceof BigInteger;\n}\n\nexport function tryParse(str, res) {\n try {\n res.contents = BigInteger_Parse_Z721C83C5(str);\n return true;\n }\n catch (matchValue) {\n return false;\n }\n}\n\nexport function divRem(x, y, remainder) {\n const patternInput = BigInteger_DivRem_56F059C0(x, y);\n remainder.contents = patternInput[1];\n return patternInput[0];\n}\n\nexport function parse(arg00) {\n return BigInteger_Parse_Z721C83C5(arg00);\n}\n\nexport function greatestCommonDivisor(arg00, arg01) {\n return BigInteger_GreatestCommonDivisor_56F059C0(arg00, arg01);\n}\n\nexport function pow(arg00, arg01) {\n return BigInteger_Pow_62E082A2(arg00, arg01);\n}\n\nexport function abs(arg00) {\n return BigInteger_Abs_Z665282C2(arg00);\n}\n\nexport const zero = BigInteger_get_Zero();\n\nexport const one = BigInteger_get_One();\n\nexport const two = BigInteger_get_Two();\n\nexport function fromString(s) {\n return BigInteger_Parse_Z721C83C5(s);\n}\n\nexport function fromZero() {\n return BigInteger_get_Zero();\n}\n\nexport function fromOne() {\n return BigInteger_get_One();\n}\n\nexport function fromInt64(i) {\n return BigInteger_$ctor_Z524259C1(i);\n}\n\nexport function fromInt32(i) {\n if (i > 2147483647) {\n return BigInteger_$ctor_Z524259C1(fromInteger(i, false, 6));\n }\n else {\n return BigInteger_$ctor_Z524259A4(i);\n }\n}\n\nexport function toSByte(x) {\n return BigInteger__get_ToSByte(x);\n}\n\nexport function toByte(x) {\n return BigInteger__get_ToByte(x);\n}\n\nexport function toInt16(x) {\n return BigInteger__get_ToInt16(x);\n}\n\nexport function toUInt16(x) {\n return BigInteger__get_ToUInt16(x);\n}\n\nexport function toInt32(x) {\n return BigInteger__get_ToInt32(x);\n}\n\nexport function toUInt32(x) {\n return BigInteger__get_ToUInt32(x);\n}\n\nexport function toInt64(x) {\n return BigInteger__get_ToInt64(x);\n}\n\nexport function toUInt64(x) {\n return BigInteger__get_ToUInt64(x);\n}\n\nexport function toSingle(x) {\n return BigInteger__get_ToSingle(x);\n}\n\nexport function toDouble(x) {\n return BigInteger__get_ToDouble(x);\n}\n\nexport function toDecimal(x) {\n return BigInteger__get_ToDecimal(x);\n}\n\nexport function sign(x) {\n return BigInteger__get_Sign(x);\n}\n\nexport function isZero(x) {\n return BigInteger__get_IsZero(x);\n}\n\nexport function isOne(x) {\n return BigInteger__get_IsOne(x);\n}\n\nexport function hash(x) {\n return safeHash(x);\n}\n\nexport function compare(x, y) {\n return x.CompareTo(y);\n}\n\nexport function equals(x, y) {\n return equals_1(x, y);\n}\n\nexport function toString(x) {\n return toString_1(x);\n}\n\nexport const get_Zero = BigInteger_get_Zero();\n\nexport const get_One = BigInteger_get_One();\n\nexport function op_Addition(arg00, arg01) {\n return BigInteger_op_Addition_56F059C0(arg00, arg01);\n}\n\nexport function op_Subtraction(arg00, arg01) {\n return BigInteger_op_Subtraction_56F059C0(arg00, arg01);\n}\n\nexport function op_Multiply(arg00, arg01) {\n return BigInteger_op_Multiply_56F059C0(arg00, arg01);\n}\n\nexport function op_Division(arg00, arg01) {\n return BigInteger_op_Division_56F059C0(arg00, arg01);\n}\n\nexport function op_Modulus(arg00, arg01) {\n return BigInteger_op_Modulus_56F059C0(arg00, arg01);\n}\n\nexport function op_UnaryNegation(arg00) {\n return BigInteger_op_UnaryNegation_Z665282C2(arg00);\n}\n\nexport function op_UnaryPlus(arg00) {\n return BigInteger_op_UnaryPlus_Z665282C2(arg00);\n}\n\nexport function op_RightShift(arg00, arg01) {\n return BigInteger_op_RightShift_62E082A2(arg00, arg01);\n}\n\nexport function op_LeftShift(arg00, arg01) {\n return BigInteger_op_LeftShift_62E082A2(arg00, arg01);\n}\n\nexport function op_BitwiseAnd(arg00, arg01) {\n return BigInteger_op_BitwiseAnd_56F059C0(arg00, arg01);\n}\n\nexport function op_BitwiseOr(arg00, arg01) {\n return BigInteger_op_BitwiseOr_56F059C0(arg00, arg01);\n}\n\nexport function op_ExclusiveOr(arg00, arg01) {\n return BigInteger_op_ExclusiveOr_56F059C0(arg00, arg01);\n}\n\nexport function op_LessThan(arg00, arg01) {\n return BigInteger_op_LessThan_56F059C0(arg00, arg01);\n}\n\nexport function op_LessThanOrEqual(arg00, arg01) {\n return BigInteger_op_LessThanOrEqual_56F059C0(arg00, arg01);\n}\n\nexport function op_GreaterThan(arg00, arg01) {\n return BigInteger_op_GreaterThan_56F059C0(arg00, arg01);\n}\n\nexport function op_GreaterThanOrEqual(arg00, arg01) {\n return BigInteger_op_GreaterThanOrEqual_56F059C0(arg00, arg01);\n}\n\nexport function op_Equality(arg00, arg01) {\n return BigInteger_op_Equality_56F059C0(arg00, arg01);\n}\n\nexport function op_Inequality(arg00, arg01) {\n return BigInteger_op_Inequality_56F059C0(arg00, arg01);\n}\n\nfunction flipTwosComplement(currByte, lowBitFound) {\n const matchValue = [currByte, lowBitFound];\n if (matchValue[1]) {\n return [(currByte ^ 255) & 255, true];\n }\n else if (matchValue[0] === 0) {\n return [0, false];\n }\n else {\n return [(currByte ^ (254 << (new Int32Array([0, 1, 2, 3, 4, 5, 6, 7])).find((i) => ((currByte & (1 << i)) > 0)))) & 255, true];\n }\n}\n\nexport function toByteArray(value) {\n if (equals_1(value, zero)) {\n return new Uint8Array([0]);\n }\n else {\n const isPositive = compare_1(value, zero) > 0;\n const value_1 = isPositive ? value : BigInteger_op_Multiply_56F059C0(BigInteger_$ctor_Z524259A4(-1), value);\n const mask32 = fromInt64(fromInteger(4294967295, false, 6));\n const loop = (accumBytes_mut, consumeValue_mut, lowBitFound_mut) => {\n let value_6, value_8, value_9, value_10;\n loop:\n while (true) {\n const accumBytes = accumBytes_mut, consumeValue = consumeValue_mut, lowBitFound = lowBitFound_mut;\n if (compare_1(consumeValue, zero) <= 0) {\n const accumBytes_1 = isPositive ? skipWhile((b) => (b === 0), accumBytes) : skipWhile((b_1) => (b_1 === 255), accumBytes);\n const isHighBitOne = (head(accumBytes_1) & 128) !== 0;\n return reverse(toArray((isPositive ? isHighBitOne : false) ? cons(0, accumBytes_1) : (((!isPositive) ? (!isHighBitOne) : false) ? cons(255, accumBytes_1) : accumBytes_1)));\n }\n else {\n const currValue = toUInt32(BigInteger_op_BitwiseAnd_56F059C0(consumeValue, mask32));\n if (isPositive) {\n const b0 = currValue & 0xFF;\n let b1;\n const value_4 = currValue >>> 8;\n b1 = (value_4 & 0xFF);\n let b2;\n const value_5 = currValue >>> 16;\n b2 = (value_5 & 0xFF);\n accumBytes_mut = ofArrayWithTail([(value_6 = (currValue >>> 24), value_6 & 0xFF), b2, b1, b0], accumBytes);\n consumeValue_mut = BigInteger_op_RightShift_62E082A2(consumeValue, 32);\n lowBitFound_mut = false;\n continue loop;\n }\n else {\n const patternInput = flipTwosComplement(currValue & 0xFF, lowBitFound);\n const patternInput_1 = flipTwosComplement((value_8 = (currValue >>> 8), value_8 & 0xFF), patternInput[1]);\n const patternInput_2 = flipTwosComplement((value_9 = (currValue >>> 16), value_9 & 0xFF), patternInput_1[1]);\n const patternInput_3 = flipTwosComplement((value_10 = (currValue >>> 24), value_10 & 0xFF), patternInput_2[1]);\n accumBytes_mut = ofArrayWithTail([patternInput_3[0], patternInput_2[0], patternInput_1[0], patternInput[0]], accumBytes);\n consumeValue_mut = BigInteger_op_RightShift_62E082A2(consumeValue, 32);\n lowBitFound_mut = patternInput_3[1];\n continue loop;\n }\n }\n break;\n }\n };\n return loop(empty(), value_1, false);\n }\n}\n\nexport function fromByteArray(bytes) {\n if (bytes == null) {\n throw (new Error(\"bytes\"));\n }\n if (bytes.length === 0) {\n return zero;\n }\n else {\n const isPositive = (bytes[bytes.length - 1] & 128) === 0;\n const buffer = fill(new Uint8Array(4), 0, 4, 0);\n const loop = (accumUInt32_mut, currIndex_mut, bytesRemaining_mut, lowBitFound_mut) => {\n loop:\n while (true) {\n const accumUInt32 = accumUInt32_mut, currIndex = currIndex_mut, bytesRemaining = bytesRemaining_mut, lowBitFound = lowBitFound_mut;\n if (bytesRemaining === 0) {\n const value_2 = fold((acc, value) => BigInteger_op_Addition_56F059C0(BigInteger_op_LeftShift_62E082A2(acc, 32), fromInt64(fromInteger(value, false, 6))), zero, accumUInt32);\n if (isPositive) {\n return value_2;\n }\n else {\n return BigInteger_op_Multiply_56F059C0(BigInteger_$ctor_Z524259A4(-1), value_2);\n }\n }\n else {\n const bytesToProcess = min((x, y) => comparePrimitives(x, y), bytesRemaining, 4) | 0;\n for (let i_1 = 0; i_1 <= (bytesToProcess - 1); i_1++) {\n buffer[i_1] = bytes[currIndex + i_1];\n }\n if (isPositive) {\n fill(buffer, bytesToProcess, 4 - bytesToProcess, 0);\n accumUInt32_mut = cons((((((buffer[0] | ((buffer[1] << 8) >>> 0)) >>> 0) | ((buffer[2] << 16) >>> 0)) >>> 0) | ((buffer[3] << 24) >>> 0)) >>> 0, accumUInt32);\n currIndex_mut = (currIndex + bytesToProcess);\n bytesRemaining_mut = (bytesRemaining - bytesToProcess);\n lowBitFound_mut = false;\n continue loop;\n }\n else {\n fill(buffer, bytesToProcess, 4 - bytesToProcess, 255);\n const patternInput = flipTwosComplement(buffer[0], lowBitFound);\n const patternInput_1 = flipTwosComplement(buffer[1], patternInput[1]);\n const patternInput_2 = flipTwosComplement(buffer[2], patternInput_1[1]);\n const patternInput_3 = flipTwosComplement(buffer[3], patternInput_2[1]);\n accumUInt32_mut = cons((((((patternInput[0] | ((patternInput_1[0] << 8) >>> 0)) >>> 0) | ((patternInput_2[0] << 16) >>> 0)) >>> 0) | ((patternInput_3[0] << 24) >>> 0)) >>> 0, accumUInt32);\n currIndex_mut = (currIndex + bytesToProcess);\n bytesRemaining_mut = (bytesRemaining - bytesToProcess);\n lowBitFound_mut = patternInput_3[1];\n continue loop;\n }\n }\n break;\n }\n };\n return loop(empty(), 0, bytes.length, false);\n }\n}\n\n","/**\n * DateTimeOffset functions.\n *\n * Note: DateOffset instances are always DateObjects in local\n * timezone (because JS dates are all kinds of messed up).\n * A local date returns UTC epoc when `.getTime()` is called.\n *\n * However, this means that in order to construct an UTC date\n * from a DateOffset with offset of +5 hours, you first need\n * to subtract those 5 hours, than add the \"local\" offset.\n * As said, all kinds of messed up.\n *\n * Basically; invariant: date.getTime() always return UTC time.\n */\nimport { create as createDate, dateOffsetToString, daysInMonth, offsetRegex, parseRaw } from \"./Date.js\";\nimport { fromValue, ticksToUnixEpochMilliseconds, unixEpochMillisecondsToTicks } from \"./Long.js\";\nimport { compareDates, padWithZeros } from \"./Util.js\";\nexport default function DateTimeOffset(value, offset) {\n checkOffsetInRange(offset);\n const d = new Date(value);\n d.offset = offset != null ? offset : new Date().getTimezoneOffset() * -60000;\n return d;\n}\nfunction checkOffsetInRange(offset) {\n if (offset != null && offset !== 0) {\n if (offset % 60000 !== 0) {\n throw new Error(\"Offset must be specified in whole minutes.\");\n }\n if (Math.abs(offset / 3600000) > 14) {\n throw new Error(\"Offset must be within plus or minus 14 hours.\");\n }\n }\n}\nexport function fromDate(date, offset) {\n let offset2 = 0;\n switch (date.kind) {\n case 1 /* UTC */:\n if (offset != null && offset !== 0) {\n throw new Error(\"The UTC Offset for Utc DateTime instances must be 0.\");\n }\n offset2 = 0;\n break;\n case 2 /* Local */:\n offset2 = date.getTimezoneOffset() * -60000;\n if (offset != null && offset !== offset2) {\n throw new Error(\"The UTC Offset of the local dateTime parameter does not match the offset argument.\");\n }\n break;\n case 0 /* Unspecified */:\n default:\n if (offset == null) {\n offset2 = date.getTimezoneOffset() * -60000;\n }\n else {\n offset2 = offset;\n }\n break;\n }\n return DateTimeOffset(date.getTime(), offset2);\n}\nexport function fromTicks(ticks, offset) {\n ticks = fromValue(ticks);\n const epoc = ticksToUnixEpochMilliseconds(ticks) - offset;\n return DateTimeOffset(epoc, offset);\n}\nexport function getUtcTicks(date) {\n return unixEpochMillisecondsToTicks(date.getTime(), 0);\n}\nexport function minValue() {\n // This is \"0001-01-01T00:00:00.000Z\", actual JS min value is -8640000000000000\n return DateTimeOffset(-62135596800000, 0);\n}\nexport function maxValue() {\n // This is \"9999-12-31T23:59:59.999Z\", actual JS max value is 8640000000000000\n return DateTimeOffset(253402300799999, 0);\n}\nexport function parse(str) {\n const date = parseRaw(str);\n const offsetMatch = offsetRegex.exec(str);\n const offset = offsetMatch == null\n ? date.getTimezoneOffset() * -60000\n : (offsetMatch[0] === \"Z\"\n ? 0\n : parseInt(offsetMatch[1], 10) * 3600000\n + parseInt(offsetMatch[2], 10) * 60000);\n return DateTimeOffset(date.getTime(), offset);\n}\nexport function tryParse(v, defValue) {\n try {\n defValue.contents = parse(v);\n return true;\n }\n catch (_err) {\n return false;\n }\n}\nexport function create(year, month, day, h, m, s, ms, offset) {\n if (offset == null) {\n offset = ms;\n ms = 0;\n }\n checkOffsetInRange(offset);\n let date;\n if (offset === 0) {\n date = new Date(Date.UTC(year, month - 1, day, h, m, s, ms));\n if (year <= 99) {\n date.setFullYear(year, month - 1, day);\n }\n }\n else {\n const str = padWithZeros(year, 4) + \"-\" +\n padWithZeros(month, 2) + \"-\" +\n padWithZeros(day, 2) + \"T\" +\n padWithZeros(h, 2) + \":\" +\n padWithZeros(m, 2) + \":\" +\n padWithZeros(s, 2) + \".\" +\n padWithZeros(ms, 3) +\n dateOffsetToString(offset);\n date = new Date(str);\n }\n const dateValue = date.getTime();\n if (isNaN(dateValue)) {\n throw new Error(\"The parameters describe an unrepresentable Date\");\n }\n return DateTimeOffset(dateValue, offset);\n}\nexport function now() {\n const date = new Date();\n const offset = date.getTimezoneOffset() * -60000;\n return DateTimeOffset(date.getTime(), offset);\n}\nexport function utcNow() {\n const date = now();\n return DateTimeOffset(date.getTime(), 0);\n}\nexport function toUniversalTime(date) {\n return DateTimeOffset(date.getTime(), 0);\n}\nexport function toLocalTime(date) {\n return DateTimeOffset(date.getTime(), date.getTimezoneOffset() * -60000);\n}\nexport function timeOfDay(d) {\n var _a;\n const d2 = new Date(d.getTime() + ((_a = d.offset) !== null && _a !== void 0 ? _a : 0));\n return d2.getUTCHours() * 3600000\n + d2.getUTCMinutes() * 60000\n + d2.getUTCSeconds() * 1000\n + d2.getUTCMilliseconds();\n}\nexport function date(d) {\n var _a;\n const d2 = new Date(d.getTime() + ((_a = d.offset) !== null && _a !== void 0 ? _a : 0));\n return createDate(d2.getUTCFullYear(), d2.getUTCMonth() + 1, d2.getUTCDate(), 0, 0, 0, 0);\n}\nexport function day(d) {\n var _a;\n return new Date(d.getTime() + ((_a = d.offset) !== null && _a !== void 0 ? _a : 0)).getUTCDate();\n}\nexport function hour(d) {\n var _a;\n return new Date(d.getTime() + ((_a = d.offset) !== null && _a !== void 0 ? _a : 0)).getUTCHours();\n}\nexport function millisecond(d) {\n var _a;\n return new Date(d.getTime() + ((_a = d.offset) !== null && _a !== void 0 ? _a : 0)).getUTCMilliseconds();\n}\nexport function minute(d) {\n var _a;\n return new Date(d.getTime() + ((_a = d.offset) !== null && _a !== void 0 ? _a : 0)).getUTCMinutes();\n}\nexport function month(d) {\n var _a;\n return new Date(d.getTime() + ((_a = d.offset) !== null && _a !== void 0 ? _a : 0)).getUTCMonth() + 1;\n}\nexport function second(d) {\n var _a;\n return new Date(d.getTime() + ((_a = d.offset) !== null && _a !== void 0 ? _a : 0)).getUTCSeconds();\n}\nexport function year(d) {\n var _a;\n return new Date(d.getTime() + ((_a = d.offset) !== null && _a !== void 0 ? _a : 0)).getUTCFullYear();\n}\nexport function dayOfWeek(d) {\n var _a;\n return new Date(d.getTime() + ((_a = d.offset) !== null && _a !== void 0 ? _a : 0)).getUTCDay();\n}\nexport function dayOfYear(d) {\n var _a;\n const d2 = new Date(d.getTime() + ((_a = d.offset) !== null && _a !== void 0 ? _a : 0));\n const _year = d2.getUTCFullYear();\n const _month = d2.getUTCMonth() + 1;\n let _day = d2.getUTCDate();\n for (let i = 1; i < _month; i++) {\n _day += daysInMonth(_year, i);\n }\n return _day;\n}\nexport function add(d, ts) {\n var _a;\n return DateTimeOffset(d.getTime() + ts, ((_a = d.offset) !== null && _a !== void 0 ? _a : 0));\n}\nexport function addDays(d, v) {\n var _a;\n return DateTimeOffset(d.getTime() + v * 86400000, ((_a = d.offset) !== null && _a !== void 0 ? _a : 0));\n}\nexport function addHours(d, v) {\n var _a;\n return DateTimeOffset(d.getTime() + v * 3600000, ((_a = d.offset) !== null && _a !== void 0 ? _a : 0));\n}\nexport function addMinutes(d, v) {\n var _a;\n return DateTimeOffset(d.getTime() + v * 60000, ((_a = d.offset) !== null && _a !== void 0 ? _a : 0));\n}\nexport function addSeconds(d, v) {\n var _a;\n return DateTimeOffset(d.getTime() + v * 1000, ((_a = d.offset) !== null && _a !== void 0 ? _a : 0));\n}\nexport function addMilliseconds(d, v) {\n var _a;\n return DateTimeOffset(d.getTime() + v, ((_a = d.offset) !== null && _a !== void 0 ? _a : 0));\n}\nexport function addYears(d, v) {\n var _a;\n const newMonth = d.getUTCMonth() + 1;\n const newYear = d.getUTCFullYear() + v;\n const _daysInMonth = daysInMonth(newYear, newMonth);\n const newDay = Math.min(_daysInMonth, d.getUTCDate());\n return create(newYear, newMonth, newDay, d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds(), ((_a = d.offset) !== null && _a !== void 0 ? _a : 0));\n}\nexport function addMonths(d, v) {\n var _a, _b;\n const d2 = new Date(d.getTime() + ((_a = d.offset) !== null && _a !== void 0 ? _a : 0));\n let newMonth = d2.getUTCMonth() + 1 + v;\n let newMonth_ = 0;\n let yearOffset = 0;\n if (newMonth > 12) {\n newMonth_ = newMonth % 12;\n yearOffset = Math.floor(newMonth / 12);\n newMonth = newMonth_;\n }\n else if (newMonth < 1) {\n newMonth_ = 12 + newMonth % 12;\n yearOffset = Math.floor(newMonth / 12) + (newMonth_ === 12 ? -1 : 0);\n newMonth = newMonth_;\n }\n const newYear = d2.getUTCFullYear() + yearOffset;\n const _daysInMonth = daysInMonth(newYear, newMonth);\n const newDay = Math.min(_daysInMonth, d2.getUTCDate());\n return create(newYear, newMonth, newDay, d2.getUTCHours(), d2.getUTCMinutes(), d2.getUTCSeconds(), d2.getUTCMilliseconds(), ((_b = d.offset) !== null && _b !== void 0 ? _b : 0));\n}\nexport function subtract(d, that) {\n var _a;\n return typeof that === \"number\"\n ? DateTimeOffset(d.getTime() - that, ((_a = d.offset) !== null && _a !== void 0 ? _a : 0))\n : d.getTime() - that.getTime();\n}\nexport function equals(d1, d2) {\n return d1.getTime() === d2.getTime();\n}\nexport function equalsExact(d1, d2) {\n return d1.getTime() === d2.getTime() && d1.offset === d2.offset;\n}\nexport function compare(d1, d2) {\n return compareDates(d1, d2);\n}\nexport const compareTo = compare;\nexport function op_Addition(x, y) {\n return add(x, y);\n}\nexport function op_Subtraction(x, y) {\n return subtract(x, y);\n}\nexport function toOffset(d, offset) {\n return DateTimeOffset(d.getTime(), offset);\n}\n","// tslint:disable:max-line-length\nimport { fromNumber, op_Division, op_Multiply, toNumber } from \"./Long.js\";\nimport { comparePrimitives, padLeftAndRightWithZeros, padWithZeros } from \"./Util.js\";\n// TimeSpan in runtime just becomes a number representing milliseconds\n/**\n * Calls:\n * - `Math.ceil` if the `value` is **negative**\n * - `Math.floor` if the `value` is **positive**\n * @param value Value to round\n */\nfunction signedRound(value) {\n return value < 0 ? Math.ceil(value) : Math.floor(value);\n}\nexport function create(d = 0, h = 0, m = 0, s = 0, ms = 0) {\n switch (arguments.length) {\n case 1:\n // ticks\n return fromTicks(arguments[0]);\n case 3:\n // h,m,s\n d = 0, h = arguments[0], m = arguments[1], s = arguments[2], ms = 0;\n break;\n default:\n // d,h,m,s,ms\n break;\n }\n return d * 86400000 + h * 3600000 + m * 60000 + s * 1000 + ms;\n}\nexport function fromTicks(ticks) {\n return toNumber(op_Division(ticks, 10000));\n}\nexport function fromDays(d) {\n return create(d, 0, 0, 0);\n}\nexport function fromHours(h) {\n return create(h, 0, 0);\n}\nexport function fromMinutes(m) {\n return create(0, m, 0);\n}\nexport function fromSeconds(s) {\n return create(0, 0, s);\n}\nexport function days(ts) {\n return signedRound(ts / 86400000);\n}\nexport function hours(ts) {\n return signedRound(ts % 86400000 / 3600000);\n}\nexport function minutes(ts) {\n return signedRound(ts % 3600000 / 60000);\n}\nexport function seconds(ts) {\n return signedRound(ts % 60000 / 1000);\n}\nexport function milliseconds(ts) {\n return signedRound(ts % 1000);\n}\nexport function ticks(ts) {\n return op_Multiply(fromNumber(ts), 10000);\n}\nexport function totalDays(ts) {\n return ts / 86400000;\n}\nexport function totalHours(ts) {\n return ts / 3600000;\n}\nexport function totalMinutes(ts) {\n return ts / 60000;\n}\nexport function totalSeconds(ts) {\n return ts / 1000;\n}\nexport function negate(ts) {\n return ts * -1;\n}\nexport function add(ts1, ts2) {\n return ts1 + ts2;\n}\nexport function subtract(ts1, ts2) {\n return ts1 - ts2;\n}\nexport const op_Addition = add;\nexport const op_Subtraction = subtract;\nexport const compare = comparePrimitives;\nexport const compareTo = comparePrimitives;\nexport function duration(x) {\n return Math.abs(x);\n}\nexport function toString(ts, format = \"c\", _provider) {\n if ([\"c\", \"g\", \"G\"].indexOf(format) === -1) {\n throw new Error(\"Custom formats are not supported\");\n }\n const d = Math.abs(days(ts));\n const h = Math.abs(hours(ts));\n const m = Math.abs(minutes(ts));\n const s = Math.abs(seconds(ts));\n const ms = Math.abs(milliseconds(ts));\n const sign = ts < 0 ? \"-\" : \"\";\n return `${sign}${d === 0 && (format === \"c\" || format === \"g\") ? \"\" : format === \"c\" ? d + \".\" : d + \":\"}${format === \"g\" ? h : padWithZeros(h, 2)}:${padWithZeros(m, 2)}:${padWithZeros(s, 2)}${ms === 0 && (format === \"c\" || format === \"g\") ? \"\" : format === \"g\" ? \".\" + padWithZeros(ms, 3) : \".\" + padLeftAndRightWithZeros(ms, 3, 7)}`;\n}\nexport function parse(str) {\n const firstDot = str.search(\"\\\\.\");\n const firstColon = str.search(\"\\\\:\");\n if (firstDot === -1 && firstColon === -1) { // There is only a day ex: 4\n const d = parseInt(str, 0);\n if (isNaN(d)) {\n throw new Error(`String '${str}' was not recognized as a valid TimeSpan.`);\n }\n else {\n return create(d, 0, 0, 0, 0);\n }\n }\n if (firstColon > 0) { // process time part\n // WIP: (-?)(((\\d+)\\.)?([0-9]|0[0-9]|1[0-9]|2[0-3]):(\\d+)(:\\d+(\\.\\d{1,7})?)?|\\d+(?:(?!\\.)))\n const r = /^(-?)((\\d+)\\.)?(?:0*)([0-9]|0[0-9]|1[0-9]|2[0-3]):(?:0*)([0-5][0-9]|[0-9])(:(?:0*)([0-5][0-9]|[0-9]))?\\.?(\\d+)?$/.exec(str);\n if (r != null && r[4] != null && r[5] != null) {\n let d = 0;\n let ms = 0;\n let s = 0;\n const sign = r[1] != null && r[1] === \"-\" ? -1 : 1;\n const h = +r[4];\n const m = +r[5];\n if (r[3] != null) {\n d = +r[3];\n }\n if (r[7] != null) {\n s = +r[7];\n }\n if (r[8] != null) {\n // Depending on the number of decimals passed, we need to adapt the numbers\n switch (r[8].length) {\n case 1:\n ms = +r[8] * 100;\n break;\n case 2:\n ms = +r[8] * 10;\n break;\n case 3:\n ms = +r[8];\n break;\n case 4:\n ms = +r[8] / 10;\n break;\n case 5:\n ms = +r[8] / 100;\n break;\n case 6:\n ms = +r[8] / 1000;\n break;\n case 7:\n ms = +r[8] / 10000;\n break;\n default:\n throw new Error(`String '${str}' was not recognized as a valid TimeSpan.`);\n }\n }\n return sign * create(d, h, m, s, ms);\n }\n }\n throw new Error(`String '${str}' was not recognized as a valid TimeSpan.`);\n}\nexport function tryParse(v, defValue) {\n try {\n defValue.contents = parse(v);\n return true;\n }\n catch (_a) {\n return false;\n }\n}\n","import { record_type, bool_type, list_type, option_type, class_type } from \"./Reflection.js\";\nimport { some, value as value_1 } from \"./Option.js\";\nimport { singleton, ofArrayWithTail, head, tail, isEmpty as isEmpty_1, FSharpList, fold as fold_1, empty as empty_1, cons } from \"./List.js\";\nimport { fill } from \"./Array.js\";\nimport { structuralHash, compare, toIterator, equals, getEnumerator, isArrayLike } from \"./Util.js\";\nimport { Record } from \"./Types.js\";\nimport { tryPick as tryPick_1, pick as pick_1, iterate as iterate_1, compareWith, map as map_1, unfold } from \"./Seq.js\";\nimport { format, join } from \"./String.js\";\nimport { LanguagePrimitives_FastGenericComparer } from \"./FSharp.Core.js\";\n\nexport class MapTreeLeaf$2 {\n constructor(k, v) {\n this.k = k;\n this.v = v;\n }\n}\n\nexport function MapTreeLeaf$2$reflection(gen0, gen1) {\n return class_type(\"Map.MapTreeLeaf`2\", [gen0, gen1], MapTreeLeaf$2);\n}\n\nexport function MapTreeLeaf$2_$ctor_5BDDA1(k, v) {\n return new MapTreeLeaf$2(k, v);\n}\n\nexport function MapTreeLeaf$2__get_Key(_) {\n return _.k;\n}\n\nexport function MapTreeLeaf$2__get_Value(_) {\n return _.v;\n}\n\nexport class MapTreeNode$2 extends MapTreeLeaf$2 {\n constructor(k, v, left, right, h) {\n super(k, v);\n this.left = left;\n this.right = right;\n this.h = (h | 0);\n }\n}\n\nexport function MapTreeNode$2$reflection(gen0, gen1) {\n return class_type(\"Map.MapTreeNode`2\", [gen0, gen1], MapTreeNode$2, MapTreeLeaf$2$reflection(gen0, gen1));\n}\n\nexport function MapTreeNode$2_$ctor_499A11FD(k, v, left, right, h) {\n return new MapTreeNode$2(k, v, left, right, h);\n}\n\nexport function MapTreeNode$2__get_Left(_) {\n return _.left;\n}\n\nexport function MapTreeNode$2__get_Right(_) {\n return _.right;\n}\n\nexport function MapTreeNode$2__get_Height(_) {\n return _.h;\n}\n\nexport function MapTreeModule_empty() {\n return void 0;\n}\n\nexport function MapTreeModule_sizeAux(acc_mut, m_mut) {\n MapTreeModule_sizeAux:\n while (true) {\n const acc = acc_mut, m = m_mut;\n if (m != null) {\n const m2 = m;\n if (m2 instanceof MapTreeNode$2) {\n acc_mut = MapTreeModule_sizeAux(acc + 1, MapTreeNode$2__get_Left(m2));\n m_mut = MapTreeNode$2__get_Right(m2);\n continue MapTreeModule_sizeAux;\n }\n else {\n return (acc + 1) | 0;\n }\n }\n else {\n return acc | 0;\n }\n break;\n }\n}\n\nexport function MapTreeModule_size(x) {\n return MapTreeModule_sizeAux(0, x);\n}\n\nexport function MapTreeModule_mk(l, k, v, r) {\n let hl;\n const m = l;\n if (m != null) {\n const m2 = m;\n hl = ((m2 instanceof MapTreeNode$2) ? MapTreeNode$2__get_Height(m2) : 1);\n }\n else {\n hl = 0;\n }\n let hr;\n const m_1 = r;\n if (m_1 != null) {\n const m2_1 = m_1;\n hr = ((m2_1 instanceof MapTreeNode$2) ? MapTreeNode$2__get_Height(m2_1) : 1);\n }\n else {\n hr = 0;\n }\n const m_2 = ((hl < hr) ? hr : hl) | 0;\n if (m_2 === 0) {\n return MapTreeLeaf$2_$ctor_5BDDA1(k, v);\n }\n else {\n return MapTreeNode$2_$ctor_499A11FD(k, v, l, r, m_2 + 1);\n }\n}\n\nexport function MapTreeModule_rebalance(t1, k, v, t2) {\n let m_2, m2_2, m_3, m2_3;\n let t1h;\n const m = t1;\n if (m != null) {\n const m2 = m;\n t1h = ((m2 instanceof MapTreeNode$2) ? MapTreeNode$2__get_Height(m2) : 1);\n }\n else {\n t1h = 0;\n }\n let t2h;\n const m_1 = t2;\n if (m_1 != null) {\n const m2_1 = m_1;\n t2h = ((m2_1 instanceof MapTreeNode$2) ? MapTreeNode$2__get_Height(m2_1) : 1);\n }\n else {\n t2h = 0;\n }\n if (t2h > (t1h + 2)) {\n const matchValue = value_1(t2);\n if (matchValue instanceof MapTreeNode$2) {\n if ((m_2 = MapTreeNode$2__get_Left(matchValue), (m_2 != null) ? (m2_2 = m_2, (m2_2 instanceof MapTreeNode$2) ? MapTreeNode$2__get_Height(m2_2) : 1) : 0) > (t1h + 1)) {\n const matchValue_1 = value_1(MapTreeNode$2__get_Left(matchValue));\n if (matchValue_1 instanceof MapTreeNode$2) {\n return MapTreeModule_mk(MapTreeModule_mk(t1, k, v, MapTreeNode$2__get_Left(matchValue_1)), MapTreeLeaf$2__get_Key(matchValue_1), MapTreeLeaf$2__get_Value(matchValue_1), MapTreeModule_mk(MapTreeNode$2__get_Right(matchValue_1), MapTreeLeaf$2__get_Key(matchValue), MapTreeLeaf$2__get_Value(matchValue), MapTreeNode$2__get_Right(matchValue)));\n }\n else {\n throw (new Error(\"internal error: Map.rebalance\"));\n }\n }\n else {\n return MapTreeModule_mk(MapTreeModule_mk(t1, k, v, MapTreeNode$2__get_Left(matchValue)), MapTreeLeaf$2__get_Key(matchValue), MapTreeLeaf$2__get_Value(matchValue), MapTreeNode$2__get_Right(matchValue));\n }\n }\n else {\n throw (new Error(\"internal error: Map.rebalance\"));\n }\n }\n else if (t1h > (t2h + 2)) {\n const matchValue_2 = value_1(t1);\n if (matchValue_2 instanceof MapTreeNode$2) {\n if ((m_3 = MapTreeNode$2__get_Right(matchValue_2), (m_3 != null) ? (m2_3 = m_3, (m2_3 instanceof MapTreeNode$2) ? MapTreeNode$2__get_Height(m2_3) : 1) : 0) > (t2h + 1)) {\n const matchValue_3 = value_1(MapTreeNode$2__get_Right(matchValue_2));\n if (matchValue_3 instanceof MapTreeNode$2) {\n return MapTreeModule_mk(MapTreeModule_mk(MapTreeNode$2__get_Left(matchValue_2), MapTreeLeaf$2__get_Key(matchValue_2), MapTreeLeaf$2__get_Value(matchValue_2), MapTreeNode$2__get_Left(matchValue_3)), MapTreeLeaf$2__get_Key(matchValue_3), MapTreeLeaf$2__get_Value(matchValue_3), MapTreeModule_mk(MapTreeNode$2__get_Right(matchValue_3), k, v, t2));\n }\n else {\n throw (new Error(\"internal error: Map.rebalance\"));\n }\n }\n else {\n return MapTreeModule_mk(MapTreeNode$2__get_Left(matchValue_2), MapTreeLeaf$2__get_Key(matchValue_2), MapTreeLeaf$2__get_Value(matchValue_2), MapTreeModule_mk(MapTreeNode$2__get_Right(matchValue_2), k, v, t2));\n }\n }\n else {\n throw (new Error(\"internal error: Map.rebalance\"));\n }\n }\n else {\n return MapTreeModule_mk(t1, k, v, t2);\n }\n}\n\nexport function MapTreeModule_add(comparer, k, v, m) {\n if (m != null) {\n const m2 = m;\n const c = comparer.Compare(k, MapTreeLeaf$2__get_Key(m2)) | 0;\n if (m2 instanceof MapTreeNode$2) {\n if (c < 0) {\n return MapTreeModule_rebalance(MapTreeModule_add(comparer, k, v, MapTreeNode$2__get_Left(m2)), MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2), MapTreeNode$2__get_Right(m2));\n }\n else if (c === 0) {\n return MapTreeNode$2_$ctor_499A11FD(k, v, MapTreeNode$2__get_Left(m2), MapTreeNode$2__get_Right(m2), MapTreeNode$2__get_Height(m2));\n }\n else {\n return MapTreeModule_rebalance(MapTreeNode$2__get_Left(m2), MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2), MapTreeModule_add(comparer, k, v, MapTreeNode$2__get_Right(m2)));\n }\n }\n else if (c < 0) {\n return MapTreeNode$2_$ctor_499A11FD(k, v, MapTreeModule_empty(), m, 2);\n }\n else if (c === 0) {\n return MapTreeLeaf$2_$ctor_5BDDA1(k, v);\n }\n else {\n return MapTreeNode$2_$ctor_499A11FD(k, v, m, MapTreeModule_empty(), 2);\n }\n }\n else {\n return MapTreeLeaf$2_$ctor_5BDDA1(k, v);\n }\n}\n\nexport function MapTreeModule_tryFind(comparer_mut, k_mut, m_mut) {\n MapTreeModule_tryFind:\n while (true) {\n const comparer = comparer_mut, k = k_mut, m = m_mut;\n if (m != null) {\n const m2 = m;\n const c = comparer.Compare(k, MapTreeLeaf$2__get_Key(m2)) | 0;\n if (c === 0) {\n return some(MapTreeLeaf$2__get_Value(m2));\n }\n else if (m2 instanceof MapTreeNode$2) {\n comparer_mut = comparer;\n k_mut = k;\n m_mut = ((c < 0) ? MapTreeNode$2__get_Left(m2) : MapTreeNode$2__get_Right(m2));\n continue MapTreeModule_tryFind;\n }\n else {\n return void 0;\n }\n }\n else {\n return void 0;\n }\n break;\n }\n}\n\nexport function MapTreeModule_find(comparer, k, m) {\n const matchValue = MapTreeModule_tryFind(comparer, k, m);\n if (matchValue == null) {\n throw (new Error());\n }\n else {\n return value_1(matchValue);\n }\n}\n\nexport function MapTreeModule_partition1(comparer, f, k, v, acc1, acc2) {\n if (f(k, v)) {\n return [MapTreeModule_add(comparer, k, v, acc1), acc2];\n }\n else {\n return [acc1, MapTreeModule_add(comparer, k, v, acc2)];\n }\n}\n\nexport function MapTreeModule_partitionAux(comparer_mut, f_mut, m_mut, acc_0_mut, acc_1_mut) {\n MapTreeModule_partitionAux:\n while (true) {\n const comparer = comparer_mut, f = f_mut, m = m_mut, acc_0 = acc_0_mut, acc_1 = acc_1_mut;\n const acc = [acc_0, acc_1];\n if (m != null) {\n const m2 = m;\n if (m2 instanceof MapTreeNode$2) {\n const acc_2 = MapTreeModule_partitionAux(comparer, f, MapTreeNode$2__get_Right(m2), acc[0], acc[1]);\n const acc_3 = MapTreeModule_partition1(comparer, f, MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2), acc_2[0], acc_2[1]);\n comparer_mut = comparer;\n f_mut = f;\n m_mut = MapTreeNode$2__get_Left(m2);\n acc_0_mut = acc_3[0];\n acc_1_mut = acc_3[1];\n continue MapTreeModule_partitionAux;\n }\n else {\n return MapTreeModule_partition1(comparer, f, MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2), acc[0], acc[1]);\n }\n }\n else {\n return acc;\n }\n break;\n }\n}\n\nexport function MapTreeModule_partition(comparer, f, m) {\n return MapTreeModule_partitionAux(comparer, f, m, MapTreeModule_empty(), MapTreeModule_empty());\n}\n\nexport function MapTreeModule_filter1(comparer, f, k, v, acc) {\n if (f(k, v)) {\n return MapTreeModule_add(comparer, k, v, acc);\n }\n else {\n return acc;\n }\n}\n\nexport function MapTreeModule_filterAux(comparer_mut, f_mut, m_mut, acc_mut) {\n MapTreeModule_filterAux:\n while (true) {\n const comparer = comparer_mut, f = f_mut, m = m_mut, acc = acc_mut;\n if (m != null) {\n const m2 = m;\n if (m2 instanceof MapTreeNode$2) {\n const acc_1 = MapTreeModule_filterAux(comparer, f, MapTreeNode$2__get_Left(m2), acc);\n const acc_2 = MapTreeModule_filter1(comparer, f, MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2), acc_1);\n comparer_mut = comparer;\n f_mut = f;\n m_mut = MapTreeNode$2__get_Right(m2);\n acc_mut = acc_2;\n continue MapTreeModule_filterAux;\n }\n else {\n return MapTreeModule_filter1(comparer, f, MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2), acc);\n }\n }\n else {\n return acc;\n }\n break;\n }\n}\n\nexport function MapTreeModule_filter(comparer, f, m) {\n return MapTreeModule_filterAux(comparer, f, m, MapTreeModule_empty());\n}\n\nexport function MapTreeModule_spliceOutSuccessor(m) {\n if (m != null) {\n const m2 = m;\n if (m2 instanceof MapTreeNode$2) {\n if (MapTreeNode$2__get_Left(m2) == null) {\n return [MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2), MapTreeNode$2__get_Right(m2)];\n }\n else {\n const patternInput = MapTreeModule_spliceOutSuccessor(MapTreeNode$2__get_Left(m2));\n return [patternInput[0], patternInput[1], MapTreeModule_mk(patternInput[2], MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2), MapTreeNode$2__get_Right(m2))];\n }\n }\n else {\n return [MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2), MapTreeModule_empty()];\n }\n }\n else {\n throw (new Error(\"internal error: Map.spliceOutSuccessor\"));\n }\n}\n\nexport function MapTreeModule_remove(comparer, k, m) {\n if (m != null) {\n const m2 = m;\n const c = comparer.Compare(k, MapTreeLeaf$2__get_Key(m2)) | 0;\n if (m2 instanceof MapTreeNode$2) {\n if (c < 0) {\n return MapTreeModule_rebalance(MapTreeModule_remove(comparer, k, MapTreeNode$2__get_Left(m2)), MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2), MapTreeNode$2__get_Right(m2));\n }\n else if (c === 0) {\n if (MapTreeNode$2__get_Left(m2) == null) {\n return MapTreeNode$2__get_Right(m2);\n }\n else if (MapTreeNode$2__get_Right(m2) == null) {\n return MapTreeNode$2__get_Left(m2);\n }\n else {\n const patternInput = MapTreeModule_spliceOutSuccessor(MapTreeNode$2__get_Right(m2));\n return MapTreeModule_mk(MapTreeNode$2__get_Left(m2), patternInput[0], patternInput[1], patternInput[2]);\n }\n }\n else {\n return MapTreeModule_rebalance(MapTreeNode$2__get_Left(m2), MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2), MapTreeModule_remove(comparer, k, MapTreeNode$2__get_Right(m2)));\n }\n }\n else if (c === 0) {\n return MapTreeModule_empty();\n }\n else {\n return m;\n }\n }\n else {\n return MapTreeModule_empty();\n }\n}\n\nexport function MapTreeModule_change(comparer, k, u, m) {\n if (m != null) {\n const m2 = m;\n if (m2 instanceof MapTreeNode$2) {\n const c = comparer.Compare(k, MapTreeLeaf$2__get_Key(m2)) | 0;\n if (c < 0) {\n return MapTreeModule_rebalance(MapTreeModule_change(comparer, k, u, MapTreeNode$2__get_Left(m2)), MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2), MapTreeNode$2__get_Right(m2));\n }\n else if (c === 0) {\n const matchValue_1 = u(some(MapTreeLeaf$2__get_Value(m2)));\n if (matchValue_1 != null) {\n return MapTreeNode$2_$ctor_499A11FD(k, value_1(matchValue_1), MapTreeNode$2__get_Left(m2), MapTreeNode$2__get_Right(m2), MapTreeNode$2__get_Height(m2));\n }\n else if (MapTreeNode$2__get_Left(m2) == null) {\n return MapTreeNode$2__get_Right(m2);\n }\n else if (MapTreeNode$2__get_Right(m2) == null) {\n return MapTreeNode$2__get_Left(m2);\n }\n else {\n const patternInput = MapTreeModule_spliceOutSuccessor(MapTreeNode$2__get_Right(m2));\n return MapTreeModule_mk(MapTreeNode$2__get_Left(m2), patternInput[0], patternInput[1], patternInput[2]);\n }\n }\n else {\n return MapTreeModule_rebalance(MapTreeNode$2__get_Left(m2), MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2), MapTreeModule_change(comparer, k, u, MapTreeNode$2__get_Right(m2)));\n }\n }\n else {\n const c_1 = comparer.Compare(k, MapTreeLeaf$2__get_Key(m2)) | 0;\n if (c_1 < 0) {\n const matchValue_2 = u(void 0);\n if (matchValue_2 != null) {\n return MapTreeNode$2_$ctor_499A11FD(k, value_1(matchValue_2), MapTreeModule_empty(), m, 2);\n }\n else {\n return m;\n }\n }\n else if (c_1 === 0) {\n const matchValue_3 = u(some(MapTreeLeaf$2__get_Value(m2)));\n if (matchValue_3 != null) {\n return MapTreeLeaf$2_$ctor_5BDDA1(k, value_1(matchValue_3));\n }\n else {\n return MapTreeModule_empty();\n }\n }\n else {\n const matchValue_4 = u(void 0);\n if (matchValue_4 != null) {\n return MapTreeNode$2_$ctor_499A11FD(k, value_1(matchValue_4), m, MapTreeModule_empty(), 2);\n }\n else {\n return m;\n }\n }\n }\n }\n else {\n const matchValue = u(void 0);\n if (matchValue != null) {\n return MapTreeLeaf$2_$ctor_5BDDA1(k, value_1(matchValue));\n }\n else {\n return m;\n }\n }\n}\n\nexport function MapTreeModule_mem(comparer_mut, k_mut, m_mut) {\n MapTreeModule_mem:\n while (true) {\n const comparer = comparer_mut, k = k_mut, m = m_mut;\n if (m != null) {\n const m2 = m;\n const c = comparer.Compare(k, MapTreeLeaf$2__get_Key(m2)) | 0;\n if (m2 instanceof MapTreeNode$2) {\n if (c < 0) {\n comparer_mut = comparer;\n k_mut = k;\n m_mut = MapTreeNode$2__get_Left(m2);\n continue MapTreeModule_mem;\n }\n else if (c === 0) {\n return true;\n }\n else {\n comparer_mut = comparer;\n k_mut = k;\n m_mut = MapTreeNode$2__get_Right(m2);\n continue MapTreeModule_mem;\n }\n }\n else {\n return c === 0;\n }\n }\n else {\n return false;\n }\n break;\n }\n}\n\nexport function MapTreeModule_iterOpt(f_mut, m_mut) {\n MapTreeModule_iterOpt:\n while (true) {\n const f = f_mut, m = m_mut;\n if (m != null) {\n const m2 = m;\n if (m2 instanceof MapTreeNode$2) {\n MapTreeModule_iterOpt(f, MapTreeNode$2__get_Left(m2));\n f(MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2));\n f_mut = f;\n m_mut = MapTreeNode$2__get_Right(m2);\n continue MapTreeModule_iterOpt;\n }\n else {\n f(MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2));\n }\n }\n break;\n }\n}\n\nexport function MapTreeModule_iter(f, m) {\n MapTreeModule_iterOpt(f, m);\n}\n\nexport function MapTreeModule_tryPickOpt(f_mut, m_mut) {\n MapTreeModule_tryPickOpt:\n while (true) {\n const f = f_mut, m = m_mut;\n if (m != null) {\n const m2 = m;\n if (m2 instanceof MapTreeNode$2) {\n const matchValue = MapTreeModule_tryPickOpt(f, MapTreeNode$2__get_Left(m2));\n if (matchValue == null) {\n const matchValue_1 = f(MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2));\n if (matchValue_1 == null) {\n f_mut = f;\n m_mut = MapTreeNode$2__get_Right(m2);\n continue MapTreeModule_tryPickOpt;\n }\n else {\n return matchValue_1;\n }\n }\n else {\n return matchValue;\n }\n }\n else {\n return f(MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2));\n }\n }\n else {\n return void 0;\n }\n break;\n }\n}\n\nexport function MapTreeModule_tryPick(f, m) {\n return MapTreeModule_tryPickOpt(f, m);\n}\n\nexport function MapTreeModule_existsOpt(f_mut, m_mut) {\n MapTreeModule_existsOpt:\n while (true) {\n const f = f_mut, m = m_mut;\n if (m != null) {\n const m2 = m;\n if (m2 instanceof MapTreeNode$2) {\n if (MapTreeModule_existsOpt(f, MapTreeNode$2__get_Left(m2)) ? true : f(MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2))) {\n return true;\n }\n else {\n f_mut = f;\n m_mut = MapTreeNode$2__get_Right(m2);\n continue MapTreeModule_existsOpt;\n }\n }\n else {\n return f(MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2));\n }\n }\n else {\n return false;\n }\n break;\n }\n}\n\nexport function MapTreeModule_exists(f, m) {\n return MapTreeModule_existsOpt(f, m);\n}\n\nexport function MapTreeModule_forallOpt(f_mut, m_mut) {\n MapTreeModule_forallOpt:\n while (true) {\n const f = f_mut, m = m_mut;\n if (m != null) {\n const m2 = m;\n if (m2 instanceof MapTreeNode$2) {\n if (MapTreeModule_forallOpt(f, MapTreeNode$2__get_Left(m2)) ? f(MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2)) : false) {\n f_mut = f;\n m_mut = MapTreeNode$2__get_Right(m2);\n continue MapTreeModule_forallOpt;\n }\n else {\n return false;\n }\n }\n else {\n return f(MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2));\n }\n }\n else {\n return true;\n }\n break;\n }\n}\n\nexport function MapTreeModule_forall(f, m) {\n return MapTreeModule_forallOpt(f, m);\n}\n\nexport function MapTreeModule_map(f, m) {\n if (m != null) {\n const m2 = m;\n if (m2 instanceof MapTreeNode$2) {\n const l2 = MapTreeModule_map(f, MapTreeNode$2__get_Left(m2));\n const v2 = f(MapTreeLeaf$2__get_Value(m2));\n const r2 = MapTreeModule_map(f, MapTreeNode$2__get_Right(m2));\n return MapTreeNode$2_$ctor_499A11FD(MapTreeLeaf$2__get_Key(m2), v2, l2, r2, MapTreeNode$2__get_Height(m2));\n }\n else {\n return MapTreeLeaf$2_$ctor_5BDDA1(MapTreeLeaf$2__get_Key(m2), f(MapTreeLeaf$2__get_Value(m2)));\n }\n }\n else {\n return MapTreeModule_empty();\n }\n}\n\nexport function MapTreeModule_mapiOpt(f, m) {\n if (m != null) {\n const m2 = m;\n if (m2 instanceof MapTreeNode$2) {\n const l2 = MapTreeModule_mapiOpt(f, MapTreeNode$2__get_Left(m2));\n const v2 = f(MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2));\n const r2 = MapTreeModule_mapiOpt(f, MapTreeNode$2__get_Right(m2));\n return MapTreeNode$2_$ctor_499A11FD(MapTreeLeaf$2__get_Key(m2), v2, l2, r2, MapTreeNode$2__get_Height(m2));\n }\n else {\n return MapTreeLeaf$2_$ctor_5BDDA1(MapTreeLeaf$2__get_Key(m2), f(MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2)));\n }\n }\n else {\n return MapTreeModule_empty();\n }\n}\n\nexport function MapTreeModule_mapi(f, m) {\n return MapTreeModule_mapiOpt(f, m);\n}\n\nexport function MapTreeModule_foldBackOpt(f_mut, m_mut, x_mut) {\n MapTreeModule_foldBackOpt:\n while (true) {\n const f = f_mut, m = m_mut, x = x_mut;\n if (m != null) {\n const m2 = m;\n if (m2 instanceof MapTreeNode$2) {\n const x_1 = MapTreeModule_foldBackOpt(f, MapTreeNode$2__get_Right(m2), x);\n const x_2 = f(MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2), x_1);\n f_mut = f;\n m_mut = MapTreeNode$2__get_Left(m2);\n x_mut = x_2;\n continue MapTreeModule_foldBackOpt;\n }\n else {\n return f(MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2), x);\n }\n }\n else {\n return x;\n }\n break;\n }\n}\n\nexport function MapTreeModule_foldBack(f, m, x) {\n return MapTreeModule_foldBackOpt(f, m, x);\n}\n\nexport function MapTreeModule_foldOpt(f_mut, x_mut, m_mut) {\n MapTreeModule_foldOpt:\n while (true) {\n const f = f_mut, x = x_mut, m = m_mut;\n if (m != null) {\n const m2 = m;\n if (m2 instanceof MapTreeNode$2) {\n f_mut = f;\n x_mut = f(MapTreeModule_foldOpt(f, x, MapTreeNode$2__get_Left(m2)), MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2));\n m_mut = MapTreeNode$2__get_Right(m2);\n continue MapTreeModule_foldOpt;\n }\n else {\n return f(x, MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2));\n }\n }\n else {\n return x;\n }\n break;\n }\n}\n\nexport function MapTreeModule_fold(f, x, m) {\n return MapTreeModule_foldOpt(f, x, m);\n}\n\nexport function MapTreeModule_foldSectionOpt(comparer, lo, hi, f, m, x) {\n const foldFromTo = (f_1_mut, m_1_mut, x_1_mut) => {\n foldFromTo:\n while (true) {\n const f_1 = f_1_mut, m_1 = m_1_mut, x_1 = x_1_mut;\n if (m_1 != null) {\n const m2 = m_1;\n if (m2 instanceof MapTreeNode$2) {\n const cLoKey = comparer.Compare(lo, MapTreeLeaf$2__get_Key(m2)) | 0;\n const cKeyHi = comparer.Compare(MapTreeLeaf$2__get_Key(m2), hi) | 0;\n const x_2 = (cLoKey < 0) ? foldFromTo(f_1, MapTreeNode$2__get_Left(m2), x_1) : x_1;\n const x_3 = ((cLoKey <= 0) ? (cKeyHi <= 0) : false) ? f_1(MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2), x_2) : x_2;\n if (cKeyHi < 0) {\n f_1_mut = f_1;\n m_1_mut = MapTreeNode$2__get_Right(m2);\n x_1_mut = x_3;\n continue foldFromTo;\n }\n else {\n return x_3;\n }\n }\n else if ((comparer.Compare(lo, MapTreeLeaf$2__get_Key(m2)) <= 0) ? (comparer.Compare(MapTreeLeaf$2__get_Key(m2), hi) <= 0) : false) {\n return f_1(MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2), x_1);\n }\n else {\n return x_1;\n }\n }\n else {\n return x_1;\n }\n break;\n }\n };\n if (comparer.Compare(lo, hi) === 1) {\n return x;\n }\n else {\n return foldFromTo(f, m, x);\n }\n}\n\nexport function MapTreeModule_foldSection(comparer, lo, hi, f, m, x) {\n return MapTreeModule_foldSectionOpt(comparer, lo, hi, f, m, x);\n}\n\nexport function MapTreeModule_toList(m) {\n const loop = (m_1_mut, acc_mut) => {\n loop:\n while (true) {\n const m_1 = m_1_mut, acc = acc_mut;\n if (m_1 != null) {\n const m2 = m_1;\n if (m2 instanceof MapTreeNode$2) {\n m_1_mut = MapTreeNode$2__get_Left(m2);\n acc_mut = cons([MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2)], loop(MapTreeNode$2__get_Right(m2), acc));\n continue loop;\n }\n else {\n return cons([MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2)], acc);\n }\n }\n else {\n return acc;\n }\n break;\n }\n };\n return loop(m, empty_1());\n}\n\nexport function MapTreeModule_copyToArray(m, arr, i) {\n let j = i | 0;\n MapTreeModule_iter((x, y) => {\n arr[j] = [x, y];\n j = ((j + 1) | 0);\n }, m);\n}\n\nexport function MapTreeModule_toArray(m) {\n const n = MapTreeModule_size(m) | 0;\n const res = fill(new Array(n), 0, n, [null, null]);\n MapTreeModule_copyToArray(m, res, 0);\n return res;\n}\n\nexport function MapTreeModule_ofList(comparer, l) {\n return fold_1((acc, tupledArg) => MapTreeModule_add(comparer, tupledArg[0], tupledArg[1], acc), MapTreeModule_empty(), l);\n}\n\nexport function MapTreeModule_mkFromEnumerator(comparer_mut, acc_mut, e_mut) {\n MapTreeModule_mkFromEnumerator:\n while (true) {\n const comparer = comparer_mut, acc = acc_mut, e = e_mut;\n if (e[\"System.Collections.IEnumerator.MoveNext\"]()) {\n const patternInput = e[\"System.Collections.Generic.IEnumerator`1.get_Current\"]();\n comparer_mut = comparer;\n acc_mut = MapTreeModule_add(comparer, patternInput[0], patternInput[1], acc);\n e_mut = e;\n continue MapTreeModule_mkFromEnumerator;\n }\n else {\n return acc;\n }\n break;\n }\n}\n\nexport function MapTreeModule_ofArray(comparer, arr) {\n let res = MapTreeModule_empty();\n for (let idx = 0; idx <= (arr.length - 1); idx++) {\n const forLoopVar = arr[idx];\n res = MapTreeModule_add(comparer, forLoopVar[0], forLoopVar[1], res);\n }\n return res;\n}\n\nexport function MapTreeModule_ofSeq(comparer, c) {\n if (isArrayLike(c)) {\n return MapTreeModule_ofArray(comparer, c);\n }\n else if (c instanceof FSharpList) {\n return MapTreeModule_ofList(comparer, c);\n }\n else {\n const ie = getEnumerator(c);\n try {\n return MapTreeModule_mkFromEnumerator(comparer, MapTreeModule_empty(), ie);\n }\n finally {\n ie.Dispose();\n }\n }\n}\n\nexport class MapTreeModule_MapIterator$2 extends Record {\n constructor(stack, started) {\n super();\n this.stack = stack;\n this.started = started;\n }\n}\n\nexport function MapTreeModule_MapIterator$2$reflection(gen0, gen1) {\n return record_type(\"Map.MapTreeModule.MapIterator`2\", [gen0, gen1], MapTreeModule_MapIterator$2, () => [[\"stack\", list_type(option_type(MapTreeLeaf$2$reflection(gen0, gen1)))], [\"started\", bool_type]]);\n}\n\nexport function MapTreeModule_collapseLHS(stack_mut) {\n MapTreeModule_collapseLHS:\n while (true) {\n const stack = stack_mut;\n if (!isEmpty_1(stack)) {\n const rest = tail(stack);\n const m = head(stack);\n if (m != null) {\n const m2 = m;\n if (m2 instanceof MapTreeNode$2) {\n stack_mut = ofArrayWithTail([MapTreeNode$2__get_Left(m2), MapTreeLeaf$2_$ctor_5BDDA1(MapTreeLeaf$2__get_Key(m2), MapTreeLeaf$2__get_Value(m2)), MapTreeNode$2__get_Right(m2)], rest);\n continue MapTreeModule_collapseLHS;\n }\n else {\n return stack;\n }\n }\n else {\n stack_mut = rest;\n continue MapTreeModule_collapseLHS;\n }\n }\n else {\n return empty_1();\n }\n break;\n }\n}\n\nexport function MapTreeModule_mkIterator(m) {\n return new MapTreeModule_MapIterator$2(MapTreeModule_collapseLHS(singleton(m)), false);\n}\n\nexport function MapTreeModule_notStarted() {\n throw (new Error(\"enumeration not started\"));\n}\n\nexport function MapTreeModule_alreadyFinished() {\n throw (new Error(\"enumeration already finished\"));\n}\n\nexport function MapTreeModule_current(i) {\n if (i.started) {\n const matchValue = i.stack;\n if (!isEmpty_1(matchValue)) {\n if (head(matchValue) != null) {\n const m = head(matchValue);\n if (m instanceof MapTreeNode$2) {\n throw (new Error(\"Please report error: Map iterator, unexpected stack for current\"));\n }\n else {\n return [MapTreeLeaf$2__get_Key(m), MapTreeLeaf$2__get_Value(m)];\n }\n }\n else {\n throw (new Error(\"Please report error: Map iterator, unexpected stack for current\"));\n }\n }\n else {\n return MapTreeModule_alreadyFinished();\n }\n }\n else {\n return MapTreeModule_notStarted();\n }\n}\n\nexport function MapTreeModule_moveNext(i) {\n if (i.started) {\n const matchValue = i.stack;\n if (!isEmpty_1(matchValue)) {\n if (head(matchValue) != null) {\n const m = head(matchValue);\n if (m instanceof MapTreeNode$2) {\n throw (new Error(\"Please report error: Map iterator, unexpected stack for moveNext\"));\n }\n else {\n i.stack = MapTreeModule_collapseLHS(tail(matchValue));\n return !isEmpty_1(i.stack);\n }\n }\n else {\n throw (new Error(\"Please report error: Map iterator, unexpected stack for moveNext\"));\n }\n }\n else {\n return false;\n }\n }\n else {\n i.started = true;\n return !isEmpty_1(i.stack);\n }\n}\n\nexport function MapTreeModule_mkIEnumerator(m) {\n let i = MapTreeModule_mkIterator(m);\n return {\n [\"System.Collections.Generic.IEnumerator`1.get_Current\"]() {\n return MapTreeModule_current(i);\n },\n [\"System.Collections.IEnumerator.get_Current\"]() {\n return MapTreeModule_current(i);\n },\n [\"System.Collections.IEnumerator.MoveNext\"]() {\n return MapTreeModule_moveNext(i);\n },\n [\"System.Collections.IEnumerator.Reset\"]() {\n i = MapTreeModule_mkIterator(m);\n },\n Dispose() {\n },\n };\n}\n\nexport function MapTreeModule_toSeq(s) {\n return unfold((en_1) => {\n if (en_1[\"System.Collections.IEnumerator.MoveNext\"]()) {\n return [en_1[\"System.Collections.Generic.IEnumerator`1.get_Current\"](), en_1];\n }\n else {\n return void 0;\n }\n }, MapTreeModule_mkIEnumerator(s));\n}\n\nexport class FSharpMap {\n constructor(comparer, tree) {\n this.comparer = comparer;\n this.tree = tree;\n }\n GetHashCode() {\n const this$ = this;\n return FSharpMap__ComputeHashCode(this$) | 0;\n }\n Equals(that) {\n const this$ = this;\n if (that instanceof FSharpMap) {\n const e1 = getEnumerator(this$);\n try {\n const e2 = getEnumerator(that);\n try {\n const loop = () => {\n const m1 = e1[\"System.Collections.IEnumerator.MoveNext\"]();\n if (m1 === e2[\"System.Collections.IEnumerator.MoveNext\"]()) {\n if (!m1) {\n return true;\n }\n else {\n const e1c = e1[\"System.Collections.Generic.IEnumerator`1.get_Current\"]();\n const e2c = e2[\"System.Collections.Generic.IEnumerator`1.get_Current\"]();\n if (equals(e1c[0], e2c[0]) ? equals(e1c[1], e2c[1]) : false) {\n return loop();\n }\n else {\n return false;\n }\n }\n }\n else {\n return false;\n }\n };\n return loop();\n }\n finally {\n e2.Dispose();\n }\n }\n finally {\n e1.Dispose();\n }\n }\n else {\n return false;\n }\n }\n toString() {\n const this$ = this;\n return (\"map [\" + join(\"; \", map_1((kv) => format(\"({0}, {1})\", kv[0], kv[1]), this$))) + \"]\";\n }\n get [Symbol.toStringTag]() {\n return \"FSharpMap\";\n }\n toJSON(_key) {\n const this$ = this;\n return Array.from(this$);\n }\n GetEnumerator() {\n const __ = this;\n return MapTreeModule_mkIEnumerator(__.tree);\n }\n [Symbol.iterator]() {\n return toIterator(this.GetEnumerator());\n }\n [\"System.Collections.IEnumerable.GetEnumerator\"]() {\n const __ = this;\n return MapTreeModule_mkIEnumerator(__.tree);\n }\n CompareTo(obj) {\n const m = this;\n if (obj instanceof FSharpMap) {\n return compareWith((kvp1, kvp2) => {\n const c = m.comparer.Compare(kvp1[0], kvp2[0]) | 0;\n return ((c !== 0) ? c : compare(kvp1[1], kvp2[1])) | 0;\n }, m, obj) | 0;\n }\n else {\n throw (new Error(\"not comparable\\\\nParameter name: obj\"));\n }\n }\n [\"System.Collections.Generic.ICollection`1.Add2B595\"](x) {\n throw (new Error(\"Map cannot be mutated\"));\n }\n [\"System.Collections.Generic.ICollection`1.Clear\"]() {\n throw (new Error(\"Map cannot be mutated\"));\n }\n [\"System.Collections.Generic.ICollection`1.Remove2B595\"](x) {\n throw (new Error(\"Map cannot be mutated\"));\n }\n [\"System.Collections.Generic.ICollection`1.Contains2B595\"](x) {\n const m = this;\n return FSharpMap__ContainsKey(m, x[0]) ? equals(FSharpMap__get_Item(m, x[0]), x[1]) : false;\n }\n [\"System.Collections.Generic.ICollection`1.CopyToZ2E171D71\"](arr, i) {\n const m = this;\n MapTreeModule_copyToArray(m.tree, arr, i);\n }\n [\"System.Collections.Generic.ICollection`1.get_IsReadOnly\"]() {\n return true;\n }\n [\"System.Collections.Generic.ICollection`1.get_Count\"]() {\n const m = this;\n return FSharpMap__get_Count(m) | 0;\n }\n [\"System.Collections.Generic.IReadOnlyCollection`1.get_Count\"]() {\n const m = this;\n return FSharpMap__get_Count(m) | 0;\n }\n get size() {\n const m = this;\n return FSharpMap__get_Count(m) | 0;\n }\n clear() {\n throw (new Error(\"Map cannot be mutated\"));\n }\n delete(_arg1) {\n throw (new Error(\"Map cannot be mutated\"));\n return false;\n }\n entries() {\n const m = this;\n return map_1((p) => [p[0], p[1]], m);\n }\n get(k) {\n const m = this;\n return FSharpMap__get_Item(m, k);\n }\n has(k) {\n const m = this;\n return FSharpMap__ContainsKey(m, k);\n }\n keys() {\n const m = this;\n return map_1((p) => p[0], m);\n }\n set(k, v) {\n const m = this;\n throw (new Error(\"Map cannot be mutated\"));\n return m;\n }\n values() {\n const m = this;\n return map_1((p) => p[1], m);\n }\n forEach(f, thisArg) {\n const m = this;\n iterate_1((p) => {\n f(p[1], p[0], m);\n }, m);\n }\n}\n\nexport function FSharpMap$reflection(gen0, gen1) {\n return class_type(\"Map.FSharpMap\", [gen0, gen1], FSharpMap);\n}\n\nexport function FSharpMap_$ctor(comparer, tree) {\n return new FSharpMap(comparer, tree);\n}\n\n(() => {\n FSharpMap.empty = FSharpMap_$ctor(LanguagePrimitives_FastGenericComparer(), MapTreeModule_empty());\n})();\n\nexport function FSharpMap_get_Empty() {\n return FSharpMap.empty;\n}\n\nexport function FSharpMap_Create(ie) {\n const comparer = LanguagePrimitives_FastGenericComparer();\n return FSharpMap_$ctor(comparer, MapTreeModule_ofSeq(comparer, ie));\n}\n\nexport function FSharpMap__get_Comparer(m) {\n return m.comparer;\n}\n\nexport function FSharpMap__get_Tree(m) {\n return m.tree;\n}\n\nexport function FSharpMap__Add(m, key, value) {\n return FSharpMap_$ctor(m.comparer, MapTreeModule_add(m.comparer, key, value, m.tree));\n}\n\nexport function FSharpMap__Change(m, key, f) {\n return FSharpMap_$ctor(m.comparer, MapTreeModule_change(m.comparer, key, f, m.tree));\n}\n\nexport function FSharpMap__get_IsEmpty(m) {\n return m.tree == null;\n}\n\nexport function FSharpMap__get_Item(m, key) {\n return MapTreeModule_find(m.comparer, key, m.tree);\n}\n\nexport function FSharpMap__TryPick(m, f) {\n return MapTreeModule_tryPick(f, m.tree);\n}\n\nexport function FSharpMap__Exists(m, predicate) {\n return MapTreeModule_exists(predicate, m.tree);\n}\n\nexport function FSharpMap__Filter(m, predicate) {\n return FSharpMap_$ctor(m.comparer, MapTreeModule_filter(m.comparer, predicate, m.tree));\n}\n\nexport function FSharpMap__ForAll(m, predicate) {\n return MapTreeModule_forall(predicate, m.tree);\n}\n\nexport function FSharpMap__Fold(m, f, acc) {\n return MapTreeModule_foldBack(f, m.tree, acc);\n}\n\nexport function FSharpMap__FoldSection(m, lo, hi, f, acc) {\n return MapTreeModule_foldSection(m.comparer, lo, hi, f, m.tree, acc);\n}\n\nexport function FSharpMap__Iterate(m, f) {\n MapTreeModule_iter(f, m.tree);\n}\n\nexport function FSharpMap__MapRange(m, f) {\n return FSharpMap_$ctor(m.comparer, MapTreeModule_map(f, m.tree));\n}\n\nexport function FSharpMap__Map(m, f) {\n return FSharpMap_$ctor(m.comparer, MapTreeModule_mapi(f, m.tree));\n}\n\nexport function FSharpMap__Partition(m, predicate) {\n const patternInput = MapTreeModule_partition(m.comparer, predicate, m.tree);\n return [FSharpMap_$ctor(m.comparer, patternInput[0]), FSharpMap_$ctor(m.comparer, patternInput[1])];\n}\n\nexport function FSharpMap__get_Count(m) {\n return MapTreeModule_size(m.tree);\n}\n\nexport function FSharpMap__ContainsKey(m, key) {\n return MapTreeModule_mem(m.comparer, key, m.tree);\n}\n\nexport function FSharpMap__Remove(m, key) {\n return FSharpMap_$ctor(m.comparer, MapTreeModule_remove(m.comparer, key, m.tree));\n}\n\nexport function FSharpMap__TryGetValue(__, key, value) {\n const matchValue = MapTreeModule_tryFind(__.comparer, key, __.tree);\n if (matchValue == null) {\n return false;\n }\n else {\n const v = value_1(matchValue);\n value.contents = v;\n return true;\n }\n}\n\nexport function FSharpMap__TryFind(m, key) {\n return MapTreeModule_tryFind(m.comparer, key, m.tree);\n}\n\nexport function FSharpMap__ToList(m) {\n return MapTreeModule_toList(m.tree);\n}\n\nexport function FSharpMap__ToArray(m) {\n return MapTreeModule_toArray(m.tree);\n}\n\nexport function FSharpMap__ComputeHashCode(this$) {\n const combineHash = (x, y) => (((x << 1) + y) + 631);\n let res = 0;\n const enumerator = getEnumerator(this$);\n try {\n while (enumerator[\"System.Collections.IEnumerator.MoveNext\"]()) {\n const activePatternResult5257 = enumerator[\"System.Collections.Generic.IEnumerator`1.get_Current\"]();\n res = (combineHash(res, structuralHash(activePatternResult5257[0])) | 0);\n res = (combineHash(res, structuralHash(activePatternResult5257[1])) | 0);\n }\n }\n finally {\n enumerator.Dispose();\n }\n return res | 0;\n}\n\nexport function isEmpty(table) {\n return FSharpMap__get_IsEmpty(table);\n}\n\nexport function add(key, value, table) {\n return FSharpMap__Add(table, key, value);\n}\n\nexport function change(key, f, table) {\n return FSharpMap__Change(table, key, f);\n}\n\nexport function find(key, table) {\n return FSharpMap__get_Item(table, key);\n}\n\nexport function tryFind(key, table) {\n return FSharpMap__TryFind(table, key);\n}\n\nexport function remove(key, table) {\n return FSharpMap__Remove(table, key);\n}\n\nexport function containsKey(key, table) {\n return FSharpMap__ContainsKey(table, key);\n}\n\nexport function iterate(action, table) {\n FSharpMap__Iterate(table, action);\n}\n\nexport function tryPick(chooser, table) {\n return FSharpMap__TryPick(table, chooser);\n}\n\nexport function pick(chooser, table) {\n const matchValue = tryPick(chooser, table);\n if (matchValue != null) {\n return value_1(matchValue);\n }\n else {\n throw (new Error());\n }\n}\n\nexport function exists(predicate, table) {\n return FSharpMap__Exists(table, predicate);\n}\n\nexport function filter(predicate, table) {\n return FSharpMap__Filter(table, predicate);\n}\n\nexport function partition(predicate, table) {\n return FSharpMap__Partition(table, predicate);\n}\n\nexport function forAll(predicate, table) {\n return FSharpMap__ForAll(table, predicate);\n}\n\nexport function map(mapping, table) {\n return FSharpMap__Map(table, mapping);\n}\n\nexport function fold(folder, state, table) {\n return MapTreeModule_fold(folder, state, FSharpMap__get_Tree(table));\n}\n\nexport function foldBack(folder, table, state) {\n return MapTreeModule_foldBack(folder, FSharpMap__get_Tree(table), state);\n}\n\nexport function toSeq(table) {\n return map_1((kvp) => [kvp[0], kvp[1]], table);\n}\n\nexport function findKey(predicate, table) {\n return pick_1((kvp) => {\n const k = kvp[0];\n if (predicate(k, kvp[1])) {\n return some(k);\n }\n else {\n return void 0;\n }\n }, table);\n}\n\nexport function tryFindKey(predicate, table) {\n return tryPick_1((kvp) => {\n const k = kvp[0];\n if (predicate(k, kvp[1])) {\n return some(k);\n }\n else {\n return void 0;\n }\n }, table);\n}\n\nexport function ofList(elements) {\n return FSharpMap_Create(elements);\n}\n\nexport function ofSeq(elements) {\n return FSharpMap_Create(elements);\n}\n\nexport function ofArray(elements) {\n const comparer = LanguagePrimitives_FastGenericComparer();\n return FSharpMap_$ctor(comparer, MapTreeModule_ofArray(comparer, elements));\n}\n\nexport function toList(table) {\n return FSharpMap__ToList(table);\n}\n\nexport function toArray(table) {\n return FSharpMap__ToArray(table);\n}\n\nexport function empty() {\n return FSharpMap_get_Empty();\n}\n\nexport function count(table) {\n return FSharpMap__get_Count(table);\n}\n\n","import { record_type, bool_type, list_type, option_type, class_type } from \"./Reflection.js\";\nimport { some, value as value_1 } from \"./Option.js\";\nimport { toString, Record } from \"./Types.js\";\nimport { FSharpList, fold as fold_2, cons, singleton as singleton_1, empty as empty_1, ofArrayWithTail, tail, head, isEmpty as isEmpty_1 } from \"./List.js\";\nimport { fold as fold_1, fill } from \"./Array.js\";\nimport { structuralHash, toIterator, getEnumerator, isArrayLike } from \"./Util.js\";\nimport { join } from \"./String.js\";\nimport { fold as fold_3, reduce, iterate as iterate_1, map as map_1 } from \"./Seq.js\";\n\nexport class SetTreeLeaf$1 {\n constructor(k) {\n this.k = k;\n }\n}\n\nexport function SetTreeLeaf$1$reflection(gen0) {\n return class_type(\"Set.SetTreeLeaf`1\", [gen0], SetTreeLeaf$1);\n}\n\nexport function SetTreeLeaf$1_$ctor_2B595(k) {\n return new SetTreeLeaf$1(k);\n}\n\nexport function SetTreeLeaf$1__get_Key(_) {\n return _.k;\n}\n\nexport class SetTreeNode$1 extends SetTreeLeaf$1 {\n constructor(v, left, right, h) {\n super(v);\n this.left = left;\n this.right = right;\n this.h = (h | 0);\n }\n}\n\nexport function SetTreeNode$1$reflection(gen0) {\n return class_type(\"Set.SetTreeNode`1\", [gen0], SetTreeNode$1, SetTreeLeaf$1$reflection(gen0));\n}\n\nexport function SetTreeNode$1_$ctor_Z6E7BE5F7(v, left, right, h) {\n return new SetTreeNode$1(v, left, right, h);\n}\n\nexport function SetTreeNode$1__get_Left(_) {\n return _.left;\n}\n\nexport function SetTreeNode$1__get_Right(_) {\n return _.right;\n}\n\nexport function SetTreeNode$1__get_Height(_) {\n return _.h;\n}\n\nexport function SetTreeModule_empty() {\n return void 0;\n}\n\nexport function SetTreeModule_countAux(t_mut, acc_mut) {\n SetTreeModule_countAux:\n while (true) {\n const t = t_mut, acc = acc_mut;\n if (t != null) {\n const t2 = t;\n if (t2 instanceof SetTreeNode$1) {\n t_mut = SetTreeNode$1__get_Left(t2);\n acc_mut = SetTreeModule_countAux(SetTreeNode$1__get_Right(t2), acc + 1);\n continue SetTreeModule_countAux;\n }\n else {\n return (acc + 1) | 0;\n }\n }\n else {\n return acc | 0;\n }\n break;\n }\n}\n\nexport function SetTreeModule_count(s) {\n return SetTreeModule_countAux(s, 0);\n}\n\nexport function SetTreeModule_mk(l, k, r) {\n let hl;\n const t = l;\n if (t != null) {\n const t2 = t;\n hl = ((t2 instanceof SetTreeNode$1) ? SetTreeNode$1__get_Height(t2) : 1);\n }\n else {\n hl = 0;\n }\n let hr;\n const t_1 = r;\n if (t_1 != null) {\n const t2_1 = t_1;\n hr = ((t2_1 instanceof SetTreeNode$1) ? SetTreeNode$1__get_Height(t2_1) : 1);\n }\n else {\n hr = 0;\n }\n const m = ((hl < hr) ? hr : hl) | 0;\n if (m === 0) {\n return SetTreeLeaf$1_$ctor_2B595(k);\n }\n else {\n return SetTreeNode$1_$ctor_Z6E7BE5F7(k, l, r, m + 1);\n }\n}\n\nexport function SetTreeModule_rebalance(t1, v, t2) {\n let t_2, t2_3, t_3, t2_4;\n let t1h;\n const t = t1;\n if (t != null) {\n const t2_1 = t;\n t1h = ((t2_1 instanceof SetTreeNode$1) ? SetTreeNode$1__get_Height(t2_1) : 1);\n }\n else {\n t1h = 0;\n }\n let t2h;\n const t_1 = t2;\n if (t_1 != null) {\n const t2_2 = t_1;\n t2h = ((t2_2 instanceof SetTreeNode$1) ? SetTreeNode$1__get_Height(t2_2) : 1);\n }\n else {\n t2h = 0;\n }\n if (t2h > (t1h + 2)) {\n const matchValue = value_1(t2);\n if (matchValue instanceof SetTreeNode$1) {\n if ((t_2 = SetTreeNode$1__get_Left(matchValue), (t_2 != null) ? (t2_3 = t_2, (t2_3 instanceof SetTreeNode$1) ? SetTreeNode$1__get_Height(t2_3) : 1) : 0) > (t1h + 1)) {\n const matchValue_1 = value_1(SetTreeNode$1__get_Left(matchValue));\n if (matchValue_1 instanceof SetTreeNode$1) {\n return SetTreeModule_mk(SetTreeModule_mk(t1, v, SetTreeNode$1__get_Left(matchValue_1)), SetTreeLeaf$1__get_Key(matchValue_1), SetTreeModule_mk(SetTreeNode$1__get_Right(matchValue_1), SetTreeLeaf$1__get_Key(matchValue), SetTreeNode$1__get_Right(matchValue)));\n }\n else {\n throw (new Error(\"internal error: Set.rebalance\"));\n }\n }\n else {\n return SetTreeModule_mk(SetTreeModule_mk(t1, v, SetTreeNode$1__get_Left(matchValue)), SetTreeLeaf$1__get_Key(matchValue), SetTreeNode$1__get_Right(matchValue));\n }\n }\n else {\n throw (new Error(\"internal error: Set.rebalance\"));\n }\n }\n else if (t1h > (t2h + 2)) {\n const matchValue_2 = value_1(t1);\n if (matchValue_2 instanceof SetTreeNode$1) {\n if ((t_3 = SetTreeNode$1__get_Right(matchValue_2), (t_3 != null) ? (t2_4 = t_3, (t2_4 instanceof SetTreeNode$1) ? SetTreeNode$1__get_Height(t2_4) : 1) : 0) > (t2h + 1)) {\n const matchValue_3 = value_1(SetTreeNode$1__get_Right(matchValue_2));\n if (matchValue_3 instanceof SetTreeNode$1) {\n return SetTreeModule_mk(SetTreeModule_mk(SetTreeNode$1__get_Left(matchValue_2), SetTreeLeaf$1__get_Key(matchValue_2), SetTreeNode$1__get_Left(matchValue_3)), SetTreeLeaf$1__get_Key(matchValue_3), SetTreeModule_mk(SetTreeNode$1__get_Right(matchValue_3), v, t2));\n }\n else {\n throw (new Error(\"internal error: Set.rebalance\"));\n }\n }\n else {\n return SetTreeModule_mk(SetTreeNode$1__get_Left(matchValue_2), SetTreeLeaf$1__get_Key(matchValue_2), SetTreeModule_mk(SetTreeNode$1__get_Right(matchValue_2), v, t2));\n }\n }\n else {\n throw (new Error(\"internal error: Set.rebalance\"));\n }\n }\n else {\n return SetTreeModule_mk(t1, v, t2);\n }\n}\n\nexport function SetTreeModule_add(comparer, k, t) {\n if (t != null) {\n const t2 = t;\n const c = comparer.Compare(k, SetTreeLeaf$1__get_Key(t2)) | 0;\n if (t2 instanceof SetTreeNode$1) {\n if (c < 0) {\n return SetTreeModule_rebalance(SetTreeModule_add(comparer, k, SetTreeNode$1__get_Left(t2)), SetTreeLeaf$1__get_Key(t2), SetTreeNode$1__get_Right(t2));\n }\n else if (c === 0) {\n return t;\n }\n else {\n return SetTreeModule_rebalance(SetTreeNode$1__get_Left(t2), SetTreeLeaf$1__get_Key(t2), SetTreeModule_add(comparer, k, SetTreeNode$1__get_Right(t2)));\n }\n }\n else {\n const c_1 = comparer.Compare(k, SetTreeLeaf$1__get_Key(t2)) | 0;\n if (c_1 < 0) {\n return SetTreeNode$1_$ctor_Z6E7BE5F7(k, SetTreeModule_empty(), t, 2);\n }\n else if (c_1 === 0) {\n return t;\n }\n else {\n return SetTreeNode$1_$ctor_Z6E7BE5F7(k, t, SetTreeModule_empty(), 2);\n }\n }\n }\n else {\n return SetTreeLeaf$1_$ctor_2B595(k);\n }\n}\n\nexport function SetTreeModule_balance(comparer, t1, k, t2) {\n if (t1 != null) {\n const t1$0027 = t1;\n if (t2 != null) {\n const t2$0027 = t2;\n if (t1$0027 instanceof SetTreeNode$1) {\n if (t2$0027 instanceof SetTreeNode$1) {\n if ((SetTreeNode$1__get_Height(t1$0027) + 2) < SetTreeNode$1__get_Height(t2$0027)) {\n return SetTreeModule_rebalance(SetTreeModule_balance(comparer, t1, k, SetTreeNode$1__get_Left(t2$0027)), SetTreeLeaf$1__get_Key(t2$0027), SetTreeNode$1__get_Right(t2$0027));\n }\n else if ((SetTreeNode$1__get_Height(t2$0027) + 2) < SetTreeNode$1__get_Height(t1$0027)) {\n return SetTreeModule_rebalance(SetTreeNode$1__get_Left(t1$0027), SetTreeLeaf$1__get_Key(t1$0027), SetTreeModule_balance(comparer, SetTreeNode$1__get_Right(t1$0027), k, t2));\n }\n else {\n return SetTreeModule_mk(t1, k, t2);\n }\n }\n else {\n return SetTreeModule_add(comparer, k, SetTreeModule_add(comparer, SetTreeLeaf$1__get_Key(t2$0027), t1));\n }\n }\n else {\n return SetTreeModule_add(comparer, k, SetTreeModule_add(comparer, SetTreeLeaf$1__get_Key(t1$0027), t2));\n }\n }\n else {\n return SetTreeModule_add(comparer, k, t1);\n }\n }\n else {\n return SetTreeModule_add(comparer, k, t2);\n }\n}\n\nexport function SetTreeModule_split(comparer, pivot, t) {\n if (t != null) {\n const t2 = t;\n if (t2 instanceof SetTreeNode$1) {\n const c = comparer.Compare(pivot, SetTreeLeaf$1__get_Key(t2)) | 0;\n if (c < 0) {\n const patternInput = SetTreeModule_split(comparer, pivot, SetTreeNode$1__get_Left(t2));\n return [patternInput[0], patternInput[1], SetTreeModule_balance(comparer, patternInput[2], SetTreeLeaf$1__get_Key(t2), SetTreeNode$1__get_Right(t2))];\n }\n else if (c === 0) {\n return [SetTreeNode$1__get_Left(t2), true, SetTreeNode$1__get_Right(t2)];\n }\n else {\n const patternInput_1 = SetTreeModule_split(comparer, pivot, SetTreeNode$1__get_Right(t2));\n return [SetTreeModule_balance(comparer, SetTreeNode$1__get_Left(t2), SetTreeLeaf$1__get_Key(t2), patternInput_1[0]), patternInput_1[1], patternInput_1[2]];\n }\n }\n else {\n const c_1 = comparer.Compare(SetTreeLeaf$1__get_Key(t2), pivot) | 0;\n if (c_1 < 0) {\n return [t, false, SetTreeModule_empty()];\n }\n else if (c_1 === 0) {\n return [SetTreeModule_empty(), true, SetTreeModule_empty()];\n }\n else {\n return [SetTreeModule_empty(), false, t];\n }\n }\n }\n else {\n return [SetTreeModule_empty(), false, SetTreeModule_empty()];\n }\n}\n\nexport function SetTreeModule_spliceOutSuccessor(t) {\n if (t != null) {\n const t2 = t;\n if (t2 instanceof SetTreeNode$1) {\n if (SetTreeNode$1__get_Left(t2) == null) {\n return [SetTreeLeaf$1__get_Key(t2), SetTreeNode$1__get_Right(t2)];\n }\n else {\n const patternInput = SetTreeModule_spliceOutSuccessor(SetTreeNode$1__get_Left(t2));\n return [patternInput[0], SetTreeModule_mk(patternInput[1], SetTreeLeaf$1__get_Key(t2), SetTreeNode$1__get_Right(t2))];\n }\n }\n else {\n return [SetTreeLeaf$1__get_Key(t2), SetTreeModule_empty()];\n }\n }\n else {\n throw (new Error(\"internal error: Set.spliceOutSuccessor\"));\n }\n}\n\nexport function SetTreeModule_remove(comparer, k, t) {\n if (t != null) {\n const t2 = t;\n const c = comparer.Compare(k, SetTreeLeaf$1__get_Key(t2)) | 0;\n if (t2 instanceof SetTreeNode$1) {\n if (c < 0) {\n return SetTreeModule_rebalance(SetTreeModule_remove(comparer, k, SetTreeNode$1__get_Left(t2)), SetTreeLeaf$1__get_Key(t2), SetTreeNode$1__get_Right(t2));\n }\n else if (c === 0) {\n if (SetTreeNode$1__get_Left(t2) == null) {\n return SetTreeNode$1__get_Right(t2);\n }\n else if (SetTreeNode$1__get_Right(t2) == null) {\n return SetTreeNode$1__get_Left(t2);\n }\n else {\n const patternInput = SetTreeModule_spliceOutSuccessor(SetTreeNode$1__get_Right(t2));\n return SetTreeModule_mk(SetTreeNode$1__get_Left(t2), patternInput[0], patternInput[1]);\n }\n }\n else {\n return SetTreeModule_rebalance(SetTreeNode$1__get_Left(t2), SetTreeLeaf$1__get_Key(t2), SetTreeModule_remove(comparer, k, SetTreeNode$1__get_Right(t2)));\n }\n }\n else if (c === 0) {\n return SetTreeModule_empty();\n }\n else {\n return t;\n }\n }\n else {\n return t;\n }\n}\n\nexport function SetTreeModule_mem(comparer_mut, k_mut, t_mut) {\n SetTreeModule_mem:\n while (true) {\n const comparer = comparer_mut, k = k_mut, t = t_mut;\n if (t != null) {\n const t2 = t;\n const c = comparer.Compare(k, SetTreeLeaf$1__get_Key(t2)) | 0;\n if (t2 instanceof SetTreeNode$1) {\n if (c < 0) {\n comparer_mut = comparer;\n k_mut = k;\n t_mut = SetTreeNode$1__get_Left(t2);\n continue SetTreeModule_mem;\n }\n else if (c === 0) {\n return true;\n }\n else {\n comparer_mut = comparer;\n k_mut = k;\n t_mut = SetTreeNode$1__get_Right(t2);\n continue SetTreeModule_mem;\n }\n }\n else {\n return c === 0;\n }\n }\n else {\n return false;\n }\n break;\n }\n}\n\nexport function SetTreeModule_iter(f_mut, t_mut) {\n SetTreeModule_iter:\n while (true) {\n const f = f_mut, t = t_mut;\n if (t != null) {\n const t2 = t;\n if (t2 instanceof SetTreeNode$1) {\n SetTreeModule_iter(f, SetTreeNode$1__get_Left(t2));\n f(SetTreeLeaf$1__get_Key(t2));\n f_mut = f;\n t_mut = SetTreeNode$1__get_Right(t2);\n continue SetTreeModule_iter;\n }\n else {\n f(SetTreeLeaf$1__get_Key(t2));\n }\n }\n break;\n }\n}\n\nexport function SetTreeModule_foldBackOpt(f_mut, t_mut, x_mut) {\n SetTreeModule_foldBackOpt:\n while (true) {\n const f = f_mut, t = t_mut, x = x_mut;\n if (t != null) {\n const t2 = t;\n if (t2 instanceof SetTreeNode$1) {\n f_mut = f;\n t_mut = SetTreeNode$1__get_Left(t2);\n x_mut = f(SetTreeLeaf$1__get_Key(t2), SetTreeModule_foldBackOpt(f, SetTreeNode$1__get_Right(t2), x));\n continue SetTreeModule_foldBackOpt;\n }\n else {\n return f(SetTreeLeaf$1__get_Key(t2), x);\n }\n }\n else {\n return x;\n }\n break;\n }\n}\n\nexport function SetTreeModule_foldBack(f, m, x) {\n return SetTreeModule_foldBackOpt(f, m, x);\n}\n\nexport function SetTreeModule_foldOpt(f_mut, x_mut, t_mut) {\n SetTreeModule_foldOpt:\n while (true) {\n const f = f_mut, x = x_mut, t = t_mut;\n if (t != null) {\n const t2 = t;\n if (t2 instanceof SetTreeNode$1) {\n f_mut = f;\n x_mut = f(SetTreeModule_foldOpt(f, x, SetTreeNode$1__get_Left(t2)), SetTreeLeaf$1__get_Key(t2));\n t_mut = SetTreeNode$1__get_Right(t2);\n continue SetTreeModule_foldOpt;\n }\n else {\n return f(x, SetTreeLeaf$1__get_Key(t2));\n }\n }\n else {\n return x;\n }\n break;\n }\n}\n\nexport function SetTreeModule_fold(f, x, m) {\n return SetTreeModule_foldOpt(f, x, m);\n}\n\nexport function SetTreeModule_forall(f_mut, t_mut) {\n SetTreeModule_forall:\n while (true) {\n const f = f_mut, t = t_mut;\n if (t != null) {\n const t2 = t;\n if (t2 instanceof SetTreeNode$1) {\n if (f(SetTreeLeaf$1__get_Key(t2)) ? SetTreeModule_forall(f, SetTreeNode$1__get_Left(t2)) : false) {\n f_mut = f;\n t_mut = SetTreeNode$1__get_Right(t2);\n continue SetTreeModule_forall;\n }\n else {\n return false;\n }\n }\n else {\n return f(SetTreeLeaf$1__get_Key(t2));\n }\n }\n else {\n return true;\n }\n break;\n }\n}\n\nexport function SetTreeModule_exists(f_mut, t_mut) {\n SetTreeModule_exists:\n while (true) {\n const f = f_mut, t = t_mut;\n if (t != null) {\n const t2 = t;\n if (t2 instanceof SetTreeNode$1) {\n if (f(SetTreeLeaf$1__get_Key(t2)) ? true : SetTreeModule_exists(f, SetTreeNode$1__get_Left(t2))) {\n return true;\n }\n else {\n f_mut = f;\n t_mut = SetTreeNode$1__get_Right(t2);\n continue SetTreeModule_exists;\n }\n }\n else {\n return f(SetTreeLeaf$1__get_Key(t2));\n }\n }\n else {\n return false;\n }\n break;\n }\n}\n\nexport function SetTreeModule_subset(comparer, a, b) {\n return SetTreeModule_forall((x) => SetTreeModule_mem(comparer, x, b), a);\n}\n\nexport function SetTreeModule_properSubset(comparer, a, b) {\n if (SetTreeModule_forall((x) => SetTreeModule_mem(comparer, x, b), a)) {\n return SetTreeModule_exists((x_1) => (!SetTreeModule_mem(comparer, x_1, a)), b);\n }\n else {\n return false;\n }\n}\n\nexport function SetTreeModule_filterAux(comparer_mut, f_mut, t_mut, acc_mut) {\n SetTreeModule_filterAux:\n while (true) {\n const comparer = comparer_mut, f = f_mut, t = t_mut, acc = acc_mut;\n if (t != null) {\n const t2 = t;\n if (t2 instanceof SetTreeNode$1) {\n const acc_1 = f(SetTreeLeaf$1__get_Key(t2)) ? SetTreeModule_add(comparer, SetTreeLeaf$1__get_Key(t2), acc) : acc;\n comparer_mut = comparer;\n f_mut = f;\n t_mut = SetTreeNode$1__get_Left(t2);\n acc_mut = SetTreeModule_filterAux(comparer, f, SetTreeNode$1__get_Right(t2), acc_1);\n continue SetTreeModule_filterAux;\n }\n else if (f(SetTreeLeaf$1__get_Key(t2))) {\n return SetTreeModule_add(comparer, SetTreeLeaf$1__get_Key(t2), acc);\n }\n else {\n return acc;\n }\n }\n else {\n return acc;\n }\n break;\n }\n}\n\nexport function SetTreeModule_filter(comparer, f, s) {\n return SetTreeModule_filterAux(comparer, f, s, SetTreeModule_empty());\n}\n\nexport function SetTreeModule_diffAux(comparer_mut, t_mut, acc_mut) {\n SetTreeModule_diffAux:\n while (true) {\n const comparer = comparer_mut, t = t_mut, acc = acc_mut;\n if (acc == null) {\n return acc;\n }\n else if (t != null) {\n const t2 = t;\n if (t2 instanceof SetTreeNode$1) {\n comparer_mut = comparer;\n t_mut = SetTreeNode$1__get_Left(t2);\n acc_mut = SetTreeModule_diffAux(comparer, SetTreeNode$1__get_Right(t2), SetTreeModule_remove(comparer, SetTreeLeaf$1__get_Key(t2), acc));\n continue SetTreeModule_diffAux;\n }\n else {\n return SetTreeModule_remove(comparer, SetTreeLeaf$1__get_Key(t2), acc);\n }\n }\n else {\n return acc;\n }\n break;\n }\n}\n\nexport function SetTreeModule_diff(comparer, a, b) {\n return SetTreeModule_diffAux(comparer, b, a);\n}\n\nexport function SetTreeModule_union(comparer, t1, t2) {\n if (t1 != null) {\n const t1$0027 = t1;\n if (t2 != null) {\n const t2$0027 = t2;\n if (t1$0027 instanceof SetTreeNode$1) {\n if (t2$0027 instanceof SetTreeNode$1) {\n if (SetTreeNode$1__get_Height(t1$0027) > SetTreeNode$1__get_Height(t2$0027)) {\n const patternInput = SetTreeModule_split(comparer, SetTreeLeaf$1__get_Key(t1$0027), t2);\n return SetTreeModule_balance(comparer, SetTreeModule_union(comparer, SetTreeNode$1__get_Left(t1$0027), patternInput[0]), SetTreeLeaf$1__get_Key(t1$0027), SetTreeModule_union(comparer, SetTreeNode$1__get_Right(t1$0027), patternInput[2]));\n }\n else {\n const patternInput_1 = SetTreeModule_split(comparer, SetTreeLeaf$1__get_Key(t2$0027), t1);\n return SetTreeModule_balance(comparer, SetTreeModule_union(comparer, SetTreeNode$1__get_Left(t2$0027), patternInput_1[0]), SetTreeLeaf$1__get_Key(t2$0027), SetTreeModule_union(comparer, SetTreeNode$1__get_Right(t2$0027), patternInput_1[2]));\n }\n }\n else {\n return SetTreeModule_add(comparer, SetTreeLeaf$1__get_Key(t2$0027), t1);\n }\n }\n else {\n return SetTreeModule_add(comparer, SetTreeLeaf$1__get_Key(t1$0027), t2);\n }\n }\n else {\n return t1;\n }\n }\n else {\n return t2;\n }\n}\n\nexport function SetTreeModule_intersectionAux(comparer_mut, b_mut, t_mut, acc_mut) {\n SetTreeModule_intersectionAux:\n while (true) {\n const comparer = comparer_mut, b = b_mut, t = t_mut, acc = acc_mut;\n if (t != null) {\n const t2 = t;\n if (t2 instanceof SetTreeNode$1) {\n const acc_1 = SetTreeModule_intersectionAux(comparer, b, SetTreeNode$1__get_Right(t2), acc);\n const acc_2 = SetTreeModule_mem(comparer, SetTreeLeaf$1__get_Key(t2), b) ? SetTreeModule_add(comparer, SetTreeLeaf$1__get_Key(t2), acc_1) : acc_1;\n comparer_mut = comparer;\n b_mut = b;\n t_mut = SetTreeNode$1__get_Left(t2);\n acc_mut = acc_2;\n continue SetTreeModule_intersectionAux;\n }\n else if (SetTreeModule_mem(comparer, SetTreeLeaf$1__get_Key(t2), b)) {\n return SetTreeModule_add(comparer, SetTreeLeaf$1__get_Key(t2), acc);\n }\n else {\n return acc;\n }\n }\n else {\n return acc;\n }\n break;\n }\n}\n\nexport function SetTreeModule_intersection(comparer, a, b) {\n return SetTreeModule_intersectionAux(comparer, b, a, SetTreeModule_empty());\n}\n\nexport function SetTreeModule_partition1(comparer, f, k, acc1, acc2) {\n if (f(k)) {\n return [SetTreeModule_add(comparer, k, acc1), acc2];\n }\n else {\n return [acc1, SetTreeModule_add(comparer, k, acc2)];\n }\n}\n\nexport function SetTreeModule_partitionAux(comparer_mut, f_mut, t_mut, acc_0_mut, acc_1_mut) {\n SetTreeModule_partitionAux:\n while (true) {\n const comparer = comparer_mut, f = f_mut, t = t_mut, acc_0 = acc_0_mut, acc_1 = acc_1_mut;\n const acc = [acc_0, acc_1];\n if (t != null) {\n const t2 = t;\n if (t2 instanceof SetTreeNode$1) {\n const acc_2 = SetTreeModule_partitionAux(comparer, f, SetTreeNode$1__get_Right(t2), acc[0], acc[1]);\n const acc_3 = SetTreeModule_partition1(comparer, f, SetTreeLeaf$1__get_Key(t2), acc_2[0], acc_2[1]);\n comparer_mut = comparer;\n f_mut = f;\n t_mut = SetTreeNode$1__get_Left(t2);\n acc_0_mut = acc_3[0];\n acc_1_mut = acc_3[1];\n continue SetTreeModule_partitionAux;\n }\n else {\n return SetTreeModule_partition1(comparer, f, SetTreeLeaf$1__get_Key(t2), acc[0], acc[1]);\n }\n }\n else {\n return acc;\n }\n break;\n }\n}\n\nexport function SetTreeModule_partition(comparer, f, s) {\n return SetTreeModule_partitionAux(comparer, f, s, SetTreeModule_empty(), SetTreeModule_empty());\n}\n\nexport function SetTreeModule_minimumElementAux(t_mut, n_mut) {\n SetTreeModule_minimumElementAux:\n while (true) {\n const t = t_mut, n = n_mut;\n if (t != null) {\n const t2 = t;\n if (t2 instanceof SetTreeNode$1) {\n t_mut = SetTreeNode$1__get_Left(t2);\n n_mut = SetTreeLeaf$1__get_Key(t2);\n continue SetTreeModule_minimumElementAux;\n }\n else {\n return SetTreeLeaf$1__get_Key(t2);\n }\n }\n else {\n return n;\n }\n break;\n }\n}\n\nexport function SetTreeModule_minimumElementOpt(t) {\n if (t != null) {\n const t2 = t;\n if (t2 instanceof SetTreeNode$1) {\n return some(SetTreeModule_minimumElementAux(SetTreeNode$1__get_Left(t2), SetTreeLeaf$1__get_Key(t2)));\n }\n else {\n return some(SetTreeLeaf$1__get_Key(t2));\n }\n }\n else {\n return void 0;\n }\n}\n\nexport function SetTreeModule_maximumElementAux(t_mut, n_mut) {\n SetTreeModule_maximumElementAux:\n while (true) {\n const t = t_mut, n = n_mut;\n if (t != null) {\n const t2 = t;\n if (t2 instanceof SetTreeNode$1) {\n t_mut = SetTreeNode$1__get_Right(t2);\n n_mut = SetTreeLeaf$1__get_Key(t2);\n continue SetTreeModule_maximumElementAux;\n }\n else {\n return SetTreeLeaf$1__get_Key(t2);\n }\n }\n else {\n return n;\n }\n break;\n }\n}\n\nexport function SetTreeModule_maximumElementOpt(t) {\n if (t != null) {\n const t2 = t;\n if (t2 instanceof SetTreeNode$1) {\n return some(SetTreeModule_maximumElementAux(SetTreeNode$1__get_Right(t2), SetTreeLeaf$1__get_Key(t2)));\n }\n else {\n return some(SetTreeLeaf$1__get_Key(t2));\n }\n }\n else {\n return void 0;\n }\n}\n\nexport function SetTreeModule_minimumElement(s) {\n const matchValue = SetTreeModule_minimumElementOpt(s);\n if (matchValue == null) {\n throw (new Error(\"Set contains no elements\"));\n }\n else {\n return value_1(matchValue);\n }\n}\n\nexport function SetTreeModule_maximumElement(s) {\n const matchValue = SetTreeModule_maximumElementOpt(s);\n if (matchValue == null) {\n throw (new Error(\"Set contains no elements\"));\n }\n else {\n return value_1(matchValue);\n }\n}\n\nexport class SetTreeModule_SetIterator$1 extends Record {\n constructor(stack, started) {\n super();\n this.stack = stack;\n this.started = started;\n }\n}\n\nexport function SetTreeModule_SetIterator$1$reflection(gen0) {\n return record_type(\"Set.SetTreeModule.SetIterator`1\", [gen0], SetTreeModule_SetIterator$1, () => [[\"stack\", list_type(option_type(SetTreeLeaf$1$reflection(gen0)))], [\"started\", bool_type]]);\n}\n\nexport function SetTreeModule_collapseLHS(stack_mut) {\n SetTreeModule_collapseLHS:\n while (true) {\n const stack = stack_mut;\n if (!isEmpty_1(stack)) {\n const x = head(stack);\n const rest = tail(stack);\n if (x != null) {\n const x2 = x;\n if (x2 instanceof SetTreeNode$1) {\n stack_mut = ofArrayWithTail([SetTreeNode$1__get_Left(x2), SetTreeLeaf$1_$ctor_2B595(SetTreeLeaf$1__get_Key(x2)), SetTreeNode$1__get_Right(x2)], rest);\n continue SetTreeModule_collapseLHS;\n }\n else {\n return stack;\n }\n }\n else {\n stack_mut = rest;\n continue SetTreeModule_collapseLHS;\n }\n }\n else {\n return empty_1();\n }\n break;\n }\n}\n\nexport function SetTreeModule_mkIterator(s) {\n return new SetTreeModule_SetIterator$1(SetTreeModule_collapseLHS(singleton_1(s)), false);\n}\n\nexport function SetTreeModule_notStarted() {\n throw (new Error(\"Enumeration not started\"));\n}\n\nexport function SetTreeModule_alreadyFinished() {\n throw (new Error(\"Enumeration already started\"));\n}\n\nexport function SetTreeModule_current(i) {\n if (i.started) {\n const matchValue = i.stack;\n if (isEmpty_1(matchValue)) {\n return SetTreeModule_alreadyFinished();\n }\n else if (head(matchValue) != null) {\n const t = head(matchValue);\n return SetTreeLeaf$1__get_Key(t);\n }\n else {\n throw (new Error(\"Please report error: Set iterator, unexpected stack for current\"));\n }\n }\n else {\n return SetTreeModule_notStarted();\n }\n}\n\nexport function SetTreeModule_moveNext(i) {\n if (i.started) {\n const matchValue = i.stack;\n if (!isEmpty_1(matchValue)) {\n if (head(matchValue) != null) {\n const t = head(matchValue);\n if (t instanceof SetTreeNode$1) {\n throw (new Error(\"Please report error: Set iterator, unexpected stack for moveNext\"));\n }\n else {\n i.stack = SetTreeModule_collapseLHS(tail(matchValue));\n return !isEmpty_1(i.stack);\n }\n }\n else {\n throw (new Error(\"Please report error: Set iterator, unexpected stack for moveNext\"));\n }\n }\n else {\n return false;\n }\n }\n else {\n i.started = true;\n return !isEmpty_1(i.stack);\n }\n}\n\nexport function SetTreeModule_mkIEnumerator(s) {\n let i = SetTreeModule_mkIterator(s);\n return {\n [\"System.Collections.Generic.IEnumerator`1.get_Current\"]() {\n return SetTreeModule_current(i);\n },\n [\"System.Collections.IEnumerator.get_Current\"]() {\n return SetTreeModule_current(i);\n },\n [\"System.Collections.IEnumerator.MoveNext\"]() {\n return SetTreeModule_moveNext(i);\n },\n [\"System.Collections.IEnumerator.Reset\"]() {\n i = SetTreeModule_mkIterator(s);\n },\n Dispose() {\n },\n };\n}\n\nexport function SetTreeModule_compareStacks(comparer_mut, l1_mut, l2_mut) {\n SetTreeModule_compareStacks:\n while (true) {\n const comparer = comparer_mut, l1 = l1_mut, l2 = l2_mut;\n const matchValue = [l1, l2];\n if (!isEmpty_1(matchValue[0])) {\n if (!isEmpty_1(matchValue[1])) {\n if (head(matchValue[1]) != null) {\n if (head(matchValue[0]) != null) {\n const x1_3 = head(matchValue[0]);\n const x2_3 = head(matchValue[1]);\n if (x1_3 instanceof SetTreeNode$1) {\n if (SetTreeNode$1__get_Left(x1_3) == null) {\n if (x2_3 instanceof SetTreeNode$1) {\n if (SetTreeNode$1__get_Left(x2_3) == null) {\n const c = comparer.Compare(SetTreeLeaf$1__get_Key(x1_3), SetTreeLeaf$1__get_Key(x2_3)) | 0;\n if (c !== 0) {\n return c | 0;\n }\n else {\n comparer_mut = comparer;\n l1_mut = cons(SetTreeNode$1__get_Right(x1_3), tail(matchValue[0]));\n l2_mut = cons(SetTreeNode$1__get_Right(x2_3), tail(matchValue[1]));\n continue SetTreeModule_compareStacks;\n }\n }\n else {\n const matchValue_3 = [l1, l2];\n let pattern_matching_result, t1_6, x1_4, t2_6, x2_4;\n if (!isEmpty_1(matchValue_3[0])) {\n if (head(matchValue_3[0]) != null) {\n pattern_matching_result = 0;\n t1_6 = tail(matchValue_3[0]);\n x1_4 = head(matchValue_3[0]);\n }\n else if (!isEmpty_1(matchValue_3[1])) {\n if (head(matchValue_3[1]) != null) {\n pattern_matching_result = 1;\n t2_6 = tail(matchValue_3[1]);\n x2_4 = head(matchValue_3[1]);\n }\n else {\n pattern_matching_result = 2;\n }\n }\n else {\n pattern_matching_result = 2;\n }\n }\n else if (!isEmpty_1(matchValue_3[1])) {\n if (head(matchValue_3[1]) != null) {\n pattern_matching_result = 1;\n t2_6 = tail(matchValue_3[1]);\n x2_4 = head(matchValue_3[1]);\n }\n else {\n pattern_matching_result = 2;\n }\n }\n else {\n pattern_matching_result = 2;\n }\n switch (pattern_matching_result) {\n case 0: {\n if (x1_4 instanceof SetTreeNode$1) {\n comparer_mut = comparer;\n l1_mut = ofArrayWithTail([SetTreeNode$1__get_Left(x1_4), SetTreeNode$1_$ctor_Z6E7BE5F7(SetTreeLeaf$1__get_Key(x1_4), SetTreeModule_empty(), SetTreeNode$1__get_Right(x1_4), 0)], t1_6);\n l2_mut = l2;\n continue SetTreeModule_compareStacks;\n }\n else {\n comparer_mut = comparer;\n l1_mut = ofArrayWithTail([SetTreeModule_empty(), SetTreeLeaf$1_$ctor_2B595(SetTreeLeaf$1__get_Key(x1_4))], t1_6);\n l2_mut = l2;\n continue SetTreeModule_compareStacks;\n }\n }\n case 1: {\n if (x2_4 instanceof SetTreeNode$1) {\n comparer_mut = comparer;\n l1_mut = l1;\n l2_mut = ofArrayWithTail([SetTreeNode$1__get_Left(x2_4), SetTreeNode$1_$ctor_Z6E7BE5F7(SetTreeLeaf$1__get_Key(x2_4), SetTreeModule_empty(), SetTreeNode$1__get_Right(x2_4), 0)], t2_6);\n continue SetTreeModule_compareStacks;\n }\n else {\n comparer_mut = comparer;\n l1_mut = l1;\n l2_mut = ofArrayWithTail([SetTreeModule_empty(), SetTreeLeaf$1_$ctor_2B595(SetTreeLeaf$1__get_Key(x2_4))], t2_6);\n continue SetTreeModule_compareStacks;\n }\n }\n case 2: {\n throw (new Error(\"unexpected state in SetTree.compareStacks\"));\n }\n }\n }\n }\n else {\n const c_1 = comparer.Compare(SetTreeLeaf$1__get_Key(x1_3), SetTreeLeaf$1__get_Key(x2_3)) | 0;\n if (c_1 !== 0) {\n return c_1 | 0;\n }\n else {\n comparer_mut = comparer;\n l1_mut = cons(SetTreeNode$1__get_Right(x1_3), tail(matchValue[0]));\n l2_mut = cons(SetTreeModule_empty(), tail(matchValue[1]));\n continue SetTreeModule_compareStacks;\n }\n }\n }\n else {\n const matchValue_4 = [l1, l2];\n let pattern_matching_result_1, t1_7, x1_5, t2_7, x2_5;\n if (!isEmpty_1(matchValue_4[0])) {\n if (head(matchValue_4[0]) != null) {\n pattern_matching_result_1 = 0;\n t1_7 = tail(matchValue_4[0]);\n x1_5 = head(matchValue_4[0]);\n }\n else if (!isEmpty_1(matchValue_4[1])) {\n if (head(matchValue_4[1]) != null) {\n pattern_matching_result_1 = 1;\n t2_7 = tail(matchValue_4[1]);\n x2_5 = head(matchValue_4[1]);\n }\n else {\n pattern_matching_result_1 = 2;\n }\n }\n else {\n pattern_matching_result_1 = 2;\n }\n }\n else if (!isEmpty_1(matchValue_4[1])) {\n if (head(matchValue_4[1]) != null) {\n pattern_matching_result_1 = 1;\n t2_7 = tail(matchValue_4[1]);\n x2_5 = head(matchValue_4[1]);\n }\n else {\n pattern_matching_result_1 = 2;\n }\n }\n else {\n pattern_matching_result_1 = 2;\n }\n switch (pattern_matching_result_1) {\n case 0: {\n if (x1_5 instanceof SetTreeNode$1) {\n comparer_mut = comparer;\n l1_mut = ofArrayWithTail([SetTreeNode$1__get_Left(x1_5), SetTreeNode$1_$ctor_Z6E7BE5F7(SetTreeLeaf$1__get_Key(x1_5), SetTreeModule_empty(), SetTreeNode$1__get_Right(x1_5), 0)], t1_7);\n l2_mut = l2;\n continue SetTreeModule_compareStacks;\n }\n else {\n comparer_mut = comparer;\n l1_mut = ofArrayWithTail([SetTreeModule_empty(), SetTreeLeaf$1_$ctor_2B595(SetTreeLeaf$1__get_Key(x1_5))], t1_7);\n l2_mut = l2;\n continue SetTreeModule_compareStacks;\n }\n }\n case 1: {\n if (x2_5 instanceof SetTreeNode$1) {\n comparer_mut = comparer;\n l1_mut = l1;\n l2_mut = ofArrayWithTail([SetTreeNode$1__get_Left(x2_5), SetTreeNode$1_$ctor_Z6E7BE5F7(SetTreeLeaf$1__get_Key(x2_5), SetTreeModule_empty(), SetTreeNode$1__get_Right(x2_5), 0)], t2_7);\n continue SetTreeModule_compareStacks;\n }\n else {\n comparer_mut = comparer;\n l1_mut = l1;\n l2_mut = ofArrayWithTail([SetTreeModule_empty(), SetTreeLeaf$1_$ctor_2B595(SetTreeLeaf$1__get_Key(x2_5))], t2_7);\n continue SetTreeModule_compareStacks;\n }\n }\n case 2: {\n throw (new Error(\"unexpected state in SetTree.compareStacks\"));\n }\n }\n }\n }\n else if (x2_3 instanceof SetTreeNode$1) {\n if (SetTreeNode$1__get_Left(x2_3) == null) {\n const c_2 = comparer.Compare(SetTreeLeaf$1__get_Key(x1_3), SetTreeLeaf$1__get_Key(x2_3)) | 0;\n if (c_2 !== 0) {\n return c_2 | 0;\n }\n else {\n comparer_mut = comparer;\n l1_mut = cons(SetTreeModule_empty(), tail(matchValue[0]));\n l2_mut = cons(SetTreeNode$1__get_Right(x2_3), tail(matchValue[1]));\n continue SetTreeModule_compareStacks;\n }\n }\n else {\n const matchValue_5 = [l1, l2];\n let pattern_matching_result_2, t1_8, x1_6, t2_8, x2_6;\n if (!isEmpty_1(matchValue_5[0])) {\n if (head(matchValue_5[0]) != null) {\n pattern_matching_result_2 = 0;\n t1_8 = tail(matchValue_5[0]);\n x1_6 = head(matchValue_5[0]);\n }\n else if (!isEmpty_1(matchValue_5[1])) {\n if (head(matchValue_5[1]) != null) {\n pattern_matching_result_2 = 1;\n t2_8 = tail(matchValue_5[1]);\n x2_6 = head(matchValue_5[1]);\n }\n else {\n pattern_matching_result_2 = 2;\n }\n }\n else {\n pattern_matching_result_2 = 2;\n }\n }\n else if (!isEmpty_1(matchValue_5[1])) {\n if (head(matchValue_5[1]) != null) {\n pattern_matching_result_2 = 1;\n t2_8 = tail(matchValue_5[1]);\n x2_6 = head(matchValue_5[1]);\n }\n else {\n pattern_matching_result_2 = 2;\n }\n }\n else {\n pattern_matching_result_2 = 2;\n }\n switch (pattern_matching_result_2) {\n case 0: {\n if (x1_6 instanceof SetTreeNode$1) {\n comparer_mut = comparer;\n l1_mut = ofArrayWithTail([SetTreeNode$1__get_Left(x1_6), SetTreeNode$1_$ctor_Z6E7BE5F7(SetTreeLeaf$1__get_Key(x1_6), SetTreeModule_empty(), SetTreeNode$1__get_Right(x1_6), 0)], t1_8);\n l2_mut = l2;\n continue SetTreeModule_compareStacks;\n }\n else {\n comparer_mut = comparer;\n l1_mut = ofArrayWithTail([SetTreeModule_empty(), SetTreeLeaf$1_$ctor_2B595(SetTreeLeaf$1__get_Key(x1_6))], t1_8);\n l2_mut = l2;\n continue SetTreeModule_compareStacks;\n }\n }\n case 1: {\n if (x2_6 instanceof SetTreeNode$1) {\n comparer_mut = comparer;\n l1_mut = l1;\n l2_mut = ofArrayWithTail([SetTreeNode$1__get_Left(x2_6), SetTreeNode$1_$ctor_Z6E7BE5F7(SetTreeLeaf$1__get_Key(x2_6), SetTreeModule_empty(), SetTreeNode$1__get_Right(x2_6), 0)], t2_8);\n continue SetTreeModule_compareStacks;\n }\n else {\n comparer_mut = comparer;\n l1_mut = l1;\n l2_mut = ofArrayWithTail([SetTreeModule_empty(), SetTreeLeaf$1_$ctor_2B595(SetTreeLeaf$1__get_Key(x2_6))], t2_8);\n continue SetTreeModule_compareStacks;\n }\n }\n case 2: {\n throw (new Error(\"unexpected state in SetTree.compareStacks\"));\n }\n }\n }\n }\n else {\n const c_3 = comparer.Compare(SetTreeLeaf$1__get_Key(x1_3), SetTreeLeaf$1__get_Key(x2_3)) | 0;\n if (c_3 !== 0) {\n return c_3 | 0;\n }\n else {\n comparer_mut = comparer;\n l1_mut = tail(matchValue[0]);\n l2_mut = tail(matchValue[1]);\n continue SetTreeModule_compareStacks;\n }\n }\n }\n else {\n const x2 = head(matchValue[1]);\n const matchValue_1 = [l1, l2];\n let pattern_matching_result_3, t1_2, x1, t2_2, x2_1;\n if (!isEmpty_1(matchValue_1[0])) {\n if (head(matchValue_1[0]) != null) {\n pattern_matching_result_3 = 0;\n t1_2 = tail(matchValue_1[0]);\n x1 = head(matchValue_1[0]);\n }\n else if (!isEmpty_1(matchValue_1[1])) {\n if (head(matchValue_1[1]) != null) {\n pattern_matching_result_3 = 1;\n t2_2 = tail(matchValue_1[1]);\n x2_1 = head(matchValue_1[1]);\n }\n else {\n pattern_matching_result_3 = 2;\n }\n }\n else {\n pattern_matching_result_3 = 2;\n }\n }\n else if (!isEmpty_1(matchValue_1[1])) {\n if (head(matchValue_1[1]) != null) {\n pattern_matching_result_3 = 1;\n t2_2 = tail(matchValue_1[1]);\n x2_1 = head(matchValue_1[1]);\n }\n else {\n pattern_matching_result_3 = 2;\n }\n }\n else {\n pattern_matching_result_3 = 2;\n }\n switch (pattern_matching_result_3) {\n case 0: {\n if (x1 instanceof SetTreeNode$1) {\n comparer_mut = comparer;\n l1_mut = ofArrayWithTail([SetTreeNode$1__get_Left(x1), SetTreeNode$1_$ctor_Z6E7BE5F7(SetTreeLeaf$1__get_Key(x1), SetTreeModule_empty(), SetTreeNode$1__get_Right(x1), 0)], t1_2);\n l2_mut = l2;\n continue SetTreeModule_compareStacks;\n }\n else {\n comparer_mut = comparer;\n l1_mut = ofArrayWithTail([SetTreeModule_empty(), SetTreeLeaf$1_$ctor_2B595(SetTreeLeaf$1__get_Key(x1))], t1_2);\n l2_mut = l2;\n continue SetTreeModule_compareStacks;\n }\n }\n case 1: {\n if (x2_1 instanceof SetTreeNode$1) {\n comparer_mut = comparer;\n l1_mut = l1;\n l2_mut = ofArrayWithTail([SetTreeNode$1__get_Left(x2_1), SetTreeNode$1_$ctor_Z6E7BE5F7(SetTreeLeaf$1__get_Key(x2_1), SetTreeModule_empty(), SetTreeNode$1__get_Right(x2_1), 0)], t2_2);\n continue SetTreeModule_compareStacks;\n }\n else {\n comparer_mut = comparer;\n l1_mut = l1;\n l2_mut = ofArrayWithTail([SetTreeModule_empty(), SetTreeLeaf$1_$ctor_2B595(SetTreeLeaf$1__get_Key(x2_1))], t2_2);\n continue SetTreeModule_compareStacks;\n }\n }\n case 2: {\n throw (new Error(\"unexpected state in SetTree.compareStacks\"));\n }\n }\n }\n }\n else if (head(matchValue[0]) != null) {\n const x1_1 = head(matchValue[0]);\n const matchValue_2 = [l1, l2];\n let pattern_matching_result_4, t1_4, x1_2, t2_4, x2_2;\n if (!isEmpty_1(matchValue_2[0])) {\n if (head(matchValue_2[0]) != null) {\n pattern_matching_result_4 = 0;\n t1_4 = tail(matchValue_2[0]);\n x1_2 = head(matchValue_2[0]);\n }\n else if (!isEmpty_1(matchValue_2[1])) {\n if (head(matchValue_2[1]) != null) {\n pattern_matching_result_4 = 1;\n t2_4 = tail(matchValue_2[1]);\n x2_2 = head(matchValue_2[1]);\n }\n else {\n pattern_matching_result_4 = 2;\n }\n }\n else {\n pattern_matching_result_4 = 2;\n }\n }\n else if (!isEmpty_1(matchValue_2[1])) {\n if (head(matchValue_2[1]) != null) {\n pattern_matching_result_4 = 1;\n t2_4 = tail(matchValue_2[1]);\n x2_2 = head(matchValue_2[1]);\n }\n else {\n pattern_matching_result_4 = 2;\n }\n }\n else {\n pattern_matching_result_4 = 2;\n }\n switch (pattern_matching_result_4) {\n case 0: {\n if (x1_2 instanceof SetTreeNode$1) {\n comparer_mut = comparer;\n l1_mut = ofArrayWithTail([SetTreeNode$1__get_Left(x1_2), SetTreeNode$1_$ctor_Z6E7BE5F7(SetTreeLeaf$1__get_Key(x1_2), SetTreeModule_empty(), SetTreeNode$1__get_Right(x1_2), 0)], t1_4);\n l2_mut = l2;\n continue SetTreeModule_compareStacks;\n }\n else {\n comparer_mut = comparer;\n l1_mut = ofArrayWithTail([SetTreeModule_empty(), SetTreeLeaf$1_$ctor_2B595(SetTreeLeaf$1__get_Key(x1_2))], t1_4);\n l2_mut = l2;\n continue SetTreeModule_compareStacks;\n }\n }\n case 1: {\n if (x2_2 instanceof SetTreeNode$1) {\n comparer_mut = comparer;\n l1_mut = l1;\n l2_mut = ofArrayWithTail([SetTreeNode$1__get_Left(x2_2), SetTreeNode$1_$ctor_Z6E7BE5F7(SetTreeLeaf$1__get_Key(x2_2), SetTreeModule_empty(), SetTreeNode$1__get_Right(x2_2), 0)], t2_4);\n continue SetTreeModule_compareStacks;\n }\n else {\n comparer_mut = comparer;\n l1_mut = l1;\n l2_mut = ofArrayWithTail([SetTreeModule_empty(), SetTreeLeaf$1_$ctor_2B595(SetTreeLeaf$1__get_Key(x2_2))], t2_4);\n continue SetTreeModule_compareStacks;\n }\n }\n case 2: {\n throw (new Error(\"unexpected state in SetTree.compareStacks\"));\n }\n }\n }\n else {\n comparer_mut = comparer;\n l1_mut = tail(matchValue[0]);\n l2_mut = tail(matchValue[1]);\n continue SetTreeModule_compareStacks;\n }\n }\n else {\n return 1;\n }\n }\n else if (isEmpty_1(matchValue[1])) {\n return 0;\n }\n else {\n return -1;\n }\n break;\n }\n}\n\nexport function SetTreeModule_compare(comparer, t1, t2) {\n if (t1 == null) {\n if (t2 == null) {\n return 0;\n }\n else {\n return -1;\n }\n }\n else if (t2 == null) {\n return 1;\n }\n else {\n return SetTreeModule_compareStacks(comparer, singleton_1(t1), singleton_1(t2)) | 0;\n }\n}\n\nexport function SetTreeModule_choose(s) {\n return SetTreeModule_minimumElement(s);\n}\n\nexport function SetTreeModule_toList(t) {\n const loop = (t$0027_mut, acc_mut) => {\n loop:\n while (true) {\n const t$0027 = t$0027_mut, acc = acc_mut;\n if (t$0027 != null) {\n const t2 = t$0027;\n if (t2 instanceof SetTreeNode$1) {\n t$0027_mut = SetTreeNode$1__get_Left(t2);\n acc_mut = cons(SetTreeLeaf$1__get_Key(t2), loop(SetTreeNode$1__get_Right(t2), acc));\n continue loop;\n }\n else {\n return cons(SetTreeLeaf$1__get_Key(t2), acc);\n }\n }\n else {\n return acc;\n }\n break;\n }\n };\n return loop(t, empty_1());\n}\n\nexport function SetTreeModule_copyToArray(s, arr, i) {\n let j = i | 0;\n SetTreeModule_iter((x) => {\n arr[j] = x;\n j = ((j + 1) | 0);\n }, s);\n}\n\nexport function SetTreeModule_toArray(s) {\n const n = SetTreeModule_count(s) | 0;\n const res = fill(new Array(n), 0, n, null);\n SetTreeModule_copyToArray(s, res, 0);\n return res;\n}\n\nexport function SetTreeModule_mkFromEnumerator(comparer_mut, acc_mut, e_mut) {\n SetTreeModule_mkFromEnumerator:\n while (true) {\n const comparer = comparer_mut, acc = acc_mut, e = e_mut;\n if (e[\"System.Collections.IEnumerator.MoveNext\"]()) {\n comparer_mut = comparer;\n acc_mut = SetTreeModule_add(comparer, e[\"System.Collections.Generic.IEnumerator`1.get_Current\"](), acc);\n e_mut = e;\n continue SetTreeModule_mkFromEnumerator;\n }\n else {\n return acc;\n }\n break;\n }\n}\n\nexport function SetTreeModule_ofArray(comparer, l) {\n return fold_1((acc, k) => SetTreeModule_add(comparer, k, acc), SetTreeModule_empty(), l);\n}\n\nexport function SetTreeModule_ofList(comparer, l) {\n return fold_2((acc, k) => SetTreeModule_add(comparer, k, acc), SetTreeModule_empty(), l);\n}\n\nexport function SetTreeModule_ofSeq(comparer, c) {\n if (isArrayLike(c)) {\n return SetTreeModule_ofArray(comparer, c);\n }\n else if (c instanceof FSharpList) {\n return SetTreeModule_ofList(comparer, c);\n }\n else {\n const ie = getEnumerator(c);\n try {\n return SetTreeModule_mkFromEnumerator(comparer, SetTreeModule_empty(), ie);\n }\n finally {\n ie.Dispose();\n }\n }\n}\n\nexport class FSharpSet {\n constructor(comparer, tree) {\n this.comparer = comparer;\n this.tree = tree;\n }\n GetHashCode() {\n const this$ = this;\n return FSharpSet__ComputeHashCode(this$) | 0;\n }\n Equals(that) {\n const this$ = this;\n return (that instanceof FSharpSet) ? (SetTreeModule_compare(FSharpSet__get_Comparer(this$), FSharpSet__get_Tree(this$), FSharpSet__get_Tree(that)) === 0) : false;\n }\n toString() {\n const this$ = this;\n return (\"set [\" + join(\"; \", map_1((x) => {\n let copyOfStruct = x;\n return toString(copyOfStruct);\n }, this$))) + \"]\";\n }\n get [Symbol.toStringTag]() {\n return \"FSharpSet\";\n }\n toJSON(_key) {\n const this$ = this;\n return Array.from(this$);\n }\n CompareTo(that) {\n const s = this;\n return SetTreeModule_compare(FSharpSet__get_Comparer(s), FSharpSet__get_Tree(s), FSharpSet__get_Tree(that)) | 0;\n }\n [\"System.Collections.Generic.ICollection`1.Add2B595\"](x) {\n throw (new Error(\"ReadOnlyCollection\"));\n }\n [\"System.Collections.Generic.ICollection`1.Clear\"]() {\n throw (new Error(\"ReadOnlyCollection\"));\n }\n [\"System.Collections.Generic.ICollection`1.Remove2B595\"](x) {\n throw (new Error(\"ReadOnlyCollection\"));\n }\n [\"System.Collections.Generic.ICollection`1.Contains2B595\"](x) {\n const s = this;\n return SetTreeModule_mem(FSharpSet__get_Comparer(s), x, FSharpSet__get_Tree(s));\n }\n [\"System.Collections.Generic.ICollection`1.CopyToZ2E171D71\"](arr, i) {\n const s = this;\n SetTreeModule_copyToArray(FSharpSet__get_Tree(s), arr, i);\n }\n [\"System.Collections.Generic.ICollection`1.get_IsReadOnly\"]() {\n return true;\n }\n [\"System.Collections.Generic.ICollection`1.get_Count\"]() {\n const s = this;\n return FSharpSet__get_Count(s) | 0;\n }\n [\"System.Collections.Generic.IReadOnlyCollection`1.get_Count\"]() {\n const s = this;\n return FSharpSet__get_Count(s) | 0;\n }\n GetEnumerator() {\n const s = this;\n return SetTreeModule_mkIEnumerator(FSharpSet__get_Tree(s));\n }\n [Symbol.iterator]() {\n return toIterator(this.GetEnumerator());\n }\n [\"System.Collections.IEnumerable.GetEnumerator\"]() {\n const s = this;\n return SetTreeModule_mkIEnumerator(FSharpSet__get_Tree(s));\n }\n get size() {\n const s = this;\n return FSharpSet__get_Count(s) | 0;\n }\n add(k) {\n const s = this;\n throw (new Error(\"Set cannot be mutated\"));\n return s;\n }\n clear() {\n throw (new Error(\"Set cannot be mutated\"));\n }\n delete(k) {\n throw (new Error(\"Set cannot be mutated\"));\n return false;\n }\n has(k) {\n const s = this;\n return FSharpSet__Contains(s, k);\n }\n keys() {\n const s = this;\n return map_1((x) => x, s);\n }\n values() {\n const s = this;\n return map_1((x) => x, s);\n }\n entries() {\n const s = this;\n return map_1((v) => [v, v], s);\n }\n forEach(f, thisArg) {\n const s = this;\n iterate_1((x) => {\n f(x, x, s);\n }, s);\n }\n}\n\nexport function FSharpSet$reflection(gen0) {\n return class_type(\"Set.FSharpSet\", [gen0], FSharpSet);\n}\n\nexport function FSharpSet_$ctor(comparer, tree) {\n return new FSharpSet(comparer, tree);\n}\n\nexport function FSharpSet__get_Comparer(set$) {\n return set$.comparer;\n}\n\nexport function FSharpSet__get_Tree(set$) {\n return set$.tree;\n}\n\nexport function FSharpSet_Empty(comparer) {\n return FSharpSet_$ctor(comparer, SetTreeModule_empty());\n}\n\nexport function FSharpSet__Add(s, value) {\n return FSharpSet_$ctor(FSharpSet__get_Comparer(s), SetTreeModule_add(FSharpSet__get_Comparer(s), value, FSharpSet__get_Tree(s)));\n}\n\nexport function FSharpSet__Remove(s, value) {\n return FSharpSet_$ctor(FSharpSet__get_Comparer(s), SetTreeModule_remove(FSharpSet__get_Comparer(s), value, FSharpSet__get_Tree(s)));\n}\n\nexport function FSharpSet__get_Count(s) {\n return SetTreeModule_count(FSharpSet__get_Tree(s));\n}\n\nexport function FSharpSet__Contains(s, value) {\n return SetTreeModule_mem(FSharpSet__get_Comparer(s), value, FSharpSet__get_Tree(s));\n}\n\nexport function FSharpSet__Iterate(s, x) {\n SetTreeModule_iter(x, FSharpSet__get_Tree(s));\n}\n\nexport function FSharpSet__Fold(s, f, z) {\n const f_1 = f;\n return SetTreeModule_fold((x, z_1) => f_1(z_1, x), z, FSharpSet__get_Tree(s));\n}\n\nexport function FSharpSet__get_IsEmpty(s) {\n return FSharpSet__get_Tree(s) == null;\n}\n\nexport function FSharpSet__Partition(s, f) {\n if (FSharpSet__get_Tree(s) == null) {\n return [s, s];\n }\n else {\n const patternInput = SetTreeModule_partition(FSharpSet__get_Comparer(s), f, FSharpSet__get_Tree(s));\n return [FSharpSet_$ctor(FSharpSet__get_Comparer(s), patternInput[0]), FSharpSet_$ctor(FSharpSet__get_Comparer(s), patternInput[1])];\n }\n}\n\nexport function FSharpSet__Filter(s, f) {\n if (FSharpSet__get_Tree(s) == null) {\n return s;\n }\n else {\n return FSharpSet_$ctor(FSharpSet__get_Comparer(s), SetTreeModule_filter(FSharpSet__get_Comparer(s), f, FSharpSet__get_Tree(s)));\n }\n}\n\nexport function FSharpSet__Map(s, f, comparer) {\n return FSharpSet_$ctor(comparer, SetTreeModule_fold((acc, k) => SetTreeModule_add(comparer, f(k), acc), SetTreeModule_empty(), FSharpSet__get_Tree(s)));\n}\n\nexport function FSharpSet__Exists(s, f) {\n return SetTreeModule_exists(f, FSharpSet__get_Tree(s));\n}\n\nexport function FSharpSet__ForAll(s, f) {\n return SetTreeModule_forall(f, FSharpSet__get_Tree(s));\n}\n\nexport function FSharpSet_op_Subtraction(set1, set2) {\n if (FSharpSet__get_Tree(set1) == null) {\n return set1;\n }\n else if (FSharpSet__get_Tree(set2) == null) {\n return set1;\n }\n else {\n return FSharpSet_$ctor(FSharpSet__get_Comparer(set1), SetTreeModule_diff(FSharpSet__get_Comparer(set1), FSharpSet__get_Tree(set1), FSharpSet__get_Tree(set2)));\n }\n}\n\nexport function FSharpSet_op_Addition(set1, set2) {\n if (FSharpSet__get_Tree(set2) == null) {\n return set1;\n }\n else if (FSharpSet__get_Tree(set1) == null) {\n return set2;\n }\n else {\n return FSharpSet_$ctor(FSharpSet__get_Comparer(set1), SetTreeModule_union(FSharpSet__get_Comparer(set1), FSharpSet__get_Tree(set1), FSharpSet__get_Tree(set2)));\n }\n}\n\nexport function FSharpSet_Intersection(a, b) {\n if (FSharpSet__get_Tree(b) == null) {\n return b;\n }\n else if (FSharpSet__get_Tree(a) == null) {\n return a;\n }\n else {\n return FSharpSet_$ctor(FSharpSet__get_Comparer(a), SetTreeModule_intersection(FSharpSet__get_Comparer(a), FSharpSet__get_Tree(a), FSharpSet__get_Tree(b)));\n }\n}\n\nexport function FSharpSet_IntersectionMany(sets) {\n return reduce((s1, s2) => FSharpSet_Intersection(s1, s2), sets);\n}\n\nexport function FSharpSet_Equality(a, b) {\n return SetTreeModule_compare(FSharpSet__get_Comparer(a), FSharpSet__get_Tree(a), FSharpSet__get_Tree(b)) === 0;\n}\n\nexport function FSharpSet_Compare(a, b) {\n return SetTreeModule_compare(FSharpSet__get_Comparer(a), FSharpSet__get_Tree(a), FSharpSet__get_Tree(b));\n}\n\nexport function FSharpSet__get_Choose(x) {\n return SetTreeModule_choose(FSharpSet__get_Tree(x));\n}\n\nexport function FSharpSet__get_MinimumElement(x) {\n return SetTreeModule_minimumElement(FSharpSet__get_Tree(x));\n}\n\nexport function FSharpSet__get_MaximumElement(x) {\n return SetTreeModule_maximumElement(FSharpSet__get_Tree(x));\n}\n\nexport function FSharpSet__IsSubsetOf(x, otherSet) {\n return SetTreeModule_subset(FSharpSet__get_Comparer(x), FSharpSet__get_Tree(x), FSharpSet__get_Tree(otherSet));\n}\n\nexport function FSharpSet__IsSupersetOf(x, otherSet) {\n return SetTreeModule_subset(FSharpSet__get_Comparer(x), FSharpSet__get_Tree(otherSet), FSharpSet__get_Tree(x));\n}\n\nexport function FSharpSet__IsProperSubsetOf(x, otherSet) {\n return SetTreeModule_properSubset(FSharpSet__get_Comparer(x), FSharpSet__get_Tree(x), FSharpSet__get_Tree(otherSet));\n}\n\nexport function FSharpSet__IsProperSupersetOf(x, otherSet) {\n return SetTreeModule_properSubset(FSharpSet__get_Comparer(x), FSharpSet__get_Tree(otherSet), FSharpSet__get_Tree(x));\n}\n\nexport function FSharpSet__ToList(x) {\n return SetTreeModule_toList(FSharpSet__get_Tree(x));\n}\n\nexport function FSharpSet__ToArray(x) {\n return SetTreeModule_toArray(FSharpSet__get_Tree(x));\n}\n\nexport function FSharpSet__ComputeHashCode(this$) {\n let res = 0;\n const enumerator = getEnumerator(this$);\n try {\n while (enumerator[\"System.Collections.IEnumerator.MoveNext\"]()) {\n const x_1 = enumerator[\"System.Collections.Generic.IEnumerator`1.get_Current\"]();\n res = ((((res << 1) + structuralHash(x_1)) + 631) | 0);\n }\n }\n finally {\n enumerator.Dispose();\n }\n return Math.abs(res) | 0;\n}\n\nexport function isEmpty(set$) {\n return FSharpSet__get_IsEmpty(set$);\n}\n\nexport function contains(element, set$) {\n return FSharpSet__Contains(set$, element);\n}\n\nexport function add(value, set$) {\n return FSharpSet__Add(set$, value);\n}\n\nexport function singleton(value, comparer) {\n return FSharpSet__Add(FSharpSet_Empty(comparer), value);\n}\n\nexport function remove(value, set$) {\n return FSharpSet__Remove(set$, value);\n}\n\nexport function union(set1, set2) {\n return FSharpSet_op_Addition(set1, set2);\n}\n\nexport function unionMany(sets, comparer) {\n return fold_3((s1, s2) => FSharpSet_op_Addition(s1, s2), FSharpSet_Empty(comparer), sets);\n}\n\nexport function intersect(set1, set2) {\n return FSharpSet_Intersection(set1, set2);\n}\n\nexport function intersectMany(sets) {\n return FSharpSet_IntersectionMany(sets);\n}\n\nexport function iterate(action, set$) {\n FSharpSet__Iterate(set$, action);\n}\n\nexport function empty(comparer) {\n return FSharpSet_Empty(comparer);\n}\n\nexport function forAll(predicate, set$) {\n return FSharpSet__ForAll(set$, predicate);\n}\n\nexport function exists(predicate, set$) {\n return FSharpSet__Exists(set$, predicate);\n}\n\nexport function filter(predicate, set$) {\n return FSharpSet__Filter(set$, predicate);\n}\n\nexport function partition(predicate, set$) {\n return FSharpSet__Partition(set$, predicate);\n}\n\nexport function fold(folder, state, set$) {\n return SetTreeModule_fold(folder, state, FSharpSet__get_Tree(set$));\n}\n\nexport function foldBack(folder, set$, state) {\n return SetTreeModule_foldBack(folder, FSharpSet__get_Tree(set$), state);\n}\n\nexport function map(mapping, set$, comparer) {\n return FSharpSet__Map(set$, mapping, comparer);\n}\n\nexport function count(set$) {\n return FSharpSet__get_Count(set$);\n}\n\nexport function ofList(elements, comparer) {\n return FSharpSet_$ctor(comparer, SetTreeModule_ofSeq(comparer, elements));\n}\n\nexport function ofArray(array, comparer) {\n return FSharpSet_$ctor(comparer, SetTreeModule_ofArray(comparer, array));\n}\n\nexport function toList(set$) {\n return FSharpSet__ToList(set$);\n}\n\nexport function toArray(set$) {\n return FSharpSet__ToArray(set$);\n}\n\nexport function toSeq(set$) {\n return map_1((x) => x, set$);\n}\n\nexport function ofSeq(elements, comparer) {\n return FSharpSet_$ctor(comparer, SetTreeModule_ofSeq(comparer, elements));\n}\n\nexport function difference(set1, set2) {\n return FSharpSet_op_Subtraction(set1, set2);\n}\n\nexport function isSubset(set1, set2) {\n return SetTreeModule_subset(FSharpSet__get_Comparer(set1), FSharpSet__get_Tree(set1), FSharpSet__get_Tree(set2));\n}\n\nexport function isSuperset(set1, set2) {\n return SetTreeModule_subset(FSharpSet__get_Comparer(set1), FSharpSet__get_Tree(set2), FSharpSet__get_Tree(set1));\n}\n\nexport function isProperSubset(set1, set2) {\n return SetTreeModule_properSubset(FSharpSet__get_Comparer(set1), FSharpSet__get_Tree(set1), FSharpSet__get_Tree(set2));\n}\n\nexport function isProperSuperset(set1, set2) {\n return SetTreeModule_properSubset(FSharpSet__get_Comparer(set1), FSharpSet__get_Tree(set2), FSharpSet__get_Tree(set1));\n}\n\nexport function minElement(set$) {\n return FSharpSet__get_MinimumElement(set$);\n}\n\nexport function maxElement(set$) {\n return FSharpSet__get_MaximumElement(set$);\n}\n\nexport function unionWith(s1, s2) {\n return fold_3((acc, x) => acc.add(x), s1, s2);\n}\n\nexport function intersectWith(s1, s2, comparer) {\n const s2_1 = ofSeq(s2, comparer);\n const enumerator = getEnumerator(s1.keys());\n try {\n while (enumerator[\"System.Collections.IEnumerator.MoveNext\"]()) {\n const x = enumerator[\"System.Collections.Generic.IEnumerator`1.get_Current\"]();\n if (!FSharpSet__Contains(s2_1, x)) {\n void s1.delete(x);\n }\n }\n }\n finally {\n enumerator.Dispose();\n }\n}\n\nexport function exceptWith(s1, s2) {\n const enumerator = getEnumerator(s2);\n try {\n while (enumerator[\"System.Collections.IEnumerator.MoveNext\"]()) {\n void s1.delete(enumerator[\"System.Collections.Generic.IEnumerator`1.get_Current\"]());\n }\n }\n finally {\n enumerator.Dispose();\n }\n}\n\nexport function isSubsetOf(s1, s2, comparer) {\n return isSubset(ofSeq(s1.values(), comparer), ofSeq(s2, comparer));\n}\n\nexport function isSupersetOf(s1, s2, comparer) {\n return isSuperset(ofSeq(s1.values(), comparer), ofSeq(s2, comparer));\n}\n\nexport function isProperSubsetOf(s1, s2, comparer) {\n return isProperSubset(ofSeq(s1.values(), comparer), ofSeq(s2, comparer));\n}\n\nexport function isProperSupersetOf(s1, s2, comparer) {\n return isProperSuperset(ofSeq(s1.values(), comparer), ofSeq(s2, comparer));\n}\n\n","import { toFail, printf, toText, join } from \"../fable-library.3.1.12/String.js\";\nimport { Result_Map, FSharpResult$2 } from \"../fable-library.3.1.12/Choice.js\";\nimport { Util_CachedDecoders, Util_Cache$1__GetOrAdd_43981464, CaseStrategy, Util_Casing_convert, ErrorReason } from \"./Types.fs.js\";\nimport { tryParse as tryParse_2 } from \"../fable-library.3.1.12/Guid.js\";\nimport { toString as toString_12, FSharpRef } from \"../fable-library.3.1.12/Types.js\";\nimport { tryParse as tryParse_3 } from \"../fable-library.3.1.12/Int32.js\";\nimport { tryParse as tryParse_4, fromInt, fromNumber, fromBits, toNumber } from \"../fable-library.3.1.12/Long.js\";\nimport { parse, fromInt32 } from \"../fable-library.3.1.12/BigInt.js\";\nimport { tryParse as tryParse_5 } from \"../fable-library.3.1.12/Decimal.js\";\nimport Decimal from \"../fable-library.3.1.12/Decimal.js\";\nimport { toUniversalTime, tryParse as tryParse_6, minValue } from \"../fable-library.3.1.12/Date.js\";\nimport { tryParse as tryParse_7, minValue as minValue_1 } from \"../fable-library.3.1.12/DateOffset.js\";\nimport { tryParse as tryParse_8 } from \"../fable-library.3.1.12/TimeSpan.js\";\nimport { map as map_4, defaultArg, some } from \"../fable-library.3.1.12/Option.js\";\nimport { ofArray, toArray, map as map_1, length, singleton, append as append_1, tail as tail_1, head as head_1, isEmpty, ofSeq, empty, reverse, fold, tryLast, cons } from \"../fable-library.3.1.12/List.js\";\nimport { int16ToString, numberHash, mapCurriedArgs, compare, int32ToString, uncurry } from \"../fable-library.3.1.12/Util.js\";\nimport { map as map_2, tryFind, foldBack2, foldBack, fill, fold as fold_1 } from \"../fable-library.3.1.12/Array.js\";\nimport { contains, fold as fold_2, toList, append, reverse as reverse_1 } from \"../fable-library.3.1.12/Seq.js\";\nimport { empty as empty_1, map as map_3, tryFind as tryFind_1, add, ofSeq as ofSeq_1, ofList } from \"../fable-library.3.1.12/Map.js\";\nimport { getGenerics, getGenericTypeDefinition, makeTuple, getTupleElements, isTuple, isGenericType, parseEnum, getEnumValues, getEnumUnderlyingType, isEnum, getElementType, isArray, isUnion, makeRecord, getRecordElements, isRecord, fullName, getUnionCaseFields, makeUnion as makeUnion_1, getUnionCases, name as name_3, class_type } from \"../fable-library.3.1.12/Reflection.js\";\nimport { ofSeq as ofSeq_2 } from \"../fable-library.3.1.12/Set.js\";\n\nexport function Helpers_isUndefined(o) {\n return (typeof o) === \"undefined\";\n}\n\nfunction genericMsg(msg, value_1, newLine) {\n try {\n return (((\"Expecting \" + msg) + \" but instead got:\") + (newLine ? \"\\n\" : \" \")) + (JSON.stringify(value_1, null, 4) + '');\n }\n catch (matchValue) {\n return ((\"Expecting \" + msg) + \" but decoder failed. Couldn\\u0027t report given value due to circular structure.\") + (newLine ? \"\\n\" : \" \");\n }\n}\n\nfunction errorToString(path, error) {\n const reason_1 = (error.tag === 2) ? genericMsg(error.fields[0], error.fields[1], true) : ((error.tag === 1) ? ((genericMsg(error.fields[0], error.fields[1], false) + \"\\nReason: \") + error.fields[2]) : ((error.tag === 3) ? genericMsg(error.fields[0], error.fields[1], true) : ((error.tag === 4) ? (genericMsg(error.fields[0], error.fields[1], true) + ((\"\\nNode `\" + error.fields[2]) + \"` is unkown.\")) : ((error.tag === 5) ? (((\"Expecting \" + error.fields[0]) + \".\\n\") + (JSON.stringify(error.fields[1], null, 4) + '')) : ((error.tag === 7) ? (\"The following errors were found:\\n\\n\" + join(\"\\n\\n\", error.fields[0])) : ((error.tag === 6) ? (\"The following `failure` occurred with the decoder: \" + error.fields[0]) : genericMsg(error.fields[0], error.fields[1], false)))))));\n if (error.tag === 7) {\n return reason_1;\n }\n else {\n return ((\"Error at: `\" + path) + \"`\\n\") + reason_1;\n }\n}\n\nexport function fromValue(path, decoder, value_1) {\n const matchValue = decoder(path, value_1);\n if (matchValue.tag === 1) {\n const error = matchValue.fields[0];\n return new FSharpResult$2(1, errorToString(error[0], error[1]));\n }\n else {\n return new FSharpResult$2(0, matchValue.fields[0]);\n }\n}\n\nexport function fromString(decoder, value_1) {\n try {\n return fromValue(\"$\", decoder, JSON.parse(value_1));\n }\n catch (matchValue) {\n if (matchValue instanceof SyntaxError) {\n return new FSharpResult$2(1, \"Given an invalid JSON: \" + matchValue.message);\n }\n else {\n throw matchValue;\n }\n }\n}\n\nexport function unsafeFromString(decoder, value_1) {\n const matchValue = fromString(decoder, value_1);\n if (matchValue.tag === 1) {\n throw (new Error(matchValue.fields[0]));\n }\n else {\n return matchValue.fields[0];\n }\n}\n\nexport function decodeValue(path, decoder) {\n const decoder_1 = decoder;\n return (value_1) => fromValue(path, decoder_1, value_1);\n}\n\nexport function decodeString(decoder) {\n const decoder_1 = decoder;\n return (value_1) => fromString(decoder_1, value_1);\n}\n\nexport function string(path, value_1) {\n if ((typeof value_1) === \"string\") {\n return new FSharpResult$2(0, value_1);\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"a string\", value_1)]);\n }\n}\n\nexport function guid(path, value_1) {\n if ((typeof value_1) === \"string\") {\n let matchValue;\n let outArg = \"00000000-0000-0000-0000-000000000000\";\n matchValue = [tryParse_2(value_1, new FSharpRef(() => outArg, (v) => {\n outArg = v;\n })), outArg];\n if (matchValue[0]) {\n return new FSharpResult$2(0, matchValue[1]);\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"a guid\", value_1)]);\n }\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"a guid\", value_1)]);\n }\n}\n\nexport function unit(path, value_1) {\n if (value_1 == null) {\n return new FSharpResult$2(0, void 0);\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"null\", value_1)]);\n }\n}\n\nexport const sbyte = (path) => ((value_2) => {\n const name_1 = \"a sbyte\";\n const path_1 = path;\n const value_3 = value_2;\n if ((typeof value_3) === \"number\") {\n const value_4 = value_3;\n return (isFinite(value_4) && Math.floor(value_4) === value_4) ? (((-128 <= value_4) ? (value_4 <= 127) : false) ? (new FSharpResult$2(0, (value_4 + 0x80 & 0xFF) - 0x80)) : (new FSharpResult$2(1, [path_1, new ErrorReason(1, name_1, value_4, \"Value was either too large or too small for \" + name_1)]))) : (new FSharpResult$2(1, [path_1, new ErrorReason(1, name_1, value_4, \"Value is not an integral value\")]));\n }\n else if ((typeof value_3) === \"string\") {\n let matchValue;\n let outArg = 0;\n matchValue = [tryParse_3(value_3, 511, false, 8, new FSharpRef(() => outArg, (v) => {\n outArg = v;\n })), outArg];\n return matchValue[0] ? (new FSharpResult$2(0, matchValue[1])) : (new FSharpResult$2(1, [path_1, new ErrorReason(0, name_1, value_3)]));\n }\n else {\n return new FSharpResult$2(1, [path_1, new ErrorReason(0, name_1, value_3)]);\n }\n});\n\nexport const byte = (path) => ((value_2) => {\n const name_1 = \"a byte\";\n const path_1 = path;\n const value_3 = value_2;\n if ((typeof value_3) === \"number\") {\n const value_4 = value_3;\n return (isFinite(value_4) && Math.floor(value_4) === value_4) ? (((0 <= value_4) ? (value_4 <= 255) : false) ? (new FSharpResult$2(0, value_4 & 0xFF)) : (new FSharpResult$2(1, [path_1, new ErrorReason(1, name_1, value_4, \"Value was either too large or too small for \" + name_1)]))) : (new FSharpResult$2(1, [path_1, new ErrorReason(1, name_1, value_4, \"Value is not an integral value\")]));\n }\n else if ((typeof value_3) === \"string\") {\n let matchValue;\n let outArg = 0;\n matchValue = [tryParse_3(value_3, 511, true, 8, new FSharpRef(() => outArg, (v) => {\n outArg = v;\n })), outArg];\n return matchValue[0] ? (new FSharpResult$2(0, matchValue[1])) : (new FSharpResult$2(1, [path_1, new ErrorReason(0, name_1, value_3)]));\n }\n else {\n return new FSharpResult$2(1, [path_1, new ErrorReason(0, name_1, value_3)]);\n }\n});\n\nexport const int16 = (path) => ((value_2) => {\n const name_1 = \"an int16\";\n const path_1 = path;\n const value_3 = value_2;\n if ((typeof value_3) === \"number\") {\n const value_4 = value_3;\n return (isFinite(value_4) && Math.floor(value_4) === value_4) ? (((-32768 <= value_4) ? (value_4 <= 32767) : false) ? (new FSharpResult$2(0, (value_4 + 0x8000 & 0xFFFF) - 0x8000)) : (new FSharpResult$2(1, [path_1, new ErrorReason(1, name_1, value_4, \"Value was either too large or too small for \" + name_1)]))) : (new FSharpResult$2(1, [path_1, new ErrorReason(1, name_1, value_4, \"Value is not an integral value\")]));\n }\n else if ((typeof value_3) === \"string\") {\n let matchValue;\n let outArg = 0;\n matchValue = [tryParse_3(value_3, 511, false, 16, new FSharpRef(() => outArg, (v) => {\n outArg = v;\n })), outArg];\n return matchValue[0] ? (new FSharpResult$2(0, matchValue[1])) : (new FSharpResult$2(1, [path_1, new ErrorReason(0, name_1, value_3)]));\n }\n else {\n return new FSharpResult$2(1, [path_1, new ErrorReason(0, name_1, value_3)]);\n }\n});\n\nexport const uint16 = (path) => ((value_2) => {\n const name_1 = \"an uint16\";\n const path_1 = path;\n const value_3 = value_2;\n if ((typeof value_3) === \"number\") {\n const value_4 = value_3;\n return (isFinite(value_4) && Math.floor(value_4) === value_4) ? (((0 <= value_4) ? (value_4 <= 65535) : false) ? (new FSharpResult$2(0, value_4 & 0xFFFF)) : (new FSharpResult$2(1, [path_1, new ErrorReason(1, name_1, value_4, \"Value was either too large or too small for \" + name_1)]))) : (new FSharpResult$2(1, [path_1, new ErrorReason(1, name_1, value_4, \"Value is not an integral value\")]));\n }\n else if ((typeof value_3) === \"string\") {\n let matchValue;\n let outArg = 0;\n matchValue = [tryParse_3(value_3, 511, true, 16, new FSharpRef(() => outArg, (v) => {\n outArg = v;\n })), outArg];\n return matchValue[0] ? (new FSharpResult$2(0, matchValue[1])) : (new FSharpResult$2(1, [path_1, new ErrorReason(0, name_1, value_3)]));\n }\n else {\n return new FSharpResult$2(1, [path_1, new ErrorReason(0, name_1, value_3)]);\n }\n});\n\nexport const int = (path) => ((value_2) => {\n const name_1 = \"an int\";\n const path_1 = path;\n const value_3 = value_2;\n if ((typeof value_3) === \"number\") {\n const value_4 = value_3;\n return (isFinite(value_4) && Math.floor(value_4) === value_4) ? (((-2147483648 <= value_4) ? (value_4 <= 2147483647) : false) ? (new FSharpResult$2(0, ~(~value_4))) : (new FSharpResult$2(1, [path_1, new ErrorReason(1, name_1, value_4, \"Value was either too large or too small for \" + name_1)]))) : (new FSharpResult$2(1, [path_1, new ErrorReason(1, name_1, value_4, \"Value is not an integral value\")]));\n }\n else if ((typeof value_3) === \"string\") {\n let matchValue;\n let outArg = 0;\n matchValue = [tryParse_3(value_3, 511, false, 32, new FSharpRef(() => outArg, (v) => {\n outArg = v;\n })), outArg];\n return matchValue[0] ? (new FSharpResult$2(0, matchValue[1])) : (new FSharpResult$2(1, [path_1, new ErrorReason(0, name_1, value_3)]));\n }\n else {\n return new FSharpResult$2(1, [path_1, new ErrorReason(0, name_1, value_3)]);\n }\n});\n\nexport const uint32 = (path) => ((value_2) => {\n const name_1 = \"an uint32\";\n const path_1 = path;\n const value_3 = value_2;\n if ((typeof value_3) === \"number\") {\n const value_4 = value_3;\n return (isFinite(value_4) && Math.floor(value_4) === value_4) ? (((0 <= value_4) ? (value_4 <= 4294967295) : false) ? (new FSharpResult$2(0, value_4 >>> 0)) : (new FSharpResult$2(1, [path_1, new ErrorReason(1, name_1, value_4, \"Value was either too large or too small for \" + name_1)]))) : (new FSharpResult$2(1, [path_1, new ErrorReason(1, name_1, value_4, \"Value is not an integral value\")]));\n }\n else if ((typeof value_3) === \"string\") {\n let matchValue;\n let outArg = 0;\n matchValue = [tryParse_3(value_3, 511, true, 32, new FSharpRef(() => outArg, (v) => {\n outArg = v;\n })), outArg];\n return matchValue[0] ? (new FSharpResult$2(0, matchValue[1])) : (new FSharpResult$2(1, [path_1, new ErrorReason(0, name_1, value_3)]));\n }\n else {\n return new FSharpResult$2(1, [path_1, new ErrorReason(0, name_1, value_3)]);\n }\n});\n\nexport const int64 = (path) => ((value_2) => {\n const name_1 = \"an int64\";\n const path_1 = path;\n const value_3 = value_2;\n if ((typeof value_3) === \"number\") {\n const value_4 = value_3;\n return (isFinite(value_4) && Math.floor(value_4) === value_4) ? (((toNumber(fromBits(0, 2147483648, false)) <= value_4) ? (value_4 <= toNumber(fromBits(4294967295, 2147483647, false))) : false) ? (new FSharpResult$2(0, fromNumber(value_4, false))) : (new FSharpResult$2(1, [path_1, new ErrorReason(1, name_1, value_4, \"Value was either too large or too small for \" + name_1)]))) : (new FSharpResult$2(1, [path_1, new ErrorReason(1, name_1, value_4, \"Value is not an integral value\")]));\n }\n else if ((typeof value_3) === \"string\") {\n let matchValue;\n let outArg = fromInt(0);\n matchValue = [tryParse_4(value_3, 511, false, 64, new FSharpRef(() => outArg, (v) => {\n outArg = v;\n })), outArg];\n return matchValue[0] ? (new FSharpResult$2(0, matchValue[1])) : (new FSharpResult$2(1, [path_1, new ErrorReason(0, name_1, value_3)]));\n }\n else {\n return new FSharpResult$2(1, [path_1, new ErrorReason(0, name_1, value_3)]);\n }\n});\n\nexport const uint64 = (path) => ((value_2) => {\n const name_1 = \"an uint64\";\n const path_1 = path;\n const value_3 = value_2;\n if ((typeof value_3) === \"number\") {\n const value_4 = value_3;\n return (isFinite(value_4) && Math.floor(value_4) === value_4) ? (((toNumber(fromBits(0, 0, true)) <= value_4) ? (value_4 <= toNumber(fromBits(4294967295, 4294967295, true))) : false) ? (new FSharpResult$2(0, fromNumber(value_4, true))) : (new FSharpResult$2(1, [path_1, new ErrorReason(1, name_1, value_4, \"Value was either too large or too small for \" + name_1)]))) : (new FSharpResult$2(1, [path_1, new ErrorReason(1, name_1, value_4, \"Value is not an integral value\")]));\n }\n else if ((typeof value_3) === \"string\") {\n let matchValue;\n let outArg = fromInt(0);\n matchValue = [tryParse_4(value_3, 511, true, 64, new FSharpRef(() => outArg, (v) => {\n outArg = v;\n })), outArg];\n return matchValue[0] ? (new FSharpResult$2(0, matchValue[1])) : (new FSharpResult$2(1, [path_1, new ErrorReason(0, name_1, value_3)]));\n }\n else {\n return new FSharpResult$2(1, [path_1, new ErrorReason(0, name_1, value_3)]);\n }\n});\n\nexport function bigint(path, value_1) {\n if ((typeof value_1) === \"number\") {\n return new FSharpResult$2(0, fromInt32(value_1));\n }\n else if ((typeof value_1) === \"string\") {\n try {\n return new FSharpResult$2(0, parse(value_1));\n }\n catch (matchValue) {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"a bigint\", value_1)]);\n }\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"a bigint\", value_1)]);\n }\n}\n\nexport function bool(path, value_1) {\n if ((typeof value_1) === \"boolean\") {\n return new FSharpResult$2(0, value_1);\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"a boolean\", value_1)]);\n }\n}\n\nexport function float(path, value_1) {\n if ((typeof value_1) === \"number\") {\n return new FSharpResult$2(0, value_1);\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"a float\", value_1)]);\n }\n}\n\nexport function float32(path, value_1) {\n if ((typeof value_1) === \"number\") {\n return new FSharpResult$2(0, value_1);\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"a float32\", value_1)]);\n }\n}\n\nexport function decimal(path, value_1) {\n if ((typeof value_1) === \"number\") {\n return new FSharpResult$2(0, new Decimal(value_1));\n }\n else if ((typeof value_1) === \"string\") {\n let matchValue;\n let outArg = new Decimal(0);\n matchValue = [tryParse_5(value_1, new FSharpRef(() => outArg, (v) => {\n outArg = v;\n })), outArg];\n if (matchValue[0]) {\n return new FSharpResult$2(0, matchValue[1]);\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"a decimal\", value_1)]);\n }\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"a decimal\", value_1)]);\n }\n}\n\nexport function datetime(path, value_1) {\n if ((typeof value_1) === \"string\") {\n let matchValue;\n let outArg = minValue();\n matchValue = [tryParse_6(value_1, new FSharpRef(() => outArg, (v) => {\n outArg = v;\n })), outArg];\n if (matchValue[0]) {\n return new FSharpResult$2(0, toUniversalTime(matchValue[1]));\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"a datetime\", value_1)]);\n }\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"a datetime\", value_1)]);\n }\n}\n\nexport function datetimeOffset(path, value_1) {\n if ((typeof value_1) === \"string\") {\n let matchValue;\n let outArg = minValue_1();\n matchValue = [tryParse_7(value_1, new FSharpRef(() => outArg, (v) => {\n outArg = v;\n })), outArg];\n if (matchValue[0]) {\n return new FSharpResult$2(0, matchValue[1]);\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"a datetimeoffset\", value_1)]);\n }\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"a datetime\", value_1)]);\n }\n}\n\nexport function timespan(path, value_1) {\n if ((typeof value_1) === \"string\") {\n let matchValue;\n let outArg = 0;\n matchValue = [tryParse_8(value_1, new FSharpRef(() => outArg, (v) => {\n outArg = v;\n })), outArg];\n if (matchValue[0]) {\n return new FSharpResult$2(0, matchValue[1]);\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"a timespan\", value_1)]);\n }\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"a timespan\", value_1)]);\n }\n}\n\nfunction decodeMaybeNull(path, decoder, value_1) {\n const matchValue = decoder(path, value_1);\n if (matchValue.tag === 1) {\n if (value_1 == null) {\n return new FSharpResult$2(0, void 0);\n }\n else if (matchValue.tag === 1) {\n return new FSharpResult$2(1, matchValue.fields[0]);\n }\n else {\n throw (new Error(\"Match failure\"));\n }\n }\n else {\n return new FSharpResult$2(0, some(matchValue.fields[0]));\n }\n}\n\nexport function optional(fieldName, decoder, path, value_1) {\n if (value_1 === null ? false : (Object.getPrototypeOf(value_1 || false) === Object.prototype)) {\n const fieldValue = value_1[fieldName];\n if (Helpers_isUndefined(fieldValue)) {\n return new FSharpResult$2(0, void 0);\n }\n else {\n return decodeMaybeNull((path + \".\") + fieldName, decoder, fieldValue);\n }\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(2, \"an object\", value_1)]);\n }\n}\n\nfunction badPathError(fieldNames, currentPath, value_1) {\n return new FSharpResult$2(1, [defaultArg(currentPath, join(\".\", cons(\"$\", fieldNames))), new ErrorReason(4, (\"an object with path `\" + join(\".\", fieldNames)) + \"`\", value_1, defaultArg(tryLast(fieldNames), \"\"))]);\n}\n\nexport function optionalAt(fieldNames, decoder, firstPath, firstValue) {\n const _arg1 = fold(uncurry(2, (tupledArg) => {\n const curPath = tupledArg[0];\n const curValue = tupledArg[1];\n const res = tupledArg[2];\n return (field_1) => ((res == null) ? ((curValue == null) ? [curPath, curValue, new FSharpResult$2(0, void 0)] : ((curValue === null ? false : (Object.getPrototypeOf(curValue || false) === Object.prototype)) ? [(curPath + \".\") + field_1, curValue[field_1], void 0] : [curPath, curValue, new FSharpResult$2(1, [curPath, new ErrorReason(2, \"an object\", curValue)])])) : [curPath, curValue, res]);\n }), [firstPath, firstValue, void 0], fieldNames);\n if (_arg1[2] == null) {\n const lastValue = _arg1[1];\n if (Helpers_isUndefined(lastValue)) {\n return new FSharpResult$2(0, void 0);\n }\n else {\n return decodeMaybeNull(_arg1[0], decoder, lastValue);\n }\n }\n else {\n return _arg1[2];\n }\n}\n\nexport function field(fieldName, decoder, path, value_1) {\n if (value_1 === null ? false : (Object.getPrototypeOf(value_1 || false) === Object.prototype)) {\n const fieldValue = value_1[fieldName];\n if (Helpers_isUndefined(fieldValue)) {\n return new FSharpResult$2(1, [path, new ErrorReason(3, (\"an object with a field named `\" + fieldName) + \"`\", value_1)]);\n }\n else {\n return decoder((path + \".\") + fieldName, fieldValue);\n }\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(2, \"an object\", value_1)]);\n }\n}\n\nexport function at(fieldNames, decoder, firstPath, firstValue) {\n const _arg1 = fold(uncurry(2, (tupledArg) => {\n const curPath = tupledArg[0];\n const curValue = tupledArg[1];\n const res = tupledArg[2];\n return (field_1) => {\n if (res == null) {\n if (curValue == null) {\n return [curPath, curValue, badPathError(fieldNames, curPath, firstValue)];\n }\n else if (curValue === null ? false : (Object.getPrototypeOf(curValue || false) === Object.prototype)) {\n const curValue_1 = curValue[field_1];\n return Helpers_isUndefined(curValue_1) ? [curPath, curValue_1, badPathError(fieldNames, void 0, firstValue)] : [(curPath + \".\") + field_1, curValue_1, void 0];\n }\n else {\n return [curPath, curValue, new FSharpResult$2(1, [curPath, new ErrorReason(2, \"an object\", curValue)])];\n }\n }\n else {\n return [curPath, curValue, res];\n }\n };\n }), [firstPath, firstValue, void 0], fieldNames);\n if (_arg1[2] == null) {\n return decoder(_arg1[0], _arg1[1]);\n }\n else {\n return _arg1[2];\n }\n}\n\nexport function index(requestedIndex, decoder, path, value_1) {\n let copyOfStruct;\n const currentPath = ((path + \".[\") + int32ToString(requestedIndex)) + \"]\";\n if (Array.isArray(value_1)) {\n const vArray = value_1;\n if (requestedIndex < vArray.length) {\n return decoder(currentPath, vArray[requestedIndex]);\n }\n else {\n return new FSharpResult$2(1, [currentPath, new ErrorReason(5, (((\"a longer array. Need index `\" + int32ToString(requestedIndex)) + \"` but there are only `\") + (copyOfStruct = (vArray.length | 0), int32ToString(copyOfStruct))) + \"` entries\", value_1)]);\n }\n }\n else {\n return new FSharpResult$2(1, [currentPath, new ErrorReason(0, \"an array\", value_1)]);\n }\n}\n\nexport function option(decoder, path, value_1) {\n if (value_1 == null) {\n return new FSharpResult$2(0, void 0);\n }\n else {\n return Result_Map((arg0) => some(arg0), decoder(path, value_1));\n }\n}\n\nexport function list(decoder, path, value_1) {\n if (Array.isArray(value_1)) {\n let i = -1;\n return Result_Map((list_1) => reverse(list_1), fold_1((acc, value_2) => {\n i = ((i + 1) | 0);\n if (acc.tag === 0) {\n const matchValue = decoder(((path + \".[\") + int32ToString(i)) + \"]\", value_2);\n if (matchValue.tag === 0) {\n return new FSharpResult$2(0, cons(matchValue.fields[0], acc.fields[0]));\n }\n else {\n return new FSharpResult$2(1, matchValue.fields[0]);\n }\n }\n else {\n return acc;\n }\n }, new FSharpResult$2(0, empty()), value_1));\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"a list\", value_1)]);\n }\n}\n\nexport function seq(decoder, path, value_1) {\n if (Array.isArray(value_1)) {\n let i = -1;\n return Result_Map((source) => reverse_1(source), fold_1((acc, value_2) => {\n i = ((i + 1) | 0);\n if (acc.tag === 0) {\n const matchValue = decoder(((path + \".[\") + int32ToString(i)) + \"]\", value_2);\n if (matchValue.tag === 0) {\n return new FSharpResult$2(0, append([matchValue.fields[0]], acc.fields[0]));\n }\n else {\n return new FSharpResult$2(1, matchValue.fields[0]);\n }\n }\n else {\n return acc;\n }\n }, new FSharpResult$2(0, []), value_1));\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"a seq\", value_1)]);\n }\n}\n\nexport function array(decoder, path, value_1) {\n if (Array.isArray(value_1)) {\n let i = -1;\n const tokens = value_1;\n return fold_1((acc, value_2) => {\n i = ((i + 1) | 0);\n if (acc.tag === 0) {\n const acc_1 = acc.fields[0];\n const matchValue = decoder(((path + \".[\") + int32ToString(i)) + \"]\", value_2);\n if (matchValue.tag === 0) {\n acc_1[i] = matchValue.fields[0];\n return new FSharpResult$2(0, acc_1);\n }\n else {\n return new FSharpResult$2(1, matchValue.fields[0]);\n }\n }\n else {\n return acc;\n }\n }, new FSharpResult$2(0, fill(new Array(tokens.length), 0, tokens.length, null)), tokens);\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"an array\", value_1)]);\n }\n}\n\nexport function keys(path, value_1) {\n if (value_1 === null ? false : (Object.getPrototypeOf(value_1 || false) === Object.prototype)) {\n return new FSharpResult$2(0, ofSeq(Object.keys(value_1)));\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"an object\", value_1)]);\n }\n}\n\nexport function keyValuePairs(decoder, path, value_1) {\n const matchValue = keys(path, value_1);\n if (matchValue.tag === 1) {\n return new FSharpResult$2(1, matchValue.fields[0]);\n }\n else {\n return Result_Map((list_2) => reverse(list_2), fold((acc, prop) => {\n if (acc.tag === 0) {\n const matchValue_1 = decoder(path, value_1[prop]);\n if (matchValue_1.tag === 0) {\n return new FSharpResult$2(0, cons([prop, matchValue_1.fields[0]], acc.fields[0]));\n }\n else {\n return new FSharpResult$2(1, matchValue_1.fields[0]);\n }\n }\n else {\n return acc;\n }\n }, new FSharpResult$2(0, empty()), matchValue.fields[0]));\n }\n}\n\nexport function oneOf(decoders, path, value_1) {\n const runner = (decoders_1_mut, errors_mut) => {\n runner:\n while (true) {\n const decoders_1 = decoders_1_mut, errors = errors_mut;\n if (isEmpty(decoders_1)) {\n return new FSharpResult$2(1, [path, new ErrorReason(7, errors)]);\n }\n else {\n const matchValue = fromValue(path, uncurry(2, head_1(decoders_1)), value_1);\n if (matchValue.tag === 1) {\n decoders_1_mut = tail_1(decoders_1);\n errors_mut = append_1(errors, singleton(matchValue.fields[0]));\n continue runner;\n }\n else {\n return new FSharpResult$2(0, matchValue.fields[0]);\n }\n }\n break;\n }\n };\n return runner(decoders, empty());\n}\n\nexport function nil(output, path, value_1) {\n if (value_1 == null) {\n return new FSharpResult$2(0, output);\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"null\", value_1)]);\n }\n}\n\nexport function value(_arg1, v) {\n return new FSharpResult$2(0, v);\n}\n\nexport function succeed(output, _arg2, _arg1) {\n return new FSharpResult$2(0, output);\n}\n\nexport function fail(msg, path, _arg1) {\n return new FSharpResult$2(1, [path, new ErrorReason(6, msg)]);\n}\n\nexport function andThen(cb, decoder, path, value_1) {\n const matchValue = decoder(path, value_1);\n if (matchValue.tag === 0) {\n return cb(matchValue.fields[0], path, value_1);\n }\n else {\n return new FSharpResult$2(1, matchValue.fields[0]);\n }\n}\n\nexport function all(decoders, path, value_1) {\n const runner = (decoders_1_mut, values_mut) => {\n runner:\n while (true) {\n const decoders_1 = decoders_1_mut, values = values_mut;\n if (isEmpty(decoders_1)) {\n return new FSharpResult$2(0, values);\n }\n else {\n const matchValue = head_1(decoders_1)(path)(value_1);\n if (matchValue.tag === 1) {\n return new FSharpResult$2(1, matchValue.fields[0]);\n }\n else {\n decoders_1_mut = tail_1(decoders_1);\n values_mut = append_1(values, singleton(matchValue.fields[0]));\n continue runner;\n }\n }\n break;\n }\n };\n return runner(decoders, empty());\n}\n\nexport function map(ctor, d1, path, value_1) {\n const matchValue = d1(path, value_1);\n if (matchValue.tag === 1) {\n return new FSharpResult$2(1, matchValue.fields[0]);\n }\n else {\n return new FSharpResult$2(0, ctor(matchValue.fields[0]));\n }\n}\n\nexport function map2(ctor, d1, d2, path, value_1) {\n const matchValue = [d1(path, value_1), d2(path, value_1)];\n const copyOfStruct = matchValue[0];\n if (copyOfStruct.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct.fields[0]);\n }\n else {\n const copyOfStruct_1 = matchValue[1];\n if (copyOfStruct_1.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_1.fields[0]);\n }\n else {\n return new FSharpResult$2(0, ctor(copyOfStruct.fields[0], copyOfStruct_1.fields[0]));\n }\n }\n}\n\nexport function map3(ctor, d1, d2, d3, path, value_1) {\n const matchValue = [d1(path, value_1), d2(path, value_1), d3(path, value_1)];\n const copyOfStruct = matchValue[0];\n if (copyOfStruct.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct.fields[0]);\n }\n else {\n const copyOfStruct_1 = matchValue[1];\n if (copyOfStruct_1.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_1.fields[0]);\n }\n else {\n const copyOfStruct_2 = matchValue[2];\n if (copyOfStruct_2.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_2.fields[0]);\n }\n else {\n return new FSharpResult$2(0, ctor(copyOfStruct.fields[0], copyOfStruct_1.fields[0], copyOfStruct_2.fields[0]));\n }\n }\n }\n}\n\nexport function map4(ctor, d1, d2, d3, d4, path, value_1) {\n const matchValue = [d1(path, value_1), d2(path, value_1), d3(path, value_1), d4(path, value_1)];\n const copyOfStruct = matchValue[0];\n if (copyOfStruct.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct.fields[0]);\n }\n else {\n const copyOfStruct_1 = matchValue[1];\n if (copyOfStruct_1.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_1.fields[0]);\n }\n else {\n const copyOfStruct_2 = matchValue[2];\n if (copyOfStruct_2.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_2.fields[0]);\n }\n else {\n const copyOfStruct_3 = matchValue[3];\n if (copyOfStruct_3.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_3.fields[0]);\n }\n else {\n return new FSharpResult$2(0, ctor(copyOfStruct.fields[0], copyOfStruct_1.fields[0], copyOfStruct_2.fields[0], copyOfStruct_3.fields[0]));\n }\n }\n }\n }\n}\n\nexport function map5(ctor, d1, d2, d3, d4, d5, path, value_1) {\n const matchValue = [d1(path, value_1), d2(path, value_1), d3(path, value_1), d4(path, value_1), d5(path, value_1)];\n const copyOfStruct = matchValue[0];\n if (copyOfStruct.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct.fields[0]);\n }\n else {\n const copyOfStruct_1 = matchValue[1];\n if (copyOfStruct_1.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_1.fields[0]);\n }\n else {\n const copyOfStruct_2 = matchValue[2];\n if (copyOfStruct_2.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_2.fields[0]);\n }\n else {\n const copyOfStruct_3 = matchValue[3];\n if (copyOfStruct_3.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_3.fields[0]);\n }\n else {\n const copyOfStruct_4 = matchValue[4];\n if (copyOfStruct_4.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_4.fields[0]);\n }\n else {\n return new FSharpResult$2(0, ctor(copyOfStruct.fields[0], copyOfStruct_1.fields[0], copyOfStruct_2.fields[0], copyOfStruct_3.fields[0], copyOfStruct_4.fields[0]));\n }\n }\n }\n }\n }\n}\n\nexport function map6(ctor, d1, d2, d3, d4, d5, d6, path, value_1) {\n const matchValue = [d1(path, value_1), d2(path, value_1), d3(path, value_1), d4(path, value_1), d5(path, value_1), d6(path, value_1)];\n const copyOfStruct = matchValue[0];\n if (copyOfStruct.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct.fields[0]);\n }\n else {\n const copyOfStruct_1 = matchValue[1];\n if (copyOfStruct_1.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_1.fields[0]);\n }\n else {\n const copyOfStruct_2 = matchValue[2];\n if (copyOfStruct_2.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_2.fields[0]);\n }\n else {\n const copyOfStruct_3 = matchValue[3];\n if (copyOfStruct_3.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_3.fields[0]);\n }\n else {\n const copyOfStruct_4 = matchValue[4];\n if (copyOfStruct_4.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_4.fields[0]);\n }\n else {\n const copyOfStruct_5 = matchValue[5];\n if (copyOfStruct_5.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_5.fields[0]);\n }\n else {\n return new FSharpResult$2(0, ctor(copyOfStruct.fields[0], copyOfStruct_1.fields[0], copyOfStruct_2.fields[0], copyOfStruct_3.fields[0], copyOfStruct_4.fields[0], copyOfStruct_5.fields[0]));\n }\n }\n }\n }\n }\n }\n}\n\nexport function map7(ctor, d1, d2, d3, d4, d5, d6, d7, path, value_1) {\n const matchValue = [d1(path, value_1), d2(path, value_1), d3(path, value_1), d4(path, value_1), d5(path, value_1), d6(path, value_1), d7(path, value_1)];\n const copyOfStruct = matchValue[0];\n if (copyOfStruct.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct.fields[0]);\n }\n else {\n const copyOfStruct_1 = matchValue[1];\n if (copyOfStruct_1.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_1.fields[0]);\n }\n else {\n const copyOfStruct_2 = matchValue[2];\n if (copyOfStruct_2.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_2.fields[0]);\n }\n else {\n const copyOfStruct_3 = matchValue[3];\n if (copyOfStruct_3.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_3.fields[0]);\n }\n else {\n const copyOfStruct_4 = matchValue[4];\n if (copyOfStruct_4.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_4.fields[0]);\n }\n else {\n const copyOfStruct_5 = matchValue[5];\n if (copyOfStruct_5.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_5.fields[0]);\n }\n else {\n const copyOfStruct_6 = matchValue[6];\n if (copyOfStruct_6.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_6.fields[0]);\n }\n else {\n return new FSharpResult$2(0, ctor(copyOfStruct.fields[0], copyOfStruct_1.fields[0], copyOfStruct_2.fields[0], copyOfStruct_3.fields[0], copyOfStruct_4.fields[0], copyOfStruct_5.fields[0], copyOfStruct_6.fields[0]));\n }\n }\n }\n }\n }\n }\n }\n}\n\nexport function map8(ctor, d1, d2, d3, d4, d5, d6, d7, d8, path, value_1) {\n const matchValue = [d1(path, value_1), d2(path, value_1), d3(path, value_1), d4(path, value_1), d5(path, value_1), d6(path, value_1), d7(path, value_1), d8(path, value_1)];\n const copyOfStruct = matchValue[0];\n if (copyOfStruct.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct.fields[0]);\n }\n else {\n const copyOfStruct_1 = matchValue[1];\n if (copyOfStruct_1.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_1.fields[0]);\n }\n else {\n const copyOfStruct_2 = matchValue[2];\n if (copyOfStruct_2.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_2.fields[0]);\n }\n else {\n const copyOfStruct_3 = matchValue[3];\n if (copyOfStruct_3.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_3.fields[0]);\n }\n else {\n const copyOfStruct_4 = matchValue[4];\n if (copyOfStruct_4.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_4.fields[0]);\n }\n else {\n const copyOfStruct_5 = matchValue[5];\n if (copyOfStruct_5.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_5.fields[0]);\n }\n else {\n const copyOfStruct_6 = matchValue[6];\n if (copyOfStruct_6.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_6.fields[0]);\n }\n else {\n const copyOfStruct_7 = matchValue[7];\n if (copyOfStruct_7.tag === 1) {\n return new FSharpResult$2(1, copyOfStruct_7.fields[0]);\n }\n else {\n return new FSharpResult$2(0, ctor(copyOfStruct.fields[0], copyOfStruct_1.fields[0], copyOfStruct_2.fields[0], copyOfStruct_3.fields[0], copyOfStruct_4.fields[0], copyOfStruct_5.fields[0], copyOfStruct_6.fields[0], copyOfStruct_7.fields[0]));\n }\n }\n }\n }\n }\n }\n }\n }\n}\n\nexport function dict(decoder) {\n let d1;\n const decoder_1 = decoder;\n d1 = ((path) => ((value_1) => keyValuePairs(decoder_1, path, value_1)));\n return (path_1) => ((value_2) => map((elements) => ofList(elements), uncurry(2, d1), path_1, value_2));\n}\n\nfunction unwrapWith(errors, path, decoder, value_1) {\n const matchValue = decoder(path, value_1);\n if (matchValue.tag === 1) {\n void (errors.push(matchValue.fields[0]));\n return null;\n }\n else {\n return matchValue.fields[0];\n }\n}\n\nexport class Getters$1 {\n constructor(path, v) {\n let _this, _this_1;\n this.errors = [];\n this.required = (_this = this, {\n Field(fieldName, decoder) {\n return unwrapWith(_this.errors, path, (path_1, value_1) => field(fieldName, decoder, path_1, value_1), v);\n },\n At(fieldNames, decoder_2) {\n return unwrapWith(_this.errors, path, (firstPath, firstValue) => at(fieldNames, decoder_2, firstPath, firstValue), v);\n },\n Raw(decoder_4) {\n return unwrapWith(_this.errors, path, decoder_4, v);\n },\n });\n this.optional = (_this_1 = this, {\n Field(fieldName_1, decoder_5) {\n return unwrapWith(_this_1.errors, path, (path_2, value_2) => optional(fieldName_1, decoder_5, path_2, value_2), v);\n },\n At(fieldNames_1, decoder_7) {\n return unwrapWith(_this_1.errors, path, (firstPath_1, firstValue_1) => optionalAt(fieldNames_1, decoder_7, firstPath_1, firstValue_1), v);\n },\n Raw(decoder_9) {\n const matchValue = decoder_9(path, v);\n if (matchValue.tag === 1) {\n const reason = matchValue.fields[0][1];\n const error = matchValue.fields[0];\n let pattern_matching_result, v_2;\n switch (reason.tag) {\n case 1: {\n pattern_matching_result = 0;\n v_2 = reason.fields[1];\n break;\n }\n case 2: {\n pattern_matching_result = 0;\n v_2 = reason.fields[1];\n break;\n }\n case 3:\n case 4: {\n pattern_matching_result = 1;\n break;\n }\n case 5:\n case 6:\n case 7: {\n pattern_matching_result = 2;\n break;\n }\n default: {\n pattern_matching_result = 0;\n v_2 = reason.fields[1];\n }\n }\n switch (pattern_matching_result) {\n case 0: {\n if (v_2 == null) {\n return void 0;\n }\n else {\n void (_this_1.errors.push(error));\n return null;\n }\n }\n case 1: {\n return void 0;\n }\n case 2: {\n void (_this_1.errors.push(error));\n return null;\n }\n }\n }\n else {\n return some(matchValue.fields[0]);\n }\n },\n });\n }\n get Required() {\n const __ = this;\n return __.required;\n }\n get Optional() {\n const __ = this;\n return __.optional;\n }\n}\n\nexport function Getters$1$reflection(gen0) {\n return class_type(\"Thoth.Json.Decode.Getters`1\", [gen0], Getters$1);\n}\n\nexport function Getters$1_$ctor_4A51B60E(path, v) {\n return new Getters$1(path, v);\n}\n\nexport function Getters$1__get_Errors(__) {\n return toList(__.errors);\n}\n\nexport function object(builder, path, v) {\n const getters = Getters$1_$ctor_4A51B60E(path, v);\n const result = builder(getters);\n const matchValue = Getters$1__get_Errors(getters);\n if (!isEmpty(matchValue)) {\n const errors = matchValue;\n if (length(errors) > 1) {\n return new FSharpResult$2(1, [path, new ErrorReason(7, map_1((tupledArg) => errorToString(tupledArg[0], tupledArg[1]), errors))]);\n }\n else {\n return new FSharpResult$2(1, head_1(matchValue));\n }\n }\n else {\n return new FSharpResult$2(0, result);\n }\n}\n\nexport function tuple2(decoder1, decoder2) {\n let decoder_3;\n const decoder = decoder1;\n decoder_3 = ((path) => ((value_1) => index(0, decoder, path, value_1)));\n return (path_3) => ((value_4) => andThen(uncurry(3, (v1) => {\n let decoder_2;\n const decoder_1 = decoder2;\n decoder_2 = ((path_1) => ((value_2) => index(1, decoder_1, path_1, value_2)));\n return (path_2) => ((value_3) => andThen((v2, arg10$0040, arg20$0040) => succeed([v1, v2], arg10$0040, arg20$0040), uncurry(2, decoder_2), path_2, value_3));\n }), uncurry(2, decoder_3), path_3, value_4));\n}\n\nexport function tuple3(decoder1, decoder2, decoder3) {\n let decoder_5;\n const decoder = decoder1;\n decoder_5 = ((path) => ((value_1) => index(0, decoder, path, value_1)));\n return (path_5) => ((value_6) => andThen(uncurry(3, (v1) => {\n let decoder_4;\n const decoder_1 = decoder2;\n decoder_4 = ((path_1) => ((value_2) => index(1, decoder_1, path_1, value_2)));\n return (path_4) => ((value_5) => andThen(uncurry(3, (v2) => {\n let decoder_3;\n const decoder_2 = decoder3;\n decoder_3 = ((path_2) => ((value_3) => index(2, decoder_2, path_2, value_3)));\n return (path_3) => ((value_4) => andThen((v3, arg10$0040, arg20$0040) => succeed([v1, v2, v3], arg10$0040, arg20$0040), uncurry(2, decoder_3), path_3, value_4));\n }), uncurry(2, decoder_4), path_4, value_5));\n }), uncurry(2, decoder_5), path_5, value_6));\n}\n\nexport function tuple4(decoder1, decoder2, decoder3, decoder4) {\n let decoder_7;\n const decoder = decoder1;\n decoder_7 = ((path) => ((value_1) => index(0, decoder, path, value_1)));\n return (path_7) => ((value_8) => andThen(uncurry(3, (v1) => {\n let decoder_6;\n const decoder_1 = decoder2;\n decoder_6 = ((path_1) => ((value_2) => index(1, decoder_1, path_1, value_2)));\n return (path_6) => ((value_7) => andThen(uncurry(3, (v2) => {\n let decoder_5;\n const decoder_2 = decoder3;\n decoder_5 = ((path_2) => ((value_3) => index(2, decoder_2, path_2, value_3)));\n return (path_5) => ((value_6) => andThen(uncurry(3, (v3) => {\n let decoder_4;\n const decoder_3 = decoder4;\n decoder_4 = ((path_3) => ((value_4) => index(3, decoder_3, path_3, value_4)));\n return (path_4) => ((value_5) => andThen((v4, arg10$0040, arg20$0040) => succeed([v1, v2, v3, v4], arg10$0040, arg20$0040), uncurry(2, decoder_4), path_4, value_5));\n }), uncurry(2, decoder_5), path_5, value_6));\n }), uncurry(2, decoder_6), path_6, value_7));\n }), uncurry(2, decoder_7), path_7, value_8));\n}\n\nexport function tuple5(decoder1, decoder2, decoder3, decoder4, decoder5) {\n let decoder_9;\n const decoder = decoder1;\n decoder_9 = ((path) => ((value_1) => index(0, decoder, path, value_1)));\n return (path_9) => ((value_10) => andThen(uncurry(3, (v1) => {\n let decoder_8;\n const decoder_1 = decoder2;\n decoder_8 = ((path_1) => ((value_2) => index(1, decoder_1, path_1, value_2)));\n return (path_8) => ((value_9) => andThen(uncurry(3, (v2) => {\n let decoder_7;\n const decoder_2 = decoder3;\n decoder_7 = ((path_2) => ((value_3) => index(2, decoder_2, path_2, value_3)));\n return (path_7) => ((value_8) => andThen(uncurry(3, (v3) => {\n let decoder_6;\n const decoder_3 = decoder4;\n decoder_6 = ((path_3) => ((value_4) => index(3, decoder_3, path_3, value_4)));\n return (path_6) => ((value_7) => andThen(uncurry(3, (v4) => {\n let decoder_5;\n const decoder_4 = decoder5;\n decoder_5 = ((path_4) => ((value_5) => index(4, decoder_4, path_4, value_5)));\n return (path_5) => ((value_6) => andThen((v5, arg10$0040, arg20$0040) => succeed([v1, v2, v3, v4, v5], arg10$0040, arg20$0040), uncurry(2, decoder_5), path_5, value_6));\n }), uncurry(2, decoder_6), path_6, value_7));\n }), uncurry(2, decoder_7), path_7, value_8));\n }), uncurry(2, decoder_8), path_8, value_9));\n }), uncurry(2, decoder_9), path_9, value_10));\n}\n\nexport function tuple6(decoder1, decoder2, decoder3, decoder4, decoder5, decoder6) {\n let decoder_11;\n const decoder = decoder1;\n decoder_11 = ((path) => ((value_1) => index(0, decoder, path, value_1)));\n return (path_11) => ((value_12) => andThen(uncurry(3, (v1) => {\n let decoder_10;\n const decoder_1 = decoder2;\n decoder_10 = ((path_1) => ((value_2) => index(1, decoder_1, path_1, value_2)));\n return (path_10) => ((value_11) => andThen(uncurry(3, (v2) => {\n let decoder_9;\n const decoder_2 = decoder3;\n decoder_9 = ((path_2) => ((value_3) => index(2, decoder_2, path_2, value_3)));\n return (path_9) => ((value_10) => andThen(uncurry(3, (v3) => {\n let decoder_8;\n const decoder_3 = decoder4;\n decoder_8 = ((path_3) => ((value_4) => index(3, decoder_3, path_3, value_4)));\n return (path_8) => ((value_9) => andThen(uncurry(3, (v4) => {\n let decoder_7;\n const decoder_4 = decoder5;\n decoder_7 = ((path_4) => ((value_5) => index(4, decoder_4, path_4, value_5)));\n return (path_7) => ((value_8) => andThen(uncurry(3, (v5) => {\n let decoder_6;\n const decoder_5 = decoder6;\n decoder_6 = ((path_5) => ((value_6) => index(5, decoder_5, path_5, value_6)));\n return (path_6) => ((value_7) => andThen((v6, arg10$0040, arg20$0040) => succeed([v1, v2, v3, v4, v5, v6], arg10$0040, arg20$0040), uncurry(2, decoder_6), path_6, value_7));\n }), uncurry(2, decoder_7), path_7, value_8));\n }), uncurry(2, decoder_8), path_8, value_9));\n }), uncurry(2, decoder_9), path_9, value_10));\n }), uncurry(2, decoder_10), path_10, value_11));\n }), uncurry(2, decoder_11), path_11, value_12));\n}\n\nexport function tuple7(decoder1, decoder2, decoder3, decoder4, decoder5, decoder6, decoder7) {\n let decoder_13;\n const decoder = decoder1;\n decoder_13 = ((path) => ((value_1) => index(0, decoder, path, value_1)));\n return (path_13) => ((value_14) => andThen(uncurry(3, (v1) => {\n let decoder_12;\n const decoder_1 = decoder2;\n decoder_12 = ((path_1) => ((value_2) => index(1, decoder_1, path_1, value_2)));\n return (path_12) => ((value_13) => andThen(uncurry(3, (v2) => {\n let decoder_11;\n const decoder_2 = decoder3;\n decoder_11 = ((path_2) => ((value_3) => index(2, decoder_2, path_2, value_3)));\n return (path_11) => ((value_12) => andThen(uncurry(3, (v3) => {\n let decoder_10;\n const decoder_3 = decoder4;\n decoder_10 = ((path_3) => ((value_4) => index(3, decoder_3, path_3, value_4)));\n return (path_10) => ((value_11) => andThen(uncurry(3, (v4) => {\n let decoder_9;\n const decoder_4 = decoder5;\n decoder_9 = ((path_4) => ((value_5) => index(4, decoder_4, path_4, value_5)));\n return (path_9) => ((value_10) => andThen(uncurry(3, (v5) => {\n let decoder_8;\n const decoder_5 = decoder6;\n decoder_8 = ((path_5) => ((value_6) => index(5, decoder_5, path_5, value_6)));\n return (path_8) => ((value_9) => andThen(uncurry(3, (v6) => {\n let decoder_7;\n const decoder_6 = decoder7;\n decoder_7 = ((path_6) => ((value_7) => index(6, decoder_6, path_6, value_7)));\n return (path_7) => ((value_8) => andThen((v7, arg10$0040, arg20$0040) => succeed([v1, v2, v3, v4, v5, v6, v7], arg10$0040, arg20$0040), uncurry(2, decoder_7), path_7, value_8));\n }), uncurry(2, decoder_8), path_8, value_9));\n }), uncurry(2, decoder_9), path_9, value_10));\n }), uncurry(2, decoder_10), path_10, value_11));\n }), uncurry(2, decoder_11), path_11, value_12));\n }), uncurry(2, decoder_12), path_12, value_13));\n }), uncurry(2, decoder_13), path_13, value_14));\n}\n\nexport function tuple8(decoder1, decoder2, decoder3, decoder4, decoder5, decoder6, decoder7, decoder8) {\n let decoder_15;\n const decoder = decoder1;\n decoder_15 = ((path) => ((value_1) => index(0, decoder, path, value_1)));\n return (path_15) => ((value_16) => andThen(uncurry(3, (v1) => {\n let decoder_14;\n const decoder_1 = decoder2;\n decoder_14 = ((path_1) => ((value_2) => index(1, decoder_1, path_1, value_2)));\n return (path_14) => ((value_15) => andThen(uncurry(3, (v2) => {\n let decoder_13;\n const decoder_2 = decoder3;\n decoder_13 = ((path_2) => ((value_3) => index(2, decoder_2, path_2, value_3)));\n return (path_13) => ((value_14) => andThen(uncurry(3, (v3) => {\n let decoder_12;\n const decoder_3 = decoder4;\n decoder_12 = ((path_3) => ((value_4) => index(3, decoder_3, path_3, value_4)));\n return (path_12) => ((value_13) => andThen(uncurry(3, (v4) => {\n let decoder_11;\n const decoder_4 = decoder5;\n decoder_11 = ((path_4) => ((value_5) => index(4, decoder_4, path_4, value_5)));\n return (path_11) => ((value_12) => andThen(uncurry(3, (v5) => {\n let decoder_10;\n const decoder_5 = decoder6;\n decoder_10 = ((path_5) => ((value_6) => index(5, decoder_5, path_5, value_6)));\n return (path_10) => ((value_11) => andThen(uncurry(3, (v6) => {\n let decoder_9;\n const decoder_6 = decoder7;\n decoder_9 = ((path_6) => ((value_7) => index(6, decoder_6, path_6, value_7)));\n return (path_9) => ((value_10) => andThen(uncurry(3, (v7) => {\n let decoder_8;\n const decoder_7 = decoder8;\n decoder_8 = ((path_7) => ((value_8) => index(7, decoder_7, path_7, value_8)));\n return (path_8) => ((value_9) => andThen((v8, arg10$0040, arg20$0040) => succeed([v1, v2, v3, v4, v5, v6, v7, v8], arg10$0040, arg20$0040), uncurry(2, decoder_8), path_8, value_9));\n }), uncurry(2, decoder_9), path_9, value_10));\n }), uncurry(2, decoder_10), path_10, value_11));\n }), uncurry(2, decoder_11), path_11, value_12));\n }), uncurry(2, decoder_12), path_12, value_13));\n }), uncurry(2, decoder_13), path_13, value_14));\n }), uncurry(2, decoder_14), path_14, value_15));\n }), uncurry(2, decoder_15), path_15, value_16));\n}\n\nfunction toMap(xs) {\n return ofSeq_1(xs);\n}\n\nfunction toSet(xs) {\n return ofSeq_2(xs, {\n Compare: (x, y) => compare(x, y),\n });\n}\n\nfunction autoObject(decoderInfos, path, value_1) {\n if (!(value_1 === null ? false : (Object.getPrototypeOf(value_1 || false) === Object.prototype))) {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"an object\", value_1)]);\n }\n else {\n return foldBack(uncurry(2, (tupledArg) => {\n const name = tupledArg[0];\n return (acc) => ((acc.tag === 0) ? Result_Map((v) => cons(v, acc.fields[0]), tupledArg[1]((path + \".\") + name)(value_1[name])) : acc);\n }), decoderInfos, new FSharpResult$2(0, empty()));\n }\n}\n\nfunction autoObject2(keyDecoder, valueDecoder, path, value_1) {\n if (!(value_1 === null ? false : (Object.getPrototypeOf(value_1 || false) === Object.prototype))) {\n return new FSharpResult$2(1, [path, new ErrorReason(0, \"an object\", value_1)]);\n }\n else {\n return fold_2((acc, name) => {\n if (acc.tag === 0) {\n const matchValue = keyDecoder(path, name);\n if (matchValue.tag === 0) {\n const _arg1 = valueDecoder((path + \".\") + name, value_1[name]);\n if (_arg1.tag === 0) {\n return new FSharpResult$2(0, cons([matchValue.fields[0], _arg1.fields[0]], acc.fields[0]));\n }\n else {\n return new FSharpResult$2(1, _arg1.fields[0]);\n }\n }\n else {\n return new FSharpResult$2(1, matchValue.fields[0]);\n }\n }\n else {\n return acc;\n }\n }, new FSharpResult$2(0, empty()), Object.keys(value_1));\n }\n}\n\nfunction mixedArray(msg, decoders, path, values) {\n let arg30, arg10;\n if (decoders.length !== values.length) {\n return new FSharpResult$2(1, [path, new ErrorReason(6, (arg30 = (values.length | 0), (arg10 = (decoders.length | 0), toText(printf(\"Expected %i %s but got %i\"))(arg10)(msg)(arg30))))]);\n }\n else {\n return foldBack2(uncurry(3, mapCurriedArgs((value_1) => ((decoder) => ((acc) => ((acc.tag === 0) ? Result_Map((v) => cons(v, acc.fields[0]), decoder(path, value_1)) : acc))), [0, [0, 2], 0])), values, decoders, new FSharpResult$2(0, empty()));\n }\n}\n\nfunction makeUnion(extra, caseStrategy, t, name, path, values) {\n const uci = tryFind((x) => (name_3(x) === name), getUnionCases(t, true));\n if (uci != null) {\n const uci_1 = uci;\n if (values.length === 0) {\n return new FSharpResult$2(0, makeUnion_1(uci_1, [], true));\n }\n else {\n return Result_Map((values_1) => makeUnion_1(uci_1, toArray(values_1), true), mixedArray(\"union fields\", map_2((fi) => autoDecoder(extra, caseStrategy, false, fi[1]), getUnionCaseFields(uci_1)), path, values));\n }\n }\n else {\n return new FSharpResult$2(1, [path, new ErrorReason(6, ((\"Cannot find case \" + name) + \" in \") + fullName(t))]);\n }\n}\n\nfunction autoDecodeRecordsAndUnions(extra, caseStrategy, isOptional, t) {\n const decoderRef = new FSharpRef(null);\n const extra_1 = add(fullName(t), decoderRef, extra);\n let decoder;\n if (isRecord(t, true)) {\n const decoders = map_2((fi) => [Util_Casing_convert(caseStrategy, name_3(fi)), autoDecoder(extra_1, caseStrategy, false, fi[1])], getRecordElements(t, true));\n decoder = ((path) => ((value_1) => Result_Map((xs) => makeRecord(t, toArray(xs), true), autoObject(decoders, path, value_1))));\n }\n else if (isUnion(t, true)) {\n decoder = ((path_1) => ((value_2) => {\n if ((typeof value_2) === \"string\") {\n return makeUnion(extra_1, caseStrategy, t, value_2, path_1, []);\n }\n else if (Array.isArray(value_2)) {\n const values = value_2;\n return makeUnion(extra_1, caseStrategy, t, values[0], path_1, values.slice(1, values.length));\n }\n else {\n return new FSharpResult$2(1, [path_1, new ErrorReason(0, \"a string or array\", value_2)]);\n }\n }));\n }\n else if (isOptional) {\n decoder = ((path_2) => ((value_3) => (new FSharpResult$2(1, [path_2, new ErrorReason(2, \"an extra coder for \" + fullName(t), value_3)]))));\n }\n else {\n let message;\n const arg10 = fullName(t);\n message = toText(printf(\"Cannot generate auto decoder for %s. Please pass an extra decoder.\"))(arg10);\n throw (new Error(message));\n }\n decoderRef.contents = decoder;\n return decoder;\n}\n\nfunction autoDecoder(extra, caseStrategy, isOptional, t) {\n let decoder_15;\n const fullname = fullName(t);\n const matchValue = tryFind_1(fullname, extra);\n if (matchValue == null) {\n if (isArray(t)) {\n const decoder = autoDecoder(extra, caseStrategy, false, getElementType(t));\n return (path_1) => ((value_2) => array(uncurry(2, decoder), path_1, value_2));\n }\n else if (isEnum(t)) {\n const enumType = fullName(getEnumUnderlyingType(t));\n if (enumType === \"System.SByte\") {\n return (path_2) => ((value_4) => {\n const t_2 = t;\n const path_3 = path_2;\n const value_5 = value_4;\n const matchValue_1 = sbyte(path_3)(value_5);\n if (matchValue_1.tag === 1) {\n return new FSharpResult$2(1, matchValue_1.fields[0]);\n }\n else {\n const enumValue = matchValue_1.fields[0];\n return contains(enumValue, getEnumValues(t_2), {\n Equals: (x, y) => (x === y),\n GetHashCode: (x) => numberHash(x),\n }) ? (new FSharpResult$2(0, parseEnum(t_2, enumValue.toString()))) : (new FSharpResult$2(1, [path_3, new ErrorReason(1, fullName(t_2), value_5, \"Unkown value provided for the enum\")]));\n }\n });\n }\n else if (enumType === \"System.Byte\") {\n return (path_4) => ((value_7) => {\n const t_3 = t;\n const path_5 = path_4;\n const value_8 = value_7;\n const matchValue_2 = byte(path_5)(value_8);\n if (matchValue_2.tag === 1) {\n return new FSharpResult$2(1, matchValue_2.fields[0]);\n }\n else {\n const enumValue_1 = matchValue_2.fields[0];\n return contains(enumValue_1, getEnumValues(t_3), {\n Equals: (x_1, y_1) => (x_1 === y_1),\n GetHashCode: (x_1) => numberHash(x_1),\n }) ? (new FSharpResult$2(0, parseEnum(t_3, enumValue_1.toString()))) : (new FSharpResult$2(1, [path_5, new ErrorReason(1, fullName(t_3), value_8, \"Unkown value provided for the enum\")]));\n }\n });\n }\n else if (enumType === \"System.Int16\") {\n return (path_6) => ((value_10) => {\n const t_4 = t;\n const path_7 = path_6;\n const value_11 = value_10;\n const matchValue_3 = int16(path_7)(value_11);\n if (matchValue_3.tag === 1) {\n return new FSharpResult$2(1, matchValue_3.fields[0]);\n }\n else {\n const enumValue_2 = matchValue_3.fields[0];\n return contains(enumValue_2, getEnumValues(t_4), {\n Equals: (x_2, y_2) => (x_2 === y_2),\n GetHashCode: (x_2) => numberHash(x_2),\n }) ? (new FSharpResult$2(0, parseEnum(t_4, int16ToString(enumValue_2)))) : (new FSharpResult$2(1, [path_7, new ErrorReason(1, fullName(t_4), value_11, \"Unkown value provided for the enum\")]));\n }\n });\n }\n else if (enumType === \"System.UInt16\") {\n return (path_8) => ((value_13) => {\n const t_5 = t;\n const path_9 = path_8;\n const value_14 = value_13;\n const matchValue_4 = uint16(path_9)(value_14);\n if (matchValue_4.tag === 1) {\n return new FSharpResult$2(1, matchValue_4.fields[0]);\n }\n else {\n const enumValue_3 = matchValue_4.fields[0];\n return contains(enumValue_3, getEnumValues(t_5), {\n Equals: (x_3, y_3) => (x_3 === y_3),\n GetHashCode: (x_3) => numberHash(x_3),\n }) ? (new FSharpResult$2(0, parseEnum(t_5, enumValue_3.toString()))) : (new FSharpResult$2(1, [path_9, new ErrorReason(1, fullName(t_5), value_14, \"Unkown value provided for the enum\")]));\n }\n });\n }\n else if (enumType === \"System.Int32\") {\n return (path_10) => ((value_16) => {\n const t_6 = t;\n const path_11 = path_10;\n const value_17 = value_16;\n const matchValue_5 = int(path_11)(value_17);\n if (matchValue_5.tag === 1) {\n return new FSharpResult$2(1, matchValue_5.fields[0]);\n }\n else {\n const enumValue_4 = matchValue_5.fields[0];\n return contains(enumValue_4, getEnumValues(t_6), {\n Equals: (x_4, y_4) => (x_4 === y_4),\n GetHashCode: (x_4) => numberHash(x_4),\n }) ? (new FSharpResult$2(0, parseEnum(t_6, int32ToString(enumValue_4)))) : (new FSharpResult$2(1, [path_11, new ErrorReason(1, fullName(t_6), value_17, \"Unkown value provided for the enum\")]));\n }\n });\n }\n else if (enumType === \"System.UInt32\") {\n return (path_12) => ((value_19) => {\n const t_7 = t;\n const path_13 = path_12;\n const value_20 = value_19;\n const matchValue_6 = uint32(path_13)(value_20);\n if (matchValue_6.tag === 1) {\n return new FSharpResult$2(1, matchValue_6.fields[0]);\n }\n else {\n const enumValue_5 = matchValue_6.fields[0];\n return contains(enumValue_5, getEnumValues(t_7), {\n Equals: (x_5, y_5) => (x_5 === y_5),\n GetHashCode: (x_5) => numberHash(x_5),\n }) ? (new FSharpResult$2(0, parseEnum(t_7, enumValue_5.toString()))) : (new FSharpResult$2(1, [path_13, new ErrorReason(1, fullName(t_7), value_20, \"Unkown value provided for the enum\")]));\n }\n });\n }\n else {\n const arg10 = fullName(t);\n const clo2 = toFail(printf(\"Cannot generate auto decoder for %s.\\nThoth.Json.Net only support the folluwing enum types:\\n- sbyte\\n- byte\\n- int16\\n- uint16\\n- int\\n- uint32\\nIf you can\\u0027t use one of these types, please pass an extra decoder.\\n \"))(arg10);\n return (arg20) => {\n const clo3 = clo2(arg20);\n return (arg30) => clo3(arg30);\n };\n }\n }\n else if (isGenericType(t)) {\n if (isTuple(t)) {\n const decoders = map_2((t_8) => autoDecoder(extra, caseStrategy, false, t_8), getTupleElements(t));\n return (path_14) => ((value_21) => (Array.isArray(value_21) ? Result_Map((xs) => makeTuple(toArray(xs), t), mixedArray(\"tuple elements\", decoders, path_14, value_21)) : (new FSharpResult$2(1, [path_14, new ErrorReason(0, \"an array\", value_21)]))));\n }\n else {\n const fullname_1 = fullName(getGenericTypeDefinition(t));\n if (fullname_1 === \"Microsoft.FSharp.Core.FSharpOption`1[System.Object]\") {\n const decoder_13 = autoDecoder(extra, caseStrategy, true, getGenerics(t)[0]);\n return (path_15) => ((value_22) => option(uncurry(2, decoder_13), path_15, value_22));\n }\n else if (fullname_1 === \"Microsoft.FSharp.Collections.FSharpList`1[System.Object]\") {\n const decoder_14 = autoDecoder(extra, caseStrategy, false, getGenerics(t)[0]);\n return (path_16) => ((value_23) => list(uncurry(2, decoder_14), path_16, value_23));\n }\n else if (fullname_1 === \"Microsoft.FSharp.Collections.FSharpMap`2[System.Object,System.Object]\") {\n const keyDecoder = autoDecoder(extra, caseStrategy, false, getGenerics(t)[0]);\n const valueDecoder = autoDecoder(extra, caseStrategy, false, getGenerics(t)[1]);\n let d1;\n const decoders_1 = ofArray([(path_17) => ((value_24) => autoObject2(uncurry(2, keyDecoder), uncurry(2, valueDecoder), path_17, value_24)), (decoder_15 = tuple2(uncurry(2, keyDecoder), uncurry(2, valueDecoder)), (path_18) => ((value_25) => list(uncurry(2, decoder_15), path_18, value_25)))]);\n d1 = ((path_19) => ((value_26) => oneOf(decoders_1, path_19, value_26)));\n return (path_20) => ((value_28) => map((ar) => toMap(ar), uncurry(2, d1), path_20, value_28));\n }\n else if (fullname_1 === \"Microsoft.FSharp.Collections.FSharpSet`1[System.Object]\") {\n const decoder_16 = autoDecoder(extra, caseStrategy, false, getGenerics(t)[0]);\n return (path_21) => ((value_29) => {\n const matchValue_7 = array(uncurry(2, decoder_16), path_21, value_29);\n return (matchValue_7.tag === 0) ? (new FSharpResult$2(0, toSet(matchValue_7.fields[0]))) : (new FSharpResult$2(1, matchValue_7.fields[0]));\n });\n }\n else {\n return autoDecodeRecordsAndUnions(extra, caseStrategy, isOptional, t);\n }\n }\n }\n else if (fullname === \"System.Boolean\") {\n return (path_22) => ((value_31) => bool(path_22, value_31));\n }\n else if (fullname === \"Microsoft.FSharp.Core.Unit\") {\n return (path_23) => ((value_32) => unit(path_23, value_32));\n }\n else if (fullname === \"System.String\") {\n return (path_24) => ((value_33) => string(path_24, value_33));\n }\n else if (fullname === \"System.SByte\") {\n return sbyte;\n }\n else if (fullname === \"System.Byte\") {\n return byte;\n }\n else if (fullname === \"System.Int16\") {\n return int16;\n }\n else if (fullname === \"System.UInt16\") {\n return uint16;\n }\n else if (fullname === \"System.Int32\") {\n return int;\n }\n else if (fullname === \"System.UInt32\") {\n return uint32;\n }\n else if (fullname === \"System.Double\") {\n return (path_25) => ((value_34) => float(path_25, value_34));\n }\n else if (fullname === \"System.Single\") {\n return (path_26) => ((value_35) => float32(path_26, value_35));\n }\n else if (fullname === \"System.DateTime\") {\n return (path_27) => ((value_36) => datetime(path_27, value_36));\n }\n else if (fullname === \"System.DateTimeOffset\") {\n return (path_28) => ((value_37) => datetimeOffset(path_28, value_37));\n }\n else if (fullname === \"System.TimeSpan\") {\n return (path_29) => ((value_38) => timespan(path_29, value_38));\n }\n else if (fullname === \"System.Guid\") {\n return (path_30) => ((value_39) => guid(path_30, value_39));\n }\n else if (fullname === \"System.Object\") {\n return (_arg1_6) => ((v) => (new FSharpResult$2(0, v)));\n }\n else {\n return autoDecodeRecordsAndUnions(extra, caseStrategy, isOptional, t);\n }\n }\n else {\n const decoderRef = matchValue;\n return (path) => ((value_1) => decoderRef.contents(path)(value_1));\n }\n}\n\nfunction makeExtra(extra) {\n if (extra != null) {\n return map_3((_arg2, tupledArg) => (new FSharpRef(tupledArg[1])), extra.Coders);\n }\n else {\n return empty_1();\n }\n}\n\nexport class Auto {\n constructor() {\n }\n}\n\nexport function Auto$reflection() {\n return class_type(\"Thoth.Json.Decode.Auto\", void 0, Auto);\n}\n\nexport function Auto_generateBoxedDecoderCached_79988AEF(t, caseStrategy, extra) {\n let y_1, y;\n const caseStrategy_1 = defaultArg(caseStrategy, new CaseStrategy(0));\n return Util_Cache$1__GetOrAdd_43981464(Util_CachedDecoders, (y_1 = (y = fullName(t), toString_12(caseStrategy_1) + y), defaultArg(map_4((e) => e.Hash, extra), \"\") + y_1), () => autoDecoder(makeExtra(extra), caseStrategy_1, false, t));\n}\n\nexport function Auto_generateBoxedDecoder_79988AEF(t, caseStrategy, extra) {\n const caseStrategy_1 = defaultArg(caseStrategy, new CaseStrategy(0));\n return autoDecoder(makeExtra(extra), caseStrategy_1, false, t);\n}\n\n","import { Union } from \"../fable-library.3.1.12/Types.js\";\nimport { bool_type, class_type, union_type, obj_type, int32_type, string_type } from \"../fable-library.3.1.12/Reflection.js\";\nimport { int32ToString } from \"../fable-library.3.1.12/Util.js\";\nimport { keyValueList } from \"../fable-library.3.1.12/MapUtil.js\";\nimport { result } from \"../Fable.Promise.2.2.2/Promise.fs.js\";\nimport { singleton } from \"../fable-library.3.1.12/List.js\";\n\nexport class Types_HttpRequestHeaders extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Accept\", \"Accept-Charset\", \"Accept-Encoding\", \"Accept-Language\", \"Accept-Datetime\", \"Authorization\", \"Cache-Control\", \"Connection\", \"Cookie\", \"Content-Length\", \"Content-MD5\", \"Content-Type\", \"Date\", \"Expect\", \"Forwarded\", \"From\", \"Host\", \"If-Match\", \"If-Modified-Since\", \"If-None-Match\", \"If-Range\", \"If-Unmodified-Since\", \"Max-Forwards\", \"Origin\", \"Pragma\", \"Proxy-Authorization\", \"Range\", \"Referer\", \"SOAPAction\", \"TE\", \"User-Agent\", \"Upgrade\", \"Via\", \"Warning\", \"X-Requested-With\", \"DNT\", \"X-Forwarded-For\", \"X-Forwarded-Host\", \"X-Forwarded-Proto\", \"Front-End-Https\", \"X-Http-Method-Override\", \"X-ATT-DeviceId\", \"X-Wap-Profile\", \"Proxy-Connection\", \"X-UIDH\", \"X-Csrf-Token\", \"Custom\"];\n }\n}\n\nexport function Types_HttpRequestHeaders$reflection() {\n return union_type(\"Fetch.Types.HttpRequestHeaders\", [], Types_HttpRequestHeaders, () => [[[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", int32_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"key\", string_type], [\"value\", obj_type]]]);\n}\n\nexport class Types_RequestProperties extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Method\", \"Headers\", \"Body\", \"Mode\", \"Credentials\", \"Cache\", \"Redirect\", \"Referrer\", \"ReferrerPolicy\", \"Integrity\", \"KeepAlive\", \"Signal\"];\n }\n}\n\nexport function Types_RequestProperties$reflection() {\n return union_type(\"Fetch.Types.RequestProperties\", [], Types_RequestProperties, () => [[[\"Item\", string_type]], [[\"Item\", class_type(\"Fetch.Types.IHttpRequestHeaders\")]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", class_type(\"Fetch.Types.AbortSignal\")]]]);\n}\n\nfunction errorString(response) {\n return (((int32ToString(response.status) + \" \") + (response.statusText)) + \" for URL \") + (response.url);\n}\n\nexport function fetch$(url, init) {\n const pr = fetch(url, keyValueList(init, 1));\n return pr.then(((response) => {\n if (response.ok) {\n return response;\n }\n else {\n const message = errorString(response);\n throw (new Error(message));\n }\n }));\n}\n\nexport function tryFetch(url, init) {\n return result(fetch$(url, init));\n}\n\nexport function tryOptionsRequest(url) {\n return result(fetch$(url, singleton(new Types_RequestProperties(0, \"OPTIONS\"))));\n}\n\n","import { Types_RequestProperties } from \"./.fable/Fable.Fetch.2.3.1/Fetch.fs.js\";\nimport { singleton } from \"./.fable/fable-library.3.1.12/List.js\";\nimport { keyValueList } from \"./.fable/fable-library.3.1.12/MapUtil.js\";\nimport { reject } from \"./.fable/Fable.Promise.2.2.2/Promise.fs.js\";\nimport { interpolate, toText } from \"./.fable/fable-library.3.1.12/String.js\";\nimport { fromString } from \"./.fable/Thoth.Json.6.0.0/Decode.fs.js\";\n\nexport function fetchAs(url, decoder) {\n let pr_1, props;\n const abortController = new AbortController();\n return [(pr_1 = fetch(url, (props = singleton(new Types_RequestProperties(11, abortController.signal)), keyValueList(props, 1))), pr_1.then(((response) => {\n if (!(response.ok)) {\n return reject(toText(interpolate(\"%d%P() %s%P() for URL %s%P()\", [response.status, response.statusText, response.url])));\n }\n else {\n const pr = response.text();\n return pr.then(((json) => {\n const matchValue = fromString(decoder, json);\n if (matchValue.tag === 1) {\n return reject(matchValue.fields[0]);\n }\n else {\n return Promise.resolve(matchValue.fields[0]);\n }\n }));\n }\n }))), abortController.abort];\n}\n\n","import { compare } from \"./Util.js\";\nimport { unfold, delay } from \"./Seq.js\";\nimport { op_Addition, fromZero } from \"./BigInt.js\";\nimport { op_Addition as op_Addition_1, fromParts } from \"./Decimal.js\";\nimport { op_Addition as op_Addition_2, fromBits } from \"./Long.js\";\n\nexport function makeRangeStepFunction(step, stop, zero, add) {\n const stepComparedWithZero = compare(step, zero) | 0;\n if (stepComparedWithZero === 0) {\n throw (new Error(\"The step of a range cannot be zero\"));\n }\n const stepGreaterThanZero = stepComparedWithZero > 0;\n return (x) => {\n const comparedWithLast = compare(x, stop) | 0;\n return ((stepGreaterThanZero ? (comparedWithLast <= 0) : false) ? true : ((!stepGreaterThanZero) ? (comparedWithLast >= 0) : false)) ? [x, add(x, step)] : (void 0);\n };\n}\n\nexport function integralRangeStep(start, step, stop, zero, add) {\n const stepFn = makeRangeStepFunction(step, stop, zero, add);\n return delay(() => unfold(stepFn, start));\n}\n\nexport function rangeBigInt(start, step, stop) {\n return integralRangeStep(start, step, stop, fromZero(), (x, y) => op_Addition(x, y));\n}\n\nexport function rangeDecimal(start, step, stop) {\n return integralRangeStep(start, step, stop, fromParts(0, 0, 0, false, 0), (x, y) => op_Addition_1(x, y));\n}\n\nexport function rangeDouble(start, step, stop) {\n return integralRangeStep(start, step, stop, 0, (x, y) => (x + y));\n}\n\nexport function rangeInt64(start, step, stop) {\n return integralRangeStep(start, step, stop, fromBits(0, 0, false), (x, y) => op_Addition_2(x, y));\n}\n\nexport function rangeUInt64(start, step, stop) {\n return integralRangeStep(start, step, stop, fromBits(0, 0, true), (x, y) => op_Addition_2(x, y));\n}\n\nexport function rangeChar(start, stop) {\n const intStop = stop.charCodeAt(0) | 0;\n return delay(() => unfold((c) => {\n if (c <= intStop) {\n return [String.fromCharCode(c), c + 1];\n }\n else {\n return void 0;\n }\n }, start.charCodeAt(0)));\n}\n\n","import { Union } from \"../fable-library.3.1.12/Types.js\";\nimport { class_type, union_type, int32_type, array_type } from \"../fable-library.3.1.12/Reflection.js\";\nimport { fill } from \"../fable-library.3.1.12/Array.js\";\nimport { comparePrimitives, max } from \"../fable-library.3.1.12/Util.js\";\nimport { some } from \"../fable-library.3.1.12/Option.js\";\nimport { singleton, collect, take, skip, append, delay } from \"../fable-library.3.1.12/Seq.js\";\nimport { rangeDouble } from \"../fable-library.3.1.12/Range.js\";\n\nexport class RingState$1 extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Writable\", \"ReadWritable\"];\n }\n}\n\nexport function RingState$1$reflection(gen0) {\n return union_type(\"Elmish.RingState`1\", [gen0], RingState$1, () => [[[\"wx\", array_type(gen0)], [\"ix\", int32_type]], [[\"rw\", array_type(gen0)], [\"wix\", int32_type], [\"rix\", int32_type]]]);\n}\n\nexport class RingBuffer$1 {\n constructor(size) {\n this.state = (new RingState$1(0, fill(new Array(max((x, y) => comparePrimitives(x, y), size, 10)), 0, max((x, y) => comparePrimitives(x, y), size, 10), null), 0));\n }\n}\n\nexport function RingBuffer$1$reflection(gen0) {\n return class_type(\"Elmish.RingBuffer`1\", [gen0], RingBuffer$1);\n}\n\nexport function RingBuffer$1_$ctor_Z524259A4(size) {\n return new RingBuffer$1(size);\n}\n\nexport function RingBuffer$1__Pop(__) {\n const matchValue = __.state;\n if (matchValue.tag === 1) {\n const wix = matchValue.fields[1] | 0;\n const rix = matchValue.fields[2] | 0;\n const items = matchValue.fields[0];\n const rix$0027 = ((rix + 1) % items.length) | 0;\n if (rix$0027 === wix) {\n __.state = (new RingState$1(0, items, wix));\n }\n else {\n __.state = (new RingState$1(1, items, wix, rix$0027));\n }\n return some(items[rix]);\n }\n else {\n return void 0;\n }\n}\n\nexport function RingBuffer$1__Push_2B595(__, item) {\n const matchValue = __.state;\n if (matchValue.tag === 1) {\n const wix_1 = matchValue.fields[1] | 0;\n const rix = matchValue.fields[2] | 0;\n const items_1 = matchValue.fields[0];\n items_1[wix_1] = item;\n const wix$0027 = ((wix_1 + 1) % items_1.length) | 0;\n if (wix$0027 === rix) {\n __.state = (new RingState$1(1, RingBuffer$1__doubleSize(__, rix, items_1), items_1.length, 0));\n }\n else {\n __.state = (new RingState$1(1, items_1, wix$0027, rix));\n }\n }\n else {\n const ix = matchValue.fields[1] | 0;\n const items = matchValue.fields[0];\n items[ix] = item;\n const wix = ((ix + 1) % items.length) | 0;\n __.state = (new RingState$1(1, items, wix, ix));\n }\n}\n\nfunction RingBuffer$1__doubleSize(this$, ix, items) {\n return Array.from(delay(() => append(skip(ix, items), delay(() => append(take(ix, items), delay(() => collect((matchValue) => singleton(null), rangeDouble(0, 1, items.length))))))));\n}\n\n","import { Record } from \"../fable-library.3.1.12/Types.js\";\nimport { record_type, class_type, string_type, tuple_type, list_type, lambda_type, unit_type } from \"../fable-library.3.1.12/Reflection.js\";\nimport { Cmd_exec, Cmd_batch, Cmd_none } from \"./cmd.fs.js\";\nimport { Log_toConsole, Log_onError } from \"./prelude.fs.js\";\nimport { curry, partialApply, uncurry } from \"../fable-library.3.1.12/Util.js\";\nimport { ofArray } from \"../fable-library.3.1.12/List.js\";\nimport { RingBuffer$1__Pop, RingBuffer$1__Push_2B595, RingBuffer$1_$ctor_Z524259A4 } from \"./ring.fs.js\";\nimport { value as value_1, some } from \"../fable-library.3.1.12/Option.js\";\nimport { printf, toText } from \"../fable-library.3.1.12/String.js\";\n\nexport class Program$4 extends Record {\n constructor(init, update, subscribe, view, setState, onError, syncDispatch) {\n super();\n this.init = init;\n this.update = update;\n this.subscribe = subscribe;\n this.view = view;\n this.setState = setState;\n this.onError = onError;\n this.syncDispatch = syncDispatch;\n }\n}\n\nexport function Program$4$reflection(gen0, gen1, gen2, gen3) {\n return record_type(\"Elmish.Program`4\", [gen0, gen1, gen2, gen3], Program$4, () => [[\"init\", lambda_type(gen0, tuple_type(gen1, list_type(lambda_type(lambda_type(gen2, unit_type), unit_type))))], [\"update\", lambda_type(gen2, lambda_type(gen1, tuple_type(gen1, list_type(lambda_type(lambda_type(gen2, unit_type), unit_type)))))], [\"subscribe\", lambda_type(gen1, list_type(lambda_type(lambda_type(gen2, unit_type), unit_type)))], [\"view\", lambda_type(gen1, lambda_type(lambda_type(gen2, unit_type), gen3))], [\"setState\", lambda_type(gen1, lambda_type(lambda_type(gen2, unit_type), unit_type))], [\"onError\", lambda_type(tuple_type(string_type, class_type(\"System.Exception\")), unit_type)], [\"syncDispatch\", lambda_type(lambda_type(gen2, unit_type), lambda_type(gen2, unit_type))]]);\n}\n\nexport function ProgramModule_mkProgram(init, update, view) {\n return new Program$4(init, update, (_arg1) => Cmd_none(), view, (model, arg) => {\n void view(model, arg);\n }, (tupledArg) => {\n Log_onError(tupledArg[0], tupledArg[1]);\n }, uncurry(2, (x) => x));\n}\n\nexport function ProgramModule_mkSimple(init, update, view) {\n return new Program$4((arg) => [init(arg), Cmd_none()], (msg, arg_1) => [update(msg, arg_1), Cmd_none()], (_arg1) => Cmd_none(), view, (model, arg_2) => {\n void view(model, arg_2);\n }, (tupledArg) => {\n Log_onError(tupledArg[0], tupledArg[1]);\n }, uncurry(2, (x) => x));\n}\n\nexport function ProgramModule_withSubscription(subscribe, program) {\n return new Program$4(program.init, program.update, (model) => Cmd_batch(ofArray([program.subscribe(model), subscribe(model)])), program.view, program.setState, program.onError, program.syncDispatch);\n}\n\nexport function ProgramModule_withConsoleTrace(program) {\n return new Program$4((arg) => {\n const patternInput = program.init(arg);\n const initModel = patternInput[0];\n Log_toConsole(\"Initial state:\", initModel);\n return [initModel, patternInput[1]];\n }, (msg, model) => {\n Log_toConsole(\"New message:\", msg);\n const patternInput_1 = program.update(msg, model);\n const newModel = patternInput_1[0];\n Log_toConsole(\"Updated state:\", newModel);\n return [newModel, patternInput_1[1]];\n }, program.subscribe, program.view, program.setState, program.onError, program.syncDispatch);\n}\n\nexport function ProgramModule_withTrace(trace, program) {\n return new Program$4(program.init, (msg, model) => {\n const patternInput = program.update(msg, model);\n const state = patternInput[0];\n trace(msg, state);\n return [state, patternInput[1]];\n }, program.subscribe, program.view, program.setState, program.onError, program.syncDispatch);\n}\n\nexport function ProgramModule_withErrorHandler(onError, program) {\n return new Program$4(program.init, program.update, program.subscribe, program.view, program.setState, onError, program.syncDispatch);\n}\n\nexport function ProgramModule_mapErrorHandler(map, program) {\n return new Program$4(program.init, program.update, program.subscribe, program.view, program.setState, partialApply(1, map, [program.onError]), program.syncDispatch);\n}\n\nexport function ProgramModule_onError(program) {\n return program.onError;\n}\n\nexport function ProgramModule_withSetState(setState, program) {\n return new Program$4(program.init, program.update, program.subscribe, program.view, setState, program.onError, program.syncDispatch);\n}\n\nexport function ProgramModule_setState(program) {\n return curry(2, program.setState);\n}\n\nexport function ProgramModule_view(program) {\n return curry(2, program.view);\n}\n\nexport function ProgramModule_withSyncDispatch(syncDispatch, program) {\n return new Program$4(program.init, program.update, program.subscribe, program.view, program.setState, program.onError, syncDispatch);\n}\n\nexport function ProgramModule_map(mapInit, mapUpdate, mapView, mapSetState, mapSubscribe, program) {\n const init = partialApply(1, mapInit, [program.init]);\n const update = partialApply(2, mapUpdate, [program.update]);\n const view = partialApply(2, mapView, [program.view]);\n const setState = partialApply(2, mapSetState, [program.setState]);\n return new Program$4(init, uncurry(2, update), partialApply(1, mapSubscribe, [program.subscribe]), uncurry(2, view), uncurry(2, setState), program.onError, uncurry(2, (x) => x));\n}\n\nexport function ProgramModule_runWith(arg, program) {\n const patternInput = program.init(arg);\n const model = patternInput[0];\n const rb = RingBuffer$1_$ctor_Z524259A4(10);\n let reentered = false;\n let state = model;\n const dispatch = (msg) => {\n if (reentered) {\n RingBuffer$1__Push_2B595(rb, msg);\n }\n else {\n reentered = true;\n let nextMsg = some(msg);\n while (nextMsg != null) {\n const msg_1 = value_1(nextMsg);\n try {\n const patternInput_1 = program.update(msg_1, state);\n const model$0027 = patternInput_1[0];\n program.setState(model$0027, syncDispatch);\n Cmd_exec((ex) => {\n program.onError([toText(printf(\"Error in command while handling: %A\"))(msg_1), ex]);\n }, syncDispatch, patternInput_1[1]);\n state = model$0027;\n }\n catch (ex_1) {\n program.onError([toText(printf(\"Unable to process the message: %A\"))(msg_1), ex_1]);\n }\n nextMsg = RingBuffer$1__Pop(rb);\n }\n reentered = false;\n }\n };\n const syncDispatch = partialApply(1, program.syncDispatch, [dispatch]);\n program.setState(model, syncDispatch);\n Cmd_exec((ex_3) => {\n program.onError([\"Error intitializing:\", ex_3]);\n }, syncDispatch, Cmd_batch(ofArray([(() => {\n try {\n return program.subscribe(model);\n }\n catch (ex_2) {\n program.onError([\"Unable to subscribe:\", ex_2]);\n return Cmd_none();\n }\n })(), patternInput[1]])));\n}\n\nexport function ProgramModule_run(program) {\n ProgramModule_runWith(void 0, program);\n}\n\n","import { Union } from \"../fable-library.3.1.12/Types.js\";\nimport { union_type, class_type } from \"../fable-library.3.1.12/Reflection.js\";\nimport { ofArray, singleton } from \"../fable-library.3.1.12/List.js\";\nimport { Cmd_batch, Cmd_map } from \"../Fable.Elmish.3.1.0/cmd.fs.js\";\nimport { ProgramModule_map } from \"../Fable.Elmish.3.1.0/program.fs.js\";\n\nexport class Navigable$1 extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Change\", \"UserMsg\"];\n }\n}\n\nexport function Navigable$1$reflection(gen0) {\n return union_type(\"Elmish.Navigation.Navigable`1\", [gen0], Navigable$1, () => [[[\"Item\", class_type(\"Browser.Types.Location\")]], [[\"Item\", gen0]]]);\n}\n\nexport function Navigation_modifyUrl(newUrl) {\n return singleton((_arg1) => {\n history.replaceState(void 0, \"\", newUrl);\n });\n}\n\nexport function Navigation_newUrl(newUrl) {\n return singleton((_arg1) => {\n history.pushState(void 0, \"\", newUrl);\n void window.dispatchEvent(new CustomEvent(\"NavigatedEvent\"));\n });\n}\n\nexport function Navigation_jump(n) {\n return singleton((_arg1) => {\n history.go(n);\n });\n}\n\nlet ProgramModule_Internal_onChangeRef = (_arg1) => {\n throw (new Error(\"`onChangeRef` has not been initialized.\\nPlease make sure you used Elmish.Navigation.Program.Internal.subscribe\"));\n};\n\nexport function ProgramModule_Internal_subscribe(dispatch) {\n let lastLocation = void 0;\n ProgramModule_Internal_onChangeRef = ((_arg1) => {\n let value;\n let pattern_matching_result;\n if (lastLocation != null) {\n if (lastLocation === window.location.href) {\n pattern_matching_result = 0;\n }\n else {\n pattern_matching_result = 1;\n }\n }\n else {\n pattern_matching_result = 1;\n }\n switch (pattern_matching_result) {\n case 0: {\n value = (void 0);\n break;\n }\n case 1: {\n lastLocation = window.location.href;\n value = dispatch(new Navigable$1(0, window.location));\n break;\n }\n }\n return void 0;\n });\n window.addEventListener(\"popstate\", (arg10) => {\n ProgramModule_Internal_onChangeRef(arg10);\n });\n window.addEventListener(\"hashchange\", (arg10_1) => {\n ProgramModule_Internal_onChangeRef(arg10_1);\n });\n window.addEventListener(\"NavigatedEvent\", (arg10_2) => {\n ProgramModule_Internal_onChangeRef(arg10_2);\n });\n}\n\nexport function ProgramModule_Internal_unsubscribe() {\n window.removeEventListener(\"popstate\", (arg10) => {\n ProgramModule_Internal_onChangeRef(arg10);\n });\n window.removeEventListener(\"hashchange\", (arg10_1) => {\n ProgramModule_Internal_onChangeRef(arg10_1);\n });\n window.removeEventListener(\"NavigatedEvent\", (arg10_2) => {\n ProgramModule_Internal_onChangeRef(arg10_2);\n });\n}\n\nexport function ProgramModule_Internal_toNavigableWith(parser, urlUpdate, program, onLocationChange) {\n const map = (tupledArg) => [tupledArg[0], Cmd_map((arg0) => (new Navigable$1(1, arg0)), tupledArg[1])];\n return ProgramModule_map((userInit, unitVar1) => map(userInit(parser(window.location))), (userUpdate, msg, model_1) => map((msg.tag === 1) ? userUpdate(msg.fields[0], model_1) : urlUpdate(parser(msg.fields[0]), model_1)), (userView, model_4, dispatch_1) => userView(model_4, (arg_1) => dispatch_1(new Navigable$1(1, arg_1))), (userSetState, model_3, dispatch) => userSetState(model_3, (arg) => dispatch(new Navigable$1(1, arg))), (userSubscribe, model_2) => Cmd_batch(ofArray([singleton(onLocationChange), Cmd_map((arg0_1) => (new Navigable$1(1, arg0_1)), userSubscribe(model_2))])), program);\n}\n\nexport function ProgramModule_toNavigable(parser, urlUpdate, program) {\n return ProgramModule_Internal_toNavigableWith(parser, urlUpdate, program, (dispatch) => {\n ProgramModule_Internal_subscribe(dispatch);\n });\n}\n\n","import { some, value } from \"../fable-library.3.1.12/Option.js\";\n\nexport function tuple(a, b) {\n const matchValue = [a, b];\n let pattern_matching_result, a_1, b_1;\n if (matchValue[0] != null) {\n if (matchValue[1] != null) {\n pattern_matching_result = 0;\n a_1 = value(matchValue[0]);\n b_1 = value(matchValue[1]);\n }\n else {\n pattern_matching_result = 1;\n }\n }\n else {\n pattern_matching_result = 1;\n }\n switch (pattern_matching_result) {\n case 0: {\n return [a_1, b_1];\n }\n case 1: {\n return void 0;\n }\n }\n}\n\nexport function ofFunc(f, arg) {\n try {\n return some(f(arg));\n }\n catch (matchValue) {\n return void 0;\n }\n}\n\n","import { FSharpRef, Record } from \"../fable-library.3.1.12/Types.js\";\nimport { record_type, class_type, list_type, string_type } from \"../fable-library.3.1.12/Reflection.js\";\nimport { ofArray, collect, map as map_1, singleton, tail, cons, empty, head, isEmpty } from \"../fable-library.3.1.12/List.js\";\nimport { FSharpResult$2 } from \"../fable-library.3.1.12/Choice.js\";\nimport { tryParse } from \"../fable-library.3.1.12/Int32.js\";\nimport { empty as empty_1, ofSeq, tryFind } from \"../fable-library.3.1.12/Map.js\";\nimport { some, bind } from \"../fable-library.3.1.12/Option.js\";\nimport { substring, split } from \"../fable-library.3.1.12/String.js\";\nimport { equalsWith } from \"../fable-library.3.1.12/Array.js\";\nimport { comparePrimitives } from \"../fable-library.3.1.12/Util.js\";\nimport { ofFunc, tuple } from \"./prelude.fs.js\";\nimport { map as map_2, choose } from \"../fable-library.3.1.12/Seq.js\";\n\nexport class State$1 extends Record {\n constructor(visited, unvisited, args, value) {\n super();\n this.visited = visited;\n this.unvisited = unvisited;\n this.args = args;\n this.value = value;\n }\n}\n\nexport function State$1$reflection(gen0) {\n return record_type(\"Elmish.UrlParser.State`1\", [gen0], State$1, () => [[\"visited\", list_type(string_type)], [\"unvisited\", list_type(string_type)], [\"args\", class_type(\"Microsoft.FSharp.Collections.FSharpMap`2\", [string_type, string_type])], [\"value\", gen0]]);\n}\n\nexport function StateModule_mkState(visited, unvisited, args, value) {\n return new State$1(visited, unvisited, args, value);\n}\n\nexport function StateModule_map(f, _arg1) {\n return new State$1(_arg1.visited, _arg1.unvisited, _arg1.args, f(_arg1.value));\n}\n\nexport function custom(tipe, stringToSomething) {\n return (_arg1) => {\n const unvisited = _arg1.unvisited;\n if (!isEmpty(unvisited)) {\n const next = head(unvisited);\n const matchValue = stringToSomething(next);\n if (matchValue.tag === 1) {\n return empty();\n }\n else {\n return singleton(StateModule_mkState(cons(next, _arg1.visited), tail(unvisited), _arg1.args, _arg1.value(matchValue.fields[0])));\n }\n }\n else {\n return empty();\n }\n };\n}\n\nexport function str(state) {\n return custom(\"string\", (arg0) => (new FSharpResult$2(0, arg0)))(state);\n}\n\nexport function i32(state) {\n return custom(\"i32\", (arg) => {\n let _arg1;\n let outArg = 0;\n _arg1 = [tryParse(arg, 511, false, 32, new FSharpRef(() => outArg, (v) => {\n outArg = v;\n })), outArg];\n return _arg1[0] ? (new FSharpResult$2(0, _arg1[1])) : (new FSharpResult$2(1, \"Can\\u0027t parse int\"));\n })(state);\n}\n\nexport function s(str_1) {\n return (_arg1) => {\n const unvisited = _arg1.unvisited;\n if (!isEmpty(unvisited)) {\n const next = head(unvisited);\n if (next === str_1) {\n return singleton(StateModule_mkState(cons(next, _arg1.visited), tail(unvisited), _arg1.args, _arg1.value));\n }\n else {\n return empty();\n }\n }\n else {\n return empty();\n }\n };\n}\n\nexport function map(subValue, parse_1) {\n return (_arg1) => map_1((arg10$0040) => StateModule_map(_arg1.value, arg10$0040), parse_1(new State$1(_arg1.visited, _arg1.unvisited, _arg1.args, subValue)));\n}\n\nexport function oneOf(parsers, state) {\n return collect((parser) => parser(state), parsers);\n}\n\nexport function top(state) {\n return singleton(state);\n}\n\nexport function customParam(key, func) {\n return (_arg1) => {\n const args = _arg1.args;\n return singleton(StateModule_mkState(_arg1.visited, _arg1.unvisited, args, _arg1.value(func(tryFind(key, args)))));\n };\n}\n\nexport function stringParam(name) {\n return customParam(name, (x) => x);\n}\n\nexport const intParamHelp = (option) => bind((value) => {\n let matchValue;\n let outArg = 0;\n matchValue = [tryParse(value, 511, false, 32, new FSharpRef(() => outArg, (v) => {\n outArg = v;\n })), outArg];\n if (matchValue[0]) {\n return matchValue[1];\n }\n else {\n return void 0;\n }\n}, option);\n\nexport function intParam(name) {\n return customParam(name, intParamHelp);\n}\n\nexport function parseHelp(states_mut) {\n parseHelp:\n while (true) {\n const states = states_mut;\n if (!isEmpty(states)) {\n const state = head(states);\n const matchValue = state.unvisited;\n let pattern_matching_result;\n if (!isEmpty(matchValue)) {\n if (head(matchValue) === \"\") {\n if (isEmpty(tail(matchValue))) {\n pattern_matching_result = 1;\n }\n else {\n pattern_matching_result = 2;\n }\n }\n else {\n pattern_matching_result = 2;\n }\n }\n else {\n pattern_matching_result = 0;\n }\n switch (pattern_matching_result) {\n case 0: {\n return some(state.value);\n }\n case 1: {\n return some(state.value);\n }\n case 2: {\n states_mut = tail(states);\n continue parseHelp;\n }\n }\n }\n else {\n return void 0;\n }\n break;\n }\n}\n\nexport function splitUrl(url) {\n const matchValue = ofArray(url.split(\"/\"));\n let pattern_matching_result, segments, segments_1;\n if (!isEmpty(matchValue)) {\n if (head(matchValue) === \"\") {\n pattern_matching_result = 0;\n segments = tail(matchValue);\n }\n else {\n pattern_matching_result = 1;\n segments_1 = matchValue;\n }\n }\n else {\n pattern_matching_result = 1;\n segments_1 = matchValue;\n }\n switch (pattern_matching_result) {\n case 0: {\n return segments;\n }\n case 1: {\n return segments_1;\n }\n }\n}\n\nexport function parse(parser, url, args) {\n return parseHelp(parser(new State$1(empty(), splitUrl(url), args, (x) => x)));\n}\n\nexport function toKeyValuePair(segment) {\n const matchValue = split(segment, [\"=\"], null, 0);\n if ((!equalsWith((x, y) => comparePrimitives(x, y), matchValue, null)) ? (matchValue.length === 2) : false) {\n const value = matchValue[1];\n return tuple(ofFunc(decodeURIComponent, matchValue[0]), ofFunc(decodeURIComponent, value));\n }\n else {\n return void 0;\n }\n}\n\nexport function parseParams(querystring) {\n if (querystring.length > 1) {\n return ofSeq(choose((x) => x, map_2((segment) => toKeyValuePair(segment), split(substring(querystring, 1), [\"\\u0026\"], null, 0))));\n }\n else {\n return empty_1();\n }\n}\n\nexport function parsePath(parser, location) {\n return parse(parser, location.pathname, parseParams(location.search));\n}\n\nexport function parseHash(parser, location) {\n let patternInput;\n const hash = (location.hash.length > 1) ? substring(location.hash, 1) : \"\";\n if (hash.indexOf(\"?\") >= 0) {\n const h = substring(hash, 0, hash.indexOf(\"?\"));\n patternInput = [h, substring(hash, h.length)];\n }\n else {\n patternInput = [hash, \"?\"];\n }\n return parse(parser, patternInput[0], parseParams(patternInput[1]));\n}\n\n","import { Union } from \"./.fable/fable-library.3.1.12/Types.js\";\nimport { union_type, option_type, int32_type } from \"./.fable/fable-library.3.1.12/Reflection.js\";\nimport { interpolate, toText } from \"./.fable/fable-library.3.1.12/String.js\";\nimport { parsePath, oneOf, i32, s, map } from \"./.fable/Fable.Elmish.Browser.3.0.4/parser.fs.js\";\nimport { ofArray, collect } from \"./.fable/fable-library.3.1.12/List.js\";\n\nexport class Page extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Recommendations\", \"Rankings\"];\n }\n}\n\nexport function Page$reflection() {\n return union_type(\"Client.Pages.Page\", [], Page, () => [[[\"Item\", option_type(int32_type)]], []]);\n}\n\nexport function toPath(_arg1) {\n if (_arg1.tag === 1) {\n return \"/rankings\";\n }\n else if (_arg1.fields[0] != null) {\n const id = _arg1.fields[0] | 0;\n return toText(interpolate(\"/game/%i%P()\", [id]));\n }\n else {\n return \"/\";\n }\n}\n\nexport const pageParser = (() => {\n let parseBefore;\n const parsers = ofArray([map(new Page(0, void 0), s(\"\")), map((arg) => (new Page(0, arg)), (parseBefore = s(\"game\"), (state_1) => collect((state) => i32(state), parseBefore(state_1)))), map(new Page(1), s(\"rankings\"))]);\n return (state_3) => oneOf(parsers, state_3);\n})();\n\nexport function urlParser(location) {\n return parsePath(pageParser, location);\n}\n\n","import { some } from \"../fable-library.3.1.12/Option.js\";\nimport { create, isLeapYear } from \"../fable-library.3.1.12/Date.js\";\nimport { parse } from \"../fable-library.3.1.12/Int32.js\";\nimport { split, isNullOrWhiteSpace } from \"../fable-library.3.1.12/String.js\";\nimport { equalsWith } from \"../fable-library.3.1.12/Array.js\";\nimport { comparePrimitives } from \"../fable-library.3.1.12/Util.js\";\nimport react from \"react\";\n\nexport function DateParsing_$007CBetween$007C_$007C(x, y, input) {\n if ((input >= x) ? (input <= y) : false) {\n return some(void 0);\n }\n else {\n return void 0;\n }\n}\n\nexport function DateParsing_isLeapYear(year) {\n return isLeapYear(year);\n}\n\nexport function DateParsing_$007CInt$007C_$007C(input) {\n try {\n return parse(input, 511, false, 32);\n }\n catch (matchValue) {\n return void 0;\n }\n}\n\nexport function DateParsing_parse(input) {\n try {\n if (isNullOrWhiteSpace(input)) {\n return void 0;\n }\n else {\n const parts = split(input, [\"-\"], null, 0);\n let patternInput;\n let pattern_matching_result, month, year;\n if ((!equalsWith((x, y) => comparePrimitives(x, y), parts, null)) ? (parts.length === 2) : false) {\n const activePatternResult10875 = DateParsing_$007CInt$007C_$007C(parts[0]);\n if (activePatternResult10875 != null) {\n const activePatternResult10876 = DateParsing_$007CInt$007C_$007C(parts[1]);\n if (activePatternResult10876 != null) {\n pattern_matching_result = 0;\n month = activePatternResult10876;\n year = activePatternResult10875;\n }\n else {\n pattern_matching_result = 1;\n }\n }\n else {\n pattern_matching_result = 1;\n }\n }\n else {\n pattern_matching_result = 1;\n }\n switch (pattern_matching_result) {\n case 0: {\n patternInput = [year, month, 1, 0, 0];\n break;\n }\n case 1: {\n let pattern_matching_result_1, day, month_1, year_1;\n if ((!equalsWith((x_1, y_1) => comparePrimitives(x_1, y_1), parts, null)) ? (parts.length === 3) : false) {\n const activePatternResult10872 = DateParsing_$007CInt$007C_$007C(parts[0]);\n if (activePatternResult10872 != null) {\n const activePatternResult10873 = DateParsing_$007CInt$007C_$007C(parts[1]);\n if (activePatternResult10873 != null) {\n const activePatternResult10874 = DateParsing_$007CInt$007C_$007C(parts[2]);\n if (activePatternResult10874 != null) {\n pattern_matching_result_1 = 0;\n day = activePatternResult10874;\n month_1 = activePatternResult10873;\n year_1 = activePatternResult10872;\n }\n else {\n pattern_matching_result_1 = 1;\n }\n }\n else {\n pattern_matching_result_1 = 1;\n }\n }\n else {\n pattern_matching_result_1 = 1;\n }\n }\n else {\n pattern_matching_result_1 = 1;\n }\n switch (pattern_matching_result_1) {\n case 0: {\n patternInput = [year_1, month_1, day, 0, 0];\n break;\n }\n case 1: {\n let pattern_matching_result_2, day_1, month_2, year_2;\n if ((!equalsWith((x_2, y_2) => comparePrimitives(x_2, y_2), parts, null)) ? (parts.length === 3) : false) {\n const activePatternResult10870 = DateParsing_$007CInt$007C_$007C(parts[0]);\n if (activePatternResult10870 != null) {\n const activePatternResult10871 = DateParsing_$007CInt$007C_$007C(parts[1]);\n if (activePatternResult10871 != null) {\n pattern_matching_result_2 = 0;\n day_1 = parts[2];\n month_2 = activePatternResult10871;\n year_2 = activePatternResult10870;\n }\n else {\n pattern_matching_result_2 = 1;\n }\n }\n else {\n pattern_matching_result_2 = 1;\n }\n }\n else {\n pattern_matching_result_2 = 1;\n }\n switch (pattern_matching_result_2) {\n case 0: {\n if (day_1.indexOf(\"T\") >= 0) {\n const matchValue = split(day_1, [\"T\"], null, 0);\n let pattern_matching_result_3, parsedDay, time;\n if ((!equalsWith((x_3, y_3) => comparePrimitives(x_3, y_3), matchValue, null)) ? (matchValue.length === 2) : false) {\n const activePatternResult10869 = DateParsing_$007CInt$007C_$007C(matchValue[0]);\n if (activePatternResult10869 != null) {\n pattern_matching_result_3 = 0;\n parsedDay = activePatternResult10869;\n time = matchValue[1];\n }\n else {\n pattern_matching_result_3 = 1;\n }\n }\n else {\n pattern_matching_result_3 = 1;\n }\n switch (pattern_matching_result_3) {\n case 0: {\n const matchValue_1 = split(time, [\":\"], null, 0);\n let pattern_matching_result_4, hour, minute;\n if ((!equalsWith((x_4, y_4) => comparePrimitives(x_4, y_4), matchValue_1, null)) ? (matchValue_1.length === 2) : false) {\n const activePatternResult10867 = DateParsing_$007CInt$007C_$007C(matchValue_1[0]);\n if (activePatternResult10867 != null) {\n const activePatternResult10868 = DateParsing_$007CInt$007C_$007C(matchValue_1[1]);\n if (activePatternResult10868 != null) {\n pattern_matching_result_4 = 0;\n hour = activePatternResult10867;\n minute = activePatternResult10868;\n }\n else {\n pattern_matching_result_4 = 1;\n }\n }\n else {\n pattern_matching_result_4 = 1;\n }\n }\n else {\n pattern_matching_result_4 = 1;\n }\n switch (pattern_matching_result_4) {\n case 0: {\n const matchValue_2 = [hour, minute];\n let pattern_matching_result_5;\n if (DateParsing_$007CBetween$007C_$007C(0, 59, matchValue_2[0]) != null) {\n if (DateParsing_$007CBetween$007C_$007C(0, 59, matchValue_2[1]) != null) {\n pattern_matching_result_5 = 0;\n }\n else {\n pattern_matching_result_5 = 1;\n }\n }\n else {\n pattern_matching_result_5 = 1;\n }\n switch (pattern_matching_result_5) {\n case 0: {\n patternInput = [year_2, month_2, parsedDay, hour, minute];\n break;\n }\n case 1: {\n patternInput = [-1, 1, 1, 0, 0];\n break;\n }\n }\n break;\n }\n case 1: {\n patternInput = [-1, 1, 1, 0, 0];\n break;\n }\n }\n break;\n }\n case 1: {\n patternInput = [-1, 1, 1, 0, 0];\n break;\n }\n }\n }\n else {\n patternInput = [-1, 1, 1, 0, 0];\n }\n break;\n }\n case 1: {\n patternInput = [-1, 1, 1, 0, 0];\n break;\n }\n }\n break;\n }\n }\n break;\n }\n }\n const year_3 = patternInput[0] | 0;\n const month_3 = patternInput[1] | 0;\n const minute_1 = patternInput[4] | 0;\n const hour_1 = patternInput[3] | 0;\n const day_2 = patternInput[2] | 0;\n if (year_3 <= 0) {\n return void 0;\n }\n else {\n const matchValue_3 = [month_3, day_2];\n let pattern_matching_result_6;\n if (matchValue_3[0] === 2) {\n if (DateParsing_$007CBetween$007C_$007C(1, 29, matchValue_3[1]) != null) {\n if (DateParsing_isLeapYear(year_3)) {\n pattern_matching_result_6 = 0;\n }\n else {\n pattern_matching_result_6 = 1;\n }\n }\n else {\n pattern_matching_result_6 = 1;\n }\n }\n else {\n pattern_matching_result_6 = 1;\n }\n switch (pattern_matching_result_6) {\n case 0: {\n return create(year_3, month_3, day_2, hour_1, minute_1, 0);\n }\n case 1: {\n let pattern_matching_result_7;\n if (matchValue_3[0] === 2) {\n if (DateParsing_$007CBetween$007C_$007C(1, 28, matchValue_3[1]) != null) {\n if (!DateParsing_isLeapYear(year_3)) {\n pattern_matching_result_7 = 0;\n }\n else {\n pattern_matching_result_7 = 1;\n }\n }\n else {\n pattern_matching_result_7 = 1;\n }\n }\n else {\n pattern_matching_result_7 = 1;\n }\n switch (pattern_matching_result_7) {\n case 0: {\n return create(year_3, month_3, day_2, hour_1, minute_1, 0);\n }\n case 1: {\n let pattern_matching_result_8;\n if (matchValue_3[0] === 1) {\n if (DateParsing_$007CBetween$007C_$007C(1, 31, matchValue_3[1]) != null) {\n pattern_matching_result_8 = 0;\n }\n else {\n pattern_matching_result_8 = 1;\n }\n }\n else if (matchValue_3[0] === 3) {\n if (DateParsing_$007CBetween$007C_$007C(1, 31, matchValue_3[1]) != null) {\n pattern_matching_result_8 = 0;\n }\n else {\n pattern_matching_result_8 = 1;\n }\n }\n else if (matchValue_3[0] === 5) {\n if (DateParsing_$007CBetween$007C_$007C(1, 31, matchValue_3[1]) != null) {\n pattern_matching_result_8 = 0;\n }\n else {\n pattern_matching_result_8 = 1;\n }\n }\n else if (matchValue_3[0] === 7) {\n if (DateParsing_$007CBetween$007C_$007C(1, 31, matchValue_3[1]) != null) {\n pattern_matching_result_8 = 0;\n }\n else {\n pattern_matching_result_8 = 1;\n }\n }\n else if (matchValue_3[0] === 8) {\n if (DateParsing_$007CBetween$007C_$007C(1, 31, matchValue_3[1]) != null) {\n pattern_matching_result_8 = 0;\n }\n else {\n pattern_matching_result_8 = 1;\n }\n }\n else if (matchValue_3[0] === 10) {\n if (DateParsing_$007CBetween$007C_$007C(1, 31, matchValue_3[1]) != null) {\n pattern_matching_result_8 = 0;\n }\n else {\n pattern_matching_result_8 = 1;\n }\n }\n else if (matchValue_3[0] === 12) {\n if (DateParsing_$007CBetween$007C_$007C(1, 31, matchValue_3[1]) != null) {\n pattern_matching_result_8 = 0;\n }\n else {\n pattern_matching_result_8 = 1;\n }\n }\n else {\n pattern_matching_result_8 = 1;\n }\n switch (pattern_matching_result_8) {\n case 0: {\n return create(year_3, month_3, day_2, hour_1, minute_1, 0);\n }\n case 1: {\n let pattern_matching_result_9;\n if (matchValue_3[0] === 4) {\n if (DateParsing_$007CBetween$007C_$007C(1, 30, matchValue_3[1]) != null) {\n pattern_matching_result_9 = 0;\n }\n else {\n pattern_matching_result_9 = 1;\n }\n }\n else if (matchValue_3[0] === 6) {\n if (DateParsing_$007CBetween$007C_$007C(1, 30, matchValue_3[1]) != null) {\n pattern_matching_result_9 = 0;\n }\n else {\n pattern_matching_result_9 = 1;\n }\n }\n else if (matchValue_3[0] === 9) {\n if (DateParsing_$007CBetween$007C_$007C(1, 30, matchValue_3[1]) != null) {\n pattern_matching_result_9 = 0;\n }\n else {\n pattern_matching_result_9 = 1;\n }\n }\n else if (matchValue_3[0] === 11) {\n if (DateParsing_$007CBetween$007C_$007C(1, 30, matchValue_3[1]) != null) {\n pattern_matching_result_9 = 0;\n }\n else {\n pattern_matching_result_9 = 1;\n }\n }\n else {\n pattern_matching_result_9 = 1;\n }\n switch (pattern_matching_result_9) {\n case 0: {\n return create(year_3, month_3, day_2, hour_1, minute_1, 0);\n }\n case 1: {\n return void 0;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n catch (matchValue_4) {\n return void 0;\n }\n}\n\nexport const Interop_reactApi = react;\n\n","import { reverse, empty, cons, fold } from \"../fable-library.3.1.12/List.js\";\nimport { uncurry } from \"../fable-library.3.1.12/Util.js\";\nimport { toString } from \"../fable-library.3.1.12/Types.js\";\nimport { join } from \"../fable-library.3.1.12/String.js\";\n\nexport function Helpers_extractClasses(xs) {\n return fold(uncurry(2, (tupledArg) => {\n const classes = tupledArg[0];\n const props = tupledArg[1];\n return (x) => {\n const matchValue = x;\n return (matchValue[0] === \"className\") ? [cons(toString(matchValue[1]), classes), props] : [classes, cons(x, props)];\n };\n }), [empty(), empty()], reverse(xs));\n}\n\nexport function Helpers_combineClasses(cn, xs) {\n const tupledArg = Helpers_extractClasses(xs);\n return cons([\"className\", join(\" \", cons(cn, tupledArg[0]))], tupledArg[1]);\n}\n\n","import { toString, Record, Union } from \"../fable-library.3.1.12/Types.js\";\nimport { array_type, float64_type, int32_type, bool_type, obj_type, record_type, option_type, lambda_type, unit_type, class_type, union_type, string_type } from \"../fable-library.3.1.12/Reflection.js\";\n\nexport class FragmentProp extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Key\"];\n }\n}\n\nexport function FragmentProp$reflection() {\n return union_type(\"Fable.React.Props.FragmentProp\", [], FragmentProp, () => [[[\"Item\", string_type]]]);\n}\n\nexport class Prop extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Key\", \"Ref\", \"ref\", \"ref\"];\n }\n}\n\nexport function Prop$reflection() {\n return union_type(\"Fable.React.Props.Prop\", [], Prop, () => [[[\"Item\", string_type]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Element\"), unit_type)]], [[\"Item\", class_type(\"Fable.React.IRefValue`1\", [option_type(class_type(\"Browser.Types.Element\"))])]], [[\"Item\", class_type(\"Fable.React.IRefValue`1\", [option_type(class_type(\"Browser.Types.Element\"))])]]]);\n}\n\nexport class DangerousHtml extends Record {\n constructor(__html) {\n super();\n this.__html = __html;\n }\n}\n\nexport function DangerousHtml$reflection() {\n return record_type(\"Fable.React.Props.DangerousHtml\", [], DangerousHtml, () => [[\"__html\", string_type]]);\n}\n\nexport class DOMAttr extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"DangerouslySetInnerHTML\", \"OnCut\", \"OnPaste\", \"OnCompositionEnd\", \"OnCompositionStart\", \"OnCopy\", \"OnCompositionUpdate\", \"OnFocus\", \"OnBlur\", \"OnChange\", \"OnInput\", \"OnSubmit\", \"OnReset\", \"OnLoad\", \"OnError\", \"OnKeyDown\", \"OnKeyPress\", \"OnKeyUp\", \"OnAbort\", \"OnCanPlay\", \"OnCanPlayThrough\", \"OnDurationChange\", \"OnEmptied\", \"OnEncrypted\", \"OnEnded\", \"OnLoadedData\", \"OnLoadedMetadata\", \"OnLoadStart\", \"OnPause\", \"OnPlay\", \"OnPlaying\", \"OnProgress\", \"OnRateChange\", \"OnSeeked\", \"OnSeeking\", \"OnStalled\", \"OnSuspend\", \"OnTimeUpdate\", \"OnVolumeChange\", \"OnWaiting\", \"OnClick\", \"OnContextMenu\", \"OnDoubleClick\", \"OnDrag\", \"OnDragEnd\", \"OnDragEnter\", \"OnDragExit\", \"OnDragLeave\", \"OnDragOver\", \"OnDragStart\", \"OnDrop\", \"OnMouseDown\", \"OnMouseEnter\", \"OnMouseLeave\", \"OnMouseMove\", \"OnMouseOut\", \"OnMouseOver\", \"OnMouseUp\", \"OnSelect\", \"OnTouchCancel\", \"OnTouchEnd\", \"OnTouchMove\", \"OnTouchStart\", \"OnScroll\", \"OnWheel\", \"OnAnimationStart\", \"OnAnimationEnd\", \"OnAnimationIteration\", \"OnTransitionEnd\"];\n }\n}\n\nexport function DOMAttr$reflection() {\n return union_type(\"Fable.React.Props.DOMAttr\", [], DOMAttr, () => [[[\"Item\", DangerousHtml$reflection()]], [[\"Item\", lambda_type(class_type(\"Browser.Types.ClipboardEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.ClipboardEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.CompositionEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.CompositionEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.ClipboardEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.CompositionEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.FocusEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.FocusEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.KeyboardEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.KeyboardEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.KeyboardEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.DragEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.DragEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.DragEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.DragEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.DragEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.DragEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.DragEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.DragEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.Event\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.TouchEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.TouchEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.TouchEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.TouchEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.UIEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.WheelEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.AnimationEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.AnimationEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.AnimationEvent\"), unit_type)]], [[\"Item\", lambda_type(class_type(\"Browser.Types.TransitionEvent\"), unit_type)]]]);\n}\n\nexport class SVGAttr extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"ClipPath\", \"Cx\", \"Cy\", \"D\", \"Dx\", \"Dy\", \"Fill\", \"FillOpacity\", \"FontFamily\", \"FontSize\", \"Fx\", \"Fy\", \"GradientTransform\", \"GradientUnits\", \"Height\", \"MarkerEnd\", \"MarkerMid\", \"MarkerStart\", \"Offset\", \"Opacity\", \"PatternContentUnits\", \"PatternUnits\", \"Points\", \"PreserveAspectRatio\", \"R\", \"Rx\", \"Ry\", \"SpreadMethod\", \"StopColor\", \"StopOpacity\", \"Stroke\", \"StrokeDasharray\", \"StrokeDashoffset\", \"StrokeLinecap\", \"StrokeMiterlimit\", \"StrokeOpacity\", \"StrokeWidth\", \"TextAnchor\", \"Transform\", \"Version\", \"ViewBox\", \"Width\", \"X1\", \"X2\", \"X\", \"XlinkActuate\", \"XlinkArcrole\", \"XlinkHref\", \"XlinkRole\", \"XlinkShow\", \"XlinkTitle\", \"XlinkType\", \"XmlBase\", \"XmlLang\", \"XmlSpace\", \"Y1\", \"Y2\", \"Y\", \"Custom\"];\n }\n}\n\nexport function SVGAttr$reflection() {\n return union_type(\"Fable.React.Props.SVGAttr\", [], SVGAttr, () => [[[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item1\", string_type], [\"Item2\", obj_type]]]);\n}\n\nexport class HTMLAttr extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"DefaultChecked\", \"DefaultValue\", \"Accept\", \"AcceptCharset\", \"AccessKey\", \"Action\", \"AllowFullScreen\", \"AllowTransparency\", \"Alt\", \"aria-atomic\", \"aria-busy\", \"aria-checked\", \"aria-colcount\", \"aria-colindex\", \"aria-colspan\", \"aria-controls\", \"aria-current\", \"aria-describedby\", \"aria-details\", \"aria-disabled\", \"aria-errormessage\", \"aria-expanded\", \"aria-flowto\", \"aria-haspopup\", \"aria-hidden\", \"aria-invalid\", \"aria-keyshortcuts\", \"aria-label\", \"aria-labelledby\", \"aria-level\", \"aria-live\", \"aria-modal\", \"aria-multiline\", \"aria-multiselectable\", \"aria-orientation\", \"aria-owns\", \"aria-placeholder\", \"aria-posinset\", \"aria-pressed\", \"aria-readonly\", \"aria-relevant\", \"aria-required\", \"aria-roledescription\", \"aria-rowcount\", \"aria-rowindex\", \"aria-rowspan\", \"aria-selected\", \"aria-setsize\", \"aria-sort\", \"aria-valuemax\", \"aria-valuemin\", \"aria-valuenow\", \"aria-valuetext\", \"Async\", \"AutoComplete\", \"AutoFocus\", \"AutoPlay\", \"Capture\", \"CellPadding\", \"CellSpacing\", \"CharSet\", \"Challenge\", \"Checked\", \"ClassID\", \"ClassName\", \"className\", \"Cols\", \"ColSpan\", \"Content\", \"ContentEditable\", \"ContextMenu\", \"Controls\", \"Coords\", \"CrossOrigin\", \"data-toggle\", \"DateTime\", \"Default\", \"Defer\", \"Dir\", \"Disabled\", \"Download\", \"Draggable\", \"EncType\", \"Form\", \"FormAction\", \"FormEncType\", \"FormMethod\", \"FormNoValidate\", \"FormTarget\", \"FrameBorder\", \"Headers\", \"Height\", \"Hidden\", \"High\", \"Href\", \"HrefLang\", \"HtmlFor\", \"HttpEquiv\", \"Icon\", \"Id\", \"InputMode\", \"Integrity\", \"Is\", \"KeyParams\", \"KeyType\", \"Kind\", \"Label\", \"Lang\", \"List\", \"Loop\", \"Low\", \"Manifest\", \"MarginHeight\", \"MarginWidth\", \"Max\", \"MaxLength\", \"Media\", \"MediaGroup\", \"Method\", \"Min\", \"MinLength\", \"Multiple\", \"Muted\", \"Name\", \"NoValidate\", \"Open\", \"Optimum\", \"Pattern\", \"Placeholder\", \"Poster\", \"Preload\", \"RadioGroup\", \"ReadOnly\", \"Rel\", \"Required\", \"Role\", \"Rows\", \"RowSpan\", \"Sandbox\", \"Scope\", \"Scoped\", \"Scrolling\", \"Seamless\", \"Selected\", \"Shape\", \"Size\", \"Sizes\", \"Span\", \"SpellCheck\", \"Src\", \"SrcDoc\", \"SrcLang\", \"SrcSet\", \"Start\", \"Step\", \"Summary\", \"TabIndex\", \"Target\", \"Title\", \"Type\", \"UseMap\", \"Value\", \"value\", \"Width\", \"Wmode\", \"Wrap\", \"About\", \"Datatype\", \"Inlist\", \"Prefix\", \"Property\", \"Resource\", \"Typeof\", \"Vocab\", \"AutoCapitalize\", \"AutoCorrect\", \"AutoSave\", \"ItemProp\", \"ItemScope\", \"ItemType\", \"ItemID\", \"ItemRef\", \"Results\", \"Security\", \"Unselectable\", \"Custom\"];\n }\n}\n\nexport function HTMLAttr$reflection() {\n return union_type(\"Fable.React.Props.HTMLAttr\", [], HTMLAttr, () => [[[\"Item\", bool_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", bool_type]], [[\"Item\", bool_type]], [[\"Item\", int32_type]], [[\"Item\", int32_type]], [[\"Item\", int32_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", int32_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", bool_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", int32_type]], [[\"Item\", bool_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", int32_type]], [[\"Item\", int32_type]], [[\"Item\", int32_type]], [[\"Item\", bool_type]], [[\"Item\", int32_type]], [[\"Item\", string_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", bool_type]], [[\"Item\", bool_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", int32_type]], [[\"Item\", int32_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", obj_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", bool_type]], [[\"Item\", float64_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", float64_type]], [[\"Item\", string_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", obj_type]], [[\"Item\", float64_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", float64_type]], [[\"Item\", bool_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", bool_type]], [[\"Item\", float64_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", int32_type]], [[\"Item\", int32_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", float64_type]], [[\"Item\", string_type]], [[\"Item\", float64_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", float64_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", int32_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", array_type(string_type)]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", float64_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item1\", string_type], [\"Item2\", obj_type]]]);\n}\n\nexport class CSSProp extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"AlignContent\", \"AlignItems\", \"AlignSelf\", \"AlignmentAdjust\", \"AlignmentBaseline\", \"All\", \"Animation\", \"AnimationDelay\", \"AnimationDirection\", \"AnimationDuration\", \"AnimationFillMode\", \"AnimationIterationCount\", \"AnimationName\", \"AnimationPlayState\", \"AnimationTimingFunction\", \"Appearance\", \"BackfaceVisibility\", \"Background\", \"BackgroundAttachment\", \"BackgroundBlendMode\", \"BackgroundClip\", \"BackgroundColor\", \"BackgroundComposite\", \"BackgroundImage\", \"BackgroundOrigin\", \"BackgroundPosition\", \"BackgroundPositionX\", \"BackgroundPositionY\", \"BackgroundRepeat\", \"BackgroundSize\", \"BaselineShift\", \"Behavior\", \"BlockSize\", \"Border\", \"BorderBlockEnd\", \"BorderBlockEndColor\", \"BorderBlockEndStyle\", \"BorderBlockEndWidth\", \"BorderBlockStart\", \"BorderBlockStartColor\", \"BorderBlockStartStyle\", \"BorderBlockStartWidth\", \"BorderBottom\", \"BorderBottomColor\", \"BorderBottomLeftRadius\", \"BorderBottomRightRadius\", \"BorderBottomStyle\", \"BorderBottomWidth\", \"BorderCollapse\", \"BorderColor\", \"BorderCornerShape\", \"BorderImage\", \"BorderImageOutset\", \"BorderImageRepeat\", \"BorderImageSlice\", \"BorderImageSource\", \"BorderImageWidth\", \"BorderInlineEnd\", \"BorderInlineEndColor\", \"BorderInlineEndStyle\", \"BorderInlineEndWidth\", \"BorderInlineStart\", \"BorderInlineStartColor\", \"BorderInlineStartStyle\", \"BorderInlineStartWidth\", \"BorderLeft\", \"BorderLeftColor\", \"BorderLeftStyle\", \"BorderLeftWidth\", \"BorderRadius\", \"BorderRight\", \"BorderRightColor\", \"BorderRightStyle\", \"BorderRightWidth\", \"BorderSpacing\", \"BorderStyle\", \"BorderTop\", \"BorderTopColor\", \"BorderTopLeftRadius\", \"BorderTopRightRadius\", \"BorderTopStyle\", \"BorderTopWidth\", \"BorderWidth\", \"Bottom\", \"BoxAlign\", \"BoxDecorationBreak\", \"BoxDirection\", \"BoxFlex\", \"BoxFlexGroup\", \"BoxLineProgression\", \"BoxLines\", \"BoxOrdinalGroup\", \"BoxShadow\", \"BoxSizing\", \"BreakAfter\", \"BreakBefore\", \"BreakInside\", \"CaptionSide\", \"CaretColor\", \"Clear\", \"Clip\", \"ClipPath\", \"ClipRule\", \"Color\", \"ColorInterpolation\", \"ColorInterpolationFilters\", \"ColorProfile\", \"ColorRendering\", \"ColumnCount\", \"ColumnFill\", \"ColumnGap\", \"ColumnRule\", \"ColumnRuleColor\", \"ColumnRuleStyle\", \"ColumnRuleWidth\", \"ColumnSpan\", \"ColumnWidth\", \"Columns\", \"Content\", \"CounterIncrement\", \"CounterReset\", \"Cue\", \"CueAfter\", \"Cursor\", \"Direction\", \"Display\", \"DominantBaseline\", \"EmptyCells\", \"EnableBackground\", \"Fill\", \"FillOpacity\", \"FillRule\", \"Filter\", \"Flex\", \"FlexAlign\", \"FlexBasis\", \"FlexDirection\", \"FlexFlow\", \"FlexGrow\", \"FlexItemAlign\", \"FlexLinePack\", \"FlexOrder\", \"FlexShrink\", \"FlexWrap\", \"Float\", \"FloodColor\", \"FloodOpacity\", \"FlowFrom\", \"Font\", \"FontFamily\", \"FontFeatureSettings\", \"FontKerning\", \"FontLanguageOverride\", \"FontSize\", \"FontSizeAdjust\", \"FontStretch\", \"FontStyle\", \"FontSynthesis\", \"FontVariant\", \"FontVariantAlternates\", \"FontVariantCaps\", \"FontVariantEastAsian\", \"FontVariantLigatures\", \"FontVariantNumeric\", \"FontVariantPosition\", \"FontWeight\", \"GlyphOrientationHorizontal\", \"GlyphOrientationVertical\", \"Grid\", \"GridArea\", \"GridAutoColumns\", \"GridAutoFlow\", \"GridAutoRows\", \"GridColumn\", \"GridColumnEnd\", \"GridColumnGap\", \"GridColumnStart\", \"GridGap\", \"GridRow\", \"GridRowEnd\", \"GridRowGap\", \"GridRowPosition\", \"GridRowSpan\", \"GridRowStart\", \"GridTemplate\", \"GridTemplateAreas\", \"GridTemplateColumns\", \"GridTemplateRows\", \"HangingPunctuation\", \"Height\", \"HyphenateLimitChars\", \"HyphenateLimitLines\", \"HyphenateLimitZone\", \"Hyphens\", \"ImageOrientation\", \"ImageRendering\", \"ImageResolution\", \"ImeMode\", \"InlineSize\", \"Isolation\", \"JustifyContent\", \"JustifySelf\", \"Kerning\", \"LayoutGrid\", \"LayoutGridChar\", \"LayoutGridLine\", \"LayoutGridMode\", \"LayoutGridType\", \"Left\", \"LetterSpacing\", \"LightingColor\", \"LineBreak\", \"LineClamp\", \"LineHeight\", \"ListStyle\", \"ListStyleImage\", \"ListStylePosition\", \"ListStyleType\", \"Margin\", \"MarginBlockEnd\", \"MarginBlockStart\", \"MarginBottom\", \"MarginInlineEnd\", \"MarginInlineStart\", \"MarginLeft\", \"MarginRight\", \"MarginTop\", \"MarkerEnd\", \"MarkerMid\", \"MarkerStart\", \"MarqueeDirection\", \"MarqueeStyle\", \"Mask\", \"MaskBorder\", \"MaskBorderRepeat\", \"MaskBorderSlice\", \"MaskBorderSource\", \"MaskBorderWidth\", \"MaskClip\", \"MaskComposite\", \"MaskImage\", \"MaskMode\", \"MaskOrigin\", \"MaskPosition\", \"MaskRepeat\", \"MaskSize\", \"MaskType\", \"MaxFontSize\", \"MaxHeight\", \"MaxWidth\", \"MinBlockSize\", \"MinHeight\", \"MinInlineSize\", \"MinWidth\", \"MixBlendMode\", \"ObjectFit\", \"ObjectPosition\", \"OffsetBlockEnd\", \"OffsetBlockStart\", \"OffsetInlineEnd\", \"OffsetInlineStart\", \"Opacity\", \"Order\", \"Orphans\", \"Outline\", \"OutlineColor\", \"OutlineOffset\", \"OutlineStyle\", \"OutlineWidth\", \"OverflowStyle\", \"OverflowWrap\", \"OverflowX\", \"OverflowY\", \"Padding\", \"PaddingBlockEnd\", \"PaddingBlockStart\", \"PaddingBottom\", \"PaddingInlineEnd\", \"PaddingInlineStart\", \"PaddingLeft\", \"PaddingRight\", \"PaddingTop\", \"PageBreakAfter\", \"PageBreakBefore\", \"PageBreakInside\", \"Pause\", \"PauseAfter\", \"PauseBefore\", \"Perspective\", \"PerspectiveOrigin\", \"PointerEvents\", \"Position\", \"PunctuationTrim\", \"Quotes\", \"RegionFragment\", \"Resize\", \"RestAfter\", \"RestBefore\", \"Right\", \"RubyAlign\", \"RubyMerge\", \"RubyPosition\", \"ScrollBehavior\", \"ScrollSnapCoordinate\", \"ScrollSnapDestination\", \"ScrollSnapType\", \"ShapeImageThreshold\", \"ShapeInside\", \"ShapeMargin\", \"ShapeOutside\", \"ShapeRendering\", \"Speak\", \"SpeakAs\", \"StopColor\", \"StopOpacity\", \"Stroke\", \"StrokeDasharray\", \"StrokeDashoffset\", \"StrokeLinecap\", \"StrokeLinejoin\", \"StrokeMiterlimit\", \"StrokeOpacity\", \"StrokeWidth\", \"TabSize\", \"TableLayout\", \"TextAlign\", \"TextAlignLast\", \"TextAnchor\", \"TextCombineUpright\", \"TextDecoration\", \"TextDecorationColor\", \"TextDecorationLine\", \"TextDecorationLineThrough\", \"TextDecorationNone\", \"TextDecorationOverline\", \"TextDecorationSkip\", \"TextDecorationStyle\", \"TextDecorationUnderline\", \"TextEmphasis\", \"TextEmphasisColor\", \"TextEmphasisPosition\", \"TextEmphasisStyle\", \"TextHeight\", \"TextIndent\", \"TextJustify\", \"TextJustifyTrim\", \"TextKashidaSpace\", \"TextLineThrough\", \"TextLineThroughColor\", \"TextLineThroughMode\", \"TextLineThroughStyle\", \"TextLineThroughWidth\", \"TextOrientation\", \"TextOverflow\", \"TextOverline\", \"TextOverlineColor\", \"TextOverlineMode\", \"TextOverlineStyle\", \"TextOverlineWidth\", \"TextRendering\", \"TextScript\", \"TextShadow\", \"TextTransform\", \"TextUnderlinePosition\", \"TextUnderlineStyle\", \"Top\", \"TouchAction\", \"Transform\", \"TransformBox\", \"TransformOrigin\", \"TransformOriginZ\", \"TransformStyle\", \"Transition\", \"TransitionDelay\", \"TransitionDuration\", \"TransitionProperty\", \"TransitionTimingFunction\", \"UnicodeBidi\", \"UnicodeRange\", \"UserFocus\", \"UserInput\", \"UserSelect\", \"VerticalAlign\", \"Visibility\", \"VoiceBalance\", \"VoiceDuration\", \"VoiceFamily\", \"VoicePitch\", \"VoiceRange\", \"VoiceRate\", \"VoiceStress\", \"VoiceVolume\", \"WhiteSpace\", \"WhiteSpaceTreatment\", \"Widows\", \"Width\", \"WillChange\", \"WordBreak\", \"WordSpacing\", \"WordWrap\", \"WrapFlow\", \"WrapMargin\", \"WrapOption\", \"WritingMode\", \"ZIndex\", \"Zoom\", \"Custom\"];\n }\n}\n\nexport function CSSProp$reflection() {\n return union_type(\"Fable.React.Props.CSSProp\", [], CSSProp, () => [[[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item1\", string_type], [\"Item2\", obj_type]]]);\n}\n\nexport function stringEnum(case$) {\n return toString(case$);\n}\n\nexport function CSSProp_Overflow_25F0CD75(overflow, overflowY) {\n if (overflowY == null) {\n return [\"overflow\", stringEnum(overflow)];\n }\n else {\n const value = overflowY;\n return [\"overflow\", (stringEnum(overflow) + \" \") + stringEnum(value)];\n }\n}\n\n","import { cons, ofArray, empty, fold } from \"../fable-library.3.1.12/List.js\";\nimport { HTMLAttr } from \"../Fable.React.7.4.1/Fable.React.Props.fs.js\";\nimport { Record, Union } from \"../fable-library.3.1.12/Types.js\";\nimport { record_type, bool_type, option_type, list_type, class_type, string_type, union_type } from \"../fable-library.3.1.12/Reflection.js\";\nimport * as react from \"react\";\nimport { keyValueList } from \"../fable-library.3.1.12/MapUtil.js\";\n\nexport function Helpers_classes(std, options, booleans) {\n return new HTMLAttr(64, fold((complete_1, tupledArg) => {\n if (tupledArg[1]) {\n return (complete_1 + \" \") + tupledArg[0];\n }\n else {\n return complete_1;\n }\n }, fold((complete, opt) => {\n if (opt == null) {\n return complete;\n }\n else {\n return (complete + \" \") + opt;\n }\n }, std, options), booleans));\n}\n\nexport class Fa_ISize extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"FaExtraSmall\", \"FaSmall\", \"FaLarge\", \"Fa2x\", \"Fa3x\", \"Fa4x\", \"Fa5x\", \"Fa6x\", \"Fa7x\", \"Fa8x\", \"Fa9x\", \"Fa10\"];\n }\n}\n\nexport function Fa_ISize$reflection() {\n return union_type(\"Fable.FontAwesome.Fa.ISize\", [], Fa_ISize, () => [[], [], [], [], [], [], [], [], [], [], [], []]);\n}\n\nexport class Fa_IconOption extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Size\", \"Border\", \"PullLeft\", \"PullRight\", \"Inverse\", \"Rotate90\", \"Rotate180\", \"Rotate270\", \"FlipHorizontal\", \"FlipVertical\", \"IsLi\", \"Icon\", \"Spin\", \"Pulse\", \"Props\", \"CustomClass\", \"FixedWidth\", \"Stack1x\", \"Stack2x\"];\n }\n}\n\nexport function Fa_IconOption$reflection() {\n return union_type(\"Fable.FontAwesome.Fa.IconOption\", [], Fa_IconOption, () => [[[\"Item\", Fa_ISize$reflection()]], [], [], [], [], [], [], [], [], [], [], [[\"Item\", string_type]], [], [], [[\"Item\", list_type(class_type(\"Fable.React.Props.IHTMLProp\"))]], [[\"Item\", string_type]], [], [], []]);\n}\n\nexport function Fa_ofSize(size) {\n switch (size.tag) {\n case 1: {\n return \"fa-sm\";\n }\n case 2: {\n return \"fa-lg\";\n }\n case 3: {\n return \"fa-2x\";\n }\n case 4: {\n return \"fa-3x\";\n }\n case 5: {\n return \"fa-4x\";\n }\n case 6: {\n return \"fa-5x\";\n }\n case 7: {\n return \"fa-6x\";\n }\n case 8: {\n return \"fa-7x\";\n }\n case 9: {\n return \"fa-8x\";\n }\n case 10: {\n return \"fa-9x\";\n }\n case 11: {\n return \"fa-10x\";\n }\n default: {\n return \"fa-xs\";\n }\n }\n}\n\nexport class Fa_IconOptions extends Record {\n constructor(Icon, Size, Border, Pull, HaveSpin, HavePulse, Rotation, Flip, IsInverse, Props, FixedWidth, IsLi, StackSize, CustomClass) {\n super();\n this.Icon = Icon;\n this.Size = Size;\n this.Border = Border;\n this.Pull = Pull;\n this.HaveSpin = HaveSpin;\n this.HavePulse = HavePulse;\n this.Rotation = Rotation;\n this.Flip = Flip;\n this.IsInverse = IsInverse;\n this.Props = Props;\n this.FixedWidth = FixedWidth;\n this.IsLi = IsLi;\n this.StackSize = StackSize;\n this.CustomClass = CustomClass;\n }\n}\n\nexport function Fa_IconOptions$reflection() {\n return record_type(\"Fable.FontAwesome.Fa.IconOptions\", [], Fa_IconOptions, () => [[\"Icon\", option_type(string_type)], [\"Size\", option_type(string_type)], [\"Border\", option_type(string_type)], [\"Pull\", option_type(string_type)], [\"HaveSpin\", bool_type], [\"HavePulse\", bool_type], [\"Rotation\", option_type(string_type)], [\"Flip\", option_type(string_type)], [\"IsInverse\", bool_type], [\"Props\", list_type(class_type(\"Fable.React.Props.IHTMLProp\"))], [\"FixedWidth\", bool_type], [\"IsLi\", bool_type], [\"StackSize\", option_type(string_type)], [\"CustomClass\", option_type(string_type)]]);\n}\n\nexport function Fa_IconOptions_get_Empty() {\n return new Fa_IconOptions(void 0, void 0, void 0, void 0, false, false, void 0, void 0, false, empty(), false, false, void 0, void 0);\n}\n\nexport function Fa_toIconOptions(faOptions) {\n return fold((result, option) => {\n switch (option.tag) {\n case 1: {\n return new Fa_IconOptions(result.Icon, result.Size, \"fa-border\", result.Pull, result.HaveSpin, result.HavePulse, result.Rotation, result.Flip, result.IsInverse, result.Props, result.FixedWidth, result.IsLi, result.StackSize, result.CustomClass);\n }\n case 2: {\n return new Fa_IconOptions(result.Icon, result.Size, result.Border, \"fa-pull-left\", result.HaveSpin, result.HavePulse, result.Rotation, result.Flip, result.IsInverse, result.Props, result.FixedWidth, result.IsLi, result.StackSize, result.CustomClass);\n }\n case 3: {\n return new Fa_IconOptions(result.Icon, result.Size, result.Border, \"fa-pull-right\", result.HaveSpin, result.HavePulse, result.Rotation, result.Flip, result.IsInverse, result.Props, result.FixedWidth, result.IsLi, result.StackSize, result.CustomClass);\n }\n case 4: {\n return new Fa_IconOptions(result.Icon, result.Size, result.Border, result.Pull, result.HaveSpin, result.HavePulse, result.Rotation, result.Flip, true, result.Props, result.FixedWidth, result.IsLi, result.StackSize, result.CustomClass);\n }\n case 11: {\n return new Fa_IconOptions(option.fields[0], result.Size, result.Border, result.Pull, result.HaveSpin, result.HavePulse, result.Rotation, result.Flip, result.IsInverse, result.Props, result.FixedWidth, result.IsLi, result.StackSize, result.CustomClass);\n }\n case 5: {\n return new Fa_IconOptions(result.Icon, result.Size, result.Border, result.Pull, result.HaveSpin, result.HavePulse, \"fa-rotate-90\", result.Flip, result.IsInverse, result.Props, result.FixedWidth, result.IsLi, result.StackSize, result.CustomClass);\n }\n case 6: {\n return new Fa_IconOptions(result.Icon, result.Size, result.Border, result.Pull, result.HaveSpin, result.HavePulse, \"fa-rotate-180\", result.Flip, result.IsInverse, result.Props, result.FixedWidth, result.IsLi, result.StackSize, result.CustomClass);\n }\n case 7: {\n return new Fa_IconOptions(result.Icon, result.Size, result.Border, result.Pull, result.HaveSpin, result.HavePulse, \"fa-rotate-270\", result.Flip, result.IsInverse, result.Props, result.FixedWidth, result.IsLi, result.StackSize, result.CustomClass);\n }\n case 8: {\n return new Fa_IconOptions(result.Icon, result.Size, result.Border, result.Pull, result.HaveSpin, result.HavePulse, \"fa-flip-horizontal\", result.Flip, result.IsInverse, result.Props, result.FixedWidth, result.IsLi, result.StackSize, result.CustomClass);\n }\n case 9: {\n return new Fa_IconOptions(result.Icon, result.Size, result.Border, result.Pull, result.HaveSpin, result.HavePulse, \"fa-flip-vertical\", result.Flip, result.IsInverse, result.Props, result.FixedWidth, result.IsLi, result.StackSize, result.CustomClass);\n }\n case 12: {\n return new Fa_IconOptions(result.Icon, result.Size, result.Border, result.Pull, true, result.HavePulse, result.Rotation, result.Flip, result.IsInverse, result.Props, result.FixedWidth, result.IsLi, result.StackSize, result.CustomClass);\n }\n case 13: {\n return new Fa_IconOptions(result.Icon, result.Size, result.Border, result.Pull, result.HaveSpin, true, result.Rotation, result.Flip, result.IsInverse, result.Props, result.FixedWidth, result.IsLi, result.StackSize, result.CustomClass);\n }\n case 14: {\n return new Fa_IconOptions(result.Icon, result.Size, result.Border, result.Pull, result.HaveSpin, result.HavePulse, result.Rotation, result.Flip, result.IsInverse, option.fields[0], result.FixedWidth, result.IsLi, result.StackSize, result.CustomClass);\n }\n case 16: {\n return new Fa_IconOptions(result.Icon, result.Size, result.Border, result.Pull, result.HaveSpin, result.HavePulse, result.Rotation, result.Flip, result.IsInverse, result.Props, true, result.IsLi, result.StackSize, result.CustomClass);\n }\n case 10: {\n return new Fa_IconOptions(result.Icon, result.Size, result.Border, result.Pull, result.HaveSpin, result.HavePulse, result.Rotation, result.Flip, result.IsInverse, result.Props, result.FixedWidth, true, result.StackSize, result.CustomClass);\n }\n case 15: {\n return new Fa_IconOptions(result.Icon, result.Size, result.Border, result.Pull, result.HaveSpin, result.HavePulse, result.Rotation, result.Flip, result.IsInverse, result.Props, result.FixedWidth, result.IsLi, result.StackSize, option.fields[0]);\n }\n case 17: {\n return new Fa_IconOptions(result.Icon, result.Size, result.Border, result.Pull, result.HaveSpin, result.HavePulse, result.Rotation, result.Flip, result.IsInverse, result.Props, result.FixedWidth, result.IsLi, \"fa-stack-1x\", result.CustomClass);\n }\n case 18: {\n return new Fa_IconOptions(result.Icon, result.Size, result.Border, result.Pull, result.HaveSpin, result.HavePulse, result.Rotation, result.Flip, result.IsInverse, result.Props, result.FixedWidth, result.IsLi, \"fa-stack-2x\", result.CustomClass);\n }\n default: {\n return new Fa_IconOptions(result.Icon, Fa_ofSize(option.fields[0]), result.Border, result.Pull, result.HaveSpin, result.HavePulse, result.Rotation, result.Flip, result.IsInverse, result.Props, result.FixedWidth, result.IsLi, result.StackSize, result.CustomClass);\n }\n }\n }, Fa_IconOptions_get_Empty(), faOptions);\n}\n\nexport function Fa_displayIcon(baseElement, baseClass, opts, children) {\n return baseElement(cons(Helpers_classes(baseClass, ofArray([opts.Icon, opts.Size, opts.Border, opts.Pull, opts.Rotation, opts.Flip, opts.CustomClass, opts.StackSize]), ofArray([[\"fa-fw\", opts.FixedWidth], [\"fa-li\", opts.IsLi], [\"fa-pulse\", opts.HavePulse], [\"fa-spin\", opts.HaveSpin], [\"fa-inverse\", opts.IsInverse]])), opts.Props), children);\n}\n\nexport function Fa_ul(props, children) {\n return react.createElement(\"ul\", {\n className: \"fa-ul\",\n }, ...children);\n}\n\nexport function Fa_ol(props, children) {\n return react.createElement(\"ol\", {\n className: \"fa-ul\",\n }, ...children);\n}\n\nexport function Fa_i(faOptions, children) {\n return Fa_displayIcon((props, children_1) => react.createElement(\"i\", keyValueList(props, 1), ...children_1), \"\", Fa_toIconOptions(faOptions), children);\n}\n\nexport function Fa_span(faOptions, children) {\n return Fa_displayIcon((props, children_1) => react.createElement(\"span\", keyValueList(props, 1), ...children_1), \"\", Fa_toIconOptions(faOptions), children);\n}\n\nexport class Fa_Stack_Option extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Size\", \"CustomClass\", \"Props\"];\n }\n}\n\nexport function Fa_Stack_Option$reflection() {\n return union_type(\"Fable.FontAwesome.Fa.Stack.Option\", [], Fa_Stack_Option, () => [[[\"Item\", Fa_ISize$reflection()]], [[\"Item\", string_type]], [[\"Item\", list_type(class_type(\"Fable.React.Props.IHTMLProp\"))]]]);\n}\n\nexport class Fa_Stack_Options extends Record {\n constructor(Size, Props, CustomClass) {\n super();\n this.Size = Size;\n this.Props = Props;\n this.CustomClass = CustomClass;\n }\n}\n\nexport function Fa_Stack_Options$reflection() {\n return record_type(\"Fable.FontAwesome.Fa.Stack.Options\", [], Fa_Stack_Options, () => [[\"Size\", option_type(string_type)], [\"Props\", list_type(class_type(\"Fable.React.Props.IHTMLProp\"))], [\"CustomClass\", option_type(string_type)]]);\n}\n\nexport function Fa_Stack_Options_get_Empty() {\n return new Fa_Stack_Options(void 0, empty(), void 0);\n}\n\nexport function Fa_stack(options, children) {\n const opts = fold((result, opt) => {\n switch (opt.tag) {\n case 1: {\n return new Fa_Stack_Options(result.Size, result.Props, opt.fields[0]);\n }\n case 2: {\n return new Fa_Stack_Options(result.Size, opt.fields[0], result.CustomClass);\n }\n default: {\n return new Fa_Stack_Options(Fa_ofSize(opt.fields[0]), result.Props, result.CustomClass);\n }\n }\n }, Fa_Stack_Options_get_Empty(), options);\n const classes = Helpers_classes(\"fa-stack\", ofArray([opts.Size, opts.CustomClass]), empty());\n return react.createElement(\"span\", keyValueList(cons(classes, opts.Props), 1), ...children);\n}\n\n","import { Union, Record } from \"../.fable/fable-library.3.1.12/Types.js\";\nimport { union_type, class_type, record_type, bool_type, list_type, string_type } from \"../.fable/fable-library.3.1.12/Reflection.js\";\nimport { BoardGame$reflection } from \"../../TryTheseGames.Website.Shared/Shared.fs.js\";\nimport { CancellableDeferred$1, AsyncOperation$1, AsyncOperation$1$reflection, CancellableDeferred$1$reflection } from \"../Helpers.fs.js\";\nimport { inputCmd, updateWithCmd, init as init_1, Msg$1$reflection, Model$1$reflection } from \"../Debounce.fs.js\";\nimport { FSharpResult$2 } from \"../.fable/fable-library.3.1.12/Choice.js\";\nimport { Auto_generateBoxedDecoder_79988AEF } from \"../.fable/Thoth.Json.6.0.0/Decode.fs.js\";\nimport { fetchAs } from \"../FetchHelpers.fs.js\";\nimport { interpolate, toText } from \"../.fable/fable-library.3.1.12/String.js\";\nimport { createAtom, createObj, uncurry } from \"../.fable/fable-library.3.1.12/Util.js\";\nimport { Cmd_OfFunc_result, Cmd_none, Cmd_OfPromise_either } from \"../.fable/Fable.Elmish.3.1.0/cmd.fs.js\";\nimport { Navigation_modifyUrl } from \"../.fable/Fable.Elmish.Browser.3.0.4/navigation.fs.js\";\nimport { Page, toPath } from \"../Pages.fs.js\";\nimport { createElement } from \"react\";\nimport { Interop_reactApi } from \"../.fable/Feliz.1.49.0/Interop.fs.js\";\nimport { singleton as singleton_1, toArray, ofArray } from \"../.fable/fable-library.3.1.12/List.js\";\nimport { Helpers_combineClasses } from \"../.fable/Feliz.Bulma.2.17.0/ElementBuilders.fs.js\";\nimport { empty, singleton, append, delay, toList } from \"../.fable/fable-library.3.1.12/Seq.js\";\nimport react$002Dautosuggest from \"react-autosuggest\";\nimport { Fa_IconOption, Fa_span } from \"../.fable/Fable.FontAwesome.2.0.0/FontAwesome.fs.js\";\nimport { DOMAttr } from \"../.fable/Fable.React.7.4.1/Fable.React.Props.fs.js\";\n\nexport class Model extends Record {\n constructor(SearchText, GameOptions, ShowOptions, DebouncedSearchText, AutoFocus) {\n super();\n this.SearchText = SearchText;\n this.GameOptions = GameOptions;\n this.ShowOptions = ShowOptions;\n this.DebouncedSearchText = DebouncedSearchText;\n this.AutoFocus = AutoFocus;\n }\n}\n\nexport function Model$reflection() {\n return record_type(\"Client.Recommendations.GameSearcher.Model\", [], Model, () => [[\"SearchText\", string_type], [\"GameOptions\", CancellableDeferred$1$reflection(list_type(BoardGame$reflection()))], [\"ShowOptions\", bool_type], [\"DebouncedSearchText\", Model$1$reflection(string_type)], [\"AutoFocus\", bool_type]]);\n}\n\nexport class Msg extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"SetSearchText\", \"SetShowOptions\", \"SearchGames\", \"DebouncedSearchTextChanged\", \"GameSelected\"];\n }\n}\n\nexport function Msg$reflection() {\n return union_type(\"Client.Recommendations.GameSearcher.Msg\", [], Msg, () => [[[\"Text\", string_type], [\"ChangeResults\", bool_type]], [[\"Item\", bool_type]], [[\"Item\", AsyncOperation$1$reflection(union_type(\"Microsoft.FSharp.Core.FSharpResult`2\", [list_type(BoardGame$reflection()), class_type(\"System.Exception\")], FSharpResult$2, () => [[[\"ResultValue\", list_type(BoardGame$reflection())]], [[\"ErrorValue\", class_type(\"System.Exception\")]]]))]], [[\"Item\", Msg$1$reflection(string_type)]], [[\"Item\", BoardGame$reflection()]]]);\n}\n\nexport const boardGameListDecoder = Auto_generateBoxedDecoder_79988AEF(list_type(BoardGame$reflection()), void 0, void 0);\n\nexport function searchGames(query) {\n const patternInput = fetchAs(toText(interpolate(\"/api/games?query=%s%P()\", [query])), uncurry(2, boardGameListDecoder));\n return [Cmd_OfPromise_either(() => patternInput[0], void 0, (arg_1) => (new Msg(2, new AsyncOperation$1(1, new FSharpResult$2(0, arg_1)))), (arg_3) => (new Msg(2, new AsyncOperation$1(1, new FSharpResult$2(1, arg_3))))), patternInput[1]];\n}\n\nexport function init(autoFocus) {\n return new Model(\"\", new CancellableDeferred$1(0), false, init_1(200, \"\"), autoFocus);\n}\n\nexport function update(msg, currentModel) {\n if (msg.tag === 1) {\n return [new Model(currentModel.SearchText, currentModel.GameOptions, msg.fields[0], currentModel.DebouncedSearchText, currentModel.AutoFocus), Cmd_none()];\n }\n else if (msg.tag === 3) {\n return updateWithCmd(msg.fields[0], (arg0_1) => (new Msg(3, arg0_1)), currentModel.DebouncedSearchText, (x) => (new Model(currentModel.SearchText, currentModel.GameOptions, currentModel.ShowOptions, x, currentModel.AutoFocus)), (_arg1) => Cmd_OfFunc_result(new Msg(2, new AsyncOperation$1(0))));\n }\n else if (msg.tag === 2) {\n if (msg.fields[0].tag === 1) {\n if (msg.fields[0].fields[0].tag === 1) {\n void toText(interpolate(\"%A%P()\", [msg.fields[0].fields[0].fields[0]]));\n return [currentModel, Cmd_none()];\n }\n else {\n return [new Model(currentModel.SearchText, new CancellableDeferred$1(2, msg.fields[0].fields[0].fields[0]), currentModel.ShowOptions, currentModel.DebouncedSearchText, currentModel.AutoFocus), Cmd_none()];\n }\n }\n else {\n const matchValue = currentModel.GameOptions;\n if (matchValue.tag === 1) {\n matchValue.fields[0]();\n }\n if (currentModel.SearchText === \"\") {\n return [new Model(currentModel.SearchText, new CancellableDeferred$1(0), currentModel.ShowOptions, currentModel.DebouncedSearchText, currentModel.AutoFocus), Cmd_none()];\n }\n else {\n const patternInput = searchGames(currentModel.SearchText);\n return [new Model(currentModel.SearchText, new CancellableDeferred$1(1, patternInput[1]), currentModel.ShowOptions, currentModel.DebouncedSearchText, currentModel.AutoFocus), patternInput[0]];\n }\n }\n }\n else if (msg.tag === 4) {\n return [new Model(msg.fields[0].Name, currentModel.GameOptions, currentModel.ShowOptions, currentModel.DebouncedSearchText, currentModel.AutoFocus), Navigation_modifyUrl(toPath(new Page(0, msg.fields[0].Id)))];\n }\n else {\n return [new Model(msg.fields[0], msg.fields[1] ? (new CancellableDeferred$1(0)) : currentModel.GameOptions, currentModel.ShowOptions, currentModel.DebouncedSearchText, currentModel.AutoFocus), msg.fields[1] ? inputCmd(msg.fields[0], (arg0) => (new Msg(3, arg0))) : Cmd_none()];\n }\n}\n\nexport function renderSuggestion(game, details) {\n let props_1, matchValue_1, url;\n const itemClassNames = details.isHighlighted ? \"item highlighted\" : \"item\";\n let alternativeNameString;\n const matchValue = game.AlternativeName;\n alternativeNameString = ((matchValue == null) ? \"\" : toText(interpolate(\"(%s%P())\", [matchValue])));\n return createElement(\"div\", {\n className: itemClassNames,\n children: Interop_reactApi.Children.toArray([(props_1 = ofArray([[\"className\", \"is-32x32\"], [\"children\", Interop_reactApi.Children.toArray([(matchValue_1 = game.Thumbnail, (matchValue_1 == null) ? null : (url = matchValue_1, createElement(\"div\", {\n className: \"game-image\",\n style: {\n backgroundImage: (\"url(\\u0027\" + url) + \"\\u0027)\",\n backgroundSize: \"cover\",\n },\n })))])]]), createElement(\"figure\", createObj(Helpers_combineClasses(\"image\", props_1)))), createElement(\"div\", {\n className: \"name-suggestion\",\n children: Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: \"primary-name\",\n children: toText(interpolate(\"%s%P() (%i%P()) \", [game.Name, game.YearPublished])),\n }), createElement(\"div\", {\n className: \"alternative-name\",\n children: alternativeNameString,\n })]),\n })]),\n });\n}\n\nexport const inputRef = createAtom(null);\n\nexport function render(model, dispatch) {\n let props_2;\n const children = singleton_1((props_2 = toList(delay(() => append((model.GameOptions.tag === 1) ? singleton([\"className\", \"is-loading\"]) : (void 0, empty()), delay(() => singleton([\"children\", Interop_reactApi.Children.toArray(Array.from(toList(delay(() => {\n let matchValue_1;\n return append(singleton(Interop_reactApi.createElement(react$002Dautosuggest, {\n suggestions: (matchValue_1 = model.GameOptions, (matchValue_1.tag === 2) ? (model.ShowOptions ? toArray(matchValue_1.fields[0]) : []) : []),\n onSuggestionsFetchRequested: (_arg1) => {\n dispatch(new Msg(1, true));\n },\n onSuggestionsClearRequested: () => {\n dispatch(new Msg(1, false));\n },\n getSuggestionValue: (suggestion) => suggestion.Name,\n renderSuggestion: (delegateArg0, delegateArg1) => renderSuggestion(delegateArg0, delegateArg1),\n onSuggestionSelected: (delegateArg0_1, delegateArg1_1) => {\n dispatch(new Msg(4, delegateArg1_1.suggestion));\n },\n inputProps: {\n className: \"input\",\n placeholder: \"Search for a board game\",\n ref: (ref) => {\n inputRef(ref, true);\n },\n value: model.SearchText,\n onChange: (delegateArg0_2, delegateArg1_2) => {\n let matchValue_2;\n const o = delegateArg1_2;\n dispatch(new Msg(0, o.newValue, (matchValue_2 = o.method, (matchValue_2 === \"up\") ? false : ((matchValue_2 === \"escape\") ? false : ((matchValue_2 === \"enter\") ? false : ((matchValue_2 === \"click\") ? false : ((matchValue_2 === \"type\") ? true : false)))))));\n },\n },\n })), delay(() => {\n if (model.SearchText.length > 0) {\n return singleton(Fa_span(ofArray([new Fa_IconOption(11, \"fas fa-times-circle\"), new Fa_IconOption(15, \"clear-search\"), new Fa_IconOption(14, singleton_1(new DOMAttr(40, (_arg4) => {\n inputRef().focus();\n dispatch(new Msg(0, \"\", false));\n })))]), []));\n }\n else {\n return empty();\n }\n }));\n }))))]))))), createElement(\"div\", createObj(Helpers_combineClasses(\"control\", props_2)))));\n return createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children)),\n });\n}\n\n","\nexport function Browser_Types_Event__Event_get_Value(this$) {\n return this$.target.value;\n}\n\nexport function Browser_Types_Event__Event_get_Checked(this$) {\n return this$.target.checked;\n}\n\n","import { FSharpRef, Union, Record } from \"../.fable/fable-library.3.1.12/Types.js\";\nimport { union_type, string_type, array_type, list_type, record_type, option_type, int32_type, bool_type } from \"../.fable/fable-library.3.1.12/Reflection.js\";\nimport { Category$reflection, Mechanic$reflection, RecommendationQuery } from \"../../TryTheseGames.Website.Shared/Shared.fs.js\";\nimport { singleton as singleton_1, cons, ofArray, empty } from \"../.fable/fable-library.3.1.12/List.js\";\nimport { tryParse } from \"../.fable/fable-library.3.1.12/Int32.js\";\nimport { Cmd_none } from \"../.fable/Fable.Elmish.3.1.0/cmd.fs.js\";\nimport { Interop_reactApi } from \"../.fable/Feliz.1.49.0/Interop.fs.js\";\nimport { createElement } from \"react\";\nimport { Fa_IconOption, Fa_i } from \"../.fable/Fable.FontAwesome.2.0.0/FontAwesome.fs.js\";\nimport { filter, map, singleton, delay, toList } from \"../.fable/fable-library.3.1.12/Seq.js\";\nimport { numberHash, int32ToString, createObj } from \"../.fable/fable-library.3.1.12/Util.js\";\nimport { Helpers_extractClasses, Helpers_combineClasses } from \"../.fable/Feliz.Bulma.2.17.0/ElementBuilders.fs.js\";\nimport { Option_toString } from \"../Helpers.fs.js\";\nimport { Browser_Types_Event__Event_get_Value } from \"../.fable/Fable.React.7.4.1/Fable.React.Extensions.fs.js\";\nimport { contains } from \"../.fable/fable-library.3.1.12/Array.js\";\nimport { join } from \"../.fable/fable-library.3.1.12/String.js\";\n\nexport class Filter extends Record {\n constructor(HideLinkedItems, HideMatchingDesigners, Players, HasMechanic, HasCategory, MinPlayingTime, MaxPlayingTime, PublishedBeforeYear, PublishedAfterYear) {\n super();\n this.HideLinkedItems = HideLinkedItems;\n this.HideMatchingDesigners = HideMatchingDesigners;\n this.Players = Players;\n this.HasMechanic = HasMechanic;\n this.HasCategory = HasCategory;\n this.MinPlayingTime = MinPlayingTime;\n this.MaxPlayingTime = MaxPlayingTime;\n this.PublishedBeforeYear = PublishedBeforeYear;\n this.PublishedAfterYear = PublishedAfterYear;\n }\n}\n\nexport function Filter$reflection() {\n return record_type(\"Client.Recommendations.RecommendationFilter.Filter\", [], Filter, () => [[\"HideLinkedItems\", bool_type], [\"HideMatchingDesigners\", bool_type], [\"Players\", option_type(int32_type)], [\"HasMechanic\", option_type(int32_type)], [\"HasCategory\", option_type(int32_type)], [\"MinPlayingTime\", option_type(int32_type)], [\"MaxPlayingTime\", option_type(int32_type)], [\"PublishedBeforeYear\", option_type(int32_type)], [\"PublishedAfterYear\", option_type(int32_type)]]);\n}\n\nexport function Filter__ToRecommendationsFilter(this$, gameId, skip) {\n return new RecommendationQuery(gameId, this$.HideLinkedItems, this$.HideMatchingDesigners, this$.Players, this$.HasMechanic, this$.HasCategory, this$.MinPlayingTime, this$.MaxPlayingTime, this$.PublishedBeforeYear, this$.PublishedAfterYear, skip);\n}\n\nexport class Model extends Record {\n constructor(MobileFilterOpen, Mechanics, Categories, SelectedGameMechanicIds, SelectedGameCategoryIds, Filter) {\n super();\n this.MobileFilterOpen = MobileFilterOpen;\n this.Mechanics = Mechanics;\n this.Categories = Categories;\n this.SelectedGameMechanicIds = SelectedGameMechanicIds;\n this.SelectedGameCategoryIds = SelectedGameCategoryIds;\n this.Filter = Filter;\n }\n}\n\nexport function Model$reflection() {\n return record_type(\"Client.Recommendations.RecommendationFilter.Model\", [], Model, () => [[\"MobileFilterOpen\", bool_type], [\"Mechanics\", list_type(Mechanic$reflection())], [\"Categories\", list_type(Category$reflection())], [\"SelectedGameMechanicIds\", array_type(int32_type)], [\"SelectedGameCategoryIds\", array_type(int32_type)], [\"Filter\", Filter$reflection()]]);\n}\n\nexport class Msg extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"ToggleMobileFilter\", \"SetHideLinkedItems\", \"SetHideMatchingDesigners\", \"SetPlayers\", \"SetMinPlayingTime\", \"SetMaxPlayingTime\", \"SetPublishedAfterYear\", \"SetPublishedBeforeYear\", \"SetHasMechanic\", \"SetHasCategory\", \"SetMechanics\", \"SetCategories\", \"SetSelectedGameProperties\", \"ClearFilters\", \"FilterResults\"];\n }\n}\n\nexport function Msg$reflection() {\n return union_type(\"Client.Recommendations.RecommendationFilter.Msg\", [], Msg, () => [[], [[\"Item\", bool_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", list_type(Mechanic$reflection())]], [[\"Item\", list_type(Category$reflection())]], [[\"mechanicIds\", array_type(int32_type)], [\"categoryIds\", array_type(int32_type)]], [], []]);\n}\n\nexport const emptyFilter = new Filter(false, false, void 0, void 0, void 0, void 0, void 0, void 0, void 0);\n\nexport function init() {\n return new Model(false, empty(), empty(), new Int32Array([]), new Int32Array([]), emptyFilter);\n}\n\nexport function intTryParse(str) {\n let matchValue;\n let outArg = 0;\n matchValue = [tryParse(str, 511, false, 32, new FSharpRef(() => outArg, (v) => {\n outArg = v;\n })), outArg];\n if (matchValue[0]) {\n return matchValue[1];\n }\n else {\n return void 0;\n }\n}\n\nexport function update(msg, currentModel) {\n let inputRecord, inputRecord_1, inputRecord_2, inputRecord_3, inputRecord_4, inputRecord_5, inputRecord_6, inputRecord_7, inputRecord_8;\n switch (msg.tag) {\n case 1: {\n return [new Model(currentModel.MobileFilterOpen, currentModel.Mechanics, currentModel.Categories, currentModel.SelectedGameMechanicIds, currentModel.SelectedGameCategoryIds, (inputRecord = currentModel.Filter, new Filter(msg.fields[0], inputRecord.HideMatchingDesigners, inputRecord.Players, inputRecord.HasMechanic, inputRecord.HasCategory, inputRecord.MinPlayingTime, inputRecord.MaxPlayingTime, inputRecord.PublishedBeforeYear, inputRecord.PublishedAfterYear))), Cmd_none()];\n }\n case 2: {\n return [new Model(currentModel.MobileFilterOpen, currentModel.Mechanics, currentModel.Categories, currentModel.SelectedGameMechanicIds, currentModel.SelectedGameCategoryIds, (inputRecord_1 = currentModel.Filter, new Filter(inputRecord_1.HideLinkedItems, msg.fields[0], inputRecord_1.Players, inputRecord_1.HasMechanic, inputRecord_1.HasCategory, inputRecord_1.MinPlayingTime, inputRecord_1.MaxPlayingTime, inputRecord_1.PublishedBeforeYear, inputRecord_1.PublishedAfterYear))), Cmd_none()];\n }\n case 3: {\n return [new Model(currentModel.MobileFilterOpen, currentModel.Mechanics, currentModel.Categories, currentModel.SelectedGameMechanicIds, currentModel.SelectedGameCategoryIds, (inputRecord_2 = currentModel.Filter, new Filter(inputRecord_2.HideLinkedItems, inputRecord_2.HideMatchingDesigners, intTryParse(msg.fields[0]), inputRecord_2.HasMechanic, inputRecord_2.HasCategory, inputRecord_2.MinPlayingTime, inputRecord_2.MaxPlayingTime, inputRecord_2.PublishedBeforeYear, inputRecord_2.PublishedAfterYear))), Cmd_none()];\n }\n case 4: {\n return [new Model(currentModel.MobileFilterOpen, currentModel.Mechanics, currentModel.Categories, currentModel.SelectedGameMechanicIds, currentModel.SelectedGameCategoryIds, (inputRecord_3 = currentModel.Filter, new Filter(inputRecord_3.HideLinkedItems, inputRecord_3.HideMatchingDesigners, inputRecord_3.Players, inputRecord_3.HasMechanic, inputRecord_3.HasCategory, intTryParse(msg.fields[0]), inputRecord_3.MaxPlayingTime, inputRecord_3.PublishedBeforeYear, inputRecord_3.PublishedAfterYear))), Cmd_none()];\n }\n case 5: {\n return [new Model(currentModel.MobileFilterOpen, currentModel.Mechanics, currentModel.Categories, currentModel.SelectedGameMechanicIds, currentModel.SelectedGameCategoryIds, (inputRecord_4 = currentModel.Filter, new Filter(inputRecord_4.HideLinkedItems, inputRecord_4.HideMatchingDesigners, inputRecord_4.Players, inputRecord_4.HasMechanic, inputRecord_4.HasCategory, inputRecord_4.MinPlayingTime, intTryParse(msg.fields[0]), inputRecord_4.PublishedBeforeYear, inputRecord_4.PublishedAfterYear))), Cmd_none()];\n }\n case 6: {\n return [new Model(currentModel.MobileFilterOpen, currentModel.Mechanics, currentModel.Categories, currentModel.SelectedGameMechanicIds, currentModel.SelectedGameCategoryIds, (inputRecord_5 = currentModel.Filter, new Filter(inputRecord_5.HideLinkedItems, inputRecord_5.HideMatchingDesigners, inputRecord_5.Players, inputRecord_5.HasMechanic, inputRecord_5.HasCategory, inputRecord_5.MinPlayingTime, inputRecord_5.MaxPlayingTime, inputRecord_5.PublishedBeforeYear, intTryParse(msg.fields[0])))), Cmd_none()];\n }\n case 7: {\n return [new Model(currentModel.MobileFilterOpen, currentModel.Mechanics, currentModel.Categories, currentModel.SelectedGameMechanicIds, currentModel.SelectedGameCategoryIds, (inputRecord_6 = currentModel.Filter, new Filter(inputRecord_6.HideLinkedItems, inputRecord_6.HideMatchingDesigners, inputRecord_6.Players, inputRecord_6.HasMechanic, inputRecord_6.HasCategory, inputRecord_6.MinPlayingTime, inputRecord_6.MaxPlayingTime, intTryParse(msg.fields[0]), inputRecord_6.PublishedAfterYear))), Cmd_none()];\n }\n case 8: {\n return [new Model(currentModel.MobileFilterOpen, currentModel.Mechanics, currentModel.Categories, currentModel.SelectedGameMechanicIds, currentModel.SelectedGameCategoryIds, (inputRecord_7 = currentModel.Filter, new Filter(inputRecord_7.HideLinkedItems, inputRecord_7.HideMatchingDesigners, inputRecord_7.Players, intTryParse(msg.fields[0]), inputRecord_7.HasCategory, inputRecord_7.MinPlayingTime, inputRecord_7.MaxPlayingTime, inputRecord_7.PublishedBeforeYear, inputRecord_7.PublishedAfterYear))), Cmd_none()];\n }\n case 9: {\n return [new Model(currentModel.MobileFilterOpen, currentModel.Mechanics, currentModel.Categories, currentModel.SelectedGameMechanicIds, currentModel.SelectedGameCategoryIds, (inputRecord_8 = currentModel.Filter, new Filter(inputRecord_8.HideLinkedItems, inputRecord_8.HideMatchingDesigners, inputRecord_8.Players, inputRecord_8.HasMechanic, intTryParse(msg.fields[0]), inputRecord_8.MinPlayingTime, inputRecord_8.MaxPlayingTime, inputRecord_8.PublishedBeforeYear, inputRecord_8.PublishedAfterYear))), Cmd_none()];\n }\n case 10: {\n return [new Model(currentModel.MobileFilterOpen, msg.fields[0], currentModel.Categories, currentModel.SelectedGameMechanicIds, currentModel.SelectedGameCategoryIds, currentModel.Filter), Cmd_none()];\n }\n case 11: {\n return [new Model(currentModel.MobileFilterOpen, currentModel.Mechanics, msg.fields[0], currentModel.SelectedGameMechanicIds, currentModel.SelectedGameCategoryIds, currentModel.Filter), Cmd_none()];\n }\n case 12: {\n return [new Model(currentModel.MobileFilterOpen, currentModel.Mechanics, currentModel.Categories, msg.fields[0], msg.fields[1], currentModel.Filter), Cmd_none()];\n }\n case 13: {\n return [new Model(currentModel.MobileFilterOpen, currentModel.Mechanics, currentModel.Categories, currentModel.SelectedGameMechanicIds, currentModel.SelectedGameCategoryIds, emptyFilter), Cmd_none()];\n }\n case 14: {\n return [currentModel, Cmd_none()];\n }\n default: {\n return [new Model(!currentModel.MobileFilterOpen, currentModel.Mechanics, currentModel.Categories, currentModel.SelectedGameMechanicIds, currentModel.SelectedGameCategoryIds, currentModel.Filter), Cmd_none()];\n }\n }\n}\n\nexport function render(model, dispatch) {\n let children, props_14, props_12, children_2, props_20, props_18, children_4, props_26, props_24, children_6, props_33, props_31, children_8, props_39, props_37, children_12, props_54, children_10, patternInput, matchValue, children_16, props_68, children_14, patternInput_1, matchValue_1;\n const props_78 = ofArray([[\"className\", model.MobileFilterOpen ? \"filter-box open\" : \"filter-box\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: \"mobile-filter-button\",\n onClick: (_arg1) => {\n dispatch(new Msg(0));\n },\n children: Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: \"mobile-filter-button-text\",\n children: Interop_reactApi.Children.toArray([Fa_i(toList(delay(() => (model.MobileFilterOpen ? singleton(new Fa_IconOption(11, \"fas fa-chevron-double-down\")) : singleton(new Fa_IconOption(11, \"fas fa-chevron-double-up\"))))), []), createElement(\"span\", {\n children: [\"Filter\"],\n }), Fa_i(toList(delay(() => (model.MobileFilterOpen ? singleton(new Fa_IconOption(11, \"fas fa-chevron-double-down\")) : singleton(new Fa_IconOption(11, \"fas fa-chevron-double-up\"))))), [])]),\n })]),\n }), createElement(\"div\", {\n className: \"filter-container\",\n children: Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: \"filter-options filter-subcontainer\",\n children: Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: \"checkbox-option\",\n children: Interop_reactApi.Children.toArray([createElement(\"input\", createObj(cons([\"type\", \"checkbox\"], Helpers_combineClasses(\"is-checkradio\", ofArray([[\"id\", \"hide-linked-items\"], [\"className\", \"is-info\"], [\"onChange\", (ev) => {\n dispatch(new Msg(1, ev.target.checked));\n }], [\"checked\", model.Filter.HideLinkedItems]]))))), createElement(\"label\", {\n htmlFor: \"hide-linked-items\",\n children: \"Hide Linked Items\",\n })]),\n }), createElement(\"div\", {\n className: \"checkbox-option\",\n children: Interop_reactApi.Children.toArray([createElement(\"input\", createObj(cons([\"type\", \"checkbox\"], Helpers_combineClasses(\"is-checkradio\", ofArray([[\"id\", \"hide-matching-designers\"], [\"className\", \"is-info\"], [\"onChange\", (ev_1) => {\n dispatch(new Msg(2, ev_1.target.checked));\n }], [\"checked\", model.Filter.HideMatchingDesigners]]))))), createElement(\"label\", {\n htmlFor: \"hide-matching-designers\",\n children: \"Hide Matching Designers\",\n })]),\n }), (children = singleton_1((props_14 = ofArray([[\"htmlFor\", \"players\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"span\", {\n children: [\"Number of players\"],\n }), (props_12 = ofArray([[\"id\", \"players\"], [\"placeholder\", \"Any\"], [\"onChange\", (ev_2) => {\n dispatch(new Msg(3, ev_2.target.value));\n }], [\"value\", Option_toString(model.Filter.Players)]]), createElement(\"input\", createObj(cons([\"type\", \"number\"], Helpers_combineClasses(\"input\", props_12)))))])]]), createElement(\"label\", createObj(Helpers_combineClasses(\"label\", props_14))))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children)),\n })), createElement(\"div\", {\n className: \"range-input\",\n children: Interop_reactApi.Children.toArray([(children_2 = singleton_1((props_20 = ofArray([[\"htmlFor\", \"minPlayTime\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"span\", {\n children: [\"Min play time (mins)\"],\n }), (props_18 = ofArray([[\"id\", \"minPlayTime\"], [\"placeholder\", \"No Min\"], [\"onChange\", (ev_3) => {\n dispatch(new Msg(4, ev_3.target.value));\n }], [\"value\", Option_toString(model.Filter.MinPlayingTime)]]), createElement(\"input\", createObj(cons([\"type\", \"number\"], Helpers_combineClasses(\"input\", props_18)))))])]]), createElement(\"label\", createObj(Helpers_combineClasses(\"label\", props_20))))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_2)),\n })), (children_4 = singleton_1((props_26 = ofArray([[\"htmlFor\", \"maxPlayTime\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"span\", {\n children: \"Max play time (mins)\",\n }), (props_24 = ofArray([[\"id\", \"maxPlayTime\"], [\"placeholder\", \"No Max\"], [\"onChange\", (ev_4) => {\n dispatch(new Msg(5, ev_4.target.value));\n }], [\"value\", Option_toString(model.Filter.MaxPlayingTime)]]), createElement(\"input\", createObj(cons([\"type\", \"number\"], Helpers_combineClasses(\"input\", props_24)))))])]]), createElement(\"label\", createObj(Helpers_combineClasses(\"label\", props_26))))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_4)),\n }))]),\n }), createElement(\"div\", {\n className: \"range-input\",\n children: Interop_reactApi.Children.toArray([(children_6 = singleton_1((props_33 = ofArray([[\"htmlFor\", \"publishedAfter\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"span\", {\n children: [\"Published after year\"],\n }), (props_31 = ofArray([[\"id\", \"publishedAfter\"], [\"placeholder\", \"The beginning of time\"], [\"onChange\", (ev_5) => {\n dispatch(new Msg(6, ev_5.target.value));\n }], [\"value\", Option_toString(model.Filter.PublishedAfterYear)]]), createElement(\"input\", createObj(cons([\"type\", \"number\"], Helpers_combineClasses(\"input\", props_31)))))])]]), createElement(\"label\", createObj(Helpers_combineClasses(\"label\", props_33))))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_6)),\n })), (children_8 = singleton_1((props_39 = ofArray([[\"htmlFor\", \"publishedBefore\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"span\", {\n children: [\"Published before year\"],\n }), (props_37 = ofArray([[\"id\", \"publishedBefore\"], [\"placeholder\", \"Today\"], [\"onChange\", (ev_6) => {\n dispatch(new Msg(7, ev_6.target.value));\n }], [\"value\", Option_toString(model.Filter.PublishedBeforeYear)]]), createElement(\"input\", createObj(cons([\"type\", \"number\"], Helpers_combineClasses(\"input\", props_37)))))])]]), createElement(\"label\", createObj(Helpers_combineClasses(\"label\", props_39))))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_8)),\n }))]),\n }), (children_12 = singleton_1((props_54 = ofArray([[\"htmlFor\", \"hasMechanic\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"span\", {\n children: [\"Has mechanic\"],\n }), (children_10 = singleton_1((patternInput = Helpers_extractClasses(ofArray([[\"className\", \"is-fullwidth\"], [\"value\", (matchValue = model.Filter.HasMechanic, (matchValue == null) ? \"\" : int32ToString(matchValue))], [\"onChange\", (e) => {\n dispatch(new Msg(8, Browser_Types_Event__Event_get_Value(e)));\n }], [\"children\", Interop_reactApi.Children.toArray([createElement(\"option\", {\n value: \"\",\n children: \"Any\",\n }), createElement(\"optgroup\", {\n label: \"Liked game\",\n children: Interop_reactApi.Children.toArray(Array.from(map((m_2) => createElement(\"option\", {\n value: m_2.Id,\n children: m_2.Name,\n }), filter((m_1) => contains(m_1.Id, model.SelectedGameMechanicIds, {\n Equals: (x, y) => (x === y),\n GetHashCode: (x) => numberHash(x),\n }), model.Mechanics)))),\n }), createElement(\"optgroup\", {\n label: \"Other\",\n children: Interop_reactApi.Children.toArray(Array.from(map((m_4) => createElement(\"option\", {\n value: m_4.Id,\n children: m_4.Name,\n }), filter((m_3) => (!contains(m_3.Id, model.SelectedGameMechanicIds, {\n Equals: (x_1, y_1) => (x_1 === y_1),\n GetHashCode: (x_1) => numberHash(x_1),\n })), model.Mechanics)))),\n })])]])), createElement(\"div\", {\n className: join(\" \", cons(\"select\", patternInput[0])),\n children: Interop_reactApi.Children.toArray([createElement(\"select\", createObj(patternInput[1]))]),\n }))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_10)),\n }))])]]), createElement(\"label\", createObj(Helpers_combineClasses(\"label\", props_54))))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_12)),\n })), (children_16 = singleton_1((props_68 = ofArray([[\"htmlFor\", \"hasCategory\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"span\", {\n children: [\"Has category\"],\n }), (children_14 = singleton_1((patternInput_1 = Helpers_extractClasses(ofArray([[\"className\", \"is-fullwidth\"], [\"value\", (matchValue_1 = model.Filter.HasCategory, (matchValue_1 == null) ? \"\" : int32ToString(matchValue_1))], [\"onChange\", (e_1) => {\n dispatch(new Msg(9, Browser_Types_Event__Event_get_Value(e_1)));\n }], [\"children\", Interop_reactApi.Children.toArray([createElement(\"option\", {\n value: \"\",\n children: \"Any\",\n }), createElement(\"optgroup\", {\n label: \"Liked game\",\n children: Interop_reactApi.Children.toArray(Array.from(map((c_3) => createElement(\"option\", {\n value: c_3.Id,\n children: c_3.Name,\n }), filter((c_2) => contains(c_2.Id, model.SelectedGameCategoryIds, {\n Equals: (x_2, y_2) => (x_2 === y_2),\n GetHashCode: (x_2) => numberHash(x_2),\n }), model.Categories)))),\n }), createElement(\"optgroup\", {\n label: \"Other\",\n children: Interop_reactApi.Children.toArray(Array.from(map((c_5) => createElement(\"option\", {\n value: c_5.Id,\n children: c_5.Name,\n }), filter((c_4) => (!contains(c_4.Id, model.SelectedGameCategoryIds, {\n Equals: (x_3, y_3) => (x_3 === y_3),\n GetHashCode: (x_3) => numberHash(x_3),\n })), model.Categories)))),\n })])]])), createElement(\"div\", {\n className: join(\" \", cons(\"select\", patternInput_1[0])),\n children: Interop_reactApi.Children.toArray([createElement(\"select\", createObj(patternInput_1[1]))]),\n }))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_14)),\n }))])]]), createElement(\"label\", createObj(Helpers_combineClasses(\"label\", props_68))))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_16)),\n }))]),\n }), createElement(\"div\", {\n className: \"filter-subcontainer\",\n children: Interop_reactApi.Children.toArray([createElement(\"button\", createObj(Helpers_combineClasses(\"button\", ofArray([[\"className\", \"clear-filter-button\"], [\"className\", \"is-fullwidth\"], [\"onClick\", (_arg2) => {\n dispatch(new Msg(13));\n }], [\"children\", \"Clear filters\"]])))), createElement(\"button\", createObj(Helpers_combineClasses(\"button\", ofArray([[\"className\", \"filter-button\"], [\"className\", \"is-info\"], [\"className\", \"is-fullwidth\"], [\"onClick\", (_arg3) => {\n dispatch(new Msg(14));\n }], [\"children\", \"Filter\"]]))))]),\n })]),\n })])]]);\n return createElement(\"div\", createObj(Helpers_combineClasses(\"box\", props_78)));\n}\n\n","import { useLayoutEffectWithDeps, useLayoutEffect, useEffectWithDeps, useEffect, useDebugValue } from \"./ReactInterop.js\";\nimport { class_type } from \"../fable-library.3.1.12/Reflection.js\";\nimport { iterate } from \"../fable-library.3.1.12/Seq.js\";\nimport { defaultArg, some, toArray } from \"../fable-library.3.1.12/Option.js\";\nimport { Interop_reactApi } from \"./Interop.fs.js\";\nimport { curry, uncurry } from \"../fable-library.3.1.12/Util.js\";\nimport { useState } from \"react\";\nimport * as react from \"react\";\n\nexport const ReactInterop_useDebugValueWithFormatter = useDebugValue;\n\nexport const ReactInterop_useEffect = useEffect;\n\nexport const ReactInterop_useEffectWithDeps = useEffectWithDeps;\n\nexport const ReactInterop_useLayoutEffect = useLayoutEffect;\n\nexport const ReactInterop_useLayoutEffectWithDeps = useLayoutEffectWithDeps;\n\nexport class Internal {\n constructor() {\n }\n}\n\nexport function Internal$reflection() {\n return class_type(\"Feliz.Internal\", void 0, Internal);\n}\n\nexport function Internal_$ctor() {\n return new Internal();\n}\n\n(() => {\n})();\n\nexport function Internal_functionComponent_Z1B155329(renderElement, name, withKey) {\n iterate((name_1) => {\n renderElement.displayName = name_1;\n }, toArray(name));\n console.warn(some(\"Feliz: using React.functionComponent in Fable 3 is obsolete, please consider using the [\\u003cReactComponent\\u003e] attribute instead which makes Feliz output better Javascript code that is compatible with react-refresh\"));\n return (props) => Interop_reactApi.createElement(renderElement, Internal_propsWithKey(withKey, props));\n}\n\nexport function Internal_memo_Z603636D8(renderElement, name, areEqual, withKey) {\n const memoElementType = Interop_reactApi.memo(renderElement, uncurry(2, defaultArg(curry(2, areEqual), null)));\n iterate((name_1) => {\n renderElement.displayName = name_1;\n }, toArray(name));\n return (props) => Interop_reactApi.createElement(memoElementType, Internal_propsWithKey(withKey, props));\n}\n\nfunction Internal_propsWithKey(withKey, props) {\n if (withKey == null) {\n return props;\n }\n else {\n const f = withKey;\n props.key = f(props);\n return props;\n }\n}\n\nexport class React {\n constructor() {\n }\n}\n\nexport function React$reflection() {\n return class_type(\"Feliz.React\", void 0, React);\n}\n\nexport function React_createDisposable_3A5B6456(dispose) {\n return {\n Dispose() {\n dispose();\n },\n };\n}\n\nexport function useReact_useState_FCFD9EF(initializer) {\n return Interop_reactApi.useState(initializer);\n}\n\nexport function useReact_useReducer_2B9E6EA0(update, initialState) {\n return Interop_reactApi.useReducer(update, initialState);\n}\n\nexport function useReact_useEffect_Z5ECA432F(effect) {\n ReactInterop_useEffect(effect);\n}\n\nexport function useReact_useEffect_Z5234A374(effect, dependencies) {\n ReactInterop_useEffectWithDeps(effect, dependencies);\n}\n\nexport function useReact_useLayoutEffect_Z5ECA432F(effect) {\n ReactInterop_useLayoutEffect(effect);\n}\n\nexport function useReact_useLayoutEffect_Z5234A374(effect, dependencies) {\n ReactInterop_useLayoutEffectWithDeps(effect, dependencies);\n}\n\nexport function useReact_useLayoutEffect_3A5B6456(effect) {\n ReactInterop_useLayoutEffect((_arg1) => {\n effect();\n return React_createDisposable_3A5B6456(() => {\n });\n });\n}\n\nexport function useReact_useLayoutEffect_Z101E1A95(effect, dependencies) {\n ReactInterop_useLayoutEffectWithDeps((_arg2) => {\n effect();\n return React_createDisposable_3A5B6456(() => {\n });\n }, dependencies);\n}\n\nexport function useReact_useEffectOnce_3A5B6456(effect) {\n useReact_useEffect_Z101E1A95(effect, []);\n}\n\nexport function useReact_useEffectOnce_Z5ECA432F(effect) {\n useReact_useEffect_Z5234A374(effect, []);\n}\n\nexport function useReact_useEffectOnce_6E825304(effect) {\n useReact_useEffect_Z5234A374(() => {\n const disposeOption = effect();\n return {\n Dispose() {\n iterate((d) => {\n let copyOfStruct = d;\n copyOfStruct.Dispose();\n }, toArray(disposeOption));\n },\n };\n }, []);\n}\n\nexport function useReact_useEffect_3A5B6456(effect) {\n ReactInterop_useEffect((_arg3) => {\n effect();\n return React_createDisposable_3A5B6456(() => {\n });\n });\n}\n\nexport function useReact_useEffect_Z101E1A95(effect, dependencies) {\n ReactInterop_useEffectWithDeps((_arg4) => {\n effect();\n return React_createDisposable_3A5B6456(() => {\n });\n }, dependencies);\n}\n\nexport function useReact_useDebugValue_Z721C83C5(value) {\n ReactInterop_useDebugValueWithFormatter(value, (x) => x);\n}\n\nexport function useReact_useDebugValue_77A55D6D(value, formatter) {\n ReactInterop_useDebugValueWithFormatter(value, formatter);\n}\n\nexport function useReact_useCallback_93353E(callbackFunction, dependencies) {\n return Interop_reactApi.useCallback(callbackFunction, defaultArg(dependencies, []));\n}\n\nexport function useReact_useRef_1505(initialValue) {\n return Interop_reactApi.useRef(initialValue);\n}\n\nexport function useReact_useInputRef() {\n return useReact_useRef_1505(void 0);\n}\n\nexport function useReact_useButtonRef() {\n return useReact_useRef_1505(void 0);\n}\n\nexport function useReact_useElementRef() {\n return useReact_useRef_1505(void 0);\n}\n\nexport function useReact_useMemo_CF4EA67(createFunction, dependencies) {\n return Interop_reactApi.useMemo(createFunction, defaultArg(dependencies, []));\n}\n\nexport function React_functionComponent_2F9D7239(render, withKey) {\n return Internal_functionComponent_Z1B155329(render, void 0, withKey);\n}\n\nexport function React_functionComponent_Z4C5FE1BE(name, render, withKey) {\n return Internal_functionComponent_Z1B155329(render, name, withKey);\n}\n\nexport function React_functionComponent_19A12FB2(render, withKey) {\n return Internal_functionComponent_Z1B155329((arg) => react.createElement(react.Fragment, {}, ...render(arg)), void 0, withKey);\n}\n\nexport function React_functionComponent_2E1DD889(name, render, withKey) {\n return Internal_functionComponent_Z1B155329((arg) => react.createElement(react.Fragment, {}, ...render(arg)), name, withKey);\n}\n\nexport function React_memo_62A0F746(render, withKey, areEqual) {\n return Internal_memo_Z603636D8(render, void 0, areEqual, withKey);\n}\n\nexport function React_memo_6648A89D(name, render, withKey, areEqual) {\n return Internal_memo_Z603636D8(render, name, areEqual, withKey);\n}\n\nexport function React_memo_C2C6BED(render, withKey, areEqual) {\n return Internal_memo_Z603636D8((arg) => react.createElement(react.Fragment, {}, ...render(arg)), void 0, areEqual, withKey);\n}\n\nexport function React_memo_Z4FCC584A(name, render, withKey, areEqual) {\n return Internal_memo_Z603636D8((arg) => react.createElement(react.Fragment, {}, ...render(arg)), name, areEqual, withKey);\n}\n\nexport function React_createContext_1AE444D8(name, defaultValue) {\n const contextObject = Interop_reactApi.createContext(defaultArg(defaultValue, void 0));\n iterate((name_1) => {\n contextObject.displayName = name_1;\n }, toArray(name));\n return contextObject;\n}\n\nexport function React_contextProvider_34D9BBBD(contextObject, contextValue, child) {\n return Interop_reactApi.createElement(contextObject.Provider, {\n value: contextValue,\n }, child);\n}\n\nexport function React_contextProvider_138D2F56(contextObject, contextValue, children) {\n return Interop_reactApi.createElement(contextObject.Provider, {\n value: contextValue,\n }, ...children);\n}\n\nexport function React_contextConsumer_Z68910595(contextObject, render) {\n return Interop_reactApi.createElement(contextObject.Consumer, null, render);\n}\n\nexport function React_contextConsumer_56D53A40(contextObject, render) {\n return Interop_reactApi.createElement(contextObject.Consumer, null, (arg) => react.createElement(react.Fragment, {}, ...render(arg)));\n}\n\nexport function useReact_useContext_37FA55CF(contextObject) {\n return Interop_reactApi.useContext(contextObject);\n}\n\nexport function useReact_useCallbackRef_7C4B0DD6(callback) {\n const lastRenderCallbackRef = useReact_useRef_1505(callback);\n const callbackRef = useReact_useCallback_93353E((arg) => lastRenderCallbackRef.current(arg), []);\n useReact_useLayoutEffect_3A5B6456(() => {\n lastRenderCallbackRef.current = callback;\n });\n return callbackRef;\n}\n\nexport const React_useStateWithUpdater_1505 = useState;\n\nexport function React_forwardRef_3790D881(render) {\n const forwardRefType = Interop_reactApi.forwardRef((props, ref) => render([props, ref]));\n return (tupledArg) => {\n let o;\n return Interop_reactApi.createElement(forwardRefType, (o = {\n props: tupledArg[0],\n ref: tupledArg[1],\n }, Object.assign({}, o)));\n };\n}\n\nexport function React_forwardRef_7DC3DB1A(name, render) {\n const forwardRefType = Interop_reactApi.forwardRef((props, ref) => render([props, ref]));\n render.displayName = name;\n return (tupledArg) => {\n let o;\n return Interop_reactApi.createElement(forwardRefType, (o = {\n props: tupledArg[0],\n ref: tupledArg[1],\n }, Object.assign({}, o)));\n };\n}\n\nexport function React_strictMode_6E3A73D(children) {\n return Interop_reactApi.createElement(Interop_reactApi.StrictMode, void 0, ...children);\n}\n\nexport function React_lazy$0027_4712D3AE(dynamicImport, props) {\n return Interop_reactApi.createElement(Interop_reactApi.lazy((() => dynamicImport)), props);\n}\n\nexport function React_lazy$0027_Z3D8450FC(dynamicImport, props) {\n return Interop_reactApi.createElement(Interop_reactApi.lazy(dynamicImport), props);\n}\n\nexport function React_suspense_6E3A73D(children) {\n let o;\n return Interop_reactApi.createElement(Interop_reactApi.Suspense, (o = {\n fallback: null,\n }, Object.assign({}, o)), ...children);\n}\n\nexport function React_suspense_Z3796A576(children, fallback) {\n let o;\n return Interop_reactApi.createElement(Interop_reactApi.Suspense, (o = {\n fallback: fallback,\n }, Object.assign({}, o)), ...children);\n}\n\nexport function useReact_useImperativeHandle_596DDC25(ref, createHandle) {\n Interop_reactApi.useImperativeHandle(ref, createHandle);\n}\n\nexport function useReact_useImperativeHandle_Z12F09548(ref, createHandle, dependencies) {\n Interop_reactApi.useImperativeHandle(ref, createHandle, dependencies);\n}\n\nexport function useFeliz_React__React_useState_Static_1505(initial) {\n return Interop_reactApi.useState(initial);\n}\n\nexport const Feliz_React__React_useStateWithUpdater_Static_FCFD9EF = useState;\n\n","import {\r\n useEffect as useEffectReact,\r\n useLayoutEffect as useLayoutEffectReact,\r\n useDebugValue as useDebugValueReact } from 'react'\r\n\r\nexport const useEffect = getDisposable => {\r\n useEffectReact(() => {\r\n const disposable = getDisposable()\r\n return () => {\r\n disposable.Dispose();\r\n }\r\n })\r\n}\r\n\r\nexport const useEffectWithDeps = (getDisposable, deps) => {\r\n useEffectReact(() => {\r\n const disposable = getDisposable()\r\n return () => {\r\n disposable.Dispose();\r\n }\r\n }, deps)\r\n}\r\n\r\nexport const useLayoutEffect = getDisposable => {\r\n useLayoutEffectReact(() => {\r\n const disposable = getDisposable()\r\n return () => {\r\n disposable.Dispose();\r\n }\r\n })\r\n}\r\n\r\nexport const useLayoutEffectWithDeps = (getDisposable, deps) => {\r\n useLayoutEffectReact(() => {\r\n const disposable = getDisposable()\r\n return () => {\r\n disposable.Dispose();\r\n }\r\n }, deps)\r\n}\r\n\r\nexport const useDebugValue = (value, formatter) => useDebugValueReact(value, formatter)","import { toString as toString_1, Record } from \"./.fable/fable-library.3.1.12/Types.js\";\nimport { enum_type, int32_type, record_type, string_type } from \"./.fable/fable-library.3.1.12/Reflection.js\";\nimport { getCharAtIndex, substring, padLeft, printf, toFail } from \"./.fable/fable-library.3.1.12/String.js\";\nimport { comparePrimitives, max } from \"./.fable/fable-library.3.1.12/Util.js\";\nimport { replace } from \"./.fable/fable-library.3.1.12/RegExp.js\";\nimport { year as year_1, second, month as month_2, minute, hour, dayOfWeek, day as day_2 } from \"./.fable/fable-library.3.1.12/Date.js\";\n\nexport class Months extends Record {\n constructor(January, February, March, April, May, June, July, August, September, October, November, December) {\n super();\n this.January = January;\n this.February = February;\n this.March = March;\n this.April = April;\n this.May = May;\n this.June = June;\n this.July = July;\n this.August = August;\n this.September = September;\n this.October = October;\n this.November = November;\n this.December = December;\n }\n}\n\nexport function Months$reflection() {\n return record_type(\"Format.Months\", [], Months, () => [[\"January\", string_type], [\"February\", string_type], [\"March\", string_type], [\"April\", string_type], [\"May\", string_type], [\"June\", string_type], [\"July\", string_type], [\"August\", string_type], [\"September\", string_type], [\"October\", string_type], [\"November\", string_type], [\"December\", string_type]]);\n}\n\nexport class DaysOfWeek extends Record {\n constructor(Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday) {\n super();\n this.Monday = Monday;\n this.Tuesday = Tuesday;\n this.Wednesday = Wednesday;\n this.Thursday = Thursday;\n this.Friday = Friday;\n this.Saturday = Saturday;\n this.Sunday = Sunday;\n }\n}\n\nexport function DaysOfWeek$reflection() {\n return record_type(\"Format.DaysOfWeek\", [], DaysOfWeek, () => [[\"Monday\", string_type], [\"Tuesday\", string_type], [\"Wednesday\", string_type], [\"Thursday\", string_type], [\"Friday\", string_type], [\"Saturday\", string_type], [\"Sunday\", string_type]]);\n}\n\nexport class Date$ extends Record {\n constructor(Months, AbbreviatedMonths, Days, AbbreviatedDays, DefaultFormat, FirstDayOfTheWeek) {\n super();\n this.Months = Months;\n this.AbbreviatedMonths = AbbreviatedMonths;\n this.Days = Days;\n this.AbbreviatedDays = AbbreviatedDays;\n this.DefaultFormat = DefaultFormat;\n this.FirstDayOfTheWeek = (FirstDayOfTheWeek | 0);\n }\n}\n\nexport function Date$$reflection() {\n return record_type(\"Format.Date\", [], Date$, () => [[\"Months\", Months$reflection()], [\"AbbreviatedMonths\", Months$reflection()], [\"Days\", DaysOfWeek$reflection()], [\"AbbreviatedDays\", DaysOfWeek$reflection()], [\"DefaultFormat\", string_type], [\"FirstDayOfTheWeek\", enum_type(\"System.DayOfWeek\", int32_type, [[\"Sunday\", 0], [\"Monday\", 1], [\"Tuesday\", 2], [\"Wednesday\", 3], [\"Thursday\", 4], [\"Friday\", 5], [\"Saturday\", 6]])]]);\n}\n\nexport class Time extends Record {\n constructor(AM, PM) {\n super();\n this.AM = AM;\n this.PM = PM;\n }\n}\n\nexport function Time$reflection() {\n return record_type(\"Format.Time\", [], Time, () => [[\"AM\", string_type], [\"PM\", string_type]]);\n}\n\nexport class Localization extends Record {\n constructor(Date$, Time) {\n super();\n this.Date = Date$;\n this.Time = Time;\n }\n}\n\nexport function Localization$reflection() {\n return record_type(\"Format.Localization\", [], Localization, () => [[\"Date\", Date$$reflection()], [\"Time\", Time$reflection()]]);\n}\n\nexport function englishUK() {\n return new Localization(new Date$(new Months(\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"), new Months(\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"), new DaysOfWeek(\"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", \"Sunday\"), new DaysOfWeek(\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"), \"d/M/yyyy\", 1), new Time(\"AM\", \"PM\"));\n}\n\nexport function fromDayOfWeek(local, day) {\n switch (day) {\n case 0: {\n return local.Sunday;\n }\n case 1: {\n return local.Monday;\n }\n case 2: {\n return local.Tuesday;\n }\n case 3: {\n return local.Wednesday;\n }\n case 4: {\n return local.Thursday;\n }\n case 5: {\n return local.Friday;\n }\n case 6: {\n return local.Saturday;\n }\n default: {\n return toFail(printf(\"Not a valid day of week: %A\"))(day);\n }\n }\n}\n\nexport function mod12(x) {\n if ((x === 12) ? true : (x === 0)) {\n return 12;\n }\n else {\n return (x % 12) | 0;\n }\n}\n\nexport function fromMonth(local, month) {\n switch (month) {\n case 1: {\n return local.January;\n }\n case 2: {\n return local.February;\n }\n case 3: {\n return local.March;\n }\n case 4: {\n return local.April;\n }\n case 5: {\n return local.May;\n }\n case 6: {\n return local.June;\n }\n case 7: {\n return local.July;\n }\n case 8: {\n return local.August;\n }\n case 9: {\n return local.September;\n }\n case 10: {\n return local.October;\n }\n case 11: {\n return local.November;\n }\n case 12: {\n return local.December;\n }\n default: {\n return toFail(printf(\"Not a valid month rank: %i\"))(month);\n }\n }\n}\n\nexport function toString(x) {\n return toString_1(x);\n}\n\nexport const padWith = (c) => ((arg) => padLeft(arg, 2, c));\n\nexport function takeLastChars(count, str) {\n return substring(str, max((x, y) => comparePrimitives(x, y), 0, str.length - count));\n}\n\nexport function localFormat(local, formatString, date) {\n return replace(formatString, \"(d{1,4})|(h{1,2})|(H{1,2})|(m{1,2})|(M{1,4})|(s{1,2})|(t{1,2})|(y{1,5})|(\\\\\\\\.?)\", (token) => {\n const symbol = token[0];\n if (((symbol || \"\").indexOf(\"\\\\\") === 0) ? ((symbol || \"\").length === 2) : false) {\n return substring(symbol || \"\", 1);\n }\n else {\n const matchValue = symbol || \"\";\n switch (matchValue) {\n case \"d\": {\n return toString(day_2(date));\n }\n case \"dd\": {\n return padWith(\"0\")(toString(day_2(date)));\n }\n case \"ddd\": {\n return fromDayOfWeek(local.Date.AbbreviatedDays, dayOfWeek(date));\n }\n case \"dddd\": {\n return fromDayOfWeek(local.Date.Days, dayOfWeek(date));\n }\n case \"h\": {\n return toString(mod12(hour(date)));\n }\n case \"hh\": {\n return padWith(\"0\")(toString(mod12(hour(date))));\n }\n case \"H\": {\n return toString(hour(date));\n }\n case \"HH\": {\n return padWith(\"0\")(toString(hour(date)));\n }\n case \"m\": {\n return toString(minute(date));\n }\n case \"mm\": {\n return padWith(\"0\")(toString(minute(date)));\n }\n case \"M\": {\n return toString(month_2(date));\n }\n case \"MM\": {\n return padWith(\"0\")(toString(month_2(date)));\n }\n case \"MMM\": {\n return fromMonth(local.Date.AbbreviatedMonths, month_2(date));\n }\n case \"MMMM\": {\n return fromMonth(local.Date.Months, month_2(date));\n }\n case \"s\": {\n return toString(second(date));\n }\n case \"ss\": {\n return padWith(\"0\")(toString(second(date)));\n }\n case \"t\": {\n try {\n return (hour(date) < 12) ? substring(local.Time.AM, 0, 1) : substring(local.Time.PM, 0, 1);\n }\n catch (matchValue_1) {\n return \"\";\n }\n }\n case \"tt\": {\n return (hour(date) < 12) ? local.Time.AM : local.Time.PM;\n }\n case \"y\": {\n const year = takeLastChars(2, toString(year_1(date)));\n return (getCharAtIndex(year, 0) === \"0\") ? substring(year, 1) : year;\n }\n case \"yy\": {\n return padWith(\"0\")(takeLastChars(2, toString(year_1(date))));\n }\n case \"yyy\": {\n return padLeft(toString(year_1(date)), 3, \"0\");\n }\n case \"yyyy\": {\n return padLeft(toString(year_1(date)), 4, \"0\");\n }\n case \"yyyyy\": {\n return padLeft(toString(year_1(date)), 5, \"0\");\n }\n default: {\n return toFail(printf(\"The token %s is not implemented. Please report it\"))(matchValue);\n }\n }\n }\n });\n}\n\n","import { Union, Record } from \"../fable-library.3.1.12/Types.js\";\nimport { array_type, int32_type, union_type, lambda_type, unit_type, bool_type, obj_type, class_type, string_type, record_type, float64_type } from \"../fable-library.3.1.12/Reflection.js\";\n\nexport class Props_Point2 extends Record {\n constructor(x, y) {\n super();\n this.x = x;\n this.y = y;\n }\n}\n\nexport function Props_Point2$reflection() {\n return record_type(\"Fable.Recharts.Props.Point2\", [], Props_Point2, () => [[\"x\", float64_type], [\"y\", float64_type]]);\n}\n\nexport class Props_Point3 extends Record {\n constructor(x, y, z) {\n super();\n this.x = x;\n this.y = y;\n this.z = z;\n }\n}\n\nexport function Props_Point3$reflection() {\n return record_type(\"Fable.Recharts.Props.Point3\", [], Props_Point3, () => [[\"x\", float64_type], [\"y\", float64_type], [\"z\", float64_type]]);\n}\n\nexport class Props_LinePoint extends Record {\n constructor(x, y, value) {\n super();\n this.x = x;\n this.y = y;\n this.value = value;\n }\n}\n\nexport function Props_LinePoint$reflection() {\n return record_type(\"Fable.Recharts.Props.LinePoint\", [], Props_LinePoint, () => [[\"x\", float64_type], [\"y\", float64_type], [\"value\", float64_type]]);\n}\n\nexport class Props_ScatterPoint extends Record {\n constructor(cx, cy, r, payload) {\n super();\n this.cx = cx;\n this.cy = cy;\n this.r = r;\n this.payload = payload;\n }\n}\n\nexport function Props_ScatterPoint$reflection() {\n return record_type(\"Fable.Recharts.Props.ScatterPoint\", [], Props_ScatterPoint, () => [[\"cx\", float64_type], [\"cy\", float64_type], [\"r\", float64_type], [\"payload\", Props_Point3$reflection()]]);\n}\n\nexport class Props_Margin extends Record {\n constructor(top, bottom, right, left) {\n super();\n this.top = top;\n this.bottom = bottom;\n this.right = right;\n this.left = left;\n }\n}\n\nexport function Props_Margin$reflection() {\n return record_type(\"Fable.Recharts.Props.Margin\", [], Props_Margin, () => [[\"top\", float64_type], [\"bottom\", float64_type], [\"right\", float64_type], [\"left\", float64_type]]);\n}\n\nexport class Props_ViewBox extends Record {\n constructor(x, y, width, height) {\n super();\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n }\n}\n\nexport function Props_ViewBox$reflection() {\n return record_type(\"Fable.Recharts.Props.ViewBox\", [], Props_ViewBox, () => [[\"x\", float64_type], [\"y\", float64_type], [\"width\", float64_type], [\"height\", float64_type]]);\n}\n\nexport class Props_Chart extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"SyncId\", \"Layout\", \"Width\", \"Height\", \"Data\", \"Margin\", \"BarCategoryGap\", \"BarGap\", \"BarSize\", \"MaxBarSize\", \"StackOffset\", \"BaseValue\", \"baseValue\", \"ReverseStackOrder\", \"Cx\", \"Cy\", \"StartAngle\", \"EndAngle\", \"InnerRadius\", \"OuterRadius\", \"OnClick\", \"OnMouseDown\", \"OnMouseUp\", \"OnMouseMove\", \"OnMouseOver\", \"OnMouseEnter\", \"OnMouseLeave\"];\n }\n}\n\nexport function Props_Chart$reflection() {\n return union_type(\"Fable.Recharts.Props.Chart\", [], Props_Chart, () => [[[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", class_type(\"System.Array\")]], [[\"Item\", Props_Margin$reflection()]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", float64_type]], [[\"Item\", bool_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", lambda_type(obj_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type))]], [[\"Item\", lambda_type(obj_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type))]], [[\"Item\", lambda_type(obj_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type))]], [[\"Item\", lambda_type(obj_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type))]], [[\"Item\", lambda_type(obj_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type))]], [[\"Item\", lambda_type(obj_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type))]], [[\"Item\", lambda_type(obj_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type))]]]);\n}\n\nexport class Props_Treemap extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Width\", \"Height\", \"Data\", \"DataKey\", \"AspectRatio\", \"IsAnimationActive\", \"AnimationBegin\", \"AnimationDuration\", \"AnimationEasing\"];\n }\n}\n\nexport function Props_Treemap$reflection() {\n return union_type(\"Fable.Recharts.Props.Treemap\", [], Props_Treemap, () => [[[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", class_type(\"System.Array\")]], [[\"Item\", obj_type]], [[\"Item\", float64_type]], [[\"Item\", bool_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", string_type]]]);\n}\n\nexport class Props_Responsive extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Aspect\", \"Width\", \"Height\", \"MinWidth\", \"MinHeight\", \"Debounce\"];\n }\n}\n\nexport function Props_Responsive$reflection() {\n return union_type(\"Fable.Recharts.Props.Responsive\", [], Props_Responsive, () => [[[\"Item\", float64_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]]]);\n}\n\nexport class Props_Legend extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Width\", \"Height\", \"Layout\", \"Align\", \"VerticalAlign\", \"IconSize\", \"IconType\", \"PayLoad\", \"ChartWidth\", \"ChartHeight\", \"Margin\", \"Content\", \"WrapperStyle\", \"OnClick\", \"OnMouseDown\", \"OnMouseUp\", \"OnMouseMove\", \"OnMouseOver\", \"OnMouseEnter\", \"OnMouseLeave\"];\n }\n}\n\nexport function Props_Legend$reflection() {\n return union_type(\"Fable.Recharts.Props.Legend\", [], Props_Legend, () => [[[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", float64_type]], [[\"Item\", string_type]], [[\"Item\", class_type(\"System.Array\")]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", Props_Margin$reflection()]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]]]);\n}\n\nexport class Props_Tooltip extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Separator\", \"Offset\", \"ItemStyle\", \"WrapperStyle\", \"LabelStyle\", \"Cursor\", \"ViewBox\", \"Active\", \"Coordinate\", \"Payload\", \"Label\", \"Content\", \"Formatter\", \"LabelFormatter\", \"ItemSorter\", \"IsAnimationActive\", \"AnimationBegin\", \"AnimationDuration\", \"AnimationEasing\"];\n }\n}\n\nexport function Props_Tooltip$reflection() {\n return union_type(\"Fable.Recharts.Props.Tooltip\", [], Props_Tooltip, () => [[[\"Item\", string_type]], [[\"Item\", float64_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", Props_ViewBox$reflection()]], [[\"Item\", bool_type]], [[\"Item\", Props_Point2$reflection()]], [[\"Item\", class_type(\"System.Array\")]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", bool_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", string_type]]]);\n}\n\nexport class Props_Cell extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Fill\", \"Stroke\"];\n }\n}\n\nexport function Props_Cell$reflection() {\n return union_type(\"Fable.Recharts.Props.Cell\", [], Props_Cell, () => [[[\"Item\", string_type]], [[\"Item\", string_type]]]);\n}\n\nexport class Props_Text extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"ScaleToFit\", \"Angle\", \"Width\", \"TextAnchor\", \"VerticalAnchor\"];\n }\n}\n\nexport function Props_Text$reflection() {\n return union_type(\"Fable.Recharts.Props.Text\", [], Props_Text, () => [[[\"Item\", bool_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", string_type]], [[\"Item\", string_type]]]);\n}\n\nexport class Props_Label extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"ViewBox\", \"Formatter\", \"Value\", \"Position\", \"Offset\", \"Children\", \"Content\", \"Id\"];\n }\n}\n\nexport function Props_Label$reflection() {\n return union_type(\"Fable.Recharts.Props.Label\", [], Props_Label, () => [[[\"Item\", Props_ViewBox$reflection()]], [[\"Item\", lambda_type(obj_type, obj_type)]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", float64_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]]]);\n}\n\nexport class Props_LabelList extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"DataKey\", \"ValueAccessor\", \"Content\", \"Position\", \"Offset\", \"Formatter\", \"Data\", \"ClockWise\", \"Id\"];\n }\n}\n\nexport function Props_LabelList$reflection() {\n return union_type(\"Fable.Recharts.Props.LabelList\", [], Props_LabelList, () => [[[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", float64_type]], [[\"Item\", lambda_type(obj_type, obj_type)]], [[\"Item\", float64_type]], [[\"Item\", string_type]], [[\"Item\", string_type]]]);\n}\n\nexport class Props_Cartesian extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Type\", \"Data\", \"DataKey\", \"LegendType\", \"Label\", \"Stroke\", \"StrokeWidth\", \"Layout\", \"BaseLine\", \"Unit\", \"Name\", \"Id\", \"StackId\", \"IsAnimationActive\", \"AnimationBegin\", \"AnimationDuration\", \"AnimationEasing\", \"Dot\", \"ActiveDot\", \"Points\", \"ConnectNulls\", \"BarSize\", \"MaxBarSize\", \"MinPointSize\", \"Background\", \"Shape\", \"Line\", \"LineType\", \"Hide\", \"Width\", \"Height\", \"XAxisId\", \"YAxisId\", \"ZAxisId\", \"Range\", \"AxisLine\", \"Orientation\", \"AllowDecimals\", \"AllowDataOverflow\", \"AllowDuplicatedCategory\", \"MinTickGap\", \"TickCount\", \"TickSize\", \"TickLine\", \"TickMargin\", \"TickFormatter\", \"Ticks\", \"Tick\", \"Domain\", \"Interval\", \"Padding\", \"Mirror\", \"Reversed\", \"Scale\", \"X\", \"Y\", \"X1\", \"X2\", \"Y1\", \"Y2\", \"TravellerWidth\", \"StartIndex\", \"EndIndex\", \"ViewBox\", \"Horizontal\", \"Vertical\", \"HorizontalPoints\", \"VerticalPoints\", \"XAxis\", \"YAxis\", \"AlwaysShow\", \"IsFront\", \"Direction\", \"OnChange\", \"OnClick\", \"OnMouseDown\", \"OnMouseUp\", \"OnMouseOver\", \"OnMouseOut\", \"OnMouseEnter\", \"OnMouseMove\", \"OnMouseLeave\"];\n }\n}\n\nexport function Props_Cartesian$reflection() {\n return union_type(\"Fable.Recharts.Props.Cartesian\", [], Props_Cartesian, () => [[[\"Item\", obj_type]], [[\"Item\", class_type(\"System.Array\")]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", bool_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", class_type(\"System.Array\")]], [[\"Item\", bool_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", class_type(\"System.Array\")]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", bool_type]], [[\"Item\", bool_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", obj_type]], [[\"Item\", float64_type]], [[\"Item\", obj_type]], [[\"Item\", class_type(\"System.Array\")]], [[\"Item\", obj_type]], [[\"Item\", class_type(\"System.Array\")]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", bool_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", Props_ViewBox$reflection()]], [[\"Item\", bool_type]], [[\"Item\", bool_type]], [[\"Item\", class_type(\"System.Array\")]], [[\"Item\", class_type(\"System.Array\")]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", bool_type]], [[\"Item\", bool_type]], [[\"Item\", string_type]], [[\"Item\", lambda_type(unit_type, unit_type)]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]]]);\n}\n\nexport class Props_Polar extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"Cx\", \"Cy\", \"InnerRadius\", \"OuterRadius\", \"StartAngle\", \"EndAngle\", \"MinAngle\", \"PaddingAngle\", \"NameKey\", \"ActiveIndex\", \"ActiveShape\", \"PolarAngles\", \"PolarRadius\", \"GridType\", \"Angle\", \"Type\", \"Data\", \"DataKey\", \"LegendType\", \"Label\", \"LabelLine\", \"IsAnimationActive\", \"AnimationBegin\", \"AnimationDuration\", \"AnimationEasing\", \"Dot\", \"Points\", \"Background\", \"Shape\", \"AxisLine\", \"Orientation\", \"AllowDuplicatedCategory\", \"TickCount\", \"TickLine\", \"TickFormatter\", \"Ticks\", \"Tick\", \"Domain\", \"Scale\", \"OnClick\", \"OnMouseDown\", \"OnMouseUp\", \"OnMouseOver\", \"OnMouseOut\", \"OnMouseEnter\", \"OnMouseMove\", \"OnMouseLeave\"];\n }\n}\n\nexport function Props_Polar$reflection() {\n return union_type(\"Fable.Recharts.Props.Polar\", [], Props_Polar, () => [[[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", string_type]], [[\"Item\", array_type(int32_type)]], [[\"Item\", obj_type]], [[\"Item\", class_type(\"System.Array\")]], [[\"Item\", class_type(\"System.Array\")]], [[\"Item\", string_type]], [[\"Item\", float64_type]], [[\"Item\", obj_type]], [[\"Item\", class_type(\"System.Array\")]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", bool_type]], [[\"Item\", float64_type]], [[\"Item\", float64_type]], [[\"Item\", string_type]], [[\"Item\", obj_type]], [[\"Item\", class_type(\"System.Array\")]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", string_type]], [[\"Item\", bool_type]], [[\"Item\", float64_type]], [[\"Item\", obj_type]], [[\"Item\", obj_type]], [[\"Item\", class_type(\"System.Array\")]], [[\"Item\", obj_type]], [[\"Item\", class_type(\"System.Array\")]], [[\"Item\", string_type]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]], [[\"Item\", lambda_type(obj_type, lambda_type(int32_type, lambda_type(class_type(\"Browser.Types.MouseEvent\"), unit_type)))]]]);\n}\n\nexport class Props_Shape {\n constructor() {\n }\n}\n\nexport function Props_Shape$reflection() {\n return class_type(\"Fable.Recharts.Props.Shape\", void 0, Props_Shape);\n}\n\n","import { React_memo_62A0F746, useReact_useEffect_Z101E1A95, useFeliz_React__React_useState_Static_1505 } from \"./.fable/Feliz.1.49.0/React.fs.js\";\nimport { toArray, empty, singleton, append, delay, toList } from \"./.fable/fable-library.3.1.12/Seq.js\";\nimport { floatTryParse } from \"./Helpers.fs.js\";\nimport { createElement } from \"react\";\nimport * as react from \"react\";\nimport { min as min_1, comparePrimitives, createObj } from \"./.fable/fable-library.3.1.12/Util.js\";\nimport { Helpers_combineClasses } from \"./.fable/Feliz.Bulma.2.17.0/ElementBuilders.fs.js\";\nimport { zip, map as map_2, toArray as toArray_1, replicate, ofArray, cons } from \"./.fable/fable-library.3.1.12/List.js\";\nimport { fromDate } from \"./.fable/fable-library.3.1.12/DateOffset.js\";\nimport { toNumber, fromNumber } from \"./.fable/fable-library.3.1.12/Long.js\";\nimport { days, fromSeconds } from \"./.fable/fable-library.3.1.12/TimeSpan.js\";\nimport { englishUK, localFormat } from \"./DateFormat.fs.js\";\nimport { bind, map, defaultArg } from \"./.fable/fable-library.3.1.12/Option.js\";\nimport { max, map as map_1, min } from \"./.fable/fable-library.3.1.12/Array.js\";\nimport { Interop_reactApi } from \"./.fable/Feliz.1.49.0/Interop.fs.js\";\nimport { YAxis, XAxis, CartesianGrid, Line, LineChart, ResponsiveContainer } from \"recharts\";\nimport { Props_Cartesian, Props_Margin, Props_Chart } from \"./.fable/Fable.Recharts.1.1.2/Fable.Recharts.fs.js\";\nimport { keyValueList } from \"./.fable/fable-library.3.1.12/MapUtil.js\";\nimport { rangeDouble } from \"./.fable/fable-library.3.1.12/Range.js\";\n\nexport function Input_NonEmptyNumber(props) {\n const valueStr = props.Value.toString();\n const patternInput = useFeliz_React__React_useState_Static_1505(valueStr);\n const updateInternalValue = patternInput[1];\n const internalValue = patternInput[0];\n const patternInput_1 = useFeliz_React__React_useState_Static_1505(false);\n const updateEditing = patternInput_1[1];\n useReact_useEffect_Z101E1A95(() => {\n if (!patternInput_1[0]) {\n updateInternalValue(valueStr);\n }\n }, [valueStr]);\n const props_1 = toList(delay(() => append(singleton([\"id\", props.Id]), delay(() => append(singleton([\"value\", internalValue]), delay(() => append(singleton([\"onChange\", (ev) => {\n const v = ev.target.value;\n updateInternalValue(v);\n props.OnChange(floatTryParse(v));\n }]), delay(() => append(singleton([\"onBlur\", (_arg1) => {\n if (internalValue !== valueStr) {\n updateInternalValue(valueStr);\n }\n updateEditing(false);\n }]), delay(() => append(singleton([\"onFocus\", (_arg2) => {\n updateEditing(true);\n }]), delay(() => {\n const matchValue = props.Step;\n if (matchValue == null) {\n return empty();\n }\n else {\n return singleton([\"step\", matchValue]);\n }\n }))))))))))));\n return createElement(\"input\", createObj(cons([\"type\", \"number\"], Helpers_combineClasses(\"input\", props_1))));\n}\n\nexport const timeTrend = React_memo_62A0F746((props) => {\n const unixTimeOr0 = (date) => {\n let copyOfStruct = fromDate(date);\n return fromNumber(copyOfStruct.getTime() / 1000);\n };\n const toUnixDay = (unixSeconds) => {\n let copyOfStruct_1;\n return ((copyOfStruct_1 = fromSeconds(toNumber(unixSeconds)), days(copyOfStruct_1)) / 1000) - 16;\n };\n const formatDate = (d) => localFormat(englishUK(), \"MMM yyyy\", d);\n return defaultArg(map((trendData) => {\n let props_10, props_8;\n const lowerBound = Math.floor(min(map_1((x_2) => x_2.rating, trendData, Float64Array), {\n Compare: (x_3, y_1) => comparePrimitives(x_3, y_1),\n }) * 2) / 2;\n const upperBound = min_1((x_1, y) => comparePrimitives(x_1, y), Math.ceil(max(map_1((x_6) => x_6.rating, trendData, Float64Array), {\n Compare: (x_7, y_2) => comparePrimitives(x_7, y_2),\n }) * 2) / 2, 10);\n return createElement(\"div\", {\n className: \"chart\",\n children: Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: \"time-trend-heading\",\n children: \"Average rating time trend\",\n }), react.createElement(ResponsiveContainer, {\n aspect: 2.5,\n }, (props_10 = ofArray([new Props_Chart(4, trendData), new Props_Chart(5, new Props_Margin(10, 5, 35, 5))]), react.createElement(LineChart, keyValueList(props_10, 1), react.createElement(Line, {\n dot: false,\n type: \"monotone\",\n dataKey: \"rating\",\n stroke: \"orange\",\n strokeWidth: \"2.0\",\n isAnimationActive: false,\n }), react.createElement(CartesianGrid, {\n stroke: \"#ccc\",\n strokeDasharray: \"5 5\",\n }), react.createElement(XAxis, {\n dataKey: \"name\",\n interval: 398,\n tickSize: 10,\n tickMargin: 10,\n }), (props_8 = ofArray([new Props_Cartesian(48, new Float64Array([lowerBound, upperBound])), new Props_Cartesian(49, \"preserveStartEnd\"), new Props_Cartesian(46, toArray(rangeDouble(lowerBound, 0.5, upperBound))), new Props_Cartesian(38, true), new Props_Cartesian(42, 10), new Props_Cartesian(29, 35)]), react.createElement(YAxis, keyValueList(props_8, 1))))))]),\n });\n }, bind((coeffs) => {\n const coeffsF = map_1((value) => value, coeffs, Float64Array);\n const startDate = map(unixTimeOr0, props.RatingTrendStartDate);\n const endDate = map(unixTimeOr0, props.RatingTrendEndDate);\n const startValue = map(toUnixDay, startDate);\n const endValue = map(toUnixDay, endDate);\n let interval;\n const matchValue = [startValue, endValue];\n let pattern_matching_result, end$0027, start;\n if (matchValue[0] != null) {\n if (matchValue[1] != null) {\n pattern_matching_result = 0;\n end$0027 = matchValue[1];\n start = matchValue[0];\n }\n else {\n pattern_matching_result = 1;\n }\n }\n else {\n pattern_matching_result = 1;\n }\n switch (pattern_matching_result) {\n case 0: {\n interval = ((end$0027 - start) / 400);\n break;\n }\n case 1: {\n interval = (void 0);\n break;\n }\n }\n const labels = toList(delay(() => {\n let matchValue_1;\n return append((matchValue_1 = props.RatingTrendStartDate, (matchValue_1 == null) ? singleton(\"\") : singleton(formatDate(matchValue_1))), delay(() => append(replicate(398, \"\"), delay(() => {\n const matchValue_2 = props.RatingTrendEndDate;\n return (matchValue_2 == null) ? singleton(\"\") : singleton(formatDate(matchValue_2));\n }))));\n }));\n const matchValue_3 = [startValue, endValue, interval];\n let pattern_matching_result_1, end$0027_1, i, start_1;\n if (matchValue_3[0] != null) {\n if (matchValue_3[1] != null) {\n if (matchValue_3[2] != null) {\n pattern_matching_result_1 = 0;\n end$0027_1 = matchValue_3[1];\n i = matchValue_3[2];\n start_1 = matchValue_3[0];\n }\n else {\n pattern_matching_result_1 = 1;\n }\n }\n else {\n pattern_matching_result_1 = 1;\n }\n }\n else {\n pattern_matching_result_1 = 1;\n }\n switch (pattern_matching_result_1) {\n case 0: {\n return toArray_1(map_2((tupledArg) => ({\n name: tupledArg[0],\n rating: tupledArg[1],\n }), zip(labels, map_2((x) => ((((coeffsF[0] + (coeffsF[1] * x)) + (coeffsF[2] * Math.pow(x, 2))) + (coeffsF[3] * Math.pow(x, 3))) + (coeffsF[4] * Math.pow(x, 4))), toList(rangeDouble(start_1, i, end$0027_1))))));\n }\n case 1: {\n return void 0;\n }\n }\n }, props.RatingTrendCoefficients)), null);\n});\n\n","import { map } from \"./.fable/fable-library.3.1.12/List.js\";\nimport { Navigation_newUrl } from \"./.fable/Fable.Elmish.Browser.3.0.4/navigation.fs.js\";\nimport { toPath } from \"./Pages.fs.js\";\nimport { createElement } from \"react\";\nimport { createObj } from \"./.fable/fable-library.3.1.12/Util.js\";\nimport { singleton, append, delay, toList } from \"./.fable/fable-library.3.1.12/Seq.js\";\nimport { Helpers_combineClasses } from \"./.fable/Feliz.Bulma.2.17.0/ElementBuilders.fs.js\";\n\nexport function goToUrl(href, e) {\n e.preventDefault();\n void map((f) => {\n f((value) => {\n });\n }, Navigation_newUrl(href));\n}\n\nexport function viewLink(page, props) {\n const href = toPath(page);\n return createElement(\"a\", createObj(toList(delay(() => append(singleton([\"href\", href]), delay(() => append(singleton([\"onClick\", (e) => {\n goToUrl(href, e);\n }]), delay(() => props))))))));\n}\n\nexport function viewLinkButton(page, props) {\n const href = toPath(page);\n const props_1 = toList(delay(() => append(singleton([\"href\", href]), delay(() => append(singleton([\"onClick\", (e) => {\n goToUrl(href, e);\n }]), delay(() => props))))));\n return createElement(\"a\", createObj(Helpers_combineClasses(\"button\", props_1)));\n}\n\n","import { Union, Record } from \"../.fable/fable-library.3.1.12/Types.js\";\nimport { union_type, class_type, list_type, bool_type, record_type, array_type, option_type, string_type, int32_type } from \"../.fable/fable-library.3.1.12/Reflection.js\";\nimport { TimeTrendData, BoardGame$reflection, Page$1$reflection, Category$reflection, Mechanic$reflection, BoardGameRecommendation$reflection, TimeTrendData$reflection } from \"../../TryTheseGames.Website.Shared/Shared.fs.js\";\nimport { toQueryString, Deferred$1, CancellablePagedDeferred$1, CancellableDeferred$1, AsyncOperation$1, AsyncOperation$1$reflection, Deferred$1$reflection, CancellablePagedDeferred$1$reflection, CancellableDeferred$1$reflection } from \"../Helpers.fs.js\";\nimport { render as render_1, update as update_2, Msg as Msg_2, init as init_1, Msg$reflection as Msg$reflection_1, Model$reflection as Model$reflection_1 } from \"./GameSearcher.fs.js\";\nimport { render as render_2, Msg as Msg_1, Filter__ToRecommendationsFilter, update as update_1, init as init_2, Msg$reflection as Msg$reflection_2, Model$reflection as Model$reflection_2 } from \"./RecommendationFilter.fs.js\";\nimport { Auto_generateBoxedDecoder_79988AEF } from \"../.fable/Thoth.Json.6.0.0/Decode.fs.js\";\nimport { fetchAs } from \"../FetchHelpers.fs.js\";\nimport { createObj, uncurry } from \"../.fable/fable-library.3.1.12/Util.js\";\nimport { Cmd_none, Cmd_map, Cmd_OfFunc_result, Cmd_batch, Cmd_OfPromise_either } from \"../.fable/Fable.Elmish.3.1.0/cmd.fs.js\";\nimport { interpolate, toText } from \"../.fable/fable-library.3.1.12/String.js\";\nimport { empty, singleton, append, delay, toList } from \"../.fable/fable-library.3.1.12/Seq.js\";\nimport { isEmpty, singleton as singleton_1, map, tryFind, length, append as append_1, ofArray } from \"../.fable/fable-library.3.1.12/List.js\";\nimport { some } from \"../.fable/fable-library.3.1.12/Option.js\";\nimport { createElement } from \"react\";\nimport { Interop_reactApi } from \"../.fable/Feliz.1.49.0/Interop.fs.js\";\nimport { Fa_i, Fa_Stack_Option, Fa_stack, Fa_ISize, Fa_IconOption, Fa_span } from \"../.fable/Fable.FontAwesome.2.0.0/FontAwesome.fs.js\";\nimport { rangeDouble } from \"../.fable/fable-library.3.1.12/Range.js\";\nimport { timeTrend as timeTrend_1 } from \"../Components.fs.js\";\nimport { viewLinkButton, viewLink } from \"../PushStateLink.fs.js\";\nimport { Page } from \"../Pages.fs.js\";\nimport { Helpers_combineClasses } from \"../.fable/Feliz.Bulma.2.17.0/ElementBuilders.fs.js\";\nimport { recommendationsGlossaryModal, moreInfoModal } from \"../Modals.fs.js\";\n\nexport class SelectedGame extends Record {\n constructor(Id, Name, Thumbnail, YearPublished, MinPlayers, MaxPlayers, MinPlayingTime, MaxPlayingTime, MechanicIds, CategoryIds, TimeTrend) {\n super();\n this.Id = (Id | 0);\n this.Name = Name;\n this.Thumbnail = Thumbnail;\n this.YearPublished = (YearPublished | 0);\n this.MinPlayers = (MinPlayers | 0);\n this.MaxPlayers = (MaxPlayers | 0);\n this.MinPlayingTime = (MinPlayingTime | 0);\n this.MaxPlayingTime = (MaxPlayingTime | 0);\n this.MechanicIds = MechanicIds;\n this.CategoryIds = CategoryIds;\n this.TimeTrend = TimeTrend;\n }\n}\n\nexport function SelectedGame$reflection() {\n return record_type(\"Client.Recommendations.RecommendationsPage.SelectedGame\", [], SelectedGame, () => [[\"Id\", int32_type], [\"Name\", string_type], [\"Thumbnail\", option_type(string_type)], [\"YearPublished\", int32_type], [\"MinPlayers\", int32_type], [\"MaxPlayers\", int32_type], [\"MinPlayingTime\", int32_type], [\"MaxPlayingTime\", int32_type], [\"MechanicIds\", array_type(int32_type)], [\"CategoryIds\", array_type(int32_type)], [\"TimeTrend\", CancellableDeferred$1$reflection(TimeTrendData$reflection())]]);\n}\n\nexport class Model extends Record {\n constructor(MoreInfoModalActive, GlossaryModalActive, GameSearcher, RecommendationFilter, SelectedGameId, SelectedGame, Recommendations, Mechanics, Categories) {\n super();\n this.MoreInfoModalActive = MoreInfoModalActive;\n this.GlossaryModalActive = GlossaryModalActive;\n this.GameSearcher = GameSearcher;\n this.RecommendationFilter = RecommendationFilter;\n this.SelectedGameId = SelectedGameId;\n this.SelectedGame = SelectedGame;\n this.Recommendations = Recommendations;\n this.Mechanics = Mechanics;\n this.Categories = Categories;\n }\n}\n\nexport function Model$reflection() {\n return record_type(\"Client.Recommendations.RecommendationsPage.Model\", [], Model, () => [[\"MoreInfoModalActive\", bool_type], [\"GlossaryModalActive\", bool_type], [\"GameSearcher\", Model$reflection_1()], [\"RecommendationFilter\", Model$reflection_2()], [\"SelectedGameId\", option_type(int32_type)], [\"SelectedGame\", CancellableDeferred$1$reflection(SelectedGame$reflection())], [\"Recommendations\", CancellablePagedDeferred$1$reflection(list_type(BoardGameRecommendation$reflection()))], [\"Mechanics\", Deferred$1$reflection(list_type(Mechanic$reflection()))], [\"Categories\", Deferred$1$reflection(list_type(Category$reflection()))]]);\n}\n\nexport class Msg extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"GameSearcherMsg\", \"RecommendationFilterMsg\", \"LoadRecommendations\", \"LoadMechanics\", \"LoadCategories\", \"LoadSelectedGame\", \"LikeGame\", \"LoadTimeTrend\", \"ToggleMoreInfoModal\", \"ToggleGlossaryModal\", \"LogError\"];\n }\n}\n\nexport function Msg$reflection() {\n return union_type(\"Client.Recommendations.RecommendationsPage.Msg\", [], Msg, () => [[[\"Item\", Msg$reflection_1()]], [[\"Item\", Msg$reflection_2()]], [[\"Item\", AsyncOperation$1$reflection(Page$1$reflection(BoardGameRecommendation$reflection()))]], [[\"Item\", AsyncOperation$1$reflection(list_type(Mechanic$reflection()))]], [[\"Item\", AsyncOperation$1$reflection(list_type(Category$reflection()))]], [[\"Item\", AsyncOperation$1$reflection(BoardGame$reflection())]], [[\"Item\", int32_type]], [[\"Item\", AsyncOperation$1$reflection(TimeTrendData$reflection())]], [], [], [[\"Item\", class_type(\"System.Exception\")]]]);\n}\n\nexport const mechanicsDecoder = Auto_generateBoxedDecoder_79988AEF(list_type(Mechanic$reflection()), void 0, void 0);\n\nexport function getMechanicsCmd() {\n const patternInput = fetchAs(\"/api/mechanics\", uncurry(2, mechanicsDecoder));\n return Cmd_OfPromise_either(() => patternInput[0], void 0, (arg) => (new Msg(3, new AsyncOperation$1(1, arg))), (arg0_2) => (new Msg(10, arg0_2)));\n}\n\nexport const categoriesDecoder = Auto_generateBoxedDecoder_79988AEF(list_type(Category$reflection()), void 0, void 0);\n\nexport function getCategoriesCmd() {\n const patternInput = fetchAs(\"/api/categories\", uncurry(2, categoriesDecoder));\n return Cmd_OfPromise_either(() => patternInput[0], void 0, (arg) => (new Msg(4, new AsyncOperation$1(1, arg))), (arg0_2) => (new Msg(10, arg0_2)));\n}\n\nexport const gameDecoder = Auto_generateBoxedDecoder_79988AEF(BoardGame$reflection(), void 0, void 0);\n\nexport function getGameCmd(id) {\n const patternInput = fetchAs(toText(interpolate(\"/api/games/%i%P()\", [id])), uncurry(2, gameDecoder));\n return [Cmd_OfPromise_either(() => patternInput[0], void 0, (arg) => (new Msg(5, new AsyncOperation$1(1, arg))), (arg0_2) => (new Msg(10, arg0_2))), patternInput[1]];\n}\n\nexport const timeTrendDecoder = Auto_generateBoxedDecoder_79988AEF(TimeTrendData$reflection(), void 0, void 0);\n\nexport function getTimeTrendDataCmd(id) {\n const patternInput = fetchAs(toText(interpolate(\"/api/games/%i%P()/time-trend\", [id])), uncurry(2, timeTrendDecoder));\n return [Cmd_OfPromise_either(() => patternInput[0], void 0, (arg) => (new Msg(7, new AsyncOperation$1(1, arg))), (arg0_2) => (new Msg(10, arg0_2))), patternInput[1]];\n}\n\nexport function init(gameId) {\n return [new Model(false, false, init_1(false), init_2(), gameId, new CancellableDeferred$1(0), new CancellablePagedDeferred$1(0), new Deferred$1(0), new Deferred$1(0)), Cmd_batch(toList(delay(() => append(singleton(Cmd_OfFunc_result(new Msg(3, new AsyncOperation$1(0)))), delay(() => append(singleton(Cmd_OfFunc_result(new Msg(4, new AsyncOperation$1(0)))), delay(() => {\n if (gameId == null) {\n return empty();\n }\n else {\n return append(singleton(Cmd_OfFunc_result(new Msg(2, new AsyncOperation$1(0)))), delay(() => singleton(Cmd_OfFunc_result(new Msg(5, new AsyncOperation$1(0))))));\n }\n })))))))];\n}\n\nexport const recommendationDecoder = Auto_generateBoxedDecoder_79988AEF(Page$1$reflection(BoardGameRecommendation$reflection()), void 0, void 0);\n\nexport function getRecommendationsCmd(filter) {\n const patternInput = fetchAs(toText(interpolate(\"/api/games/%i%P()/recommendations%s%P()\", [filter.GameId, toQueryString(filter, [\"gameId\"])])), uncurry(2, recommendationDecoder));\n return [Cmd_OfPromise_either(() => patternInput[0], void 0, (arg) => (new Msg(2, new AsyncOperation$1(1, arg))), (arg0_2) => (new Msg(10, arg0_2))), patternInput[1]];\n}\n\nexport function mapRecommendationToSelectedGame(g) {\n return new SelectedGame(g.Id, g.Name, g.Thumbnail, g.YearPublished, g.MinPlayers, g.MaxPlayers, g.MinPlayingTime, g.MaxPlayingTime, g.MechanicIds, g.CategoryIds, new CancellableDeferred$1(0));\n}\n\nexport function mapToSelectedGame(g) {\n return new SelectedGame(g.Id, g.Name, g.Thumbnail, g.YearPublished, g.MinPlayers, g.MaxPlayers, g.MinPlayingTime, g.MaxPlayingTime, g.MechanicIds, g.CategoryIds, new CancellableDeferred$1(2, new TimeTrendData(g.RatingTrendCoefficients, g.RatingTrendStartDate, g.RatingTrendEndDate)));\n}\n\nexport function update(msg, state) {\n let matchValue_3;\n if (msg.tag === 1) {\n const patternInput_2 = update_1(msg.fields[0], state.RecommendationFilter);\n const newState_2 = new Model(state.MoreInfoModalActive, state.GlossaryModalActive, state.GameSearcher, patternInput_2[0], state.SelectedGameId, state.SelectedGame, state.Recommendations, state.Mechanics, state.Categories);\n const cmd_4 = Cmd_map((arg0_2) => (new Msg(1, arg0_2)), patternInput_2[1]);\n if (msg.fields[0].tag === 14) {\n return [new Model(newState_2.MoreInfoModalActive, newState_2.GlossaryModalActive, newState_2.GameSearcher, newState_2.RecommendationFilter, newState_2.SelectedGameId, newState_2.SelectedGame, new CancellablePagedDeferred$1(0), newState_2.Mechanics, newState_2.Categories), Cmd_batch(ofArray([cmd_4, Cmd_OfFunc_result(new Msg(2, new AsyncOperation$1(0)))]))];\n }\n else {\n return [newState_2, cmd_4];\n }\n }\n else if (msg.tag === 2) {\n if (msg.fields[0].tag === 1) {\n let items;\n const matchValue_4 = state.Recommendations;\n let pattern_matching_result, rs_2;\n switch (matchValue_4.tag) {\n case 1: {\n pattern_matching_result = 0;\n break;\n }\n case 2: {\n pattern_matching_result = 1;\n rs_2 = matchValue_4.fields[0];\n break;\n }\n case 3: {\n pattern_matching_result = 1;\n rs_2 = matchValue_4.fields[0];\n break;\n }\n default: pattern_matching_result = 0}\n switch (pattern_matching_result) {\n case 0: {\n items = msg.fields[0].fields[0].Items;\n break;\n }\n case 1: {\n items = append_1(rs_2, msg.fields[0].fields[0].Items);\n break;\n }\n }\n return [new Model(state.MoreInfoModalActive, state.GlossaryModalActive, state.GameSearcher, state.RecommendationFilter, state.SelectedGameId, state.SelectedGame, new CancellablePagedDeferred$1(3, items, length(items) < msg.fields[0].fields[0].TotalCount), state.Mechanics, state.Categories), Cmd_none()];\n }\n else {\n const matchValue = state.Recommendations;\n let pattern_matching_result_1, cancel;\n switch (matchValue.tag) {\n case 1: {\n pattern_matching_result_1 = 0;\n cancel = matchValue.fields[0];\n break;\n }\n case 2: {\n pattern_matching_result_1 = 0;\n cancel = matchValue.fields[1];\n break;\n }\n default: pattern_matching_result_1 = 1}\n switch (pattern_matching_result_1) {\n case 0: {\n cancel();\n break;\n }\n }\n let skip;\n const matchValue_1 = state.Recommendations;\n skip = ((matchValue_1.tag === 3) ? length(matchValue_1.fields[0]) : 0);\n const matchValue_2 = state.SelectedGameId;\n if (matchValue_2 == null) {\n return [state, Cmd_none()];\n }\n else {\n const patternInput_3 = getRecommendationsCmd(Filter__ToRecommendationsFilter(state.RecommendationFilter.Filter, matchValue_2, skip));\n const cancel_1 = patternInput_3[1];\n return [new Model(state.MoreInfoModalActive, state.GlossaryModalActive, state.GameSearcher, state.RecommendationFilter, state.SelectedGameId, state.SelectedGame, (matchValue_3 = state.Recommendations, (matchValue_3.tag === 1) ? (new CancellablePagedDeferred$1(1, cancel_1)) : ((matchValue_3.tag === 2) ? (new CancellablePagedDeferred$1(1, cancel_1)) : ((matchValue_3.tag === 3) ? (new CancellablePagedDeferred$1(2, matchValue_3.fields[0], cancel_1)) : (new CancellablePagedDeferred$1(1, cancel_1))))), state.Mechanics, state.Categories), patternInput_3[0]];\n }\n }\n }\n else if (msg.tag === 3) {\n if (msg.fields[0].tag === 1) {\n return [new Model(state.MoreInfoModalActive, state.GlossaryModalActive, state.GameSearcher, state.RecommendationFilter, state.SelectedGameId, state.SelectedGame, state.Recommendations, new Deferred$1(2, msg.fields[0].fields[0]), state.Categories), Cmd_OfFunc_result(new Msg(1, new Msg_1(10, msg.fields[0].fields[0])))];\n }\n else {\n return [new Model(state.MoreInfoModalActive, state.GlossaryModalActive, state.GameSearcher, state.RecommendationFilter, state.SelectedGameId, state.SelectedGame, state.Recommendations, new Deferred$1(1), state.Categories), getMechanicsCmd()];\n }\n }\n else if (msg.tag === 4) {\n if (msg.fields[0].tag === 1) {\n return [new Model(state.MoreInfoModalActive, state.GlossaryModalActive, state.GameSearcher, state.RecommendationFilter, state.SelectedGameId, state.SelectedGame, state.Recommendations, state.Mechanics, new Deferred$1(2, msg.fields[0].fields[0])), Cmd_OfFunc_result(new Msg(1, new Msg_1(11, msg.fields[0].fields[0])))];\n }\n else {\n return [new Model(state.MoreInfoModalActive, state.GlossaryModalActive, state.GameSearcher, state.RecommendationFilter, state.SelectedGameId, state.SelectedGame, state.Recommendations, state.Mechanics, new Deferred$1(1)), getCategoriesCmd()];\n }\n }\n else if (msg.tag === 5) {\n if (msg.fields[0].tag === 1) {\n return [new Model(state.MoreInfoModalActive, state.GlossaryModalActive, state.GameSearcher, state.RecommendationFilter, state.SelectedGameId, new CancellableDeferred$1(2, mapToSelectedGame(msg.fields[0].fields[0])), state.Recommendations, state.Mechanics, state.Categories), Cmd_batch(ofArray([Cmd_OfFunc_result(new Msg(0, new Msg_2(0, msg.fields[0].fields[0].Name, true))), Cmd_OfFunc_result(new Msg(1, new Msg_1(12, msg.fields[0].fields[0].MechanicIds, msg.fields[0].fields[0].CategoryIds)))]))];\n }\n else {\n const matchValue_5 = state.SelectedGame;\n if (matchValue_5.tag === 1) {\n matchValue_5.fields[0]();\n }\n const matchValue_6 = state.SelectedGameId;\n if (matchValue_6 == null) {\n return [state, Cmd_none()];\n }\n else {\n const patternInput_4 = getGameCmd(matchValue_6);\n return [new Model(state.MoreInfoModalActive, state.GlossaryModalActive, state.GameSearcher, state.RecommendationFilter, state.SelectedGameId, new CancellableDeferred$1(1, patternInput_4[1]), state.Recommendations, state.Mechanics, state.Categories), patternInput_4[0]];\n }\n }\n }\n else if (msg.tag === 6) {\n let promotedGame;\n const matchValue_7 = state.Recommendations;\n let pattern_matching_result_2, rs_3;\n switch (matchValue_7.tag) {\n case 2: {\n pattern_matching_result_2 = 0;\n rs_3 = matchValue_7.fields[0];\n break;\n }\n case 3: {\n pattern_matching_result_2 = 0;\n rs_3 = matchValue_7.fields[0];\n break;\n }\n default: pattern_matching_result_2 = 1}\n switch (pattern_matching_result_2) {\n case 0: {\n promotedGame = tryFind((r) => (r.Id === msg.fields[0]), rs_3);\n break;\n }\n case 1: {\n promotedGame = (void 0);\n break;\n }\n }\n if (promotedGame == null) {\n return [new Model(state.MoreInfoModalActive, state.GlossaryModalActive, state.GameSearcher, state.RecommendationFilter, msg.fields[0], new CancellableDeferred$1(0), new CancellablePagedDeferred$1(0), state.Mechanics, state.Categories), Cmd_batch(ofArray([Cmd_OfFunc_result(new Msg(5, new AsyncOperation$1(0))), Cmd_OfFunc_result(new Msg(2, new AsyncOperation$1(0)))]))];\n }\n else {\n const game_1 = promotedGame;\n return [new Model(state.MoreInfoModalActive, state.GlossaryModalActive, state.GameSearcher, state.RecommendationFilter, msg.fields[0], new CancellableDeferred$1(2, mapRecommendationToSelectedGame(game_1)), new CancellablePagedDeferred$1(0), state.Mechanics, state.Categories), Cmd_batch(ofArray([Cmd_OfFunc_result(new Msg(1, new Msg_1(12, game_1.MechanicIds, game_1.CategoryIds))), Cmd_OfFunc_result(new Msg(0, new Msg_2(0, game_1.Name, true))), Cmd_OfFunc_result(new Msg(7, new AsyncOperation$1(0))), Cmd_OfFunc_result(new Msg(2, new AsyncOperation$1(0)))]))];\n }\n }\n else if (msg.tag === 7) {\n if (msg.fields[0].tag === 1) {\n const matchValue_11 = state.SelectedGame;\n if (matchValue_11.tag === 2) {\n const game_3 = matchValue_11.fields[0];\n return [new Model(state.MoreInfoModalActive, state.GlossaryModalActive, state.GameSearcher, state.RecommendationFilter, state.SelectedGameId, new CancellableDeferred$1(2, new SelectedGame(game_3.Id, game_3.Name, game_3.Thumbnail, game_3.YearPublished, game_3.MinPlayers, game_3.MaxPlayers, game_3.MinPlayingTime, game_3.MaxPlayingTime, game_3.MechanicIds, game_3.CategoryIds, new CancellableDeferred$1(2, msg.fields[0].fields[0]))), state.Recommendations, state.Mechanics, state.Categories), Cmd_none()];\n }\n else {\n return [state, Cmd_none()];\n }\n }\n else {\n const matchValue_8 = state.SelectedGame;\n if (matchValue_8.tag === 2) {\n const game_2 = matchValue_8.fields[0];\n const matchValue_9 = game_2.TimeTrend;\n if (matchValue_9.tag === 1) {\n matchValue_9.fields[0]();\n }\n const matchValue_10 = state.SelectedGameId;\n if (matchValue_10 == null) {\n return [state, Cmd_none()];\n }\n else {\n const patternInput_5 = getTimeTrendDataCmd(matchValue_10);\n return [new Model(state.MoreInfoModalActive, state.GlossaryModalActive, state.GameSearcher, state.RecommendationFilter, state.SelectedGameId, new CancellableDeferred$1(2, new SelectedGame(game_2.Id, game_2.Name, game_2.Thumbnail, game_2.YearPublished, game_2.MinPlayers, game_2.MaxPlayers, game_2.MinPlayingTime, game_2.MaxPlayingTime, game_2.MechanicIds, game_2.CategoryIds, new CancellableDeferred$1(1, patternInput_5[1]))), state.Recommendations, state.Mechanics, state.Categories), patternInput_5[0]];\n }\n }\n else {\n return [state, Cmd_none()];\n }\n }\n }\n else if (msg.tag === 8) {\n return [new Model(!state.MoreInfoModalActive, state.GlossaryModalActive, state.GameSearcher, state.RecommendationFilter, state.SelectedGameId, state.SelectedGame, state.Recommendations, state.Mechanics, state.Categories), Cmd_none()];\n }\n else if (msg.tag === 9) {\n return [new Model(state.MoreInfoModalActive, !state.GlossaryModalActive, state.GameSearcher, state.RecommendationFilter, state.SelectedGameId, state.SelectedGame, state.Recommendations, state.Mechanics, state.Categories), Cmd_none()];\n }\n else if (msg.tag === 10) {\n console.error(some(msg.fields[0]));\n return [state, Cmd_none()];\n }\n else if (msg.fields[0].tag === 4) {\n const patternInput = update_2(new Msg_2(4, msg.fields[0].fields[0]), state.GameSearcher);\n return [new Model(state.MoreInfoModalActive, state.GlossaryModalActive, patternInput[0], state.RecommendationFilter, msg.fields[0].fields[0].Id, new CancellableDeferred$1(2, mapToSelectedGame(msg.fields[0].fields[0])), new CancellablePagedDeferred$1(0), state.Mechanics, state.Categories), Cmd_batch(ofArray([Cmd_map((arg0) => (new Msg(0, arg0)), patternInput[1]), Cmd_OfFunc_result(new Msg(1, new Msg_1(12, msg.fields[0].fields[0].MechanicIds, msg.fields[0].fields[0].CategoryIds))), Cmd_OfFunc_result(new Msg(2, new AsyncOperation$1(0)))]))];\n }\n else {\n const patternInput_1 = update_2(msg.fields[0], state.GameSearcher);\n return [new Model(state.MoreInfoModalActive, state.GlossaryModalActive, patternInput_1[0], state.RecommendationFilter, state.SelectedGameId, state.SelectedGame, state.Recommendations, state.Mechanics, state.Categories), Cmd_map((arg0_1) => (new Msg(0, arg0_1)), patternInput_1[1])];\n }\n}\n\nexport const loadingSpinner = createElement(\"div\", {\n className: \"has-text-centered\",\n children: Interop_reactApi.Children.toArray([Fa_span(ofArray([new Fa_IconOption(11, \"far fa-spinner\"), new Fa_IconOption(12), new Fa_IconOption(0, new Fa_ISize(7))]), [])]),\n});\n\nexport function getRangeString(min, max) {\n if (min === max) {\n return toText(interpolate(\"%i%P()\", [min]));\n }\n else {\n return toText(interpolate(\"%i%P()-%i%P()\", [min, max]));\n }\n}\n\nexport function renderStars(num) {\n return append_1(map((_arg1) => Fa_stack(singleton_1(new Fa_Stack_Option(1, \"star-stack\")), [Fa_i(ofArray([new Fa_IconOption(11, \"fas fa-star\"), new Fa_IconOption(17), new Fa_IconOption(15, \"filled-star\")]), []), Fa_i(ofArray([new Fa_IconOption(11, \"fal fa-star\"), new Fa_IconOption(17)]), [])]), toList(rangeDouble(1, 1, num))), map((_arg2) => Fa_stack(singleton_1(new Fa_Stack_Option(1, \"star-stack\")), [Fa_i(ofArray([new Fa_IconOption(11, \"fas fa-star\"), new Fa_IconOption(17), new Fa_IconOption(15, \"empty-star\")]), []), Fa_i(ofArray([new Fa_IconOption(11, \"fal fa-star\"), new Fa_IconOption(17)]), [])]), toList(rangeDouble(1, 1, 3 - num))));\n}\n\nexport function renderSelectedGame(g) {\n let thumbnailUrl;\n const matchValue = g.Thumbnail;\n thumbnailUrl = ((matchValue == null) ? \"\" : matchValue);\n return createElement(\"div\", {\n className: \"selected-game\",\n children: Interop_reactApi.Children.toArray(Array.from(toList(delay(() => {\n let children, children_2, value_44, children_4, value_48;\n return append(singleton(createElement(\"div\", {\n className: \"recommendation game\",\n children: Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: \"image-background\",\n children: Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: \"image-background-image\",\n style: {\n backgroundImage: (\"url(\\u0027\" + thumbnailUrl) + \"\\u0027)\",\n },\n })]),\n }), createElement(\"div\", {\n className: \"image-container\",\n children: Interop_reactApi.Children.toArray([createElement(\"img\", {\n className: \"game-image\",\n src: thumbnailUrl,\n })]),\n }), createElement(\"div\", {\n className: \"game-information\",\n children: Interop_reactApi.Children.toArray([(children = ofArray([createElement(\"span\", {\n className: \"game-name\",\n children: g.Name,\n }), createElement(\"span\", {\n className: \"year-published\",\n children: toText(interpolate(\" (%i%P()) \", [g.YearPublished])),\n }), createElement(\"a\", {\n href: toText(interpolate(\"https://boardgamegeek.com/boardgame/%i%P()\", [g.Id])),\n target: \"_blank\",\n rel: \"noopener\",\n className: \"tooltip\",\n [\"data-tooltip\"]: \"BoardGameGeek\",\n children: Interop_reactApi.Children.toArray([Fa_i(singleton_1(new Fa_IconOption(11, \"far fa-external-link\")), [])]),\n })]), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children)),\n })), createElement(\"div\", {\n className: \"game-breakdown\",\n children: Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: \"game-stats\",\n children: Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: \"game-stat\",\n children: Interop_reactApi.Children.toArray([(children_2 = singleton_1(Fa_i(ofArray([new Fa_IconOption(11, \"fas fa-users\"), new Fa_IconOption(0, new Fa_ISize(3))]), [])), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_2)),\n })), (value_44 = toText(interpolate(\"%s%P() Players\", [getRangeString(g.MinPlayers, g.MaxPlayers)])), createElement(\"div\", {\n children: [value_44],\n }))]),\n }), createElement(\"div\", {\n className: \"game-stat\",\n children: Interop_reactApi.Children.toArray([(children_4 = singleton_1(Fa_i(ofArray([new Fa_IconOption(11, \"far fa-stopwatch\"), new Fa_IconOption(0, new Fa_ISize(3))]), [])), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_4)),\n })), (value_48 = toText(interpolate(\"%s%P() Min\", [getRangeString(g.MinPlayingTime, g.MaxPlayingTime)])), createElement(\"div\", {\n children: [value_48],\n }))]),\n })]),\n })]),\n })]),\n })]),\n })), delay(() => {\n const matchValue_1 = g.TimeTrend;\n switch (matchValue_1.tag) {\n case 1: {\n return singleton(createElement(\"div\", {\n className: \"chart\",\n children: Interop_reactApi.Children.toArray([loadingSpinner]),\n }));\n }\n case 2: {\n return singleton(timeTrend_1(matchValue_1.fields[0]));\n }\n default: {\n return singleton(null);\n }\n }\n }));\n })))),\n });\n}\n\nexport function renderRecommendation(r) {\n let children, children_2, value_45, value_49, value_54, children_4, children_6, children_8, value_72, children_10, value_76;\n let thumbnailUrl;\n const matchValue = r.Thumbnail;\n thumbnailUrl = ((matchValue == null) ? \"\" : matchValue);\n return createElement(\"div\", {\n className: \"recommendation game\",\n children: Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: \"image-background\",\n children: Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: \"image-background-image\",\n style: {\n backgroundImage: (\"url(\\u0027\" + thumbnailUrl) + \"\\u0027)\",\n },\n })]),\n }), createElement(\"div\", {\n className: \"image-container\",\n children: Interop_reactApi.Children.toArray([createElement(\"img\", {\n className: \"game-image\",\n src: thumbnailUrl,\n })]),\n }), createElement(\"div\", {\n className: \"game-information\",\n children: Interop_reactApi.Children.toArray([(children = ofArray([createElement(\"span\", {\n className: \"game-name\",\n children: r.Name,\n }), createElement(\"span\", {\n className: \"year-published\",\n children: toText(interpolate(\" (%i%P()) \", [r.YearPublished])),\n }), viewLink(new Page(0, r.Id), [[\"className\", \"replace-game tooltip\"], [\"data-tooltip\", \"Like\"], [\"children\", Interop_reactApi.Children.toArray([Fa_i(singleton_1(new Fa_IconOption(11, \"fas fa-thumbs-up\")), [])])]]), createElement(\"a\", {\n href: toText(interpolate(\"https://boardgamegeek.com/boardgame/%i%P()\", [r.Id])),\n target: \"_blank\",\n rel: \"noopener\",\n className: \"tooltip\",\n [\"data-tooltip\"]: \"BoardGameGeek\",\n children: Interop_reactApi.Children.toArray([Fa_i(singleton_1(new Fa_IconOption(11, \"far fa-external-link\")), [])]),\n })]), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children)),\n })), createElement(\"div\", {\n className: \"game-breakdown\",\n children: Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: \"game-scores\",\n children: Interop_reactApi.Children.toArray([(children_2 = ofArray([createElement(\"span\", {\n children: [\"Like score: \"],\n }), (value_45 = toText(interpolate(\"%.1f%P() \", [r.LikeScore])), createElement(\"span\", {\n children: [value_45],\n }))]), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_2)),\n })), createElement(\"div\", {\n className: \"game-sub-score\",\n children: Interop_reactApi.Children.toArray([createElement(\"span\", {\n children: [\"User score: \"],\n }), (value_49 = toText(interpolate(\"%.1f%P() \", [r.UserScore])), createElement(\"span\", {\n children: [value_49],\n }))]),\n }), createElement(\"div\", {\n className: \"game-sub-score\",\n children: Interop_reactApi.Children.toArray([createElement(\"span\", {\n children: [\"Game score: \"],\n }), (value_54 = toText(interpolate(\"%.1f%P() \", [r.GameScore])), createElement(\"span\", {\n children: [value_54],\n }))]),\n })]),\n }), createElement(\"div\", {\n className: \"game-stars\",\n children: Interop_reactApi.Children.toArray([(children_4 = toList(delay(() => append(singleton(createElement(\"span\", {\n className: \"star-heading\",\n children: \"Strength: \",\n })), delay(() => renderStars(r.Strength))))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_4)),\n })), (children_6 = toList(delay(() => append(singleton(createElement(\"span\", {\n className: \"star-heading\",\n children: \"Surety: \",\n })), delay(() => renderStars(r.Surety))))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_6)),\n }))]),\n }), createElement(\"div\", {\n className: \"game-stats\",\n children: Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: \"game-stat\",\n children: Interop_reactApi.Children.toArray([(children_8 = singleton_1(Fa_i(ofArray([new Fa_IconOption(11, \"fas fa-users\"), new Fa_IconOption(0, new Fa_ISize(3))]), [])), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_8)),\n })), (value_72 = toText(interpolate(\"%s%P() Players\", [getRangeString(r.MinPlayers, r.MaxPlayers)])), createElement(\"div\", {\n children: [value_72],\n }))]),\n }), createElement(\"div\", {\n className: \"game-stat\",\n children: Interop_reactApi.Children.toArray([(children_10 = singleton_1(Fa_i(ofArray([new Fa_IconOption(11, \"far fa-stopwatch\"), new Fa_IconOption(0, new Fa_ISize(3))]), [])), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_10)),\n })), (value_76 = toText(interpolate(\"%s%P() Min\", [getRangeString(r.MinPlayingTime, r.MaxPlayingTime)])), createElement(\"div\", {\n children: [value_76],\n }))]),\n })]),\n })]),\n })]),\n })]),\n });\n}\n\nexport function render(model, dispatch) {\n const children_4 = toList(delay(() => {\n let props_5;\n return append(singleton((props_5 = ofArray([[\"className\", \"about-bar\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"a\", {\n href: \"mailto:admin@trythesegames.com\",\n className: \"contact-link\",\n children: \"Contact\",\n }), createElement(\"button\", createObj(Helpers_combineClasses(\"button\", ofArray([[\"className\", \"is-small\"], [\"className\", \"is-info\"], [\"onClick\", (_arg1) => {\n dispatch(new Msg(9));\n }], [\"children\", \"Glossary\"]])))), createElement(\"button\", createObj(Helpers_combineClasses(\"button\", ofArray([[\"className\", \"is-small\"], [\"className\", \"is-info\"], [\"onClick\", (_arg2) => {\n dispatch(new Msg(8));\n }], [\"children\", \"About\"]])))), viewLinkButton(new Page(1), [[\"className\", \"is-small\"], [\"className\", \"is-primary\"], [\"children\", \"Rankings\"]])])]]), createElement(\"div\", createObj(Helpers_combineClasses(\"container\", props_5))))), delay(() => {\n let elms;\n return append(singleton((elms = singleton_1(createElement(\"h1\", createObj(Helpers_combineClasses(\"title is-1\", ofArray([[\"className\", \"is-1\"], [\"children\", \"If you like this game...\"]]))))), createElement(\"div\", {\n className: \"container\",\n children: Interop_reactApi.Children.toArray(Array.from(elms)),\n }))), delay(() => {\n let props_10;\n return append(singleton((props_10 = ofArray([[\"className\", \"search-box\"], [\"children\", Interop_reactApi.Children.toArray([render_1(model.GameSearcher, (arg) => {\n dispatch(new Msg(0, arg));\n })])]]), createElement(\"div\", createObj(Helpers_combineClasses(\"container\", props_10))))), delay(() => {\n let matchValue, elms_1;\n return append((matchValue = model.SelectedGame, (matchValue.tag === 1) ? singleton(createElement(\"div\", {\n className: \"container\",\n children: Interop_reactApi.Children.toArray([loadingSpinner]),\n })) : ((matchValue.tag === 0) ? singleton(null) : singleton((elms_1 = singleton_1(renderSelectedGame(matchValue.fields[0])), createElement(\"div\", {\n className: \"container\",\n children: Interop_reactApi.Children.toArray(Array.from(elms_1)),\n }))))), delay(() => {\n let props_16;\n return append(singleton((props_16 = ofArray([[\"className\", \"recommendations-heading\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"h1\", createObj(Helpers_combineClasses(\"title is-1\", ofArray([[\"className\", \"is-1\"], [\"children\", \"try these games...\"]]))))])]]), createElement(\"div\", createObj(Helpers_combineClasses(\"container\", props_16))))), delay(() => {\n let matchValue_1, elms_3, props_27, props_23, props_25;\n return append((matchValue_1 = model.Recommendations, (matchValue_1.tag === 2) ? singleton((elms_3 = singleton_1((props_27 = ofArray([[\"className\", \"is-mobile\"], [\"children\", Interop_reactApi.Children.toArray([(props_23 = ofArray([[\"className\", \"is-three-fifths-fullhd\"], [\"className\", \"is-two-thirds-tablet\"], [\"className\", \"is-full-mobile\"], [\"className\", \"games-column\"], [\"children\", Interop_reactApi.Children.toArray(Array.from(toList(delay(() => {\n const matchValue_2 = model.Recommendations;\n return (matchValue_2.tag === 1) ? singleton(loadingSpinner) : ((matchValue_2.tag === 3) ? (isEmpty(matchValue_2.fields[0]) ? singleton(createElement(\"div\", createObj(Helpers_combineClasses(\"notification\", ofArray([[\"className\", \"is-info\"], [\"children\", \"Not enough data to make a recommendation\"]]))))) : (matchValue_2.fields[1] ? append(map((r_2) => renderRecommendation(r_2), matchValue_2.fields[0]), delay(() => singleton(createElement(\"div\", {\n className: \"has-text-centered\",\n children: Interop_reactApi.Children.toArray([createElement(\"button\", createObj(Helpers_combineClasses(\"button\", ofArray([[\"onClick\", (_arg3) => {\n dispatch(new Msg(2, new AsyncOperation$1(0)));\n }], [\"children\", \"Load More\"]]))))]),\n })))) : map((r_1) => renderRecommendation(r_1), matchValue_2.fields[0]))) : ((matchValue_2.tag === 2) ? append(map((r) => renderRecommendation(r), matchValue_2.fields[0]), delay(() => singleton(loadingSpinner))) : singleton(null)));\n }))))]]), createElement(\"div\", createObj(Helpers_combineClasses(\"column\", props_23)))), (props_25 = ofArray([[\"className\", \"filter-column\"], [\"className\", \"is-two-fifths-fullhd\"], [\"className\", \"is-one-third-tablet\"], [\"children\", Interop_reactApi.Children.toArray([render_2(model.RecommendationFilter, (arg_1) => {\n dispatch(new Msg(1, arg_1));\n })])]]), createElement(\"div\", createObj(Helpers_combineClasses(\"column\", props_25))))])]]), createElement(\"div\", createObj(Helpers_combineClasses(\"columns\", props_27))))), createElement(\"div\", {\n className: \"container\",\n children: Interop_reactApi.Children.toArray(Array.from(elms_3)),\n }))) : ((matchValue_1.tag === 3) ? singleton((elms_3 = singleton_1((props_27 = ofArray([[\"className\", \"is-mobile\"], [\"children\", Interop_reactApi.Children.toArray([(props_23 = ofArray([[\"className\", \"is-three-fifths-fullhd\"], [\"className\", \"is-two-thirds-tablet\"], [\"className\", \"is-full-mobile\"], [\"className\", \"games-column\"], [\"children\", Interop_reactApi.Children.toArray(Array.from(toList(delay(() => {\n const matchValue_2 = model.Recommendations;\n return (matchValue_2.tag === 1) ? singleton(loadingSpinner) : ((matchValue_2.tag === 3) ? (isEmpty(matchValue_2.fields[0]) ? singleton(createElement(\"div\", createObj(Helpers_combineClasses(\"notification\", ofArray([[\"className\", \"is-info\"], [\"children\", \"Not enough data to make a recommendation\"]]))))) : (matchValue_2.fields[1] ? append(map((r_2) => renderRecommendation(r_2), matchValue_2.fields[0]), delay(() => singleton(createElement(\"div\", {\n className: \"has-text-centered\",\n children: Interop_reactApi.Children.toArray([createElement(\"button\", createObj(Helpers_combineClasses(\"button\", ofArray([[\"onClick\", (_arg3) => {\n dispatch(new Msg(2, new AsyncOperation$1(0)));\n }], [\"children\", \"Load More\"]]))))]),\n })))) : map((r_1) => renderRecommendation(r_1), matchValue_2.fields[0]))) : ((matchValue_2.tag === 2) ? append(map((r) => renderRecommendation(r), matchValue_2.fields[0]), delay(() => singleton(loadingSpinner))) : singleton(null)));\n }))))]]), createElement(\"div\", createObj(Helpers_combineClasses(\"column\", props_23)))), (props_25 = ofArray([[\"className\", \"filter-column\"], [\"className\", \"is-two-fifths-fullhd\"], [\"className\", \"is-one-third-tablet\"], [\"children\", Interop_reactApi.Children.toArray([render_2(model.RecommendationFilter, (arg_1) => {\n dispatch(new Msg(1, arg_1));\n })])]]), createElement(\"div\", createObj(Helpers_combineClasses(\"column\", props_25))))])]]), createElement(\"div\", createObj(Helpers_combineClasses(\"columns\", props_27))))), createElement(\"div\", {\n className: \"container\",\n children: Interop_reactApi.Children.toArray(Array.from(elms_3)),\n }))) : ((matchValue_1.tag === 0) ? singleton(null) : singleton((elms_3 = singleton_1((props_27 = ofArray([[\"className\", \"is-mobile\"], [\"children\", Interop_reactApi.Children.toArray([(props_23 = ofArray([[\"className\", \"is-three-fifths-fullhd\"], [\"className\", \"is-two-thirds-tablet\"], [\"className\", \"is-full-mobile\"], [\"className\", \"games-column\"], [\"children\", Interop_reactApi.Children.toArray(Array.from(toList(delay(() => {\n const matchValue_2 = model.Recommendations;\n return (matchValue_2.tag === 1) ? singleton(loadingSpinner) : ((matchValue_2.tag === 3) ? (isEmpty(matchValue_2.fields[0]) ? singleton(createElement(\"div\", createObj(Helpers_combineClasses(\"notification\", ofArray([[\"className\", \"is-info\"], [\"children\", \"Not enough data to make a recommendation\"]]))))) : (matchValue_2.fields[1] ? append(map((r_2) => renderRecommendation(r_2), matchValue_2.fields[0]), delay(() => singleton(createElement(\"div\", {\n className: \"has-text-centered\",\n children: Interop_reactApi.Children.toArray([createElement(\"button\", createObj(Helpers_combineClasses(\"button\", ofArray([[\"onClick\", (_arg3) => {\n dispatch(new Msg(2, new AsyncOperation$1(0)));\n }], [\"children\", \"Load More\"]]))))]),\n })))) : map((r_1) => renderRecommendation(r_1), matchValue_2.fields[0]))) : ((matchValue_2.tag === 2) ? append(map((r) => renderRecommendation(r), matchValue_2.fields[0]), delay(() => singleton(loadingSpinner))) : singleton(null)));\n }))))]]), createElement(\"div\", createObj(Helpers_combineClasses(\"column\", props_23)))), (props_25 = ofArray([[\"className\", \"filter-column\"], [\"className\", \"is-two-fifths-fullhd\"], [\"className\", \"is-one-third-tablet\"], [\"children\", Interop_reactApi.Children.toArray([render_2(model.RecommendationFilter, (arg_1) => {\n dispatch(new Msg(1, arg_1));\n })])]]), createElement(\"div\", createObj(Helpers_combineClasses(\"column\", props_25))))])]]), createElement(\"div\", createObj(Helpers_combineClasses(\"columns\", props_27))))), createElement(\"div\", {\n className: \"container\",\n children: Interop_reactApi.Children.toArray(Array.from(elms_3)),\n })))))), delay(() => append(singleton(moreInfoModal(model.MoreInfoModalActive, (_arg4) => {\n dispatch(new Msg(8));\n })), delay(() => singleton(recommendationsGlossaryModal(model.GlossaryModalActive, (_arg5) => {\n dispatch(new Msg(9));\n }))))));\n }));\n }));\n }));\n }));\n }));\n }));\n return createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_4)),\n });\n}\n\n","import { empty, singleton, append, delay, toList } from \"./.fable/fable-library.3.1.12/Seq.js\";\nimport { Interop_reactApi } from \"./.fable/Feliz.1.49.0/Interop.fs.js\";\nimport { createElement } from \"react\";\nimport { createObj } from \"./.fable/fable-library.3.1.12/Util.js\";\nimport { Helpers_combineClasses } from \"./.fable/Feliz.Bulma.2.17.0/ElementBuilders.fs.js\";\nimport { ofArray, singleton as singleton_1 } from \"./.fable/fable-library.3.1.12/List.js\";\n\nexport function recommendationsGlossaryModal(isActive, close) {\n const props_24 = toList(delay(() => append(isActive ? singleton([\"className\", \"is-active\"]) : empty(), delay(() => {\n let elms_1, elms, props_21;\n return singleton([\"children\", Interop_reactApi.Children.toArray([createElement(\"div\", createObj(Helpers_combineClasses(\"modal-background\", singleton_1([\"onClick\", close])))), (elms_1 = ofArray([(elms = ofArray([createElement(\"p\", {\n className: \"modal-card-title\",\n children: \"Glossary\",\n }), createElement(\"button\", createObj(Helpers_combineClasses(\"delete\", singleton_1([\"onClick\", close]))))]), createElement(\"header\", {\n className: \"modal-card-head\",\n children: Interop_reactApi.Children.toArray(Array.from(elms)),\n })), (props_21 = ofArray([[\"className\", \"more-info-body\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"dl\", {\n className: \"glossary\",\n children: Interop_reactApi.Children.toArray([createElement(\"dt\", {\n children: [\"Average rating time trend\"],\n }), createElement(\"dd\", {\n children: [\"The best fitting polynomial of order 4 or less is used to show the time trend of the ratings.\\n This is adequate to show the general shape of the time trend, but regions where the curvature is shallow\\n (range less than 0.2) may actually be a plateau. Note: if the density of ratings at the start or end of\\n a game\\u0027s time range is low, these are removed from this plot as they could be too influential otherwise.\"],\n }), createElement(\"dt\", {\n children: [\"Linked items\"],\n }), createElement(\"dd\", {\n children: [\"Games listed by BoardGameGeek as being linked.\"],\n }), createElement(\"dt\", {\n children: [\"Like score\"],\n }), createElement(\"dd\", {\n children: [\"A \\\"Bayesian average\\\" of the User and Game scores weighted by their relative precision.\"],\n }), createElement(\"dt\", {\n children: [\"User score\"],\n }), createElement(\"dd\", {\n children: [\"A score based on the ratings difference between those who liked the selected game and those who did not like it or have not rated it.\"],\n }), createElement(\"dt\", {\n children: [\"Game score\"],\n }), createElement(\"dd\", {\n children: [\"A score based on the shared attributes of the recommended game and selected game, which represents the information available prior to anyone playing the game.\"],\n }), createElement(\"dt\", {\n children: [\"Strength\"],\n }), createElement(\"dd\", {\n children: [\"The Like Score is used to create a 3-star rating system denoting the strength of the recommendations.\"],\n }), createElement(\"dt\", {\n children: [\"Surety\"],\n }), createElement(\"dd\", {\n children: [\"The reliability of the Like Score value depends on the number of raters and the variation in their ratings. A 3-star rating system denotes how sure you can be in the Like Score value.\"],\n })]),\n })])]]), createElement(\"section\", createObj(Helpers_combineClasses(\"modal-card-body\", props_21))))]), createElement(\"div\", {\n className: \"modal-card\",\n children: Interop_reactApi.Children.toArray(Array.from(elms_1)),\n }))])]);\n }))));\n return createElement(\"div\", createObj(Helpers_combineClasses(\"modal\", props_24)));\n}\n\nexport function rankingsGlossaryModal(isActive, close) {\n const props_36 = toList(delay(() => append(isActive ? singleton([\"className\", \"is-active\"]) : empty(), delay(() => {\n let elms_2, elms, props_33, children_16, elms_1, children_3, children_1, children_13, children_5, children_7, children_9, children_11;\n return singleton([\"children\", Interop_reactApi.Children.toArray([createElement(\"div\", createObj(Helpers_combineClasses(\"modal-background\", singleton_1([\"onClick\", close])))), (elms_2 = ofArray([(elms = ofArray([createElement(\"p\", {\n className: \"modal-card-title\",\n children: \"Glossary\",\n }), createElement(\"button\", createObj(Helpers_combineClasses(\"delete\", singleton_1([\"onClick\", close]))))]), createElement(\"header\", {\n className: \"modal-card-head\",\n children: Interop_reactApi.Children.toArray(Array.from(elms)),\n })), (props_33 = ofArray([[\"className\", \"more-info-body\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"dl\", {\n className: \"glossary\",\n children: Interop_reactApi.Children.toArray([createElement(\"dt\", {\n children: [\"Average rating time trend\"],\n }), createElement(\"dd\", {\n children: [\"The best fitting polynomial of order 4 or less is used to show the time trend of the ratings.\\n This is adequate to show the general shape of the time trend, but regions where the curvature is shallow\\n (range less than 0.2) may actually be a plateau. Note: if the density of ratings at the start or end of\\n a game\\u0027s time range is low, these are removed from this plot as they could be too influential otherwise.\\n Only visible at resolutions of 1024px and wider.\"],\n }), createElement(\"dt\", {\n children: [\"Time period\"],\n }), createElement(\"dd\", {\n children: [\"If \\\"All\\\" is not selected then only the most recent ratings are used to rank the games.\\n The purpose of this setting is to allow games that are currently popular to be identified.\\n If combined with a \\\"New game adjustment\\\" then it can be used to identify games that have survived\\n the test of time.\"],\n }), createElement(\"dt\", {\n children: [\"New game adjustment\"],\n }), createElement(\"dd\", {\n children: [\"If \\\"None\\\" is not selected then the games with less than 10 years of ratings data use a prediction\\n of the mean rating for that game after it would have 10 years of ratings. A statistical analysis of the\\n BGG database was undertaken to derive multiple regression models that provide these predictions. As it\\n showed that most games become less popular over time, this will penalise games with only a few years\\u0027\\n worth of ratings. As the number of years gets closer to 10 this adjustment will have less impact. The\\n \\\"Base\\\" adjustment gives an \\\"unbiased\\\" prediction, with \\\"Mild\\\", \\\"Moderate\\\" and \\\"Severe\\\" adjustments\\n reducing the predictions by one, two or three standard errors respectively. The purpose of this adjustment\\n is to try and eliminate the \\\"Cult of the New\\\" effect.\"],\n }), createElement(\"dt\", {\n children: [\"Pseudo raters\"],\n }), (children_16 = ofArray([\"This is the same as is used by BGG, being the number of additional pseudo raters of 5.5\\n that are included in the calculation. Based on a statistical analysis of the BGG database\\n (2022 December), a value of 2100 is recommended to most closely mimic the BGG rankings. It is not\\n possible to replicate exactly because BGG pre-process the ratings in an unspecified manner in an\\n attempt to minimise the influence of shillers. We also use an algorithm to remove very early,\\n typically pre-release, raters which are identified by their relatively low \\\"temporal density\\\".\\n We also remove raters who do not discriminate between the games they rank as these appear to be\\n mainly users who are not using the ratings as intended. Our recommendations for all Time Period\\n settings are:\", (elms_1 = ofArray([(children_3 = singleton_1((children_1 = ofArray([createElement(\"th\", {\n children: [\"Time Period\"],\n }), createElement(\"th\", {\n children: [\"Pseudo-Raters\"],\n })]), createElement(\"tr\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_1)),\n }))), createElement(\"thead\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_3)),\n })), (children_13 = ofArray([(children_5 = ofArray([createElement(\"td\", {\n children: [\"All\"],\n }), createElement(\"td\", {\n children: [\"2100\"],\n })]), createElement(\"tr\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_5)),\n })), (children_7 = ofArray([createElement(\"td\", {\n children: [\"4 years\"],\n }), createElement(\"td\", {\n children: [\"1700\"],\n })]), createElement(\"tr\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_7)),\n })), (children_9 = ofArray([createElement(\"td\", {\n children: [\"2 years\"],\n }), createElement(\"td\", {\n children: [\"1000\"],\n })]), createElement(\"tr\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_9)),\n })), (children_11 = ofArray([createElement(\"td\", {\n children: [\"1 year\"],\n }), createElement(\"td\", {\n children: [\"500\"],\n })]), createElement(\"tr\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_11)),\n }))]), createElement(\"tbody\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_13)),\n }))]), createElement(\"table\", {\n className: \"table\",\n children: Interop_reactApi.Children.toArray(Array.from(elms_1)),\n })), \"Note that BGG periodically update the number of pseudo-raters they use.\\n We estimate this has increased by about 15% over the last 2 years.\"]), createElement(\"dd\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_16)),\n }))]),\n })])]]), createElement(\"section\", createObj(Helpers_combineClasses(\"modal-card-body\", props_33))))]), createElement(\"div\", {\n className: \"modal-card\",\n children: Interop_reactApi.Children.toArray(Array.from(elms_2)),\n }))])]);\n }))));\n return createElement(\"div\", createObj(Helpers_combineClasses(\"modal\", props_36)));\n}\n\nexport function moreInfoModal(isActive, closeDisplay) {\n const props_16 = toList(delay(() => append(isActive ? singleton([\"className\", \"is-active\"]) : empty(), delay(() => {\n let elms_1, elms, props_13, children_1;\n return singleton([\"children\", Interop_reactApi.Children.toArray([createElement(\"div\", createObj(Helpers_combineClasses(\"modal-background\", singleton_1([\"onClick\", closeDisplay])))), (elms_1 = ofArray([(elms = ofArray([createElement(\"p\", {\n className: \"modal-card-title\",\n children: \"What\\u0027s it doing?\",\n }), createElement(\"button\", createObj(Helpers_combineClasses(\"delete\", singleton_1([\"onClick\", closeDisplay]))))]), createElement(\"header\", {\n className: \"modal-card-head\",\n children: Interop_reactApi.Children.toArray(Array.from(elms)),\n })), (props_13 = ofArray([[\"className\", \"more-info-body\"], [\"children\", Interop_reactApi.Children.toArray([(children_1 = ofArray([createElement(\"span\", {\n children: [\"An article describing how this recommender system was created was published in\\n Significance, the magazine of the Royal Statistical Society and American Statistical Association\"],\n }), createElement(\"a\", {\n href: \"https://rss.onlinelibrary.wiley.com/doi/10.1111/j.1740-9713.2019.01317.x\",\n rel: \"noopener\",\n target: \"_blank\",\n children: \"https://rss.onlinelibrary.wiley.com/doi/10.1111/j.1740-9713.2019.01317.x\",\n })]), createElement(\"p\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_1)),\n })), createElement(\"p\", {\n children: [\"Imagine you have just finished playing a boardgame that you really enjoyed and asked those around you if they could recommend another game.\\n Recommendations are likely to be more reliable if they come from someone who also enjoy the game you have just played, and they have a broad\\n knowledge of other board games. If you could ask thousands of people who have played the game and collate their responses, taking account\\n of whether they did or did not like the game, it should be possible to devise a useful recommendation algorithm. This application does this\\n by utilising the ratings given by users of the BoardGameGeek website.\"],\n }), createElement(\"p\", {\n children: [\"The method recommends those games that provide the biggest ratings contrast between those users who enjoyed the original game and those who\\n either did not enjoy it or have not rated it. This contrast is scaled to lie approximately on the 0 to 10 range and shown as the User Score.\\n The User Score is also adjusted to remove an unwanted bias that is evident between games published in a similar time period. Clearly the more\\n users who have rated both games, the more reliable will be the User Score. A Bayesian method has been used to combine information available\\n prior to anyone playing the game with the information contained in the ratings data. This prior information comes from the attributes of each\\n game, such as the designer, mechanics and playing time. The Game Score, scaled to be comparable to the User Score, quantifies the prior\\n information. The Bayesian method combines these scores, weighting them according to the relative precisions of the User and Game Scores, to\\n give the Like Score. It is this value that is used to order the recommendations.\"],\n }), createElement(\"p\", {\n children: [\"The Like Scores are also used to provide a Strength rating, with 3 stars implying a strong recommendation. Clearly it is not possible for the\\n algorithm to know which aspects of the game particularly appealed to you, so there can be no guarantee that any of the recommendations will\\n be good for you. All that can be inferred is that the games recommended are liked significantly more by those who liked the original game\\n than those who did not like it or have not rated it. Also, games are only recommended if those who liked the original game gave it a good\\n rating (\\u003e7) on average.\"],\n }), createElement(\"p\", {\n children: [\"As well as computing the Like Score the Bayesian method also computes the precision of this score. A Surety rating is provided that represents\\n this precision. A Surety of 3-stars implies high precision and so one can be confident in the reliability of the Like Score. Typically, low\\n Surety ratings will be associated with those games that have had relatively few user ratings.\"],\n })])]]), createElement(\"section\", createObj(Helpers_combineClasses(\"modal-card-body\", props_13))))]), createElement(\"div\", {\n className: \"modal-card\",\n children: Interop_reactApi.Children.toArray(Array.from(elms_1)),\n }))])]);\n }))));\n return createElement(\"div\", createObj(Helpers_combineClasses(\"modal\", props_16)));\n}\n\n","import { NewGameAdjustment$reflection, RankingTimePeriod$reflection, NewGameAdjustment as NewGameAdjustment_1, RankingTimePeriod } from \"../../TryTheseGames.Website.Shared/Shared.fs.js\";\nimport { join, interpolate, toText } from \"../.fable/fable-library.3.1.12/String.js\";\nimport { Record } from \"../.fable/fable-library.3.1.12/Types.js\";\nimport { record_type, option_type, int32_type } from \"../.fable/fable-library.3.1.12/Reflection.js\";\nimport { map as map_1, defaultArgWith } from \"../.fable/fable-library.3.1.12/Option.js\";\nimport { Option_toString, intTryParse } from \"../Helpers.fs.js\";\nimport { React_memo_62A0F746 } from \"../.fable/Feliz.1.49.0/React.fs.js\";\nimport { Interop_reactApi } from \"../.fable/Feliz.1.49.0/Interop.fs.js\";\nimport { createElement } from \"react\";\nimport { Fa_IconOption, Fa_i } from \"../.fable/Fable.FontAwesome.2.0.0/FontAwesome.fs.js\";\nimport { map as map_3, append, singleton, delay, toList } from \"../.fable/fable-library.3.1.12/Seq.js\";\nimport { Helpers_combineClasses, Helpers_extractClasses } from \"../.fable/Feliz.Bulma.2.17.0/ElementBuilders.fs.js\";\nimport { Browser_Types_Event__Event_get_Value } from \"../.fable/Fable.React.7.4.1/Fable.React.Extensions.fs.js\";\nimport { singleton as singleton_1, cons, ofArray, map as map_2 } from \"../.fable/fable-library.3.1.12/List.js\";\nimport { int32ToString, createObj } from \"../.fable/fable-library.3.1.12/Util.js\";\nimport { Input_NonEmptyNumber } from \"../Components.fs.js\";\nimport { Helpers_equalsButFunctions } from \"../.fable/Fable.React.7.4.1/Fable.React.Helpers.fs.js\";\n\nexport function RankingTimePeriod_toDisplayString(_arg1) {\n switch (_arg1.tag) {\n case 1: {\n return \"One year\";\n }\n case 2: {\n return \"Two years\";\n }\n case 3: {\n return \"Four years\";\n }\n default: {\n return \"All\";\n }\n }\n}\n\nexport function RankingTimePeriod_fromString(_arg1) {\n switch (_arg1) {\n case \"All\": {\n return new RankingTimePeriod(0);\n }\n case \"One year\": {\n return new RankingTimePeriod(1);\n }\n case \"Two years\": {\n return new RankingTimePeriod(2);\n }\n case \"Four years\": {\n return new RankingTimePeriod(3);\n }\n default: {\n throw (new Error(toText(interpolate(\"Unknown %P()\", [\"RankingTimePeriod\"]))));\n }\n }\n}\n\nexport function NewGameAdjustment_toDisplayString(_arg1) {\n switch (_arg1.tag) {\n case 1: {\n return \"Base\";\n }\n case 2: {\n return \"Mild\";\n }\n case 3: {\n return \"Moderate\";\n }\n case 4: {\n return \"Severe\";\n }\n default: {\n return \"None\";\n }\n }\n}\n\nexport function NewGameAdjustment_fromString(_arg1) {\n switch (_arg1) {\n case \"None\": {\n return new NewGameAdjustment_1(0);\n }\n case \"Base\": {\n return new NewGameAdjustment_1(1);\n }\n case \"Mild\": {\n return new NewGameAdjustment_1(2);\n }\n case \"Moderate\": {\n return new NewGameAdjustment_1(3);\n }\n case \"Severe\": {\n return new NewGameAdjustment_1(4);\n }\n default: {\n throw (new Error(toText(interpolate(\"Unknown %P()\", [\"NewGameAdjustment\"]))));\n }\n }\n}\n\nexport class RankingFilterModel extends Record {\n constructor(TimePeriod, NewGameAdjustment, PseudoRaters, PlayerCount, MinPlayTime, MaxPlayTime, MinPublishYear, MaxPublishYear, HasMechanic, HasCategory) {\n super();\n this.TimePeriod = TimePeriod;\n this.NewGameAdjustment = NewGameAdjustment;\n this.PseudoRaters = (PseudoRaters | 0);\n this.PlayerCount = PlayerCount;\n this.MinPlayTime = MinPlayTime;\n this.MaxPlayTime = MaxPlayTime;\n this.MinPublishYear = MinPublishYear;\n this.MaxPublishYear = MaxPublishYear;\n this.HasMechanic = HasMechanic;\n this.HasCategory = HasCategory;\n }\n}\n\nexport function RankingFilterModel$reflection() {\n return record_type(\"Client.Ranking.RankingFilter.RankingFilterModel\", [], RankingFilterModel, () => [[\"TimePeriod\", RankingTimePeriod$reflection()], [\"NewGameAdjustment\", NewGameAdjustment$reflection()], [\"PseudoRaters\", int32_type], [\"PlayerCount\", option_type(int32_type)], [\"MinPlayTime\", option_type(int32_type)], [\"MaxPlayTime\", option_type(int32_type)], [\"MinPublishYear\", option_type(int32_type)], [\"MaxPublishYear\", option_type(int32_type)], [\"HasMechanic\", option_type(int32_type)], [\"HasCategory\", option_type(int32_type)]]);\n}\n\nexport function withNewTimePeriod(filter, newTimePeriod) {\n return new RankingFilterModel(RankingTimePeriod_fromString(newTimePeriod), filter.NewGameAdjustment, filter.PseudoRaters, filter.PlayerCount, filter.MinPlayTime, filter.MaxPlayTime, filter.MinPublishYear, filter.MaxPublishYear, filter.HasMechanic, filter.HasCategory);\n}\n\nexport function withNewNewGameAdjustment(filter, newAdjustment) {\n return new RankingFilterModel(filter.TimePeriod, NewGameAdjustment_fromString(newAdjustment), filter.PseudoRaters, filter.PlayerCount, filter.MinPlayTime, filter.MaxPlayTime, filter.MinPublishYear, filter.MaxPublishYear, filter.HasMechanic, filter.HasCategory);\n}\n\nexport function withNewPseudoRaters(filter, newPenalty) {\n return new RankingFilterModel(filter.TimePeriod, filter.NewGameAdjustment, defaultArgWith(map_1((value) => (~(~value)), newPenalty), () => {\n const matchValue = filter.TimePeriod;\n switch (matchValue.tag) {\n case 1: {\n return 500;\n }\n case 2: {\n return 1000;\n }\n case 3: {\n return 1700;\n }\n default: {\n return 2100;\n }\n }\n }), filter.PlayerCount, filter.MinPlayTime, filter.MaxPlayTime, filter.MinPublishYear, filter.MaxPublishYear, filter.HasMechanic, filter.HasCategory);\n}\n\nexport function withNewPlayerCount(filter, newCount) {\n return new RankingFilterModel(filter.TimePeriod, filter.NewGameAdjustment, filter.PseudoRaters, intTryParse(newCount), filter.MinPlayTime, filter.MaxPlayTime, filter.MinPublishYear, filter.MaxPublishYear, filter.HasMechanic, filter.HasCategory);\n}\n\nexport function withNewMinPlayTime(filter, newMinPlayTime) {\n return new RankingFilterModel(filter.TimePeriod, filter.NewGameAdjustment, filter.PseudoRaters, filter.PlayerCount, intTryParse(newMinPlayTime), filter.MaxPlayTime, filter.MinPublishYear, filter.MaxPublishYear, filter.HasMechanic, filter.HasCategory);\n}\n\nexport function withNewMaxPlayTime(filter, newMaxPlayTime) {\n return new RankingFilterModel(filter.TimePeriod, filter.NewGameAdjustment, filter.PseudoRaters, filter.PlayerCount, filter.MinPlayTime, intTryParse(newMaxPlayTime), filter.MinPublishYear, filter.MaxPublishYear, filter.HasMechanic, filter.HasCategory);\n}\n\nexport function withNewMinPublishYear(filter, newMinPublishYear) {\n return new RankingFilterModel(filter.TimePeriod, filter.NewGameAdjustment, filter.PseudoRaters, filter.PlayerCount, filter.MinPlayTime, filter.MaxPlayTime, intTryParse(newMinPublishYear), filter.MaxPublishYear, filter.HasMechanic, filter.HasCategory);\n}\n\nexport function withNewMaxPublishYear(filter, newMaxPublishYear) {\n return new RankingFilterModel(filter.TimePeriod, filter.NewGameAdjustment, filter.PseudoRaters, filter.PlayerCount, filter.MinPlayTime, filter.MaxPlayTime, filter.MinPublishYear, intTryParse(newMaxPublishYear), filter.HasMechanic, filter.HasCategory);\n}\n\nexport function withNewHasCategory(filter, newHasCategory) {\n return new RankingFilterModel(filter.TimePeriod, filter.NewGameAdjustment, filter.PseudoRaters, filter.PlayerCount, filter.MinPlayTime, filter.MaxPlayTime, filter.MinPublishYear, filter.MaxPublishYear, filter.HasMechanic, intTryParse(newHasCategory));\n}\n\nexport function withNewHasMechanic(filter, newHasMechanic) {\n return new RankingFilterModel(filter.TimePeriod, filter.NewGameAdjustment, filter.PseudoRaters, filter.PlayerCount, filter.MinPlayTime, filter.MaxPlayTime, filter.MinPublishYear, filter.MaxPublishYear, intTryParse(newHasMechanic), filter.HasCategory);\n}\n\nexport function onQueryPropChanged(onChange, filter, map, prop) {\n return onChange(map(filter, prop));\n}\n\nexport const rankingFilter = React_memo_62A0F746((props) => {\n let children_2, props_11, children, patternInput, children_6, props_21, children_4, patternInput_1, children_8, props_25, children_10, props_31, props_29, children_12, props_37, props_35, children_14, props_43, props_41, children_16, props_50, props_48, children_18, props_56, props_54, children_22, props_68, children_20, patternInput_2, matchValue, children_26, props_79, children_24, patternInput_3, matchValue_1;\n const props_89 = ofArray([[\"className\", props.MobileFilterOpen ? \"filter-box open\" : \"filter-box\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: \"mobile-filter-button\",\n onClick: (_arg1) => {\n props.OnMobileFilterToggled();\n },\n children: Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: \"mobile-filter-button-text\",\n children: Interop_reactApi.Children.toArray([Fa_i(toList(delay(() => (props.MobileFilterOpen ? singleton(new Fa_IconOption(11, \"fas fa-chevron-double-down\")) : singleton(new Fa_IconOption(11, \"fas fa-chevron-double-up\"))))), []), createElement(\"span\", {\n children: [\"Filter\"],\n }), Fa_i(toList(delay(() => (props.MobileFilterOpen ? singleton(new Fa_IconOption(11, \"fas fa-chevron-double-down\")) : singleton(new Fa_IconOption(11, \"fas fa-chevron-double-up\"))))), [])]),\n })]),\n }), createElement(\"div\", {\n className: \"filter-container\",\n children: Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: \"filter-options filter-subcontainer\",\n children: Interop_reactApi.Children.toArray([(children_2 = singleton_1((props_11 = ofArray([[\"htmlFor\", \"timePeriod\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"span\", {\n children: [\"Time period\"],\n }), (children = singleton_1((patternInput = Helpers_extractClasses(ofArray([[\"className\", \"is-fullwidth\"], [\"value\", RankingTimePeriod_toDisplayString(props.Filter.TimePeriod)], [\"onChange\", (e) => onQueryPropChanged(props.OnFilterUpdated, props.Filter, (filter_1, newTimePeriod) => withNewTimePeriod(filter_1, newTimePeriod), Browser_Types_Event__Event_get_Value(e))], [\"children\", Interop_reactApi.Children.toArray(Array.from(toList(delay(() => map_2((v) => createElement(\"option\", {\n value: v,\n children: v,\n }), map_2((_arg1_2) => RankingTimePeriod_toDisplayString(_arg1_2), ofArray([new RankingTimePeriod(0), new RankingTimePeriod(1), new RankingTimePeriod(2), new RankingTimePeriod(3)])))))))]])), createElement(\"div\", {\n className: join(\" \", cons(\"select\", patternInput[0])),\n children: Interop_reactApi.Children.toArray([createElement(\"select\", createObj(patternInput[1]))]),\n }))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children)),\n }))])]]), createElement(\"label\", createObj(Helpers_combineClasses(\"label\", props_11))))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_2)),\n })), (children_6 = singleton_1((props_21 = ofArray([[\"htmlFor\", \"newGameAdjustment\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"span\", {\n children: [\"New game adjustment\"],\n }), (children_4 = singleton_1((patternInput_1 = Helpers_extractClasses(ofArray([[\"className\", \"is-fullwidth\"], [\"value\", NewGameAdjustment_toDisplayString(props.Filter.NewGameAdjustment)], [\"onChange\", (e_1) => onQueryPropChanged(props.OnFilterUpdated, props.Filter, (filter_3, newAdjustment) => withNewNewGameAdjustment(filter_3, newAdjustment), Browser_Types_Event__Event_get_Value(e_1))], [\"children\", Interop_reactApi.Children.toArray(Array.from(toList(delay(() => map_2((v_1) => createElement(\"option\", {\n value: v_1,\n children: v_1,\n }), map_2((_arg1_4) => NewGameAdjustment_toDisplayString(_arg1_4), ofArray([new NewGameAdjustment_1(0), new NewGameAdjustment_1(1), new NewGameAdjustment_1(2), new NewGameAdjustment_1(3), new NewGameAdjustment_1(4)])))))))]])), createElement(\"div\", {\n className: join(\" \", cons(\"select\", patternInput_1[0])),\n children: Interop_reactApi.Children.toArray([createElement(\"select\", createObj(patternInput_1[1]))]),\n }))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_4)),\n }))])]]), createElement(\"label\", createObj(Helpers_combineClasses(\"label\", props_21))))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_6)),\n })), (children_8 = singleton_1((props_25 = ofArray([[\"htmlFor\", \"pseudoRaters\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"span\", {\n children: [\"Pseudo raters\"],\n }), createElement(Input_NonEmptyNumber, {\n Id: \"pseudoRaters\",\n OnChange: (prop_2) => onQueryPropChanged(props.OnFilterUpdated, props.Filter, (filter_5, newPenalty) => withNewPseudoRaters(filter_5, newPenalty), prop_2),\n Step: 100,\n Value: props.Filter.PseudoRaters,\n })])]]), createElement(\"label\", createObj(Helpers_combineClasses(\"label\", props_25))))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_8)),\n })), (children_10 = singleton_1((props_31 = ofArray([[\"htmlFor\", \"players\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"span\", {\n children: [\"Number of players\"],\n }), (props_29 = ofArray([[\"id\", \"players\"], [\"placeholder\", \"Any\"], [\"onChange\", (ev) => onQueryPropChanged(props.OnFilterUpdated, props.Filter, (filter_7, newCount) => withNewPlayerCount(filter_7, newCount), ev.target.value)], [\"value\", Option_toString(props.Filter.PlayerCount)]]), createElement(\"input\", createObj(cons([\"type\", \"number\"], Helpers_combineClasses(\"input\", props_29)))))])]]), createElement(\"label\", createObj(Helpers_combineClasses(\"label\", props_31))))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_10)),\n })), createElement(\"div\", {\n className: \"range-input\",\n children: Interop_reactApi.Children.toArray([(children_12 = singleton_1((props_37 = ofArray([[\"htmlFor\", \"minPlayTime\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"span\", {\n children: [\"Min play time (mins)\"],\n }), (props_35 = ofArray([[\"id\", \"minPlayTime\"], [\"placeholder\", \"No Min\"], [\"onChange\", (ev_1) => onQueryPropChanged(props.OnFilterUpdated, props.Filter, (filter_9, newMinPlayTime) => withNewMinPlayTime(filter_9, newMinPlayTime), ev_1.target.value)], [\"value\", Option_toString(props.Filter.MinPlayTime)]]), createElement(\"input\", createObj(cons([\"type\", \"number\"], Helpers_combineClasses(\"input\", props_35)))))])]]), createElement(\"label\", createObj(Helpers_combineClasses(\"label\", props_37))))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_12)),\n })), (children_14 = singleton_1((props_43 = ofArray([[\"htmlFor\", \"maxPlayTime\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"span\", {\n children: \"Max play time (mins)\",\n }), (props_41 = ofArray([[\"id\", \"maxPlayTime\"], [\"placeholder\", \"No Max\"], [\"onChange\", (ev_2) => onQueryPropChanged(props.OnFilterUpdated, props.Filter, (filter_11, newMaxPlayTime) => withNewMaxPlayTime(filter_11, newMaxPlayTime), ev_2.target.value)], [\"value\", Option_toString(props.Filter.MaxPlayTime)]]), createElement(\"input\", createObj(cons([\"type\", \"number\"], Helpers_combineClasses(\"input\", props_41)))))])]]), createElement(\"label\", createObj(Helpers_combineClasses(\"label\", props_43))))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_14)),\n }))]),\n }), createElement(\"div\", {\n className: \"range-input\",\n children: Interop_reactApi.Children.toArray([(children_16 = singleton_1((props_50 = ofArray([[\"htmlFor\", \"publishedAfter\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"span\", {\n children: [\"Published after year\"],\n }), (props_48 = ofArray([[\"id\", \"publishedAfter\"], [\"placeholder\", \"The beginning of time\"], [\"onChange\", (ev_3) => onQueryPropChanged(props.OnFilterUpdated, props.Filter, (filter_13, newMinPublishYear) => withNewMinPublishYear(filter_13, newMinPublishYear), ev_3.target.value)], [\"value\", Option_toString(props.Filter.MinPublishYear)]]), createElement(\"input\", createObj(cons([\"type\", \"number\"], Helpers_combineClasses(\"input\", props_48)))))])]]), createElement(\"label\", createObj(Helpers_combineClasses(\"label\", props_50))))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_16)),\n })), (children_18 = singleton_1((props_56 = ofArray([[\"htmlFor\", \"publishedBefore\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"span\", {\n children: [\"Published before year\"],\n }), (props_54 = ofArray([[\"id\", \"publishedBefore\"], [\"placeholder\", \"Today\"], [\"onChange\", (ev_4) => onQueryPropChanged(props.OnFilterUpdated, props.Filter, (filter_15, newMaxPublishYear) => withNewMaxPublishYear(filter_15, newMaxPublishYear), ev_4.target.value)], [\"value\", Option_toString(props.Filter.MaxPublishYear)]]), createElement(\"input\", createObj(cons([\"type\", \"number\"], Helpers_combineClasses(\"input\", props_54)))))])]]), createElement(\"label\", createObj(Helpers_combineClasses(\"label\", props_56))))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_18)),\n }))]),\n }), (children_22 = singleton_1((props_68 = ofArray([[\"htmlFor\", \"hasMechanic\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"span\", {\n children: [\"Has mechanic\"],\n }), (children_20 = singleton_1((patternInput_2 = Helpers_extractClasses(ofArray([[\"className\", \"is-fullwidth\"], [\"value\", (matchValue = props.Filter.HasMechanic, (matchValue == null) ? \"\" : int32ToString(matchValue))], [\"onChange\", (e_2) => onQueryPropChanged(props.OnFilterUpdated, props.Filter, (filter_17, newHasMechanic) => withNewHasMechanic(filter_17, newHasMechanic), Browser_Types_Event__Event_get_Value(e_2))], [\"children\", Interop_reactApi.Children.toArray(Array.from(toList(delay(() => append(singleton(createElement(\"option\", {\n value: \"\",\n children: \"Any\",\n })), delay(() => map_3((m_1) => createElement(\"option\", {\n value: m_1.Id,\n children: m_1.Name,\n }), props.Mechanics)))))))]])), createElement(\"div\", {\n className: join(\" \", cons(\"select\", patternInput_2[0])),\n children: Interop_reactApi.Children.toArray([createElement(\"select\", createObj(patternInput_2[1]))]),\n }))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_20)),\n }))])]]), createElement(\"label\", createObj(Helpers_combineClasses(\"label\", props_68))))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_22)),\n })), (children_26 = singleton_1((props_79 = ofArray([[\"htmlFor\", \"hasCategory\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"span\", {\n children: [\"Has category\"],\n }), (children_24 = singleton_1((patternInput_3 = Helpers_extractClasses(ofArray([[\"className\", \"is-fullwidth\"], [\"value\", (matchValue_1 = props.Filter.HasCategory, (matchValue_1 == null) ? \"\" : int32ToString(matchValue_1))], [\"onChange\", (e_3) => onQueryPropChanged(props.OnFilterUpdated, props.Filter, (filter_19, newHasCategory) => withNewHasCategory(filter_19, newHasCategory), Browser_Types_Event__Event_get_Value(e_3))], [\"children\", Interop_reactApi.Children.toArray(Array.from(toList(delay(() => append(singleton(createElement(\"option\", {\n value: \"\",\n children: \"Any\",\n })), delay(() => map_3((c) => createElement(\"option\", {\n value: c.Id,\n children: c.Name,\n }), props.Categories)))))))]])), createElement(\"div\", {\n className: join(\" \", cons(\"select\", patternInput_3[0])),\n children: Interop_reactApi.Children.toArray([createElement(\"select\", createObj(patternInput_3[1]))]),\n }))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_24)),\n }))])]]), createElement(\"label\", createObj(Helpers_combineClasses(\"label\", props_79))))), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_26)),\n }))]),\n }), createElement(\"div\", {\n className: \"filter-subcontainer\",\n children: Interop_reactApi.Children.toArray([createElement(\"button\", createObj(Helpers_combineClasses(\"button\", ofArray([[\"className\", \"clear-filter-button\"], [\"className\", \"is-fullwidth\"], [\"onClick\", (_arg2) => {\n props.ClearFilter();\n }], [\"children\", \"Clear filters\"]])))), createElement(\"button\", createObj(Helpers_combineClasses(\"button\", ofArray([[\"className\", \"filter-button\"], [\"className\", \"is-info\"], [\"className\", \"is-fullwidth\"], [\"onClick\", (_arg3) => {\n props.OnFilter();\n }], [\"children\", \"Filter\"]]))))]),\n })]),\n })])]]);\n return createElement(\"div\", createObj(Helpers_combineClasses(\"box\", props_89)));\n}, void 0, (x, y) => Helpers_equalsButFunctions(x, y));\n\n","import * as react from \"react\";\nimport { equals, uncurry } from \"../fable-library.3.1.12/Util.js\";\nimport { choose, fold } from \"../fable-library.3.1.12/Seq.js\";\nimport { isNullOrEmpty } from \"../fable-library.3.1.12/String.js\";\nimport { HTMLAttr } from \"./Fable.React.Props.fs.js\";\n\nexport function ReactElementTypeModule_memo(render) {\n return react.memo(render, uncurry(2, null));\n}\n\nexport function ReactElementTypeModule_memoWith(areEqual, render) {\n return react.memo(render, areEqual);\n}\n\nexport function Helpers_equalsButFunctions(x, y) {\n if (x === y) {\n return true;\n }\n else if ((typeof x === 'object' && !x[Symbol.iterator]) ? (!(y == null)) : false) {\n const keys = Object.keys(x);\n const length = keys.length | 0;\n let i = 0;\n let result = true;\n while ((i < length) ? result : false) {\n const key = keys[i];\n i = ((i + 1) | 0);\n const xValue = x[key];\n result = ((typeof xValue === 'function') ? true : equals(xValue, y[key]));\n }\n return result;\n }\n else {\n return equals(x, y);\n }\n}\n\nexport function Helpers_memoEqualsButFunctions(x, y) {\n if (x === y) {\n return true;\n }\n else if ((typeof x === 'object' && !x[Symbol.iterator]) ? (!(y == null)) : false) {\n const keys = Object.keys(x);\n const length = keys.length | 0;\n let i = 0;\n let result = true;\n while ((i < length) ? result : false) {\n const key = keys[i];\n i = ((i + 1) | 0);\n const xValue = x[key];\n result = ((typeof xValue === 'function') ? true : (xValue === y[key]));\n }\n return result;\n }\n else {\n return false;\n }\n}\n\nexport function Helpers_memoBuilder(name, render) {\n render.displayName = name;\n const memoType = ReactElementTypeModule_memo(render);\n return (props) => react.createElement(memoType, props);\n}\n\nexport function Helpers_memoBuilderWith(name, areEqual, render) {\n render.displayName = name;\n const memoType = ReactElementTypeModule_memoWith(areEqual, render);\n return (props) => react.createElement(memoType, props);\n}\n\nexport function Helpers_opt(o) {\n const o_1 = o;\n if (o_1 == null) {\n return null;\n }\n else {\n return o_1;\n }\n}\n\nexport const Helpers_nothing = null;\n\nexport function Helpers_classBaseList(baseClass, classes) {\n return new HTMLAttr(64, fold((state, name_1) => ((state + \" \") + name_1), baseClass, choose((tupledArg) => {\n const name = tupledArg[0];\n if (tupledArg[1] ? (!isNullOrEmpty(name)) : false) {\n return name;\n }\n else {\n return void 0;\n }\n }, classes)));\n}\n\nexport function Helpers_classList(classes) {\n return Helpers_classBaseList(\"\", classes);\n}\n\n","import { Union, Record } from \"../.fable/fable-library.3.1.12/Types.js\";\nimport { TimeTrendData, NewGameAdjustment, RankingTimePeriod, RankingQuery, Page$1$reflection, Category$reflection, Mechanic$reflection, RankedBoardGame$reflection } from \"../../TryTheseGames.Website.Shared/Shared.fs.js\";\nimport { union_type, class_type, record_type, bool_type, list_type } from \"../.fable/fable-library.3.1.12/Reflection.js\";\nimport { Float_toFixed, Deferred$1, CancellablePagedDeferred$1, AsyncOperation$1, toQueryString, AsyncOperation$1$reflection, Deferred$1$reflection, CancellablePagedDeferred$1$reflection } from \"../Helpers.fs.js\";\nimport { rankingFilter, RankingFilterModel, RankingFilterModel$reflection } from \"./RankingFilter.fs.js\";\nimport { Auto_generateBoxedDecoder_79988AEF } from \"../.fable/Thoth.Json.6.0.0/Decode.fs.js\";\nimport { fetchAs } from \"../FetchHelpers.fs.js\";\nimport { join, interpolate, toText } from \"../.fable/fable-library.3.1.12/String.js\";\nimport { createObj, uncurry } from \"../.fable/fable-library.3.1.12/Util.js\";\nimport { Cmd_none, Cmd_OfFunc_result, Cmd_batch, Cmd_OfPromise_either } from \"../.fable/Fable.Elmish.3.1.0/cmd.fs.js\";\nimport { empty, map, isEmpty, singleton, length, append, ofArray } from \"../.fable/fable-library.3.1.12/List.js\";\nimport { defaultArg, some } from \"../.fable/fable-library.3.1.12/Option.js\";\nimport { createElement } from \"react\";\nimport { Interop_reactApi } from \"../.fable/Feliz.1.49.0/Interop.fs.js\";\nimport { Fa_i, Fa_ISize, Fa_IconOption, Fa_span } from \"../.fable/Fable.FontAwesome.2.0.0/FontAwesome.fs.js\";\nimport { viewLinkButton, viewLink } from \"../PushStateLink.fs.js\";\nimport { Page } from \"../Pages.fs.js\";\nimport { timeTrend } from \"../Components.fs.js\";\nimport { singleton as singleton_1, append as append_1, delay, toList } from \"../.fable/fable-library.3.1.12/Seq.js\";\nimport { Helpers_combineClasses } from \"../.fable/Feliz.Bulma.2.17.0/ElementBuilders.fs.js\";\nimport { rankingsGlossaryModal } from \"../Modals.fs.js\";\n\nexport class Model extends Record {\n constructor(RankedBoardGames, Filter, MobileFilterOpen, Mechanics, Categories, GlossaryModalActive) {\n super();\n this.RankedBoardGames = RankedBoardGames;\n this.Filter = Filter;\n this.MobileFilterOpen = MobileFilterOpen;\n this.Mechanics = Mechanics;\n this.Categories = Categories;\n this.GlossaryModalActive = GlossaryModalActive;\n }\n}\n\nexport function Model$reflection() {\n return record_type(\"Client.Ranking.RankingPage.Model\", [], Model, () => [[\"RankedBoardGames\", CancellablePagedDeferred$1$reflection(list_type(RankedBoardGame$reflection()))], [\"Filter\", RankingFilterModel$reflection()], [\"MobileFilterOpen\", bool_type], [\"Mechanics\", Deferred$1$reflection(list_type(Mechanic$reflection()))], [\"Categories\", Deferred$1$reflection(list_type(Category$reflection()))], [\"GlossaryModalActive\", bool_type]]);\n}\n\nexport class Msg extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"LoadRankedGames\", \"LoadMechanics\", \"LoadCategories\", \"UpdateFilter\", \"ApplyFilter\", \"ToggleMobileFilter\", \"ToggleGlossaryModal\", \"LogError\"];\n }\n}\n\nexport function Msg$reflection() {\n return union_type(\"Client.Ranking.RankingPage.Msg\", [], Msg, () => [[[\"Item\", AsyncOperation$1$reflection(Page$1$reflection(RankedBoardGame$reflection()))]], [[\"Item\", AsyncOperation$1$reflection(list_type(Mechanic$reflection()))]], [[\"Item\", AsyncOperation$1$reflection(list_type(Category$reflection()))]], [[\"Item\", RankingFilterModel$reflection()]], [], [], [], [[\"Item\", class_type(\"System.Exception\")]]]);\n}\n\nexport const rankedGameDecoder = Auto_generateBoxedDecoder_79988AEF(Page$1$reflection(RankedBoardGame$reflection()), void 0, void 0);\n\nexport function getGamesCmd(query, skip) {\n const patternInput = fetchAs(toText(interpolate(\"/api/ranked-games%s%P()\", [toQueryString(new RankingQuery(query.TimePeriod, query.NewGameAdjustment, query.PseudoRaters, query.PlayerCount, query.MinPlayTime, query.MaxPlayTime, query.MinPublishYear, query.MaxPublishYear, query.HasMechanic, query.HasCategory, skip), [])])), uncurry(2, rankedGameDecoder));\n return [Cmd_OfPromise_either(() => patternInput[0], void 0, (arg) => (new Msg(0, new AsyncOperation$1(1, arg))), (arg0_2) => (new Msg(7, arg0_2))), patternInput[1]];\n}\n\nexport const emptyFilter = new RankingFilterModel(new RankingTimePeriod(2), new NewGameAdjustment(3), 1000, void 0, void 0, void 0, void 0, void 0, void 0, void 0);\n\nexport const mechanicsDecoder = Auto_generateBoxedDecoder_79988AEF(list_type(Mechanic$reflection()), void 0, void 0);\n\nexport function getMechanicsCmd() {\n const patternInput = fetchAs(\"/api/mechanics\", uncurry(2, mechanicsDecoder));\n return Cmd_OfPromise_either(() => patternInput[0], void 0, (arg) => (new Msg(1, new AsyncOperation$1(1, arg))), (arg0_2) => (new Msg(7, arg0_2)));\n}\n\nexport const categoriesDecoder = Auto_generateBoxedDecoder_79988AEF(list_type(Category$reflection()), void 0, void 0);\n\nexport function getCategoriesCmd() {\n const patternInput = fetchAs(\"/api/categories\", uncurry(2, categoriesDecoder));\n return Cmd_OfPromise_either(() => patternInput[0], void 0, (arg) => (new Msg(2, new AsyncOperation$1(1, arg))), (arg0_2) => (new Msg(7, arg0_2)));\n}\n\nexport function init() {\n return [new Model(new CancellablePagedDeferred$1(0), emptyFilter, false, new Deferred$1(0), new Deferred$1(0), false), Cmd_batch(ofArray([Cmd_OfFunc_result(new Msg(0, new AsyncOperation$1(0))), Cmd_OfFunc_result(new Msg(1, new AsyncOperation$1(0))), Cmd_OfFunc_result(new Msg(2, new AsyncOperation$1(0)))]))];\n}\n\nexport function update(msg, state) {\n let matchValue_1, matchValue_2;\n if (msg.tag === 3) {\n return [new Model(state.RankedBoardGames, msg.fields[0], state.MobileFilterOpen, state.Mechanics, state.Categories, state.GlossaryModalActive), Cmd_none()];\n }\n else if (msg.tag === 1) {\n if (msg.fields[0].tag === 1) {\n return [new Model(state.RankedBoardGames, state.Filter, state.MobileFilterOpen, new Deferred$1(2, msg.fields[0].fields[0]), state.Categories, state.GlossaryModalActive), Cmd_none()];\n }\n else {\n return [new Model(state.RankedBoardGames, state.Filter, state.MobileFilterOpen, new Deferred$1(1), state.Categories, state.GlossaryModalActive), getMechanicsCmd()];\n }\n }\n else if (msg.tag === 2) {\n if (msg.fields[0].tag === 1) {\n return [new Model(state.RankedBoardGames, state.Filter, state.MobileFilterOpen, state.Mechanics, new Deferred$1(2, msg.fields[0].fields[0]), state.GlossaryModalActive), Cmd_none()];\n }\n else {\n return [new Model(state.RankedBoardGames, state.Filter, state.MobileFilterOpen, state.Mechanics, new Deferred$1(1), state.GlossaryModalActive), getCategoriesCmd()];\n }\n }\n else if (msg.tag === 5) {\n return [new Model(state.RankedBoardGames, state.Filter, !state.MobileFilterOpen, state.Mechanics, state.Categories, state.GlossaryModalActive), Cmd_none()];\n }\n else if (msg.tag === 6) {\n return [new Model(state.RankedBoardGames, state.Filter, state.MobileFilterOpen, state.Mechanics, state.Categories, !state.GlossaryModalActive), Cmd_none()];\n }\n else if (msg.tag === 4) {\n return [new Model(new CancellablePagedDeferred$1(0), state.Filter, state.MobileFilterOpen, state.Mechanics, state.Categories, state.GlossaryModalActive), Cmd_OfFunc_result(new Msg(0, new AsyncOperation$1(0)))];\n }\n else if (msg.tag === 7) {\n console.error(some(msg.fields[0]));\n return [state, Cmd_none()];\n }\n else if (msg.fields[0].tag === 1) {\n let items;\n const matchValue_3 = state.RankedBoardGames;\n let pattern_matching_result, rs_1;\n switch (matchValue_3.tag) {\n case 1: {\n pattern_matching_result = 0;\n break;\n }\n case 2: {\n pattern_matching_result = 1;\n rs_1 = matchValue_3.fields[0];\n break;\n }\n case 3: {\n pattern_matching_result = 1;\n rs_1 = matchValue_3.fields[0];\n break;\n }\n default: pattern_matching_result = 0}\n switch (pattern_matching_result) {\n case 0: {\n items = msg.fields[0].fields[0].Items;\n break;\n }\n case 1: {\n items = append(rs_1, msg.fields[0].fields[0].Items);\n break;\n }\n }\n return [new Model(new CancellablePagedDeferred$1(3, items, length(items) < msg.fields[0].fields[0].TotalCount), state.Filter, state.MobileFilterOpen, state.Mechanics, state.Categories, state.GlossaryModalActive), Cmd_none()];\n }\n else {\n const matchValue = state.RankedBoardGames;\n let pattern_matching_result_1, cancel;\n switch (matchValue.tag) {\n case 1: {\n pattern_matching_result_1 = 0;\n cancel = matchValue.fields[0];\n break;\n }\n case 2: {\n pattern_matching_result_1 = 0;\n cancel = matchValue.fields[1];\n break;\n }\n default: pattern_matching_result_1 = 1}\n switch (pattern_matching_result_1) {\n case 0: {\n cancel();\n break;\n }\n }\n const patternInput = getGamesCmd(state.Filter, (matchValue_1 = state.RankedBoardGames, (matchValue_1.tag === 3) ? length(matchValue_1.fields[0]) : 0));\n const cancel_1 = patternInput[1];\n return [new Model((matchValue_2 = state.RankedBoardGames, (matchValue_2.tag === 1) ? (new CancellablePagedDeferred$1(1, cancel_1)) : ((matchValue_2.tag === 2) ? (new CancellablePagedDeferred$1(1, cancel_1)) : ((matchValue_2.tag === 3) ? (new CancellablePagedDeferred$1(2, matchValue_2.fields[0], cancel_1)) : (new CancellablePagedDeferred$1(1, cancel_1))))), state.Filter, state.MobileFilterOpen, state.Mechanics, state.Categories, state.GlossaryModalActive), patternInput[0]];\n }\n}\n\nexport function getRangeString(min, max) {\n if (min === max) {\n return toText(interpolate(\"%i%P()\", [min]));\n }\n else {\n return toText(interpolate(\"%i%P()-%i%P()\", [min, max]));\n }\n}\n\nexport const loadingSpinner = createElement(\"div\", {\n className: \"has-text-centered\",\n children: Interop_reactApi.Children.toArray([Fa_span(ofArray([new Fa_IconOption(11, \"far fa-spinner\"), new Fa_IconOption(12), new Fa_IconOption(0, new Fa_ISize(7))]), [])]),\n});\n\nexport const sqrt3 = Math.sqrt(3);\n\nexport function renderHex(width, color, text) {\n const height = (~(~(width / sqrt3))) | 0;\n const halfWidth = (~(~(width / 2))) | 0;\n const halfHeight = (~(~(height / 2))) | 0;\n const children = ofArray([createElement(\"div\", {\n style: {\n width: 0,\n borderBottom: (((halfHeight + \"px \") + \"solid\") + \" \") + color,\n borderLeft: (((halfWidth + \"px \") + \"solid\") + \" \") + \"transparent\",\n borderRight: (((halfWidth + \"px \") + \"solid\") + \" \") + \"transparent\",\n },\n }), createElement(\"div\", {\n children: text,\n className: \"centre-hex\",\n style: {\n width: width,\n height: height,\n backgroundColor: color,\n },\n }), createElement(\"div\", {\n style: {\n width: 0,\n borderTop: (((halfHeight + \"px \") + \"solid\") + \" \") + color,\n borderLeft: (((halfWidth + \"px \") + \"solid\") + \" \") + \"transparent\",\n borderRight: (((halfWidth + \"px \") + \"solid\") + \" \") + \"transparent\",\n },\n })]);\n return createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children)),\n });\n}\n\nexport function renderRankRating(game, className) {\n return createElement(\"div\", {\n className: join(\" \", [\"is-flex\", className]),\n children: Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: \"ranks\",\n children: Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: join(\" \", [\"ttg-rank\", \"tooltip\"]),\n [\"data-tooltip\"]: \"Try These Games Rank\",\n style: {\n backgroundImage: \"url(\\u0027/android-chrome-192x192.png\\u0027)\",\n },\n children: game.Rank,\n }), createElement(\"div\", {\n className: join(\" \", [\"bgg-rank\", \"tooltip\"]),\n [\"data-tooltip\"]: \"BoardGameGeek Rank\",\n style: {\n backgroundImage: \"url(\\u0027https://cf.geekdo-static.com/images/logos/bgg-primary-logo-reverse.svg\\u0027)\",\n },\n children: game.BggRank,\n })]),\n }), createElement(\"div\", {\n className: \"ratings\",\n children: Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: join(\" \", [\"tooltip\", \"ttg-rating\"]),\n [\"data-tooltip\"]: \"Try These Games Rating\",\n children: Interop_reactApi.Children.toArray([renderHex(34, \"#EF8F0E\", Float_toFixed(1, game.TtgRating))]),\n }), createElement(\"div\", {\n className: join(\" \", [\"tooltip\", \"geek-rating\"]),\n [\"data-tooltip\"]: \"Geek Rating\",\n children: Interop_reactApi.Children.toArray([renderHex(34, \"#FF5100\", Float_toFixed(1, game.GeekRating))]),\n })]),\n })]),\n });\n}\n\nexport function renderGame(game) {\n let children, children_2, children_4, value_46, children_6, value_50;\n const thumbnailUrl = defaultArg(game.Thumbnail, \"\");\n return createElement(\"div\", {\n className: \"ranking game\",\n children: Interop_reactApi.Children.toArray([renderRankRating(game, \"is-hidden-mobile\"), (children = ofArray([createElement(\"div\", {\n className: \"image-background\",\n children: Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: \"image-background-image\",\n style: {\n backgroundImage: (\"url(\\u0027\" + thumbnailUrl) + \"\\u0027)\",\n },\n })]),\n }), createElement(\"div\", {\n className: \"image-container\",\n children: Interop_reactApi.Children.toArray([createElement(\"img\", {\n className: \"game-image\",\n src: thumbnailUrl,\n })]),\n })]), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children)),\n })), createElement(\"div\", {\n className: \"game-information\",\n children: Interop_reactApi.Children.toArray([(children_2 = ofArray([createElement(\"span\", {\n className: \"game-name\",\n children: game.Name,\n }), createElement(\"span\", {\n className: \"year-published\",\n children: toText(interpolate(\" (%i%P()) \", [game.YearPublished])),\n }), viewLink(new Page(0, game.Id), [[\"className\", \"replace-game tooltip\"], [\"data-tooltip\", \"See recommendations\"], [\"children\", Interop_reactApi.Children.toArray([Fa_i(singleton(new Fa_IconOption(11, \"fas fa-thumbs-up\")), [])])]]), createElement(\"a\", {\n href: toText(interpolate(\"https://boardgamegeek.com/boardgame/%i%P()\", [game.Id])),\n target: \"_blank\",\n rel: \"noopener\",\n className: \"tooltip\",\n [\"data-tooltip\"]: \"BoardGameGeek\",\n children: Interop_reactApi.Children.toArray([Fa_i(singleton(new Fa_IconOption(11, \"far fa-external-link\")), [])]),\n })]), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_2)),\n })), createElement(\"div\", {\n className: \"game-breakdown\",\n children: Interop_reactApi.Children.toArray([renderRankRating(game, \"is-hidden-tablet\"), createElement(\"div\", {\n className: join(\" \", [\"game-stats\", \"is-hidden-mobile\"]),\n children: Interop_reactApi.Children.toArray([createElement(\"div\", {\n className: \"game-stat\",\n children: Interop_reactApi.Children.toArray([(children_4 = singleton(Fa_i(ofArray([new Fa_IconOption(11, \"fas fa-users\"), new Fa_IconOption(0, new Fa_ISize(3))]), [])), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_4)),\n })), (value_46 = toText(interpolate(\"%s%P() Players\", [getRangeString(game.MinPlayers, game.MaxPlayers)])), createElement(\"div\", {\n children: [value_46],\n }))]),\n }), createElement(\"div\", {\n className: \"game-stat\",\n children: Interop_reactApi.Children.toArray([(children_6 = singleton(Fa_i(ofArray([new Fa_IconOption(11, \"far fa-stopwatch\"), new Fa_IconOption(0, new Fa_ISize(3))]), [])), createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_6)),\n })), (value_50 = toText(interpolate(\"%s%P() Min\", [getRangeString(game.MinPlayingTime, game.MaxPlayingTime)])), createElement(\"div\", {\n children: [value_50],\n }))]),\n })]),\n })]),\n })]),\n }), timeTrend(new TimeTrendData(game.RatingTrendCoefficients, game.RatingTrendStartDate, game.RatingTrendEndDate))]),\n });\n}\n\nexport function render(model, dispatch) {\n const children_2 = toList(delay(() => {\n let props_3;\n return append_1(singleton_1((props_3 = ofArray([[\"className\", \"about-bar\"], [\"children\", Interop_reactApi.Children.toArray([createElement(\"a\", {\n href: \"mailto:admin@trythesegames.com\",\n className: \"contact-link\",\n children: \"Contact\",\n }), createElement(\"button\", createObj(Helpers_combineClasses(\"button\", ofArray([[\"className\", \"is-small\"], [\"className\", \"is-info\"], [\"onClick\", (_arg1) => {\n dispatch(new Msg(6));\n }], [\"children\", \"Glossary\"]])))), viewLinkButton(new Page(0, void 0), [[\"className\", \"is-small\"], [\"className\", \"is-primary\"], [\"children\", \"Recommendations\"]])])]]), createElement(\"div\", createObj(Helpers_combineClasses(\"container\", props_3))))), delay(() => {\n let elms;\n return append_1(singleton_1((elms = singleton(createElement(\"h1\", createObj(Helpers_combineClasses(\"title is-1\", ofArray([[\"className\", \"is-1\"], [\"children\", \"Try these games rankings\"], [\"className\", \"ranking-heading\"]]))))), createElement(\"div\", {\n className: \"container\",\n children: Interop_reactApi.Children.toArray(Array.from(elms)),\n }))), delay(() => {\n let matchValue, elms_1, props_17, props_13, props_15, matchValue_3, matchValue_2;\n return append_1((matchValue = model.RankedBoardGames, (matchValue.tag === 2) ? singleton_1((elms_1 = singleton((props_17 = ofArray([[\"className\", \"is-mobile\"], [\"children\", Interop_reactApi.Children.toArray([(props_13 = ofArray([[\"className\", \"is-three-fifths-fullhd\"], [\"className\", \"is-two-thirds-desktop\"], [\"className\", \"is-full-tablet\"], [\"className\", \"is-full-mobile\"], [\"className\", \"games-column\"], [\"children\", Interop_reactApi.Children.toArray(Array.from(toList(delay(() => {\n const matchValue_1 = model.RankedBoardGames;\n return (matchValue_1.tag === 1) ? singleton_1(loadingSpinner) : ((matchValue_1.tag === 3) ? (isEmpty(matchValue_1.fields[0]) ? singleton_1(createElement(\"div\", createObj(Helpers_combineClasses(\"notification\", ofArray([[\"className\", \"is-info\"], [\"children\", \"No matching games\"]]))))) : (matchValue_1.fields[1] ? append_1(map((game_2) => renderGame(game_2), matchValue_1.fields[0]), delay(() => singleton_1(createElement(\"div\", {\n className: \"has-text-centered\",\n children: Interop_reactApi.Children.toArray([createElement(\"button\", createObj(Helpers_combineClasses(\"button\", ofArray([[\"onClick\", (_arg2) => {\n dispatch(new Msg(0, new AsyncOperation$1(0)));\n }], [\"children\", \"Load More\"]]))))]),\n })))) : map((game_1) => renderGame(game_1), matchValue_1.fields[0]))) : ((matchValue_1.tag === 2) ? append_1(map((game) => renderGame(game), matchValue_1.fields[0]), delay(() => singleton_1(loadingSpinner))) : singleton_1(null)));\n }))))]]), createElement(\"div\", createObj(Helpers_combineClasses(\"column\", props_13)))), (props_15 = ofArray([[\"className\", \"filter-column\"], [\"className\", \"is-two-fifths-fullhd\"], [\"className\", \"is-one-third-desktop\"], [\"children\", Interop_reactApi.Children.toArray([rankingFilter({\n Categories: (matchValue_3 = model.Categories, (matchValue_3.tag === 2) ? matchValue_3.fields[0] : empty()),\n ClearFilter: () => {\n dispatch(new Msg(3, emptyFilter));\n },\n Filter: model.Filter,\n Mechanics: (matchValue_2 = model.Mechanics, (matchValue_2.tag === 2) ? matchValue_2.fields[0] : empty()),\n MobileFilterOpen: model.MobileFilterOpen,\n OnFilter: () => {\n dispatch(new Msg(4));\n },\n OnFilterUpdated: (arg) => {\n dispatch(new Msg(3, arg));\n },\n OnMobileFilterToggled: () => {\n dispatch(new Msg(5));\n },\n })])]]), createElement(\"div\", createObj(Helpers_combineClasses(\"column\", props_15))))])]]), createElement(\"div\", createObj(Helpers_combineClasses(\"columns\", props_17))))), createElement(\"div\", {\n className: \"container\",\n children: Interop_reactApi.Children.toArray(Array.from(elms_1)),\n }))) : ((matchValue.tag === 3) ? singleton_1((elms_1 = singleton((props_17 = ofArray([[\"className\", \"is-mobile\"], [\"children\", Interop_reactApi.Children.toArray([(props_13 = ofArray([[\"className\", \"is-three-fifths-fullhd\"], [\"className\", \"is-two-thirds-desktop\"], [\"className\", \"is-full-tablet\"], [\"className\", \"is-full-mobile\"], [\"className\", \"games-column\"], [\"children\", Interop_reactApi.Children.toArray(Array.from(toList(delay(() => {\n const matchValue_1 = model.RankedBoardGames;\n return (matchValue_1.tag === 1) ? singleton_1(loadingSpinner) : ((matchValue_1.tag === 3) ? (isEmpty(matchValue_1.fields[0]) ? singleton_1(createElement(\"div\", createObj(Helpers_combineClasses(\"notification\", ofArray([[\"className\", \"is-info\"], [\"children\", \"No matching games\"]]))))) : (matchValue_1.fields[1] ? append_1(map((game_2) => renderGame(game_2), matchValue_1.fields[0]), delay(() => singleton_1(createElement(\"div\", {\n className: \"has-text-centered\",\n children: Interop_reactApi.Children.toArray([createElement(\"button\", createObj(Helpers_combineClasses(\"button\", ofArray([[\"onClick\", (_arg2) => {\n dispatch(new Msg(0, new AsyncOperation$1(0)));\n }], [\"children\", \"Load More\"]]))))]),\n })))) : map((game_1) => renderGame(game_1), matchValue_1.fields[0]))) : ((matchValue_1.tag === 2) ? append_1(map((game) => renderGame(game), matchValue_1.fields[0]), delay(() => singleton_1(loadingSpinner))) : singleton_1(null)));\n }))))]]), createElement(\"div\", createObj(Helpers_combineClasses(\"column\", props_13)))), (props_15 = ofArray([[\"className\", \"filter-column\"], [\"className\", \"is-two-fifths-fullhd\"], [\"className\", \"is-one-third-desktop\"], [\"children\", Interop_reactApi.Children.toArray([rankingFilter({\n Categories: (matchValue_3 = model.Categories, (matchValue_3.tag === 2) ? matchValue_3.fields[0] : empty()),\n ClearFilter: () => {\n dispatch(new Msg(3, emptyFilter));\n },\n Filter: model.Filter,\n Mechanics: (matchValue_2 = model.Mechanics, (matchValue_2.tag === 2) ? matchValue_2.fields[0] : empty()),\n MobileFilterOpen: model.MobileFilterOpen,\n OnFilter: () => {\n dispatch(new Msg(4));\n },\n OnFilterUpdated: (arg) => {\n dispatch(new Msg(3, arg));\n },\n OnMobileFilterToggled: () => {\n dispatch(new Msg(5));\n },\n })])]]), createElement(\"div\", createObj(Helpers_combineClasses(\"column\", props_15))))])]]), createElement(\"div\", createObj(Helpers_combineClasses(\"columns\", props_17))))), createElement(\"div\", {\n className: \"container\",\n children: Interop_reactApi.Children.toArray(Array.from(elms_1)),\n }))) : ((matchValue.tag === 0) ? singleton_1(null) : singleton_1((elms_1 = singleton((props_17 = ofArray([[\"className\", \"is-mobile\"], [\"children\", Interop_reactApi.Children.toArray([(props_13 = ofArray([[\"className\", \"is-three-fifths-fullhd\"], [\"className\", \"is-two-thirds-desktop\"], [\"className\", \"is-full-tablet\"], [\"className\", \"is-full-mobile\"], [\"className\", \"games-column\"], [\"children\", Interop_reactApi.Children.toArray(Array.from(toList(delay(() => {\n const matchValue_1 = model.RankedBoardGames;\n return (matchValue_1.tag === 1) ? singleton_1(loadingSpinner) : ((matchValue_1.tag === 3) ? (isEmpty(matchValue_1.fields[0]) ? singleton_1(createElement(\"div\", createObj(Helpers_combineClasses(\"notification\", ofArray([[\"className\", \"is-info\"], [\"children\", \"No matching games\"]]))))) : (matchValue_1.fields[1] ? append_1(map((game_2) => renderGame(game_2), matchValue_1.fields[0]), delay(() => singleton_1(createElement(\"div\", {\n className: \"has-text-centered\",\n children: Interop_reactApi.Children.toArray([createElement(\"button\", createObj(Helpers_combineClasses(\"button\", ofArray([[\"onClick\", (_arg2) => {\n dispatch(new Msg(0, new AsyncOperation$1(0)));\n }], [\"children\", \"Load More\"]]))))]),\n })))) : map((game_1) => renderGame(game_1), matchValue_1.fields[0]))) : ((matchValue_1.tag === 2) ? append_1(map((game) => renderGame(game), matchValue_1.fields[0]), delay(() => singleton_1(loadingSpinner))) : singleton_1(null)));\n }))))]]), createElement(\"div\", createObj(Helpers_combineClasses(\"column\", props_13)))), (props_15 = ofArray([[\"className\", \"filter-column\"], [\"className\", \"is-two-fifths-fullhd\"], [\"className\", \"is-one-third-desktop\"], [\"children\", Interop_reactApi.Children.toArray([rankingFilter({\n Categories: (matchValue_3 = model.Categories, (matchValue_3.tag === 2) ? matchValue_3.fields[0] : empty()),\n ClearFilter: () => {\n dispatch(new Msg(3, emptyFilter));\n },\n Filter: model.Filter,\n Mechanics: (matchValue_2 = model.Mechanics, (matchValue_2.tag === 2) ? matchValue_2.fields[0] : empty()),\n MobileFilterOpen: model.MobileFilterOpen,\n OnFilter: () => {\n dispatch(new Msg(4));\n },\n OnFilterUpdated: (arg) => {\n dispatch(new Msg(3, arg));\n },\n OnMobileFilterToggled: () => {\n dispatch(new Msg(5));\n },\n })])]]), createElement(\"div\", createObj(Helpers_combineClasses(\"column\", props_15))))])]]), createElement(\"div\", createObj(Helpers_combineClasses(\"columns\", props_17))))), createElement(\"div\", {\n className: \"container\",\n children: Interop_reactApi.Children.toArray(Array.from(elms_1)),\n })))))), delay(() => singleton_1(rankingsGlossaryModal(model.GlossaryModalActive, (_arg3) => {\n dispatch(new Msg(6));\n }))));\n }));\n }));\n }));\n return createElement(\"div\", {\n children: Interop_reactApi.Children.toArray(Array.from(children_2)),\n });\n}\n\n","import { Record } from \"../fable-library.3.1.12/Types.js\";\nimport { obj_type, record_type, bool_type, lambda_type, class_type, unit_type } from \"../fable-library.3.1.12/Reflection.js\";\nimport { Component } from \"react\";\nimport * as react from \"react\";\nimport { equalArrays, equals } from \"../fable-library.3.1.12/Util.js\";\n\nexport class LazyProps$1 extends Record {\n constructor(model, render, equal) {\n super();\n this.model = model;\n this.render = render;\n this.equal = equal;\n }\n}\n\nexport function LazyProps$1$reflection(gen0) {\n return record_type(\"Elmish.React.LazyProps`1\", [gen0], LazyProps$1, () => [[\"model\", gen0], [\"render\", lambda_type(unit_type, class_type(\"Fable.React.ReactElement\"))], [\"equal\", lambda_type(gen0, lambda_type(gen0, bool_type))]]);\n}\n\nexport class Components_LazyView$1 extends Component {\n constructor(props) {\n super(props);\n }\n shouldComponentUpdate(nextProps, _nextState) {\n const this$ = this;\n return !(this$.props).equal((this$.props).model, nextProps.model);\n }\n render() {\n const this$ = this;\n return (this$.props).render();\n }\n}\n\nexport function Components_LazyView$1$reflection(gen0) {\n return class_type(\"Elmish.React.Components.LazyView`1\", [gen0], Components_LazyView$1, class_type(\"Fable.React.Component`2\", [LazyProps$1$reflection(gen0), obj_type]));\n}\n\nexport function Components_LazyView$1_$ctor_Z7829D94B(props) {\n return new Components_LazyView$1(props);\n}\n\nexport function Common_lazyViewWith(equal, view, state) {\n return react.createElement(Components_LazyView$1, new LazyProps$1(state, () => view(state), equal));\n}\n\nexport function Common_lazyView2With(equal, view, state, dispatch) {\n return react.createElement(Components_LazyView$1, new LazyProps$1(state, () => view(state, dispatch), equal));\n}\n\nexport function Common_lazyView3With(equal, view, state1, state2, dispatch) {\n return react.createElement(Components_LazyView$1, new LazyProps$1([state1, state2], () => view(state1, state2, dispatch), equal));\n}\n\nexport function Common_lazyView(view) {\n return (state) => Common_lazyViewWith((x, y) => equals(x, y), view, state);\n}\n\nexport function Common_lazyView2(view) {\n return (state) => ((dispatch) => Common_lazyView2With((x, y) => equals(x, y), view, state, dispatch));\n}\n\nexport function Common_lazyView3(view) {\n return (state1) => ((state2) => ((dispatch) => Common_lazyView3With((x, y) => equalArrays(x, y), view, state1, state2, dispatch)));\n}\n\n","import { ProgramModule_view, ProgramModule_withSetState } from \"../Fable.Elmish.3.1.0/program.fs.js\";\nimport * as react$002Ddom from \"react-dom\";\nimport { uncurry } from \"../fable-library.3.1.12/Util.js\";\nimport { Common_lazyView2With } from \"./common.fs.js\";\n\nexport function Program_Internal_withReactBatchedUsing(lazyView2With, placeholderId, program) {\n let lastRequest = void 0;\n return ProgramModule_withSetState((model, dispatch) => {\n if (lastRequest != null) {\n window.cancelAnimationFrame(lastRequest);\n }\n lastRequest = window.requestAnimationFrame((_arg1) => {\n react$002Ddom.render(lazyView2With((x, y) => (x === y), uncurry(2, ProgramModule_view(program)), model, dispatch), document.getElementById(placeholderId));\n });\n }, program);\n}\n\nexport function Program_Internal_withReactSynchronousUsing(lazyView2With, placeholderId, program) {\n return ProgramModule_withSetState((model, dispatch) => {\n react$002Ddom.render(lazyView2With((x, y) => (x === y), uncurry(2, ProgramModule_view(program)), model, dispatch), document.getElementById(placeholderId));\n }, program);\n}\n\nexport function Program_Internal_withReactHydrateUsing(lazyView2With, placeholderId, program) {\n return ProgramModule_withSetState((model, dispatch) => {\n react$002Ddom.hydrate(lazyView2With((x, y) => (x === y), uncurry(2, ProgramModule_view(program)), model, dispatch), document.getElementById(placeholderId));\n }, program);\n}\n\nexport function Program_withReactBatched(placeholderId, program) {\n return Program_Internal_withReactBatchedUsing((equal, view, state, dispatch) => Common_lazyView2With(equal, view, state, dispatch), placeholderId, program);\n}\n\nexport function Program_withReactSynchronous(placeholderId, program) {\n return Program_Internal_withReactSynchronousUsing((equal, view, state, dispatch) => Common_lazyView2With(equal, view, state, dispatch), placeholderId, program);\n}\n\nexport function Program_withReact(placeholderId, program) {\n return Program_Internal_withReactBatchedUsing((equal, view, state, dispatch) => Common_lazyView2With(equal, view, state, dispatch), placeholderId, program);\n}\n\nexport function Program_withReactUnoptimized(placeholderId, program) {\n return Program_Internal_withReactSynchronousUsing((equal, view, state, dispatch) => Common_lazyView2With(equal, view, state, dispatch), placeholderId, program);\n}\n\nexport function Program_withReactHydrate(placeholderId, program) {\n return Program_Internal_withReactHydrateUsing((equal, view, state, dispatch) => Common_lazyView2With(equal, view, state, dispatch), placeholderId, program);\n}\n\n","import { Record, Union } from \"./.fable/fable-library.3.1.12/Types.js\";\nimport { render as render_2, Msg as Msg_1, update as update_1, init as init_1, Msg$reflection as Msg$reflection_1, Model$reflection as Model$reflection_1 } from \"./Recommendations/RecommendationsPage.fs.js\";\nimport { render as render_1, update as update_2, init as init_2, Msg$reflection as Msg$reflection_2, Model$reflection as Model$reflection_2 } from \"./Ranking/RankingPage.fs.js\";\nimport { record_type, union_type } from \"./.fable/fable-library.3.1.12/Reflection.js\";\nimport { urlParser, Page, Page$reflection } from \"./Pages.fs.js\";\nimport { Cmd_OfFunc_result, Cmd_none, Cmd_map } from \"./.fable/Fable.Elmish.3.1.0/cmd.fs.js\";\nimport { ProgramModule_mkProgram, ProgramModule_run } from \"./.fable/Fable.Elmish.3.1.0/program.fs.js\";\nimport { Program_withReactSynchronous } from \"./.fable/Fable.Elmish.React.3.0.1/react.fs.js\";\nimport { ProgramModule_toNavigable } from \"./.fable/Fable.Elmish.Browser.3.0.4/navigation.fs.js\";\n\nexport class PageModel extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"RecommendationsPageModel\", \"RankingPageModel\"];\n }\n}\n\nexport function PageModel$reflection() {\n return union_type(\"Client.App.PageModel\", [], PageModel, () => [[[\"Item\", Model$reflection_1()]], [[\"Item\", Model$reflection_2()]]]);\n}\n\nexport class Model extends Record {\n constructor(Route, PageModel) {\n super();\n this.Route = Route;\n this.PageModel = PageModel;\n }\n}\n\nexport function Model$reflection() {\n return record_type(\"Client.App.Model\", [], Model, () => [[\"Route\", Page$reflection()], [\"PageModel\", PageModel$reflection()]]);\n}\n\nexport class Msg extends Union {\n constructor(tag, ...fields) {\n super();\n this.tag = (tag | 0);\n this.fields = fields;\n }\n cases() {\n return [\"RecommendationsPageMsg\", \"RankingPageMsg\"];\n }\n}\n\nexport function Msg$reflection() {\n return union_type(\"Client.App.Msg\", [], Msg, () => [[[\"Item\", Msg$reflection_1()]], [[\"Item\", Msg$reflection_2()]]]);\n}\n\nexport function init(page) {\n if (page == null) {\n const patternInput_3 = init_1(void 0);\n return [new Model(new Page(0, void 0), new PageModel(0, patternInput_3[0])), Cmd_map((arg0_2) => (new Msg(0, arg0_2)), patternInput_3[1])];\n }\n else {\n const p = page;\n let patternInput_2;\n if (p.tag === 1) {\n const patternInput_1 = init_2();\n patternInput_2 = [new PageModel(1, patternInput_1[0]), Cmd_map((arg0_1) => (new Msg(1, arg0_1)), patternInput_1[1])];\n }\n else {\n const patternInput = init_1(p.fields[0]);\n patternInput_2 = [new PageModel(0, patternInput[0]), Cmd_map((arg0) => (new Msg(0, arg0)), patternInput[1])];\n }\n return [new Model(p, patternInput_2[0]), patternInput_2[1]];\n }\n}\n\nexport function update(msg, state) {\n const matchValue = [msg, state.PageModel];\n let pattern_matching_result, m, msg_1, m_2, msg_2;\n if (matchValue[0].tag === 1) {\n if (matchValue[1].tag === 1) {\n pattern_matching_result = 1;\n m_2 = matchValue[1].fields[0];\n msg_2 = matchValue[0].fields[0];\n }\n else {\n pattern_matching_result = 2;\n }\n }\n else if (matchValue[1].tag === 0) {\n pattern_matching_result = 0;\n m = matchValue[1].fields[0];\n msg_1 = matchValue[0].fields[0];\n }\n else {\n pattern_matching_result = 2;\n }\n switch (pattern_matching_result) {\n case 0: {\n const patternInput = update_1(msg_1, m);\n return [new Model(state.Route, new PageModel(0, patternInput[0])), Cmd_map((arg0) => (new Msg(0, arg0)), patternInput[1])];\n }\n case 1: {\n const patternInput_1 = update_2(msg_2, m_2);\n return [new Model(state.Route, new PageModel(1, patternInput_1[0])), Cmd_map((arg0_1) => (new Msg(1, arg0_1)), patternInput_1[1])];\n }\n case 2: {\n return [state, Cmd_none()];\n }\n }\n}\n\nexport function urlUpdate(result, model) {\n if (result == null) {\n return [model, Cmd_none()];\n }\n else if (result.tag === 1) {\n const patternInput_2 = init_2();\n return [new Model(model.Route, new PageModel(1, patternInput_2[0])), Cmd_map((arg0_2) => (new Msg(1, arg0_2)), patternInput_2[1])];\n }\n else if (result.fields[0] != null) {\n const id = result.fields[0] | 0;\n window.scrollTo(0,0);;\n if (model.PageModel.tag === 0) {\n return [model, Cmd_OfFunc_result(new Msg(0, new Msg_1(6, id)))];\n }\n else {\n const patternInput_1 = init_1(id);\n return [new Model(model.Route, new PageModel(0, patternInput_1[0])), Cmd_map((arg0_1) => (new Msg(0, arg0_1)), patternInput_1[1])];\n }\n }\n else {\n const patternInput = init_1(void 0);\n return [new Model(model.Route, new PageModel(0, patternInput[0])), Cmd_map((arg0) => (new Msg(0, arg0)), patternInput[1])];\n }\n}\n\nexport function render(model, dispatch) {\n const matchValue = model.PageModel;\n if (matchValue.tag === 1) {\n return render_1(matchValue.fields[0], (arg_1) => {\n dispatch(new Msg(1, arg_1));\n });\n }\n else {\n return render_2(matchValue.fields[0], (arg) => {\n dispatch(new Msg(0, arg));\n });\n }\n}\n\nProgramModule_run(Program_withReactSynchronous(\"elmish-app\", ProgramModule_toNavigable((location) => urlParser(location), (result, model_1) => urlUpdate(result, model_1), ProgramModule_mkProgram((page) => init(page), (msg, state) => update(msg, state), (model, dispatch) => render(model, dispatch)))));\n\n"],"sourceRoot":""}