{"version":3,"sources":["webpack://leoandlea-log/./node_modules/@babel/runtime/regenerator/index.js","webpack://leoandlea-log/./node_modules/cross-fetch/dist/browser-polyfill.js","webpack://leoandlea-log/./node_modules/es-cookie/src/es-cookie.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/Applicative.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/Apply.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/Array.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/Bounded.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/Chain.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/ChainRec.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/Compactable.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/Either.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/EitherT.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/Eq.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/Field.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/Filterable.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/FromEither.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/FromIO.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/FromTask.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/Functor.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/Monoid.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/NonEmptyArray.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/Option.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/Ord.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/ReadonlyArray.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/ReadonlyNonEmptyArray.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/ReadonlyRecord.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/Record.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/Semigroup.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/Separated.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/Show.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/Task.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/TaskEither.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/function.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/internal.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/number.js","webpack://leoandlea-log/./node_modules/fp-ts/lib/pipeable.js","webpack://leoandlea-log/./node_modules/lodash.isplainobject/index.js","webpack://leoandlea-log/./node_modules/lodash.pick/index.js","webpack://leoandlea-log/./node_modules/node-fetch/browser.js","webpack://leoandlea-log/./node_modules/prismic-dom/dist/prismic-dom.min.js","webpack://leoandlea-log/./node_modules/prismic-javascript/dist/prismic-javascript.min.js","webpack://leoandlea-log/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://leoandlea-log/./node_modules/camel-case/node_modules/tslib/tslib.es6.js","webpack://leoandlea-log/./node_modules/pascal-case/node_modules/tslib/tslib.es6.js","webpack://leoandlea-log/./node_modules/lower-case/dist.es2015/index.js","webpack://leoandlea-log/./node_modules/no-case/dist.es2015/index.js","webpack://leoandlea-log/./node_modules/pascal-case/dist.es2015/index.js","webpack://leoandlea-log/./node_modules/camel-case/dist.es2015/index.js","webpack://leoandlea-log/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://leoandlea-log/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://leoandlea-log/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://leoandlea-log/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://leoandlea-log/./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","webpack://leoandlea-log/./node_modules/@babel/runtime/helpers/esm/construct.js","webpack://leoandlea-log/./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","webpack://leoandlea-log/./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","webpack://leoandlea-log/./node_modules/superstruct/lib/index.es.js","webpack://leoandlea-log/./node_modules/@babel/runtime/helpers/esm/toArray.js","webpack://leoandlea-log/../src/utils.ts","webpack://leoandlea-log/../src/builders.ts","webpack://leoandlea-log/./node_modules/gatsby-source-prismic/node_modules/uuid/dist/esm-browser/regex.js","webpack://leoandlea-log/./node_modules/gatsby-source-prismic/node_modules/uuid/dist/esm-browser/stringify.js","webpack://leoandlea-log/./node_modules/gatsby-source-prismic/node_modules/uuid/dist/esm-browser/validate.js","webpack://leoandlea-log/./node_modules/gatsby-source-prismic/node_modules/uuid/dist/esm-browser/parse.js","webpack://leoandlea-log/./node_modules/gatsby-source-prismic/node_modules/uuid/dist/esm-browser/sha1.js","webpack://leoandlea-log/../src/types.ts","webpack://leoandlea-log/./node_modules/gatsby-source-prismic/node_modules/uuid/dist/esm-browser/v5.js","webpack://leoandlea-log/./node_modules/gatsby-source-prismic/node_modules/uuid/dist/esm-browser/v35.js","webpack://leoandlea-log/../src/validateOptions.ts","webpack://leoandlea-log/../src/constants.ts","webpack://leoandlea-log/../src/api.ts","webpack://leoandlea-log/../src/usePrismicPreview.ts","webpack://leoandlea-log/../src/documentsToNodes.ts","webpack://leoandlea-log/../src/environment.browser.ts","webpack://leoandlea-log/../src/usePreviewStore.tsx","webpack://leoandlea-log/../src/mergePrismicPreviewData.ts","webpack://leoandlea-log/./node_modules/regenerator-runtime/runtime.js"],"names":["module","exports","self","fetch","support","Symbol","Blob","e","viewClasses","isDataView","obj","DataView","prototype","isPrototypeOf","isArrayBufferView","ArrayBuffer","isView","indexOf","Object","toString","call","Headers","append","name","value","normalizeName","normalizeValue","oldValue","this","map","get","has","hasOwnProperty","set","forEach","callback","thisArg","keys","items","push","iteratorFor","values","entries","iterator","methods","Request","clone","body","_bodyInit","Body","Response","status","statusText","headers","url","error","response","type","redirectStatuses","redirect","RangeError","location","input","init","Promise","resolve","reject","request","xhr","XMLHttpRequest","onload","rawHeaders","options","getAllResponseHeaders","replace","split","line","parts","key","shift","trim","join","responseURL","responseText","onerror","TypeError","ontimeout","open","method","credentials","withCredentials","responseType","setRequestHeader","send","polyfill","String","test","toLowerCase","next","done","undefined","Array","isArray","header","getOwnPropertyNames","consumed","bodyUsed","fileReaderReady","reader","result","readBlobAsArrayBuffer","blob","FileReader","promise","readAsArrayBuffer","bufferClone","buf","slice","view","Uint8Array","byteLength","buffer","_initBody","_bodyText","_bodyBlob","FormData","_bodyFormData","URLSearchParams","_bodyArrayBuffer","Error","rejected","arrayBuffer","then","text","readAsText","chars","length","i","fromCharCode","readArrayBufferAsText","formData","decode","json","JSON","parse","upcased","mode","toUpperCase","referrer","form","bytes","decodeURIComponent","bodyInit","ok","__assign","assign","t","s","n","arguments","p","apply","stringifyAttribute","stringified","encode","attributes","encodeURIComponent","expires","Date","setMilliseconds","getMilliseconds","toUTCString","domain","path","secure","sameSite","stringifyAttributes","cookieString","cookies","rdecode","cookie","charAt","getAll","document","__esModule","remove","defineProperty","getApplicativeComposition","getApplicativeMonoid","Apply_1","function_1","Functor_1","F","f","getApplySemigroup","M","concat","empty","of","G","getFunctorComposition","_ap","ap","a","fgab","fga","pipe","sequenceS","sequenceT","apS","apSecond","apFirst","curried","acc","x","combined","fa","fab","gab","ga","A","second","first","b","fb","_a","S","y","tupleConstructors","c","d","getTupleConstructor","len","tuple","args","_i","fas","r","getRecordConstructor","fr","__createBinding","create","o","m","k","k2","enumerable","__setModuleDefault","v","__importStar","mod","elem","rotate","intersperse","prependAll","unzip","zip","zipWith","sort","lefts","rights","reverse","modifyAt","deleteAt","updateAt","insertAt","copy","findLastIndex","findLastMap","findLast","findFirstMap","findFirst","findIndex","dropLeftWhile","dropRight","dropLeft","spanLeft","takeLeftWhile","takeRight","takeLeft","tail","last","head","lookup","isOutOfBound","size","isNonEmpty","isEmpty","scanRight","scanLeft","chainWithIndex","foldRight","matchRight","foldLeft","matchLeft","replicate","range","makeBy","prepend","flap","Functor","getOrd","getEq","getMonoid","getSemigroup","getShow","URI","unfold","wilt","wither","traverseWithIndex","sequence","traverse","reduceRightWithIndex","reduceRight","reduceWithIndex","reduce","foldMapWithIndex","foldMap","duplicate","extend","filterWithIndex","alt","altW","partitionMapWithIndex","partitionMap","partitionWithIndex","partition","filter","separate","compact","filterMap","filterMapWithIndex","mapWithIndex","flatten","chain","zero","difference","intersection","union","comprehension","chunksOf","splitAt","chop","sortBy","uniq","array","prependToAll","snoc","cons","bind","bindTo","Do","some","every","unsafeDeleteAt","unsafeUpdateAt","unsafeInsertAt","Witherable","TraversableWithIndex","Traversable","FoldableWithIndex","Foldable","FilterableWithIndex","Filterable","Compactable","Extend","Alternative","Alt","Unfoldable","Monad","chainFirst","Chain","Applicative","Apply","FunctorWithIndex","Pointed","Chain_1","NEA","O","RA","Separated_1","start","end","onEmpty","onNonEmpty","as","out","none","predicate","as_1","spanLeftIndex","l","rest","_tag","right","left","compare","fc","Math","min","bs","middle","E","ords","g","go","scope","unionE","unionE_1","ys","elemE","xs","intersectionE_1","differenceE_1","_map","_mapWithIndex","_chain","ma","_filter","_filterMap","_partition","_partitionMap","_partitionWithIndex","predicateWithIndex","_partitionMapWithIndex","_alt","that","_reduce","_foldMap","foldMapM","_reduceRight","_reduceWithIndex","_foldMapWithIndex","foldMapWithIndexM","_reduceRightWithIndex","_filterMapWithIndex","_filterWithIndex","_extend","_traverse","traverseF","ta","_traverseWithIndex","traverseWithIndexF","_wither","witherF","_wilt","wiltF","_","identity","optionB","isSome","fa_1","separated","wa","fbs","bb","mt","b_1","splice","boundedNumber","Ord_1","equals","ordNumber","top","Infinity","bottom","tailRec","startWith","ab","getCompactableComposition","Option_1","C","_compact","fge","getLeft","getRight","getFilterable","getCompactable","throwError","chainW","apW","mapLeft","bimap","filterOrElse","filterOrElseW","orElse","orElseW","swap","chainOptionK","fromOptionK","toUnion","chainNullableK","fromNullableK","tryCatchK","tryCatch","fromNullable","getOrElse","getOrElseW","fold","match","foldW","matchW","fromPredicate","fromOption","isRight","isLeft","getValidation","getValidationMonoid","getValidationSemigroup","getApplyMonoid","either","stringifyJSON","parseJSON","sequenceArray","traverseArray","traverseArrayWithIndex","apSW","bindW","exists","toError","FromEither","MonadThrow","ChainRec","Bifunctor","chainFirstW","getAltValidation","getApplicativeValidation","getWitherable","Applicative_1","ChainRec_1","onNone","onFalse","onLeft","onRight","onThrow","from","flow","_bimap","_mapLeft","_chainRec","SE","SA","show","EL","EA","_E","ob","me","ea","F_","chainRec","fromEither","onError","u","stringify","MA","getEitherM","matchE","altValidation","leftF","rightF","fe","fea","e1","e2","_fold","_getOrElse","_orElse","rightM","leftM","eqDate","eqNumber","eqString","eqBoolean","eq","strictEqual","getStructEq","getTupleEq","Contravariant","eqStrict","contramap","struct","fromEquals","_equals","eqs","valueOf","gcd","field","fieldNumber","lcm","gcdSF","div","mul","add","one","sub","degree","getFilterableComposition","Compactable_1","_separate","chainEitherK","fromEitherK","fromOptionF","fromOptionKF","fromEitherKF","chainFirstIOK","chainIOK","fromIOK","fromIO","chainFirstM","chainFirstTaskK","chainTaskK","fromTaskK","fromTask","monoidProduct","monoidSum","monoidString","getEndomorphismMonoid","getFunctionMonoid","monoidAny","monoidAll","getMeetMonoid","getJoinMonoid","getDualMonoid","getStructMonoid","getTupleMonoid","concatAll","monoidVoid","max","Se","B","monoids","semigroupVoid","semigroupAll","semigroupAny","semigroupString","semigroupSum","semigroupProduct","__spreadArray","to","il","j","groupBy","groupSort","group","unappend","unprepend","fromArray","fromReadonlyNonEmptyArray","nonEmptyArray","unsnoc","uncons","Comonad","extract","RNEA","_loop_1","rest_1","uniqE","round","abs","floor","nea","sortO","groupO","cs","_b","rest_2","getFirstMonoid","toUndefined","toNullable","isNone","option","mapNullable","getRefinement","getLastMonoid","onSome","constNull","constUndefined","defaultSeparated","getOption","ordDate","ordString","ordBoolean","ord","getDualOrd","getTupleOrd","between","clamp","geq","leq","gt","lt","fromCompare","equalsDefault","Eq_1","_compare","ox","minO","maxO","low","hi","ltO","gtO","strictOrd","date","readonlyArray","toArray","N","elemE_1","element","aLen","bLen","ordering","Ord","fromReadonlyArray","readonlyNonEmptyArray","fromFoldableMap","fromFoldable","singleton","isSubrecord","pop","upsertAt","toUnfoldable","toReadonlyArray","collect","toRecord","fromRecord","readonlyRecord","U","sas","isSubrecordE_1","ks","deleteAtk","oa","ks_1","changed","fromFoldableMapM","fka","elements","isSubrecordE","record","RR","_hasOwnProperty","getFunctionSemigroup","getIntercalateSemigroup","getMeetSemigroup","getJoinSemigroup","getDualSemigroup","getStructSemigroup","getTupleSemigroup","getFirstSemigroup","getLastSemigroup","getObjectSemigroup","intercalate","constant","Or","semigroups","concatAllS","showNumber","showString","showBoolean","getStructShow","getTupleShow","shows","taskSeq","task","sequenceSeqArray","traverseSeqArray","traverseSeqArrayWithIndex","never","FromTask","FromIO","MonadTask","MonadIO","ApplicativeSeq","ApplySeq","ApplicativePar","ApplyPar","getRaceMonoid","delay","FromIO_1","millis","setTimeout","_apPar","_apSeq","all","race","getAltTaskValidation","getApplicativeTaskValidation","chainIOEitherK","chainIOEitherKW","fromIOEitherK","matchEW","fromIOEither","leftIO","rightIO","leftTask","rightTask","getTaskValidation","taskEitherSeq","taskEither","bracket","taskify","chainEitherKW","ET","Filterable_1","FromEither_1","FromTask_1","T","onRejected","reason","_alt2","acquire","use","release","ebs","eb","applicativeTaskValidation","altTaskValidation","hole","untupled","tupled","absurd","decrement","increment","flip","constVoid","constFalse","constTrue","not","unsafeCoerce","getRing","getSemiring","getBooleanAlgebra","meet","implies","getSemigroupM","R","bc","cd","de","ef","fg","gh","ij","jk","kl","lm","mn","no","op","pq","qr","rs","st","MonoidProduct","MonoidSum","SemigroupProduct","SemigroupSum","Show","Field","Bounded","Eq","Semigroup_1","Monoid_1","func","transform","funcProto","Function","objectProto","funcToString","objectCtorString","objectToString","getPrototype","getPrototypeOf","arg","isObjectLike","isHostObject","proto","Ctor","constructor","MAX_SAFE_INTEGER","argsTag","funcTag","genTag","symbolTag","freeGlobal","freeSelf","root","arrayPush","index","offset","propertyIsEnumerable","spreadableSymbol","isConcatSpreadable","nativeMax","baseFlatten","depth","isStrict","isFlattenable","isLength","tag","isObject","isFunction","isArrayLike","isArrayLikeObject","isArguments","toKey","isSymbol","pick","object","props","basePickBy","basePick","iteratee","arrayMap","otherArgs","global","window","getGlobal","default","toStringTag","Link","link_type","_linkType","linkType","includes","substring","RichText","Elements","heading1","heading2","heading3","heading4","heading5","heading6","paragraph","preformatted","strong","em","listItem","oListItem","list","oList","image","linkTo","target","label","copyright","embed","oembed","embed_url","provider_name","html","hyperlink","data","span","asText","asHtml","serialize","configurable","writable","PRIORITIES","NODE_TYPES","isParentOf","elected","others","lower","upper","TextNode","inner","outer","SpanNode","setChildren","boundaries","children","RichTextBlock","isEmbedBlock","isImageBlock","BlockNode","spans","isListItem","ListBlockNode","ListItemBlockNode","addChild","isOrderedListItem","OrderedListBlockNode","OrderedListItemBlockNode","emptyList","h","emptyOrderedList","Node","setPrototypeOf","__proto__","Reflect","construct","sham","Proxy","ReferenceError","getTime","random","asTree","fromRichText","return","exec","charCodeAt","createPreviewResolver","token","documentId","ref","PREVIEW_COOKIE","EXPERIMENT_COOKIE","masterRef","refs","isMasterRef","experiments","Experiments","bookmarks","httpClient","tags","types","languages","forms","SearchForm","everything","master","currentExperiment","current","query","req","refFromCookie","submit","queryFirst","page","pageSize","results","catch","getByID","lang","at","getByIDs","in","getByUID","getSingle","getBookmark","getPreviewResolver","previewSession","console","warn","mainDocument","accessToken","routes","apiDataTTL","requestHandler","apiCache","proxyAgent","timeoutInMs","cachedRequest","ttl","id","api","fields","fetchLinks","graphQuery","after","orderings","toSearchForm","LazySearchForm","multiple","action","Variation","variations","googleId","Experiment","drafts","running","parseInt","w","I","P","q","near","before","dayOfMonth","dayOfMonthAfter","dayOfMonthBefore","dayOfWeek","dayOfWeekAfter","dayOfWeekBefore","month","monthBefore","monthAfter","year","hour","hourBefore","hourAfter","inRange","missing","any","fulltext","similar","dateBefore","dateAfter","dateBetween","number","geopoint","_state","_handled","_value","_deferreds","_immediateFn","onFulfilled","_unhandledRejectionFn","finally","setImmediate","Accept","agent","clearTimeout","DefaultRequestHandler","limit","_keymap","MakeLRUCache","put","newer","older","log","find","removeAll","lru","isExpired","expiredIn","now","clear","DefaultApiCache","cache","cacheKey","substr","getApi","DefaultClient","experimentCookie","previewCookie","Predicates","Api","client","run","fun","nextTick","title","browser","env","argv","version","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","umask","process","postMessage","importScripts","onmessage","_n","source","addEventListener","attachEvent","MessageChannel","port1","port2","createElement","documentElement","onreadystatechange","removeChild","appendChild","clearImmediate","_id","_clearFn","setInterval","clearInterval","close","unref","enroll","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","active","_onTimeout","asyncGeneratorStep","gen","_next","_throw","info","_asyncToGenerator","fn","err","_assign","lowerCase","str","DEFAULT_SPLIT_REGEXP","DEFAULT_STRIP_REGEXP","re","RegExp","pascalCaseTransform","firstChar","lowerChars","pascalCase","splitRegexp","stripRegexp","_c","_d","delimiter","noCase","camelCaseTransform","_arrayWithHoles","arr","_nonIterableRest","_s","_e","_arr","unsupportedIterableToArray","_isNativeReflectConstruct","Boolean","_construct","Parent","Class","instance","_wrapNativeSuper","_cache","Map","Wrapper","_createForOfIteratorHelper","allowArrayLike","it","minLen","_arrayLikeToArray","_unsupportedIterableToArray","normalCompletion","didErr","step","_e2","arr2","_createSuper","Derived","hasNativeReflectConstruct","Super","NewTarget","_marked","toFailures","_marked2","_check","_defineProperty","ownKeys","enumerableOnly","getOwnPropertySymbols","symbols","sym","getOwnPropertyDescriptor","_objectSpread2","getOwnPropertyDescriptors","defineProperties","_objectWithoutProperties","excluded","sourceKeys","_objectWithoutPropertiesLoose","sourceSymbolKeys","context","_context","prev","fail","delegateYield","stop","iteratorShift","_input$next","Struct","schema","_props$coercer","coercer","_props$validator","validator","_props$refiner","refiner","StructError","_TypeError","_super","failure","moreFailures","_this","failuresResult","branch","message","failures","stack","assert","validate","coerce","ret","coercing","ctx","_args2","_context2","check","parent","coercion","_coercer","defaulted","fallback","strict","isPlainObject","refinement","_refiner","_context3","Element","_iterator","_step","_step$value","_context4","abrupt","t1","finish","isNaN","Structs","knowns","Never","createObjectCoercer","unknowns","_iterator4","_step4","Value","_iterator5","_step5","_key","_v","_context7","Set","delete","t3","optional","Key","_callee3","_context9","t0","string","_callee6","_iterator11","_step11","_ctx$check3","_ctx$check4","_context12","iterableToArray","toLiteralString","_step12","_iterator12","_step13","_iterator13","_key3","semigroupImgixUrlParams","TE","_fetch","res","separator","FIXED_RESOLUTIONS","FLUID_BREAKPOINT_FACTORS","DEFAULT_LQIP_PARAMS","blur","buildImgixUrl","secureUrlToken","params","param","URL","undefParams","defParams","mergedParams","product","searchParams","search","pathname","md5","createURLSignature","buildImgixLqipUrl","buildImgixFixed","width","height","sourceWidth","sourceHeight","aspectRatio","base64","imgixParams","placeholderImgixParams","src","srcSet","baseUrl","dpr","buildImgixFixedSrcSet","srcWebp","srcSetWebp","buildImgixFluid","maxWidth","maxHeight","srcSetBreakpoints","breakpoint","buildImgixFluidSrcSet","sizes","uuid","REGEX","byteToHex","z","ROTL","LinkFieldType","FieldType","GraphQLType","SliceChoiceDisplay","hashfunc","generateUUID","namespace","unescape","stringToBytes","DNS","v35","K","H","msg","ceil","Uint32Array","pow","_i2","W","_t","_t2","baseSchema","repositoryName","releaseID","schemas","linkResolver","htmlSerializer","typePathsFilenamePrefix","prismicToolbar","imageImgixParams","auto","fit","imagePlaceholderImgixParams","plugins","BrowserPluginOptions","shouldDownloadImage","webhookSecret","pathResolver","schemasDigest","mapObjValsP","async","buildSchemaTypeName","apiId","pascalCaseTransformMerge","isBrowser","IMAGE_FIELD_KEYS","createClient","nameOrUrl","addr","ActionType","normalizeField","doc","createNodeId","createNode","createContentDigest","typePaths","normalizeStructuredTextField","normalizeLinkField","normalizeImageField","normalizeSlicesField","stringifiedPath","def","Group","Slices","Image","StructuredText","AlternateLanguages","baseObj","thumbsObj","omit","thumb","thumbnails","normalizeObjs","sliceNodeId","normalizeObj","primary","slice_type","normalizedPrimary","normalizedItems","node","slice_label","internal","contentDigest","sliceNodeIds","item","Document","fieldApiId","objs","documentToNodes","pluginOptions","linkResolverForDoc","docNodeId","docUrl","normalizedData","alternate_languages","normalizedAlernativeLanguages","prismicId","dataString","dataRaw","_previewable","_apiId","_path","_doc","fixed","dimensions","fluid","getNodeById","linkResolverForField","linkedDocId","isBroken","hasNodeById","queryOptions","PrismicDOMLink","raw","prop","__typename","htmlSerializerForField","PrismicDOMRichText","initialState","isPreview","isLoading","previewData","reducer","state","IS_NOT_PREVIEW","IS_PREVIEW","DOCUMENT_LOADED","payload","rootNode","RESET","usePrismicPreview","useReducer","dispatch","hydratedOptions","useMemo","browserOptions","coerced","useEffect","asyncEffect","useCallback","setCookie","Content-Type","typePathsRes","nodeStore","uuidv5","resolvedPathResolver","traverseAndReplace","replacementNode","newNode","subnodeKey","subnode","mergePrismicPreviewData","staticData","strategy","previewDataRootNodeKey","DEFAULT_INITIAL_PAGES","createInitialState","pages","enabled","runtime","Op","hasOwn","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","define","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","Context","_invoke","GenStateSuspendedStart","GenStateExecuting","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","GenStateSuspendedYield","makeInvokeMethod","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","NativeIteratorPrototype","Gp","defineIteratorMethods","AsyncIterator","PromiseImpl","invoke","__await","unwrapped","previousPromise","callInvokeWithMethodAndArg","resultName","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","iterable","iteratorMethod","displayName","isGeneratorFunction","genFun","ctor","mark","awrap","iter","skipTempReset","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","thrown","regeneratorRu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IAAIl9C,EAAI7G,KAAKmkD,WAAWv9C,OAAS,EAAGC,GAAK,IAAKA,EAAG,CACpD,IAAIi9C,EAAQ9jD,KAAKmkD,WAAWt9C,GAC5B,GAAIi9C,EAAMC,SAAWA,EAAQ,CAC3B,IAAIt3B,EAASq3B,EAAMO,WACnB,GAAoB,UAAhB53B,EAAO5qB,KAAkB,CAC3B,IAAI8jD,EAASl5B,EAAOuI,IACpBovB,EAAcN,GAEhB,OAAO6B,GAMX,MAAM,IAAIt/C,MAAM,0BAGlB+nC,cAAe,SAASmW,EAAUb,EAAYC,GAa5C,OAZA3jD,KAAKmiD,SAAW,CACdphD,SAAUF,EAAO0jD,GACjBb,WAAYA,EACZC,QAASA,GAGS,SAAhB3jD,KAAK4D,SAGP5D,KAAKg1B,IAAMxwB,GAGN89C,IAQJjkD,EA7sBK,CAotBiBD,EAAOC,SAGtC,IACEunD,mBAAqB/E,EACrB,MAAOgF,GAUPpxB,SAAS,IAAK,yBAAdA,CAAwCosB","file":"0e1bd708a31102084572e653ea188f3cc21606bb-16d37afe481b20b2b890.js","sourcesContent":["module.exports = require(\"regenerator-runtime\");\n","(function (self) {\n if (self.fetch) {\n return;\n }\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob: 'FileReader' in self && 'Blob' in self && function () {\n try {\n new Blob();\n return true;\n } catch (e) {\n return false;\n }\n }(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n };\n\n if (support.arrayBuffer) {\n var viewClasses = ['[object Int8Array]', '[object Uint8Array]', '[object Uint8ClampedArray]', '[object Int16Array]', '[object Uint16Array]', '[object Int32Array]', '[object Uint32Array]', '[object Float32Array]', '[object Float64Array]'];\n\n var isDataView = function isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj);\n };\n\n var isArrayBufferView = ArrayBuffer.isView || function (obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1;\n };\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name');\n }\n\n return name.toLowerCase();\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n\n return value;\n } // Build a destructive iterator for the value list\n\n\n function iteratorFor(items) {\n var iterator = {\n next: function next() {\n var value = items.shift();\n return {\n done: value === undefined,\n value: value\n };\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function () {\n return iterator;\n };\n }\n\n return iterator;\n }\n\n function Headers(headers) {\n this.map = {};\n\n if (headers instanceof Headers) {\n headers.forEach(function (value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function (header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function (name) {\n this.append(name, headers[name]);\n }, this);\n }\n }\n\n Headers.prototype.append = function (name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ',' + value : value;\n };\n\n Headers.prototype['delete'] = function (name) {\n delete this.map[normalizeName(name)];\n };\n\n Headers.prototype.get = function (name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null;\n };\n\n Headers.prototype.has = function (name) {\n return this.map.hasOwnProperty(normalizeName(name));\n };\n\n Headers.prototype.set = function (name, value) {\n this.map[normalizeName(name)] = normalizeValue(value);\n };\n\n Headers.prototype.forEach = function (callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n };\n\n Headers.prototype.keys = function () {\n var items = [];\n this.forEach(function (value, name) {\n items.push(name);\n });\n return iteratorFor(items);\n };\n\n Headers.prototype.values = function () {\n var items = [];\n this.forEach(function (value) {\n items.push(value);\n });\n return iteratorFor(items);\n };\n\n Headers.prototype.entries = function () {\n var items = [];\n this.forEach(function (value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items);\n };\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'));\n }\n\n body.bodyUsed = true;\n }\n\n function fileReaderReady(reader) {\n return new Promise(function (resolve, reject) {\n reader.onload = function () {\n resolve(reader.result);\n };\n\n reader.onerror = function () {\n reject(reader.error);\n };\n });\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsArrayBuffer(blob);\n return promise;\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsText(blob);\n return promise;\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf);\n var chars = new Array(view.length);\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i]);\n }\n\n return chars.join('');\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0);\n } else {\n var view = new Uint8Array(buf.byteLength);\n view.set(new Uint8Array(buf));\n return view.buffer;\n }\n }\n\n function Body() {\n this.bodyUsed = false;\n\n this._initBody = function (body) {\n this._bodyInit = body;\n\n if (!body) {\n this._bodyText = '';\n } else if (typeof body === 'string') {\n this._bodyText = body;\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body;\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body;\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString();\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer); // IE 10-11 can't handle a DataView body.\n\n this._bodyInit = new Blob([this._bodyArrayBuffer]);\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body);\n } else {\n throw new Error('unsupported BodyInit type');\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8');\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type);\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n }\n };\n\n if (support.blob) {\n this.blob = function () {\n var rejected = consumed(this);\n\n if (rejected) {\n return rejected;\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob);\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]));\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob');\n } else {\n return Promise.resolve(new Blob([this._bodyText]));\n }\n };\n\n this.arrayBuffer = function () {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer);\n } else {\n return this.blob().then(readBlobAsArrayBuffer);\n }\n };\n }\n\n this.text = function () {\n var rejected = consumed(this);\n\n if (rejected) {\n return rejected;\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob);\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer));\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text');\n } else {\n return Promise.resolve(this._bodyText);\n }\n };\n\n if (support.formData) {\n this.formData = function () {\n return this.text().then(decode);\n };\n }\n\n this.json = function () {\n return this.text().then(JSON.parse);\n };\n\n return this;\n } // HTTP methods whose capitalization should be normalized\n\n\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase();\n return methods.indexOf(upcased) > -1 ? upcased : method;\n }\n\n function Request(input, options) {\n options = options || {};\n var body = options.body;\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read');\n }\n\n this.url = input.url;\n this.credentials = input.credentials;\n\n if (!options.headers) {\n this.headers = new Headers(input.headers);\n }\n\n this.method = input.method;\n this.mode = input.mode;\n\n if (!body && input._bodyInit != null) {\n body = input._bodyInit;\n input.bodyUsed = true;\n }\n } else {\n this.url = String(input);\n }\n\n this.credentials = options.credentials || this.credentials || 'omit';\n\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers);\n }\n\n this.method = normalizeMethod(options.method || this.method || 'GET');\n this.mode = options.mode || this.mode || null;\n this.referrer = null;\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests');\n }\n\n this._initBody(body);\n }\n\n Request.prototype.clone = function () {\n return new Request(this, {\n body: this._bodyInit\n });\n };\n\n function decode(body) {\n var form = new FormData();\n body.trim().split('&').forEach(function (bytes) {\n if (bytes) {\n var split = bytes.split('=');\n var name = split.shift().replace(/\\+/g, ' ');\n var value = split.join('=').replace(/\\+/g, ' ');\n form.append(decodeURIComponent(name), decodeURIComponent(value));\n }\n });\n return form;\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers(); // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n preProcessedHeaders.split(/\\r?\\n/).forEach(function (line) {\n var parts = line.split(':');\n var key = parts.shift().trim();\n\n if (key) {\n var value = parts.join(':').trim();\n headers.append(key, value);\n }\n });\n return headers;\n }\n\n Body.call(Request.prototype);\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {};\n }\n\n this.type = 'default';\n this.status = options.status === undefined ? 200 : options.status;\n this.ok = this.status >= 200 && this.status < 300;\n this.statusText = 'statusText' in options ? options.statusText : 'OK';\n this.headers = new Headers(options.headers);\n this.url = options.url || '';\n\n this._initBody(bodyInit);\n }\n\n Body.call(Response.prototype);\n\n Response.prototype.clone = function () {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n });\n };\n\n Response.error = function () {\n var response = new Response(null, {\n status: 0,\n statusText: ''\n });\n response.type = 'error';\n return response;\n };\n\n var redirectStatuses = [301, 302, 303, 307, 308];\n\n Response.redirect = function (url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code');\n }\n\n return new Response(null, {\n status: status,\n headers: {\n location: url\n }\n });\n };\n\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n\n self.fetch = function (input, init) {\n return new Promise(function (resolve, reject) {\n var request = new Request(input, init);\n var xhr = new XMLHttpRequest();\n\n xhr.onload = function () {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n };\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options));\n };\n\n xhr.onerror = function () {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.ontimeout = function () {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.open(request.method, request.url, true);\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true;\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false;\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob';\n }\n\n request.headers.forEach(function (value, name) {\n xhr.setRequestHeader(name, value);\n });\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n });\n };\n\n self.fetch.polyfill = true;\n})(typeof self !== 'undefined' ? self : this);","\"use strict\";\n\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\nexports.__esModule = true;\n\nfunction stringifyAttribute(name, value) {\n if (!value) {\n return '';\n }\n\n var stringified = '; ' + name;\n\n if (value === true) {\n return stringified; // boolean attributes shouldn't have a value\n }\n\n return stringified + '=' + value;\n}\n\nfunction stringifyAttributes(attributes) {\n if (typeof attributes.expires === 'number') {\n var expires = new Date();\n expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);\n attributes.expires = expires;\n }\n\n return stringifyAttribute('Expires', attributes.expires ? attributes.expires.toUTCString() : '') + stringifyAttribute('Domain', attributes.domain) + stringifyAttribute('Path', attributes.path) + stringifyAttribute('Secure', attributes.secure) + stringifyAttribute('SameSite', attributes.sameSite);\n}\n\nfunction encode(name, value, attributes) {\n return encodeURIComponent(name).replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent) // allowed special characters\n .replace(/\\(/g, '%28').replace(/\\)/g, '%29') // replace opening and closing parens\n + '=' + encodeURIComponent(value) // allowed special characters\n .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent) + stringifyAttributes(attributes);\n}\n\nexports.encode = encode;\n\nfunction parse(cookieString) {\n var result = {};\n var cookies = cookieString ? cookieString.split('; ') : [];\n var rdecode = /(%[\\dA-F]{2})+/gi;\n\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var cookie = parts.slice(1).join('=');\n\n if (cookie.charAt(0) === '\"') {\n cookie = cookie.slice(1, -1);\n }\n\n try {\n var name_1 = parts[0].replace(rdecode, decodeURIComponent);\n result[name_1] = cookie.replace(rdecode, decodeURIComponent);\n } catch (e) {// ignore cookies with invalid name/value encoding\n }\n }\n\n return result;\n}\n\nexports.parse = parse;\n\nfunction getAll() {\n return parse(document.cookie);\n}\n\nexports.getAll = getAll;\n\nfunction get(name) {\n return getAll()[name];\n}\n\nexports.get = get;\n\nfunction set(name, value, attributes) {\n document.cookie = encode(name, value, __assign({\n path: '/'\n }, attributes));\n}\n\nexports.set = set;\n\nfunction remove(name, attributes) {\n set(name, '', __assign(__assign({}, attributes), {\n expires: -1\n }));\n}\n\nexports.remove = remove;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getApplicativeComposition = exports.getApplicativeMonoid = void 0;\n/**\n * The `Applicative` type class extends the `Apply` type class with a `of` function, which can be used to create values\n * of type `f a` from values of type `a`.\n *\n * Where `Apply` provides the ability to lift functions of two or more arguments to functions whose arguments are\n * wrapped using `f`, and `Functor` provides the ability to lift functions of one argument, `pure` can be seen as the\n * function which lifts functions of _zero_ arguments. That is, `Applicative` functors support a lifting operation for\n * any number of function arguments.\n *\n * Instances must satisfy the following laws in addition to the `Apply` laws:\n *\n * 1. Identity: `A.ap(A.of(a => a), fa) <-> fa`\n * 2. Homomorphism: `A.ap(A.of(ab), A.of(a)) <-> A.of(ab(a))`\n * 3. Interchange: `A.ap(fab, A.of(a)) <-> A.ap(A.of(ab => ab(a)), fab)`\n *\n * Note. `Functor`'s `map` can be derived: `A.map(x, f) = A.ap(A.of(f), x)`\n *\n * @since 2.0.0\n */\n\nvar Apply_1 = require(\"./Apply\");\n\nvar function_1 = require(\"./function\");\n\nvar Functor_1 = require(\"./Functor\");\n\nfunction getApplicativeMonoid(F) {\n var f = Apply_1.getApplySemigroup(F);\n return function (M) {\n return {\n concat: f(M).concat,\n empty: F.of(M.empty)\n };\n };\n}\n\nexports.getApplicativeMonoid = getApplicativeMonoid;\n/** @deprecated */\n\nfunction getApplicativeComposition(F, G) {\n var map = Functor_1.getFunctorComposition(F, G).map;\n\n var _ap = Apply_1.ap(F, G);\n\n return {\n map: map,\n of: function of(a) {\n return F.of(G.of(a));\n },\n ap: function ap(fgab, fga) {\n return function_1.pipe(fgab, _ap(fga));\n }\n };\n}\n\nexports.getApplicativeComposition = getApplicativeComposition;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.sequenceS = exports.sequenceT = exports.getApplySemigroup = exports.apS = exports.apSecond = exports.apFirst = exports.ap = void 0;\n\nvar function_1 = require(\"./function\");\n\nfunction ap(F, G) {\n return function (fa) {\n return function (fab) {\n return F.ap(F.map(fab, function (gab) {\n return function (ga) {\n return G.ap(gab, ga);\n };\n }), fa);\n };\n };\n}\n\nexports.ap = ap;\n\nfunction apFirst(A) {\n return function (second) {\n return function (first) {\n return A.ap(A.map(first, function (a) {\n return function () {\n return a;\n };\n }), second);\n };\n };\n}\n\nexports.apFirst = apFirst;\n\nfunction apSecond(A) {\n return function (second) {\n return function (first) {\n return A.ap(A.map(first, function () {\n return function (b) {\n return b;\n };\n }), second);\n };\n };\n}\n\nexports.apSecond = apSecond;\n\nfunction apS(F) {\n return function (name, fb) {\n return function (fa) {\n return F.ap(F.map(fa, function (a) {\n return function (b) {\n var _a;\n\n return Object.assign({}, a, (_a = {}, _a[name] = b, _a));\n };\n }), fb);\n };\n };\n}\n\nexports.apS = apS;\n\nfunction getApplySemigroup(F) {\n return function (S) {\n return {\n concat: function concat(first, second) {\n return F.ap(F.map(first, function (x) {\n return function (y) {\n return S.concat(x, y);\n };\n }), second);\n }\n };\n };\n}\n\nexports.getApplySemigroup = getApplySemigroup;\n\nfunction curried(f, n, acc) {\n return function (x) {\n var combined = Array(acc.length + 1);\n\n for (var i = 0; i < acc.length; i++) {\n combined[i] = acc[i];\n }\n\n combined[acc.length] = x;\n return n === 0 ? f.apply(null, combined) : curried(f, n - 1, combined);\n };\n}\n\nvar tupleConstructors = {\n 1: function _(a) {\n return [a];\n },\n 2: function _(a) {\n return function (b) {\n return [a, b];\n };\n },\n 3: function _(a) {\n return function (b) {\n return function (c) {\n return [a, b, c];\n };\n };\n },\n 4: function _(a) {\n return function (b) {\n return function (c) {\n return function (d) {\n return [a, b, c, d];\n };\n };\n };\n },\n 5: function _(a) {\n return function (b) {\n return function (c) {\n return function (d) {\n return function (e) {\n return [a, b, c, d, e];\n };\n };\n };\n };\n }\n};\n\nfunction getTupleConstructor(len) {\n if (!tupleConstructors.hasOwnProperty(len)) {\n tupleConstructors[len] = curried(function_1.tuple, len - 1, []);\n }\n\n return tupleConstructors[len];\n}\n\nfunction sequenceT(F) {\n return function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var len = args.length;\n var f = getTupleConstructor(len);\n var fas = F.map(args[0], f);\n\n for (var i = 1; i < len; i++) {\n fas = F.ap(fas, args[i]);\n }\n\n return fas;\n };\n}\n\nexports.sequenceT = sequenceT;\n\nfunction getRecordConstructor(keys) {\n var len = keys.length;\n\n switch (len) {\n case 1:\n return function (a) {\n var _a;\n\n return _a = {}, _a[keys[0]] = a, _a;\n };\n\n case 2:\n return function (a) {\n return function (b) {\n var _a;\n\n return _a = {}, _a[keys[0]] = a, _a[keys[1]] = b, _a;\n };\n };\n\n case 3:\n return function (a) {\n return function (b) {\n return function (c) {\n var _a;\n\n return _a = {}, _a[keys[0]] = a, _a[keys[1]] = b, _a[keys[2]] = c, _a;\n };\n };\n };\n\n case 4:\n return function (a) {\n return function (b) {\n return function (c) {\n return function (d) {\n var _a;\n\n return _a = {}, _a[keys[0]] = a, _a[keys[1]] = b, _a[keys[2]] = c, _a[keys[3]] = d, _a;\n };\n };\n };\n };\n\n case 5:\n return function (a) {\n return function (b) {\n return function (c) {\n return function (d) {\n return function (e) {\n var _a;\n\n return _a = {}, _a[keys[0]] = a, _a[keys[1]] = b, _a[keys[2]] = c, _a[keys[3]] = d, _a[keys[4]] = e, _a;\n };\n };\n };\n };\n };\n\n default:\n return curried(function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var r = {};\n\n for (var i = 0; i < len; i++) {\n r[keys[i]] = args[i];\n }\n\n return r;\n }, len - 1, []);\n }\n}\n\nfunction sequenceS(F) {\n return function (r) {\n var keys = Object.keys(r);\n var len = keys.length;\n var f = getRecordConstructor(keys);\n var fr = F.map(r[keys[0]], f);\n\n for (var i = 1; i < len; i++) {\n fr = F.ap(fr, r[keys[i]]);\n }\n\n return fr;\n };\n}\n\nexports.sequenceS = sequenceS;","\"use strict\";\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nvar __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n});\n\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n }\n\n __setModuleDefault(result, mod);\n\n return result;\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.elem = exports.rotate = exports.intersperse = exports.prependAll = exports.unzip = exports.zip = exports.zipWith = exports.sort = exports.lefts = exports.rights = exports.reverse = exports.modifyAt = exports.deleteAt = exports.updateAt = exports.insertAt = exports.copy = exports.findLastIndex = exports.findLastMap = exports.findLast = exports.findFirstMap = exports.findFirst = exports.findIndex = exports.dropLeftWhile = exports.dropRight = exports.dropLeft = exports.spanLeft = exports.takeLeftWhile = exports.takeRight = exports.takeLeft = exports.init = exports.tail = exports.last = exports.head = exports.lookup = exports.isOutOfBound = exports.size = exports.isNonEmpty = exports.isEmpty = exports.scanRight = exports.scanLeft = exports.chainWithIndex = exports.foldRight = exports.matchRight = exports.foldLeft = exports.matchLeft = exports.replicate = exports.range = exports.makeBy = exports.append = exports.prepend = void 0;\nexports.flap = exports.Functor = exports.getOrd = exports.getEq = exports.getMonoid = exports.getSemigroup = exports.getShow = exports.URI = exports.unfold = exports.wilt = exports.wither = exports.traverseWithIndex = exports.sequence = exports.traverse = exports.reduceRightWithIndex = exports.reduceRight = exports.reduceWithIndex = exports.reduce = exports.foldMapWithIndex = exports.foldMap = exports.duplicate = exports.extend = exports.filterWithIndex = exports.alt = exports.altW = exports.partitionMapWithIndex = exports.partitionMap = exports.partitionWithIndex = exports.partition = exports.filter = exports.separate = exports.compact = exports.filterMap = exports.filterMapWithIndex = exports.mapWithIndex = exports.flatten = exports.chain = exports.ap = exports.map = exports.zero = exports.of = exports.difference = exports.intersection = exports.union = exports.comprehension = exports.chunksOf = exports.splitAt = exports.chop = exports.sortBy = exports.uniq = void 0;\nexports.array = exports.prependToAll = exports.snoc = exports.cons = exports.empty = exports.apS = exports.bind = exports.bindTo = exports.Do = exports.some = exports.every = exports.unsafeDeleteAt = exports.unsafeUpdateAt = exports.unsafeInsertAt = exports.Witherable = exports.TraversableWithIndex = exports.Traversable = exports.FoldableWithIndex = exports.Foldable = exports.FilterableWithIndex = exports.Filterable = exports.Compactable = exports.Extend = exports.Alternative = exports.Alt = exports.Unfoldable = exports.Monad = exports.chainFirst = exports.Chain = exports.Applicative = exports.apSecond = exports.apFirst = exports.Apply = exports.FunctorWithIndex = exports.Pointed = void 0;\n\nvar Apply_1 = require(\"./Apply\");\n\nvar Chain_1 = require(\"./Chain\");\n\nvar function_1 = require(\"./function\");\n\nvar Functor_1 = require(\"./Functor\");\n\nvar NEA = __importStar(require(\"./NonEmptyArray\"));\n\nvar O = __importStar(require(\"./Option\"));\n\nvar RA = __importStar(require(\"./ReadonlyArray\"));\n\nvar Separated_1 = require(\"./Separated\"); // -------------------------------------------------------------------------------------\n// constructors\n// -------------------------------------------------------------------------------------\n\n/**\n * Prepend an element to the front of a `Array`, creating a new `NonEmptyArray`.\n *\n * @example\n * import { prepend } from 'fp-ts/Array'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.deepStrictEqual(pipe([2, 3, 4], prepend(1)), [1, 2, 3, 4])\n *\n * @category constructors\n * @since 2.10.0\n */\n\n\nexports.prepend = NEA.prepend;\n/**\n * Append an element to the end of a `Array`, creating a new `NonEmptyArray`.\n *\n * @example\n * import { append } from 'fp-ts/Array'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.deepStrictEqual(pipe([1, 2, 3], append(4)), [1, 2, 3, 4])\n *\n * @category constructors\n * @since 2.10.0\n */\n\nexports.append = NEA.append;\n/**\n * Return a `Array` of length `n` with element `i` initialized with `f(i)`.\n *\n * **Note**. `n` is normalized to a non negative integer.\n *\n * @example\n * import { makeBy } from 'fp-ts/Array'\n *\n * const double = (n: number): number => n * 2\n * assert.deepStrictEqual(makeBy(5, double), [0, 2, 4, 6, 8])\n *\n * @category constructors\n * @since 2.0.0\n */\n\nvar makeBy = function makeBy(n, f) {\n return n <= 0 ? [] : NEA.makeBy(n, f);\n};\n\nexports.makeBy = makeBy;\n/**\n * Create an `Array` containing a range of integers, including both endpoints.\n *\n * @example\n * import { range } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(range(1, 5), [1, 2, 3, 4, 5])\n *\n * @category constructors\n * @since 2.0.0\n */\n\nvar range = function range(start, end) {\n return start <= end ? exports.makeBy(end - start + 1, function (i) {\n return start + i;\n }) : [start];\n};\n\nexports.range = range;\n/**\n * Create a `Array` containing a value repeated the specified number of times.\n *\n * **Note**. `n` is normalized to a non negative integer.\n *\n * @example\n * import { replicate } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(replicate(3, 'a'), ['a', 'a', 'a'])\n *\n * @category constructors\n * @since 2.0.0\n */\n\nvar replicate = function replicate(n, a) {\n return exports.makeBy(n, function () {\n return a;\n });\n};\n\nexports.replicate = replicate; // -------------------------------------------------------------------------------------\n// destructors\n// -------------------------------------------------------------------------------------\n\n/**\n * Break an array into its first element and remaining elements\n *\n * @example\n * import { matchLeft } from 'fp-ts/Array'\n *\n * const len: (as: Array) => number = matchLeft(() => 0, (_, tail) => 1 + len(tail))\n * assert.strictEqual(len([1, 2, 3]), 3)\n *\n * @category destructors\n * @since 2.10.0\n */\n\nvar matchLeft = function matchLeft(onEmpty, onNonEmpty) {\n return function (as) {\n return exports.isNonEmpty(as) ? onNonEmpty(NEA.head(as), NEA.tail(as)) : onEmpty();\n };\n};\n\nexports.matchLeft = matchLeft;\n/**\n * Alias of [`matchLeft`](#matchleft).\n *\n * @category destructors\n * @since 2.0.0\n */\n\nexports.foldLeft = exports.matchLeft;\n/**\n * Break an array into its initial elements and the last element\n *\n * @category destructors\n * @since 2.10.0\n */\n\nvar matchRight = function matchRight(onEmpty, onNonEmpty) {\n return function (as) {\n return exports.isNonEmpty(as) ? onNonEmpty(NEA.init(as), NEA.last(as)) : onEmpty();\n };\n};\n\nexports.matchRight = matchRight;\n/**\n * Alias of [`matchRight`](#matchright).\n *\n * @category destructors\n * @since 2.0.0\n */\n\nexports.foldRight = exports.matchRight; // -------------------------------------------------------------------------------------\n// combinators\n// -------------------------------------------------------------------------------------\n\n/**\n * @category combinators\n * @since 2.7.0\n */\n\nvar chainWithIndex = function chainWithIndex(f) {\n return function (as) {\n var out = [];\n\n for (var i = 0; i < as.length; i++) {\n out.push.apply(out, f(i, as[i]));\n }\n\n return out;\n };\n};\n\nexports.chainWithIndex = chainWithIndex;\n/**\n * Same as `reduce` but it carries over the intermediate steps\n *\n * @example\n * import { scanLeft } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(scanLeft(10, (b, a: number) => b - a)([1, 2, 3]), [10, 9, 7, 4])\n *\n * @category combinators\n * @since 2.0.0\n */\n\nvar scanLeft = function scanLeft(b, f) {\n return function (as) {\n var len = as.length;\n var out = new Array(len + 1);\n out[0] = b;\n\n for (var i = 0; i < len; i++) {\n out[i + 1] = f(out[i], as[i]);\n }\n\n return out;\n };\n};\n\nexports.scanLeft = scanLeft;\n/**\n * Fold an array from the right, keeping all intermediate results instead of only the final result\n *\n * @example\n * import { scanRight } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(scanRight(10, (a: number, b) => b - a)([1, 2, 3]), [4, 5, 7, 10])\n *\n * @category combinators\n * @since 2.0.0\n */\n\nvar scanRight = function scanRight(b, f) {\n return function (as) {\n var len = as.length;\n var out = new Array(len + 1);\n out[len] = b;\n\n for (var i = len - 1; i >= 0; i--) {\n out[i] = f(as[i], out[i + 1]);\n }\n\n return out;\n };\n};\n\nexports.scanRight = scanRight;\n/**\n * Test whether an array is empty\n *\n * @example\n * import { isEmpty } from 'fp-ts/Array'\n *\n * assert.strictEqual(isEmpty([]), true)\n *\n * @since 2.0.0\n */\n\nexports.isEmpty = RA.isEmpty;\n/**\n * Test whether an array is non empty narrowing down the type to `NonEmptyArray`\n *\n * @category guards\n * @since 2.0.0\n */\n\nexports.isNonEmpty = NEA.isNonEmpty;\n/**\n * Calculate the number of elements in a `Array`.\n *\n * @since 2.10.0\n */\n\nvar size = function size(as) {\n return as.length;\n};\n\nexports.size = size;\n/**\n * Test whether an array contains a particular index\n *\n * @since 2.0.0\n */\n\nexports.isOutOfBound = NEA.isOutOfBound; // TODO: remove non-curried overloading in v3\n\n/**\n * This function provides a safe way to read a value at a particular index from an array\n *\n * @example\n * import { lookup } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.deepStrictEqual(pipe([1, 2, 3], lookup(1)), some(2))\n * assert.deepStrictEqual(pipe([1, 2, 3], lookup(3)), none)\n *\n * @since 2.0.0\n */\n\nexports.lookup = RA.lookup;\n/**\n * Get the first element in an array, or `None` if the array is empty\n *\n * @example\n * import { head } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(head([1, 2, 3]), some(1))\n * assert.deepStrictEqual(head([]), none)\n *\n * @category destructors\n * @since 2.0.0\n */\n\nexports.head = RA.head;\n/**\n * Get the last element in an array, or `None` if the array is empty\n *\n * @example\n * import { last } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(last([1, 2, 3]), some(3))\n * assert.deepStrictEqual(last([]), none)\n *\n * @category destructors\n * @since 2.0.0\n */\n\nexports.last = RA.last;\n/**\n * Get all but the first element of an array, creating a new array, or `None` if the array is empty\n *\n * @example\n * import { tail } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(tail([1, 2, 3]), some([2, 3]))\n * assert.deepStrictEqual(tail([]), none)\n *\n * @category destructors\n * @since 2.0.0\n */\n\nvar tail = function tail(as) {\n return exports.isNonEmpty(as) ? O.some(NEA.tail(as)) : O.none;\n};\n\nexports.tail = tail;\n/**\n * Get all but the last element of an array, creating a new array, or `None` if the array is empty\n *\n * @example\n * import { init } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(init([1, 2, 3]), some([1, 2]))\n * assert.deepStrictEqual(init([]), none)\n *\n * @category destructors\n * @since 2.0.0\n */\n\nvar init = function init(as) {\n return exports.isNonEmpty(as) ? O.some(NEA.init(as)) : O.none;\n};\n\nexports.init = init;\n/**\n * Keep only a max number of elements from the start of an `Array`, creating a new `Array`.\n *\n * **Note**. `n` is normalized to a non negative integer.\n *\n * @example\n * import { takeLeft } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(takeLeft(2)([1, 2, 3]), [1, 2])\n *\n * @category combinators\n * @since 2.0.0\n */\n\nvar takeLeft = function takeLeft(n) {\n return function (as) {\n return exports.isOutOfBound(n, as) ? exports.copy(as) : as.slice(0, n);\n };\n};\n\nexports.takeLeft = takeLeft;\n/**\n * Keep only a max number of elements from the end of an `Array`, creating a new `Array`.\n *\n * **Note**. `n` is normalized to a non negative integer.\n *\n * @example\n * import { takeRight } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(takeRight(2)([1, 2, 3, 4, 5]), [4, 5])\n *\n * @category combinators\n * @since 2.0.0\n */\n\nvar takeRight = function takeRight(n) {\n return function (as) {\n return exports.isOutOfBound(n, as) ? exports.copy(as) : n === 0 ? [] : as.slice(-n);\n };\n};\n\nexports.takeRight = takeRight;\n\nfunction takeLeftWhile(predicate) {\n return function (as) {\n var out = [];\n\n for (var _i = 0, as_1 = as; _i < as_1.length; _i++) {\n var a = as_1[_i];\n\n if (!predicate(a)) {\n break;\n }\n\n out.push(a);\n }\n\n return out;\n };\n}\n\nexports.takeLeftWhile = takeLeftWhile;\n\nvar spanLeftIndex = function spanLeftIndex(as, predicate) {\n var l = as.length;\n var i = 0;\n\n for (; i < l; i++) {\n if (!predicate(as[i])) {\n break;\n }\n }\n\n return i;\n};\n\nfunction spanLeft(predicate) {\n return function (as) {\n var _a = exports.splitAt(spanLeftIndex(as, predicate))(as),\n init = _a[0],\n rest = _a[1];\n\n return {\n init: init,\n rest: rest\n };\n };\n}\n\nexports.spanLeft = spanLeft;\n/**\n * Drop a max number of elements from the start of an `Array`, creating a new `Array`.\n *\n * **Note**. `n` is normalized to a non negative integer.\n *\n * @example\n * import { dropLeft } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(dropLeft(2)([1, 2, 3]), [3])\n *\n * @category combinators\n * @since 2.0.0\n */\n\nvar dropLeft = function dropLeft(n) {\n return function (as) {\n return n <= 0 || exports.isEmpty(as) ? exports.copy(as) : n >= as.length ? [] : as.slice(n, as.length);\n };\n};\n\nexports.dropLeft = dropLeft;\n/**\n * Drop a max number of elements from the end of an `Array`, creating a new `Array`.\n *\n * **Note**. `n` is normalized to a non negative integer.\n *\n * @example\n * import { dropRight } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(dropRight(2)([1, 2, 3, 4, 5]), [1, 2, 3])\n *\n * @category combinators\n * @since 2.0.0\n */\n\nvar dropRight = function dropRight(n) {\n return function (as) {\n return n <= 0 || exports.isEmpty(as) ? exports.copy(as) : n >= as.length ? [] : as.slice(0, as.length - n);\n };\n};\n\nexports.dropRight = dropRight;\n/**\n * Remove the longest initial subarray for which all element satisfy the specified predicate, creating a new array\n *\n * @example\n * import { dropLeftWhile } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(dropLeftWhile((n: number) => n % 2 === 1)([1, 3, 2, 4, 5]), [2, 4, 5])\n *\n * @category combinators\n * @since 2.0.0\n */\n\nvar dropLeftWhile = function dropLeftWhile(predicate) {\n return function (as) {\n return as.slice(spanLeftIndex(as, predicate));\n };\n};\n\nexports.dropLeftWhile = dropLeftWhile;\n/**\n * Find the first index for which a predicate holds\n *\n * @example\n * import { findIndex } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(findIndex((n: number) => n === 2)([1, 2, 3]), some(1))\n * assert.deepStrictEqual(findIndex((n: number) => n === 2)([]), none)\n *\n * @since 2.0.0\n */\n\nexports.findIndex = RA.findIndex;\n\nfunction findFirst(predicate) {\n return RA.findFirst(predicate);\n}\n\nexports.findFirst = findFirst;\n/**\n * Find the first element returned by an option based selector function\n *\n * @example\n * import { findFirstMap } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * interface Person {\n * readonly name: string\n * readonly age?: number\n * }\n *\n * const persons: Array = [{ name: 'John' }, { name: 'Mary', age: 45 }, { name: 'Joey', age: 28 }]\n *\n * // returns the name of the first person that has an age\n * assert.deepStrictEqual(findFirstMap((p: Person) => (p.age === undefined ? none : some(p.name)))(persons), some('Mary'))\n *\n * @category destructors\n * @since 2.0.0\n */\n\nexports.findFirstMap = RA.findFirstMap;\n\nfunction findLast(predicate) {\n return RA.findLast(predicate);\n}\n\nexports.findLast = findLast;\n/**\n * Find the last element returned by an option based selector function\n *\n * @example\n * import { findLastMap } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * interface Person {\n * readonly name: string\n * readonly age?: number\n * }\n *\n * const persons: Array = [{ name: 'John' }, { name: 'Mary', age: 45 }, { name: 'Joey', age: 28 }]\n *\n * // returns the name of the last person that has an age\n * assert.deepStrictEqual(findLastMap((p: Person) => (p.age === undefined ? none : some(p.name)))(persons), some('Joey'))\n *\n * @category destructors\n * @since 2.0.0\n */\n\nexports.findLastMap = RA.findLastMap;\n/**\n * Returns the index of the last element of the list which matches the predicate\n *\n * @example\n * import { findLastIndex } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * interface X {\n * readonly a: number\n * readonly b: number\n * }\n * const xs: Array = [{ a: 1, b: 0 }, { a: 1, b: 1 }]\n * assert.deepStrictEqual(findLastIndex((x: { readonly a: number }) => x.a === 1)(xs), some(1))\n * assert.deepStrictEqual(findLastIndex((x: { readonly a: number }) => x.a === 4)(xs), none)\n *\n *\n * @since 2.0.0\n */\n\nexports.findLastIndex = RA.findLastIndex;\n/**\n * @category combinators\n * @since 2.0.0\n */\n\nvar copy = function copy(as) {\n return as.slice();\n};\n\nexports.copy = copy;\n/**\n * Insert an element at the specified index, creating a new array, or returning `None` if the index is out of bounds\n *\n * @example\n * import { insertAt } from 'fp-ts/Array'\n * import { some } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(insertAt(2, 5)([1, 2, 3, 4]), some([1, 2, 5, 3, 4]))\n *\n * @since 2.0.0\n */\n\nvar insertAt = function insertAt(i, a) {\n return function (as) {\n return i < 0 || i > as.length ? O.none : O.some(exports.unsafeInsertAt(i, a, as));\n };\n};\n\nexports.insertAt = insertAt;\n/**\n * Change the element at the specified index, creating a new array, or returning `None` if the index is out of bounds\n *\n * @example\n * import { updateAt } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(updateAt(1, 1)([1, 2, 3]), some([1, 1, 3]))\n * assert.deepStrictEqual(updateAt(1, 1)([]), none)\n *\n * @since 2.0.0\n */\n\nvar updateAt = function updateAt(i, a) {\n return exports.modifyAt(i, function () {\n return a;\n });\n};\n\nexports.updateAt = updateAt;\n/**\n * Delete the element at the specified index, creating a new array, or returning `None` if the index is out of bounds\n *\n * @example\n * import { deleteAt } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(deleteAt(0)([1, 2, 3]), some([2, 3]))\n * assert.deepStrictEqual(deleteAt(1)([]), none)\n *\n * @since 2.0.0\n */\n\nvar deleteAt = function deleteAt(i) {\n return function (as) {\n return exports.isOutOfBound(i, as) ? O.none : O.some(exports.unsafeDeleteAt(i, as));\n };\n};\n\nexports.deleteAt = deleteAt;\n/**\n * Apply a function to the element at the specified index, creating a new array, or returning `None` if the index is out\n * of bounds\n *\n * @example\n * import { modifyAt } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * const double = (x: number): number => x * 2\n * assert.deepStrictEqual(modifyAt(1, double)([1, 2, 3]), some([1, 4, 3]))\n * assert.deepStrictEqual(modifyAt(1, double)([]), none)\n *\n * @since 2.0.0\n */\n\nvar modifyAt = function modifyAt(i, f) {\n return function (as) {\n return exports.isOutOfBound(i, as) ? O.none : O.some(exports.unsafeUpdateAt(i, f(as[i]), as));\n };\n};\n\nexports.modifyAt = modifyAt;\n/**\n * Reverse an array, creating a new array\n *\n * @example\n * import { reverse } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(reverse([1, 2, 3]), [3, 2, 1])\n *\n * @category combinators\n * @since 2.0.0\n */\n\nvar reverse = function reverse(as) {\n return exports.isEmpty(as) ? [] : as.slice().reverse();\n};\n\nexports.reverse = reverse;\n/**\n * Extracts from an array of `Either` all the `Right` elements. All the `Right` elements are extracted in order\n *\n * @example\n * import { rights } from 'fp-ts/Array'\n * import { right, left } from 'fp-ts/Either'\n *\n * assert.deepStrictEqual(rights([right(1), left('foo'), right(2)]), [1, 2])\n *\n * @category combinators\n * @since 2.0.0\n */\n\nvar rights = function rights(as) {\n var r = [];\n\n for (var i = 0; i < as.length; i++) {\n var a = as[i];\n\n if (a._tag === 'Right') {\n r.push(a.right);\n }\n }\n\n return r;\n};\n\nexports.rights = rights;\n/**\n * Extracts from an array of `Either` all the `Left` elements. All the `Left` elements are extracted in order\n *\n * @example\n * import { lefts } from 'fp-ts/Array'\n * import { left, right } from 'fp-ts/Either'\n *\n * assert.deepStrictEqual(lefts([right(1), left('foo'), right(2)]), ['foo'])\n *\n * @category combinators\n * @since 2.0.0\n */\n\nvar lefts = function lefts(as) {\n var r = [];\n\n for (var i = 0; i < as.length; i++) {\n var a = as[i];\n\n if (a._tag === 'Left') {\n r.push(a.left);\n }\n }\n\n return r;\n};\n\nexports.lefts = lefts;\n/**\n * Sort the elements of an array in increasing order, creating a new array\n *\n * @example\n * import { sort } from 'fp-ts/Array'\n * import * as N from 'fp-ts/number'\n *\n * assert.deepStrictEqual(sort(N.Ord)([3, 2, 1]), [1, 2, 3])\n *\n * @category combinators\n * @since 2.0.0\n */\n\nvar sort = function sort(O) {\n return function (as) {\n return as.length <= 1 ? exports.copy(as) : as.slice().sort(O.compare);\n };\n};\n\nexports.sort = sort;\n/**\n * Apply a function to pairs of elements at the same index in two arrays, collecting the results in a new array. If one\n * input array is short, excess elements of the longer array are discarded.\n *\n * @example\n * import { zipWith } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(zipWith([1, 2, 3], ['a', 'b', 'c', 'd'], (n, s) => s + n), ['a1', 'b2', 'c3'])\n *\n * @category combinators\n * @since 2.0.0\n */\n\nvar zipWith = function zipWith(fa, fb, f) {\n var fc = [];\n var len = Math.min(fa.length, fb.length);\n\n for (var i = 0; i < len; i++) {\n fc[i] = f(fa[i], fb[i]);\n }\n\n return fc;\n};\n\nexports.zipWith = zipWith;\n\nfunction zip(as, bs) {\n if (bs === undefined) {\n return function (bs) {\n return zip(bs, as);\n };\n }\n\n return exports.zipWith(as, bs, function (a, b) {\n return [a, b];\n });\n}\n\nexports.zip = zip;\n/**\n * The function is reverse of `zip`. Takes an array of pairs and return two corresponding arrays\n *\n * @example\n * import { unzip } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(unzip([[1, 'a'], [2, 'b'], [3, 'c']]), [[1, 2, 3], ['a', 'b', 'c']])\n *\n * @since 2.0.0\n */\n\nvar unzip = function unzip(as) {\n var fa = [];\n var fb = [];\n\n for (var i = 0; i < as.length; i++) {\n fa[i] = as[i][0];\n fb[i] = as[i][1];\n }\n\n return [fa, fb];\n};\n\nexports.unzip = unzip;\n/**\n * Prepend an element to every member of an array\n *\n * @example\n * import { prependAll } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(prependAll(9)([1, 2, 3, 4]), [9, 1, 9, 2, 9, 3, 9, 4])\n *\n * @category combinators\n * @since 2.10.0\n */\n\nvar prependAll = function prependAll(middle) {\n var f = NEA.prependAll(middle);\n return function (as) {\n return exports.isNonEmpty(as) ? f(as) : [];\n };\n};\n\nexports.prependAll = prependAll;\n/**\n * Places an element in between members of an array\n *\n * @example\n * import { intersperse } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(intersperse(9)([1, 2, 3, 4]), [1, 9, 2, 9, 3, 9, 4])\n *\n * @category combinators\n * @since 2.9.0\n */\n\nvar intersperse = function intersperse(middle) {\n var f = NEA.intersperse(middle);\n return function (as) {\n return exports.isNonEmpty(as) ? f(as) : exports.copy(as);\n };\n};\n\nexports.intersperse = intersperse;\n/**\n * Rotate a `Array` by `n` steps.\n *\n * @example\n * import { rotate } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(rotate(2)([1, 2, 3, 4, 5]), [4, 5, 1, 2, 3])\n *\n * @category combinators\n * @since 2.0.0\n */\n\nvar rotate = function rotate(n) {\n var f = NEA.rotate(n);\n return function (as) {\n return exports.isNonEmpty(as) ? f(as) : exports.copy(as);\n };\n};\n\nexports.rotate = rotate; // TODO: remove non-curried overloading in v3\n\n/**\n * Test if a value is a member of an array. Takes a `Eq` as a single\n * argument which returns the function to use to search for a value of type `A` in\n * an array of type `Array`.\n *\n * @example\n * import { elem } from 'fp-ts/Array'\n * import * as N from 'fp-ts/number'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.strictEqual(pipe([1, 2, 3], elem(N.Eq)(2)), true)\n * assert.strictEqual(pipe([1, 2, 3], elem(N.Eq)(0)), false)\n *\n * @since 2.0.0\n */\n\nexports.elem = RA.elem;\n/**\n * Remove duplicates from an array, keeping the first occurrence of an element.\n *\n * @example\n * import { uniq } from 'fp-ts/Array'\n * import * as N from 'fp-ts/number'\n *\n * assert.deepStrictEqual(uniq(N.Eq)([1, 2, 1]), [1, 2])\n *\n * @category combinators\n * @since 2.0.0\n */\n\nvar uniq = function uniq(E) {\n var f = NEA.uniq(E);\n return function (as) {\n return exports.isNonEmpty(as) ? f(as) : exports.copy(as);\n };\n};\n\nexports.uniq = uniq;\n/**\n * Sort the elements of an array in increasing order, where elements are compared using first `ords[0]`, then `ords[1]`,\n * etc...\n *\n * @example\n * import { sortBy } from 'fp-ts/Array'\n * import { contramap } from 'fp-ts/Ord'\n * import * as S from 'fp-ts/string'\n * import * as N from 'fp-ts/number'\n * import { pipe } from 'fp-ts/function'\n *\n * interface Person {\n * readonly name: string\n * readonly age: number\n * }\n * const byName = pipe(S.Ord, contramap((p: Person) => p.name))\n * const byAge = pipe(N.Ord, contramap((p: Person) => p.age))\n *\n * const sortByNameByAge = sortBy([byName, byAge])\n *\n * const persons = [{ name: 'a', age: 1 }, { name: 'b', age: 3 }, { name: 'c', age: 2 }, { name: 'b', age: 2 }]\n * assert.deepStrictEqual(sortByNameByAge(persons), [\n * { name: 'a', age: 1 },\n * { name: 'b', age: 2 },\n * { name: 'b', age: 3 },\n * { name: 'c', age: 2 }\n * ])\n *\n * @category combinators\n * @since 2.0.0\n */\n\nvar sortBy = function sortBy(ords) {\n var f = NEA.sortBy(ords);\n return function (as) {\n return exports.isNonEmpty(as) ? f(as) : exports.copy(as);\n };\n};\n\nexports.sortBy = sortBy;\n/**\n * A useful recursion pattern for processing an array to produce a new array, often used for \"chopping\" up the input\n * array. Typically chop is called with some function that will consume an initial prefix of the array and produce a\n * value and the rest of the array.\n *\n * @example\n * import { Eq } from 'fp-ts/Eq'\n * import * as A from 'fp-ts/Array'\n * import * as N from 'fp-ts/number'\n * import { pipe } from 'fp-ts/function'\n *\n * const group = (S: Eq): ((as: Array) => Array>) => {\n * return A.chop(as => {\n * const { init, rest } = pipe(as, A.spanLeft((a: A) => S.equals(a, as[0])))\n * return [init, rest]\n * })\n * }\n * assert.deepStrictEqual(group(N.Eq)([1, 1, 2, 3, 3, 4]), [[1, 1], [2], [3, 3], [4]])\n *\n * @category combinators\n * @since 2.0.0\n */\n\nvar chop = function chop(f) {\n var g = NEA.chop(f);\n return function (as) {\n return exports.isNonEmpty(as) ? g(as) : [];\n };\n};\n\nexports.chop = chop;\n/**\n * Splits an `Array` into two pieces, the first piece has max `n` elements.\n *\n * @example\n * import { splitAt } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(splitAt(2)([1, 2, 3, 4, 5]), [[1, 2], [3, 4, 5]])\n *\n * @category combinators\n * @since 2.0.0\n */\n\nvar splitAt = function splitAt(n) {\n return function (as) {\n return n >= 1 && exports.isNonEmpty(as) ? NEA.splitAt(n)(as) : exports.isEmpty(as) ? [exports.copy(as), []] : [[], exports.copy(as)];\n };\n};\n\nexports.splitAt = splitAt;\n/**\n * Splits an array into length-`n` pieces. The last piece will be shorter if `n` does not evenly divide the length of\n * the array. Note that `chunksOf(n)([])` is `[]`, not `[[]]`. This is intentional, and is consistent with a recursive\n * definition of `chunksOf`; it satisfies the property that\n *\n * ```ts\n * chunksOf(n)(xs).concat(chunksOf(n)(ys)) == chunksOf(n)(xs.concat(ys)))\n * ```\n *\n * whenever `n` evenly divides the length of `xs`.\n *\n * @example\n * import { chunksOf } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(chunksOf(2)([1, 2, 3, 4, 5]), [[1, 2], [3, 4], [5]])\n *\n * @category combinators\n * @since 2.0.0\n */\n\nvar chunksOf = function chunksOf(n) {\n var f = NEA.chunksOf(n);\n return function (as) {\n return exports.isNonEmpty(as) ? f(as) : [];\n };\n};\n\nexports.chunksOf = chunksOf;\n\nfunction comprehension(input, f, g) {\n if (g === void 0) {\n g = function g() {\n return true;\n };\n }\n\n var go = function go(scope, input) {\n return exports.isNonEmpty(input) ? function_1.pipe(NEA.head(input), exports.chain(function (x) {\n return go(function_1.pipe(scope, exports.append(x)), NEA.tail(input));\n })) : g.apply(void 0, scope) ? [f.apply(void 0, scope)] : [];\n };\n\n return go([], input);\n}\n\nexports.comprehension = comprehension;\n\nfunction union(E) {\n var unionE = NEA.union(E);\n return function (first, second) {\n if (second === undefined) {\n var unionE_1 = union(E);\n return function (ys) {\n return unionE_1(ys, first);\n };\n }\n\n return exports.isNonEmpty(first) && exports.isNonEmpty(second) ? unionE(first, second) : exports.isNonEmpty(first) ? exports.copy(first) : exports.copy(second);\n };\n}\n\nexports.union = union;\n\nfunction intersection(E) {\n var elemE = exports.elem(E);\n return function (xs, ys) {\n if (ys === undefined) {\n var intersectionE_1 = intersection(E);\n return function (ys) {\n return intersectionE_1(ys, xs);\n };\n }\n\n return xs.filter(function (a) {\n return elemE(a, ys);\n });\n };\n}\n\nexports.intersection = intersection;\n\nfunction difference(E) {\n var elemE = exports.elem(E);\n return function (xs, ys) {\n if (ys === undefined) {\n var differenceE_1 = difference(E);\n return function (ys) {\n return differenceE_1(ys, xs);\n };\n }\n\n return xs.filter(function (a) {\n return !elemE(a, ys);\n });\n };\n}\n\nexports.difference = difference; // -------------------------------------------------------------------------------------\n// non-pipeables\n// -------------------------------------------------------------------------------------\n\nvar _map = function _map(fa, f) {\n return function_1.pipe(fa, exports.map(f));\n};\n/* istanbul ignore next */\n\n\nvar _mapWithIndex = function _mapWithIndex(fa, f) {\n return function_1.pipe(fa, exports.mapWithIndex(f));\n};\n\nvar _ap = function _ap(fab, fa) {\n return function_1.pipe(fab, exports.ap(fa));\n};\n\nvar _chain = function _chain(ma, f) {\n return function_1.pipe(ma, exports.chain(f));\n};\n/* istanbul ignore next */\n\n\nvar _filter = function _filter(fa, predicate) {\n return function_1.pipe(fa, exports.filter(predicate));\n};\n/* istanbul ignore next */\n\n\nvar _filterMap = function _filterMap(fa, f) {\n return function_1.pipe(fa, exports.filterMap(f));\n};\n/* istanbul ignore next */\n\n\nvar _partition = function _partition(fa, predicate) {\n return function_1.pipe(fa, exports.partition(predicate));\n};\n/* istanbul ignore next */\n\n\nvar _partitionMap = function _partitionMap(fa, f) {\n return function_1.pipe(fa, exports.partitionMap(f));\n};\n/* istanbul ignore next */\n\n\nvar _partitionWithIndex = function _partitionWithIndex(fa, predicateWithIndex) {\n return function_1.pipe(fa, exports.partitionWithIndex(predicateWithIndex));\n};\n/* istanbul ignore next */\n\n\nvar _partitionMapWithIndex = function _partitionMapWithIndex(fa, f) {\n return function_1.pipe(fa, exports.partitionMapWithIndex(f));\n};\n/* istanbul ignore next */\n\n\nvar _alt = function _alt(fa, that) {\n return function_1.pipe(fa, exports.alt(that));\n};\n\nvar _reduce = function _reduce(fa, b, f) {\n return function_1.pipe(fa, exports.reduce(b, f));\n};\n/* istanbul ignore next */\n\n\nvar _foldMap = function _foldMap(M) {\n var foldMapM = exports.foldMap(M);\n return function (fa, f) {\n return function_1.pipe(fa, foldMapM(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _reduceRight = function _reduceRight(fa, b, f) {\n return function_1.pipe(fa, exports.reduceRight(b, f));\n};\n/* istanbul ignore next */\n\n\nvar _reduceWithIndex = function _reduceWithIndex(fa, b, f) {\n return function_1.pipe(fa, exports.reduceWithIndex(b, f));\n};\n/* istanbul ignore next */\n\n\nvar _foldMapWithIndex = function _foldMapWithIndex(M) {\n var foldMapWithIndexM = exports.foldMapWithIndex(M);\n return function (fa, f) {\n return function_1.pipe(fa, foldMapWithIndexM(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _reduceRightWithIndex = function _reduceRightWithIndex(fa, b, f) {\n return function_1.pipe(fa, exports.reduceRightWithIndex(b, f));\n};\n/* istanbul ignore next */\n\n\nvar _filterMapWithIndex = function _filterMapWithIndex(fa, f) {\n return function_1.pipe(fa, exports.filterMapWithIndex(f));\n};\n/* istanbul ignore next */\n\n\nvar _filterWithIndex = function _filterWithIndex(fa, predicateWithIndex) {\n return function_1.pipe(fa, exports.filterWithIndex(predicateWithIndex));\n};\n/* istanbul ignore next */\n\n\nvar _extend = function _extend(fa, f) {\n return function_1.pipe(fa, exports.extend(f));\n};\n/* istanbul ignore next */\n\n\nvar _traverse = function _traverse(F) {\n var traverseF = exports.traverse(F);\n return function (ta, f) {\n return function_1.pipe(ta, traverseF(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _traverseWithIndex = function _traverseWithIndex(F) {\n var traverseWithIndexF = exports.traverseWithIndex(F);\n return function (ta, f) {\n return function_1.pipe(ta, traverseWithIndexF(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _wither = function _wither(F) {\n var witherF = exports.wither(F);\n return function (fa, f) {\n return function_1.pipe(fa, witherF(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _wilt = function _wilt(F) {\n var wiltF = exports.wilt(F);\n return function (fa, f) {\n return function_1.pipe(fa, wiltF(f));\n };\n}; // -------------------------------------------------------------------------------------\n// type class members\n// -------------------------------------------------------------------------------------\n\n/**\n * @category Pointed\n * @since 2.0.0\n */\n\n\nexports.of = NEA.of;\n/**\n * @category Alternative\n * @since 2.7.0\n */\n\nvar zero = function zero() {\n return [];\n};\n\nexports.zero = zero;\n/**\n * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F) => F` whose argument and return types\n * use the type constructor `F` to represent some computational context.\n *\n * @category Functor\n * @since 2.0.0\n */\n\nvar map = function map(f) {\n return function (fa) {\n return fa.map(function (a) {\n return f(a);\n });\n };\n};\n\nexports.map = map;\n/**\n * Apply a function to an argument under a type constructor.\n *\n * @category Apply\n * @since 2.0.0\n */\n\nvar ap = function ap(fa) {\n return exports.chain(function (f) {\n return function_1.pipe(fa, exports.map(f));\n });\n};\n\nexports.ap = ap;\n/**\n * Composes computations in sequence, using the return value of one computation to determine the next computation.\n *\n * @category Monad\n * @since 2.0.0\n */\n\nvar chain = function chain(f) {\n return function (ma) {\n return function_1.pipe(ma, exports.chainWithIndex(function (_, a) {\n return f(a);\n }));\n };\n};\n\nexports.chain = chain;\n/**\n * Derivable from `Chain`.\n *\n * @category combinators\n * @since 2.5.0\n */\n\nexports.flatten = /*#__PURE__*/exports.chain(function_1.identity);\n/**\n * @category FunctorWithIndex\n * @since 2.0.0\n */\n\nvar mapWithIndex = function mapWithIndex(f) {\n return function (fa) {\n return fa.map(function (a, i) {\n return f(i, a);\n });\n };\n};\n\nexports.mapWithIndex = mapWithIndex;\n/**\n * @category FilterableWithIndex\n * @since 2.0.0\n */\n\nvar filterMapWithIndex = function filterMapWithIndex(f) {\n return function (fa) {\n var out = [];\n\n for (var i = 0; i < fa.length; i++) {\n var optionB = f(i, fa[i]);\n\n if (O.isSome(optionB)) {\n out.push(optionB.value);\n }\n }\n\n return out;\n };\n};\n\nexports.filterMapWithIndex = filterMapWithIndex;\n/**\n * @category Filterable\n * @since 2.0.0\n */\n\nvar filterMap = function filterMap(f) {\n return exports.filterMapWithIndex(function (_, a) {\n return f(a);\n });\n};\n\nexports.filterMap = filterMap;\n/**\n * @category Compactable\n * @since 2.0.0\n */\n\nexports.compact = /*#__PURE__*/exports.filterMap(function_1.identity);\n/**\n * @category Compactable\n * @since 2.0.0\n */\n\nvar separate = function separate(fa) {\n var left = [];\n var right = [];\n\n for (var _i = 0, fa_1 = fa; _i < fa_1.length; _i++) {\n var e = fa_1[_i];\n\n if (e._tag === 'Left') {\n left.push(e.left);\n } else {\n right.push(e.right);\n }\n }\n\n return Separated_1.separated(left, right);\n};\n\nexports.separate = separate;\n/**\n * @category Filterable\n * @since 2.0.0\n */\n\nvar filter = function filter(predicate) {\n return function (fa) {\n return fa.filter(predicate);\n };\n};\n\nexports.filter = filter;\n/**\n * @category Filterable\n * @since 2.0.0\n */\n\nvar partition = function partition(predicate) {\n return exports.partitionWithIndex(function (_, a) {\n return predicate(a);\n });\n};\n\nexports.partition = partition;\n/**\n * @category FilterableWithIndex\n * @since 2.0.0\n */\n\nvar partitionWithIndex = function partitionWithIndex(predicateWithIndex) {\n return function (fa) {\n var left = [];\n var right = [];\n\n for (var i = 0; i < fa.length; i++) {\n var a = fa[i];\n\n if (predicateWithIndex(i, a)) {\n right.push(a);\n } else {\n left.push(a);\n }\n }\n\n return Separated_1.separated(left, right);\n };\n};\n\nexports.partitionWithIndex = partitionWithIndex;\n/**\n * @category Filterable\n * @since 2.0.0\n */\n\nvar partitionMap = function partitionMap(f) {\n return exports.partitionMapWithIndex(function (_, a) {\n return f(a);\n });\n};\n\nexports.partitionMap = partitionMap;\n/**\n * @category FilterableWithIndex\n * @since 2.0.0\n */\n\nvar partitionMapWithIndex = function partitionMapWithIndex(f) {\n return function (fa) {\n var left = [];\n var right = [];\n\n for (var i = 0; i < fa.length; i++) {\n var e = f(i, fa[i]);\n\n if (e._tag === 'Left') {\n left.push(e.left);\n } else {\n right.push(e.right);\n }\n }\n\n return Separated_1.separated(left, right);\n };\n};\n\nexports.partitionMapWithIndex = partitionMapWithIndex;\n/**\n * Less strict version of [`alt`](#alt).\n *\n * @category Alt\n * @since 2.9.0\n */\n\nvar altW = function altW(that) {\n return function (fa) {\n return fa.concat(that());\n };\n};\n\nexports.altW = altW;\n/**\n * Identifies an associative operation on a type constructor. It is similar to `Semigroup`, except that it applies to\n * types of kind `* -> *`.\n *\n * @category Alt\n * @since 2.0.0\n */\n\nexports.alt = exports.altW;\n/**\n * @category FilterableWithIndex\n * @since 2.0.0\n */\n\nvar filterWithIndex = function filterWithIndex(predicateWithIndex) {\n return function (fa) {\n return fa.filter(function (a, i) {\n return predicateWithIndex(i, a);\n });\n };\n};\n\nexports.filterWithIndex = filterWithIndex;\n/**\n * @category Extend\n * @since 2.0.0\n */\n\nvar extend = function extend(f) {\n return function (wa) {\n return wa.map(function (_, i) {\n return f(wa.slice(i));\n });\n };\n};\n\nexports.extend = extend;\n/**\n * Derivable from `Extend`.\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.duplicate = /*#__PURE__*/exports.extend(function_1.identity);\n/**\n * @category Foldable\n * @since 2.0.0\n */\n\nexports.foldMap = RA.foldMap;\n/**\n * @category FoldableWithIndex\n * @since 2.0.0\n */\n\nexports.foldMapWithIndex = RA.foldMapWithIndex;\n/**\n * @category Foldable\n * @since 2.0.0\n */\n\nexports.reduce = RA.reduce;\n/**\n * @category FoldableWithIndex\n * @since 2.0.0\n */\n\nexports.reduceWithIndex = RA.reduceWithIndex;\n/**\n * @category Foldable\n * @since 2.0.0\n */\n\nexports.reduceRight = RA.reduceRight;\n/**\n * @category FoldableWithIndex\n * @since 2.0.0\n */\n\nexports.reduceRightWithIndex = RA.reduceRightWithIndex;\n/**\n * @category Traversable\n * @since 2.6.3\n */\n\nvar traverse = function traverse(F) {\n var traverseWithIndexF = exports.traverseWithIndex(F);\n return function (f) {\n return traverseWithIndexF(function (_, a) {\n return f(a);\n });\n };\n};\n\nexports.traverse = traverse;\n/**\n * @category Traversable\n * @since 2.6.3\n */\n\nvar sequence = function sequence(F) {\n return function (ta) {\n return _reduce(ta, F.of(exports.zero()), function (fas, fa) {\n return F.ap(F.map(fas, function (as) {\n return function (a) {\n return function_1.pipe(as, exports.append(a));\n };\n }), fa);\n });\n };\n};\n\nexports.sequence = sequence;\n/**\n * @category TraversableWithIndex\n * @since 2.6.3\n */\n\nvar traverseWithIndex = function traverseWithIndex(F) {\n return function (f) {\n return exports.reduceWithIndex(F.of(exports.zero()), function (i, fbs, a) {\n return F.ap(F.map(fbs, function (bs) {\n return function (b) {\n return function_1.pipe(bs, exports.append(b));\n };\n }), f(i, a));\n });\n };\n};\n\nexports.traverseWithIndex = traverseWithIndex;\n/**\n * @category Witherable\n * @since 2.6.5\n */\n\nvar wither = function wither(F) {\n var traverseF = exports.traverse(F);\n return function (f) {\n return function (fa) {\n return F.map(function_1.pipe(fa, traverseF(f)), exports.compact);\n };\n };\n};\n\nexports.wither = wither;\n/**\n * @category Witherable\n * @since 2.6.5\n */\n\nvar wilt = function wilt(F) {\n var traverseF = exports.traverse(F);\n return function (f) {\n return function (fa) {\n return F.map(function_1.pipe(fa, traverseF(f)), exports.separate);\n };\n };\n};\n\nexports.wilt = wilt;\n/**\n * @category Unfoldable\n * @since 2.6.6\n */\n\nvar unfold = function unfold(b, f) {\n var out = [];\n var bb = b;\n\n while (true) {\n var mt = f(bb);\n\n if (O.isSome(mt)) {\n var _a = mt.value,\n a = _a[0],\n b_1 = _a[1];\n out.push(a);\n bb = b_1;\n } else {\n break;\n }\n }\n\n return out;\n};\n\nexports.unfold = unfold; // -------------------------------------------------------------------------------------\n// instances\n// -------------------------------------------------------------------------------------\n\n/**\n * @category instances\n * @since 2.0.0\n */\n\nexports.URI = 'Array';\n/**\n * @category instances\n * @since 2.0.0\n */\n\nexports.getShow = RA.getShow;\n/**\n * @category instances\n * @since 2.10.0\n */\n\nvar getSemigroup = function getSemigroup() {\n return {\n concat: function concat(first, second) {\n return first.concat(second);\n }\n };\n};\n\nexports.getSemigroup = getSemigroup;\n/**\n * Returns a `Monoid` for `Array`\n *\n * @example\n * import { getMonoid } from 'fp-ts/Array'\n *\n * const M = getMonoid()\n * assert.deepStrictEqual(M.concat([1, 2], [3, 4]), [1, 2, 3, 4])\n *\n * @category instances\n * @since 2.0.0\n */\n\nvar getMonoid = function getMonoid() {\n return {\n concat: exports.getSemigroup().concat,\n empty: []\n };\n};\n\nexports.getMonoid = getMonoid;\n/**\n * Derives an `Eq` over the `Array` of a given element type from the `Eq` of that type. The derived `Eq` defines two\n * arrays as equal if all elements of both arrays are compared equal pairwise with the given `E`. In case of arrays of\n * different lengths, the result is non equality.\n *\n * @example\n * import * as S from 'fp-ts/string'\n * import { getEq } from 'fp-ts/Array'\n *\n * const E = getEq(S.Eq)\n * assert.strictEqual(E.equals(['a', 'b'], ['a', 'b']), true)\n * assert.strictEqual(E.equals(['a'], []), false)\n *\n * @category instances\n * @since 2.0.0\n */\n\nexports.getEq = RA.getEq;\n/**\n * Derives an `Ord` over the `Array` of a given element type from the `Ord` of that type. The ordering between two such\n * arrays is equal to: the first non equal comparison of each arrays elements taken pairwise in increasing order, in\n * case of equality over all the pairwise elements; the longest array is considered the greatest, if both arrays have\n * the same length, the result is equality.\n *\n * @example\n * import { getOrd } from 'fp-ts/Array'\n * import * as S from 'fp-ts/string'\n *\n * const O = getOrd(S.Ord)\n * assert.strictEqual(O.compare(['b'], ['a']), 1)\n * assert.strictEqual(O.compare(['a'], ['a']), 0)\n * assert.strictEqual(O.compare(['a'], ['b']), -1)\n *\n * @category instances\n * @since 2.0.0\n */\n\nexports.getOrd = RA.getOrd;\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Functor = {\n URI: exports.URI,\n map: _map\n};\n/**\n * Derivable from `Functor`.\n *\n * @category combinators\n * @since 2.10.0\n */\n\nexports.flap =\n/*#_PURE_*/\nFunctor_1.flap(exports.Functor);\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Pointed = {\n URI: exports.URI,\n of: exports.of\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.FunctorWithIndex = {\n URI: exports.URI,\n map: _map,\n mapWithIndex: _mapWithIndex\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Apply = {\n URI: exports.URI,\n map: _map,\n ap: _ap\n};\n/**\n * Combine two effectful actions, keeping only the result of the first.\n *\n * Derivable from `Apply`.\n *\n * @category combinators\n * @since 2.5.0\n */\n\nexports.apFirst = /*#__PURE__*/Apply_1.apFirst(exports.Apply);\n/**\n * Combine two effectful actions, keeping only the result of the second.\n *\n * Derivable from `Apply`.\n *\n * @category combinators\n * @since 2.5.0\n */\n\nexports.apSecond = /*#__PURE__*/Apply_1.apSecond(exports.Apply);\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Applicative = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n of: exports.of\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Chain = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n chain: _chain\n};\n/**\n * Composes computations in sequence, using the return value of one computation to determine the next computation and\n * keeping only the result of the first.\n *\n * Derivable from `Chain`.\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.chainFirst = /*#__PURE__*/Chain_1.chainFirst(exports.Chain);\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Monad = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n of: exports.of,\n chain: _chain\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Unfoldable = {\n URI: exports.URI,\n unfold: exports.unfold\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Alt = {\n URI: exports.URI,\n map: _map,\n alt: _alt\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Alternative = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n of: exports.of,\n alt: _alt,\n zero: exports.zero\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Extend = {\n URI: exports.URI,\n map: _map,\n extend: _extend\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Compactable = {\n URI: exports.URI,\n compact: exports.compact,\n separate: exports.separate\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Filterable = {\n URI: exports.URI,\n map: _map,\n compact: exports.compact,\n separate: exports.separate,\n filter: _filter,\n filterMap: _filterMap,\n partition: _partition,\n partitionMap: _partitionMap\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.FilterableWithIndex = {\n URI: exports.URI,\n map: _map,\n mapWithIndex: _mapWithIndex,\n compact: exports.compact,\n separate: exports.separate,\n filter: _filter,\n filterMap: _filterMap,\n partition: _partition,\n partitionMap: _partitionMap,\n partitionMapWithIndex: _partitionMapWithIndex,\n partitionWithIndex: _partitionWithIndex,\n filterMapWithIndex: _filterMapWithIndex,\n filterWithIndex: _filterWithIndex\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Foldable = {\n URI: exports.URI,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.FoldableWithIndex = {\n URI: exports.URI,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n reduceWithIndex: _reduceWithIndex,\n foldMapWithIndex: _foldMapWithIndex,\n reduceRightWithIndex: _reduceRightWithIndex\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Traversable = {\n URI: exports.URI,\n map: _map,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: exports.sequence\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.TraversableWithIndex = {\n URI: exports.URI,\n map: _map,\n mapWithIndex: _mapWithIndex,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n reduceWithIndex: _reduceWithIndex,\n foldMapWithIndex: _foldMapWithIndex,\n reduceRightWithIndex: _reduceRightWithIndex,\n traverse: _traverse,\n sequence: exports.sequence,\n traverseWithIndex: _traverseWithIndex\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Witherable = {\n URI: exports.URI,\n map: _map,\n compact: exports.compact,\n separate: exports.separate,\n filter: _filter,\n filterMap: _filterMap,\n partition: _partition,\n partitionMap: _partitionMap,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: exports.sequence,\n wither: _wither,\n wilt: _wilt\n}; // -------------------------------------------------------------------------------------\n// unsafe\n// -------------------------------------------------------------------------------------\n\n/**\n * @category unsafe\n * @since 2.0.0\n */\n\nexports.unsafeInsertAt = NEA.unsafeInsertAt;\n/**\n * @category unsafe\n * @since 2.0.0\n */\n\nvar unsafeUpdateAt = function unsafeUpdateAt(i, a, as) {\n return exports.isNonEmpty(as) ? NEA.unsafeUpdateAt(i, a, as) : [];\n};\n\nexports.unsafeUpdateAt = unsafeUpdateAt;\n/**\n * @category unsafe\n * @since 2.0.0\n */\n\nvar unsafeDeleteAt = function unsafeDeleteAt(i, as) {\n var xs = as.slice();\n xs.splice(i, 1);\n return xs;\n};\n\nexports.unsafeDeleteAt = unsafeDeleteAt; // -------------------------------------------------------------------------------------\n// utils\n// -------------------------------------------------------------------------------------\n\n/**\n * @since 2.9.0\n */\n\nexports.every = RA.every;\n/**\n * @since 2.9.0\n */\n\nvar some = function some(predicate) {\n return function (as) {\n return as.some(predicate);\n };\n};\n\nexports.some = some; // -------------------------------------------------------------------------------------\n// do notation\n// -------------------------------------------------------------------------------------\n\n/**\n * @since 2.9.0\n */\n\nexports.Do = /*#__PURE__*/exports.of({});\n/**\n * @since 2.8.0\n */\n\nexports.bindTo = /*#__PURE__*/Functor_1.bindTo(exports.Functor);\n/**\n * @since 2.8.0\n */\n\nexports.bind = /*#__PURE__*/Chain_1.bind(exports.Chain); // -------------------------------------------------------------------------------------\n// pipeable sequence S\n// -------------------------------------------------------------------------------------\n\n/**\n * @since 2.8.0\n */\n\nexports.apS = /*#__PURE__*/Apply_1.apS(exports.Apply); // -------------------------------------------------------------------------------------\n// deprecated\n// -------------------------------------------------------------------------------------\n\n/**\n * Use a new `[]` instead.\n *\n * @since 2.0.0\n * @deprecated\n */\n\nexports.empty = [];\n/**\n * Use `prepend` instead.\n *\n * @category constructors\n * @since 2.0.0\n * @deprecated\n */\n// tslint:disable-next-line: deprecation\n\nexports.cons = NEA.cons;\n/**\n * Use `append` instead.\n *\n * @category constructors\n * @since 2.0.0\n * @deprecated\n */\n// tslint:disable-next-line: deprecation\n\nexports.snoc = NEA.snoc;\n/**\n * Use `prependAll` instead\n *\n * @category combinators\n * @since 2.9.0\n * @deprecated\n */\n\nexports.prependToAll = exports.prependAll;\n/**\n * Use small, specific instances instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.array = {\n URI: exports.URI,\n compact: exports.compact,\n separate: exports.separate,\n map: _map,\n ap: _ap,\n of: exports.of,\n chain: _chain,\n filter: _filter,\n filterMap: _filterMap,\n partition: _partition,\n partitionMap: _partitionMap,\n mapWithIndex: _mapWithIndex,\n partitionMapWithIndex: _partitionMapWithIndex,\n partitionWithIndex: _partitionWithIndex,\n filterMapWithIndex: _filterMapWithIndex,\n filterWithIndex: _filterWithIndex,\n alt: _alt,\n zero: exports.zero,\n unfold: exports.unfold,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: exports.sequence,\n reduceWithIndex: _reduceWithIndex,\n foldMapWithIndex: _foldMapWithIndex,\n reduceRightWithIndex: _reduceRightWithIndex,\n traverseWithIndex: _traverseWithIndex,\n extend: _extend,\n wither: _wither,\n wilt: _wilt\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.boundedNumber = void 0;\n/**\n * The `Bounded` type class represents totally ordered types that have an upper and lower boundary.\n *\n * Instances should satisfy the following law in addition to the `Ord` laws:\n *\n * - Bounded: `bottom <= a <= top`\n *\n * @since 2.0.0\n */\n\nvar Ord_1 = require(\"./Ord\"); // -------------------------------------------------------------------------------------\n// deprecated\n// -------------------------------------------------------------------------------------\n\n/**\n * Use [`Bounded`](./number.ts.html#Bounded) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\n\nexports.boundedNumber = {\n // tslint:disable-next-line: deprecation\n equals: Ord_1.ordNumber.equals,\n // tslint:disable-next-line: deprecation\n compare: Ord_1.ordNumber.compare,\n top: Infinity,\n bottom: -Infinity\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.bind = exports.chainFirst = void 0;\n\nfunction chainFirst(M) {\n return function (f) {\n return function (first) {\n return M.chain(first, function (a) {\n return M.map(f(a), function () {\n return a;\n });\n });\n };\n };\n}\n\nexports.chainFirst = chainFirst;\n\nfunction bind(M) {\n return function (name, f) {\n return function (ma) {\n return M.chain(ma, function (a) {\n return M.map(f(a), function (b) {\n var _a;\n\n return Object.assign({}, a, (_a = {}, _a[name] = b, _a));\n });\n });\n };\n };\n}\n\nexports.bind = bind;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.tailRec = void 0;\n/**\n * @since 2.0.0\n */\n\nvar tailRec = function tailRec(startWith, f) {\n var ab = f(startWith);\n\n while (ab._tag === 'Left') {\n ab = f(ab.left);\n }\n\n return ab.right;\n};\n\nexports.tailRec = tailRec;","\"use strict\";\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nvar __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n});\n\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n }\n\n __setModuleDefault(result, mod);\n\n return result;\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getCompactableComposition = exports.separate = exports.compact = void 0;\n\nvar function_1 = require(\"./function\");\n\nvar Functor_1 = require(\"./Functor\");\n\nvar Option_1 = require(\"./Option\");\n\nvar S = __importStar(require(\"./Separated\"));\n\nfunction compact(F, G) {\n return function (fga) {\n return F.map(fga, G.compact);\n };\n}\n\nexports.compact = compact;\n\nfunction separate(F, C, G) {\n var _compact = compact(F, C);\n\n var _map = Functor_1.map(F, G);\n\n return function (fge) {\n return S.separated(_compact(function_1.pipe(fge, _map(Option_1.getLeft))), _compact(function_1.pipe(fge, _map(Option_1.getRight))));\n };\n}\n\nexports.separate = separate;\n/** @deprecated */\n\nfunction getCompactableComposition(F, G) {\n var map = Functor_1.getFunctorComposition(F, G).map;\n return {\n map: map,\n compact: compact(F, G),\n separate: separate(F, G, G)\n };\n}\n\nexports.getCompactableComposition = getCompactableComposition;","\"use strict\";\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nvar __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n});\n\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n }\n\n __setModuleDefault(result, mod);\n\n return result;\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getFilterable = exports.getCompactable = exports.getSemigroup = exports.getEq = exports.getShow = exports.URI = exports.throwError = exports.sequence = exports.traverse = exports.reduceRight = exports.foldMap = exports.reduce = exports.duplicate = exports.extend = exports.alt = exports.altW = exports.flatten = exports.chain = exports.chainW = exports.of = exports.ap = exports.apW = exports.mapLeft = exports.bimap = exports.map = exports.filterOrElse = exports.filterOrElseW = exports.orElse = exports.orElseW = exports.swap = exports.chainOptionK = exports.fromOptionK = exports.toUnion = exports.chainNullableK = exports.fromNullableK = exports.tryCatchK = exports.tryCatch = exports.fromNullable = exports.getOrElse = exports.getOrElseW = exports.fold = exports.match = exports.foldW = exports.matchW = exports.fromPredicate = exports.fromOption = exports.right = exports.left = exports.isRight = exports.isLeft = void 0;\nexports.getValidation = exports.getValidationMonoid = exports.getValidationSemigroup = exports.getApplyMonoid = exports.getApplySemigroup = exports.either = exports.stringifyJSON = exports.parseJSON = exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.apSW = exports.apS = exports.bindW = exports.bind = exports.bindTo = exports.Do = exports.exists = exports.elem = exports.toError = exports.FromEither = exports.MonadThrow = exports.ChainRec = exports.Extend = exports.Alt = exports.Bifunctor = exports.Traversable = exports.Foldable = exports.chainFirstW = exports.chainFirst = exports.Monad = exports.Chain = exports.Applicative = exports.apSecond = exports.apFirst = exports.Apply = exports.Pointed = exports.flap = exports.Functor = exports.getAltValidation = exports.getApplicativeValidation = exports.getWitherable = void 0;\n\nvar Applicative_1 = require(\"./Applicative\");\n\nvar Apply_1 = require(\"./Apply\");\n\nvar Chain_1 = require(\"./Chain\");\n\nvar ChainRec_1 = require(\"./ChainRec\");\n\nvar function_1 = require(\"./function\");\n\nvar Functor_1 = require(\"./Functor\");\n\nvar _ = __importStar(require(\"./internal\"));\n\nvar Separated_1 = require(\"./Separated\"); // -------------------------------------------------------------------------------------\n// guards\n// -------------------------------------------------------------------------------------\n\n/**\n * Returns `true` if the either is an instance of `Left`, `false` otherwise.\n *\n * @category guards\n * @since 2.0.0\n */\n\n\nexports.isLeft = _.isLeft;\n/**\n * Returns `true` if the either is an instance of `Right`, `false` otherwise.\n *\n * @category guards\n * @since 2.0.0\n */\n\nvar isRight = function isRight(ma) {\n return ma._tag === 'Right';\n};\n\nexports.isRight = isRight; // -------------------------------------------------------------------------------------\n// constructors\n// -------------------------------------------------------------------------------------\n\n/**\n * Constructs a new `Either` holding a `Left` value. This usually represents a failure, due to the right-bias of this\n * structure.\n *\n * @category constructors\n * @since 2.0.0\n */\n\nvar left = function left(e) {\n return {\n _tag: 'Left',\n left: e\n };\n};\n\nexports.left = left;\n/**\n * Constructs a new `Either` holding a `Right` value. This usually represents a successful value due to the right bias\n * of this structure.\n *\n * @category constructors\n * @since 2.0.0\n */\n\nvar right = function right(a) {\n return {\n _tag: 'Right',\n right: a\n };\n};\n\nexports.right = right;\n/**\n * @example\n * import { fromOption, left, right } from 'fp-ts/Either'\n * import { pipe } from 'fp-ts/function'\n * import { none, some } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(\n * pipe(\n * some(1),\n * fromOption(() => 'error')\n * ),\n * right(1)\n * )\n * assert.deepStrictEqual(\n * pipe(\n * none,\n * fromOption(() => 'error')\n * ),\n * left('error')\n * )\n *\n * @category constructors\n * @since 2.0.0\n */\n\nvar fromOption = function fromOption(onNone) {\n return function (ma) {\n return ma._tag === 'None' ? exports.left(onNone()) : exports.right(ma.value);\n };\n};\n\nexports.fromOption = fromOption;\n/**\n * @example\n * import { fromPredicate, left, right } from 'fp-ts/Either'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.deepStrictEqual(\n * pipe(\n * 1,\n * fromPredicate(\n * (n) => n > 0,\n * () => 'error'\n * )\n * ),\n * right(1)\n * )\n * assert.deepStrictEqual(\n * pipe(\n * -1,\n * fromPredicate(\n * (n) => n > 0,\n * () => 'error'\n * )\n * ),\n * left('error')\n * )\n *\n * @category constructors\n * @since 2.0.0\n */\n\nvar fromPredicate = function fromPredicate(predicate, onFalse) {\n return function (a) {\n return predicate(a) ? exports.right(a) : exports.left(onFalse(a));\n };\n};\n\nexports.fromPredicate = fromPredicate; // -------------------------------------------------------------------------------------\n// destructors\n// -------------------------------------------------------------------------------------\n\n/**\n * Less strict version of [`match`](#match).\n *\n * @category destructors\n * @since 2.10.0\n */\n\nvar matchW = function matchW(onLeft, onRight) {\n return function (ma) {\n return exports.isLeft(ma) ? onLeft(ma.left) : onRight(ma.right);\n };\n};\n\nexports.matchW = matchW;\n/**\n * Alias of [`matchW`](#matchww).\n *\n * @category destructors\n * @since 2.10.0\n */\n\nexports.foldW = exports.matchW;\n/**\n * Takes two functions and an `Either` value, if the value is a `Left` the inner value is applied to the first function,\n * if the value is a `Right` the inner value is applied to the second function.\n *\n * @example\n * import { match, left, right } from 'fp-ts/Either'\n * import { pipe } from 'fp-ts/function'\n *\n * function onLeft(errors: Array): string {\n * return `Errors: ${errors.join(', ')}`\n * }\n *\n * function onRight(value: number): string {\n * return `Ok: ${value}`\n * }\n *\n * assert.strictEqual(\n * pipe(\n * right(1),\n * match(onLeft, onRight)\n * ),\n * 'Ok: 1'\n * )\n * assert.strictEqual(\n * pipe(\n * left(['error 1', 'error 2']),\n * match(onLeft, onRight)\n * ),\n * 'Errors: error 1, error 2'\n * )\n *\n * @category destructors\n * @since 2.10.0\n */\n\nexports.match = exports.matchW;\n/**\n * Alias of [`match`](#match).\n *\n * @category destructors\n * @since 2.0.0\n */\n\nexports.fold = exports.match;\n/**\n * Less strict version of [`getOrElse`](#getorelse).\n *\n * @category destructors\n * @since 2.6.0\n */\n\nvar getOrElseW = function getOrElseW(onLeft) {\n return function (ma) {\n return exports.isLeft(ma) ? onLeft(ma.left) : ma.right;\n };\n};\n\nexports.getOrElseW = getOrElseW;\n/**\n * Returns the wrapped value if it's a `Right` or a default value if is a `Left`.\n *\n * @example\n * import { getOrElse, left, right } from 'fp-ts/Either'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.deepStrictEqual(\n * pipe(\n * right(1),\n * getOrElse(() => 0)\n * ),\n * 1\n * )\n * assert.deepStrictEqual(\n * pipe(\n * left('error'),\n * getOrElse(() => 0)\n * ),\n * 0\n * )\n *\n * @category destructors\n * @since 2.0.0\n */\n\nexports.getOrElse = exports.getOrElseW; // -------------------------------------------------------------------------------------\n// interop\n// -------------------------------------------------------------------------------------\n// TODO: make lazy in v3\n\n/**\n * Takes a default and a nullable value, if the value is not nully, turn it into a `Right`, if the value is nully use\n * the provided default as a `Left`.\n *\n * @example\n * import { fromNullable, left, right } from 'fp-ts/Either'\n *\n * const parse = fromNullable('nully')\n *\n * assert.deepStrictEqual(parse(1), right(1))\n * assert.deepStrictEqual(parse(null), left('nully'))\n *\n * @category interop\n * @since 2.0.0\n */\n\nvar fromNullable = function fromNullable(e) {\n return function (a) {\n return a == null ? exports.left(e) : exports.right(a);\n };\n};\n\nexports.fromNullable = fromNullable;\n/**\n * Constructs a new `Either` from a function that might throw.\n *\n * See also [`tryCatchK`](#trycatchk).\n *\n * @example\n * import * as E from 'fp-ts/Either'\n *\n * const unsafeHead = (as: ReadonlyArray): A => {\n * if (as.length > 0) {\n * return as[0]\n * } else {\n * throw new Error('empty array')\n * }\n * }\n *\n * const head = (as: ReadonlyArray): E.Either =>\n * E.tryCatch(() => unsafeHead(as), e => (e instanceof Error ? e : new Error('unknown error')))\n *\n * assert.deepStrictEqual(head([]), E.left(new Error('empty array')))\n * assert.deepStrictEqual(head([1, 2, 3]), E.right(1))\n *\n * @category interop\n * @since 2.0.0\n */\n\nvar tryCatch = function tryCatch(f, onThrow) {\n try {\n return exports.right(f());\n } catch (e) {\n return exports.left(onThrow(e));\n }\n};\n\nexports.tryCatch = tryCatch;\n/**\n * Converts a function that may throw to one returning a `Either`.\n *\n * @category interop\n * @since 2.10.0\n */\n\nvar tryCatchK = function tryCatchK(f, onThrow) {\n return function () {\n var a = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n a[_i] = arguments[_i];\n }\n\n return exports.tryCatch(function () {\n return f.apply(void 0, a);\n }, onThrow);\n };\n};\n\nexports.tryCatchK = tryCatchK;\n/**\n * @category interop\n * @since 2.9.0\n */\n\nvar fromNullableK = function fromNullableK(e) {\n var from = exports.fromNullable(e);\n return function (f) {\n return function_1.flow(f, from);\n };\n};\n\nexports.fromNullableK = fromNullableK;\n/**\n * @category interop\n * @since 2.9.0\n */\n\nvar chainNullableK = function chainNullableK(e) {\n var from = exports.fromNullableK(e);\n return function (f) {\n return exports.chain(from(f));\n };\n};\n\nexports.chainNullableK = chainNullableK;\n/**\n * @category interop\n * @since 2.10.0\n */\n\nexports.toUnion = /*#__PURE__*/exports.foldW(function_1.identity, function_1.identity); // -------------------------------------------------------------------------------------\n// combinators\n// -------------------------------------------------------------------------------------\n\n/**\n * @category combinators\n * @since 2.10.0\n */\n\nvar fromOptionK = function fromOptionK(onNone) {\n var from = exports.fromOption(onNone);\n return function (f) {\n return function_1.flow(f, from);\n };\n};\n\nexports.fromOptionK = fromOptionK;\n/**\n * @category combinators\n * @since 2.10.0\n */\n\nvar chainOptionK = function chainOptionK(onNone) {\n var from = exports.fromOptionK(onNone);\n return function (f) {\n return exports.chain(from(f));\n };\n};\n\nexports.chainOptionK = chainOptionK;\n/**\n * Returns a `Right` if is a `Left` (and vice versa).\n *\n * @category combinators\n * @since 2.0.0\n */\n\nfunction swap(ma) {\n return exports.isLeft(ma) ? exports.right(ma.left) : exports.left(ma.right);\n}\n\nexports.swap = swap;\n/**\n * Less strict version of [`orElse`](#orelse).\n *\n * @category combinators\n * @since 2.10.0\n */\n\nvar orElseW = function orElseW(onLeft) {\n return function (ma) {\n return exports.isLeft(ma) ? onLeft(ma.left) : ma;\n };\n};\n\nexports.orElseW = orElseW;\n/**\n * Useful for recovering from errors.\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.orElse = exports.orElseW;\n/**\n * Less strict version of [`filterOrElse`](#filterorelse).\n *\n * @category combinators\n * @since 2.9.0\n */\n\nvar filterOrElseW = function filterOrElseW(predicate, onFalse) {\n return exports.chainW(function (a) {\n return predicate(a) ? exports.right(a) : exports.left(onFalse(a));\n });\n};\n\nexports.filterOrElseW = filterOrElseW;\n/**\n * @example\n * import { filterOrElse as filterOrElse, left, right } from 'fp-ts/Either'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.deepStrictEqual(\n * pipe(\n * right(1),\n * filterOrElse(\n * (n) => n > 0,\n * () => 'error'\n * )\n * ),\n * right(1)\n * )\n * assert.deepStrictEqual(\n * pipe(\n * right(-1),\n * filterOrElse(\n * (n) => n > 0,\n * () => 'error'\n * )\n * ),\n * left('error')\n * )\n * assert.deepStrictEqual(\n * pipe(\n * left('a'),\n * filterOrElse(\n * (n) => n > 0,\n * () => 'error'\n * )\n * ),\n * left('a')\n * )\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.filterOrElse = exports.filterOrElseW; // -------------------------------------------------------------------------------------\n// non-pipeables\n// -------------------------------------------------------------------------------------\n\nvar _map = function _map(fa, f) {\n return function_1.pipe(fa, exports.map(f));\n};\n\nvar _ap = function _ap(fab, fa) {\n return function_1.pipe(fab, exports.ap(fa));\n};\n/* istanbul ignore next */\n\n\nvar _chain = function _chain(ma, f) {\n return function_1.pipe(ma, exports.chain(f));\n};\n/* istanbul ignore next */\n\n\nvar _reduce = function _reduce(fa, b, f) {\n return function_1.pipe(fa, exports.reduce(b, f));\n};\n/* istanbul ignore next */\n\n\nvar _foldMap = function _foldMap(M) {\n return function (fa, f) {\n var foldMapM = exports.foldMap(M);\n return function_1.pipe(fa, foldMapM(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _reduceRight = function _reduceRight(fa, b, f) {\n return function_1.pipe(fa, exports.reduceRight(b, f));\n};\n\nvar _traverse = function _traverse(F) {\n var traverseF = exports.traverse(F);\n return function (ta, f) {\n return function_1.pipe(ta, traverseF(f));\n };\n};\n\nvar _bimap = function _bimap(fa, f, g) {\n return function_1.pipe(fa, exports.bimap(f, g));\n};\n\nvar _mapLeft = function _mapLeft(fa, f) {\n return function_1.pipe(fa, exports.mapLeft(f));\n};\n/* istanbul ignore next */\n\n\nvar _alt = function _alt(fa, that) {\n return function_1.pipe(fa, exports.alt(that));\n};\n/* istanbul ignore next */\n\n\nvar _extend = function _extend(wa, f) {\n return function_1.pipe(wa, exports.extend(f));\n};\n\nvar _chainRec = function _chainRec(a, f) {\n return ChainRec_1.tailRec(f(a), function (e) {\n return exports.isLeft(e) ? exports.right(exports.left(e.left)) : exports.isLeft(e.right) ? exports.left(f(e.right.left)) : exports.right(exports.right(e.right.right));\n });\n}; // -------------------------------------------------------------------------------------\n// type class members\n// -------------------------------------------------------------------------------------\n\n/**\n * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F) => F` whose argument and return types\n * use the type constructor `F` to represent some computational context.\n *\n * @category Functor\n * @since 2.0.0\n */\n\n\nvar map = function map(f) {\n return function (fa) {\n return exports.isLeft(fa) ? fa : exports.right(f(fa.right));\n };\n};\n\nexports.map = map;\n/**\n * Map a pair of functions over the two type arguments of the bifunctor.\n *\n * @category Bifunctor\n * @since 2.0.0\n */\n\nvar bimap = function bimap(f, g) {\n return function (fa) {\n return exports.isLeft(fa) ? exports.left(f(fa.left)) : exports.right(g(fa.right));\n };\n};\n\nexports.bimap = bimap;\n/**\n * Map a function over the first type argument of a bifunctor.\n *\n * @category Bifunctor\n * @since 2.0.0\n */\n\nvar mapLeft = function mapLeft(f) {\n return function (fa) {\n return exports.isLeft(fa) ? exports.left(f(fa.left)) : fa;\n };\n};\n\nexports.mapLeft = mapLeft;\n/**\n * Less strict version of [`ap`](#ap).\n *\n * @category Apply\n * @since 2.8.0\n */\n\nvar apW = function apW(fa) {\n return function (fab) {\n return exports.isLeft(fab) ? fab : exports.isLeft(fa) ? fa : exports.right(fab.right(fa.right));\n };\n};\n\nexports.apW = apW;\n/**\n * Apply a function to an argument under a type constructor.\n *\n * @category Apply\n * @since 2.0.0\n */\n\nexports.ap = exports.apW;\n/**\n * @category Pointed\n * @since 2.7.0\n */\n\nexports.of = exports.right;\n/**\n * Less strict version of [`chain`](#chain).\n *\n * @category Monad\n * @since 2.6.0\n */\n\nvar chainW = function chainW(f) {\n return function (ma) {\n return exports.isLeft(ma) ? ma : f(ma.right);\n };\n};\n\nexports.chainW = chainW;\n/**\n * Composes computations in sequence, using the return value of one computation to determine the next computation.\n *\n * @category Monad\n * @since 2.0.0\n */\n\nexports.chain = exports.chainW;\n/**\n * The `flatten` function is the conventional monad join operator. It is used to remove one level of monadic structure, projecting its bound argument into the outer level.\n *\n * Derivable from `Chain`.\n *\n * @example\n * import * as E from 'fp-ts/Either'\n *\n * assert.deepStrictEqual(E.flatten(E.right(E.right('a'))), E.right('a'))\n * assert.deepStrictEqual(E.flatten(E.right(E.left('e'))), E.left('e'))\n * assert.deepStrictEqual(E.flatten(E.left('e')), E.left('e'))\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.flatten = /*#__PURE__*/exports.chain(function_1.identity);\n/**\n * Less strict version of [`alt`](#alt).\n *\n * @category Alt\n * @since 2.9.0\n */\n\nvar altW = function altW(that) {\n return function (fa) {\n return exports.isLeft(fa) ? that() : fa;\n };\n};\n\nexports.altW = altW;\n/**\n * Identifies an associative operation on a type constructor. It is similar to `Semigroup`, except that it applies to\n * types of kind `* -> *`.\n *\n * @category Alt\n * @since 2.0.0\n */\n\nexports.alt = exports.altW;\n/**\n * @category Extend\n * @since 2.0.0\n */\n\nvar extend = function extend(f) {\n return function (wa) {\n return exports.isLeft(wa) ? wa : exports.right(f(wa));\n };\n};\n\nexports.extend = extend;\n/**\n * Derivable from `Extend`.\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.duplicate = /*#__PURE__*/exports.extend(function_1.identity);\n/**\n * Left-associative fold of a structure.\n *\n * @example\n * import { pipe } from 'fp-ts/function'\n * import * as E from 'fp-ts/Either'\n *\n * const startWith = 'prefix'\n * const concat = (a: string, b: string) => `${a}:${b}`\n *\n * assert.deepStrictEqual(\n * pipe(E.right('a'), E.reduce(startWith, concat)),\n * 'prefix:a'\n * )\n *\n * assert.deepStrictEqual(\n * pipe(E.left('e'), E.reduce(startWith, concat)),\n * 'prefix'\n * )\n *\n * @category Foldable\n * @since 2.0.0\n */\n\nvar reduce = function reduce(b, f) {\n return function (fa) {\n return exports.isLeft(fa) ? b : f(b, fa.right);\n };\n};\n\nexports.reduce = reduce;\n/**\n * Map each element of the structure to a monoid, and combine the results.\n *\n * @example\n * import { pipe } from 'fp-ts/function'\n * import * as E from 'fp-ts/Either'\n * import * as S from 'fp-ts/string'\n *\n * const yell = (a: string) => `${a}!`\n *\n * assert.deepStrictEqual(\n * pipe(E.right('a'), E.foldMap(S.Monoid)(yell)),\n * 'a!'\n * )\n *\n * assert.deepStrictEqual(\n * pipe(E.left('e'), E.foldMap(S.Monoid)(yell)),\n * S.Monoid.empty\n * )\n *\n * @category Foldable\n * @since 2.0.0\n */\n\nvar foldMap = function foldMap(M) {\n return function (f) {\n return function (fa) {\n return exports.isLeft(fa) ? M.empty : f(fa.right);\n };\n };\n};\n\nexports.foldMap = foldMap;\n/**\n * Right-associative fold of a structure.\n *\n * @example\n * import { pipe } from 'fp-ts/function'\n * import * as E from 'fp-ts/Either'\n *\n * const startWith = 'postfix'\n * const concat = (a: string, b: string) => `${a}:${b}`\n *\n * assert.deepStrictEqual(\n * pipe(E.right('a'), E.reduceRight(startWith, concat)),\n * 'a:postfix'\n * )\n *\n * assert.deepStrictEqual(\n * pipe(E.left('e'), E.reduceRight(startWith, concat)),\n * 'postfix'\n * )\n *\n * @category Foldable\n * @since 2.0.0\n */\n\nvar reduceRight = function reduceRight(b, f) {\n return function (fa) {\n return exports.isLeft(fa) ? b : f(fa.right, b);\n };\n};\n\nexports.reduceRight = reduceRight;\n/**\n * Map each element of a structure to an action, evaluate these actions from left to right, and collect the results.\n *\n * @example\n * import { pipe } from 'fp-ts/function'\n * import * as RA from 'fp-ts/ReadonlyArray'\n * import * as E from 'fp-ts/Either'\n * import * as O from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(\n * pipe(E.right(['a']), E.traverse(O.Applicative)(RA.head)),\n * O.some(E.right('a'))\n * )\n *\n * assert.deepStrictEqual(\n * pipe(E.right([]), E.traverse(O.Applicative)(RA.head)),\n * O.none\n * )\n *\n * @category Traversable\n * @since 2.6.3\n */\n\nvar traverse = function traverse(F) {\n return function (f) {\n return function (ta) {\n return exports.isLeft(ta) ? F.of(exports.left(ta.left)) : F.map(f(ta.right), exports.right);\n };\n };\n};\n\nexports.traverse = traverse;\n/**\n * Evaluate each monadic action in the structure from left to right, and collect the results.\n *\n * @example\n * import { pipe } from 'fp-ts/function'\n * import * as E from 'fp-ts/Either'\n * import * as O from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(\n * pipe(E.right(O.some('a')), E.sequence(O.Applicative)),\n * O.some(E.right('a'))\n * )\n *\n * assert.deepStrictEqual(\n * pipe(E.right(O.none), E.sequence(O.Applicative)),\n * O.none\n * )\n *\n * @category Traversable\n * @since 2.6.3\n */\n\nvar sequence = function sequence(F) {\n return function (ma) {\n return exports.isLeft(ma) ? F.of(exports.left(ma.left)) : F.map(ma.right, exports.right);\n };\n};\n\nexports.sequence = sequence;\n/**\n * @category MonadThrow\n * @since 2.6.3\n */\n\nexports.throwError = exports.left; // -------------------------------------------------------------------------------------\n// instances\n// -------------------------------------------------------------------------------------\n\n/**\n * @category instances\n * @since 2.0.0\n */\n\nexports.URI = 'Either';\n/**\n * @category instances\n * @since 2.0.0\n */\n\nfunction getShow(SE, SA) {\n return {\n show: function show(ma) {\n return exports.isLeft(ma) ? \"left(\" + SE.show(ma.left) + \")\" : \"right(\" + SA.show(ma.right) + \")\";\n }\n };\n}\n\nexports.getShow = getShow;\n/**\n * @category instances\n * @since 2.0.0\n */\n\nfunction getEq(EL, EA) {\n return {\n equals: function equals(x, y) {\n return x === y || (exports.isLeft(x) ? exports.isLeft(y) && EL.equals(x.left, y.left) : exports.isRight(y) && EA.equals(x.right, y.right));\n }\n };\n}\n\nexports.getEq = getEq;\n/**\n * Semigroup returning the left-most non-`Left` value. If both operands are `Right`s then the inner values are\n * concatenated using the provided `Semigroup`\n *\n * @example\n * import { getSemigroup, left, right } from 'fp-ts/Either'\n * import { SemigroupSum } from 'fp-ts/number'\n *\n * const S = getSemigroup(SemigroupSum)\n * assert.deepStrictEqual(S.concat(left('a'), left('b')), left('a'))\n * assert.deepStrictEqual(S.concat(left('a'), right(2)), right(2))\n * assert.deepStrictEqual(S.concat(right(1), left('b')), right(1))\n * assert.deepStrictEqual(S.concat(right(1), right(2)), right(3))\n *\n * @category instances\n * @since 2.0.0\n */\n\nfunction getSemigroup(S) {\n return {\n concat: function concat(x, y) {\n return exports.isLeft(y) ? x : exports.isLeft(x) ? y : exports.right(S.concat(x.right, y.right));\n }\n };\n}\n\nexports.getSemigroup = getSemigroup;\n/**\n * Builds a `Compactable` instance for `Either` given `Monoid` for the left side.\n *\n * @category instances\n * @since 2.10.0\n */\n\nvar getCompactable = function getCompactable(M) {\n var empty = exports.left(M.empty);\n return {\n URI: exports.URI,\n _E: undefined,\n compact: function compact(ma) {\n return exports.isLeft(ma) ? ma : ma.right._tag === 'None' ? empty : exports.right(ma.right.value);\n },\n separate: function separate(ma) {\n return exports.isLeft(ma) ? Separated_1.separated(ma, ma) : exports.isLeft(ma.right) ? Separated_1.separated(exports.right(ma.right.left), empty) : Separated_1.separated(empty, exports.right(ma.right.right));\n }\n };\n};\n\nexports.getCompactable = getCompactable;\n/**\n * Builds a `Filterable` instance for `Either` given `Monoid` for the left side\n *\n * @category instances\n * @since 2.10.0\n */\n\nfunction getFilterable(M) {\n var empty = exports.left(M.empty);\n\n var _a = exports.getCompactable(M),\n compact = _a.compact,\n separate = _a.separate;\n\n var filter = function filter(ma, predicate) {\n return exports.isLeft(ma) ? ma : predicate(ma.right) ? ma : empty;\n };\n\n var partition = function partition(ma, p) {\n return exports.isLeft(ma) ? Separated_1.separated(ma, ma) : p(ma.right) ? Separated_1.separated(empty, exports.right(ma.right)) : Separated_1.separated(exports.right(ma.right), empty);\n };\n\n return {\n URI: exports.URI,\n _E: undefined,\n map: _map,\n compact: compact,\n separate: separate,\n filter: filter,\n filterMap: function filterMap(ma, f) {\n if (exports.isLeft(ma)) {\n return ma;\n }\n\n var ob = f(ma.right);\n return ob._tag === 'None' ? empty : exports.right(ob.value);\n },\n partition: partition,\n partitionMap: function partitionMap(ma, f) {\n if (exports.isLeft(ma)) {\n return Separated_1.separated(ma, ma);\n }\n\n var e = f(ma.right);\n return exports.isLeft(e) ? Separated_1.separated(exports.right(e.left), empty) : Separated_1.separated(empty, exports.right(e.right));\n }\n };\n}\n\nexports.getFilterable = getFilterable;\n/**\n * Builds `Witherable` instance for `Either` given `Monoid` for the left side\n *\n * @category instances\n * @since 2.0.0\n */\n\nfunction getWitherable(M) {\n var F_ = getFilterable(M);\n\n var wither = function wither(F) {\n var traverseF = _traverse(F);\n\n return function (ma, f) {\n return F.map(traverseF(ma, f), F_.compact);\n };\n };\n\n var wilt = function wilt(F) {\n var traverseF = _traverse(F);\n\n return function (ma, f) {\n return F.map(traverseF(ma, f), F_.separate);\n };\n };\n\n return {\n URI: exports.URI,\n _E: undefined,\n map: _map,\n compact: F_.compact,\n separate: F_.separate,\n filter: F_.filter,\n filterMap: F_.filterMap,\n partition: F_.partition,\n partitionMap: F_.partitionMap,\n traverse: _traverse,\n sequence: exports.sequence,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n wither: wither,\n wilt: wilt\n };\n}\n\nexports.getWitherable = getWitherable;\n/**\n * @category instances\n * @since 2.7.0\n */\n\nfunction getApplicativeValidation(SE) {\n return {\n URI: exports.URI,\n _E: undefined,\n map: _map,\n ap: function ap(fab, fa) {\n return exports.isLeft(fab) ? exports.isLeft(fa) ? exports.left(SE.concat(fab.left, fa.left)) : fab : exports.isLeft(fa) ? fa : exports.right(fab.right(fa.right));\n },\n of: exports.of\n };\n}\n\nexports.getApplicativeValidation = getApplicativeValidation;\n/**\n * @category instances\n * @since 2.7.0\n */\n\nfunction getAltValidation(SE) {\n return {\n URI: exports.URI,\n _E: undefined,\n map: _map,\n alt: function alt(me, that) {\n if (exports.isRight(me)) {\n return me;\n }\n\n var ea = that();\n return exports.isLeft(ea) ? exports.left(SE.concat(me.left, ea.left)) : ea;\n }\n };\n}\n\nexports.getAltValidation = getAltValidation;\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Functor = {\n URI: exports.URI,\n map: _map\n};\n/**\n * Derivable from `Functor`.\n *\n * @category combinators\n * @since 2.10.0\n */\n\nexports.flap =\n/*#_PURE_*/\nFunctor_1.flap(exports.Functor);\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Pointed = {\n URI: exports.URI,\n of: exports.of\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Apply = {\n URI: exports.URI,\n map: _map,\n ap: _ap\n};\n/**\n * Combine two effectful actions, keeping only the result of the first.\n *\n * Derivable from `Apply`.\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.apFirst = /*#__PURE__*/Apply_1.apFirst(exports.Apply);\n/**\n * Combine two effectful actions, keeping only the result of the second.\n *\n * Derivable from `Apply`.\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.apSecond = /*#__PURE__*/Apply_1.apSecond(exports.Apply);\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Applicative = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n of: exports.of\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Chain = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n chain: _chain\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Monad = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n of: exports.of,\n chain: _chain\n};\n/**\n * Composes computations in sequence, using the return value of one computation to determine the next computation and\n * keeping only the result of the first.\n *\n * Derivable from `Chain`.\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.chainFirst = /*#__PURE__*/Chain_1.chainFirst(exports.Chain);\n/**\n * Less strict version of [`chainFirst`](#chainfirst)\n *\n * Derivable from `Chain`.\n *\n * @category combinators\n * @since 2.8.0\n */\n\nexports.chainFirstW = exports.chainFirst;\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Foldable = {\n URI: exports.URI,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Traversable = {\n URI: exports.URI,\n map: _map,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: exports.sequence\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Bifunctor = {\n URI: exports.URI,\n bimap: _bimap,\n mapLeft: _mapLeft\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Alt = {\n URI: exports.URI,\n map: _map,\n alt: _alt\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Extend = {\n URI: exports.URI,\n map: _map,\n extend: _extend\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.ChainRec = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n chain: _chain,\n chainRec: _chainRec\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.MonadThrow = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n of: exports.of,\n chain: _chain,\n throwError: exports.throwError\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.FromEither = {\n URI: exports.URI,\n fromEither: function_1.identity\n}; // -------------------------------------------------------------------------------------\n// utils\n// -------------------------------------------------------------------------------------\n\n/**\n * Default value for the `onError` argument of `tryCatch`\n *\n * @since 2.0.0\n */\n\nfunction toError(e) {\n return e instanceof Error ? e : new Error(String(e));\n}\n\nexports.toError = toError;\n/**\n * @since 2.0.0\n */\n\nfunction elem(E) {\n return function (a, ma) {\n return exports.isLeft(ma) ? false : E.equals(a, ma.right);\n };\n}\n\nexports.elem = elem;\n/**\n * Returns `false` if `Left` or returns the result of the application of the given predicate to the `Right` value.\n *\n * @example\n * import { exists, left, right } from 'fp-ts/Either'\n *\n * const gt2 = exists((n: number) => n > 2)\n *\n * assert.strictEqual(gt2(left('a')), false)\n * assert.strictEqual(gt2(right(1)), false)\n * assert.strictEqual(gt2(right(3)), true)\n *\n * @since 2.0.0\n */\n\nfunction exists(predicate) {\n return function (ma) {\n return exports.isLeft(ma) ? false : predicate(ma.right);\n };\n}\n\nexports.exists = exists; // -------------------------------------------------------------------------------------\n// do notation\n// -------------------------------------------------------------------------------------\n\n/**\n * @since 2.9.0\n */\n\nexports.Do = /*#__PURE__*/exports.of({});\n/**\n * @since 2.8.0\n */\n\nexports.bindTo = /*#__PURE__*/Functor_1.bindTo(exports.Functor);\n/**\n * @since 2.8.0\n */\n\nexports.bind = /*#__PURE__*/Chain_1.bind(exports.Chain);\n/**\n * @since 2.8.0\n */\n\nexports.bindW = exports.bind; // -------------------------------------------------------------------------------------\n// pipeable sequence S\n// -------------------------------------------------------------------------------------\n\n/**\n * @since 2.8.0\n */\n\nexports.apS = /*#__PURE__*/Apply_1.apS(exports.Apply);\n/**\n * @since 2.8.0\n */\n\nexports.apSW = exports.apS; // -------------------------------------------------------------------------------------\n// array utils\n// -------------------------------------------------------------------------------------\n\n/**\n * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`.\n *\n * @since 2.9.0\n */\n\nvar traverseArrayWithIndex = function traverseArrayWithIndex(f) {\n return function (as) {\n var out = [];\n\n for (var i = 0; i < as.length; i++) {\n var e = f(i, as[i]);\n\n if (exports.isLeft(e)) {\n return e;\n }\n\n out.push(e.right);\n }\n\n return exports.right(out);\n };\n};\n\nexports.traverseArrayWithIndex = traverseArrayWithIndex;\n/**\n * Equivalent to `ReadonlyArray#traverse(Applicative)`.\n *\n * @since 2.9.0\n */\n\nvar traverseArray = function traverseArray(f) {\n return exports.traverseArrayWithIndex(function (_, a) {\n return f(a);\n });\n};\n\nexports.traverseArray = traverseArray;\n/**\n * Equivalent to `ReadonlyArray#sequence(Applicative)`.\n *\n * @since 2.9.0\n */\n\nexports.sequenceArray = /*#__PURE__*/exports.traverseArray(function_1.identity);\n/**\n * Use [`parse`](./Json.ts.html#parse) instead.\n *\n * @category constructors\n * @since 2.0.0\n * @deprecated\n */\n// tslint:disable-next-line: deprecation\n\nfunction parseJSON(s, onError) {\n return exports.tryCatch(function () {\n return JSON.parse(s);\n }, onError);\n}\n\nexports.parseJSON = parseJSON;\n/**\n * Use [`stringify`](./Json.ts.html#stringify) instead.\n *\n * @category constructors\n * @since 2.0.0\n * @deprecated\n */\n\nvar stringifyJSON = function stringifyJSON(u, onError) {\n return exports.tryCatch(function () {\n var s = JSON.stringify(u);\n\n if (typeof s !== 'string') {\n throw new Error('Converting unsupported structure to JSON');\n }\n\n return s;\n }, onError);\n};\n\nexports.stringifyJSON = stringifyJSON;\n/**\n * Use small, specific instances instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.either = {\n URI: exports.URI,\n map: _map,\n of: exports.of,\n ap: _ap,\n chain: _chain,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: exports.sequence,\n bimap: _bimap,\n mapLeft: _mapLeft,\n alt: _alt,\n extend: _extend,\n chainRec: _chainRec,\n throwError: exports.throwError\n};\n/**\n * Use [`getApplySemigroup`](./Apply.ts.html#getApplySemigroup) instead.\n *\n * Semigroup returning the left-most `Left` value. If both operands are `Right`s then the inner values\n * are concatenated using the provided `Semigroup`\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getApplySemigroup = /*#__PURE__*/Apply_1.getApplySemigroup(exports.Apply);\n/**\n * Use [`getApplicativeMonoid`](./Applicative.ts.html#getApplicativeMonoid) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getApplyMonoid = /*#__PURE__*/Applicative_1.getApplicativeMonoid(exports.Applicative);\n/**\n * Use [`getApplySemigroup`](./Apply.ts.html#getApplySemigroup) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nvar getValidationSemigroup = function getValidationSemigroup(SE, SA) {\n return Apply_1.getApplySemigroup(getApplicativeValidation(SE))(SA);\n};\n\nexports.getValidationSemigroup = getValidationSemigroup;\n/**\n * Use [`getApplicativeMonoid`](./Applicative.ts.html#getApplicativeMonoid) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nvar getValidationMonoid = function getValidationMonoid(SE, MA) {\n return Applicative_1.getApplicativeMonoid(getApplicativeValidation(SE))(MA);\n};\n\nexports.getValidationMonoid = getValidationMonoid;\n/**\n * Use [`getApplicativeValidation`](#getapplicativevalidation) and [`getAltValidation`](#getaltvalidation) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nfunction getValidation(SE) {\n var ap = getApplicativeValidation(SE).ap;\n var alt = getAltValidation(SE).alt;\n return {\n URI: exports.URI,\n _E: undefined,\n map: _map,\n of: exports.of,\n chain: _chain,\n bimap: _bimap,\n mapLeft: _mapLeft,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n extend: _extend,\n traverse: _traverse,\n sequence: exports.sequence,\n chainRec: _chainRec,\n throwError: exports.throwError,\n ap: ap,\n alt: alt\n };\n}\n\nexports.getValidation = getValidation;","\"use strict\";\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nvar __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n});\n\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n }\n\n __setModuleDefault(result, mod);\n\n return result;\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getEitherM = exports.toUnion = exports.swap = exports.orElse = exports.getOrElse = exports.matchE = exports.match = exports.altValidation = exports.mapLeft = exports.bimap = exports.alt = exports.chain = exports.ap = exports.map = exports.leftF = exports.rightF = exports.left = exports.right = void 0;\n\nvar Apply_1 = require(\"./Apply\");\n\nvar E = __importStar(require(\"./Either\"));\n\nvar function_1 = require(\"./function\");\n\nvar Functor_1 = require(\"./Functor\");\n\nfunction right(F) {\n return function_1.flow(E.right, F.of);\n}\n\nexports.right = right;\n\nfunction left(F) {\n return function_1.flow(E.left, F.of);\n}\n\nexports.left = left;\n\nfunction rightF(F) {\n return function (fa) {\n return F.map(fa, E.right);\n };\n}\n\nexports.rightF = rightF;\n\nfunction leftF(F) {\n return function (fe) {\n return F.map(fe, E.left);\n };\n}\n\nexports.leftF = leftF;\n\nfunction map(F) {\n return Functor_1.map(F, E.Functor);\n}\n\nexports.map = map;\n\nfunction ap(F) {\n return Apply_1.ap(F, E.Apply);\n}\n\nexports.ap = ap;\n\nfunction chain(M) {\n return function (f) {\n return function (ma) {\n return M.chain(ma, function (e) {\n return E.isLeft(e) ? M.of(e) : f(e.right);\n });\n };\n };\n}\n\nexports.chain = chain;\n\nfunction alt(M) {\n return function (second) {\n return function (first) {\n return M.chain(first, function (e) {\n return E.isLeft(e) ? second() : M.of(e);\n });\n };\n };\n}\n\nexports.alt = alt;\n\nfunction bimap(F) {\n return function (f, g) {\n return function (fea) {\n return F.map(fea, E.bimap(f, g));\n };\n };\n}\n\nexports.bimap = bimap;\n\nfunction mapLeft(F) {\n return function (f) {\n return function (fea) {\n return F.map(fea, E.mapLeft(f));\n };\n };\n}\n\nexports.mapLeft = mapLeft;\n\nfunction altValidation(M, S) {\n return function (second) {\n return function (first) {\n return M.chain(first, E.match(function (e1) {\n return M.map(second(), E.mapLeft(function (e2) {\n return S.concat(e1, e2);\n }));\n }, right(M)));\n };\n };\n}\n\nexports.altValidation = altValidation;\n\nfunction match(F) {\n return function (onLeft, onRight) {\n return function (ma) {\n return F.map(ma, E.match(onLeft, onRight));\n };\n };\n}\n\nexports.match = match;\n\nfunction matchE(M) {\n return function (onLeft, onRight) {\n return function (ma) {\n return M.chain(ma, E.match(onLeft, onRight));\n };\n };\n}\n\nexports.matchE = matchE;\n\nfunction getOrElse(M) {\n return function (onLeft) {\n return function (ma) {\n return M.chain(ma, E.match(onLeft, M.of));\n };\n };\n}\n\nexports.getOrElse = getOrElse;\n\nfunction orElse(M) {\n return function (onLeft) {\n return function (ma) {\n return M.chain(ma, function (e) {\n return E.isLeft(e) ? onLeft(e.left) : M.of(e);\n });\n };\n };\n}\n\nexports.orElse = orElse;\n\nfunction swap(F) {\n return function (ma) {\n return F.map(ma, E.swap);\n };\n}\n\nexports.swap = swap;\n\nfunction toUnion(F) {\n return function (fa) {\n return F.map(fa, E.toUnion);\n };\n}\n\nexports.toUnion = toUnion;\n/** @deprecated */\n\n/* istanbul ignore next */\n\nfunction getEitherM(M) {\n var _ap = ap(M);\n\n var _map = map(M);\n\n var _chain = chain(M);\n\n var _alt = alt(M);\n\n var _bimap = bimap(M);\n\n var _mapLeft = mapLeft(M);\n\n var _fold = matchE(M);\n\n var _getOrElse = getOrElse(M);\n\n var _orElse = orElse(M);\n\n return {\n map: function map(fa, f) {\n return function_1.pipe(fa, _map(f));\n },\n ap: function ap(fab, fa) {\n return function_1.pipe(fab, _ap(fa));\n },\n of: right(M),\n chain: function chain(ma, f) {\n return function_1.pipe(ma, _chain(f));\n },\n alt: function alt(fa, that) {\n return function_1.pipe(fa, _alt(that));\n },\n bimap: function bimap(fea, f, g) {\n return function_1.pipe(fea, _bimap(f, g));\n },\n mapLeft: function mapLeft(fea, f) {\n return function_1.pipe(fea, _mapLeft(f));\n },\n fold: function fold(fa, onLeft, onRight) {\n return function_1.pipe(fa, _fold(onLeft, onRight));\n },\n getOrElse: function getOrElse(fa, onLeft) {\n return function_1.pipe(fa, _getOrElse(onLeft));\n },\n orElse: function orElse(fa, f) {\n return function_1.pipe(fa, _orElse(f));\n },\n swap: swap(M),\n rightM: rightF(M),\n leftM: leftF(M),\n left: left(M)\n };\n}\n\nexports.getEitherM = getEitherM;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.eqDate = exports.eqNumber = exports.eqString = exports.eqBoolean = exports.eq = exports.strictEqual = exports.getStructEq = exports.getTupleEq = exports.Contravariant = exports.getMonoid = exports.getSemigroup = exports.eqStrict = exports.URI = exports.contramap = exports.tuple = exports.struct = exports.fromEquals = void 0;\n\nvar function_1 = require(\"./function\"); // -------------------------------------------------------------------------------------\n// constructors\n// -------------------------------------------------------------------------------------\n\n/**\n * @category constructors\n * @since 2.0.0\n */\n\n\nfunction fromEquals(_equals) {\n return {\n equals: function equals(x, y) {\n return x === y || _equals(x, y);\n }\n };\n}\n\nexports.fromEquals = fromEquals; // -------------------------------------------------------------------------------------\n// combinators\n// -------------------------------------------------------------------------------------\n\n/**\n * @category combinators\n * @since 2.10.0\n */\n\nvar struct = function struct(eqs) {\n return fromEquals(function (first, second) {\n for (var key in eqs) {\n if (!eqs[key].equals(first[key], second[key])) {\n return false;\n }\n }\n\n return true;\n });\n};\n\nexports.struct = struct;\n/**\n * Given a tuple of `Eq`s returns a `Eq` for the tuple\n *\n * @example\n * import { tuple } from 'fp-ts/Eq'\n * import * as S from 'fp-ts/string'\n * import * as N from 'fp-ts/number'\n * import * as B from 'fp-ts/boolean'\n *\n * const E = tuple(S.Eq, N.Eq, B.Eq)\n * assert.strictEqual(E.equals(['a', 1, true], ['a', 1, true]), true)\n * assert.strictEqual(E.equals(['a', 1, true], ['b', 1, true]), false)\n * assert.strictEqual(E.equals(['a', 1, true], ['a', 2, true]), false)\n * assert.strictEqual(E.equals(['a', 1, true], ['a', 1, false]), false)\n *\n * @category combinators\n * @since 2.10.0\n */\n\nvar tuple = function tuple() {\n var eqs = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n eqs[_i] = arguments[_i];\n }\n\n return fromEquals(function (first, second) {\n return eqs.every(function (E, i) {\n return E.equals(first[i], second[i]);\n });\n });\n};\n\nexports.tuple = tuple; // -------------------------------------------------------------------------------------\n// non-pipeables\n// -------------------------------------------------------------------------------------\n\n/* istanbul ignore next */\n\nvar contramap_ = function contramap_(fa, f) {\n return function_1.pipe(fa, exports.contramap(f));\n}; // -------------------------------------------------------------------------------------\n// type class members\n// -------------------------------------------------------------------------------------\n\n/**\n * @category Contravariant\n * @since 2.0.0\n */\n\n\nvar contramap = function contramap(f) {\n return function (fa) {\n return fromEquals(function (x, y) {\n return fa.equals(f(x), f(y));\n });\n };\n};\n\nexports.contramap = contramap; // -------------------------------------------------------------------------------------\n// instances\n// -------------------------------------------------------------------------------------\n\n/**\n * @category instances\n * @since 2.0.0\n */\n\nexports.URI = 'Eq';\n/**\n * @category instances\n * @since 2.5.0\n */\n\nexports.eqStrict = {\n equals: function equals(a, b) {\n return a === b;\n }\n};\nvar empty = {\n equals: function equals() {\n return true;\n }\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nvar getSemigroup = function getSemigroup() {\n return {\n concat: function concat(x, y) {\n return fromEquals(function (a, b) {\n return x.equals(a, b) && y.equals(a, b);\n });\n }\n };\n};\n\nexports.getSemigroup = getSemigroup;\n/**\n * @category instances\n * @since 2.6.0\n */\n\nvar getMonoid = function getMonoid() {\n return {\n concat: exports.getSemigroup().concat,\n empty: empty\n };\n};\n\nexports.getMonoid = getMonoid;\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Contravariant = {\n URI: exports.URI,\n contramap: contramap_\n}; // -------------------------------------------------------------------------------------\n// deprecated\n// -------------------------------------------------------------------------------------\n\n/**\n * Use [`tuple`](#tuple) instead.\n *\n * @category combinators\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getTupleEq = exports.tuple;\n/**\n * Use [`struct`](#struct) instead.\n *\n * @category combinators\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getStructEq = exports.struct;\n/**\n * Use [`eqStrict`](#eqstrict) instead\n *\n * @since 2.0.0\n * @deprecated\n */\n\nexports.strictEqual = exports.eqStrict.equals;\n/**\n * Use small, specific instances instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.eq = exports.Contravariant;\n/**\n * Use [`Eq`](./boolean.ts.html#Eq) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.eqBoolean = exports.eqStrict;\n/**\n * Use [`Eq`](./string.ts.html#Eq) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.eqString = exports.eqStrict;\n/**\n * Use [`Eq`](./number.ts.html#Eq) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.eqNumber = exports.eqStrict;\n/**\n * Use [`Eq`](./Date.ts.html#Eq) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.eqDate = {\n equals: function equals(first, second) {\n return first.valueOf() === second.valueOf();\n }\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.fieldNumber = exports.lcm = exports.gcd = void 0; // -------------------------------------------------------------------------------------\n// utils\n// -------------------------------------------------------------------------------------\n\n/**\n * The *greatest common divisor* of two values\n *\n * @since 2.0.0\n */\n\nfunction gcd(E, field) {\n var zero = field.zero;\n\n var f = function f(x, y) {\n return E.equals(y, zero) ? x : f(y, field.mod(x, y));\n };\n\n return f;\n}\n\nexports.gcd = gcd;\n/**\n * The *least common multiple* of two values\n *\n * @since 2.0.0\n */\n\nfunction lcm(E, F) {\n var zero = F.zero;\n var gcdSF = gcd(E, F);\n return function (x, y) {\n return E.equals(x, zero) || E.equals(y, zero) ? zero : F.div(F.mul(x, y), gcdSF(x, y));\n };\n}\n\nexports.lcm = lcm; // -------------------------------------------------------------------------------------\n// deprecated\n// -------------------------------------------------------------------------------------\n\n/**\n * Use [`Field`](./number.ts.html#Field) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.fieldNumber = {\n add: function add(x, y) {\n return x + y;\n },\n zero: 0,\n mul: function mul(x, y) {\n return x * y;\n },\n one: 1,\n sub: function sub(x, y) {\n return x - y;\n },\n degree: function degree(_) {\n return 1;\n },\n div: function div(x, y) {\n return x / y;\n },\n mod: function mod(x, y) {\n return x % y;\n }\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getFilterableComposition = exports.partitionMap = exports.partition = exports.filterMap = exports.filter = void 0;\n/**\n * `Filterable` represents data structures which can be _partitioned_/_filtered_.\n *\n * Adapted from https://github.com/LiamGoodacre/purescript-filterable/blob/master/src/Data/Filterable.purs\n *\n * @since 2.0.0\n */\n\nvar Compactable_1 = require(\"./Compactable\");\n\nvar function_1 = require(\"./function\");\n\nvar Functor_1 = require(\"./Functor\");\n\nvar Option_1 = require(\"./Option\");\n\nvar Separated_1 = require(\"./Separated\");\n\nfunction filter(F, G) {\n return function (predicate) {\n return function (fga) {\n return F.map(fga, function (ga) {\n return G.filter(ga, predicate);\n });\n };\n };\n}\n\nexports.filter = filter;\n\nfunction filterMap(F, G) {\n return function (f) {\n return function (fga) {\n return F.map(fga, function (ga) {\n return G.filterMap(ga, f);\n });\n };\n };\n}\n\nexports.filterMap = filterMap;\n\nfunction partition(F, G) {\n var _filter = filter(F, G);\n\n return function (predicate) {\n return function (fga) {\n return Separated_1.separated(function_1.pipe(fga, _filter(function (a) {\n return !predicate(a);\n })), function_1.pipe(fga, _filter(predicate)));\n };\n };\n}\n\nexports.partition = partition;\n\nfunction partitionMap(F, G) {\n var _filterMap = filterMap(F, G);\n\n return function (f) {\n return function (fga) {\n return Separated_1.separated(function_1.pipe(fga, _filterMap(function (a) {\n return Option_1.getLeft(f(a));\n })), function_1.pipe(fga, _filterMap(function (a) {\n return Option_1.getRight(f(a));\n })));\n };\n };\n}\n\nexports.partitionMap = partitionMap;\n/** @deprecated */\n\nfunction getFilterableComposition(F, G) {\n var map = Functor_1.getFunctorComposition(F, G).map;\n\n var _compact = Compactable_1.compact(F, G);\n\n var _separate = Compactable_1.separate(F, G, G);\n\n var _filter = filter(F, G);\n\n var _filterMap = filterMap(F, G);\n\n var _partition = partition(F, G);\n\n var _partitionMap = partitionMap(F, G);\n\n return {\n map: map,\n compact: _compact,\n separate: _separate,\n filter: function filter(fga, f) {\n return function_1.pipe(fga, _filter(f));\n },\n filterMap: function filterMap(fga, f) {\n return function_1.pipe(fga, _filterMap(f));\n },\n partition: function partition(fga, p) {\n return function_1.pipe(fga, _partition(p));\n },\n partitionMap: function partitionMap(fga, f) {\n return function_1.pipe(fga, _partitionMap(f));\n }\n };\n}\n\nexports.getFilterableComposition = getFilterableComposition;","\"use strict\";\n/**\n * The `FromEither` type class represents those data types which support errors.\n *\n * @since 2.10.0\n */\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nvar __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n});\n\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n }\n\n __setModuleDefault(result, mod);\n\n return result;\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.filterOrElse = exports.chainEitherK = exports.fromEitherK = exports.chainOptionK = exports.fromOptionK = exports.fromPredicate = exports.fromOption = void 0;\n\nvar E = __importStar(require(\"./Either\"));\n\nvar function_1 = require(\"./function\");\n\nfunction fromOption(F) {\n return function (onNone) {\n return function_1.flow(E.fromOption(onNone), F.fromEither);\n };\n}\n\nexports.fromOption = fromOption;\n\nfunction fromPredicate(F) {\n return function (predicate, onFalse) {\n return function_1.flow(E.fromPredicate(predicate, onFalse), F.fromEither);\n };\n}\n\nexports.fromPredicate = fromPredicate;\n\nfunction fromOptionK(F) {\n var fromOptionF = fromOption(F);\n return function (onNone) {\n var from = fromOptionF(onNone);\n return function (f) {\n return function_1.flow(f, from);\n };\n };\n}\n\nexports.fromOptionK = fromOptionK;\n\nfunction chainOptionK(F, M) {\n var fromOptionKF = fromOptionK(F);\n return function (onNone) {\n var from = fromOptionKF(onNone);\n return function (f) {\n return function (ma) {\n return M.chain(ma, from(f));\n };\n };\n };\n}\n\nexports.chainOptionK = chainOptionK;\n\nfunction fromEitherK(F) {\n return function (f) {\n return function_1.flow(f, F.fromEither);\n };\n}\n\nexports.fromEitherK = fromEitherK;\n\nfunction chainEitherK(F, M) {\n var fromEitherKF = fromEitherK(F);\n return function (f) {\n return function (ma) {\n return M.chain(ma, fromEitherKF(f));\n };\n };\n}\n\nexports.chainEitherK = chainEitherK;\n\nfunction filterOrElse(F, M) {\n return function (predicate, onFalse) {\n return function (ma) {\n return M.chain(ma, function_1.flow(E.fromPredicate(predicate, onFalse), F.fromEither));\n };\n };\n}\n\nexports.filterOrElse = filterOrElse;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.chainFirstIOK = exports.chainIOK = exports.fromIOK = void 0;\n/**\n * Lift a computation from the `IO` monad\n *\n * @since 2.10.0\n */\n\nvar Chain_1 = require(\"./Chain\");\n\nvar function_1 = require(\"./function\");\n\nfunction fromIOK(F) {\n return function (f) {\n return function_1.flow(f, F.fromIO);\n };\n}\n\nexports.fromIOK = fromIOK;\n\nfunction chainIOK(F, M) {\n return function (f) {\n var g = function_1.flow(f, F.fromIO);\n return function (first) {\n return M.chain(first, g);\n };\n };\n}\n\nexports.chainIOK = chainIOK;\n\nfunction chainFirstIOK(F, M) {\n var chainFirstM = Chain_1.chainFirst(M);\n return function (f) {\n return chainFirstM(function_1.flow(f, F.fromIO));\n };\n}\n\nexports.chainFirstIOK = chainFirstIOK;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.chainFirstTaskK = exports.chainTaskK = exports.fromTaskK = void 0;\n/**\n * Lift a computation from the `Task` monad\n *\n * @since 2.10.0\n */\n\nvar Chain_1 = require(\"./Chain\");\n\nvar function_1 = require(\"./function\");\n\nfunction fromTaskK(F) {\n return function (f) {\n return function_1.flow(f, F.fromTask);\n };\n}\n\nexports.fromTaskK = fromTaskK;\n\nfunction chainTaskK(F, M) {\n return function (f) {\n var g = function_1.flow(f, F.fromTask);\n return function (first) {\n return M.chain(first, g);\n };\n };\n}\n\nexports.chainTaskK = chainTaskK;\n\nfunction chainFirstTaskK(F, M) {\n var chainFirstM = Chain_1.chainFirst(M);\n return function (f) {\n return chainFirstM(function_1.flow(f, F.fromTask));\n };\n}\n\nexports.chainFirstTaskK = chainFirstTaskK;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getFunctorComposition = exports.bindTo = exports.flap = exports.map = void 0;\n/**\n * A `Functor` is a type constructor which supports a mapping operation `map`.\n *\n * `map` can be used to turn functions `a -> b` into functions `f a -> f b` whose argument and return types use the type\n * constructor `f` to represent some computational context.\n *\n * Instances must satisfy the following laws:\n *\n * 1. Identity: `F.map(fa, a => a) <-> fa`\n * 2. Composition: `F.map(fa, a => bc(ab(a))) <-> F.map(F.map(fa, ab), bc)`\n *\n * @since 2.0.0\n */\n\nvar function_1 = require(\"./function\");\n\nfunction map(F, G) {\n return function (f) {\n return function (fa) {\n return F.map(fa, function (ga) {\n return G.map(ga, f);\n });\n };\n };\n}\n\nexports.map = map;\n\nfunction flap(F) {\n return function (a) {\n return function (fab) {\n return F.map(fab, function (f) {\n return f(a);\n });\n };\n };\n}\n\nexports.flap = flap;\n\nfunction bindTo(F) {\n return function (name) {\n return function (fa) {\n return F.map(fa, function (a) {\n var _a;\n\n return _a = {}, _a[name] = a, _a;\n });\n };\n };\n}\n\nexports.bindTo = bindTo;\n/** @deprecated */\n\nfunction getFunctorComposition(F, G) {\n var _map = map(F, G);\n\n return {\n map: function map(fga, f) {\n return function_1.pipe(fga, _map(f));\n }\n };\n}\n\nexports.getFunctorComposition = getFunctorComposition;","\"use strict\";\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nvar __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n});\n\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n }\n\n __setModuleDefault(result, mod);\n\n return result;\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.monoidProduct = exports.monoidSum = exports.monoidString = exports.getEndomorphismMonoid = exports.getFunctionMonoid = exports.monoidAny = exports.monoidAll = exports.fold = exports.getMeetMonoid = exports.getJoinMonoid = exports.getDualMonoid = exports.getStructMonoid = exports.getTupleMonoid = exports.concatAll = exports.monoidVoid = exports.tuple = exports.struct = exports.reverse = exports.max = exports.min = void 0;\n\nvar function_1 = require(\"./function\");\n\nvar _ = __importStar(require(\"./internal\"));\n\nvar Se = __importStar(require(\"./Semigroup\")); // -------------------------------------------------------------------------------------\n// constructors\n// -------------------------------------------------------------------------------------\n\n/**\n * Get a monoid where `concat` will return the minimum, based on the provided bounded order.\n *\n * The `empty` value is the `top` value.\n *\n * @example\n * import * as N from 'fp-ts/number'\n * import * as M from 'fp-ts/Monoid'\n *\n * const M1 = M.min(N.Bounded)\n *\n * assert.deepStrictEqual(M1.concat(1, 2), 1)\n *\n * @category constructors\n * @since 2.10.0\n */\n\n\nvar min = function min(B) {\n return {\n concat: Se.min(B).concat,\n empty: B.top\n };\n};\n\nexports.min = min;\n/**\n * Get a monoid where `concat` will return the maximum, based on the provided bounded order.\n *\n * The `empty` value is the `bottom` value.\n *\n * @example\n * import * as N from 'fp-ts/number'\n * import * as M from 'fp-ts/Monoid'\n *\n * const M1 = M.max(N.Bounded)\n *\n * assert.deepStrictEqual(M1.concat(1, 2), 2)\n *\n * @category constructors\n * @since 2.10.0\n */\n\nvar max = function max(B) {\n return {\n concat: Se.max(B).concat,\n empty: B.bottom\n };\n};\n\nexports.max = max; // -------------------------------------------------------------------------------------\n// combinators\n// -------------------------------------------------------------------------------------\n\n/**\n * The dual of a `Monoid`, obtained by swapping the arguments of `concat`.\n *\n * @example\n * import { reverse } from 'fp-ts/Monoid'\n * import * as S from 'fp-ts/string'\n *\n * assert.deepStrictEqual(reverse(S.Monoid).concat('a', 'b'), 'ba')\n *\n * @category combinators\n * @since 2.10.0\n */\n\nvar reverse = function reverse(M) {\n return {\n concat: Se.reverse(M).concat,\n empty: M.empty\n };\n};\n\nexports.reverse = reverse;\n/**\n * Given a struct of monoids returns a monoid for the struct.\n *\n * @example\n * import { struct } from 'fp-ts/Monoid'\n * import * as N from 'fp-ts/number'\n *\n * interface Point {\n * readonly x: number\n * readonly y: number\n * }\n *\n * const M = struct({\n * x: N.MonoidSum,\n * y: N.MonoidSum\n * })\n *\n * assert.deepStrictEqual(M.concat({ x: 1, y: 2 }, { x: 3, y: 4 }), { x: 4, y: 6 })\n *\n * @category combinators\n * @since 2.10.0\n */\n\nvar struct = function struct(monoids) {\n var empty = {};\n\n for (var k in monoids) {\n if (_.has.call(monoids, k)) {\n empty[k] = monoids[k].empty;\n }\n }\n\n return {\n concat: Se.struct(monoids).concat,\n empty: empty\n };\n};\n\nexports.struct = struct;\n/**\n * Given a tuple of monoids returns a monoid for the tuple.\n *\n * @example\n * import { tuple } from 'fp-ts/Monoid'\n * import * as B from 'fp-ts/boolean'\n * import * as N from 'fp-ts/number'\n * import * as S from 'fp-ts/string'\n *\n * const M1 = tuple(S.Monoid, N.MonoidSum)\n * assert.deepStrictEqual(M1.concat(['a', 1], ['b', 2]), ['ab', 3])\n *\n * const M2 = tuple(S.Monoid, N.MonoidSum, B.MonoidAll)\n * assert.deepStrictEqual(M2.concat(['a', 1, true], ['b', 2, false]), ['ab', 3, false])\n *\n * @category combinators\n * @since 2.10.0\n */\n\nvar tuple = function tuple() {\n var monoids = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n monoids[_i] = arguments[_i];\n }\n\n return {\n concat: Se.tuple.apply(Se, monoids).concat,\n empty: monoids.map(function (m) {\n return m.empty;\n })\n };\n};\n\nexports.tuple = tuple;\n/**\n * @category instances\n * @since 2.0.0\n */\n\nexports.monoidVoid = {\n concat: Se.semigroupVoid.concat,\n empty: undefined\n}; // -------------------------------------------------------------------------------------\n// utils\n// -------------------------------------------------------------------------------------\n\n/**\n * Given a sequence of `as`, concat them and return the total.\n *\n * If `as` is empty, return the monoid `empty` value.\n *\n * @example\n * import { concatAll } from 'fp-ts/Monoid'\n * import * as N from 'fp-ts/number'\n *\n * assert.deepStrictEqual(concatAll(N.MonoidSum)([1, 2, 3]), 6)\n * assert.deepStrictEqual(concatAll(N.MonoidSum)([]), 0)\n *\n * @since 2.10.0\n */\n\nvar concatAll = function concatAll(M) {\n return Se.concatAll(M)(M.empty);\n};\n\nexports.concatAll = concatAll; // -------------------------------------------------------------------------------------\n// deprecated\n// -------------------------------------------------------------------------------------\n\n/**\n * Use [`tuple`](#tuple) instead.\n *\n * @category combinators\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getTupleMonoid = exports.tuple;\n/**\n * Use [`struct`](#struct) instead.\n *\n * @category combinators\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getStructMonoid = exports.struct;\n/**\n * Use [`reverse`](#reverse) instead.\n *\n * @category combinators\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getDualMonoid = exports.reverse;\n/**\n * Use [`max`](#max) instead.\n *\n * @category constructors\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getJoinMonoid = exports.max;\n/**\n * Use [`min`](#min) instead.\n *\n * @category constructors\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getMeetMonoid = exports.min;\n/**\n * Use [`concatAll`](#concatall) instead.\n *\n * @since 2.0.0\n * @deprecated\n */\n\nexports.fold = exports.concatAll;\n/**\n * Use [`MonoidAll`](./boolean.ts.html#monoidall) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.monoidAll = {\n // tslint:disable-next-line: deprecation\n concat: Se.semigroupAll.concat,\n empty: true\n};\n/**\n * Use [`MonoidAny`](./boolean.ts.html#MonoidAny) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.monoidAny = {\n // tslint:disable-next-line: deprecation\n concat: Se.semigroupAny.concat,\n empty: false\n};\n/**\n * Use [`getMonoid`](./function.ts.html#getMonoid) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getFunctionMonoid = function_1.getMonoid;\n/**\n * Use [`getEndomorphismMonoid`](./function.ts.html#getEndomorphismMonoid) instead.\n *\n * **Note**. The execution order in [`getEndomorphismMonoid`](./function.ts.html#getEndomorphismMonoid) is reversed.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nvar getEndomorphismMonoid = function getEndomorphismMonoid() {\n return exports.reverse(function_1.getEndomorphismMonoid());\n};\n\nexports.getEndomorphismMonoid = getEndomorphismMonoid;\n/**\n * Use [`Monoid`](./string.ts.html#Monoid) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.monoidString = {\n // tslint:disable-next-line: deprecation\n concat: Se.semigroupString.concat,\n empty: ''\n};\n/**\n * Use [`MonoidSum`](./number.ts.html#MonoidSum) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.monoidSum = {\n // tslint:disable-next-line: deprecation\n concat: Se.semigroupSum.concat,\n empty: 0\n};\n/**\n * Use [`MonoidProduct`](./number.ts.html#MonoidProduct) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.monoidProduct = {\n // tslint:disable-next-line: deprecation\n concat: Se.semigroupProduct.concat,\n empty: 1\n};","\"use strict\";\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nvar __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n});\n\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n }\n\n __setModuleDefault(result, mod);\n\n return result;\n};\n\nvar __spreadArray = this && this.__spreadArray || function (to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) {\n to[j] = from[i];\n }\n\n return to;\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.reduceRightWithIndex = exports.reduceRight = exports.reduceWithIndex = exports.reduce = exports.mapWithIndex = exports.map = exports.flatten = exports.duplicate = exports.extend = exports.chain = exports.ap = exports.alt = exports.altW = exports.chunksOf = exports.splitAt = exports.chop = exports.chainWithIndex = exports.foldMap = exports.foldMapWithIndex = exports.intersperse = exports.prependAll = exports.unzip = exports.zip = exports.zipWith = exports.of = exports.copy = exports.modifyAt = exports.updateAt = exports.insertAt = exports.sort = exports.groupBy = exports.groupSort = exports.group = exports.reverse = exports.concat = exports.unappend = exports.unprepend = exports.fromArray = exports.fromReadonlyNonEmptyArray = exports.makeBy = exports.rotate = exports.union = exports.sortBy = exports.uniq = exports.unsafeUpdateAt = exports.unsafeInsertAt = exports.append = exports.prepend = exports.isOutOfBound = exports.isNonEmpty = void 0;\nexports.nonEmptyArray = exports.fold = exports.prependToAll = exports.snoc = exports.cons = exports.unsnoc = exports.uncons = exports.filterWithIndex = exports.filter = exports.concatAll = exports.max = exports.min = exports.init = exports.last = exports.tail = exports.head = exports.apS = exports.bind = exports.bindTo = exports.Do = exports.Comonad = exports.Alt = exports.TraversableWithIndex = exports.Traversable = exports.FoldableWithIndex = exports.Foldable = exports.Monad = exports.chainFirst = exports.Chain = exports.Applicative = exports.apSecond = exports.apFirst = exports.Apply = exports.FunctorWithIndex = exports.Pointed = exports.flap = exports.Functor = exports.getEq = exports.getSemigroup = exports.getShow = exports.URI = exports.extract = exports.traverseWithIndex = exports.sequence = exports.traverse = void 0;\n\nvar Apply_1 = require(\"./Apply\");\n\nvar Chain_1 = require(\"./Chain\");\n\nvar function_1 = require(\"./function\");\n\nvar Functor_1 = require(\"./Functor\");\n\nvar _ = __importStar(require(\"./internal\"));\n\nvar O = __importStar(require(\"./Option\"));\n\nvar Ord_1 = require(\"./Ord\");\n\nvar RNEA = __importStar(require(\"./ReadonlyNonEmptyArray\")); // -------------------------------------------------------------------------------------\n// internal\n// -------------------------------------------------------------------------------------\n\n/**\n * @internal\n */\n\n\nvar isNonEmpty = function isNonEmpty(as) {\n return as.length > 0;\n};\n\nexports.isNonEmpty = isNonEmpty;\n/**\n * @internal\n */\n\nvar isOutOfBound = function isOutOfBound(i, as) {\n return i < 0 || i >= as.length;\n};\n\nexports.isOutOfBound = isOutOfBound;\n/**\n * @internal\n */\n\nvar prepend = function prepend(head) {\n return function (tail) {\n return __spreadArray([head], tail);\n };\n};\n\nexports.prepend = prepend;\n/**\n * @internal\n */\n\nvar append = function append(end) {\n return function (init) {\n return concat(init, [end]);\n };\n};\n\nexports.append = append;\n/**\n * @internal\n */\n\nvar unsafeInsertAt = function unsafeInsertAt(i, a, as) {\n if (exports.isNonEmpty(as)) {\n var xs = exports.fromReadonlyNonEmptyArray(as);\n xs.splice(i, 0, a);\n return xs;\n }\n\n return [a];\n};\n\nexports.unsafeInsertAt = unsafeInsertAt;\n/**\n * @internal\n */\n\nvar unsafeUpdateAt = function unsafeUpdateAt(i, a, as) {\n var xs = exports.fromReadonlyNonEmptyArray(as);\n xs[i] = a;\n return xs;\n};\n\nexports.unsafeUpdateAt = unsafeUpdateAt;\n/**\n * @internal\n */\n\nvar uniq = function uniq(E) {\n return function (as) {\n if (as.length === 1) {\n return exports.copy(as);\n }\n\n var out = [exports.head(as)];\n var rest = exports.tail(as);\n\n var _loop_1 = function _loop_1(a) {\n if (out.every(function (o) {\n return !E.equals(o, a);\n })) {\n out.push(a);\n }\n };\n\n for (var _i = 0, rest_1 = rest; _i < rest_1.length; _i++) {\n var a = rest_1[_i];\n\n _loop_1(a);\n }\n\n return out;\n };\n};\n\nexports.uniq = uniq;\n/**\n * @internal\n */\n\nvar sortBy = function sortBy(ords) {\n if (exports.isNonEmpty(ords)) {\n var M = Ord_1.getMonoid();\n return exports.sort(ords.reduce(M.concat, M.empty));\n }\n\n return exports.copy;\n};\n\nexports.sortBy = sortBy;\n/**\n * @internal\n */\n\nvar union = function union(E) {\n var uniqE = exports.uniq(E);\n return function (first, second) {\n return uniqE(concat(first, second));\n };\n};\n\nexports.union = union;\n/**\n * @internal\n */\n\nvar rotate = function rotate(n) {\n return function (as) {\n var len = as.length;\n var m = Math.round(n) % len;\n\n if (exports.isOutOfBound(Math.abs(m), as) || m === 0) {\n return exports.copy(as);\n }\n\n if (m < 0) {\n var _a = exports.splitAt(-m)(as),\n f = _a[0],\n s = _a[1];\n\n return concat(s, f);\n } else {\n return exports.rotate(m - len)(as);\n }\n };\n};\n\nexports.rotate = rotate;\n/**\n * @internal\n */\n\nvar makeBy = function makeBy(n, f) {\n var j = Math.max(0, Math.floor(n));\n var out = [f(0)];\n\n for (var i = 1; i < j; i++) {\n out.push(f(i));\n }\n\n return out;\n};\n\nexports.makeBy = makeBy; // -------------------------------------------------------------------------------------\n// constructors\n// -------------------------------------------------------------------------------------\n\n/**\n * @category constructors\n * @since 2.10.0\n */\n\nexports.fromReadonlyNonEmptyArray = _.fromReadonlyNonEmptyArray;\n/**\n * Builds a `NonEmptyArray` from an `Array` returning `none` if `as` is an empty array\n *\n * @category constructors\n * @since 2.0.0\n */\n\nvar fromArray = function fromArray(as) {\n return exports.isNonEmpty(as) ? O.some(as) : O.none;\n};\n\nexports.fromArray = fromArray; // -------------------------------------------------------------------------------------\n// destructors\n// -------------------------------------------------------------------------------------\n\n/**\n * Return the tuple of the `head` and the `tail`.\n *\n * @example\n * import { unprepend } from 'fp-ts/NonEmptyArray'\n *\n * assert.deepStrictEqual(unprepend([1, 2, 3]), [1, [2, 3]])\n *\n * @category destructors\n * @since 2.9.0\n */\n\nvar unprepend = function unprepend(as) {\n return [exports.head(as), exports.tail(as)];\n};\n\nexports.unprepend = unprepend;\n/**\n * Return the tuple of the `init` and the `last`.\n *\n * @example\n * import { unappend } from 'fp-ts/NonEmptyArray'\n *\n * assert.deepStrictEqual(unappend([1, 2, 3, 4]), [[1, 2, 3], 4])\n *\n * @category destructors\n * @since 2.9.0\n */\n\nvar unappend = function unappend(as) {\n return [exports.init(as), exports.last(as)];\n};\n\nexports.unappend = unappend;\n\nfunction concat(first, second) {\n return first.concat(second);\n}\n\nexports.concat = concat;\n/**\n * @category combinators\n * @since 2.0.0\n */\n\nvar reverse = function reverse(as) {\n return __spreadArray([exports.last(as)], as.slice(0, -1).reverse());\n};\n\nexports.reverse = reverse;\n\nfunction group(E) {\n return function (as) {\n var len = as.length;\n\n if (len === 0) {\n return [];\n }\n\n var out = [];\n var head = as[0];\n var nea = [head];\n\n for (var i = 1; i < len; i++) {\n var a = as[i];\n\n if (E.equals(a, head)) {\n nea.push(a);\n } else {\n out.push(nea);\n head = a;\n nea = [head];\n }\n }\n\n out.push(nea);\n return out;\n };\n}\n\nexports.group = group;\n\nfunction groupSort(O) {\n var sortO = exports.sort(O);\n var groupO = group(O);\n return function (as) {\n return exports.isNonEmpty(as) ? groupO(sortO(as)) : [];\n };\n}\n\nexports.groupSort = groupSort;\n/**\n * Splits an array into sub-non-empty-arrays stored in an object, based on the result of calling a `string`-returning\n * function on each element, and grouping the results according to values returned\n *\n * @example\n * import { groupBy } from 'fp-ts/NonEmptyArray'\n *\n * assert.deepStrictEqual(groupBy((s: string) => String(s.length))(['a', 'b', 'ab']), {\n * '1': ['a', 'b'],\n * '2': ['ab']\n * })\n *\n * @category combinators\n * @since 2.0.0\n */\n\nvar groupBy = function groupBy(f) {\n return function (as) {\n var out = {};\n\n for (var _i = 0, as_1 = as; _i < as_1.length; _i++) {\n var a = as_1[_i];\n var k = f(a);\n\n if (out.hasOwnProperty(k)) {\n out[k].push(a);\n } else {\n out[k] = [a];\n }\n }\n\n return out;\n };\n};\n\nexports.groupBy = groupBy;\n/**\n * @category combinators\n * @since 2.0.0\n */\n\nvar sort = function sort(O) {\n return function (as) {\n return as.slice().sort(O.compare);\n };\n};\n\nexports.sort = sort;\n/**\n * @category combinators\n * @since 2.0.0\n */\n\nvar insertAt = function insertAt(i, a) {\n return function (as) {\n return i < 0 || i > as.length ? O.none : O.some(exports.unsafeInsertAt(i, a, as));\n };\n};\n\nexports.insertAt = insertAt;\n/**\n * @category combinators\n * @since 2.0.0\n */\n\nvar updateAt = function updateAt(i, a) {\n return exports.modifyAt(i, function () {\n return a;\n });\n};\n\nexports.updateAt = updateAt;\n/**\n * @category combinators\n * @since 2.0.0\n */\n\nvar modifyAt = function modifyAt(i, f) {\n return function (as) {\n return exports.isOutOfBound(i, as) ? O.none : O.some(exports.unsafeUpdateAt(i, f(as[i]), as));\n };\n};\n\nexports.modifyAt = modifyAt;\n/**\n * @category combinators\n * @since 2.0.0\n */\n\nexports.copy = exports.fromReadonlyNonEmptyArray;\n/**\n * @category Pointed\n * @since 2.0.0\n */\n\nvar of = function of(a) {\n return [a];\n};\n\nexports.of = of;\n/**\n * @category combinators\n * @since 2.5.1\n */\n\nvar zipWith = function zipWith(as, bs, f) {\n var cs = [f(as[0], bs[0])];\n var len = Math.min(as.length, bs.length);\n\n for (var i = 1; i < len; i++) {\n cs[i] = f(as[i], bs[i]);\n }\n\n return cs;\n};\n\nexports.zipWith = zipWith;\n\nfunction zip(as, bs) {\n if (bs === undefined) {\n return function (bs) {\n return zip(bs, as);\n };\n }\n\n return exports.zipWith(as, bs, function (a, b) {\n return [a, b];\n });\n}\n\nexports.zip = zip;\n/**\n * @category combinators\n * @since 2.5.1\n */\n\nvar unzip = function unzip(abs) {\n var fa = [abs[0][0]];\n var fb = [abs[0][1]];\n\n for (var i = 1; i < abs.length; i++) {\n fa[i] = abs[i][0];\n fb[i] = abs[i][1];\n }\n\n return [fa, fb];\n};\n\nexports.unzip = unzip;\n/**\n * Prepend an element to every member of an array\n *\n * @example\n * import { prependAll } from 'fp-ts/NonEmptyArray'\n *\n * assert.deepStrictEqual(prependAll(9)([1, 2, 3, 4]), [9, 1, 9, 2, 9, 3, 9, 4])\n *\n * @category combinators\n * @since 2.10.0\n */\n\nvar prependAll = function prependAll(middle) {\n return function (as) {\n var out = [middle, as[0]];\n\n for (var i = 1; i < as.length; i++) {\n out.push(middle, as[i]);\n }\n\n return out;\n };\n};\n\nexports.prependAll = prependAll;\n/**\n * Places an element in between members of an array\n *\n * @example\n * import { intersperse } from 'fp-ts/NonEmptyArray'\n *\n * assert.deepStrictEqual(intersperse(9)([1, 2, 3, 4]), [1, 9, 2, 9, 3, 9, 4])\n *\n * @category combinators\n * @since 2.9.0\n */\n\nvar intersperse = function intersperse(middle) {\n return function (as) {\n var rest = exports.tail(as);\n return exports.isNonEmpty(rest) ? function_1.pipe(rest, exports.prependAll(middle), exports.prepend(exports.head(as))) : exports.copy(as);\n };\n};\n\nexports.intersperse = intersperse;\n/**\n * @category combinators\n * @since 2.0.0\n */\n\nexports.foldMapWithIndex = RNEA.foldMapWithIndex;\n/**\n * @category combinators\n * @since 2.0.0\n */\n\nexports.foldMap = RNEA.foldMap;\n/**\n * @category combinators\n * @since 2.10.0\n */\n\nvar chainWithIndex = function chainWithIndex(f) {\n return function (as) {\n var out = exports.fromReadonlyNonEmptyArray(f(0, exports.head(as)));\n\n for (var i = 1; i < as.length; i++) {\n out.push.apply(out, f(i, as[i]));\n }\n\n return out;\n };\n};\n\nexports.chainWithIndex = chainWithIndex;\n/**\n * @category combinators\n * @since 2.10.0\n */\n\nvar chop = function chop(f) {\n return function (as) {\n var _a = f(as),\n b = _a[0],\n rest = _a[1];\n\n var out = [b];\n var next = rest;\n\n while (exports.isNonEmpty(next)) {\n var _b = f(next),\n b_1 = _b[0],\n rest_2 = _b[1];\n\n out.push(b_1);\n next = rest_2;\n }\n\n return out;\n };\n};\n\nexports.chop = chop;\n/**\n * Splits a `NonEmptyArray` into two pieces, the first piece has max `n` elements.\n *\n * @category combinators\n * @since 2.10.0\n */\n\nvar splitAt = function splitAt(n) {\n return function (as) {\n var m = Math.max(1, n);\n return m >= as.length ? [exports.copy(as), []] : [function_1.pipe(as.slice(1, m), exports.prepend(exports.head(as))), as.slice(m)];\n };\n};\n\nexports.splitAt = splitAt;\n/**\n * @category combinators\n * @since 2.10.0\n */\n\nvar chunksOf = function chunksOf(n) {\n return exports.chop(exports.splitAt(n));\n};\n\nexports.chunksOf = chunksOf; // -------------------------------------------------------------------------------------\n// non-pipeables\n// -------------------------------------------------------------------------------------\n\n/* istanbul ignore next */\n\nvar _map = function _map(fa, f) {\n return function_1.pipe(fa, exports.map(f));\n};\n/* istanbul ignore next */\n\n\nvar _mapWithIndex = function _mapWithIndex(fa, f) {\n return function_1.pipe(fa, exports.mapWithIndex(f));\n};\n/* istanbul ignore next */\n\n\nvar _ap = function _ap(fab, fa) {\n return function_1.pipe(fab, exports.ap(fa));\n};\n/* istanbul ignore next */\n\n\nvar _chain = function _chain(ma, f) {\n return function_1.pipe(ma, exports.chain(f));\n};\n/* istanbul ignore next */\n\n\nvar _extend = function _extend(wa, f) {\n return function_1.pipe(wa, exports.extend(f));\n};\n/* istanbul ignore next */\n\n\nvar _reduce = function _reduce(fa, b, f) {\n return function_1.pipe(fa, exports.reduce(b, f));\n};\n/* istanbul ignore next */\n\n\nvar _foldMap = function _foldMap(M) {\n var foldMapM = exports.foldMap(M);\n return function (fa, f) {\n return function_1.pipe(fa, foldMapM(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _reduceRight = function _reduceRight(fa, b, f) {\n return function_1.pipe(fa, exports.reduceRight(b, f));\n};\n/* istanbul ignore next */\n\n\nvar _traverse = function _traverse(F) {\n var traverseF = exports.traverse(F);\n return function (ta, f) {\n return function_1.pipe(ta, traverseF(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _alt = function _alt(fa, that) {\n return function_1.pipe(fa, exports.alt(that));\n};\n/* istanbul ignore next */\n\n\nvar _reduceWithIndex = function _reduceWithIndex(fa, b, f) {\n return function_1.pipe(fa, exports.reduceWithIndex(b, f));\n};\n/* istanbul ignore next */\n\n\nvar _foldMapWithIndex = function _foldMapWithIndex(M) {\n var foldMapWithIndexM = exports.foldMapWithIndex(M);\n return function (fa, f) {\n return function_1.pipe(fa, foldMapWithIndexM(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _reduceRightWithIndex = function _reduceRightWithIndex(fa, b, f) {\n return function_1.pipe(fa, exports.reduceRightWithIndex(b, f));\n};\n/* istanbul ignore next */\n\n\nvar _traverseWithIndex = function _traverseWithIndex(F) {\n var traverseWithIndexF = exports.traverseWithIndex(F);\n return function (ta, f) {\n return function_1.pipe(ta, traverseWithIndexF(f));\n };\n}; // -------------------------------------------------------------------------------------\n// type class members\n// -------------------------------------------------------------------------------------\n\n/**\n * Less strict version of [`alt`](#alt).\n *\n * @category Alt\n * @since 2.9.0\n */\n\n\nvar altW = function altW(that) {\n return function (as) {\n return concat(as, that());\n };\n};\n\nexports.altW = altW;\n/**\n * Identifies an associative operation on a type constructor. It is similar to `Semigroup`, except that it applies to\n * types of kind `* -> *`.\n *\n * @category Alt\n * @since 2.6.2\n */\n\nexports.alt = exports.altW;\n/**\n * Apply a function to an argument under a type constructor.\n *\n * @category Apply\n * @since 2.0.0\n */\n\nvar ap = function ap(as) {\n return exports.chain(function (f) {\n return function_1.pipe(as, exports.map(f));\n });\n};\n\nexports.ap = ap;\n/**\n * Composes computations in sequence, using the return value of one computation to determine the next computation.\n *\n * @category Monad\n * @since 2.0.0\n */\n\nvar chain = function chain(f) {\n return exports.chainWithIndex(function (_, a) {\n return f(a);\n });\n};\n\nexports.chain = chain;\n/**\n * @category Extend\n * @since 2.0.0\n */\n\nvar extend = function extend(f) {\n return function (as) {\n var next = exports.tail(as);\n var out = [f(as)];\n\n while (exports.isNonEmpty(next)) {\n out.push(f(next));\n next = exports.tail(next);\n }\n\n return out;\n };\n};\n\nexports.extend = extend;\n/**\n * Derivable from `Extend`.\n *\n * @category combinators\n * @since 2.5.0\n */\n\nexports.duplicate = /*#__PURE__*/exports.extend(function_1.identity);\n/**\n * Derivable from `Chain`.\n *\n * @category combinators\n * @since 2.5.0\n */\n\nexports.flatten = /*#__PURE__*/exports.chain(function_1.identity);\n/**\n * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F) => F` whose argument and return types\n * use the type constructor `F` to represent some computational context.\n *\n * @category Functor\n * @since 2.0.0\n */\n\nvar map = function map(f) {\n return exports.mapWithIndex(function (_, a) {\n return f(a);\n });\n};\n\nexports.map = map;\n/**\n * @category FunctorWithIndex\n * @since 2.0.0\n */\n\nvar mapWithIndex = function mapWithIndex(f) {\n return function (as) {\n var out = [f(0, exports.head(as))];\n\n for (var i = 1; i < as.length; i++) {\n out.push(f(i, as[i]));\n }\n\n return out;\n };\n};\n\nexports.mapWithIndex = mapWithIndex;\n/**\n * @category Foldable\n * @since 2.0.0\n */\n\nexports.reduce = RNEA.reduce;\n/**\n * @category FoldableWithIndex\n * @since 2.0.0\n */\n\nexports.reduceWithIndex = RNEA.reduceWithIndex;\n/**\n * @category Foldable\n * @since 2.0.0\n */\n\nexports.reduceRight = RNEA.reduceRight;\n/**\n * @category FoldableWithIndex\n * @since 2.0.0\n */\n\nexports.reduceRightWithIndex = RNEA.reduceRightWithIndex;\n/**\n * @since 2.6.3\n */\n\nvar traverse = function traverse(F) {\n var traverseWithIndexF = exports.traverseWithIndex(F);\n return function (f) {\n return traverseWithIndexF(function (_, a) {\n return f(a);\n });\n };\n};\n\nexports.traverse = traverse;\n/**\n * @since 2.6.3\n */\n\nvar sequence = function sequence(F) {\n return exports.traverseWithIndex(F)(function (_, a) {\n return a;\n });\n};\n\nexports.sequence = sequence;\n/**\n * @since 2.6.3\n */\n\nvar traverseWithIndex = function traverseWithIndex(F) {\n return function (f) {\n return function (as) {\n var out = F.map(f(0, exports.head(as)), exports.of);\n\n for (var i = 1; i < as.length; i++) {\n out = F.ap(F.map(out, function (bs) {\n return function (b) {\n return function_1.pipe(bs, exports.append(b));\n };\n }), f(i, as[i]));\n }\n\n return out;\n };\n };\n};\n\nexports.traverseWithIndex = traverseWithIndex;\n/**\n * @since 2.7.0\n */\n\nexports.extract = RNEA.head; // -------------------------------------------------------------------------------------\n// instances\n// -------------------------------------------------------------------------------------\n\n/**\n * @category instances\n * @since 2.0.0\n */\n\nexports.URI = 'NonEmptyArray';\n/**\n * @category instances\n * @since 2.0.0\n */\n\nexports.getShow = RNEA.getShow;\n/**\n * Builds a `Semigroup` instance for `NonEmptyArray`\n *\n * @category instances\n * @since 2.0.0\n */\n\nvar getSemigroup = function getSemigroup() {\n return {\n concat: concat\n };\n};\n\nexports.getSemigroup = getSemigroup;\n/**\n * @example\n * import { getEq } from 'fp-ts/NonEmptyArray'\n * import * as N from 'fp-ts/number'\n *\n * const E = getEq(N.Eq)\n * assert.strictEqual(E.equals([1, 2], [1, 2]), true)\n * assert.strictEqual(E.equals([1, 2], [1, 3]), false)\n *\n * @category instances\n * @since 2.0.0\n */\n\nexports.getEq = RNEA.getEq;\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Functor = {\n URI: exports.URI,\n map: _map\n};\n/**\n * Derivable from `Functor`.\n *\n * @category combinators\n * @since 2.10.0\n */\n\nexports.flap =\n/*#_PURE_*/\nFunctor_1.flap(exports.Functor);\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Pointed = {\n URI: exports.URI,\n of: exports.of\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.FunctorWithIndex = {\n URI: exports.URI,\n map: _map,\n mapWithIndex: _mapWithIndex\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Apply = {\n URI: exports.URI,\n map: _map,\n ap: _ap\n};\n/**\n * Combine two effectful actions, keeping only the result of the first.\n *\n * Derivable from `Apply`.\n *\n * @category combinators\n * @since 2.5.0\n */\n\nexports.apFirst = /*#__PURE__*/Apply_1.apFirst(exports.Apply);\n/**\n * Combine two effectful actions, keeping only the result of the second.\n *\n * Derivable from `Apply`.\n *\n * @category combinators\n * @since 2.5.0\n */\n\nexports.apSecond = /*#__PURE__*/Apply_1.apSecond(exports.Apply);\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Applicative = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n of: exports.of\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Chain = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n chain: _chain\n};\n/**\n * Composes computations in sequence, using the return value of one computation to determine the next computation and\n * keeping only the result of the first.\n *\n * Derivable from `Chain`.\n *\n * @category combinators\n * @since 2.5.0\n */\n\nexports.chainFirst = /*#__PURE__*/Chain_1.chainFirst(exports.Chain);\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Monad = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n of: exports.of,\n chain: _chain\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Foldable = {\n URI: exports.URI,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.FoldableWithIndex = {\n URI: exports.URI,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n reduceWithIndex: _reduceWithIndex,\n foldMapWithIndex: _foldMapWithIndex,\n reduceRightWithIndex: _reduceRightWithIndex\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Traversable = {\n URI: exports.URI,\n map: _map,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: exports.sequence\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.TraversableWithIndex = {\n URI: exports.URI,\n map: _map,\n mapWithIndex: _mapWithIndex,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: exports.sequence,\n reduceWithIndex: _reduceWithIndex,\n foldMapWithIndex: _foldMapWithIndex,\n reduceRightWithIndex: _reduceRightWithIndex,\n traverseWithIndex: _traverseWithIndex\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Alt = {\n URI: exports.URI,\n map: _map,\n alt: _alt\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Comonad = {\n URI: exports.URI,\n map: _map,\n extend: _extend,\n extract: exports.extract\n}; // -------------------------------------------------------------------------------------\n// do notation\n// -------------------------------------------------------------------------------------\n\n/**\n * @since 2.9.0\n */\n\nexports.Do = /*#__PURE__*/exports.of({});\n/**\n * @since 2.8.0\n */\n\nexports.bindTo = /*#__PURE__*/Functor_1.bindTo(exports.Functor);\n/**\n * @since 2.8.0\n */\n\nexports.bind = /*#__PURE__*/Chain_1.bind(exports.Chain); // -------------------------------------------------------------------------------------\n// pipeable sequence S\n// -------------------------------------------------------------------------------------\n\n/**\n * @since 2.8.0\n */\n\nexports.apS = /*#__PURE__*/Apply_1.apS(exports.Apply); // -------------------------------------------------------------------------------------\n// utils\n// -------------------------------------------------------------------------------------\n\n/**\n * @since 2.0.0\n */\n\nexports.head = RNEA.head;\n/**\n * @since 2.0.0\n */\n\nvar tail = function tail(as) {\n return as.slice(1);\n};\n\nexports.tail = tail;\n/**\n * @since 2.0.0\n */\n\nexports.last = RNEA.last;\n/**\n * Get all but the last element of a non empty array, creating a new array.\n *\n * @example\n * import { init } from 'fp-ts/NonEmptyArray'\n *\n * assert.deepStrictEqual(init([1, 2, 3]), [1, 2])\n * assert.deepStrictEqual(init([1]), [])\n *\n * @since 2.2.0\n */\n\nvar init = function init(as) {\n return as.slice(0, -1);\n};\n\nexports.init = init;\n/**\n * @since 2.0.0\n */\n\nexports.min = RNEA.min;\n/**\n * @since 2.0.0\n */\n\nexports.max = RNEA.max;\n/**\n * @since 2.10.0\n */\n\nvar concatAll = function concatAll(S) {\n return function (as) {\n return as.reduce(S.concat);\n };\n};\n\nexports.concatAll = concatAll;\n\nfunction filter(predicate) {\n // tslint:disable-next-line: deprecation\n return exports.filterWithIndex(function (_, a) {\n return predicate(a);\n });\n}\n\nexports.filter = filter;\n/**\n * Use [`filterWithIndex`](./Array.ts.html#filterWithIndex) instead.\n *\n * @category combinators\n * @since 2.0.0\n * @deprecated\n */\n\nvar filterWithIndex = function filterWithIndex(predicate) {\n return function (as) {\n return exports.fromArray(as.filter(function (a, i) {\n return predicate(i, a);\n }));\n };\n};\n\nexports.filterWithIndex = filterWithIndex;\n/**\n * Use [`unprepend`](#unprepend) instead.\n *\n * @category destructors\n * @since 2.9.0\n * @deprecated\n */\n\nexports.uncons = exports.unprepend;\n/**\n * Use [`unappend`](#unappend) instead.\n *\n * @category destructors\n * @since 2.9.0\n * @deprecated\n */\n\nexports.unsnoc = exports.unappend;\n\nfunction cons(head, tail) {\n return tail === undefined ? exports.prepend(head) : function_1.pipe(tail, exports.prepend(head));\n}\n\nexports.cons = cons;\n/**\n * Use [`append`](./Array.ts.html#append) instead.\n *\n * @category constructors\n * @since 2.0.0\n * @deprecated\n */\n\nvar snoc = function snoc(init, end) {\n return function_1.pipe(init, exports.append(end));\n};\n\nexports.snoc = snoc;\n/**\n * Use [`prependAll`](#prependall) instead.\n *\n * @category combinators\n * @since 2.9.0\n * @deprecated\n */\n\nexports.prependToAll = exports.prependAll;\n/**\n * Use [`concatAll`](#concatall) instead.\n *\n * @since 2.5.0\n * @deprecated\n */\n\nexports.fold = RNEA.concatAll;\n/**\n * Use small, specific instances instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.nonEmptyArray = {\n URI: exports.URI,\n of: exports.of,\n map: _map,\n mapWithIndex: _mapWithIndex,\n ap: _ap,\n chain: _chain,\n extend: _extend,\n extract: exports.extract,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: exports.sequence,\n reduceWithIndex: _reduceWithIndex,\n foldMapWithIndex: _foldMapWithIndex,\n reduceRightWithIndex: _reduceRightWithIndex,\n traverseWithIndex: _traverseWithIndex,\n alt: _alt\n};","\"use strict\";\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nvar __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n});\n\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n }\n\n __setModuleDefault(result, mod);\n\n return result;\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getFirstMonoid = exports.getOrd = exports.getEq = exports.getShow = exports.URI = exports.wilt = exports.wither = exports.sequence = exports.traverse = exports.partitionMap = exports.partition = exports.filterMap = exports.filter = exports.separate = exports.compact = exports.reduceRight = exports.foldMap = exports.reduce = exports.duplicate = exports.extend = exports.throwError = exports.zero = exports.alt = exports.altW = exports.flatten = exports.chain = exports.of = exports.ap = exports.map = exports.toUndefined = exports.toNullable = exports.chainNullableK = exports.fromNullableK = exports.tryCatchK = exports.tryCatch = exports.fromNullable = exports.getOrElse = exports.getOrElseW = exports.fold = exports.match = exports.foldW = exports.matchW = exports.fromEither = exports.getRight = exports.getLeft = exports.fromPredicate = exports.some = exports.none = exports.isNone = exports.isSome = void 0;\nexports.getApplyMonoid = exports.getApplySemigroup = exports.option = exports.mapNullable = exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.apS = exports.bind = exports.bindTo = exports.Do = exports.getRefinement = exports.exists = exports.elem = exports.MonadThrow = exports.Witherable = exports.Traversable = exports.Filterable = exports.Compactable = exports.Extend = exports.Alternative = exports.Alt = exports.Foldable = exports.chainFirst = exports.Monad = exports.Chain = exports.Applicative = exports.apSecond = exports.apFirst = exports.Apply = exports.Pointed = exports.flap = exports.Functor = exports.getMonoid = exports.getLastMonoid = void 0;\n\nvar Applicative_1 = require(\"./Applicative\");\n\nvar Apply_1 = require(\"./Apply\");\n\nvar Chain_1 = require(\"./Chain\");\n\nvar function_1 = require(\"./function\");\n\nvar Functor_1 = require(\"./Functor\");\n\nvar _ = __importStar(require(\"./internal\"));\n\nvar Separated_1 = require(\"./Separated\"); // -------------------------------------------------------------------------------------\n// guards\n// -------------------------------------------------------------------------------------\n\n/**\n * Returns `true` if the option is an instance of `Some`, `false` otherwise.\n *\n * @example\n * import { some, none, isSome } from 'fp-ts/Option'\n *\n * assert.strictEqual(isSome(some(1)), true)\n * assert.strictEqual(isSome(none), false)\n *\n * @category guards\n * @since 2.0.0\n */\n\n\nexports.isSome = _.isSome;\n/**\n * Returns `true` if the option is `None`, `false` otherwise.\n *\n * @example\n * import { some, none, isNone } from 'fp-ts/Option'\n *\n * assert.strictEqual(isNone(some(1)), false)\n * assert.strictEqual(isNone(none), true)\n *\n * @category guards\n * @since 2.0.0\n */\n\nvar isNone = function isNone(fa) {\n return fa._tag === 'None';\n};\n\nexports.isNone = isNone; // -------------------------------------------------------------------------------------\n// constructors\n// -------------------------------------------------------------------------------------\n\n/**\n * `None` doesn't have a constructor, instead you can use it directly as a value. Represents a missing value.\n *\n * @category constructors\n * @since 2.0.0\n */\n\nexports.none = {\n _tag: 'None'\n};\n/**\n * Constructs a `Some`. Represents an optional value that exists.\n *\n * @category constructors\n * @since 2.0.0\n */\n\nvar some = function some(a) {\n return {\n _tag: 'Some',\n value: a\n };\n};\n\nexports.some = some;\n\nfunction fromPredicate(predicate) {\n return function (a) {\n return predicate(a) ? exports.some(a) : exports.none;\n };\n}\n\nexports.fromPredicate = fromPredicate;\n/**\n * Returns the `Left` value of an `Either` if possible.\n *\n * @example\n * import { getLeft, none, some } from 'fp-ts/Option'\n * import { right, left } from 'fp-ts/Either'\n *\n * assert.deepStrictEqual(getLeft(right(1)), none)\n * assert.deepStrictEqual(getLeft(left('a')), some('a'))\n *\n * @category constructors\n * @since 2.0.0\n */\n\nfunction getLeft(ma) {\n return ma._tag === 'Right' ? exports.none : exports.some(ma.left);\n}\n\nexports.getLeft = getLeft;\n/**\n * Returns the `Right` value of an `Either` if possible.\n *\n * @example\n * import { getRight, none, some } from 'fp-ts/Option'\n * import { right, left } from 'fp-ts/Either'\n *\n * assert.deepStrictEqual(getRight(right(1)), some(1))\n * assert.deepStrictEqual(getRight(left('a')), none)\n *\n * @category constructors\n * @since 2.0.0\n */\n\nfunction getRight(ma) {\n return ma._tag === 'Left' ? exports.none : exports.some(ma.right);\n}\n\nexports.getRight = getRight;\n/**\n * Transforms an `Either` to an `Option` discarding the error.\n *\n * Alias of [getRight](#getright)\n *\n * @category constructors\n * @since 2.0.0\n */\n\nexports.fromEither = getRight; // -------------------------------------------------------------------------------------\n// destructors\n// -------------------------------------------------------------------------------------\n\n/**\n * Less strict version of [`match`](#match).\n *\n * @category destructors\n * @since 2.10.0\n */\n\nvar matchW = function matchW(onNone, onSome) {\n return function (ma) {\n return exports.isNone(ma) ? onNone() : onSome(ma.value);\n };\n};\n\nexports.matchW = matchW;\n/**\n * Alias of [`matchW`](#matchw).\n *\n * @category destructors\n * @since 2.10.0\n */\n\nexports.foldW = exports.matchW;\n/**\n * Takes a (lazy) default value, a function, and an `Option` value, if the `Option` value is `None` the default value is\n * returned, otherwise the function is applied to the value inside the `Some` and the result is returned.\n *\n * @example\n * import { some, none, match } from 'fp-ts/Option'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.strictEqual(\n * pipe(\n * some(1),\n * match(() => 'a none', a => `a some containing ${a}`)\n * ),\n * 'a some containing 1'\n * )\n *\n * assert.strictEqual(\n * pipe(\n * none,\n * match(() => 'a none', a => `a some containing ${a}`)\n * ),\n * 'a none'\n * )\n *\n * @category destructors\n * @since 2.10.0\n */\n\nexports.match = exports.matchW;\n/**\n * Alias of [`match`](#match).\n *\n * @category destructors\n * @since 2.0.0\n */\n\nexports.fold = exports.match;\n/**\n * Less strict version of [`getOrElse`](#getorelse).\n *\n * @category destructors\n * @since 2.6.0\n */\n\nvar getOrElseW = function getOrElseW(onNone) {\n return function (ma) {\n return exports.isNone(ma) ? onNone() : ma.value;\n };\n};\n\nexports.getOrElseW = getOrElseW;\n/**\n * Extracts the value out of the structure, if it exists. Otherwise returns the given default value\n *\n * @example\n * import { some, none, getOrElse } from 'fp-ts/Option'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.strictEqual(\n * pipe(\n * some(1),\n * getOrElse(() => 0)\n * ),\n * 1\n * )\n * assert.strictEqual(\n * pipe(\n * none,\n * getOrElse(() => 0)\n * ),\n * 0\n * )\n *\n * @category destructors\n * @since 2.0.0\n */\n\nexports.getOrElse = exports.getOrElseW; // -------------------------------------------------------------------------------------\n// interop\n// -------------------------------------------------------------------------------------\n\n/**\n * Constructs a new `Option` from a nullable type. If the value is `null` or `undefined`, returns `None`, otherwise\n * returns the value wrapped in a `Some`.\n *\n * @example\n * import { none, some, fromNullable } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(fromNullable(undefined), none)\n * assert.deepStrictEqual(fromNullable(null), none)\n * assert.deepStrictEqual(fromNullable(1), some(1))\n *\n * @category interop\n * @since 2.0.0\n */\n\nvar fromNullable = function fromNullable(a) {\n return a == null ? exports.none : exports.some(a);\n};\n\nexports.fromNullable = fromNullable;\n/**\n * Transforms an exception into an `Option`. If `f` throws, returns `None`, otherwise returns the output wrapped in a\n * `Some`.\n *\n * See also [`tryCatchK`](#trycatchk).\n *\n * @example\n * import { none, some, tryCatch } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(\n * tryCatch(() => {\n * throw new Error()\n * }),\n * none\n * )\n * assert.deepStrictEqual(tryCatch(() => 1), some(1))\n *\n * @category interop\n * @since 2.0.0\n */\n\nvar tryCatch = function tryCatch(f) {\n try {\n return exports.some(f());\n } catch (e) {\n return exports.none;\n }\n};\n\nexports.tryCatch = tryCatch;\n/**\n * Converts a function that may throw to one returning a `Option`.\n *\n * @category interop\n * @since 2.10.0\n */\n\nvar tryCatchK = function tryCatchK(f) {\n return function () {\n var a = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n a[_i] = arguments[_i];\n }\n\n return exports.tryCatch(function () {\n return f.apply(void 0, a);\n });\n };\n};\n\nexports.tryCatchK = tryCatchK;\n/**\n * Returns a *smart constructor* from a function that returns a nullable value.\n *\n * @example\n * import { fromNullableK, none, some } from 'fp-ts/Option'\n *\n * const f = (s: string): number | undefined => {\n * const n = parseFloat(s)\n * return isNaN(n) ? undefined : n\n * }\n *\n * const g = fromNullableK(f)\n *\n * assert.deepStrictEqual(g('1'), some(1))\n * assert.deepStrictEqual(g('a'), none)\n *\n * @category interop\n * @since 2.9.0\n */\n\nvar fromNullableK = function fromNullableK(f) {\n return function_1.flow(f, exports.fromNullable);\n};\n\nexports.fromNullableK = fromNullableK;\n/**\n * This is `chain` + `fromNullable`, useful when working with optional values.\n *\n * @example\n * import { some, none, fromNullable, chainNullableK } from 'fp-ts/Option'\n * import { pipe } from 'fp-ts/function'\n *\n * interface Employee {\n * readonly company?: {\n * readonly address?: {\n * readonly street?: {\n * readonly name?: string\n * }\n * }\n * }\n * }\n *\n * const employee1: Employee = { company: { address: { street: { name: 'high street' } } } }\n *\n * assert.deepStrictEqual(\n * pipe(\n * fromNullable(employee1.company),\n * chainNullableK(company => company.address),\n * chainNullableK(address => address.street),\n * chainNullableK(street => street.name)\n * ),\n * some('high street')\n * )\n *\n * const employee2: Employee = { company: { address: { street: {} } } }\n *\n * assert.deepStrictEqual(\n * pipe(\n * fromNullable(employee2.company),\n * chainNullableK(company => company.address),\n * chainNullableK(address => address.street),\n * chainNullableK(street => street.name)\n * ),\n * none\n * )\n *\n * @category interop\n * @since 2.9.0\n */\n\nvar chainNullableK = function chainNullableK(f) {\n return function (ma) {\n return exports.isNone(ma) ? exports.none : exports.fromNullable(f(ma.value));\n };\n};\n\nexports.chainNullableK = chainNullableK;\n/**\n * Extracts the value out of the structure, if it exists. Otherwise returns `null`.\n *\n * @example\n * import { some, none, toNullable } from 'fp-ts/Option'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.strictEqual(\n * pipe(\n * some(1),\n * toNullable\n * ),\n * 1\n * )\n * assert.strictEqual(\n * pipe(\n * none,\n * toNullable\n * ),\n * null\n * )\n *\n * @category interop\n * @since 2.0.0\n */\n\nexports.toNullable = /*#__PURE__*/exports.match(function_1.constNull, function_1.identity);\n/**\n * Extracts the value out of the structure, if it exists. Otherwise returns `undefined`.\n *\n * @example\n * import { some, none, toUndefined } from 'fp-ts/Option'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.strictEqual(\n * pipe(\n * some(1),\n * toUndefined\n * ),\n * 1\n * )\n * assert.strictEqual(\n * pipe(\n * none,\n * toUndefined\n * ),\n * undefined\n * )\n *\n * @category interop\n * @since 2.0.0\n */\n\nexports.toUndefined = /*#__PURE__*/exports.match(function_1.constUndefined, function_1.identity); // -------------------------------------------------------------------------------------\n// non-pipeables\n// -------------------------------------------------------------------------------------\n\nvar _map = function _map(fa, f) {\n return function_1.pipe(fa, exports.map(f));\n};\n\nvar _ap = function _ap(fab, fa) {\n return function_1.pipe(fab, exports.ap(fa));\n};\n\nvar _chain = function _chain(ma, f) {\n return function_1.pipe(ma, exports.chain(f));\n};\n\nvar _reduce = function _reduce(fa, b, f) {\n return function_1.pipe(fa, exports.reduce(b, f));\n};\n\nvar _foldMap = function _foldMap(M) {\n var foldMapM = exports.foldMap(M);\n return function (fa, f) {\n return function_1.pipe(fa, foldMapM(f));\n };\n};\n\nvar _reduceRight = function _reduceRight(fa, b, f) {\n return function_1.pipe(fa, exports.reduceRight(b, f));\n};\n\nvar _traverse = function _traverse(F) {\n var traverseF = exports.traverse(F);\n return function (ta, f) {\n return function_1.pipe(ta, traverseF(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _alt = function _alt(fa, that) {\n return function_1.pipe(fa, exports.alt(that));\n};\n\nvar _filter = function _filter(fa, predicate) {\n return function_1.pipe(fa, exports.filter(predicate));\n};\n/* istanbul ignore next */\n\n\nvar _filterMap = function _filterMap(fa, f) {\n return function_1.pipe(fa, exports.filterMap(f));\n};\n/* istanbul ignore next */\n\n\nvar _extend = function _extend(wa, f) {\n return function_1.pipe(wa, exports.extend(f));\n};\n/* istanbul ignore next */\n\n\nvar _partition = function _partition(fa, predicate) {\n return function_1.pipe(fa, exports.partition(predicate));\n};\n/* istanbul ignore next */\n\n\nvar _partitionMap = function _partitionMap(fa, f) {\n return function_1.pipe(fa, exports.partitionMap(f));\n};\n/* istanbul ignore next */\n\n\nvar _wither = function _wither(F) {\n var witherF = exports.wither(F);\n return function (fa, f) {\n return function_1.pipe(fa, witherF(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _wilt = function _wilt(F) {\n var wiltF = exports.wilt(F);\n return function (fa, f) {\n return function_1.pipe(fa, wiltF(f));\n };\n}; // -------------------------------------------------------------------------------------\n// type class members\n// -------------------------------------------------------------------------------------\n\n/**\n * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F) => F` whose argument and return types\n * use the type constructor `F` to represent some computational context.\n *\n * @category Functor\n * @since 2.0.0\n */\n\n\nvar map = function map(f) {\n return function (fa) {\n return exports.isNone(fa) ? exports.none : exports.some(f(fa.value));\n };\n};\n\nexports.map = map;\n/**\n * Apply a function to an argument under a type constructor.\n *\n * @category Apply\n * @since 2.0.0\n */\n\nvar ap = function ap(fa) {\n return function (fab) {\n return exports.isNone(fab) ? exports.none : exports.isNone(fa) ? exports.none : exports.some(fab.value(fa.value));\n };\n};\n\nexports.ap = ap;\n/**\n * @category Pointed\n * @since 2.7.0\n */\n\nexports.of = exports.some;\n/**\n * Composes computations in sequence, using the return value of one computation to determine the next computation.\n *\n * @category Monad\n * @since 2.0.0\n */\n\nvar chain = function chain(f) {\n return function (ma) {\n return exports.isNone(ma) ? exports.none : f(ma.value);\n };\n};\n\nexports.chain = chain;\n/**\n * Derivable from `Chain`.\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.flatten = /*#__PURE__*/exports.chain(function_1.identity);\n/**\n * Less strict version of [`alt`](#alt).\n *\n * @category Alt\n * @since 2.9.0\n */\n\nvar altW = function altW(that) {\n return function (fa) {\n return exports.isNone(fa) ? that() : fa;\n };\n};\n\nexports.altW = altW;\n/**\n * Identifies an associative operation on a type constructor. It is similar to `Semigroup`, except that it applies to\n * types of kind `* -> *`.\n *\n * In case of `Option` returns the left-most non-`None` value.\n *\n * @example\n * import * as O from 'fp-ts/Option'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.deepStrictEqual(\n * pipe(\n * O.some('a'),\n * O.alt(() => O.some('b'))\n * ),\n * O.some('a')\n * )\n * assert.deepStrictEqual(\n * pipe(\n * O.none,\n * O.alt(() => O.some('b'))\n * ),\n * O.some('b')\n * )\n *\n * @category Alt\n * @since 2.0.0\n */\n\nexports.alt = exports.altW;\n/**\n * @category Alternative\n * @since 2.7.0\n */\n\nvar zero = function zero() {\n return exports.none;\n};\n\nexports.zero = zero;\n/**\n * @category MonadThrow\n * @since 2.7.0\n */\n\nvar throwError = function throwError() {\n return exports.none;\n};\n\nexports.throwError = throwError;\n/**\n * @category Extend\n * @since 2.0.0\n */\n\nvar extend = function extend(f) {\n return function (wa) {\n return exports.isNone(wa) ? exports.none : exports.some(f(wa));\n };\n};\n\nexports.extend = extend;\n/**\n * Derivable from `Extend`.\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.duplicate = /*#__PURE__*/exports.extend(function_1.identity);\n/**\n * @category Foldable\n * @since 2.0.0\n */\n\nvar reduce = function reduce(b, f) {\n return function (fa) {\n return exports.isNone(fa) ? b : f(b, fa.value);\n };\n};\n\nexports.reduce = reduce;\n/**\n * @category Foldable\n * @since 2.0.0\n */\n\nvar foldMap = function foldMap(M) {\n return function (f) {\n return function (fa) {\n return exports.isNone(fa) ? M.empty : f(fa.value);\n };\n };\n};\n\nexports.foldMap = foldMap;\n/**\n * @category Foldable\n * @since 2.0.0\n */\n\nvar reduceRight = function reduceRight(b, f) {\n return function (fa) {\n return exports.isNone(fa) ? b : f(fa.value, b);\n };\n};\n\nexports.reduceRight = reduceRight;\n/**\n * @category Compactable\n * @since 2.0.0\n */\n\nexports.compact = exports.flatten;\nvar defaultSeparated = /*#__PURE__*/Separated_1.separated(exports.none, exports.none);\n/**\n * @category Compactable\n * @since 2.0.0\n */\n\nvar separate = function separate(ma) {\n return exports.isNone(ma) ? defaultSeparated : Separated_1.separated(getLeft(ma.value), getRight(ma.value));\n};\n\nexports.separate = separate;\n/**\n * @category Filterable\n * @since 2.0.0\n */\n\nvar filter = function filter(predicate) {\n return function (fa) {\n return exports.isNone(fa) ? exports.none : predicate(fa.value) ? fa : exports.none;\n };\n};\n\nexports.filter = filter;\n/**\n * @category Filterable\n * @since 2.0.0\n */\n\nvar filterMap = function filterMap(f) {\n return function (fa) {\n return exports.isNone(fa) ? exports.none : f(fa.value);\n };\n};\n\nexports.filterMap = filterMap;\n/**\n * @category Filterable\n * @since 2.0.0\n */\n\nvar partition = function partition(predicate) {\n return function (fa) {\n return Separated_1.separated(_filter(fa, function (a) {\n return !predicate(a);\n }), _filter(fa, predicate));\n };\n};\n\nexports.partition = partition;\n/**\n * @category Filterable\n * @since 2.0.0\n */\n\nvar partitionMap = function partitionMap(f) {\n return function_1.flow(exports.map(f), exports.separate);\n};\n\nexports.partitionMap = partitionMap;\n/**\n * @category Traversable\n * @since 2.6.3\n */\n\nvar traverse = function traverse(F) {\n return function (f) {\n return function (ta) {\n return exports.isNone(ta) ? F.of(exports.none) : F.map(f(ta.value), exports.some);\n };\n };\n};\n\nexports.traverse = traverse;\n/**\n * @category Traversable\n * @since 2.6.3\n */\n\nvar sequence = function sequence(F) {\n return function (ta) {\n return exports.isNone(ta) ? F.of(exports.none) : F.map(ta.value, exports.some);\n };\n};\n\nexports.sequence = sequence;\n/**\n * @category Witherable\n * @since 2.6.5\n */\n\nvar wither = function wither(F) {\n return function (f) {\n return function (fa) {\n return exports.isNone(fa) ? F.of(exports.none) : f(fa.value);\n };\n };\n};\n\nexports.wither = wither;\n/**\n * @category Witherable\n * @since 2.6.5\n */\n\nvar wilt = function wilt(F) {\n return function (f) {\n return function (fa) {\n return exports.isNone(fa) ? F.of(defaultSeparated) : F.map(f(fa.value), function (e) {\n return Separated_1.separated(getLeft(e), getRight(e));\n });\n };\n };\n};\n\nexports.wilt = wilt; // -------------------------------------------------------------------------------------\n// instances\n// -------------------------------------------------------------------------------------\n\n/**\n * @category instances\n * @since 2.0.0\n */\n\nexports.URI = 'Option';\n/**\n * @category instances\n * @since 2.0.0\n */\n\nfunction getShow(S) {\n return {\n show: function show(ma) {\n return exports.isNone(ma) ? 'none' : \"some(\" + S.show(ma.value) + \")\";\n }\n };\n}\n\nexports.getShow = getShow;\n/**\n * @example\n * import { none, some, getEq } from 'fp-ts/Option'\n * import * as N from 'fp-ts/number'\n *\n * const E = getEq(N.Eq)\n * assert.strictEqual(E.equals(none, none), true)\n * assert.strictEqual(E.equals(none, some(1)), false)\n * assert.strictEqual(E.equals(some(1), none), false)\n * assert.strictEqual(E.equals(some(1), some(2)), false)\n * assert.strictEqual(E.equals(some(1), some(1)), true)\n *\n * @category instances\n * @since 2.0.0\n */\n\nfunction getEq(E) {\n return {\n equals: function equals(x, y) {\n return x === y || (exports.isNone(x) ? exports.isNone(y) : exports.isNone(y) ? false : E.equals(x.value, y.value));\n }\n };\n}\n\nexports.getEq = getEq;\n/**\n * The `Ord` instance allows `Option` values to be compared with\n * `compare`, whenever there is an `Ord` instance for\n * the type the `Option` contains.\n *\n * `None` is considered to be less than any `Some` value.\n *\n *\n * @example\n * import { none, some, getOrd } from 'fp-ts/Option'\n * import * as N from 'fp-ts/number'\n *\n * const O = getOrd(N.Ord)\n * assert.strictEqual(O.compare(none, none), 0)\n * assert.strictEqual(O.compare(none, some(1)), -1)\n * assert.strictEqual(O.compare(some(1), none), 1)\n * assert.strictEqual(O.compare(some(1), some(2)), -1)\n * assert.strictEqual(O.compare(some(1), some(1)), 0)\n *\n * @category instances\n * @since 2.0.0\n */\n\nfunction getOrd(O) {\n return {\n equals: getEq(O).equals,\n compare: function compare(x, y) {\n return x === y ? 0 : exports.isSome(x) ? exports.isSome(y) ? O.compare(x.value, y.value) : 1 : -1;\n }\n };\n}\n\nexports.getOrd = getOrd;\n/**\n * Monoid returning the left-most non-`None` value\n *\n * | x | y | concat(x, y) |\n * | ------- | ------- | ------------ |\n * | none | none | none |\n * | some(a) | none | some(a) |\n * | none | some(a) | some(a) |\n * | some(a) | some(b) | some(a) |\n *\n * @example\n * import { getFirstMonoid, some, none } from 'fp-ts/Option'\n *\n * const M = getFirstMonoid()\n * assert.deepStrictEqual(M.concat(none, none), none)\n * assert.deepStrictEqual(M.concat(some(1), none), some(1))\n * assert.deepStrictEqual(M.concat(none, some(1)), some(1))\n * assert.deepStrictEqual(M.concat(some(1), some(2)), some(1))\n *\n * @category instances\n * @since 2.0.0\n */\n\nfunction getFirstMonoid() {\n return {\n concat: function concat(x, y) {\n return exports.isNone(x) ? y : x;\n },\n empty: exports.none\n };\n}\n\nexports.getFirstMonoid = getFirstMonoid;\n/**\n * Monoid returning the right-most non-`None` value\n *\n * | x | y | concat(x, y) |\n * | ------- | ------- | ------------ |\n * | none | none | none |\n * | some(a) | none | some(a) |\n * | none | some(a) | some(a) |\n * | some(a) | some(b) | some(b) |\n *\n * @example\n * import { getLastMonoid, some, none } from 'fp-ts/Option'\n *\n * const M = getLastMonoid()\n * assert.deepStrictEqual(M.concat(none, none), none)\n * assert.deepStrictEqual(M.concat(some(1), none), some(1))\n * assert.deepStrictEqual(M.concat(none, some(1)), some(1))\n * assert.deepStrictEqual(M.concat(some(1), some(2)), some(2))\n *\n * @category instances\n * @since 2.0.0\n */\n\nfunction getLastMonoid() {\n return {\n concat: function concat(x, y) {\n return exports.isNone(y) ? x : y;\n },\n empty: exports.none\n };\n}\n\nexports.getLastMonoid = getLastMonoid;\n/**\n * Monoid returning the left-most non-`None` value. If both operands are `Some`s then the inner values are\n * concatenated using the provided `Semigroup`\n *\n * | x | y | concat(x, y) |\n * | ------- | ------- | ------------------ |\n * | none | none | none |\n * | some(a) | none | some(a) |\n * | none | some(a) | some(a) |\n * | some(a) | some(b) | some(concat(a, b)) |\n *\n * @example\n * import { getMonoid, some, none } from 'fp-ts/Option'\n * import { SemigroupSum } from 'fp-ts/number'\n *\n * const M = getMonoid(SemigroupSum)\n * assert.deepStrictEqual(M.concat(none, none), none)\n * assert.deepStrictEqual(M.concat(some(1), none), some(1))\n * assert.deepStrictEqual(M.concat(none, some(1)), some(1))\n * assert.deepStrictEqual(M.concat(some(1), some(2)), some(3))\n *\n * @category instances\n * @since 2.0.0\n */\n\nfunction getMonoid(S) {\n return {\n concat: function concat(x, y) {\n return exports.isNone(x) ? y : exports.isNone(y) ? x : exports.some(S.concat(x.value, y.value));\n },\n empty: exports.none\n };\n}\n\nexports.getMonoid = getMonoid;\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Functor = {\n URI: exports.URI,\n map: _map\n};\n/**\n * Derivable from `Functor`.\n *\n * @category combinators\n * @since 2.10.0\n */\n\nexports.flap = /*#__PURE__*/Functor_1.flap(exports.Functor);\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Pointed = {\n URI: exports.URI,\n of: exports.of\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Apply = {\n URI: exports.URI,\n map: _map,\n ap: _ap\n};\n/**\n * Combine two effectful actions, keeping only the result of the first.\n *\n * Derivable from `Apply`.\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.apFirst = /*#__PURE__*/Apply_1.apFirst(exports.Apply);\n/**\n * Combine two effectful actions, keeping only the result of the second.\n *\n * Derivable from `Apply`.\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.apSecond = /*#__PURE__*/Apply_1.apSecond(exports.Apply);\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Applicative = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n of: exports.of\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Chain = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n chain: _chain\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Monad = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n of: exports.of,\n chain: _chain\n};\n/**\n * Composes computations in sequence, using the return value of one computation to determine the next computation and\n * keeping only the result of the first.\n *\n * Derivable from `Chain`.\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.chainFirst = /*#__PURE__*/Chain_1.chainFirst(exports.Chain);\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Foldable = {\n URI: exports.URI,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Alt = {\n URI: exports.URI,\n map: _map,\n alt: _alt\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Alternative = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n of: exports.of,\n alt: _alt,\n zero: exports.zero\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Extend = {\n URI: exports.URI,\n map: _map,\n extend: _extend\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Compactable = {\n URI: exports.URI,\n compact: exports.compact,\n separate: exports.separate\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Filterable = {\n URI: exports.URI,\n map: _map,\n compact: exports.compact,\n separate: exports.separate,\n filter: _filter,\n filterMap: _filterMap,\n partition: _partition,\n partitionMap: _partitionMap\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Traversable = {\n URI: exports.URI,\n map: _map,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: exports.sequence\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Witherable = {\n URI: exports.URI,\n map: _map,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: exports.sequence,\n compact: exports.compact,\n separate: exports.separate,\n filter: _filter,\n filterMap: _filterMap,\n partition: _partition,\n partitionMap: _partitionMap,\n wither: _wither,\n wilt: _wilt\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.MonadThrow = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n of: exports.of,\n chain: _chain,\n throwError: exports.throwError\n}; // -------------------------------------------------------------------------------------\n// utils\n// -------------------------------------------------------------------------------------\n\n/**\n * Returns `true` if `ma` contains `a`\n *\n * @example\n * import { some, none, elem } from 'fp-ts/Option'\n * import * as N from 'fp-ts/number'\n *\n * assert.strictEqual(elem(N.Eq)(1, some(1)), true)\n * assert.strictEqual(elem(N.Eq)(2, some(1)), false)\n * assert.strictEqual(elem(N.Eq)(1, none), false)\n *\n * @since 2.0.0\n */\n\nfunction elem(E) {\n return function (a, ma) {\n return exports.isNone(ma) ? false : E.equals(a, ma.value);\n };\n}\n\nexports.elem = elem;\n/**\n * Returns `true` if the predicate is satisfied by the wrapped value\n *\n * @example\n * import { some, none, exists } from 'fp-ts/Option'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.strictEqual(\n * pipe(\n * some(1),\n * exists(n => n > 0)\n * ),\n * true\n * )\n * assert.strictEqual(\n * pipe(\n * some(1),\n * exists(n => n > 1)\n * ),\n * false\n * )\n * assert.strictEqual(\n * pipe(\n * none,\n * exists(n => n > 0)\n * ),\n * false\n * )\n *\n * @since 2.0.0\n */\n\nfunction exists(predicate) {\n return function (ma) {\n return exports.isNone(ma) ? false : predicate(ma.value);\n };\n}\n\nexports.exists = exists;\n/**\n * Returns a `Refinement` (i.e. a custom type guard) from a `Option` returning function.\n * This function ensures that a custom type guard definition is type-safe.\n *\n * ```ts\n * import { some, none, getRefinement } from 'fp-ts/Option'\n *\n * type A = { type: 'A' }\n * type B = { type: 'B' }\n * type C = A | B\n *\n * const isA = (c: C): c is A => c.type === 'B' // <= typo but typescript doesn't complain\n * const isA = getRefinement(c => (c.type === 'B' ? some(c) : none)) // static error: Type '\"B\"' is not assignable to type '\"A\"'\n * ```\n *\n * @since 2.0.0\n */\n\nfunction getRefinement(getOption) {\n return function (a) {\n return exports.isSome(getOption(a));\n };\n}\n\nexports.getRefinement = getRefinement; // -------------------------------------------------------------------------------------\n// do notation\n// -------------------------------------------------------------------------------------\n\n/**\n * @since 2.9.0\n */\n\nexports.Do = /*#__PURE__*/exports.of({});\n/**\n * @since 2.8.0\n */\n\nexports.bindTo = /*#__PURE__*/Functor_1.bindTo(exports.Functor);\n/**\n * @since 2.8.0\n */\n\nexports.bind = /*#__PURE__*/Chain_1.bind(exports.Chain); // -------------------------------------------------------------------------------------\n// pipeable sequence S\n// -------------------------------------------------------------------------------------\n\n/**\n * @since 2.8.0\n */\n\nexports.apS = /*#__PURE__*/Apply_1.apS(exports.Apply); // -------------------------------------------------------------------------------------\n// array utils\n// -------------------------------------------------------------------------------------\n\n/**\n * Equivalent to `ReadonlyArray#traverseWithIndex(Applicative)`.\n *\n * @since 2.9.0\n */\n\nvar traverseArrayWithIndex = function traverseArrayWithIndex(f) {\n return function (as) {\n var out = [];\n\n for (var i = 0; i < as.length; i++) {\n var b = f(i, as[i]);\n\n if (exports.isNone(b)) {\n return exports.none;\n }\n\n out.push(b.value);\n }\n\n return exports.some(out);\n };\n};\n\nexports.traverseArrayWithIndex = traverseArrayWithIndex;\n/**\n * Equivalent to `ReadonlyArray#traverse(Applicative)`.\n *\n * @since 2.9.0\n */\n\nvar traverseArray = function traverseArray(f) {\n return exports.traverseArrayWithIndex(function (_, a) {\n return f(a);\n });\n};\n\nexports.traverseArray = traverseArray;\n/**\n * Equivalent to `ReadonlyArray#sequence(Applicative)`.\n *\n * @since 2.9.0\n */\n\nexports.sequenceArray = /*#__PURE__*/exports.traverseArray(function_1.identity); // -------------------------------------------------------------------------------------\n// deprecated\n// -------------------------------------------------------------------------------------\n\n/**\n * Use [`chainNullableK`](#chainnullablek) instead.\n *\n * @category combinators\n * @since 2.0.0\n * @deprecated\n */\n\nexports.mapNullable = exports.chainNullableK;\n/**\n * Use small, specific instances instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.option = {\n URI: exports.URI,\n map: _map,\n of: exports.of,\n ap: _ap,\n chain: _chain,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: exports.sequence,\n zero: exports.zero,\n alt: _alt,\n extend: _extend,\n compact: exports.compact,\n separate: exports.separate,\n filter: _filter,\n filterMap: _filterMap,\n partition: _partition,\n partitionMap: _partitionMap,\n wither: _wither,\n wilt: _wilt,\n throwError: exports.throwError\n};\n/**\n * Use [`getApplySemigroup`](./Apply.ts.html#getApplySemigroup) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getApplySemigroup = /*#__PURE__*/Apply_1.getApplySemigroup(exports.Apply);\n/**\n * Use [`getApplicativeMonoid`](./Applicative.ts.html#getApplicativeMonoid) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getApplyMonoid = /*#__PURE__*/Applicative_1.getApplicativeMonoid(exports.Applicative);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ordDate = exports.ordNumber = exports.ordString = exports.ordBoolean = exports.ord = exports.getDualOrd = exports.getTupleOrd = exports.between = exports.clamp = exports.max = exports.min = exports.geq = exports.leq = exports.gt = exports.lt = exports.Contravariant = exports.getMonoid = exports.getSemigroup = exports.URI = exports.contramap = exports.reverse = exports.tuple = exports.fromCompare = exports.equalsDefault = void 0;\n\nvar Eq_1 = require(\"./Eq\");\n\nvar function_1 = require(\"./function\"); // -------------------------------------------------------------------------------------\n// defaults\n// -------------------------------------------------------------------------------------\n\n/**\n * @category defaults\n * @since 2.10.0\n */\n\n\nvar equalsDefault = function equalsDefault(compare) {\n return function (first, second) {\n return first === second || compare(first, second) === 0;\n };\n};\n\nexports.equalsDefault = equalsDefault; // -------------------------------------------------------------------------------------\n// constructors\n// -------------------------------------------------------------------------------------\n\n/**\n * @category constructors\n * @since 2.0.0\n */\n\nvar fromCompare = function fromCompare(_compare) {\n return {\n equals: exports.equalsDefault(_compare),\n compare: function compare(first, second) {\n return first === second ? 0 : _compare(first, second);\n }\n };\n};\n\nexports.fromCompare = fromCompare; // -------------------------------------------------------------------------------------\n// combinators\n// -------------------------------------------------------------------------------------\n\n/**\n * Given a tuple of `Ord`s returns an `Ord` for the tuple.\n *\n * @example\n * import { tuple } from 'fp-ts/Ord'\n * import * as B from 'fp-ts/boolean'\n * import * as S from 'fp-ts/string'\n * import * as N from 'fp-ts/number'\n *\n * const O = tuple(S.Ord, N.Ord, B.Ord)\n * assert.strictEqual(O.compare(['a', 1, true], ['b', 2, true]), -1)\n * assert.strictEqual(O.compare(['a', 1, true], ['a', 2, true]), -1)\n * assert.strictEqual(O.compare(['a', 1, true], ['a', 1, false]), 1)\n *\n * @category combinators\n * @since 2.10.0\n */\n\nvar tuple = function tuple() {\n var ords = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n ords[_i] = arguments[_i];\n }\n\n return exports.fromCompare(function (first, second) {\n var i = 0;\n\n for (; i < ords.length - 1; i++) {\n var r = ords[i].compare(first[i], second[i]);\n\n if (r !== 0) {\n return r;\n }\n }\n\n return ords[i].compare(first[i], second[i]);\n });\n};\n\nexports.tuple = tuple;\n/**\n * @category combinators\n * @since 2.10.0\n */\n\nvar reverse = function reverse(O) {\n return exports.fromCompare(function (first, second) {\n return O.compare(second, first);\n });\n};\n\nexports.reverse = reverse; // -------------------------------------------------------------------------------------\n// non-pipeables\n// -------------------------------------------------------------------------------------\n\n/* istanbul ignore next */\n\nvar contramap_ = function contramap_(fa, f) {\n return function_1.pipe(fa, exports.contramap(f));\n}; // -------------------------------------------------------------------------------------\n// type class members\n// -------------------------------------------------------------------------------------\n\n/**\n * @category Contravariant\n * @since 2.0.0\n */\n\n\nvar contramap = function contramap(f) {\n return function (fa) {\n return exports.fromCompare(function (first, second) {\n return fa.compare(f(first), f(second));\n });\n };\n};\n\nexports.contramap = contramap; // -------------------------------------------------------------------------------------\n// instances\n// -------------------------------------------------------------------------------------\n\n/**\n * @category instances\n * @since 2.0.0\n */\n\nexports.URI = 'Ord';\n/**\n * @category instances\n * @since 2.0.0\n */\n\nvar getSemigroup = function getSemigroup() {\n return {\n concat: function concat(first, second) {\n return exports.fromCompare(function (a, b) {\n var ox = first.compare(a, b);\n return ox !== 0 ? ox : second.compare(a, b);\n });\n }\n };\n};\n\nexports.getSemigroup = getSemigroup;\n/**\n * Returns a `Monoid` such that:\n *\n * - its `concat(ord1, ord2)` operation will order first by `ord1`, and then by `ord2`\n * - its `empty` value is an `Ord` that always considers compared elements equal\n *\n * @example\n * import { sort } from 'fp-ts/Array'\n * import { contramap, reverse, getMonoid } from 'fp-ts/Ord'\n * import * as S from 'fp-ts/string'\n * import * as B from 'fp-ts/boolean'\n * import { pipe } from 'fp-ts/function'\n * import { concatAll } from 'fp-ts/Monoid'\n * import * as N from 'fp-ts/number'\n *\n * interface User {\n * readonly id: number\n * readonly name: string\n * readonly age: number\n * readonly rememberMe: boolean\n * }\n *\n * const byName = pipe(\n * S.Ord,\n * contramap((p: User) => p.name)\n * )\n *\n * const byAge = pipe(\n * N.Ord,\n * contramap((p: User) => p.age)\n * )\n *\n * const byRememberMe = pipe(\n * B.Ord,\n * contramap((p: User) => p.rememberMe)\n * )\n *\n * const M = getMonoid()\n *\n * const users: Array = [\n * { id: 1, name: 'Guido', age: 47, rememberMe: false },\n * { id: 2, name: 'Guido', age: 46, rememberMe: true },\n * { id: 3, name: 'Giulio', age: 44, rememberMe: false },\n * { id: 4, name: 'Giulio', age: 44, rememberMe: true }\n * ]\n *\n * // sort by name, then by age, then by `rememberMe`\n * const O1 = concatAll(M)([byName, byAge, byRememberMe])\n * assert.deepStrictEqual(sort(O1)(users), [\n * { id: 3, name: 'Giulio', age: 44, rememberMe: false },\n * { id: 4, name: 'Giulio', age: 44, rememberMe: true },\n * { id: 2, name: 'Guido', age: 46, rememberMe: true },\n * { id: 1, name: 'Guido', age: 47, rememberMe: false }\n * ])\n *\n * // now `rememberMe = true` first, then by name, then by age\n * const O2 = concatAll(M)([reverse(byRememberMe), byName, byAge])\n * assert.deepStrictEqual(sort(O2)(users), [\n * { id: 4, name: 'Giulio', age: 44, rememberMe: true },\n * { id: 2, name: 'Guido', age: 46, rememberMe: true },\n * { id: 3, name: 'Giulio', age: 44, rememberMe: false },\n * { id: 1, name: 'Guido', age: 47, rememberMe: false }\n * ])\n *\n * @category instances\n * @since 2.4.0\n */\n\nvar getMonoid = function getMonoid() {\n return {\n concat: exports.getSemigroup().concat,\n empty: exports.fromCompare(function () {\n return 0;\n })\n };\n};\n\nexports.getMonoid = getMonoid;\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Contravariant = {\n URI: exports.URI,\n contramap: contramap_\n}; // -------------------------------------------------------------------------------------\n// utils\n// -------------------------------------------------------------------------------------\n// TODO: curry in v3\n\n/**\n * Test whether one value is _strictly less than_ another\n *\n * @since 2.0.0\n */\n\nvar lt = function lt(O) {\n return function (first, second) {\n return O.compare(first, second) === -1;\n };\n};\n\nexports.lt = lt; // TODO: curry in v3\n\n/**\n * Test whether one value is _strictly greater than_ another\n *\n * @since 2.0.0\n */\n\nvar gt = function gt(O) {\n return function (first, second) {\n return O.compare(first, second) === 1;\n };\n};\n\nexports.gt = gt; // TODO: curry in v3\n\n/**\n * Test whether one value is _non-strictly less than_ another\n *\n * @since 2.0.0\n */\n\nvar leq = function leq(O) {\n return function (first, second) {\n return O.compare(first, second) !== 1;\n };\n};\n\nexports.leq = leq; // TODO: curry in v3\n\n/**\n * Test whether one value is _non-strictly greater than_ another\n *\n * @since 2.0.0\n */\n\nvar geq = function geq(O) {\n return function (first, second) {\n return O.compare(first, second) !== -1;\n };\n};\n\nexports.geq = geq; // TODO: curry in v3\n\n/**\n * Take the minimum of two values. If they are considered equal, the first argument is chosen\n *\n * @since 2.0.0\n */\n\nvar min = function min(O) {\n return function (first, second) {\n return first === second || O.compare(first, second) < 1 ? first : second;\n };\n};\n\nexports.min = min; // TODO: curry in v3\n\n/**\n * Take the maximum of two values. If they are considered equal, the first argument is chosen\n *\n * @since 2.0.0\n */\n\nvar max = function max(O) {\n return function (first, second) {\n return first === second || O.compare(first, second) > -1 ? first : second;\n };\n};\n\nexports.max = max;\n/**\n * Clamp a value between a minimum and a maximum\n *\n * @since 2.0.0\n */\n\nvar clamp = function clamp(O) {\n var minO = exports.min(O);\n var maxO = exports.max(O);\n return function (low, hi) {\n return function (a) {\n return maxO(minO(a, hi), low);\n };\n };\n};\n\nexports.clamp = clamp;\n/**\n * Test whether a value is between a minimum and a maximum (inclusive)\n *\n * @since 2.0.0\n */\n\nvar between = function between(O) {\n var ltO = exports.lt(O);\n var gtO = exports.gt(O);\n return function (low, hi) {\n return function (a) {\n return ltO(a, low) || gtO(a, hi) ? false : true;\n };\n };\n};\n\nexports.between = between; // -------------------------------------------------------------------------------------\n// deprecated\n// -------------------------------------------------------------------------------------\n\n/**\n * Use [`tuple`](#tuple) instead.\n *\n * @category combinators\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getTupleOrd = exports.tuple;\n/**\n * Use [`reverse`](#reverse) instead.\n *\n * @category combinators\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getDualOrd = exports.reverse;\n/**\n * Use [`Contravariant`](#contravariant) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.ord = exports.Contravariant; // default compare for primitive types\n\nfunction compare(first, second) {\n return first < second ? -1 : first > second ? 1 : 0;\n}\n\nvar strictOrd = {\n equals: Eq_1.eqStrict.equals,\n compare: compare\n};\n/**\n * Use [`Ord`](./boolean.ts.html#Ord) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.ordBoolean = strictOrd;\n/**\n * Use [`Ord`](./string.ts.html#Ord) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.ordString = strictOrd;\n/**\n * Use [`Ord`](./number.ts.html#Ord) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.ordNumber = strictOrd;\n/**\n * Use [`Ord`](./Date.ts.html#Ord) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.ordDate = /*#__PURE__*/function_1.pipe( // tslint:disable-next-line: deprecation\nexports.ordNumber, /*#__PURE__*/exports.contramap(function (date) {\n return date.valueOf();\n}));","\"use strict\";\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nvar __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n});\n\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n }\n\n __setModuleDefault(result, mod);\n\n return result;\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.uniq = exports.elem = exports.rotate = exports.intersperse = exports.prependAll = exports.unzip = exports.zip = exports.zipWith = exports.sort = exports.lefts = exports.rights = exports.reverse = exports.modifyAt = exports.deleteAt = exports.updateAt = exports.insertAt = exports.findLastIndex = exports.findLastMap = exports.findLast = exports.findFirstMap = exports.findFirst = exports.findIndex = exports.dropLeftWhile = exports.dropRight = exports.dropLeft = exports.spanLeft = exports.takeLeftWhile = exports.takeRight = exports.takeLeft = exports.init = exports.tail = exports.last = exports.head = exports.lookup = exports.isOutOfBound = exports.size = exports.isNonEmpty = exports.isEmpty = exports.scanRight = exports.scanLeft = exports.chainWithIndex = exports.foldRight = exports.matchRight = exports.foldLeft = exports.matchLeft = exports.replicate = exports.range = exports.makeBy = exports.append = exports.prepend = void 0;\nexports.Pointed = exports.flap = exports.Functor = exports.getOrd = exports.getEq = exports.getMonoid = exports.getSemigroup = exports.getShow = exports.URI = exports.unfold = exports.wilt = exports.wither = exports.traverseWithIndex = exports.sequence = exports.traverse = exports.reduceRightWithIndex = exports.reduceRight = exports.reduceWithIndex = exports.foldMap = exports.reduce = exports.foldMapWithIndex = exports.duplicate = exports.extend = exports.filterWithIndex = exports.partitionMapWithIndex = exports.partitionMap = exports.partitionWithIndex = exports.partition = exports.compact = exports.filterMap = exports.filterMapWithIndex = exports.filter = exports.separate = exports.mapWithIndex = exports.map = exports.flatten = exports.chain = exports.ap = exports.alt = exports.altW = exports.zero = exports.of = exports.difference = exports.intersection = exports.union = exports.comprehension = exports.chunksOf = exports.splitAt = exports.chop = exports.sortBy = void 0;\nexports.readonlyArray = exports.prependToAll = exports.snoc = exports.cons = exports.apS = exports.bind = exports.bindTo = exports.Do = exports.some = exports.every = exports.empty = exports.fromArray = exports.toArray = exports.unsafeDeleteAt = exports.unsafeUpdateAt = exports.unsafeInsertAt = exports.Witherable = exports.TraversableWithIndex = exports.Traversable = exports.FoldableWithIndex = exports.Foldable = exports.FilterableWithIndex = exports.Filterable = exports.Compactable = exports.Extend = exports.Alternative = exports.Alt = exports.Unfoldable = exports.chainFirst = exports.Monad = exports.Chain = exports.Applicative = exports.apSecond = exports.apFirst = exports.Apply = exports.FunctorWithIndex = void 0;\n\nvar Apply_1 = require(\"./Apply\");\n\nvar Chain_1 = require(\"./Chain\");\n\nvar Eq_1 = require(\"./Eq\");\n\nvar function_1 = require(\"./function\");\n\nvar Functor_1 = require(\"./Functor\");\n\nvar N = __importStar(require(\"./number\"));\n\nvar O = __importStar(require(\"./Option\"));\n\nvar Ord_1 = require(\"./Ord\");\n\nvar RNEA = __importStar(require(\"./ReadonlyNonEmptyArray\"));\n\nvar Separated_1 = require(\"./Separated\"); // -------------------------------------------------------------------------------------\n// constructors\n// -------------------------------------------------------------------------------------\n\n/**\n * Prepend an element to the front of a `ReadonlyArray`, creating a new `ReadonlyNonEmptyArray`.\n *\n * @example\n * import { prepend } from 'fp-ts/ReadonlyArray'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.deepStrictEqual(pipe([2, 3, 4], prepend(1)), [1, 2, 3, 4])\n *\n * @category constructors\n * @since 2.10.0\n */\n\n\nexports.prepend = RNEA.prepend;\n/**\n * Append an element to the end of a `ReadonlyArray`, creating a new `ReadonlyNonEmptyArray`.\n *\n * @example\n * import { append } from 'fp-ts/ReadonlyArray'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.deepStrictEqual(pipe([1, 2, 3], append(4)), [1, 2, 3, 4])\n *\n * @category constructors\n * @since 2.10.0\n */\n\nexports.append = RNEA.append;\n/**\n * Return a `ReadonlyArray` of length `n` with element `i` initialized with `f(i)`.\n *\n * **Note**. `n` is normalized to a non negative integer.\n *\n * @example\n * import { makeBy } from 'fp-ts/ReadonlyArray'\n *\n * const double = (n: number): number => n * 2\n * assert.deepStrictEqual(makeBy(5, double), [0, 2, 4, 6, 8])\n *\n * @category constructors\n * @since 2.5.0\n */\n\nvar makeBy = function makeBy(n, f) {\n return n <= 0 ? exports.empty : RNEA.makeBy(n, f);\n};\n\nexports.makeBy = makeBy;\n/**\n * Create a `ReadonlyArray` containing a range of integers, including both endpoints.\n *\n * @example\n * import { range } from 'fp-ts/ReadonlyArray'\n *\n * assert.deepStrictEqual(range(1, 5), [1, 2, 3, 4, 5])\n *\n * @category constructors\n * @since 2.5.0\n */\n\nvar range = function range(start, end) {\n return start <= end ? exports.makeBy(end - start + 1, function (i) {\n return start + i;\n }) : [start];\n};\n\nexports.range = range;\n/**\n * Create a `ReadonlyArray` containing a value repeated the specified number of times.\n *\n * **Note**. `n` is normalized to a non negative integer.\n *\n * @example\n * import { replicate } from 'fp-ts/ReadonlyArray'\n *\n * assert.deepStrictEqual(replicate(3, 'a'), ['a', 'a', 'a'])\n *\n * @category constructors\n * @since 2.5.0\n */\n\nvar replicate = function replicate(n, a) {\n return exports.makeBy(n, function () {\n return a;\n });\n};\n\nexports.replicate = replicate; // -------------------------------------------------------------------------------------\n// destructors\n// -------------------------------------------------------------------------------------\n\n/**\n * Break an array into its first element and remaining elements.\n *\n * @example\n * import { matchLeft } from 'fp-ts/ReadonlyArray'\n *\n * const len: (as: ReadonlyArray) => number = matchLeft(() => 0, (_, tail) => 1 + len(tail))\n * assert.strictEqual(len([1, 2, 3]), 3)\n *\n * @category destructors\n * @since 2.10.0\n */\n\nvar matchLeft = function matchLeft(onEmpty, onNonEmpty) {\n return function (as) {\n return exports.isNonEmpty(as) ? onNonEmpty(RNEA.head(as), RNEA.tail(as)) : onEmpty();\n };\n};\n\nexports.matchLeft = matchLeft;\n/**\n * Alias of [`matchLeft`](#matchleft).\n *\n * @category destructors\n * @since 2.5.0\n */\n\nexports.foldLeft = exports.matchLeft;\n/**\n * Break an array into its initial elements and the last element.\n *\n * @category destructors\n * @since 2.10.0\n */\n\nvar matchRight = function matchRight(onEmpty, onNonEmpty) {\n return function (as) {\n return exports.isNonEmpty(as) ? onNonEmpty(RNEA.init(as), RNEA.last(as)) : onEmpty();\n };\n};\n\nexports.matchRight = matchRight;\n/**\n * Alias of [`matchRight`](#matchright).\n *\n * @category destructors\n * @since 2.5.0\n */\n\nexports.foldRight = exports.matchRight; // -------------------------------------------------------------------------------------\n// combinators\n// -------------------------------------------------------------------------------------\n\n/**\n * @category combinators\n * @since 2.7.0\n */\n\nvar chainWithIndex = function chainWithIndex(f) {\n return function (as) {\n if (exports.isEmpty(as)) {\n return exports.empty;\n }\n\n var out = [];\n\n for (var i = 0; i < as.length; i++) {\n out.push.apply(out, f(i, as[i]));\n }\n\n return out;\n };\n};\n\nexports.chainWithIndex = chainWithIndex;\n/**\n * Same as `reduce` but it carries over the intermediate steps.\n *\n * @example\n * import { scanLeft } from 'fp-ts/ReadonlyArray'\n *\n * assert.deepStrictEqual(scanLeft(10, (b, a: number) => b - a)([1, 2, 3]), [10, 9, 7, 4])\n *\n * @category combinators\n * @since 2.5.0\n */\n\nvar scanLeft = function scanLeft(b, f) {\n return function (as) {\n var len = as.length;\n var out = new Array(len + 1);\n out[0] = b;\n\n for (var i = 0; i < len; i++) {\n out[i + 1] = f(out[i], as[i]);\n }\n\n return out;\n };\n};\n\nexports.scanLeft = scanLeft;\n/**\n * Fold an array from the right, keeping all intermediate results instead of only the final result\n *\n * @example\n * import { scanRight } from 'fp-ts/ReadonlyArray'\n *\n * assert.deepStrictEqual(scanRight(10, (a: number, b) => b - a)([1, 2, 3]), [4, 5, 7, 10])\n *\n * @category combinators\n * @since 2.5.0\n */\n\nvar scanRight = function scanRight(b, f) {\n return function (as) {\n var len = as.length;\n var out = new Array(len + 1);\n out[len] = b;\n\n for (var i = len - 1; i >= 0; i--) {\n out[i] = f(as[i], out[i + 1]);\n }\n\n return out;\n };\n};\n\nexports.scanRight = scanRight;\n/**\n * Test whether a `ReadonlyArray` is empty.\n *\n * @example\n * import { isEmpty } from 'fp-ts/ReadonlyArray'\n *\n * assert.strictEqual(isEmpty([]), true)\n *\n * @since 2.5.0\n */\n\nvar isEmpty = function isEmpty(as) {\n return as.length === 0;\n};\n\nexports.isEmpty = isEmpty;\n/**\n * Test whether a `ReadonlyArray` is non empty.\n *\n * @category guards\n * @since 2.5.0\n */\n\nexports.isNonEmpty = RNEA.isNonEmpty;\n/**\n * Calculate the number of elements in a `ReadonlyArray`.\n *\n * @since 2.10.0\n */\n\nvar size = function size(as) {\n return as.length;\n};\n\nexports.size = size;\n/**\n * Test whether an array contains a particular index\n *\n * @since 2.5.0\n */\n\nexports.isOutOfBound = RNEA.isOutOfBound;\n\nfunction lookup(i, as) {\n return as === undefined ? function (as) {\n return lookup(i, as);\n } : exports.isOutOfBound(i, as) ? O.none : O.some(as[i]);\n}\n\nexports.lookup = lookup;\n/**\n * Get the first element in an array, or `None` if the array is empty\n *\n * @example\n * import { head } from 'fp-ts/ReadonlyArray'\n * import { some, none } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(head([1, 2, 3]), some(1))\n * assert.deepStrictEqual(head([]), none)\n *\n * @since 2.5.0\n */\n\nvar head = function head(as) {\n return exports.isNonEmpty(as) ? O.some(RNEA.head(as)) : O.none;\n};\n\nexports.head = head;\n/**\n * Get the last element in an array, or `None` if the array is empty\n *\n * @example\n * import { last } from 'fp-ts/ReadonlyArray'\n * import { some, none } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(last([1, 2, 3]), some(3))\n * assert.deepStrictEqual(last([]), none)\n *\n * @since 2.5.0\n */\n\nvar last = function last(as) {\n return exports.isNonEmpty(as) ? O.some(RNEA.last(as)) : O.none;\n};\n\nexports.last = last;\n/**\n * Get all but the first element of an array, creating a new array, or `None` if the array is empty\n *\n * @example\n * import { tail } from 'fp-ts/ReadonlyArray'\n * import { some, none } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(tail([1, 2, 3]), some([2, 3]))\n * assert.deepStrictEqual(tail([]), none)\n *\n * @since 2.5.0\n */\n\nvar tail = function tail(as) {\n return exports.isNonEmpty(as) ? O.some(RNEA.tail(as)) : O.none;\n};\n\nexports.tail = tail;\n/**\n * Get all but the last element of an array, creating a new array, or `None` if the array is empty\n *\n * @example\n * import { init } from 'fp-ts/ReadonlyArray'\n * import { some, none } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(init([1, 2, 3]), some([1, 2]))\n * assert.deepStrictEqual(init([]), none)\n *\n * @since 2.5.0\n */\n\nvar init = function init(as) {\n return exports.isNonEmpty(as) ? O.some(RNEA.init(as)) : O.none;\n};\n\nexports.init = init;\n/**\n * Keep only a max number of elements from the start of an `ReadonlyArray`, creating a new `ReadonlyArray`.\n *\n * **Note**. `n` is normalized to a non negative integer.\n *\n * @example\n * import * as RA from 'fp-ts/ReadonlyArray'\n * import { pipe } from 'fp-ts/function'\n *\n * const input: ReadonlyArray = [1, 2, 3]\n * assert.deepStrictEqual(pipe(input, RA.takeLeft(2)), [1, 2])\n *\n * // out of bounds\n * assert.strictEqual(pipe(input, RA.takeLeft(4)), input)\n * assert.strictEqual(pipe(input, RA.takeLeft(-1)), input)\n *\n * @category combinators\n * @since 2.5.0\n */\n\nvar takeLeft = function takeLeft(n) {\n return function (as) {\n return exports.isOutOfBound(n, as) ? as : n === 0 ? exports.empty : as.slice(0, n);\n };\n};\n\nexports.takeLeft = takeLeft;\n/**\n * Keep only a max number of elements from the end of an `ReadonlyArray`, creating a new `ReadonlyArray`.\n *\n * **Note**. `n` is normalized to a non negative integer.\n *\n * @example\n * import * as RA from 'fp-ts/ReadonlyArray'\n * import { pipe } from 'fp-ts/function'\n *\n * const input: ReadonlyArray = [1, 2, 3]\n * assert.deepStrictEqual(pipe(input, RA.takeRight(2)), [2, 3])\n *\n * // out of bounds\n * assert.strictEqual(pipe(input, RA.takeRight(4)), input)\n * assert.strictEqual(pipe(input, RA.takeRight(-1)), input)\n *\n * @since 2.5.0\n */\n\nvar takeRight = function takeRight(n) {\n return function (as) {\n return exports.isOutOfBound(n, as) ? as : n === 0 ? exports.empty : as.slice(-n);\n };\n};\n\nexports.takeRight = takeRight;\n\nfunction takeLeftWhile(predicate) {\n return function (as) {\n var out = [];\n\n for (var _i = 0, as_1 = as; _i < as_1.length; _i++) {\n var a = as_1[_i];\n\n if (!predicate(a)) {\n break;\n }\n\n out.push(a);\n }\n\n var len = out.length;\n return len === as.length ? as : len === 0 ? exports.empty : out;\n };\n}\n\nexports.takeLeftWhile = takeLeftWhile;\n\nvar spanLeftIndex = function spanLeftIndex(as, predicate) {\n var l = as.length;\n var i = 0;\n\n for (; i < l; i++) {\n if (!predicate(as[i])) {\n break;\n }\n }\n\n return i;\n};\n\nfunction spanLeft(predicate) {\n return function (as) {\n var _a = exports.splitAt(spanLeftIndex(as, predicate))(as),\n init = _a[0],\n rest = _a[1];\n\n return {\n init: init,\n rest: rest\n };\n };\n}\n\nexports.spanLeft = spanLeft;\n/**\n * Drop a max number of elements from the start of an `ReadonlyArray`, creating a new `ReadonlyArray`.\n *\n * **Note**. `n` is normalized to a non negative integer.\n *\n * @example\n * import * as RA from 'fp-ts/ReadonlyArray'\n * import { pipe } from 'fp-ts/function'\n *\n * const input: ReadonlyArray = [1, 2, 3]\n * assert.deepStrictEqual(pipe(input, RA.dropLeft(2)), [3])\n * assert.strictEqual(pipe(input, RA.dropLeft(0)), input)\n * assert.strictEqual(pipe(input, RA.dropLeft(-1)), input)\n *\n * @category combinators\n * @since 2.5.0\n */\n\nvar dropLeft = function dropLeft(n) {\n return function (as) {\n return n <= 0 || exports.isEmpty(as) ? as : n >= as.length ? exports.empty : as.slice(n, as.length);\n };\n};\n\nexports.dropLeft = dropLeft;\n/**\n * Drop a max number of elements from the end of an `ReadonlyArray`, creating a new `ReadonlyArray`.\n *\n * **Note**. `n` is normalized to a non negative integer.\n *\n * @example\n * import * as RA from 'fp-ts/ReadonlyArray'\n * import { pipe } from 'fp-ts/function'\n *\n * const input: ReadonlyArray = [1, 2, 3]\n * assert.deepStrictEqual(pipe(input, RA.dropRight(2)), [1])\n * assert.strictEqual(pipe(input, RA.dropRight(0)), input)\n * assert.strictEqual(pipe(input, RA.dropRight(-1)), input)\n *\n * @category combinators\n * @since 2.5.0\n */\n\nvar dropRight = function dropRight(n) {\n return function (as) {\n return n <= 0 || exports.isEmpty(as) ? as : n >= as.length ? exports.empty : as.slice(0, as.length - n);\n };\n};\n\nexports.dropRight = dropRight;\n/**\n * Remove the longest initial subarray for which all element satisfy the specified predicate, creating a new array\n *\n * @example\n * import { dropLeftWhile } from 'fp-ts/ReadonlyArray'\n *\n * assert.deepStrictEqual(dropLeftWhile((n: number) => n % 2 === 1)([1, 3, 2, 4, 5]), [2, 4, 5])\n *\n * @category combinators\n * @since 2.5.0\n */\n\nvar dropLeftWhile = function dropLeftWhile(predicate) {\n return function (as) {\n var i = spanLeftIndex(as, predicate);\n return i === 0 ? as : i === as.length ? exports.empty : as.slice(i);\n };\n};\n\nexports.dropLeftWhile = dropLeftWhile;\n/**\n * Find the first index for which a predicate holds\n *\n * @example\n * import { findIndex } from 'fp-ts/ReadonlyArray'\n * import { some, none } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(findIndex((n: number) => n === 2)([1, 2, 3]), some(1))\n * assert.deepStrictEqual(findIndex((n: number) => n === 2)([]), none)\n *\n * @since 2.5.0\n */\n\nvar findIndex = function findIndex(predicate) {\n return function (as) {\n for (var i = 0; i < as.length; i++) {\n if (predicate(as[i])) {\n return O.some(i);\n }\n }\n\n return O.none;\n };\n};\n\nexports.findIndex = findIndex;\n\nfunction findFirst(predicate) {\n return function (as) {\n for (var i = 0; i < as.length; i++) {\n if (predicate(as[i])) {\n return O.some(as[i]);\n }\n }\n\n return O.none;\n };\n}\n\nexports.findFirst = findFirst;\n/**\n * Find the first element returned by an option based selector function\n *\n * @example\n * import { findFirstMap } from 'fp-ts/ReadonlyArray'\n * import { some, none } from 'fp-ts/Option'\n *\n * interface Person {\n * readonly name: string\n * readonly age?: number\n * }\n *\n * const persons: ReadonlyArray = [{ name: 'John' }, { name: 'Mary', age: 45 }, { name: 'Joey', age: 28 }]\n *\n * // returns the name of the first person that has an age\n * assert.deepStrictEqual(findFirstMap((p: Person) => (p.age === undefined ? none : some(p.name)))(persons), some('Mary'))\n *\n * @since 2.5.0\n */\n\nvar findFirstMap = function findFirstMap(f) {\n return function (as) {\n for (var i = 0; i < as.length; i++) {\n var out = f(as[i]);\n\n if (O.isSome(out)) {\n return out;\n }\n }\n\n return O.none;\n };\n};\n\nexports.findFirstMap = findFirstMap;\n\nfunction findLast(predicate) {\n return function (as) {\n for (var i = as.length - 1; i >= 0; i--) {\n if (predicate(as[i])) {\n return O.some(as[i]);\n }\n }\n\n return O.none;\n };\n}\n\nexports.findLast = findLast;\n/**\n * Find the last element returned by an option based selector function\n *\n * @example\n * import { findLastMap } from 'fp-ts/ReadonlyArray'\n * import { some, none } from 'fp-ts/Option'\n *\n * interface Person {\n * readonly name: string\n * readonly age?: number\n * }\n *\n * const persons: ReadonlyArray = [{ name: 'John' }, { name: 'Mary', age: 45 }, { name: 'Joey', age: 28 }]\n *\n * // returns the name of the last person that has an age\n * assert.deepStrictEqual(findLastMap((p: Person) => (p.age === undefined ? none : some(p.name)))(persons), some('Joey'))\n *\n * @since 2.5.0\n */\n\nvar findLastMap = function findLastMap(f) {\n return function (as) {\n for (var i = as.length - 1; i >= 0; i--) {\n var out = f(as[i]);\n\n if (O.isSome(out)) {\n return out;\n }\n }\n\n return O.none;\n };\n};\n\nexports.findLastMap = findLastMap;\n/**\n * Returns the index of the last element of the list which matches the predicate\n *\n * @example\n * import { findLastIndex } from 'fp-ts/ReadonlyArray'\n * import { some, none } from 'fp-ts/Option'\n *\n * interface X {\n * readonly a: number\n * readonly b: number\n * }\n * const xs: ReadonlyArray = [{ a: 1, b: 0 }, { a: 1, b: 1 }]\n * assert.deepStrictEqual(findLastIndex((x: { readonly a: number }) => x.a === 1)(xs), some(1))\n * assert.deepStrictEqual(findLastIndex((x: { readonly a: number }) => x.a === 4)(xs), none)\n *\n *\n * @since 2.5.0\n */\n\nvar findLastIndex = function findLastIndex(predicate) {\n return function (as) {\n for (var i = as.length - 1; i >= 0; i--) {\n if (predicate(as[i])) {\n return O.some(i);\n }\n }\n\n return O.none;\n };\n};\n\nexports.findLastIndex = findLastIndex;\n/**\n * Insert an element at the specified index, creating a new array, or returning `None` if the index is out of bounds\n *\n * @example\n * import { insertAt } from 'fp-ts/ReadonlyArray'\n * import { some } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(insertAt(2, 5)([1, 2, 3, 4]), some([1, 2, 5, 3, 4]))\n *\n * @since 2.5.0\n */\n\nexports.insertAt = // tslint:disable-next-line: deprecation\nRNEA.insertAt;\n/**\n * Change the element at the specified index, creating a new array, or returning `None` if the index is out of bounds\n *\n * @example\n * import { updateAt } from 'fp-ts/ReadonlyArray'\n * import { some, none } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(updateAt(1, 1)([1, 2, 3]), some([1, 1, 3]))\n * assert.deepStrictEqual(updateAt(1, 1)([]), none)\n *\n * @since 2.5.0\n */\n\nvar updateAt = function updateAt(i, a) {\n return exports.modifyAt(i, function () {\n return a;\n });\n};\n\nexports.updateAt = updateAt;\n/**\n * Delete the element at the specified index, creating a new array, or returning `None` if the index is out of bounds\n *\n * @example\n * import { deleteAt } from 'fp-ts/ReadonlyArray'\n * import { some, none } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(deleteAt(0)([1, 2, 3]), some([2, 3]))\n * assert.deepStrictEqual(deleteAt(1)([]), none)\n *\n * @since 2.5.0\n */\n\nvar deleteAt = function deleteAt(i) {\n return function (as) {\n return exports.isOutOfBound(i, as) ? O.none : O.some(exports.unsafeDeleteAt(i, as));\n };\n};\n\nexports.deleteAt = deleteAt;\n/**\n * Apply a function to the element at the specified index, creating a new array, or returning `None` if the index is out\n * of bounds\n *\n * @example\n * import { modifyAt } from 'fp-ts/ReadonlyArray'\n * import { some, none } from 'fp-ts/Option'\n *\n * const double = (x: number): number => x * 2\n * assert.deepStrictEqual(modifyAt(1, double)([1, 2, 3]), some([1, 4, 3]))\n * assert.deepStrictEqual(modifyAt(1, double)([]), none)\n *\n * @since 2.5.0\n */\n\nvar modifyAt = function modifyAt(i, f) {\n return function (as) {\n return exports.isOutOfBound(i, as) ? O.none : O.some(exports.unsafeUpdateAt(i, f(as[i]), as));\n };\n};\n\nexports.modifyAt = modifyAt;\n/**\n * Reverse an array, creating a new array\n *\n * @example\n * import { reverse } from 'fp-ts/ReadonlyArray'\n *\n * assert.deepStrictEqual(reverse([1, 2, 3]), [3, 2, 1])\n *\n * @category combinators\n * @since 2.5.0\n */\n\nvar reverse = function reverse(as) {\n return as.length <= 1 ? as : as.slice().reverse();\n};\n\nexports.reverse = reverse;\n/**\n * Extracts from an array of `Either` all the `Right` elements. All the `Right` elements are extracted in order\n *\n * @example\n * import { rights } from 'fp-ts/ReadonlyArray'\n * import { right, left } from 'fp-ts/Either'\n *\n * assert.deepStrictEqual(rights([right(1), left('foo'), right(2)]), [1, 2])\n *\n * @category combinators\n * @since 2.5.0\n */\n\nvar rights = function rights(as) {\n var r = [];\n\n for (var i = 0; i < as.length; i++) {\n var a = as[i];\n\n if (a._tag === 'Right') {\n r.push(a.right);\n }\n }\n\n return r;\n};\n\nexports.rights = rights;\n/**\n * Extracts from an array of `Either` all the `Left` elements. All the `Left` elements are extracted in order\n *\n * @example\n * import { lefts } from 'fp-ts/ReadonlyArray'\n * import { left, right } from 'fp-ts/Either'\n *\n * assert.deepStrictEqual(lefts([right(1), left('foo'), right(2)]), ['foo'])\n *\n * @category combinators\n * @since 2.5.0\n */\n\nvar lefts = function lefts(as) {\n var r = [];\n\n for (var i = 0; i < as.length; i++) {\n var a = as[i];\n\n if (a._tag === 'Left') {\n r.push(a.left);\n }\n }\n\n return r;\n};\n\nexports.lefts = lefts;\n/**\n * Sort the elements of an array in increasing order, creating a new array\n *\n * @example\n * import { sort } from 'fp-ts/ReadonlyArray'\n * import * as N from 'fp-ts/number'\n *\n * assert.deepStrictEqual(sort(N.Ord)([3, 2, 1]), [1, 2, 3])\n *\n * @category combinators\n * @since 2.5.0\n */\n\nvar sort = function sort(O) {\n return function (as) {\n return as.length <= 1 ? as : as.slice().sort(O.compare);\n };\n};\n\nexports.sort = sort; // TODO: curry and make data-last in v3\n\n/**\n * Apply a function to pairs of elements at the same index in two arrays, collecting the results in a new array. If one\n * input array is short, excess elements of the longer array are discarded.\n *\n * @example\n * import { zipWith } from 'fp-ts/ReadonlyArray'\n *\n * assert.deepStrictEqual(zipWith([1, 2, 3], ['a', 'b', 'c', 'd'], (n, s) => s + n), ['a1', 'b2', 'c3'])\n *\n * @category combinators\n * @since 2.5.0\n */\n\nvar zipWith = function zipWith(fa, fb, f) {\n var fc = [];\n var len = Math.min(fa.length, fb.length);\n\n for (var i = 0; i < len; i++) {\n fc[i] = f(fa[i], fb[i]);\n }\n\n return fc;\n};\n\nexports.zipWith = zipWith;\n\nfunction zip(as, bs) {\n if (bs === undefined) {\n return function (bs) {\n return zip(bs, as);\n };\n }\n\n return exports.zipWith(as, bs, function (a, b) {\n return [a, b];\n });\n}\n\nexports.zip = zip;\n/**\n * The function is reverse of `zip`. Takes an array of pairs and return two corresponding arrays\n *\n * @example\n * import { unzip } from 'fp-ts/ReadonlyArray'\n *\n * assert.deepStrictEqual(unzip([[1, 'a'], [2, 'b'], [3, 'c']]), [[1, 2, 3], ['a', 'b', 'c']])\n *\n * @category combinators\n * @since 2.5.0\n */\n\nvar unzip = function unzip(as) {\n var fa = [];\n var fb = [];\n\n for (var i = 0; i < as.length; i++) {\n fa[i] = as[i][0];\n fb[i] = as[i][1];\n }\n\n return [fa, fb];\n};\n\nexports.unzip = unzip;\n/**\n * Prepend an element to every member of an array\n *\n * @example\n * import { prependAll } from 'fp-ts/ReadonlyArray'\n *\n * assert.deepStrictEqual(prependAll(9)([1, 2, 3, 4]), [9, 1, 9, 2, 9, 3, 9, 4])\n *\n * @category combinators\n * @since 2.10.0\n */\n\nvar prependAll = function prependAll(middle) {\n var f = RNEA.prependAll(middle);\n return function (as) {\n return exports.isNonEmpty(as) ? f(as) : as;\n };\n};\n\nexports.prependAll = prependAll;\n/**\n * Places an element in between members of an array\n *\n * @example\n * import { intersperse } from 'fp-ts/ReadonlyArray'\n *\n * assert.deepStrictEqual(intersperse(9)([1, 2, 3, 4]), [1, 9, 2, 9, 3, 9, 4])\n *\n * @category combinators\n * @since 2.9.0\n */\n\nvar intersperse = function intersperse(middle) {\n var f = RNEA.intersperse(middle);\n return function (as) {\n return exports.isNonEmpty(as) ? f(as) : as;\n };\n};\n\nexports.intersperse = intersperse;\n/**\n * Rotate a `ReadonlyArray` by `n` steps.\n *\n * @example\n * import { rotate } from 'fp-ts/ReadonlyArray'\n *\n * assert.deepStrictEqual(rotate(2)([1, 2, 3, 4, 5]), [4, 5, 1, 2, 3])\n *\n * @category combinators\n * @since 2.5.0\n */\n\nvar rotate = function rotate(n) {\n var f = RNEA.rotate(n);\n return function (as) {\n return exports.isNonEmpty(as) ? f(as) : as;\n };\n};\n\nexports.rotate = rotate;\n\nfunction elem(E) {\n return function (a, as) {\n if (as === undefined) {\n var elemE_1 = elem(E);\n return function (as) {\n return elemE_1(a, as);\n };\n }\n\n var predicate = function predicate(element) {\n return E.equals(element, a);\n };\n\n var i = 0;\n\n for (; i < as.length; i++) {\n if (predicate(as[i])) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nexports.elem = elem;\n/**\n * Remove duplicates from an array, keeping the first occurrence of an element.\n *\n * @example\n * import { uniq } from 'fp-ts/ReadonlyArray'\n * import * as N from 'fp-ts/number'\n *\n * assert.deepStrictEqual(uniq(N.Eq)([1, 2, 1]), [1, 2])\n *\n * @category combinators\n * @since 2.5.0\n */\n\nvar uniq = function uniq(E) {\n var f = RNEA.uniq(E);\n return function (as) {\n return exports.isNonEmpty(as) ? f(as) : as;\n };\n};\n\nexports.uniq = uniq;\n/**\n * Sort the elements of an array in increasing order, where elements are compared using first `ords[0]`, then `ords[1]`,\n * etc...\n *\n * @example\n * import { sortBy } from 'fp-ts/ReadonlyArray'\n * import { contramap } from 'fp-ts/Ord'\n * import * as S from 'fp-ts/string'\n * import * as N from 'fp-ts/number'\n * import { pipe } from 'fp-ts/function'\n *\n * interface Person {\n * readonly name: string\n * readonly age: number\n * }\n * const byName = pipe(S.Ord, contramap((p: Person) => p.name))\n * const byAge = pipe(N.Ord, contramap((p: Person) => p.age))\n *\n * const sortByNameByAge = sortBy([byName, byAge])\n *\n * const persons = [{ name: 'a', age: 1 }, { name: 'b', age: 3 }, { name: 'c', age: 2 }, { name: 'b', age: 2 }]\n * assert.deepStrictEqual(sortByNameByAge(persons), [\n * { name: 'a', age: 1 },\n * { name: 'b', age: 2 },\n * { name: 'b', age: 3 },\n * { name: 'c', age: 2 }\n * ])\n *\n * @category combinators\n * @since 2.5.0\n */\n\nvar sortBy = function sortBy(ords) {\n var f = RNEA.sortBy(ords);\n return function (as) {\n return exports.isNonEmpty(as) ? f(as) : as;\n };\n};\n\nexports.sortBy = sortBy;\n/**\n * A useful recursion pattern for processing a `ReadonlyArray` to produce a new `ReadonlyArray`, often used for \"chopping\" up the input\n * `ReadonlyArray`. Typically `chop` is called with some function that will consume an initial prefix of the `ReadonlyArray` and produce a\n * value and the tail of the `ReadonlyArray`.\n *\n * @example\n * import { Eq } from 'fp-ts/Eq'\n * import * as RA from 'fp-ts/ReadonlyArray'\n * import * as N from 'fp-ts/number'\n * import { pipe } from 'fp-ts/function'\n *\n * const group = (S: Eq): ((as: ReadonlyArray) => ReadonlyArray>) => {\n * return RA.chop(as => {\n * const { init, rest } = pipe(as, RA.spanLeft((a: A) => S.equals(a, as[0])))\n * return [init, rest]\n * })\n * }\n * assert.deepStrictEqual(group(N.Eq)([1, 1, 2, 3, 3, 4]), [[1, 1], [2], [3, 3], [4]])\n *\n * @category combinators\n * @since 2.5.0\n */\n\nvar chop = function chop(f) {\n var g = RNEA.chop(f);\n return function (as) {\n return exports.isNonEmpty(as) ? g(as) : exports.empty;\n };\n};\n\nexports.chop = chop;\n/**\n * Splits a `ReadonlyArray` into two pieces, the first piece has max `n` elements.\n *\n * @example\n * import { splitAt } from 'fp-ts/ReadonlyArray'\n *\n * assert.deepStrictEqual(splitAt(2)([1, 2, 3, 4, 5]), [[1, 2], [3, 4, 5]])\n *\n * @category combinators\n * @since 2.5.0\n */\n\nvar splitAt = function splitAt(n) {\n return function (as) {\n return n >= 1 && exports.isNonEmpty(as) ? RNEA.splitAt(n)(as) : exports.isEmpty(as) ? [as, exports.empty] : [exports.empty, as];\n };\n};\n\nexports.splitAt = splitAt;\n/**\n * Splits a `ReadonlyArray` into length-`n` pieces. The last piece will be shorter if `n` does not evenly divide the length of\n * the `ReadonlyArray`. Note that `chunksOf(n)([])` is `[]`, not `[[]]`. This is intentional, and is consistent with a recursive\n * definition of `chunksOf`; it satisfies the property that:\n *\n * ```ts\n * chunksOf(n)(xs).concat(chunksOf(n)(ys)) == chunksOf(n)(xs.concat(ys)))\n * ```\n *\n * whenever `n` evenly divides the length of `as`.\n *\n * @example\n * import { chunksOf } from 'fp-ts/ReadonlyArray'\n *\n * assert.deepStrictEqual(chunksOf(2)([1, 2, 3, 4, 5]), [[1, 2], [3, 4], [5]])\n *\n * @category combinators\n * @since 2.5.0\n */\n\nvar chunksOf = function chunksOf(n) {\n var f = RNEA.chunksOf(n);\n return function (as) {\n return exports.isNonEmpty(as) ? f(as) : exports.empty;\n };\n};\n\nexports.chunksOf = chunksOf;\n\nfunction comprehension(input, f, g) {\n if (g === void 0) {\n g = function g() {\n return true;\n };\n }\n\n var go = function go(scope, input) {\n return exports.isNonEmpty(input) ? function_1.pipe(RNEA.head(input), exports.chain(function (x) {\n return go(function_1.pipe(scope, exports.append(x)), RNEA.tail(input));\n })) : g.apply(void 0, scope) ? [f.apply(void 0, scope)] : exports.empty;\n };\n\n return go(exports.empty, input);\n}\n\nexports.comprehension = comprehension;\n\nfunction union(E) {\n var unionE = RNEA.union(E);\n return function (first, second) {\n if (second === undefined) {\n var unionE_1 = union(E);\n return function (ys) {\n return unionE_1(ys, first);\n };\n }\n\n return exports.isNonEmpty(first) && exports.isNonEmpty(second) ? unionE(first, second) : exports.isNonEmpty(first) ? first : second;\n };\n}\n\nexports.union = union;\n\nfunction intersection(E) {\n var elemE = elem(E);\n return function (xs, ys) {\n if (ys === undefined) {\n var intersectionE_1 = intersection(E);\n return function (ys) {\n return intersectionE_1(ys, xs);\n };\n }\n\n return xs.filter(function (a) {\n return elemE(a, ys);\n });\n };\n}\n\nexports.intersection = intersection;\n\nfunction difference(E) {\n var elemE = elem(E);\n return function (xs, ys) {\n if (ys === undefined) {\n var differenceE_1 = difference(E);\n return function (ys) {\n return differenceE_1(ys, xs);\n };\n }\n\n return xs.filter(function (a) {\n return !elemE(a, ys);\n });\n };\n}\n\nexports.difference = difference; // -------------------------------------------------------------------------------------\n// non-pipeables\n// -------------------------------------------------------------------------------------\n\nvar _map = function _map(fa, f) {\n return function_1.pipe(fa, exports.map(f));\n};\n\nvar _mapWithIndex = function _mapWithIndex(fa, f) {\n return function_1.pipe(fa, exports.mapWithIndex(f));\n};\n\nvar _ap = function _ap(fab, fa) {\n return function_1.pipe(fab, exports.ap(fa));\n};\n\nvar _chain = function _chain(ma, f) {\n return function_1.pipe(ma, exports.chain(f));\n};\n\nvar _filter = function _filter(fa, predicate) {\n return function_1.pipe(fa, exports.filter(predicate));\n};\n\nvar _filterMap = function _filterMap(fa, f) {\n return function_1.pipe(fa, exports.filterMap(f));\n};\n\nvar _partition = function _partition(fa, predicate) {\n return function_1.pipe(fa, exports.partition(predicate));\n};\n\nvar _partitionMap = function _partitionMap(fa, f) {\n return function_1.pipe(fa, exports.partitionMap(f));\n};\n\nvar _partitionWithIndex = function _partitionWithIndex(fa, predicateWithIndex) {\n return function_1.pipe(fa, exports.partitionWithIndex(predicateWithIndex));\n};\n\nvar _partitionMapWithIndex = function _partitionMapWithIndex(fa, f) {\n return function_1.pipe(fa, exports.partitionMapWithIndex(f));\n};\n\nvar _alt = function _alt(fa, that) {\n return function_1.pipe(fa, exports.alt(that));\n};\n\nvar _reduce = function _reduce(fa, b, f) {\n return function_1.pipe(fa, exports.reduce(b, f));\n};\n\nvar _foldMap = function _foldMap(M) {\n var foldMapM = exports.foldMap(M);\n return function (fa, f) {\n return function_1.pipe(fa, foldMapM(f));\n };\n};\n\nvar _reduceRight = function _reduceRight(fa, b, f) {\n return function_1.pipe(fa, exports.reduceRight(b, f));\n};\n\nvar _reduceWithIndex = function _reduceWithIndex(fa, b, f) {\n return function_1.pipe(fa, exports.reduceWithIndex(b, f));\n};\n\nvar _foldMapWithIndex = function _foldMapWithIndex(M) {\n var foldMapWithIndexM = exports.foldMapWithIndex(M);\n return function (fa, f) {\n return function_1.pipe(fa, foldMapWithIndexM(f));\n };\n};\n\nvar _reduceRightWithIndex = function _reduceRightWithIndex(fa, b, f) {\n return function_1.pipe(fa, exports.reduceRightWithIndex(b, f));\n};\n\nvar _filterMapWithIndex = function _filterMapWithIndex(fa, f) {\n return function_1.pipe(fa, exports.filterMapWithIndex(f));\n};\n\nvar _filterWithIndex = function _filterWithIndex(fa, predicateWithIndex) {\n return function_1.pipe(fa, exports.filterWithIndex(predicateWithIndex));\n};\n\nvar _extend = function _extend(fa, f) {\n return function_1.pipe(fa, exports.extend(f));\n};\n\nvar _traverse = function _traverse(F) {\n var traverseF = exports.traverse(F);\n return function (ta, f) {\n return function_1.pipe(ta, traverseF(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _traverseWithIndex = function _traverseWithIndex(F) {\n var traverseWithIndexF = exports.traverseWithIndex(F);\n return function (ta, f) {\n return function_1.pipe(ta, traverseWithIndexF(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _wither = function _wither(F) {\n var witherF = exports.wither(F);\n return function (fa, f) {\n return function_1.pipe(fa, witherF(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _wilt = function _wilt(F) {\n var wiltF = exports.wilt(F);\n return function (fa, f) {\n return function_1.pipe(fa, wiltF(f));\n };\n}; // -------------------------------------------------------------------------------------\n// type class members\n// -------------------------------------------------------------------------------------\n\n/**\n * @category Pointed\n * @since 2.5.0\n */\n\n\nexports.of = RNEA.of;\n/**\n * @category Alternative\n * @since 2.7.0\n */\n\nvar zero = function zero() {\n return exports.empty;\n};\n\nexports.zero = zero;\n/**\n * Less strict version of [`alt`](#alt).\n *\n * @category Alt\n * @since 2.9.0\n */\n\nvar altW = function altW(that) {\n return function (fa) {\n return fa.concat(that());\n };\n};\n\nexports.altW = altW;\n/**\n * Identifies an associative operation on a type constructor. It is similar to `Semigroup`, except that it applies to\n * types of kind `* -> *`.\n *\n * @category Alt\n * @since 2.5.0\n */\n\nexports.alt = exports.altW;\n/**\n * Apply a function to an argument under a type constructor.\n *\n * @category Apply\n * @since 2.5.0\n */\n\nvar ap = function ap(fa) {\n return exports.chain(function (f) {\n return function_1.pipe(fa, exports.map(f));\n });\n};\n\nexports.ap = ap;\n/**\n * Composes computations in sequence, using the return value of one computation to determine the next computation.\n *\n * @category Monad\n * @since 2.5.0\n */\n\nvar chain = function chain(f) {\n return function (ma) {\n return function_1.pipe(ma, exports.chainWithIndex(function (_, a) {\n return f(a);\n }));\n };\n};\n\nexports.chain = chain;\n/**\n * Derivable from `Chain`.\n *\n * @category combinators\n * @since 2.5.0\n */\n\nexports.flatten = /*#__PURE__*/exports.chain(function_1.identity);\n/**\n * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F) => F` whose argument and return types\n * use the type constructor `F` to represent some computational context.\n *\n * @category Functor\n * @since 2.5.0\n */\n\nvar map = function map(f) {\n return function (fa) {\n return fa.map(function (a) {\n return f(a);\n });\n };\n};\n\nexports.map = map;\n/**\n * @category FunctorWithIndex\n * @since 2.5.0\n */\n\nvar mapWithIndex = function mapWithIndex(f) {\n return function (fa) {\n return fa.map(function (a, i) {\n return f(i, a);\n });\n };\n};\n\nexports.mapWithIndex = mapWithIndex;\n/**\n * @category Compactable\n * @since 2.5.0\n */\n\nvar separate = function separate(fa) {\n var left = [];\n var right = [];\n\n for (var _i = 0, fa_1 = fa; _i < fa_1.length; _i++) {\n var e = fa_1[_i];\n\n if (e._tag === 'Left') {\n left.push(e.left);\n } else {\n right.push(e.right);\n }\n }\n\n return Separated_1.separated(left, right);\n};\n\nexports.separate = separate;\n/**\n * @category Filterable\n * @since 2.5.0\n */\n\nvar filter = function filter(predicate) {\n return function (fa) {\n return fa.filter(predicate);\n };\n};\n\nexports.filter = filter;\n/**\n * @category FilterableWithIndex\n * @since 2.5.0\n */\n\nvar filterMapWithIndex = function filterMapWithIndex(f) {\n return function (fa) {\n var out = [];\n\n for (var i = 0; i < fa.length; i++) {\n var optionB = f(i, fa[i]);\n\n if (O.isSome(optionB)) {\n out.push(optionB.value);\n }\n }\n\n return out;\n };\n};\n\nexports.filterMapWithIndex = filterMapWithIndex;\n/**\n * @category Filterable\n * @since 2.5.0\n */\n\nvar filterMap = function filterMap(f) {\n return exports.filterMapWithIndex(function (_, a) {\n return f(a);\n });\n};\n\nexports.filterMap = filterMap;\n/**\n * @category Compactable\n * @since 2.5.0\n */\n\nexports.compact = /*#__PURE__*/exports.filterMap(function_1.identity);\n/**\n * @category Filterable\n * @since 2.5.0\n */\n\nvar partition = function partition(predicate) {\n return exports.partitionWithIndex(function (_, a) {\n return predicate(a);\n });\n};\n\nexports.partition = partition;\n/**\n * @category FilterableWithIndex\n * @since 2.5.0\n */\n\nvar partitionWithIndex = function partitionWithIndex(predicateWithIndex) {\n return function (fa) {\n var left = [];\n var right = [];\n\n for (var i = 0; i < fa.length; i++) {\n var a = fa[i];\n\n if (predicateWithIndex(i, a)) {\n right.push(a);\n } else {\n left.push(a);\n }\n }\n\n return Separated_1.separated(left, right);\n };\n};\n\nexports.partitionWithIndex = partitionWithIndex;\n/**\n * @category Filterable\n * @since 2.5.0\n */\n\nvar partitionMap = function partitionMap(f) {\n return exports.partitionMapWithIndex(function (_, a) {\n return f(a);\n });\n};\n\nexports.partitionMap = partitionMap;\n/**\n * @category FilterableWithIndex\n * @since 2.5.0\n */\n\nvar partitionMapWithIndex = function partitionMapWithIndex(f) {\n return function (fa) {\n var left = [];\n var right = [];\n\n for (var i = 0; i < fa.length; i++) {\n var e = f(i, fa[i]);\n\n if (e._tag === 'Left') {\n left.push(e.left);\n } else {\n right.push(e.right);\n }\n }\n\n return Separated_1.separated(left, right);\n };\n};\n\nexports.partitionMapWithIndex = partitionMapWithIndex;\n/**\n * @category FilterableWithIndex\n * @since 2.5.0\n */\n\nvar filterWithIndex = function filterWithIndex(predicateWithIndex) {\n return function (fa) {\n return fa.filter(function (a, i) {\n return predicateWithIndex(i, a);\n });\n };\n};\n\nexports.filterWithIndex = filterWithIndex;\n/**\n * @category Extend\n * @since 2.5.0\n */\n\nvar extend = function extend(f) {\n return function (wa) {\n return wa.map(function (_, i) {\n return f(wa.slice(i));\n });\n };\n};\n\nexports.extend = extend;\n/**\n * Derivable from `Extend`.\n *\n * @category combinators\n * @since 2.5.0\n */\n\nexports.duplicate = /*#__PURE__*/exports.extend(function_1.identity);\n/**\n * @category FoldableWithIndex\n * @since 2.5.0\n */\n\nvar foldMapWithIndex = function foldMapWithIndex(M) {\n return function (f) {\n return function (fa) {\n return fa.reduce(function (b, a, i) {\n return M.concat(b, f(i, a));\n }, M.empty);\n };\n };\n};\n\nexports.foldMapWithIndex = foldMapWithIndex;\n/**\n * @category Foldable\n * @since 2.5.0\n */\n\nvar reduce = function reduce(b, f) {\n return exports.reduceWithIndex(b, function (_, b, a) {\n return f(b, a);\n });\n};\n\nexports.reduce = reduce;\n/**\n * @category Foldable\n * @since 2.5.0\n */\n\nvar foldMap = function foldMap(M) {\n var foldMapWithIndexM = exports.foldMapWithIndex(M);\n return function (f) {\n return foldMapWithIndexM(function (_, a) {\n return f(a);\n });\n };\n};\n\nexports.foldMap = foldMap;\n/**\n * @category FoldableWithIndex\n * @since 2.5.0\n */\n\nvar reduceWithIndex = function reduceWithIndex(b, f) {\n return function (fa) {\n var len = fa.length;\n var out = b;\n\n for (var i = 0; i < len; i++) {\n out = f(i, out, fa[i]);\n }\n\n return out;\n };\n};\n\nexports.reduceWithIndex = reduceWithIndex;\n/**\n * @category Foldable\n * @since 2.5.0\n */\n\nvar reduceRight = function reduceRight(b, f) {\n return exports.reduceRightWithIndex(b, function (_, a, b) {\n return f(a, b);\n });\n};\n\nexports.reduceRight = reduceRight;\n/**\n * @category FoldableWithIndex\n * @since 2.5.0\n */\n\nvar reduceRightWithIndex = function reduceRightWithIndex(b, f) {\n return function (fa) {\n return fa.reduceRight(function (b, a, i) {\n return f(i, a, b);\n }, b);\n };\n};\n\nexports.reduceRightWithIndex = reduceRightWithIndex;\n/**\n * @category Traversable\n * @since 2.6.3\n */\n\nvar traverse = function traverse(F) {\n var traverseWithIndexF = exports.traverseWithIndex(F);\n return function (f) {\n return traverseWithIndexF(function (_, a) {\n return f(a);\n });\n };\n};\n\nexports.traverse = traverse;\n/**\n * @category Traversable\n * @since 2.6.3\n */\n\nvar sequence = function sequence(F) {\n return function (ta) {\n return _reduce(ta, F.of(exports.zero()), function (fas, fa) {\n return F.ap(F.map(fas, function (as) {\n return function (a) {\n return function_1.pipe(as, exports.append(a));\n };\n }), fa);\n });\n };\n};\n\nexports.sequence = sequence;\n/**\n * @category TraversableWithIndex\n * @since 2.6.3\n */\n\nvar traverseWithIndex = function traverseWithIndex(F) {\n return function (f) {\n return exports.reduceWithIndex(F.of(exports.zero()), function (i, fbs, a) {\n return F.ap(F.map(fbs, function (bs) {\n return function (b) {\n return function_1.pipe(bs, exports.append(b));\n };\n }), f(i, a));\n });\n };\n};\n\nexports.traverseWithIndex = traverseWithIndex;\n/**\n * @category Witherable\n * @since 2.6.5\n */\n\nvar wither = function wither(F) {\n var traverseF = exports.traverse(F);\n return function (f) {\n return function (fa) {\n return F.map(function_1.pipe(fa, traverseF(f)), exports.compact);\n };\n };\n};\n\nexports.wither = wither;\n/**\n * @category Witherable\n * @since 2.6.5\n */\n\nvar wilt = function wilt(F) {\n var traverseF = exports.traverse(F);\n return function (f) {\n return function (fa) {\n return F.map(function_1.pipe(fa, traverseF(f)), exports.separate);\n };\n };\n};\n\nexports.wilt = wilt;\n/**\n * @category Unfoldable\n * @since 2.6.6\n */\n\nvar unfold = function unfold(b, f) {\n var out = [];\n var bb = b;\n\n while (true) {\n var mt = f(bb);\n\n if (O.isSome(mt)) {\n var _a = mt.value,\n a = _a[0],\n b_1 = _a[1];\n out.push(a);\n bb = b_1;\n } else {\n break;\n }\n }\n\n return out;\n};\n\nexports.unfold = unfold; // -------------------------------------------------------------------------------------\n// instances\n// -------------------------------------------------------------------------------------\n\n/**\n * @category instances\n * @since 2.5.0\n */\n\nexports.URI = 'ReadonlyArray';\n/**\n * @category instances\n * @since 2.5.0\n */\n\nvar getShow = function getShow(S) {\n return {\n show: function show(as) {\n return \"[\" + as.map(S.show).join(', ') + \"]\";\n }\n };\n};\n\nexports.getShow = getShow;\n/**\n * @category instances\n * @since 2.5.0\n */\n\nvar getSemigroup = function getSemigroup() {\n return {\n concat: function concat(first, second) {\n return exports.isEmpty(first) ? second : exports.isEmpty(second) ? first : first.concat(second);\n }\n };\n};\n\nexports.getSemigroup = getSemigroup;\n/**\n * Returns a `Monoid` for `ReadonlyArray`.\n *\n * @example\n * import { getMonoid } from 'fp-ts/ReadonlyArray'\n *\n * const M = getMonoid()\n * assert.deepStrictEqual(M.concat([1, 2], [3, 4]), [1, 2, 3, 4])\n *\n * @category instances\n * @since 2.5.0\n */\n\nvar getMonoid = function getMonoid() {\n return {\n concat: exports.getSemigroup().concat,\n empty: exports.empty\n };\n};\n\nexports.getMonoid = getMonoid;\n/**\n * Derives an `Eq` over the `ReadonlyArray` of a given element type from the `Eq` of that type. The derived `Eq` defines two\n * arrays as equal if all elements of both arrays are compared equal pairwise with the given `E`. In case of arrays of\n * different lengths, the result is non equality.\n *\n * @example\n * import * as S from 'fp-ts/string'\n * import { getEq } from 'fp-ts/ReadonlyArray'\n *\n * const E = getEq(S.Eq)\n * assert.strictEqual(E.equals(['a', 'b'], ['a', 'b']), true)\n * assert.strictEqual(E.equals(['a'], []), false)\n *\n * @category instances\n * @since 2.5.0\n */\n\nvar getEq = function getEq(E) {\n return Eq_1.fromEquals(function (xs, ys) {\n return xs.length === ys.length && xs.every(function (x, i) {\n return E.equals(x, ys[i]);\n });\n });\n};\n\nexports.getEq = getEq;\n/**\n * Derives an `Ord` over the `ReadonlyArray` of a given element type from the `Ord` of that type. The ordering between two such\n * arrays is equal to: the first non equal comparison of each arrays elements taken pairwise in increasing order, in\n * case of equality over all the pairwise elements; the longest array is considered the greatest, if both arrays have\n * the same length, the result is equality.\n *\n * @example\n * import { getOrd } from 'fp-ts/ReadonlyArray'\n * import * as S from 'fp-ts/string'\n *\n * const O = getOrd(S.Ord)\n * assert.strictEqual(O.compare(['b'], ['a']), 1)\n * assert.strictEqual(O.compare(['a'], ['a']), 0)\n * assert.strictEqual(O.compare(['a'], ['b']), -1)\n *\n *\n * @category instances\n * @since 2.5.0\n */\n\nvar getOrd = function getOrd(O) {\n return Ord_1.fromCompare(function (a, b) {\n var aLen = a.length;\n var bLen = b.length;\n var len = Math.min(aLen, bLen);\n\n for (var i = 0; i < len; i++) {\n var ordering = O.compare(a[i], b[i]);\n\n if (ordering !== 0) {\n return ordering;\n }\n }\n\n return N.Ord.compare(aLen, bLen);\n });\n};\n\nexports.getOrd = getOrd;\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Functor = {\n URI: exports.URI,\n map: _map\n};\n/**\n * Derivable from `Functor`.\n *\n * @category combinators\n * @since 2.10.0\n */\n\nexports.flap =\n/*#_PURE_*/\nFunctor_1.flap(exports.Functor);\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Pointed = {\n URI: exports.URI,\n of: exports.of\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.FunctorWithIndex = {\n URI: exports.URI,\n map: _map,\n mapWithIndex: _mapWithIndex\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Apply = {\n URI: exports.URI,\n map: _map,\n ap: _ap\n};\n/**\n * Combine two effectful actions, keeping only the result of the first.\n *\n * Derivable from `Apply`.\n *\n * @category combinators\n * @since 2.5.0\n */\n\nexports.apFirst = /*#__PURE__*/Apply_1.apFirst(exports.Apply);\n/**\n * Combine two effectful actions, keeping only the result of the second.\n *\n * Derivable from `Apply`.\n *\n * @category combinators\n * @since 2.5.0\n */\n\nexports.apSecond = /*#__PURE__*/Apply_1.apSecond(exports.Apply);\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Applicative = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n of: exports.of\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Chain = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n chain: _chain\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Monad = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n of: exports.of,\n chain: _chain\n};\n/**\n * Composes computations in sequence, using the return value of one computation to determine the next computation and\n * keeping only the result of the first.\n *\n * Derivable from `Chain`.\n *\n * @category combinators\n * @since 2.5.0\n */\n\nexports.chainFirst = /*#__PURE__*/Chain_1.chainFirst(exports.Chain);\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Unfoldable = {\n URI: exports.URI,\n unfold: exports.unfold\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Alt = {\n URI: exports.URI,\n map: _map,\n alt: _alt\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Alternative = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n of: exports.of,\n alt: _alt,\n zero: exports.zero\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Extend = {\n URI: exports.URI,\n map: _map,\n extend: _extend\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Compactable = {\n URI: exports.URI,\n compact: exports.compact,\n separate: exports.separate\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Filterable = {\n URI: exports.URI,\n map: _map,\n compact: exports.compact,\n separate: exports.separate,\n filter: _filter,\n filterMap: _filterMap,\n partition: _partition,\n partitionMap: _partitionMap\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.FilterableWithIndex = {\n URI: exports.URI,\n map: _map,\n mapWithIndex: _mapWithIndex,\n compact: exports.compact,\n separate: exports.separate,\n filter: _filter,\n filterMap: _filterMap,\n partition: _partition,\n partitionMap: _partitionMap,\n partitionMapWithIndex: _partitionMapWithIndex,\n partitionWithIndex: _partitionWithIndex,\n filterMapWithIndex: _filterMapWithIndex,\n filterWithIndex: _filterWithIndex\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Foldable = {\n URI: exports.URI,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.FoldableWithIndex = {\n URI: exports.URI,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n reduceWithIndex: _reduceWithIndex,\n foldMapWithIndex: _foldMapWithIndex,\n reduceRightWithIndex: _reduceRightWithIndex\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Traversable = {\n URI: exports.URI,\n map: _map,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: exports.sequence\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.TraversableWithIndex = {\n URI: exports.URI,\n map: _map,\n mapWithIndex: _mapWithIndex,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n reduceWithIndex: _reduceWithIndex,\n foldMapWithIndex: _foldMapWithIndex,\n reduceRightWithIndex: _reduceRightWithIndex,\n traverse: _traverse,\n sequence: exports.sequence,\n traverseWithIndex: _traverseWithIndex\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Witherable = {\n URI: exports.URI,\n map: _map,\n compact: exports.compact,\n separate: exports.separate,\n filter: _filter,\n filterMap: _filterMap,\n partition: _partition,\n partitionMap: _partitionMap,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: exports.sequence,\n wither: _wither,\n wilt: _wilt\n}; // -------------------------------------------------------------------------------------\n// unsafe\n// -------------------------------------------------------------------------------------\n\n/**\n * @category unsafe\n * @since 2.5.0\n */\n\nexports.unsafeInsertAt = RNEA.unsafeInsertAt;\n/**\n * @category unsafe\n * @since 2.5.0\n */\n\nvar unsafeUpdateAt = function unsafeUpdateAt(i, a, as) {\n return exports.isNonEmpty(as) ? RNEA.unsafeUpdateAt(i, a, as) : as;\n};\n\nexports.unsafeUpdateAt = unsafeUpdateAt;\n/**\n * @category unsafe\n * @since 2.5.0\n */\n\nvar unsafeDeleteAt = function unsafeDeleteAt(i, as) {\n var xs = as.slice();\n xs.splice(i, 1);\n return xs;\n};\n\nexports.unsafeDeleteAt = unsafeDeleteAt; // -------------------------------------------------------------------------------------\n// interop\n// -------------------------------------------------------------------------------------\n\n/**\n * @category interop\n * @since 2.5.0\n */\n\nvar toArray = function toArray(as) {\n return as.slice();\n};\n\nexports.toArray = toArray;\n/**\n * @category interop\n * @since 2.5.0\n */\n\nvar fromArray = function fromArray(as) {\n return exports.isEmpty(as) ? exports.empty : as.slice();\n};\n\nexports.fromArray = fromArray; // -------------------------------------------------------------------------------------\n// utils\n// -------------------------------------------------------------------------------------\n\n/**\n * An empty array\n *\n * @since 2.5.0\n */\n\nexports.empty = RNEA.empty;\n/**\n * Check if a predicate holds true for every array member.\n *\n * @example\n * import { every } from 'fp-ts/ReadonlyArray'\n * import { pipe } from 'fp-ts/function'\n *\n * const isPositive = (n: number): boolean => n > 0\n *\n * assert.deepStrictEqual(pipe([1, 2, 3], every(isPositive)), true)\n * assert.deepStrictEqual(pipe([1, 2, -3], every(isPositive)), false)\n *\n * @since 2.9.0\n */\n\nvar every = function every(predicate) {\n return function (as) {\n return as.every(predicate);\n };\n};\n\nexports.every = every;\n/**\n * Check if a predicate holds true for any array member.\n *\n * @example\n * import { some } from 'fp-ts/ReadonlyArray'\n * import { pipe } from 'fp-ts/function'\n *\n * const isPositive = (n: number): boolean => n > 0\n *\n * assert.deepStrictEqual(pipe([-1, -2, 3], some(isPositive)), true)\n * assert.deepStrictEqual(pipe([-1, -2, -3], some(isPositive)), false)\n *\n * @since 2.9.0\n */\n\nvar some = function some(predicate) {\n return function (as) {\n return as.some(predicate);\n };\n};\n\nexports.some = some; // -------------------------------------------------------------------------------------\n// do notation\n// -------------------------------------------------------------------------------------\n\n/**\n * @since 2.9.0\n */\n\nexports.Do = /*#__PURE__*/exports.of({});\n/**\n * @since 2.8.0\n */\n\nexports.bindTo = /*#__PURE__*/Functor_1.bindTo(exports.Functor);\n/**\n * @since 2.8.0\n */\n\nexports.bind = /*#__PURE__*/Chain_1.bind(exports.Chain); // -------------------------------------------------------------------------------------\n// pipeable sequence S\n// -------------------------------------------------------------------------------------\n\n/**\n * @since 2.8.0\n */\n\nexports.apS = /*#__PURE__*/Apply_1.apS(exports.Apply); // -------------------------------------------------------------------------------------\n// deprecated\n// -------------------------------------------------------------------------------------\n\n/**\n * Use [`prepend`](#prepend) instead.\n *\n * @category constructors\n * @since 2.5.0\n * @deprecated\n */\n// tslint:disable-next-line: deprecation\n\nexports.cons = RNEA.cons;\n/**\n * Use [`append`](#append) instead.\n *\n * @category constructors\n * @since 2.5.0\n * @deprecated\n */\n// tslint:disable-next-line: deprecation\n\nexports.snoc = RNEA.snoc;\n/**\n * Use [`prependAll`](#prependall) instead.\n *\n * @category combinators\n * @since 2.9.0\n * @deprecated\n */\n\nexports.prependToAll = exports.prependAll;\n/**\n * Use small, specific instances instead.\n *\n * @category instances\n * @since 2.5.0\n * @deprecated\n */\n\nexports.readonlyArray = {\n URI: exports.URI,\n compact: exports.compact,\n separate: exports.separate,\n map: _map,\n ap: _ap,\n of: exports.of,\n chain: _chain,\n filter: _filter,\n filterMap: _filterMap,\n partition: _partition,\n partitionMap: _partitionMap,\n mapWithIndex: _mapWithIndex,\n partitionMapWithIndex: _partitionMapWithIndex,\n partitionWithIndex: _partitionWithIndex,\n filterMapWithIndex: _filterMapWithIndex,\n filterWithIndex: _filterWithIndex,\n alt: _alt,\n zero: exports.zero,\n unfold: exports.unfold,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: exports.sequence,\n reduceWithIndex: _reduceWithIndex,\n foldMapWithIndex: _foldMapWithIndex,\n reduceRightWithIndex: _reduceRightWithIndex,\n traverseWithIndex: _traverseWithIndex,\n extend: _extend,\n wither: _wither,\n wilt: _wilt\n};","\"use strict\";\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nvar __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n});\n\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n }\n\n __setModuleDefault(result, mod);\n\n return result;\n};\n\nvar __spreadArray = this && this.__spreadArray || function (to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) {\n to[j] = from[i];\n }\n\n return to;\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.traverse = exports.reduceRightWithIndex = exports.foldMapWithIndex = exports.reduceWithIndex = exports.reduceRight = exports.foldMap = exports.reduce = exports.mapWithIndex = exports.map = exports.flatten = exports.duplicate = exports.extend = exports.chain = exports.ap = exports.alt = exports.altW = exports.of = exports.chunksOf = exports.splitAt = exports.chop = exports.chainWithIndex = exports.intersperse = exports.prependAll = exports.unzip = exports.zip = exports.zipWith = exports.modifyAt = exports.updateAt = exports.sort = exports.groupBy = exports.groupSort = exports.group = exports.reverse = exports.concat = exports.fromArray = exports.unappend = exports.unprepend = exports.fromReadonlyArray = exports.makeBy = exports.rotate = exports.union = exports.sortBy = exports.uniq = exports.unsafeUpdateAt = exports.unsafeInsertAt = exports.append = exports.prepend = exports.isOutOfBound = exports.isNonEmpty = exports.empty = void 0;\nexports.readonlyNonEmptyArray = exports.fold = exports.prependToAll = exports.insertAt = exports.snoc = exports.cons = exports.unsnoc = exports.uncons = exports.filterWithIndex = exports.filter = exports.concatAll = exports.max = exports.min = exports.init = exports.last = exports.tail = exports.head = exports.apS = exports.bind = exports.bindTo = exports.Do = exports.Comonad = exports.Alt = exports.TraversableWithIndex = exports.Traversable = exports.FoldableWithIndex = exports.Foldable = exports.Monad = exports.chainFirst = exports.Chain = exports.Applicative = exports.apSecond = exports.apFirst = exports.Apply = exports.FunctorWithIndex = exports.Pointed = exports.flap = exports.Functor = exports.getEq = exports.getSemigroup = exports.getShow = exports.URI = exports.extract = exports.traverseWithIndex = exports.sequence = void 0;\n\nvar Apply_1 = require(\"./Apply\");\n\nvar Chain_1 = require(\"./Chain\");\n\nvar Eq_1 = require(\"./Eq\");\n\nvar function_1 = require(\"./function\");\n\nvar Functor_1 = require(\"./Functor\");\n\nvar _ = __importStar(require(\"./internal\"));\n\nvar O = __importStar(require(\"./Option\"));\n\nvar Ord_1 = require(\"./Ord\");\n\nvar Se = __importStar(require(\"./Semigroup\")); // -------------------------------------------------------------------------------------\n// internal\n// -------------------------------------------------------------------------------------\n\n/**\n * @internal\n */\n\n\nexports.empty = [];\n/**\n * @internal\n */\n\nvar isNonEmpty = function isNonEmpty(as) {\n return as.length > 0;\n};\n\nexports.isNonEmpty = isNonEmpty;\n/**\n * @internal\n */\n\nvar isOutOfBound = function isOutOfBound(i, as) {\n return i < 0 || i >= as.length;\n};\n\nexports.isOutOfBound = isOutOfBound;\n/**\n * @internal\n */\n\nvar prepend = function prepend(head) {\n return function (tail) {\n return __spreadArray([head], tail);\n };\n};\n\nexports.prepend = prepend;\n/**\n * @internal\n */\n\nvar append = function append(end) {\n return function (init) {\n return concat(init, [end]);\n };\n};\n\nexports.append = append;\n/**\n * @internal\n */\n\nvar unsafeInsertAt = function unsafeInsertAt(i, a, as) {\n if (exports.isNonEmpty(as)) {\n var xs = _.fromReadonlyNonEmptyArray(as);\n\n xs.splice(i, 0, a);\n return xs;\n }\n\n return [a];\n};\n\nexports.unsafeInsertAt = unsafeInsertAt;\n/**\n * @internal\n */\n\nvar unsafeUpdateAt = function unsafeUpdateAt(i, a, as) {\n if (as[i] === a) {\n return as;\n } else {\n var xs = _.fromReadonlyNonEmptyArray(as);\n\n xs[i] = a;\n return xs;\n }\n};\n\nexports.unsafeUpdateAt = unsafeUpdateAt;\n/**\n * @internal\n */\n\nvar uniq = function uniq(E) {\n return function (as) {\n if (as.length === 1) {\n return as;\n }\n\n var out = [exports.head(as)];\n var rest = exports.tail(as);\n\n var _loop_1 = function _loop_1(a) {\n if (out.every(function (o) {\n return !E.equals(o, a);\n })) {\n out.push(a);\n }\n };\n\n for (var _i = 0, rest_1 = rest; _i < rest_1.length; _i++) {\n var a = rest_1[_i];\n\n _loop_1(a);\n }\n\n return out;\n };\n};\n\nexports.uniq = uniq;\n/**\n * @internal\n */\n\nvar sortBy = function sortBy(ords) {\n if (exports.isNonEmpty(ords)) {\n var M = Ord_1.getMonoid();\n return exports.sort(ords.reduce(M.concat, M.empty));\n }\n\n return function_1.identity;\n};\n\nexports.sortBy = sortBy;\n/**\n * @internal\n */\n\nvar union = function union(E) {\n var uniqE = exports.uniq(E);\n return function (first, second) {\n return uniqE(concat(first, second));\n };\n};\n\nexports.union = union;\n/**\n * @internal\n */\n\nvar rotate = function rotate(n) {\n return function (as) {\n var len = as.length;\n var m = Math.round(n) % len;\n\n if (exports.isOutOfBound(Math.abs(m), as) || m === 0) {\n return as;\n }\n\n if (m < 0) {\n var _a = exports.splitAt(-m)(as),\n f = _a[0],\n s = _a[1];\n\n return concat(s, f);\n } else {\n return exports.rotate(m - len)(as);\n }\n };\n};\n\nexports.rotate = rotate;\n/**\n * @internal\n */\n\nvar makeBy = function makeBy(n, f) {\n var j = Math.max(0, Math.floor(n));\n var out = [f(0)];\n\n for (var i = 1; i < j; i++) {\n out.push(f(i));\n }\n\n return out;\n};\n\nexports.makeBy = makeBy; // -------------------------------------------------------------------------------------\n// constructors\n// -------------------------------------------------------------------------------------\n\n/**\n * Return a `ReadonlyNonEmptyArray` from a `ReadonlyArray` returning `none` if the input is empty.\n *\n * @category constructors\n * @since 2.5.0\n */\n\nvar fromReadonlyArray = function fromReadonlyArray(as) {\n return exports.isNonEmpty(as) ? O.some(as) : O.none;\n};\n\nexports.fromReadonlyArray = fromReadonlyArray; // -------------------------------------------------------------------------------------\n// destructors\n// -------------------------------------------------------------------------------------\n\n/**\n * Return the tuple of the `head` and the `tail`.\n *\n * @example\n * import { unprepend } from 'fp-ts/ReadonlyNonEmptyArray'\n *\n * assert.deepStrictEqual(unprepend([1, 2, 3, 4]), [1, [2, 3, 4]])\n *\n * @category destructors\n * @since 2.9.0\n */\n\nvar unprepend = function unprepend(as) {\n return [exports.head(as), exports.tail(as)];\n};\n\nexports.unprepend = unprepend;\n/**\n * Return the tuple of the `init` and the `last`.\n *\n * @example\n * import { unappend } from 'fp-ts/ReadonlyNonEmptyArray'\n *\n * assert.deepStrictEqual(unappend([1, 2, 3, 4]), [[1, 2, 3], 4])\n *\n * @category destructors\n * @since 2.9.0\n */\n\nvar unappend = function unappend(as) {\n return [exports.init(as), exports.last(as)];\n};\n\nexports.unappend = unappend; // -------------------------------------------------------------------------------------\n// interop\n// -------------------------------------------------------------------------------------\n\n/**\n * @category interop\n * @since 2.5.0\n */\n\nvar fromArray = function fromArray(as) {\n return exports.fromReadonlyArray(as.slice());\n};\n\nexports.fromArray = fromArray;\n\nfunction concat(first, second) {\n return first.concat(second);\n}\n\nexports.concat = concat;\n/**\n * @category combinators\n * @since 2.5.0\n */\n\nvar reverse = function reverse(as) {\n return as.length === 1 ? as : __spreadArray([exports.last(as)], as.slice(0, -1).reverse());\n};\n\nexports.reverse = reverse;\n\nfunction group(E) {\n return function (as) {\n var len = as.length;\n\n if (len === 0) {\n return exports.empty;\n }\n\n var out = [];\n var head = as[0];\n var nea = [head];\n\n for (var i = 1; i < len; i++) {\n var a = as[i];\n\n if (E.equals(a, head)) {\n nea.push(a);\n } else {\n out.push(nea);\n head = a;\n nea = [head];\n }\n }\n\n out.push(nea);\n return out;\n };\n}\n\nexports.group = group;\n\nfunction groupSort(O) {\n var sortO = exports.sort(O);\n var groupO = group(O);\n return function (as) {\n return exports.isNonEmpty(as) ? groupO(sortO(as)) : exports.empty;\n };\n}\n\nexports.groupSort = groupSort;\n/**\n * Splits an array into sub-non-empty-arrays stored in an object, based on the result of calling a `string`-returning\n * function on each element, and grouping the results according to values returned\n *\n * @example\n * import { groupBy } from 'fp-ts/ReadonlyNonEmptyArray'\n *\n * assert.deepStrictEqual(groupBy((s: string) => String(s.length))(['a', 'b', 'ab']), {\n * '1': ['a', 'b'],\n * '2': ['ab']\n * })\n *\n * @category combinators\n * @since 2.5.0\n */\n\nvar groupBy = function groupBy(f) {\n return function (as) {\n var out = {};\n\n for (var _i = 0, as_1 = as; _i < as_1.length; _i++) {\n var a = as_1[_i];\n var k = f(a);\n\n if (out.hasOwnProperty(k)) {\n out[k].push(a);\n } else {\n out[k] = [a];\n }\n }\n\n return out;\n };\n};\n\nexports.groupBy = groupBy;\n/**\n * @category combinators\n * @since 2.5.0\n */\n\nvar sort = function sort(O) {\n return function (as) {\n return as.length === 1 ? as : as.slice().sort(O.compare);\n };\n};\n\nexports.sort = sort;\n/**\n * @category combinators\n * @since 2.5.0\n */\n\nvar updateAt = function updateAt(i, a) {\n return exports.modifyAt(i, function () {\n return a;\n });\n};\n\nexports.updateAt = updateAt;\n/**\n * @category combinators\n * @since 2.5.0\n */\n\nvar modifyAt = function modifyAt(i, f) {\n return function (as) {\n return exports.isOutOfBound(i, as) ? O.none : O.some(exports.unsafeUpdateAt(i, f(as[i]), as));\n };\n};\n\nexports.modifyAt = modifyAt;\n/**\n * @category combinators\n * @since 2.5.1\n */\n\nvar zipWith = function zipWith(as, bs, f) {\n var cs = [f(as[0], bs[0])];\n var len = Math.min(as.length, bs.length);\n\n for (var i = 1; i < len; i++) {\n cs[i] = f(as[i], bs[i]);\n }\n\n return cs;\n};\n\nexports.zipWith = zipWith;\n\nfunction zip(as, bs) {\n if (bs === undefined) {\n return function (bs) {\n return zip(bs, as);\n };\n }\n\n return exports.zipWith(as, bs, function (a, b) {\n return [a, b];\n });\n}\n\nexports.zip = zip;\n/**\n * @category combinators\n * @since 2.5.1\n */\n\nvar unzip = function unzip(abs) {\n var fa = [abs[0][0]];\n var fb = [abs[0][1]];\n\n for (var i = 1; i < abs.length; i++) {\n fa[i] = abs[i][0];\n fb[i] = abs[i][1];\n }\n\n return [fa, fb];\n};\n\nexports.unzip = unzip;\n/**\n * Prepend an element to every member of a `ReadonlyNonEmptyArray`.\n *\n * @example\n * import { prependAll } from 'fp-ts/ReadonlyNonEmptyArray'\n *\n * assert.deepStrictEqual(prependAll(9)([1, 2, 3, 4]), [9, 1, 9, 2, 9, 3, 9, 4])\n *\n * @category combinators\n * @since 2.10.0\n */\n\nvar prependAll = function prependAll(middle) {\n return function (as) {\n var out = [middle, as[0]];\n\n for (var i = 1; i < as.length; i++) {\n out.push(middle, as[i]);\n }\n\n return out;\n };\n};\n\nexports.prependAll = prependAll;\n/**\n * Places an element in between members of a `ReadonlyNonEmptyArray`.\n *\n * @example\n * import { intersperse } from 'fp-ts/ReadonlyNonEmptyArray'\n *\n * assert.deepStrictEqual(intersperse(9)([1, 2, 3, 4]), [1, 9, 2, 9, 3, 9, 4])\n *\n * @category combinators\n * @since 2.9.0\n */\n\nvar intersperse = function intersperse(middle) {\n return function (as) {\n var rest = exports.tail(as);\n return exports.isNonEmpty(rest) ? function_1.pipe(rest, exports.prependAll(middle), exports.prepend(exports.head(as))) : as;\n };\n};\n\nexports.intersperse = intersperse;\n/**\n * @category combinators\n * @since 2.10.0\n */\n\nvar chainWithIndex = function chainWithIndex(f) {\n return function (as) {\n var out = _.fromReadonlyNonEmptyArray(f(0, exports.head(as)));\n\n for (var i = 1; i < as.length; i++) {\n out.push.apply(out, f(i, as[i]));\n }\n\n return out;\n };\n};\n\nexports.chainWithIndex = chainWithIndex;\n/**\n * A useful recursion pattern for processing a `ReadonlyNonEmptyArray` to produce a new `ReadonlyNonEmptyArray`, often used for \"chopping\" up the input\n * `ReadonlyNonEmptyArray`. Typically `chop` is called with some function that will consume an initial prefix of the `ReadonlyNonEmptyArray` and produce a\n * value and the tail of the `ReadonlyNonEmptyArray`.\n *\n * @category combinators\n * @since 2.10.0\n */\n\nvar chop = function chop(f) {\n return function (as) {\n var _a = f(as),\n b = _a[0],\n rest = _a[1];\n\n var out = [b];\n var next = rest;\n\n while (exports.isNonEmpty(next)) {\n var _b = f(next),\n b_1 = _b[0],\n rest_2 = _b[1];\n\n out.push(b_1);\n next = rest_2;\n }\n\n return out;\n };\n};\n\nexports.chop = chop;\n/**\n * Splits a `ReadonlyNonEmptyArray` into two pieces, the first piece has max `n` elements.\n *\n * @category combinators\n * @since 2.10.0\n */\n\nvar splitAt = function splitAt(n) {\n return function (as) {\n var m = Math.max(1, n);\n return m >= as.length ? [as, exports.empty] : [function_1.pipe(as.slice(1, m), exports.prepend(exports.head(as))), as.slice(m)];\n };\n};\n\nexports.splitAt = splitAt;\n/**\n * Splits a `ReadonlyNonEmptyArray` into length-`n` pieces. The last piece will be shorter if `n` does not evenly divide the length of\n * the `ReadonlyNonEmptyArray`.\n *\n * @category combinators\n * @since 2.10.0\n */\n\nvar chunksOf = function chunksOf(n) {\n return exports.chop(exports.splitAt(n));\n};\n\nexports.chunksOf = chunksOf; // -------------------------------------------------------------------------------------\n// non-pipeables\n// -------------------------------------------------------------------------------------\n\nvar _map = function _map(fa, f) {\n return function_1.pipe(fa, exports.map(f));\n};\n/* istanbul ignore next */\n\n\nvar _mapWithIndex = function _mapWithIndex(fa, f) {\n return function_1.pipe(fa, exports.mapWithIndex(f));\n};\n\nvar _ap = function _ap(fab, fa) {\n return function_1.pipe(fab, exports.ap(fa));\n};\n\nvar _chain = function _chain(ma, f) {\n return function_1.pipe(ma, exports.chain(f));\n};\n/* istanbul ignore next */\n\n\nvar _extend = function _extend(wa, f) {\n return function_1.pipe(wa, exports.extend(f));\n};\n/* istanbul ignore next */\n\n\nvar _reduce = function _reduce(fa, b, f) {\n return function_1.pipe(fa, exports.reduce(b, f));\n};\n/* istanbul ignore next */\n\n\nvar _foldMap = function _foldMap(M) {\n var foldMapM = exports.foldMap(M);\n return function (fa, f) {\n return function_1.pipe(fa, foldMapM(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _reduceRight = function _reduceRight(fa, b, f) {\n return function_1.pipe(fa, exports.reduceRight(b, f));\n};\n/* istanbul ignore next */\n\n\nvar _traverse = function _traverse(F) {\n var traverseF = exports.traverse(F);\n return function (ta, f) {\n return function_1.pipe(ta, traverseF(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _alt = function _alt(fa, that) {\n return function_1.pipe(fa, exports.alt(that));\n};\n/* istanbul ignore next */\n\n\nvar _reduceWithIndex = function _reduceWithIndex(fa, b, f) {\n return function_1.pipe(fa, exports.reduceWithIndex(b, f));\n};\n/* istanbul ignore next */\n\n\nvar _foldMapWithIndex = function _foldMapWithIndex(M) {\n var foldMapWithIndexM = exports.foldMapWithIndex(M);\n return function (fa, f) {\n return function_1.pipe(fa, foldMapWithIndexM(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _reduceRightWithIndex = function _reduceRightWithIndex(fa, b, f) {\n return function_1.pipe(fa, exports.reduceRightWithIndex(b, f));\n};\n/* istanbul ignore next */\n\n\nvar _traverseWithIndex = function _traverseWithIndex(F) {\n var traverseWithIndexF = exports.traverseWithIndex(F);\n return function (ta, f) {\n return function_1.pipe(ta, traverseWithIndexF(f));\n };\n}; // -------------------------------------------------------------------------------------\n// type class members\n// -------------------------------------------------------------------------------------\n\n/**\n * @category Pointed\n * @since 2.5.0\n */\n\n\nvar of = function of(a) {\n return [a];\n};\n\nexports.of = of;\n/**\n * Less strict version of [`alt`](#alt).\n *\n * @category Alt\n * @since 2.9.0\n */\n\nvar altW = function altW(that) {\n return function (as) {\n return concat(as, that());\n };\n};\n\nexports.altW = altW;\n/**\n * Identifies an associative operation on a type constructor. It is similar to `Semigroup`, except that it applies to\n * types of kind `* -> *`.\n *\n * @category Alt\n * @since 2.6.2\n */\n\nexports.alt = exports.altW;\n/**\n * @category Apply\n * @since 2.5.0\n */\n\nvar ap = function ap(as) {\n return exports.chain(function (f) {\n return function_1.pipe(as, exports.map(f));\n });\n};\n\nexports.ap = ap;\n/**\n * Composes computations in sequence, using the return value of one computation to determine the next computation.\n *\n * @category Monad\n * @since 2.5.0\n */\n\nvar chain = function chain(f) {\n return exports.chainWithIndex(function (_, a) {\n return f(a);\n });\n};\n\nexports.chain = chain;\n/**\n * @category Extend\n * @since 2.5.0\n */\n\nvar extend = function extend(f) {\n return function (as) {\n var next = exports.tail(as);\n var out = [f(as)];\n\n while (exports.isNonEmpty(next)) {\n out.push(f(next));\n next = exports.tail(next);\n }\n\n return out;\n };\n};\n\nexports.extend = extend;\n/**\n * Derivable from `Extend`.\n *\n * @category combinators\n * @since 2.5.0\n */\n\nexports.duplicate = /*#__PURE__*/exports.extend(function_1.identity);\n/**\n * Derivable from `Chain`.\n *\n * @category combinators\n * @since 2.5.0\n */\n\nexports.flatten = /*#__PURE__*/exports.chain(function_1.identity);\n/**\n * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F) => F` whose argument and return types\n * use the type constructor `F` to represent some computational context.\n *\n * @category Functor\n * @since 2.5.0\n */\n\nvar map = function map(f) {\n return exports.mapWithIndex(function (_, a) {\n return f(a);\n });\n};\n\nexports.map = map;\n/**\n * @category FunctorWithIndex\n * @since 2.5.0\n */\n\nvar mapWithIndex = function mapWithIndex(f) {\n return function (as) {\n var out = [f(0, exports.head(as))];\n\n for (var i = 1; i < as.length; i++) {\n out.push(f(i, as[i]));\n }\n\n return out;\n };\n};\n\nexports.mapWithIndex = mapWithIndex;\n/**\n * @category Foldable\n * @since 2.5.0\n */\n\nvar reduce = function reduce(b, f) {\n return exports.reduceWithIndex(b, function (_, b, a) {\n return f(b, a);\n });\n};\n\nexports.reduce = reduce;\n/**\n * **Note**. The constraint is relaxed: a `Semigroup` instead of a `Monoid`.\n *\n * @category Foldable\n * @since 2.5.0\n */\n\nvar foldMap = function foldMap(S) {\n return function (f) {\n return function (as) {\n return as.slice(1).reduce(function (s, a) {\n return S.concat(s, f(a));\n }, f(as[0]));\n };\n };\n};\n\nexports.foldMap = foldMap;\n/**\n * @category Foldable\n * @since 2.5.0\n */\n\nvar reduceRight = function reduceRight(b, f) {\n return exports.reduceRightWithIndex(b, function (_, b, a) {\n return f(b, a);\n });\n};\n\nexports.reduceRight = reduceRight;\n/**\n * @category FoldableWithIndex\n * @since 2.5.0\n */\n\nvar reduceWithIndex = function reduceWithIndex(b, f) {\n return function (as) {\n return as.reduce(function (b, a, i) {\n return f(i, b, a);\n }, b);\n };\n};\n\nexports.reduceWithIndex = reduceWithIndex;\n/**\n * **Note**. The constraint is relaxed: a `Semigroup` instead of a `Monoid`.\n *\n * @category FoldableWithIndex\n * @since 2.5.0\n */\n\nvar foldMapWithIndex = function foldMapWithIndex(S) {\n return function (f) {\n return function (as) {\n return as.slice(1).reduce(function (s, a, i) {\n return S.concat(s, f(i + 1, a));\n }, f(0, as[0]));\n };\n };\n};\n\nexports.foldMapWithIndex = foldMapWithIndex;\n/**\n * @category FoldableWithIndex\n * @since 2.5.0\n */\n\nvar reduceRightWithIndex = function reduceRightWithIndex(b, f) {\n return function (as) {\n return as.reduceRight(function (b, a, i) {\n return f(i, a, b);\n }, b);\n };\n};\n\nexports.reduceRightWithIndex = reduceRightWithIndex;\n/**\n * @category Traversable\n * @since 2.6.3\n */\n\nvar traverse = function traverse(F) {\n var traverseWithIndexF = exports.traverseWithIndex(F);\n return function (f) {\n return traverseWithIndexF(function (_, a) {\n return f(a);\n });\n };\n};\n\nexports.traverse = traverse;\n/**\n * @category Traversable\n * @since 2.6.3\n */\n\nvar sequence = function sequence(F) {\n return exports.traverseWithIndex(F)(function (_, a) {\n return a;\n });\n};\n\nexports.sequence = sequence;\n/**\n * @category TraversableWithIndex\n * @since 2.6.3\n */\n\nvar traverseWithIndex = function traverseWithIndex(F) {\n return function (f) {\n return function (as) {\n var out = F.map(f(0, exports.head(as)), exports.of);\n\n for (var i = 1; i < as.length; i++) {\n out = F.ap(F.map(out, function (bs) {\n return function (b) {\n return function_1.pipe(bs, exports.append(b));\n };\n }), f(i, as[i]));\n }\n\n return out;\n };\n };\n};\n\nexports.traverseWithIndex = traverseWithIndex;\n/**\n * @category Comonad\n * @since 2.6.3\n */\n\nvar extract = function extract(as) {\n return as[0];\n};\n\nexports.extract = extract; // -------------------------------------------------------------------------------------\n// instances\n// -------------------------------------------------------------------------------------\n\n/**\n * @category instances\n * @since 2.5.0\n */\n\nexports.URI = 'ReadonlyNonEmptyArray';\n/**\n * @category instances\n * @since 2.5.0\n */\n\nvar getShow = function getShow(S) {\n return {\n show: function show(as) {\n return \"[\" + as.map(S.show).join(', ') + \"]\";\n }\n };\n};\n\nexports.getShow = getShow;\n/**\n * Builds a `Semigroup` instance for `ReadonlyNonEmptyArray`\n *\n * @category instances\n * @since 2.5.0\n */\n\nvar getSemigroup = function getSemigroup() {\n return {\n concat: concat\n };\n};\n\nexports.getSemigroup = getSemigroup;\n/**\n * @example\n * import { getEq } from 'fp-ts/ReadonlyNonEmptyArray'\n * import * as N from 'fp-ts/number'\n *\n * const E = getEq(N.Eq)\n * assert.strictEqual(E.equals([1, 2], [1, 2]), true)\n * assert.strictEqual(E.equals([1, 2], [1, 3]), false)\n *\n * @category instances\n * @since 2.5.0\n */\n\nvar getEq = function getEq(E) {\n return Eq_1.fromEquals(function (xs, ys) {\n return xs.length === ys.length && xs.every(function (x, i) {\n return E.equals(x, ys[i]);\n });\n });\n};\n\nexports.getEq = getEq;\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Functor = {\n URI: exports.URI,\n map: _map\n};\n/**\n * Derivable from `Functor`.\n *\n * @category combinators\n * @since 2.10.0\n */\n\nexports.flap =\n/*#_PURE_*/\nFunctor_1.flap(exports.Functor);\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Pointed = {\n URI: exports.URI,\n of: exports.of\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.FunctorWithIndex = {\n URI: exports.URI,\n map: _map,\n mapWithIndex: _mapWithIndex\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Apply = {\n URI: exports.URI,\n map: _map,\n ap: _ap\n};\n/**\n * Combine two effectful actions, keeping only the result of the first.\n *\n * Derivable from `Apply`.\n *\n * @category combinators\n * @since 2.5.0\n */\n\nexports.apFirst = /*#__PURE__*/Apply_1.apFirst(exports.Apply);\n/**\n * Combine two effectful actions, keeping only the result of the second.\n *\n * Derivable from `Apply`.\n *\n * @category combinators\n * @since 2.5.0\n */\n\nexports.apSecond = /*#__PURE__*/Apply_1.apSecond(exports.Apply);\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Applicative = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n of: exports.of\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Chain = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n chain: _chain\n};\n/**\n * Composes computations in sequence, using the return value of one computation to determine the next computation and\n * keeping only the result of the first.\n *\n * Derivable from `Chain`.\n *\n * @category combinators\n * @since 2.5.0\n */\n\nexports.chainFirst = /*#__PURE__*/Chain_1.chainFirst(exports.Chain);\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Monad = {\n URI: exports.URI,\n map: _map,\n ap: _ap,\n of: exports.of,\n chain: _chain\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Foldable = {\n URI: exports.URI,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.FoldableWithIndex = {\n URI: exports.URI,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n reduceWithIndex: _reduceWithIndex,\n foldMapWithIndex: _foldMapWithIndex,\n reduceRightWithIndex: _reduceRightWithIndex\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Traversable = {\n URI: exports.URI,\n map: _map,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: exports.sequence\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.TraversableWithIndex = {\n URI: exports.URI,\n map: _map,\n mapWithIndex: _mapWithIndex,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: exports.sequence,\n reduceWithIndex: _reduceWithIndex,\n foldMapWithIndex: _foldMapWithIndex,\n reduceRightWithIndex: _reduceRightWithIndex,\n traverseWithIndex: _traverseWithIndex\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Alt = {\n URI: exports.URI,\n map: _map,\n alt: _alt\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Comonad = {\n URI: exports.URI,\n map: _map,\n extend: _extend,\n extract: exports.extract\n}; // -------------------------------------------------------------------------------------\n// do notation\n// -------------------------------------------------------------------------------------\n\n/**\n * @since 2.9.0\n */\n\nexports.Do = /*#__PURE__*/exports.of({});\n/**\n * @since 2.8.0\n */\n\nexports.bindTo = /*#__PURE__*/Functor_1.bindTo(exports.Functor);\n/**\n * @since 2.8.0\n */\n\nexports.bind = /*#__PURE__*/Chain_1.bind(exports.Chain); // -------------------------------------------------------------------------------------\n// pipeable sequence S\n// -------------------------------------------------------------------------------------\n\n/**\n * @since 2.8.0\n */\n\nexports.apS = /*#__PURE__*/Apply_1.apS(exports.Apply); // -------------------------------------------------------------------------------------\n// utils\n// -------------------------------------------------------------------------------------\n\n/**\n * @since 2.5.0\n */\n\nexports.head = exports.extract;\n/**\n * @since 2.5.0\n */\n\nvar tail = function tail(as) {\n return as.slice(1);\n};\n\nexports.tail = tail;\n/**\n * @since 2.5.0\n */\n\nvar last = function last(as) {\n return as[as.length - 1];\n};\n\nexports.last = last;\n/**\n * Get all but the last element of a non empty array, creating a new array.\n *\n * @example\n * import { init } from 'fp-ts/ReadonlyNonEmptyArray'\n *\n * assert.deepStrictEqual(init([1, 2, 3]), [1, 2])\n * assert.deepStrictEqual(init([1]), [])\n *\n * @since 2.5.0\n */\n\nvar init = function init(as) {\n return as.slice(0, -1);\n};\n\nexports.init = init;\n/**\n * @since 2.5.0\n */\n\nvar min = function min(O) {\n var S = Se.min(O);\n return function (as) {\n return as.reduce(S.concat);\n };\n};\n\nexports.min = min;\n/**\n * @since 2.5.0\n */\n\nvar max = function max(O) {\n var S = Se.max(O);\n return function (as) {\n return as.reduce(S.concat);\n };\n};\n\nexports.max = max;\n/**\n * @since 2.10.0\n */\n\nvar concatAll = function concatAll(S) {\n return function (as) {\n return as.reduce(S.concat);\n };\n};\n\nexports.concatAll = concatAll;\n\nfunction filter(predicate) {\n // tslint:disable-next-line: deprecation\n return exports.filterWithIndex(function (_, a) {\n return predicate(a);\n });\n}\n\nexports.filter = filter;\n/**\n * Use [`filterWithIndex`](./ReadonlyArray.ts.html#filterWithIndex) instead.\n *\n * @category combinators\n * @since 2.5.0\n * @deprecated\n */\n\nvar filterWithIndex = function filterWithIndex(predicate) {\n return function (as) {\n return exports.fromReadonlyArray(as.filter(function (a, i) {\n return predicate(i, a);\n }));\n };\n};\n\nexports.filterWithIndex = filterWithIndex;\n/**\n * Use [`unprepend`](#unprepend) instead.\n *\n * @category destructors\n * @since 2.10.0\n * @deprecated\n */\n\nexports.uncons = exports.unprepend;\n/**\n * Use [`unappend`](#unappend) instead.\n *\n * @category destructors\n * @since 2.10.0\n * @deprecated\n */\n\nexports.unsnoc = exports.unappend;\n\nfunction cons(head, tail) {\n return tail === undefined ? exports.prepend(head) : function_1.pipe(tail, exports.prepend(head));\n}\n\nexports.cons = cons;\n/**\n * Use [`append`](./ReadonlyArray.ts.html#append) instead.\n *\n * @category constructors\n * @since 2.5.0\n * @deprecated\n */\n\nvar snoc = function snoc(init, end) {\n return concat(init, [end]);\n};\n\nexports.snoc = snoc;\n/**\n * Use [`insertAt`](./ReadonlyArray.ts.html#insertAt) instead.\n *\n * @category combinators\n * @since 2.5.0\n * @deprecated\n */\n\nvar insertAt = function insertAt(i, a) {\n return function (as) {\n return i < 0 || i > as.length ? O.none : O.some(exports.unsafeInsertAt(i, a, as));\n };\n};\n\nexports.insertAt = insertAt;\n/**\n * Use [`prependAll`](#prependall) instead.\n *\n * @category combinators\n * @since 2.9.0\n * @deprecated\n */\n\nexports.prependToAll = exports.prependAll;\n/**\n * Use [`concatAll`](#concatall) instead.\n *\n * @since 2.5.0\n * @deprecated\n */\n\nexports.fold = exports.concatAll;\n/**\n * Use small, specific instances instead.\n *\n * @category instances\n * @since 2.5.0\n * @deprecated\n */\n\nexports.readonlyNonEmptyArray = {\n URI: exports.URI,\n of: exports.of,\n map: _map,\n mapWithIndex: _mapWithIndex,\n ap: _ap,\n chain: _chain,\n extend: _extend,\n extract: exports.extract,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: exports.sequence,\n reduceWithIndex: _reduceWithIndex,\n foldMapWithIndex: _foldMapWithIndex,\n reduceRightWithIndex: _reduceRightWithIndex,\n traverseWithIndex: _traverseWithIndex,\n alt: _alt\n};","\"use strict\";\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nvar __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n});\n\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n }\n\n __setModuleDefault(result, mod);\n\n return result;\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getMonoid = exports.getEq = exports.getShow = exports.URI = exports.separate = exports.compact = exports.reduceRight = exports.foldMap = exports.reduce = exports.partitionMap = exports.partition = exports.filterMap = exports.filter = exports.elem = exports.some = exports.every = exports.fromFoldableMap = exports.fromFoldable = exports.filterWithIndex = exports.filterMapWithIndex = exports.partitionWithIndex = exports.partitionMapWithIndex = exports.wilt = exports.wither = exports.sequence = exports.traverse = exports.traverseWithIndex = exports.singleton = exports.reduceRightWithIndex = exports.foldMapWithIndex = exports.reduceWithIndex = exports.map = exports.mapWithIndex = exports.empty = exports.lookup = exports.isSubrecord = exports.pop = exports.modifyAt = exports.updateAt = exports.deleteAt = exports.has = exports.upsertAt = exports.toUnfoldable = exports.toReadonlyArray = exports.collect = exports.keys = exports.isEmpty = exports.size = exports.toRecord = exports.fromRecord = void 0;\nexports.readonlyRecord = exports.hasOwnProperty = exports.insertAt = exports.Witherable = exports.TraversableWithIndex = exports.Traversable = exports.FilterableWithIndex = exports.Filterable = exports.Compactable = exports.FoldableWithIndex = exports.Foldable = exports.FunctorWithIndex = exports.flap = exports.Functor = void 0;\n\nvar Eq_1 = require(\"./Eq\");\n\nvar function_1 = require(\"./function\");\n\nvar Functor_1 = require(\"./Functor\");\n\nvar _ = __importStar(require(\"./internal\"));\n\nvar O = __importStar(require(\"./Option\"));\n\nvar Separated_1 = require(\"./Separated\"); // -------------------------------------------------------------------------------------\n// interop\n// -------------------------------------------------------------------------------------\n\n/**\n * @category interop\n * @since 2.5.0\n */\n\n\nfunction fromRecord(r) {\n return Object.assign({}, r);\n}\n\nexports.fromRecord = fromRecord;\n/**\n * @category interop\n * @since 2.5.0\n */\n\nfunction toRecord(r) {\n return Object.assign({}, r);\n}\n\nexports.toRecord = toRecord;\n/**\n * Calculate the number of key/value pairs in a `ReadonlyRecord`,\n *\n * @since 2.5.0\n */\n\nvar size = function size(r) {\n return Object.keys(r).length;\n};\n\nexports.size = size;\n/**\n * Test whether a `ReadonlyRecord` is empty.\n *\n * @since 2.5.0\n */\n\nvar isEmpty = function isEmpty(r) {\n for (var k in r) {\n if (_.has.call(r, k)) {\n return false;\n }\n }\n\n return true;\n};\n\nexports.isEmpty = isEmpty;\n/**\n * @since 2.5.0\n */\n\nvar keys = function keys(r) {\n return Object.keys(r).sort();\n};\n\nexports.keys = keys;\n/**\n * Map a `ReadonlyRecord` into an `ReadonlyArray`.\n *\n * @example\n * import { collect } from 'fp-ts/ReadonlyRecord'\n *\n * const x: { readonly a: string, readonly b: boolean } = { a: 'c', b: false }\n * assert.deepStrictEqual(\n * collect((key, val) => ({ key: key, value: val }))(x),\n * [{ key: 'a', value: 'c' }, { key: 'b', value: false }]\n * )\n *\n * @since 2.5.0\n */\n\nvar collect = function collect(f) {\n return function (r) {\n var out = [];\n\n for (var _i = 0, _a = exports.keys(r); _i < _a.length; _i++) {\n var key = _a[_i];\n out.push(f(key, r[key]));\n }\n\n return out;\n };\n};\n\nexports.collect = collect;\n/**\n * Get a sorted `ReadonlyArray` of the key/value pairs contained in a `ReadonlyRecord`.\n *\n * @since 2.5.0\n */\n\nexports.toReadonlyArray = /*#__PURE__*/exports.collect(function (k, a) {\n return [k, a];\n});\n\nfunction toUnfoldable(U) {\n return function (r) {\n var sas = exports.toReadonlyArray(r);\n var len = sas.length;\n return U.unfold(0, function (b) {\n return b < len ? O.some([sas[b], b + 1]) : O.none;\n });\n };\n}\n\nexports.toUnfoldable = toUnfoldable;\n/**\n * Insert or replace a key/value pair in a `ReadonlyRecord`.\n *\n * @category combinators\n * @since 2.10.0\n */\n\nvar upsertAt = function upsertAt(k, a) {\n return function (r) {\n if (_.has.call(r, k) && r[k] === a) {\n return r;\n }\n\n var out = Object.assign({}, r);\n out[k] = a;\n return out;\n };\n};\n\nexports.upsertAt = upsertAt;\n/**\n * Test whether or not a key exists in a `ReadonlyRecord`.\n *\n * Note. This function is not pipeable because is a custom type guard.\n *\n * @since 2.10.0\n */\n\nvar has = function has(k, r) {\n return _.has.call(r, k);\n};\n\nexports.has = has;\n\nfunction deleteAt(k) {\n return function (r) {\n if (!_.has.call(r, k)) {\n return r;\n }\n\n var out = Object.assign({}, r);\n delete out[k];\n return out;\n };\n}\n\nexports.deleteAt = deleteAt;\n/**\n * @since 2.5.0\n */\n\nvar updateAt = function updateAt(k, a) {\n return function (r) {\n if (!exports.has(k, r)) {\n return O.none;\n }\n\n if (r[k] === a) {\n return O.some(r);\n }\n\n var out = Object.assign({}, r);\n out[k] = a;\n return O.some(out);\n };\n};\n\nexports.updateAt = updateAt;\n/**\n * @since 2.5.0\n */\n\nvar modifyAt = function modifyAt(k, f) {\n return function (r) {\n if (!exports.has(k, r)) {\n return O.none;\n }\n\n var next = f(r[k]);\n\n if (next === r[k]) {\n return O.some(r);\n }\n\n var out = Object.assign({}, r);\n out[k] = next;\n return O.some(out);\n };\n};\n\nexports.modifyAt = modifyAt;\n\nfunction pop(k) {\n var deleteAtk = deleteAt(k);\n return function (r) {\n var oa = lookup(k, r);\n return O.isNone(oa) ? O.none : O.some([oa.value, deleteAtk(r)]);\n };\n}\n\nexports.pop = pop;\n\nfunction isSubrecord(E) {\n return function (me, that) {\n if (that === undefined) {\n var isSubrecordE_1 = isSubrecord(E);\n return function (that) {\n return isSubrecordE_1(that, me);\n };\n }\n\n for (var k in me) {\n if (!_.has.call(that, k) || !E.equals(me[k], that[k])) {\n return false;\n }\n }\n\n return true;\n };\n}\n\nexports.isSubrecord = isSubrecord;\n\nfunction lookup(k, r) {\n if (r === undefined) {\n return function (r) {\n return lookup(k, r);\n };\n }\n\n return _.has.call(r, k) ? O.some(r[k]) : O.none;\n}\n\nexports.lookup = lookup;\n/**\n * @since 2.5.0\n */\n\nexports.empty = {};\n\nfunction mapWithIndex(f) {\n return function (r) {\n var out = {};\n\n for (var k in r) {\n if (_.has.call(r, k)) {\n out[k] = f(k, r[k]);\n }\n }\n\n return out;\n };\n}\n\nexports.mapWithIndex = mapWithIndex;\n\nfunction map(f) {\n return mapWithIndex(function (_, a) {\n return f(a);\n });\n}\n\nexports.map = map;\n\nfunction reduceWithIndex(b, f) {\n return function (fa) {\n var out = b;\n var ks = exports.keys(fa);\n var len = ks.length;\n\n for (var i = 0; i < len; i++) {\n var k = ks[i];\n out = f(k, out, fa[k]);\n }\n\n return out;\n };\n}\n\nexports.reduceWithIndex = reduceWithIndex;\n\nfunction foldMapWithIndex(M) {\n return function (f) {\n return function (fa) {\n var out = M.empty;\n var ks = exports.keys(fa);\n var len = ks.length;\n\n for (var i = 0; i < len; i++) {\n var k = ks[i];\n out = M.concat(out, f(k, fa[k]));\n }\n\n return out;\n };\n };\n}\n\nexports.foldMapWithIndex = foldMapWithIndex;\n\nfunction reduceRightWithIndex(b, f) {\n return function (fa) {\n var out = b;\n var ks = exports.keys(fa);\n var len = ks.length;\n\n for (var i = len - 1; i >= 0; i--) {\n var k = ks[i];\n out = f(k, fa[k], out);\n }\n\n return out;\n };\n}\n\nexports.reduceRightWithIndex = reduceRightWithIndex;\n/**\n * Create a `ReadonlyRecord` with one key/value pair.\n *\n * @category constructors\n * @since 2.5.0\n */\n\nvar singleton = function singleton(k, a) {\n var _a;\n\n return _a = {}, _a[k] = a, _a;\n};\n\nexports.singleton = singleton;\n\nfunction traverseWithIndex(F) {\n return function (f) {\n return function (ta) {\n var ks = exports.keys(ta);\n\n if (ks.length === 0) {\n return F.of(exports.empty);\n }\n\n var fr = F.of({});\n\n var _loop_1 = function _loop_1(key) {\n fr = F.ap(F.map(fr, function (r) {\n return function (b) {\n r[key] = b;\n return r;\n };\n }), f(key, ta[key]));\n };\n\n for (var _i = 0, ks_1 = ks; _i < ks_1.length; _i++) {\n var key = ks_1[_i];\n\n _loop_1(key);\n }\n\n return fr;\n };\n };\n}\n\nexports.traverseWithIndex = traverseWithIndex;\n\nfunction traverse(F) {\n var traverseWithIndexF = traverseWithIndex(F);\n return function (f) {\n return traverseWithIndexF(function (_, a) {\n return f(a);\n });\n };\n}\n\nexports.traverse = traverse;\n\nfunction sequence(F) {\n return traverseWithIndex(F)(function (_, a) {\n return a;\n });\n}\n\nexports.sequence = sequence;\n/**\n * @category Witherable\n * @since 2.6.5\n */\n\nvar wither = function wither(F) {\n var traverseF = traverse(F);\n return function (f) {\n return function (fa) {\n return F.map(function_1.pipe(fa, traverseF(f)), exports.compact);\n };\n };\n};\n\nexports.wither = wither;\n/**\n * @category Witherable\n * @since 2.6.5\n */\n\nvar wilt = function wilt(F) {\n var traverseF = traverse(F);\n return function (f) {\n return function (fa) {\n return F.map(function_1.pipe(fa, traverseF(f)), exports.separate);\n };\n };\n};\n\nexports.wilt = wilt;\n\nfunction partitionMapWithIndex(f) {\n return function (r) {\n var left = {};\n var right = {};\n\n for (var k in r) {\n if (_.has.call(r, k)) {\n var e = f(k, r[k]);\n\n switch (e._tag) {\n case 'Left':\n left[k] = e.left;\n break;\n\n case 'Right':\n right[k] = e.right;\n break;\n }\n }\n }\n\n return Separated_1.separated(left, right);\n };\n}\n\nexports.partitionMapWithIndex = partitionMapWithIndex;\n\nfunction partitionWithIndex(predicateWithIndex) {\n return function (r) {\n var left = {};\n var right = {};\n\n for (var k in r) {\n if (_.has.call(r, k)) {\n var a = r[k];\n\n if (predicateWithIndex(k, a)) {\n right[k] = a;\n } else {\n left[k] = a;\n }\n }\n }\n\n return Separated_1.separated(left, right);\n };\n}\n\nexports.partitionWithIndex = partitionWithIndex;\n\nfunction filterMapWithIndex(f) {\n return function (r) {\n var out = {};\n\n for (var k in r) {\n if (_.has.call(r, k)) {\n var ob = f(k, r[k]);\n\n if (_.isSome(ob)) {\n out[k] = ob.value;\n }\n }\n }\n\n return out;\n };\n}\n\nexports.filterMapWithIndex = filterMapWithIndex;\n\nfunction filterWithIndex(predicateWithIndex) {\n return function (fa) {\n var out = {};\n var changed = false;\n\n for (var key in fa) {\n if (_.has.call(fa, key)) {\n var a = fa[key];\n\n if (predicateWithIndex(key, a)) {\n out[key] = a;\n } else {\n changed = true;\n }\n }\n }\n\n return changed ? out : fa;\n };\n}\n\nexports.filterWithIndex = filterWithIndex;\n\nfunction fromFoldable(M, F) {\n var fromFoldableMapM = fromFoldableMap(M, F);\n return function (fka) {\n return fromFoldableMapM(fka, function_1.identity);\n };\n}\n\nexports.fromFoldable = fromFoldable;\n\nfunction fromFoldableMap(M, F) {\n return function (ta, f) {\n return F.reduce(ta, {}, function (r, a) {\n var _a = f(a),\n k = _a[0],\n b = _a[1];\n\n r[k] = _.has.call(r, k) ? M.concat(r[k], b) : b;\n return r;\n });\n };\n}\n\nexports.fromFoldableMap = fromFoldableMap;\n/**\n * @since 2.5.0\n */\n\nfunction every(predicate) {\n return function (r) {\n for (var k in r) {\n if (!predicate(r[k])) {\n return false;\n }\n }\n\n return true;\n };\n}\n\nexports.every = every;\n/**\n * @since 2.5.0\n */\n\nfunction some(predicate) {\n return function (r) {\n for (var k in r) {\n if (predicate(r[k])) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nexports.some = some;\n\nfunction elem(E) {\n return function (a, fa) {\n if (fa === undefined) {\n var elemE_1 = elem(E);\n return function (fa) {\n return elemE_1(a, fa);\n };\n }\n\n for (var k in fa) {\n if (E.equals(fa[k], a)) {\n return true;\n }\n }\n\n return false;\n };\n}\n\nexports.elem = elem; // -------------------------------------------------------------------------------------\n// non-pipeables\n// -------------------------------------------------------------------------------------\n\nvar _map = function _map(fa, f) {\n return function_1.pipe(fa, map(f));\n};\n/* istanbul ignore next */\n\n\nvar _mapWithIndex = function _mapWithIndex(fa, f) {\n return function_1.pipe(fa, mapWithIndex(f));\n};\n/* istanbul ignore next */\n\n\nvar _reduce = function _reduce(fa, b, f) {\n return function_1.pipe(fa, exports.reduce(b, f));\n};\n/* istanbul ignore next */\n\n\nvar _foldMap = function _foldMap(M) {\n var foldMapM = exports.foldMap(M);\n return function (fa, f) {\n return function_1.pipe(fa, foldMapM(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _reduceRight = function _reduceRight(fa, b, f) {\n return function_1.pipe(fa, exports.reduceRight(b, f));\n};\n/* istanbul ignore next */\n\n\nvar _traverse = function _traverse(F) {\n var traverseF = traverse(F);\n return function (ta, f) {\n return function_1.pipe(ta, traverseF(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _filter = function _filter(fa, predicate) {\n return function_1.pipe(fa, exports.filter(predicate));\n};\n/* istanbul ignore next */\n\n\nvar _filterMap = function _filterMap(fa, f) {\n return function_1.pipe(fa, exports.filterMap(f));\n};\n/* istanbul ignore next */\n\n\nvar _partition = function _partition(fa, predicate) {\n return function_1.pipe(fa, exports.partition(predicate));\n};\n/* istanbul ignore next */\n\n\nvar _partitionMap = function _partitionMap(fa, f) {\n return function_1.pipe(fa, exports.partitionMap(f));\n};\n/* istanbul ignore next */\n\n\nvar _reduceWithIndex = function _reduceWithIndex(fa, b, f) {\n return function_1.pipe(fa, reduceWithIndex(b, f));\n};\n/* istanbul ignore next */\n\n\nvar _foldMapWithIndex = function _foldMapWithIndex(M) {\n var foldMapWithIndexM = foldMapWithIndex(M);\n return function (fa, f) {\n return function_1.pipe(fa, foldMapWithIndexM(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _reduceRightWithIndex = function _reduceRightWithIndex(fa, b, f) {\n return function_1.pipe(fa, reduceRightWithIndex(b, f));\n};\n/* istanbul ignore next */\n\n\nvar _partitionMapWithIndex = function _partitionMapWithIndex(fa, f) {\n return function_1.pipe(fa, partitionMapWithIndex(f));\n};\n/* istanbul ignore next */\n\n\nvar _partitionWithIndex = function _partitionWithIndex(fa, predicateWithIndex) {\n return function_1.pipe(fa, partitionWithIndex(predicateWithIndex));\n};\n/* istanbul ignore next */\n\n\nvar _filterMapWithIndex = function _filterMapWithIndex(fa, f) {\n return function_1.pipe(fa, filterMapWithIndex(f));\n};\n/* istanbul ignore next */\n\n\nvar _filterWithIndex = function _filterWithIndex(fa, predicateWithIndex) {\n return function_1.pipe(fa, filterWithIndex(predicateWithIndex));\n};\n/* istanbul ignore next */\n\n\nvar _traverseWithIndex = function _traverseWithIndex(F) {\n var traverseWithIndexF = traverseWithIndex(F);\n return function (ta, f) {\n return function_1.pipe(ta, traverseWithIndexF(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _wither = function _wither(F) {\n var witherF = exports.wither(F);\n return function (fa, f) {\n return function_1.pipe(fa, witherF(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _wilt = function _wilt(F) {\n var wiltF = exports.wilt(F);\n return function (fa, f) {\n return function_1.pipe(fa, wiltF(f));\n };\n}; // -------------------------------------------------------------------------------------\n// type class members\n// -------------------------------------------------------------------------------------\n\n/**\n * @category Filterable\n * @since 2.5.0\n */\n\n\nvar filter = function filter(predicate) {\n return filterWithIndex(function (_, a) {\n return predicate(a);\n });\n};\n\nexports.filter = filter;\n/**\n * @category Filterable\n * @since 2.5.0\n */\n\nvar filterMap = function filterMap(f) {\n return filterMapWithIndex(function (_, a) {\n return f(a);\n });\n};\n\nexports.filterMap = filterMap;\n/**\n * @category Filterable\n * @since 2.5.0\n */\n\nvar partition = function partition(predicate) {\n return partitionWithIndex(function (_, a) {\n return predicate(a);\n });\n};\n\nexports.partition = partition;\n/**\n * @category Filterable\n * @since 2.5.0\n */\n\nvar partitionMap = function partitionMap(f) {\n return partitionMapWithIndex(function (_, a) {\n return f(a);\n });\n};\n\nexports.partitionMap = partitionMap;\n/**\n * @category Foldable\n * @since 2.5.0\n */\n\nvar reduce = function reduce(b, f) {\n return reduceWithIndex(b, function (_, b, a) {\n return f(b, a);\n });\n};\n\nexports.reduce = reduce;\n/**\n * @category Foldable\n * @since 2.5.0\n */\n\nvar foldMap = function foldMap(M) {\n var foldMapWithIndexM = foldMapWithIndex(M);\n return function (f) {\n return foldMapWithIndexM(function (_, a) {\n return f(a);\n });\n };\n};\n\nexports.foldMap = foldMap;\n/**\n * @category Foldable\n * @since 2.5.0\n */\n\nvar reduceRight = function reduceRight(b, f) {\n return reduceRightWithIndex(b, function (_, a, b) {\n return f(a, b);\n });\n};\n\nexports.reduceRight = reduceRight;\n/**\n * @category Compactable\n * @since 2.5.0\n */\n\nvar compact = function compact(r) {\n var out = {};\n\n for (var k in r) {\n if (_.has.call(r, k)) {\n var oa = r[k];\n\n if (_.isSome(oa)) {\n out[k] = oa.value;\n }\n }\n }\n\n return out;\n};\n\nexports.compact = compact;\n/**\n * @category Compactable\n * @since 2.5.0\n */\n\nvar separate = function separate(r) {\n var left = {};\n var right = {};\n\n for (var k in r) {\n if (_.has.call(r, k)) {\n var e = r[k];\n\n if (_.isLeft(e)) {\n left[k] = e.left;\n } else {\n right[k] = e.right;\n }\n }\n }\n\n return Separated_1.separated(left, right);\n};\n\nexports.separate = separate; // -------------------------------------------------------------------------------------\n// instances\n// -------------------------------------------------------------------------------------\n\n/**\n * @category instances\n * @since 2.5.0\n */\n\nexports.URI = 'ReadonlyRecord';\n/**\n * @category instances\n * @since 2.5.0\n */\n\nfunction getShow(S) {\n return {\n show: function show(r) {\n var elements = exports.collect(function (k, a) {\n return JSON.stringify(k) + \": \" + S.show(a);\n })(r).join(', ');\n return elements === '' ? '{}' : \"{ \" + elements + \" }\";\n }\n };\n}\n\nexports.getShow = getShow;\n\nfunction getEq(E) {\n var isSubrecordE = isSubrecord(E);\n return Eq_1.fromEquals(function (x, y) {\n return isSubrecordE(x)(y) && isSubrecordE(y)(x);\n });\n}\n\nexports.getEq = getEq;\n\nfunction getMonoid(S) {\n return {\n concat: function concat(first, second) {\n if (exports.isEmpty(first)) {\n return second;\n }\n\n if (exports.isEmpty(second)) {\n return first;\n }\n\n var r = Object.assign({}, first);\n\n for (var k in second) {\n if (_.has.call(second, k)) {\n r[k] = _.has.call(first, k) ? S.concat(first[k], second[k]) : second[k];\n }\n }\n\n return r;\n },\n empty: exports.empty\n };\n}\n\nexports.getMonoid = getMonoid;\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Functor = {\n URI: exports.URI,\n map: _map\n};\n/**\n * Derivable from `Functor`.\n *\n * @category combinators\n * @since 2.10.0\n */\n\nexports.flap =\n/*#_PURE_*/\nFunctor_1.flap(exports.Functor);\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.FunctorWithIndex = {\n URI: exports.URI,\n map: _map,\n mapWithIndex: _mapWithIndex\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Foldable = {\n URI: exports.URI,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.FoldableWithIndex = {\n URI: exports.URI,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n reduceWithIndex: _reduceWithIndex,\n foldMapWithIndex: _foldMapWithIndex,\n reduceRightWithIndex: _reduceRightWithIndex\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Compactable = {\n URI: exports.URI,\n compact: exports.compact,\n separate: exports.separate\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Filterable = {\n URI: exports.URI,\n map: _map,\n compact: exports.compact,\n separate: exports.separate,\n filter: _filter,\n filterMap: _filterMap,\n partition: _partition,\n partitionMap: _partitionMap\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.FilterableWithIndex = {\n URI: exports.URI,\n map: _map,\n mapWithIndex: _mapWithIndex,\n compact: exports.compact,\n separate: exports.separate,\n filter: _filter,\n filterMap: _filterMap,\n partition: _partition,\n partitionMap: _partitionMap,\n filterMapWithIndex: _filterMapWithIndex,\n filterWithIndex: _filterWithIndex,\n partitionMapWithIndex: _partitionMapWithIndex,\n partitionWithIndex: _partitionWithIndex\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Traversable = {\n URI: exports.URI,\n map: _map,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: sequence\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.TraversableWithIndex = {\n URI: exports.URI,\n map: _map,\n mapWithIndex: _mapWithIndex,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n reduceWithIndex: _reduceWithIndex,\n foldMapWithIndex: _foldMapWithIndex,\n reduceRightWithIndex: _reduceRightWithIndex,\n traverse: _traverse,\n sequence: sequence,\n traverseWithIndex: _traverseWithIndex\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Witherable = {\n URI: exports.URI,\n map: _map,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: sequence,\n compact: exports.compact,\n separate: exports.separate,\n filter: _filter,\n filterMap: _filterMap,\n partition: _partition,\n partitionMap: _partitionMap,\n wither: _wither,\n wilt: _wilt\n}; // -------------------------------------------------------------------------------------\n// deprecated\n// -------------------------------------------------------------------------------------\n\n/**\n * Use [`upsertAt`](#upsertat) instead.\n *\n * @category combinators\n * @since 2.5.0\n * @deprecated\n */\n\nexports.insertAt = exports.upsertAt;\n\nfunction hasOwnProperty(k, r) {\n return _.has.call(r === undefined ? this : r, k);\n}\n\nexports.hasOwnProperty = hasOwnProperty;\n/**\n * Use small, specific instances instead.\n *\n * @category instances\n * @since 2.5.0\n * @deprecated\n */\n\nexports.readonlyRecord = {\n URI: exports.URI,\n map: _map,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: sequence,\n compact: exports.compact,\n separate: exports.separate,\n filter: _filter,\n filterMap: _filterMap,\n partition: _partition,\n partitionMap: _partitionMap,\n mapWithIndex: _mapWithIndex,\n reduceWithIndex: _reduceWithIndex,\n foldMapWithIndex: _foldMapWithIndex,\n reduceRightWithIndex: _reduceRightWithIndex,\n filterMapWithIndex: _filterMapWithIndex,\n filterWithIndex: _filterWithIndex,\n partitionMapWithIndex: _partitionMapWithIndex,\n partitionWithIndex: _partitionWithIndex,\n traverseWithIndex: _traverseWithIndex,\n wither: _wither,\n wilt: _wilt\n};","\"use strict\";\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nvar __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n});\n\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n }\n\n __setModuleDefault(result, mod);\n\n return result;\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.FunctorWithIndex = exports.flap = exports.Functor = exports.getMonoid = exports.getEq = exports.getShow = exports.URI = exports.separate = exports.compact = exports.reduceRight = exports.reduce = exports.partitionMap = exports.partition = exports.foldMap = exports.filterMap = exports.filter = exports.elem = exports.some = exports.every = exports.fromFoldableMap = exports.fromFoldable = exports.filterWithIndex = exports.filterMapWithIndex = exports.partitionWithIndex = exports.partitionMapWithIndex = exports.wilt = exports.wither = exports.sequence = exports.traverse = exports.traverseWithIndex = exports.singleton = exports.reduceRightWithIndex = exports.foldMapWithIndex = exports.reduceWithIndex = exports.map = exports.mapWithIndex = exports.lookup = exports.isSubrecord = exports.pop = exports.modifyAt = exports.updateAt = exports.deleteAt = exports.has = exports.upsertAt = exports.toUnfoldable = exports.toArray = exports.collect = exports.keys = exports.isEmpty = exports.size = void 0;\nexports.record = exports.hasOwnProperty = exports.insertAt = exports.empty = exports.Witherable = exports.TraversableWithIndex = exports.Traversable = exports.FilterableWithIndex = exports.Filterable = exports.Compactable = exports.FoldableWithIndex = exports.Foldable = void 0;\n\nvar function_1 = require(\"./function\");\n\nvar Functor_1 = require(\"./Functor\");\n\nvar O = __importStar(require(\"./Option\"));\n\nvar RR = __importStar(require(\"./ReadonlyRecord\")); // -------------------------------------------------------------------------------------\n// model\n// -------------------------------------------------------------------------------------\n\n/**\n * Calculate the number of key/value pairs in a `Record`.\n *\n * @since 2.0.0\n */\n\n\nexports.size = RR.size;\n/**\n * Test whether a `Record` is empty.\n *\n * @since 2.0.0\n */\n\nexports.isEmpty = RR.isEmpty;\n/**\n * @since 2.0.0\n */\n\nexports.keys = RR.keys;\n/**\n * Map a `Record` into an `Array`.\n *\n * @example\n * import { collect } from 'fp-ts/Record'\n *\n * const x: { readonly a: string, readonly b: boolean } = { a: 'c', b: false }\n * assert.deepStrictEqual(\n * collect((key, val) => ({ key: key, value: val }))(x),\n * [{ key: 'a', value: 'c' }, { key: 'b', value: false }]\n * )\n *\n * @since 2.0.0\n */\n\nvar collect = function collect(f) {\n return function (r) {\n var out = [];\n\n for (var _i = 0, _a = exports.keys(r); _i < _a.length; _i++) {\n var key = _a[_i];\n out.push(f(key, r[key]));\n }\n\n return out;\n };\n};\n\nexports.collect = collect;\n/**\n * Get a sorted `Array` of the key/value pairs contained in a `Record`.\n *\n * @since 2.0.0\n */\n\nexports.toArray = /*#__PURE__*/exports.collect(function (k, a) {\n return [k, a];\n});\n\nfunction toUnfoldable(U) {\n return function (r) {\n var sas = exports.toArray(r);\n var len = sas.length;\n return U.unfold(0, function (b) {\n return b < len ? O.some([sas[b], b + 1]) : O.none;\n });\n };\n}\n\nexports.toUnfoldable = toUnfoldable;\n/**\n * Insert or replace a key/value pair in a `Record`.\n *\n * @category combinators\n * @since 2.10.0\n */\n\nexports.upsertAt = RR.upsertAt;\n/**\n * Test whether or not a key exists in a `Record`.\n *\n * Note. This function is not pipeable because is a custom type guard.\n *\n * @since 2.10.0\n */\n\nexports.has = RR.has;\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction deleteAt(k) {\n return function (r) {\n if (!_hasOwnProperty.call(r, k)) {\n return r;\n }\n\n var out = Object.assign({}, r);\n delete out[k];\n return out;\n };\n}\n\nexports.deleteAt = deleteAt;\n/**\n * @since 2.0.0\n */\n\nvar updateAt = function updateAt(k, a) {\n return exports.modifyAt(k, function () {\n return a;\n });\n};\n\nexports.updateAt = updateAt;\n/**\n * @since 2.0.0\n */\n\nvar modifyAt = function modifyAt(k, f) {\n return function (r) {\n if (!exports.has(k, r)) {\n return O.none;\n }\n\n var out = Object.assign({}, r);\n out[k] = f(r[k]);\n return O.some(out);\n };\n};\n\nexports.modifyAt = modifyAt;\n\nfunction pop(k) {\n var deleteAtk = deleteAt(k);\n return function (r) {\n var oa = exports.lookup(k, r);\n return O.isNone(oa) ? O.none : O.some([oa.value, deleteAtk(r)]);\n };\n}\n\nexports.pop = pop; // TODO: remove non-curried overloading in v3\n\n/**\n * Test whether one `Record` contains all of the keys and values contained in another `Record`.\n *\n * @since 2.0.0\n */\n\nexports.isSubrecord = RR.isSubrecord; // TODO: remove non-curried overloading in v3\n\n/**\n * Lookup the value for a key in a `Record`.\n *\n * @since 2.0.0\n */\n\nexports.lookup = RR.lookup;\n/**\n * Map a `Record` passing the keys to the iterating function.\n *\n * @since 2.0.0\n */\n\nexports.mapWithIndex = RR.mapWithIndex;\n/**\n * Map a `Record` passing the values to the iterating function.\n *\n * @since 2.0.0\n */\n\nexports.map = RR.map;\n/**\n * @since 2.0.0\n */\n\nexports.reduceWithIndex = RR.reduceWithIndex;\n/**\n * @since 2.0.0\n */\n\nexports.foldMapWithIndex = RR.foldMapWithIndex;\n/**\n * @since 2.0.0\n */\n\nexports.reduceRightWithIndex = RR.reduceRightWithIndex;\n/**\n * Create a `Record` with one key/value pair.\n *\n * @since 2.0.0\n */\n\nexports.singleton = RR.singleton;\n\nfunction traverseWithIndex(F) {\n return RR.traverseWithIndex(F);\n}\n\nexports.traverseWithIndex = traverseWithIndex;\n\nfunction traverse(F) {\n return RR.traverse(F);\n}\n\nexports.traverse = traverse;\n\nfunction sequence(F) {\n return RR.sequence(F);\n}\n\nexports.sequence = sequence;\n/**\n * @category Witherable\n * @since 2.6.5\n */\n\nvar wither = function wither(F) {\n var traverseF = traverse(F);\n return function (f) {\n return function (fa) {\n return F.map(function_1.pipe(fa, traverseF(f)), exports.compact);\n };\n };\n};\n\nexports.wither = wither;\n/**\n * @category Witherable\n * @since 2.6.5\n */\n\nvar wilt = function wilt(F) {\n var traverseF = traverse(F);\n return function (f) {\n return function (fa) {\n return F.map(function_1.pipe(fa, traverseF(f)), exports.separate);\n };\n };\n};\n\nexports.wilt = wilt;\n/**\n * @since 2.0.0\n */\n\nexports.partitionMapWithIndex = RR.partitionMapWithIndex;\n\nfunction partitionWithIndex(predicateWithIndex) {\n return RR.partitionWithIndex(predicateWithIndex);\n}\n\nexports.partitionWithIndex = partitionWithIndex;\n/**\n * @since 2.0.0\n */\n\nexports.filterMapWithIndex = RR.filterMapWithIndex;\n\nfunction filterWithIndex(predicateWithIndex) {\n return RR.filterWithIndex(predicateWithIndex);\n}\n\nexports.filterWithIndex = filterWithIndex;\n\nfunction fromFoldable(M, F) {\n return RR.fromFoldable(M, F);\n}\n\nexports.fromFoldable = fromFoldable;\n\nfunction fromFoldableMap(M, F) {\n return RR.fromFoldableMap(M, F);\n}\n\nexports.fromFoldableMap = fromFoldableMap;\n/**\n * @since 2.0.0\n */\n\nexports.every = RR.every;\n/**\n * @since 2.0.0\n */\n\nexports.some = RR.some; // TODO: remove non-curried overloading in v3\n\n/**\n * @since 2.0.0\n */\n\nexports.elem = RR.elem; // -------------------------------------------------------------------------------------\n// non-pipeables\n// -------------------------------------------------------------------------------------\n\n/* istanbul ignore next */\n\nvar _map = function _map(fa, f) {\n return function_1.pipe(fa, exports.map(f));\n};\n/* istanbul ignore next */\n\n\nvar _mapWithIndex = function _mapWithIndex(fa, f) {\n return function_1.pipe(fa, exports.mapWithIndex(f));\n};\n/* istanbul ignore next */\n\n\nvar _reduce = function _reduce(fa, b, f) {\n return function_1.pipe(fa, exports.reduce(b, f));\n};\n/* istanbul ignore next */\n\n\nvar _foldMap = function _foldMap(M) {\n var foldMapM = exports.foldMap(M);\n return function (fa, f) {\n return function_1.pipe(fa, foldMapM(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _reduceRight = function _reduceRight(fa, b, f) {\n return function_1.pipe(fa, exports.reduceRight(b, f));\n};\n/* istanbul ignore next */\n\n\nvar _traverse = function _traverse(F) {\n var traverseF = traverse(F);\n return function (ta, f) {\n return function_1.pipe(ta, traverseF(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _filter = function _filter(fa, predicate) {\n return function_1.pipe(fa, exports.filter(predicate));\n};\n/* istanbul ignore next */\n\n\nvar _filterMap = function _filterMap(fa, f) {\n return function_1.pipe(fa, exports.filterMap(f));\n};\n/* istanbul ignore next */\n\n\nvar _partition = function _partition(fa, predicate) {\n return function_1.pipe(fa, exports.partition(predicate));\n};\n/* istanbul ignore next */\n\n\nvar _partitionMap = function _partitionMap(fa, f) {\n return function_1.pipe(fa, exports.partitionMap(f));\n};\n/* istanbul ignore next */\n\n\nvar _reduceWithIndex = function _reduceWithIndex(fa, b, f) {\n return function_1.pipe(fa, exports.reduceWithIndex(b, f));\n};\n/* istanbul ignore next */\n\n\nvar _foldMapWithIndex = function _foldMapWithIndex(M) {\n var foldMapWithIndexM = exports.foldMapWithIndex(M);\n return function (fa, f) {\n return function_1.pipe(fa, foldMapWithIndexM(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _reduceRightWithIndex = function _reduceRightWithIndex(fa, b, f) {\n return function_1.pipe(fa, exports.reduceRightWithIndex(b, f));\n};\n/* istanbul ignore next */\n\n\nvar _partitionMapWithIndex = function _partitionMapWithIndex(fa, f) {\n return function_1.pipe(fa, exports.partitionMapWithIndex(f));\n};\n/* istanbul ignore next */\n\n\nvar _partitionWithIndex = function _partitionWithIndex(fa, predicateWithIndex) {\n return function_1.pipe(fa, partitionWithIndex(predicateWithIndex));\n};\n/* istanbul ignore next */\n\n\nvar _filterMapWithIndex = function _filterMapWithIndex(fa, f) {\n return function_1.pipe(fa, exports.filterMapWithIndex(f));\n};\n/* istanbul ignore next */\n\n\nvar _filterWithIndex = function _filterWithIndex(fa, predicateWithIndex) {\n return function_1.pipe(fa, filterWithIndex(predicateWithIndex));\n};\n/* istanbul ignore next */\n\n\nvar _traverseWithIndex = function _traverseWithIndex(F) {\n var traverseWithIndexF = traverseWithIndex(F);\n return function (ta, f) {\n return function_1.pipe(ta, traverseWithIndexF(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _wither = function _wither(F) {\n var witherF = exports.wither(F);\n return function (fa, f) {\n return function_1.pipe(fa, witherF(f));\n };\n};\n/* istanbul ignore next */\n\n\nvar _wilt = function _wilt(F) {\n var wiltF = exports.wilt(F);\n return function (fa, f) {\n return function_1.pipe(fa, wiltF(f));\n };\n}; // -------------------------------------------------------------------------------------\n// type class members\n// -------------------------------------------------------------------------------------\n\n/**\n * @category Filterable\n * @since 2.0.0\n */\n\n\nexports.filter = RR.filter;\n/**\n * @category Filterable\n * @since 2.0.0\n */\n\nexports.filterMap = RR.filterMap;\n/**\n * @category Foldable\n * @since 2.0.0\n */\n\nexports.foldMap = RR.foldMap;\n/**\n * @category Filterable\n * @since 2.0.0\n */\n\nexports.partition = RR.partition;\n/**\n * @category Filterable\n * @since 2.0.0\n */\n\nexports.partitionMap = RR.partitionMap;\n/**\n * @category Foldable\n * @since 2.0.0\n */\n\nexports.reduce = RR.reduce;\n/**\n * @category Foldable\n * @since 2.0.0\n */\n\nexports.reduceRight = RR.reduceRight;\n/**\n * @category Compactable\n * @since 2.0.0\n */\n\nexports.compact = RR.compact;\n/**\n * @category Compactable\n * @since 2.0.0\n */\n\nexports.separate = RR.separate; // -------------------------------------------------------------------------------------\n// instances\n// -------------------------------------------------------------------------------------\n\n/**\n * @category instances\n * @since 2.0.0\n */\n\nexports.URI = 'Record';\n/**\n * @category instances\n * @since 2.0.0\n */\n\nexports.getShow = RR.getShow;\n/**\n * @category instances\n * @since 2.0.0\n */\n\nexports.getEq = RR.getEq;\n/**\n * Returns a `Monoid` instance for `Record`s given a `Semigroup` instance for their values.\n *\n * @example\n * import { SemigroupSum } from 'fp-ts/number'\n * import { getMonoid } from 'fp-ts/Record'\n *\n * const M = getMonoid(SemigroupSum)\n * assert.deepStrictEqual(M.concat({ foo: 123 }, { foo: 456 }), { foo: 579 })\n *\n * @category instances\n * @since 2.0.0\n */\n\nexports.getMonoid = RR.getMonoid;\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Functor = {\n URI: exports.URI,\n map: _map\n};\n/**\n * Derivable from `Functor`.\n *\n * @category combinators\n * @since 2.10.0\n */\n\nexports.flap =\n/*#_PURE_*/\nFunctor_1.flap(exports.Functor);\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.FunctorWithIndex = {\n URI: exports.URI,\n map: _map,\n mapWithIndex: _mapWithIndex\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Foldable = {\n URI: exports.URI,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.FoldableWithIndex = {\n URI: exports.URI,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n reduceWithIndex: _reduceWithIndex,\n foldMapWithIndex: _foldMapWithIndex,\n reduceRightWithIndex: _reduceRightWithIndex\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Compactable = {\n URI: exports.URI,\n compact: exports.compact,\n separate: exports.separate\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Filterable = {\n URI: exports.URI,\n map: _map,\n compact: exports.compact,\n separate: exports.separate,\n filter: _filter,\n filterMap: _filterMap,\n partition: _partition,\n partitionMap: _partitionMap\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.FilterableWithIndex = {\n URI: exports.URI,\n map: _map,\n mapWithIndex: _mapWithIndex,\n compact: exports.compact,\n separate: exports.separate,\n filter: _filter,\n filterMap: _filterMap,\n partition: _partition,\n partitionMap: _partitionMap,\n filterMapWithIndex: _filterMapWithIndex,\n filterWithIndex: _filterWithIndex,\n partitionMapWithIndex: _partitionMapWithIndex,\n partitionWithIndex: _partitionWithIndex\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Traversable = {\n URI: exports.URI,\n map: _map,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: sequence\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.TraversableWithIndex = {\n URI: exports.URI,\n map: _map,\n mapWithIndex: _mapWithIndex,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n reduceWithIndex: _reduceWithIndex,\n foldMapWithIndex: _foldMapWithIndex,\n reduceRightWithIndex: _reduceRightWithIndex,\n traverse: _traverse,\n sequence: sequence,\n traverseWithIndex: _traverseWithIndex\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Witherable = {\n URI: exports.URI,\n map: _map,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: sequence,\n compact: exports.compact,\n separate: exports.separate,\n filter: _filter,\n filterMap: _filterMap,\n partition: _partition,\n partitionMap: _partitionMap,\n wither: _wither,\n wilt: _wilt\n}; // -------------------------------------------------------------------------------------\n// deprecated\n// -------------------------------------------------------------------------------------\n\n/**\n * Use a new `{}` instead.\n *\n * @since 2.0.0\n * @deprecated\n */\n\nexports.empty = {};\n/**\n * Use [`upsertAt`](#upsertat) instead.\n *\n * @since 2.0.0\n * @deprecated\n */\n\nexports.insertAt = exports.upsertAt;\n/**\n * Use [`has`](#has) instead.\n *\n * @since 2.0.0\n * @deprecated\n */\n// tslint:disable-next-line: deprecation\n\nexports.hasOwnProperty = RR.hasOwnProperty;\n/**\n * Use small, specific instances instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.record = {\n URI: exports.URI,\n map: _map,\n reduce: _reduce,\n foldMap: _foldMap,\n reduceRight: _reduceRight,\n traverse: _traverse,\n sequence: sequence,\n compact: exports.compact,\n separate: exports.separate,\n filter: _filter,\n filterMap: _filterMap,\n partition: _partition,\n partitionMap: _partitionMap,\n mapWithIndex: _mapWithIndex,\n reduceWithIndex: _reduceWithIndex,\n foldMapWithIndex: _foldMapWithIndex,\n reduceRightWithIndex: _reduceRightWithIndex,\n filterMapWithIndex: _filterMapWithIndex,\n filterWithIndex: _filterWithIndex,\n partitionMapWithIndex: _partitionMapWithIndex,\n partitionWithIndex: _partitionWithIndex,\n traverseWithIndex: _traverseWithIndex,\n wither: _wither,\n wilt: _wilt\n};","\"use strict\";\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nvar __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n});\n\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n }\n\n __setModuleDefault(result, mod);\n\n return result;\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.semigroupProduct = exports.semigroupSum = exports.semigroupString = exports.getFunctionSemigroup = exports.semigroupAny = exports.semigroupAll = exports.fold = exports.getIntercalateSemigroup = exports.getMeetSemigroup = exports.getJoinSemigroup = exports.getDualSemigroup = exports.getStructSemigroup = exports.getTupleSemigroup = exports.getFirstSemigroup = exports.getLastSemigroup = exports.getObjectSemigroup = exports.concatAll = exports.semigroupVoid = exports.last = exports.first = exports.intercalate = exports.tuple = exports.struct = exports.reverse = exports.constant = exports.max = exports.min = void 0;\n/**\n * If a type `A` can form a `Semigroup` it has an **associative** binary operation.\n *\n * ```ts\n * interface Semigroup {\n * readonly concat: (x: A, y: A) => A\n * }\n * ```\n *\n * Associativity means the following equality must hold for any choice of `x`, `y`, and `z`.\n *\n * ```ts\n * concat(x, concat(y, z)) = concat(concat(x, y), z)\n * ```\n *\n * A common example of a semigroup is the type `string` with the operation `+`.\n *\n * ```ts\n * import { Semigroup } from 'fp-ts/Semigroup'\n *\n * const semigroupString: Semigroup = {\n * concat: (x, y) => x + y\n * }\n *\n * const x = 'x'\n * const y = 'y'\n * const z = 'z'\n *\n * semigroupString.concat(x, y) // 'xy'\n *\n * semigroupString.concat(x, semigroupString.concat(y, z)) // 'xyz'\n *\n * semigroupString.concat(semigroupString.concat(x, y), z) // 'xyz'\n * ```\n *\n * *Adapted from https://typelevel.org/cats*\n *\n * @since 2.0.0\n */\n\nvar function_1 = require(\"./function\");\n\nvar _ = __importStar(require(\"./internal\"));\n\nvar Or = __importStar(require(\"./Ord\")); // -------------------------------------------------------------------------------------\n// constructors\n// -------------------------------------------------------------------------------------\n\n/**\n * Get a semigroup where `concat` will return the minimum, based on the provided order.\n *\n * @example\n * import * as N from 'fp-ts/number'\n * import * as S from 'fp-ts/Semigroup'\n *\n * const S1 = S.min(N.Ord)\n *\n * assert.deepStrictEqual(S1.concat(1, 2), 1)\n *\n * @category constructors\n * @since 2.10.0\n */\n\n\nvar min = function min(O) {\n return {\n concat: Or.min(O)\n };\n};\n\nexports.min = min;\n/**\n * Get a semigroup where `concat` will return the maximum, based on the provided order.\n *\n * @example\n * import * as N from 'fp-ts/number'\n * import * as S from 'fp-ts/Semigroup'\n *\n * const S1 = S.max(N.Ord)\n *\n * assert.deepStrictEqual(S1.concat(1, 2), 2)\n *\n * @category constructors\n * @since 2.10.0\n */\n\nvar max = function max(O) {\n return {\n concat: Or.max(O)\n };\n};\n\nexports.max = max;\n/**\n * @category constructors\n * @since 2.10.0\n */\n\nvar constant = function constant(a) {\n return {\n concat: function concat() {\n return a;\n }\n };\n};\n\nexports.constant = constant; // -------------------------------------------------------------------------------------\n// combinators\n// -------------------------------------------------------------------------------------\n\n/**\n * The dual of a `Semigroup`, obtained by swapping the arguments of `concat`.\n *\n * @example\n * import { reverse } from 'fp-ts/Semigroup'\n * import * as S from 'fp-ts/string'\n *\n * assert.deepStrictEqual(reverse(S.Semigroup).concat('a', 'b'), 'ba')\n *\n * @category combinators\n * @since 2.10.0\n */\n\nvar reverse = function reverse(S) {\n return {\n concat: function concat(x, y) {\n return S.concat(y, x);\n }\n };\n};\n\nexports.reverse = reverse;\n/**\n * Given a struct of semigroups returns a semigroup for the struct.\n *\n * @example\n * import { struct } from 'fp-ts/Semigroup'\n * import * as N from 'fp-ts/number'\n *\n * interface Point {\n * readonly x: number\n * readonly y: number\n * }\n *\n * const S = struct({\n * x: N.SemigroupSum,\n * y: N.SemigroupSum\n * })\n *\n * assert.deepStrictEqual(S.concat({ x: 1, y: 2 }, { x: 3, y: 4 }), { x: 4, y: 6 })\n *\n * @category combinators\n * @since 2.10.0\n */\n\nvar struct = function struct(semigroups) {\n return {\n concat: function concat(first, second) {\n var r = {};\n\n for (var k in semigroups) {\n if (_.has.call(semigroups, k)) {\n r[k] = semigroups[k].concat(first[k], second[k]);\n }\n }\n\n return r;\n }\n };\n};\n\nexports.struct = struct;\n/**\n * Given a tuple of semigroups returns a semigroup for the tuple.\n *\n * @example\n * import { tuple } from 'fp-ts/Semigroup'\n * import * as B from 'fp-ts/boolean'\n * import * as N from 'fp-ts/number'\n * import * as S from 'fp-ts/string'\n *\n * const S1 = tuple(S.Semigroup, N.SemigroupSum)\n * assert.deepStrictEqual(S1.concat(['a', 1], ['b', 2]), ['ab', 3])\n *\n * const S2 = tuple(S.Semigroup, N.SemigroupSum, B.SemigroupAll)\n * assert.deepStrictEqual(S2.concat(['a', 1, true], ['b', 2, false]), ['ab', 3, false])\n *\n * @category combinators\n * @since 2.10.0\n */\n\nvar tuple = function tuple() {\n var semigroups = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n semigroups[_i] = arguments[_i];\n }\n\n return {\n concat: function concat(first, second) {\n return semigroups.map(function (s, i) {\n return s.concat(first[i], second[i]);\n });\n }\n };\n};\n\nexports.tuple = tuple;\n/**\n * Between each pair of elements insert `middle`.\n *\n * @example\n * import { intercalate } from 'fp-ts/Semigroup'\n * import * as S from 'fp-ts/string'\n * import { pipe } from 'fp-ts/function'\n *\n * const S1 = pipe(S.Semigroup, intercalate(' + '))\n *\n * assert.strictEqual(S1.concat('a', 'b'), 'a + b')\n *\n * @category combinators\n * @since 2.10.0\n */\n\nvar intercalate = function intercalate(middle) {\n return function (S) {\n return {\n concat: function concat(x, y) {\n return S.concat(x, S.concat(middle, y));\n }\n };\n };\n};\n\nexports.intercalate = intercalate; // -------------------------------------------------------------------------------------\n// instances\n// -------------------------------------------------------------------------------------\n\n/**\n * Always return the first argument.\n *\n * @example\n * import * as S from 'fp-ts/Semigroup'\n *\n * assert.deepStrictEqual(S.first().concat(1, 2), 1)\n *\n * @category instances\n * @since 2.10.0\n */\n\nvar first = function first() {\n return {\n concat: function_1.identity\n };\n};\n\nexports.first = first;\n/**\n * Always return the last argument.\n *\n * @example\n * import * as S from 'fp-ts/Semigroup'\n *\n * assert.deepStrictEqual(S.last().concat(1, 2), 2)\n *\n * @category instances\n * @since 2.10.0\n */\n\nvar last = function last() {\n return {\n concat: function concat(_, y) {\n return y;\n }\n };\n};\n\nexports.last = last;\n/**\n * @category instances\n * @since 2.0.0\n */\n\nexports.semigroupVoid = exports.constant(undefined); // -------------------------------------------------------------------------------------\n// utils\n// -------------------------------------------------------------------------------------\n\n/**\n * Given a sequence of `as`, concat them and return the total.\n *\n * If `as` is empty, return the provided `startWith` value.\n *\n * @example\n * import { concatAll } from 'fp-ts/Semigroup'\n * import * as N from 'fp-ts/number'\n *\n * const sum = concatAll(N.SemigroupSum)(0)\n *\n * assert.deepStrictEqual(sum([1, 2, 3]), 6)\n * assert.deepStrictEqual(sum([]), 0)\n *\n * @since 2.10.0\n */\n\nvar concatAll = function concatAll(S) {\n return function (startWith) {\n return function (as) {\n return as.reduce(S.concat, startWith);\n };\n };\n};\n\nexports.concatAll = concatAll; // -------------------------------------------------------------------------------------\n// deprecated\n// -------------------------------------------------------------------------------------\n\n/**\n * Use [`getAssignSemigroup`](./struct.ts.html#getAssignSemigroup) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nvar getObjectSemigroup = function getObjectSemigroup() {\n return {\n concat: function concat(first, second) {\n return Object.assign({}, first, second);\n }\n };\n};\n\nexports.getObjectSemigroup = getObjectSemigroup;\n/**\n * Use [`last`](#last) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getLastSemigroup = exports.last;\n/**\n * Use [`first`](#first) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getFirstSemigroup = exports.first;\n/**\n * Use [`tuple`](#tuple) instead.\n *\n * @category combinators\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getTupleSemigroup = exports.tuple;\n/**\n * Use [`struct`](#struct) instead.\n *\n * @category combinators\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getStructSemigroup = exports.struct;\n/**\n * Use [`reverse`](#reverse) instead.\n *\n * @category combinators\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getDualSemigroup = exports.reverse;\n/**\n * Use [`max`](#max) instead.\n *\n * @category constructors\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getJoinSemigroup = exports.max;\n/**\n * Use [`min`](#min) instead.\n *\n * @category constructors\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getMeetSemigroup = exports.min;\n/**\n * Use [`intercalate`](#intercalate) instead.\n *\n * @category combinators\n * @since 2.5.0\n * @deprecated\n */\n\nexports.getIntercalateSemigroup = exports.intercalate;\n\nfunction fold(S) {\n var concatAllS = exports.concatAll(S);\n return function (startWith, as) {\n return as === undefined ? concatAllS(startWith) : concatAllS(startWith)(as);\n };\n}\n\nexports.fold = fold;\n/**\n * Use [`SemigroupAll`](./boolean.ts.html#SemigroupAll) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.semigroupAll = {\n concat: function concat(x, y) {\n return x && y;\n }\n};\n/**\n * Use [`SemigroupAny`](./boolean.ts.html#SemigroupAny) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.semigroupAny = {\n concat: function concat(x, y) {\n return x || y;\n }\n};\n/**\n * Use [`getSemigroup`](./function.ts.html#getSemigroup) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getFunctionSemigroup = function_1.getSemigroup;\n/**\n * Use [`Semigroup`](./string.ts.html#Semigroup) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.semigroupString = {\n concat: function concat(x, y) {\n return x + y;\n }\n};\n/**\n * Use [`SemigroupSum`](./number.ts.html#SemigroupSum) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.semigroupSum = {\n concat: function concat(x, y) {\n return x + y;\n }\n};\n/**\n * Use [`SemigroupProduct`](./number.ts.html#SemigroupProduct) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.semigroupProduct = {\n concat: function concat(x, y) {\n return x * y;\n }\n};","\"use strict\";\n/**\n * ```ts\n * interface Separated {\n * readonly left: E\n * readonly right: A\n * }\n * ```\n *\n * Represents a result of separating a whole into two parts.\n *\n * @since 2.10.0\n */\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.right = exports.left = exports.flap = exports.Functor = exports.Bifunctor = exports.URI = exports.bimap = exports.mapLeft = exports.map = exports.separated = void 0;\n\nvar function_1 = require(\"./function\");\n\nvar Functor_1 = require(\"./Functor\"); // -------------------------------------------------------------------------------------\n// constructors\n// -------------------------------------------------------------------------------------\n\n/**\n * @category constructors\n * @since 2.10.0\n */\n\n\nvar separated = function separated(left, right) {\n return {\n left: left,\n right: right\n };\n};\n\nexports.separated = separated; // -------------------------------------------------------------------------------------\n// non-pipeables\n// -------------------------------------------------------------------------------------\n\nvar _map = function _map(fa, f) {\n return function_1.pipe(fa, exports.map(f));\n};\n\nvar _mapLeft = function _mapLeft(fa, f) {\n return function_1.pipe(fa, exports.mapLeft(f));\n};\n\nvar _bimap = function _bimap(fa, g, f) {\n return function_1.pipe(fa, exports.bimap(g, f));\n}; // -------------------------------------------------------------------------------------\n// type class members\n// -------------------------------------------------------------------------------------\n\n/**\n * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F) => F` whose argument and return types\n * use the type constructor `F` to represent some computational context.\n *\n * @category Functor\n * @since 2.10.0\n */\n\n\nvar map = function map(f) {\n return function (fa) {\n return exports.separated(exports.left(fa), f(exports.right(fa)));\n };\n};\n\nexports.map = map;\n/**\n * Map a function over the first type argument of a bifunctor.\n *\n * @category Bifunctor\n * @since 2.10.0\n */\n\nvar mapLeft = function mapLeft(f) {\n return function (fa) {\n return exports.separated(f(exports.left(fa)), exports.right(fa));\n };\n};\n\nexports.mapLeft = mapLeft;\n/**\n * Map a pair of functions over the two type arguments of the bifunctor.\n *\n * @category Bifunctor\n * @since 2.10.0\n */\n\nvar bimap = function bimap(f, g) {\n return function (fa) {\n return exports.separated(f(exports.left(fa)), g(exports.right(fa)));\n };\n};\n\nexports.bimap = bimap; // -------------------------------------------------------------------------------------\n// instances\n// -------------------------------------------------------------------------------------\n\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.URI = 'Separated';\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Bifunctor = {\n URI: exports.URI,\n mapLeft: _mapLeft,\n bimap: _bimap\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Functor = {\n URI: exports.URI,\n map: _map\n};\n/**\n * Derivable from `Functor`.\n *\n * @category combinators\n * @since 2.10.0\n */\n\nexports.flap =\n/*#_PURE_*/\nFunctor_1.flap(exports.Functor); // -------------------------------------------------------------------------------------\n// utils\n// -------------------------------------------------------------------------------------\n\n/**\n * @since 2.10.0\n */\n\nvar left = function left(s) {\n return s.left;\n};\n\nexports.left = left;\n/**\n * @since 2.10.0\n */\n\nvar right = function right(s) {\n return s.right;\n};\n\nexports.right = right;","\"use strict\";\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nvar __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n});\n\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n }\n\n __setModuleDefault(result, mod);\n\n return result;\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.showNumber = exports.showString = exports.showBoolean = exports.getStructShow = exports.getTupleShow = exports.tuple = exports.struct = void 0;\n/**\n * The `Show` type class represents those types which can be converted into\n * a human-readable `string` representation.\n *\n * While not required, it is recommended that for any expression `x`, the\n * string `show(x)` be executable TypeScript code which evaluates to the same\n * value as the expression `x`.\n *\n * @since 2.0.0\n */\n\nvar _ = __importStar(require(\"./internal\")); // -------------------------------------------------------------------------------------\n// combinators\n// -------------------------------------------------------------------------------------\n\n/**\n * @category combinators\n * @since 2.10.0\n */\n\n\nvar struct = function struct(shows) {\n return {\n show: function show(a) {\n var s = '{';\n\n for (var k in shows) {\n if (_.has.call(shows, k)) {\n s += \" \" + k + \": \" + shows[k].show(a[k]) + \",\";\n }\n }\n\n if (s.length > 1) {\n s = s.slice(0, -1) + ' ';\n }\n\n s += '}';\n return s;\n }\n };\n};\n\nexports.struct = struct;\n/**\n * @category combinators\n * @since 2.10.0\n */\n\nvar tuple = function tuple() {\n var shows = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n shows[_i] = arguments[_i];\n }\n\n return {\n show: function show(t) {\n return \"[\" + t.map(function (a, i) {\n return shows[i].show(a);\n }).join(', ') + \"]\";\n }\n };\n};\n\nexports.tuple = tuple; // -------------------------------------------------------------------------------------\n// deprecated\n// -------------------------------------------------------------------------------------\n\n/**\n * Use [`tuple`](#tuple) instead.\n *\n * @category combinators\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getTupleShow = exports.tuple;\n/**\n * Use [`struct`](#struct) instead.\n *\n * @category combinators\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getStructShow = exports.struct;\n/**\n * Use [`Show`](./boolean.ts.html#Show) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.showBoolean = {\n show: function show(a) {\n return JSON.stringify(a);\n }\n};\n/**\n * Use [`Show`](./string.ts.html#Show) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.showString = {\n show: function show(a) {\n return JSON.stringify(a);\n }\n};\n/**\n * Use [`Show`](./number.ts.html#Show) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.showNumber = {\n show: function show(a) {\n return JSON.stringify(a);\n }\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getMonoid = exports.getSemigroup = exports.taskSeq = exports.task = exports.sequenceSeqArray = exports.traverseSeqArray = exports.traverseSeqArrayWithIndex = exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.apS = exports.bind = exports.bindTo = exports.Do = exports.never = exports.FromTask = exports.chainFirstIOK = exports.chainIOK = exports.fromIOK = exports.FromIO = exports.chainFirst = exports.MonadTask = exports.MonadIO = exports.Monad = exports.Chain = exports.ApplicativeSeq = exports.ApplySeq = exports.ApplicativePar = exports.apSecond = exports.apFirst = exports.ApplyPar = exports.Pointed = exports.flap = exports.Functor = exports.getRaceMonoid = exports.URI = exports.fromTask = exports.flatten = exports.chain = exports.of = exports.ap = exports.map = exports.delay = exports.fromIO = void 0;\n/**\n * ```ts\n * interface Task {\n * (): Promise\n * }\n * ```\n *\n * `Task` represents an asynchronous computation that yields a value of type `A` and **never fails**.\n * If you want to represent an asynchronous computation that may fail, please see `TaskEither`.\n *\n * @since 2.0.0\n */\n\nvar Applicative_1 = require(\"./Applicative\");\n\nvar Apply_1 = require(\"./Apply\");\n\nvar Chain_1 = require(\"./Chain\");\n\nvar FromIO_1 = require(\"./FromIO\");\n\nvar function_1 = require(\"./function\");\n\nvar Functor_1 = require(\"./Functor\"); // -------------------------------------------------------------------------------------\n// constructors\n// -------------------------------------------------------------------------------------\n\n/**\n * @category constructors\n * @since 2.0.0\n */\n\n\nvar fromIO = function fromIO(ma) {\n return function () {\n return Promise.resolve(ma());\n };\n};\n\nexports.fromIO = fromIO; // -------------------------------------------------------------------------------------\n// combinators\n// -------------------------------------------------------------------------------------\n\n/**\n * Creates a task that will complete after a time delay\n *\n * @example\n * import { sequenceT } from 'fp-ts/Apply'\n * import * as T from 'fp-ts/Task'\n *\n * async function test() {\n * const log: Array = []\n * const append = (message: string): T.Task =>\n * T.fromIO(() => {\n * log.push(message)\n * })\n * const fa = append('a')\n * const fb = append('b')\n * const fc = T.delay(10)(append('c'))\n * const fd = append('d')\n * await sequenceT(T.ApplyPar)(fa, fb, fc, fd)()\n * assert.deepStrictEqual(log, ['a', 'b', 'd', 'c'])\n * }\n *\n * test()\n *\n * @category combinators\n * @since 2.0.0\n */\n\nfunction delay(millis) {\n return function (ma) {\n return function () {\n return new Promise(function (resolve) {\n setTimeout(function () {\n // tslint:disable-next-line: no-floating-promises\n ma().then(resolve);\n }, millis);\n });\n };\n };\n}\n\nexports.delay = delay; // -------------------------------------------------------------------------------------\n// non-pipeables\n// -------------------------------------------------------------------------------------\n\nvar _map = function _map(fa, f) {\n return function_1.pipe(fa, exports.map(f));\n};\n\nvar _apPar = function _apPar(fab, fa) {\n return function_1.pipe(fab, exports.ap(fa));\n};\n\nvar _apSeq = function _apSeq(fab, fa) {\n return function_1.pipe(fab, exports.chain(function (f) {\n return function_1.pipe(fa, exports.map(f));\n }));\n};\n\nvar _chain = function _chain(ma, f) {\n return function_1.pipe(ma, exports.chain(f));\n}; // -------------------------------------------------------------------------------------\n// type class members\n// -------------------------------------------------------------------------------------\n\n/**\n * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F) => F` whose argument and return types\n * use the type constructor `F` to represent some computational context.\n *\n * @category Functor\n * @since 2.0.0\n */\n\n\nvar map = function map(f) {\n return function (fa) {\n return function () {\n return fa().then(f);\n };\n };\n};\n\nexports.map = map;\n/**\n * Apply a function to an argument under a type constructor.\n *\n * @category Apply\n * @since 2.0.0\n */\n\nvar ap = function ap(fa) {\n return function (fab) {\n return function () {\n return Promise.all([fab(), fa()]).then(function (_a) {\n var f = _a[0],\n a = _a[1];\n return f(a);\n });\n };\n };\n};\n\nexports.ap = ap;\n/**\n * @category Pointed\n * @since 2.0.0\n */\n\nvar of = function of(a) {\n return function () {\n return Promise.resolve(a);\n };\n};\n\nexports.of = of;\n/**\n * Composes computations in sequence, using the return value of one computation to determine the next computation.\n *\n * @category Monad\n * @since 2.0.0\n */\n\nvar chain = function chain(f) {\n return function (ma) {\n return function () {\n return ma().then(function (a) {\n return f(a)();\n });\n };\n };\n};\n\nexports.chain = chain;\n/**\n * Derivable from `Chain`.\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.flatten = /*#__PURE__*/exports.chain(function_1.identity);\n/**\n * @category FromTask\n * @since 2.7.0\n * @deprecated\n */\n\nexports.fromTask = function_1.identity; // -------------------------------------------------------------------------------------\n// instances\n// -------------------------------------------------------------------------------------\n\n/**\n * @category instances\n * @since 2.0.0\n */\n\nexports.URI = 'Task';\n/**\n * Monoid returning the first completed task.\n *\n * Note: uses `Promise.race` internally.\n *\n * @example\n * import * as T from 'fp-ts/Task'\n *\n * async function test() {\n * const S = T.getRaceMonoid()\n * const fa = T.delay(20)(T.of('a'))\n * const fb = T.delay(10)(T.of('b'))\n * assert.deepStrictEqual(await S.concat(fa, fb)(), 'b')\n * }\n *\n * test()\n *\n * @category instances\n * @since 2.0.0\n */\n\nfunction getRaceMonoid() {\n return {\n concat: function concat(x, y) {\n return function () {\n return Promise.race([x(), y()]);\n };\n },\n empty: exports.never\n };\n}\n\nexports.getRaceMonoid = getRaceMonoid;\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Functor = {\n URI: exports.URI,\n map: _map\n};\n/**\n * Derivable from `Functor`.\n *\n * @category combinators\n * @since 2.10.0\n */\n\nexports.flap =\n/*#_PURE_*/\nFunctor_1.flap(exports.Functor);\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Pointed = {\n URI: exports.URI,\n of: exports.of\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.ApplyPar = {\n URI: exports.URI,\n map: _map,\n ap: _apPar\n};\n/**\n * Combine two effectful actions, keeping only the result of the first.\n *\n * Derivable from `Apply`.\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.apFirst = /*#__PURE__*/Apply_1.apFirst(exports.ApplyPar);\n/**\n * Combine two effectful actions, keeping only the result of the second.\n *\n * Derivable from `Apply`.\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.apSecond = /*#__PURE__*/Apply_1.apSecond(exports.ApplyPar);\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.ApplicativePar = {\n URI: exports.URI,\n map: _map,\n ap: _apPar,\n of: exports.of\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.ApplySeq = {\n URI: exports.URI,\n map: _map,\n ap: _apSeq\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.ApplicativeSeq = {\n URI: exports.URI,\n map: _map,\n ap: _apSeq,\n of: exports.of\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Chain = {\n URI: exports.URI,\n map: _map,\n ap: _apPar,\n chain: _chain\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Monad = {\n URI: exports.URI,\n map: _map,\n of: exports.of,\n ap: _apPar,\n chain: _chain\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.MonadIO = {\n URI: exports.URI,\n map: _map,\n of: exports.of,\n ap: _apPar,\n chain: _chain,\n fromIO: exports.fromIO\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.MonadTask = {\n URI: exports.URI,\n map: _map,\n of: exports.of,\n ap: _apPar,\n chain: _chain,\n fromIO: exports.fromIO,\n fromTask: exports.fromTask\n};\n/**\n * Composes computations in sequence, using the return value of one computation to determine the next computation and\n * keeping only the result of the first.\n *\n * Derivable from `Chain`.\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.chainFirst = /*#__PURE__*/Chain_1.chainFirst(exports.Chain);\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.FromIO = {\n URI: exports.URI,\n fromIO: exports.fromIO\n};\n/**\n * @category combinators\n * @since 2.4.0\n */\n\nexports.fromIOK = /*#__PURE__*/FromIO_1.fromIOK(exports.FromIO);\n/**\n * @category combinators\n * @since 2.4.0\n */\n\nexports.chainIOK = /*#__PURE__*/FromIO_1.chainIOK(exports.FromIO, exports.Chain);\n/**\n * @category combinators\n * @since 2.10.0\n */\n\nexports.chainFirstIOK = /*#__PURE__*/FromIO_1.chainFirstIOK(exports.FromIO, exports.Chain);\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.FromTask = {\n URI: exports.URI,\n fromIO: exports.fromIO,\n fromTask: exports.fromTask\n}; // -------------------------------------------------------------------------------------\n// utils\n// -------------------------------------------------------------------------------------\n\n/**\n * A `Task` that never completes.\n *\n * @since 2.0.0\n */\n\nvar never = function never() {\n return new Promise(function (_) {\n return undefined;\n });\n};\n\nexports.never = never; // -------------------------------------------------------------------------------------\n// do notation\n// -------------------------------------------------------------------------------------\n\n/**\n * @since 2.9.0\n */\n\nexports.Do = /*#__PURE__*/exports.of({});\n/**\n * @since 2.8.0\n */\n\nexports.bindTo = /*#__PURE__*/Functor_1.bindTo(exports.Functor);\n/**\n * @since 2.8.0\n */\n\nexports.bind = /*#__PURE__*/Chain_1.bind(exports.Chain); // -------------------------------------------------------------------------------------\n// pipeable sequence S\n// -------------------------------------------------------------------------------------\n\n/**\n * @since 2.8.0\n */\n\nexports.apS = /*#__PURE__*/Apply_1.apS(exports.ApplyPar); // -------------------------------------------------------------------------------------\n// array utils\n// -------------------------------------------------------------------------------------\n\n/**\n * Equivalent to `ReadonlyArray#traverseWithIndex(ApplicativePar)`.\n *\n * @since 2.9.0\n */\n\nvar traverseArrayWithIndex = function traverseArrayWithIndex(f) {\n return function (as) {\n return function () {\n return Promise.all(as.map(function (x, i) {\n return f(i, x)();\n }));\n };\n };\n};\n\nexports.traverseArrayWithIndex = traverseArrayWithIndex;\n/**\n * Equivalent to `ReadonlyArray#traverse(ApplicativePar)`.\n *\n * @since 2.9.0\n */\n\nvar traverseArray = function traverseArray(f) {\n return exports.traverseArrayWithIndex(function (_, a) {\n return f(a);\n });\n};\n\nexports.traverseArray = traverseArray;\n/**\n * Equivalent to `ReadonlyArray#sequence(ApplicativePar)`.\n *\n * @since 2.9.0\n */\n\nexports.sequenceArray = /*#__PURE__*/exports.traverseArray(function_1.identity);\n/**\n * Equivalent to `ReadonlyArray#traverseWithIndex(ApplicativeSeq)`.\n *\n * @since 2.9.0\n */\n\nvar traverseSeqArrayWithIndex = function traverseSeqArrayWithIndex(f) {\n return function (as) {\n return function () {\n return as.reduce(function (acc, a, i) {\n return acc.then(function (bs) {\n return f(i, a)().then(function (b) {\n bs.push(b);\n return bs;\n });\n });\n }, Promise.resolve([]));\n };\n };\n};\n\nexports.traverseSeqArrayWithIndex = traverseSeqArrayWithIndex;\n/**\n * Equivalent to `ReadonlyArray#traverse(ApplicativeSeq)`.\n *\n * @since 2.9.0\n */\n\nvar traverseSeqArray = function traverseSeqArray(f) {\n return exports.traverseSeqArrayWithIndex(function (_, a) {\n return f(a);\n });\n};\n\nexports.traverseSeqArray = traverseSeqArray;\n/**\n * Equivalent to `ReadonlyArray#sequence(ApplicativeSeq)`.\n *\n * @since 2.9.0\n */\n\nexports.sequenceSeqArray = /*#__PURE__*/exports.traverseSeqArray(function_1.identity); // -------------------------------------------------------------------------------------\n// deprecated\n// -------------------------------------------------------------------------------------\n// tslint:disable: deprecation\n\n/**\n * Use small, specific instances instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.task = {\n URI: exports.URI,\n map: _map,\n of: exports.of,\n ap: _apPar,\n chain: _chain,\n fromIO: exports.fromIO,\n fromTask: exports.fromTask\n};\n/**\n * Use small, specific instances instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.taskSeq = {\n URI: exports.URI,\n map: _map,\n of: exports.of,\n ap: _apSeq,\n chain: _chain,\n fromIO: exports.fromIO,\n fromTask: exports.fromTask\n};\n/**\n * Use [`getApplySemigroup`](./Apply.ts.html#getApplySemigroup) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getSemigroup = /*#__PURE__*/Apply_1.getApplySemigroup(exports.ApplySeq);\n/**\n * Use [`getApplicativeMonoid`](./Applicative.ts.html#getApplicativeMonoid) instead.\n *\n * Lift a monoid into 'Task', the inner values are concatenated using the provided `Monoid`.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getMonoid = /*#__PURE__*/Applicative_1.getApplicativeMonoid(exports.ApplicativeSeq);","\"use strict\";\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nvar __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n});\n\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n }\n\n __setModuleDefault(result, mod);\n\n return result;\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.apSecond = exports.apFirst = exports.ApplyPar = exports.Pointed = exports.flap = exports.Functor = exports.getFilterable = exports.getCompactable = exports.getAltTaskValidation = exports.getApplicativeTaskValidation = exports.URI = exports.throwError = exports.of = exports.altW = exports.alt = exports.flatten = exports.chainW = exports.chain = exports.apW = exports.ap = exports.mapLeft = exports.bimap = exports.map = exports.chainIOEitherK = exports.chainIOEitherKW = exports.fromIOEitherK = exports.swap = exports.orElseW = exports.orElse = exports.toUnion = exports.tryCatchK = exports.tryCatch = exports.getOrElseW = exports.getOrElse = exports.foldW = exports.matchEW = exports.fold = exports.matchE = exports.matchW = exports.match = exports.fromTask = exports.fromIO = exports.fromEither = exports.fromIOEither = exports.leftIO = exports.rightIO = exports.leftTask = exports.rightTask = exports.right = exports.left = void 0;\nexports.getTaskValidation = exports.getSemigroup = exports.getApplyMonoid = exports.getApplySemigroup = exports.taskEitherSeq = exports.taskEither = exports.sequenceSeqArray = exports.traverseSeqArray = exports.traverseSeqArrayWithIndex = exports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.apSW = exports.apS = exports.bindW = exports.bind = exports.bindTo = exports.Do = exports.bracket = exports.taskify = exports.chainFirstTaskK = exports.chainTaskK = exports.fromTaskK = exports.FromTask = exports.chainFirstIOK = exports.chainIOK = exports.fromIOK = exports.FromIO = exports.fromEitherK = exports.filterOrElseW = exports.filterOrElse = exports.fromPredicate = exports.chainEitherKW = exports.chainEitherK = exports.chainOptionK = exports.fromOptionK = exports.fromOption = exports.FromEither = exports.Alt = exports.Bifunctor = exports.chainFirstW = exports.chainFirst = exports.MonadThrow = exports.MonadTask = exports.MonadIO = exports.Monad = exports.Chain = exports.ApplicativeSeq = exports.ApplySeq = exports.ApplicativePar = void 0;\n\nvar Applicative_1 = require(\"./Applicative\");\n\nvar Apply_1 = require(\"./Apply\");\n\nvar Chain_1 = require(\"./Chain\");\n\nvar Compactable_1 = require(\"./Compactable\");\n\nvar E = __importStar(require(\"./Either\"));\n\nvar ET = __importStar(require(\"./EitherT\"));\n\nvar Filterable_1 = require(\"./Filterable\");\n\nvar FromEither_1 = require(\"./FromEither\");\n\nvar FromIO_1 = require(\"./FromIO\");\n\nvar FromTask_1 = require(\"./FromTask\");\n\nvar function_1 = require(\"./function\");\n\nvar Functor_1 = require(\"./Functor\");\n\nvar T = __importStar(require(\"./Task\")); // -------------------------------------------------------------------------------------\n// constructors\n// -------------------------------------------------------------------------------------\n\n/**\n * @category constructors\n * @since 2.0.0\n */\n\n\nexports.left = /*#__PURE__*/ET.left(T.Pointed);\n/**\n * @category constructors\n * @since 2.0.0\n */\n\nexports.right = /*#__PURE__*/ET.right(T.Pointed);\n/**\n * @category constructors\n * @since 2.0.0\n */\n\nexports.rightTask = /*#__PURE__*/ET.rightF(T.Functor);\n/**\n * @category constructors\n * @since 2.0.0\n */\n\nexports.leftTask = /*#__PURE__*/ET.leftF(T.Functor);\n/**\n * @category constructors\n * @since 2.0.0\n */\n\nexports.rightIO = /*#__PURE__*/function_1.flow(T.fromIO, exports.rightTask);\n/**\n * @category constructors\n * @since 2.0.0\n */\n\nexports.leftIO = /*#__PURE__*/function_1.flow(T.fromIO, exports.leftTask);\n/**\n * @category constructors\n * @since 2.0.0\n */\n\nexports.fromIOEither = T.fromIO;\n/**\n * @category constructors\n * @since 2.0.0\n */\n\nexports.fromEither = T.of;\n/**\n * @category constructors\n * @since 2.7.0\n */\n\nexports.fromIO = exports.rightIO;\n/**\n * @category constructors\n * @since 2.7.0\n */\n\nexports.fromTask = exports.rightTask; // -------------------------------------------------------------------------------------\n// destructors\n// -------------------------------------------------------------------------------------\n\n/**\n * @category destructors\n * @since 2.10.0\n */\n\nexports.match = /*#__PURE__*/ET.match(T.Functor);\n/**\n * Less strict version of [`match`](#match).\n *\n * @category destructors\n * @since 2.10.0\n */\n\nexports.matchW = exports.match;\n/**\n * @category destructors\n * @since 2.10.0\n */\n\nexports.matchE = /*#__PURE__*/ET.matchE(T.Monad);\n/**\n * Alias of [`matchE`](#matche).\n *\n * @category destructors\n * @since 2.0.0\n */\n\nexports.fold = exports.matchE;\n/**\n * Less strict version of [`matchE`](#matche).\n *\n * @category destructors\n * @since 2.10.0\n */\n\nexports.matchEW = exports.matchE;\n/**\n * Alias of [`matchEW`](#matchew).\n *\n * @category destructors\n * @since 2.10.0\n */\n\nexports.foldW = exports.matchEW;\n/**\n * @category destructors\n * @since 2.0.0\n */\n\nexports.getOrElse = /*#__PURE__*/ET.getOrElse(T.Monad);\n/**\n * Less strict version of [`getOrElse`](#getorelse).\n *\n * @category destructors\n * @since 2.6.0\n */\n\nexports.getOrElseW = exports.getOrElse; // -------------------------------------------------------------------------------------\n// interop\n// -------------------------------------------------------------------------------------\n\n/**\n * Transforms a `Promise` that may reject to a `Promise` that never rejects and returns an `Either` instead.\n *\n * Note: `f` should never `throw` errors, they are not caught.\n *\n * See also [`tryCatchK`](#trycatchk).\n *\n * @example\n * import { left, right } from 'fp-ts/Either'\n * import { tryCatch } from 'fp-ts/TaskEither'\n *\n * tryCatch(() => Promise.resolve(1), String)().then(result => {\n * assert.deepStrictEqual(result, right(1))\n * })\n * tryCatch(() => Promise.reject('error'), String)().then(result => {\n * assert.deepStrictEqual(result, left('error'))\n * })\n *\n * @category interop\n * @since 2.0.0\n */\n\nvar tryCatch = function tryCatch(f, onRejected) {\n return function () {\n return f().then(E.right, function (reason) {\n return E.left(onRejected(reason));\n });\n };\n};\n\nexports.tryCatch = tryCatch;\n/**\n * Converts a function returning a `Promise` to one returning a `TaskEither`.\n *\n * @category interop\n * @since 2.5.0\n */\n\nvar tryCatchK = function tryCatchK(f, onRejected) {\n return function () {\n var a = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n a[_i] = arguments[_i];\n }\n\n return exports.tryCatch(function () {\n return f.apply(void 0, a);\n }, onRejected);\n };\n};\n\nexports.tryCatchK = tryCatchK;\n/**\n * @category interop\n * @since 2.10.0\n */\n\nexports.toUnion = /*#__PURE__*/ET.toUnion(T.Functor); // -------------------------------------------------------------------------------------\n// combinators\n// -------------------------------------------------------------------------------------\n\n/**\n * Returns `ma` if is a `Right` or the value returned by `onLeft` otherwise.\n *\n * See also [alt](#alt).\n *\n * @example\n * import * as E from 'fp-ts/Either'\n * import { pipe } from 'fp-ts/function'\n * import * as TE from 'fp-ts/TaskEither'\n *\n * async function test() {\n * const errorHandler = TE.orElse((error: string) => TE.right(`recovering from ${error}...`))\n * assert.deepStrictEqual(await pipe(TE.right('ok'), errorHandler)(), E.right('ok'))\n * assert.deepStrictEqual(await pipe(TE.left('ko'), errorHandler)(), E.right('recovering from ko...'))\n * }\n *\n * test()\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.orElse = /*#__PURE__*/ET.orElse(T.Monad);\n/**\n * Less strict version of [`orElse`](#orelse).\n *\n * @category combinators\n * @since 2.10.0\n */\n\nexports.orElseW = exports.orElse;\n/**\n * @category combinators\n * @since 2.0.0\n */\n\nexports.swap = /*#__PURE__*/ET.swap(T.Functor);\n/**\n * @category combinators\n * @since 2.4.0\n */\n\nvar fromIOEitherK = function fromIOEitherK(f) {\n return function_1.flow(f, exports.fromIOEither);\n};\n\nexports.fromIOEitherK = fromIOEitherK;\n/**\n * Less strict version of [`chainIOEitherK`](#chainioeitherk).\n *\n * @category combinators\n * @since 2.6.1\n */\n\nvar chainIOEitherKW = function chainIOEitherKW(f) {\n return exports.chainW(exports.fromIOEitherK(f));\n};\n\nexports.chainIOEitherKW = chainIOEitherKW;\n/**\n * @category combinators\n * @since 2.4.0\n */\n\nexports.chainIOEitherK = exports.chainIOEitherKW; // -------------------------------------------------------------------------------------\n// non-pipeables\n// -------------------------------------------------------------------------------------\n\nvar _map = function _map(fa, f) {\n return function_1.pipe(fa, exports.map(f));\n};\n/* istanbul ignore next */\n\n\nvar _bimap = function _bimap(fa, f, g) {\n return function_1.pipe(fa, exports.bimap(f, g));\n};\n/* istanbul ignore next */\n\n\nvar _mapLeft = function _mapLeft(fa, f) {\n return function_1.pipe(fa, exports.mapLeft(f));\n};\n\nvar _apPar = function _apPar(fab, fa) {\n return function_1.pipe(fab, exports.ap(fa));\n};\n\nvar _apSeq = function _apSeq(fab, fa) {\n return function_1.pipe(fab, exports.chain(function (f) {\n return function_1.pipe(fa, exports.map(f));\n }));\n};\n/* istanbul ignore next */\n\n\nvar _chain = function _chain(ma, f) {\n return function_1.pipe(ma, exports.chain(f));\n};\n/* istanbul ignore next */\n\n\nvar _alt = function _alt(fa, that) {\n return function_1.pipe(fa, exports.alt(that));\n}; // -------------------------------------------------------------------------------------\n// type class members\n// -------------------------------------------------------------------------------------\n\n/**\n * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F) => F` whose argument and return types\n * use the type constructor `F` to represent some computational context.\n *\n * @category Functor\n * @since 2.0.0\n */\n\n\nexports.map = /*#__PURE__*/ET.map(T.Functor);\n/**\n * Map a pair of functions over the two type arguments of the bifunctor.\n *\n * @category Bifunctor\n * @since 2.0.0\n */\n\nexports.bimap = /*#__PURE__*/ET.bimap(T.Functor);\n/**\n * Map a function over the first type argument of a bifunctor.\n *\n * @category Bifunctor\n * @since 2.0.0\n */\n\nexports.mapLeft = /*#__PURE__*/ET.mapLeft(T.Functor);\n/**\n * Apply a function to an argument under a type constructor.\n *\n * @category Apply\n * @since 2.0.0\n */\n\nexports.ap = /*#__PURE__*/ET.ap(T.ApplyPar);\n/**\n * Less strict version of [`ap`](#ap).\n *\n * @category Apply\n * @since 2.8.0\n */\n\nexports.apW = exports.ap;\n/**\n * Composes computations in sequence, using the return value of one computation to determine the next computation.\n *\n * @category Monad\n * @since 2.0.0\n */\n\nexports.chain = /*#__PURE__*/ET.chain(T.Monad);\n/**\n * Less strict version of [`chain`](#chain).\n *\n * @category Monad\n * @since 2.6.0\n */\n\nexports.chainW = exports.chain;\n/**\n * Derivable from `Chain`.\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.flatten = /*#__PURE__*/exports.chain(function_1.identity);\n/**\n * Identifies an associative operation on a type constructor. It is similar to `Semigroup`, except that it applies to\n * types of kind `* -> *`.\n *\n * In case of `TaskEither` returns `fa` if is a `Right` or the value returned by `that` otherwise.\n *\n * See also [orElse](#orelse).\n *\n * @example\n * import * as E from 'fp-ts/Either'\n * import { pipe } from 'fp-ts/function'\n * import * as TE from 'fp-ts/TaskEither'\n *\n * async function test() {\n * assert.deepStrictEqual(\n * await pipe(\n * TE.right(1),\n * TE.alt(() => TE.right(2))\n * )(),\n * E.right(1)\n * )\n * assert.deepStrictEqual(\n * await pipe(\n * TE.left('a'),\n * TE.alt(() => TE.right(2))\n * )(),\n * E.right(2)\n * )\n * assert.deepStrictEqual(\n * await pipe(\n * TE.left('a'),\n * TE.alt(() => TE.left('b'))\n * )(),\n * E.left('b')\n * )\n * }\n *\n * test()\n *\n * @category Alt\n * @since 2.0.0\n */\n\nexports.alt = /*#__PURE__*/ET.alt(T.Monad);\n/**\n * Less strict version of [`alt`](#alt).\n *\n * @category Alt\n * @since 2.9.0\n */\n\nexports.altW = exports.alt;\n/**\n * @category Pointed\n * @since 2.0.0\n */\n\nexports.of = exports.right;\n/**\n * @category MonadTask\n * @since 2.7.0\n */\n\nexports.throwError = exports.left; // -------------------------------------------------------------------------------------\n// instances\n// -------------------------------------------------------------------------------------\n\n/**\n * @category instances\n * @since 2.0.0\n */\n\nexports.URI = 'TaskEither';\n/**\n * @category instances\n * @since 2.7.0\n */\n\nfunction getApplicativeTaskValidation(A, S) {\n var _ap = Apply_1.ap(A, E.getApplicativeValidation(S));\n\n return {\n URI: exports.URI,\n _E: undefined,\n map: _map,\n ap: function ap(fab, fa) {\n return function_1.pipe(fab, _ap(fa));\n },\n of: exports.of\n };\n}\n\nexports.getApplicativeTaskValidation = getApplicativeTaskValidation;\n/**\n * @category instances\n * @since 2.7.0\n */\n\nfunction getAltTaskValidation(S) {\n var _alt2 = ET.altValidation(T.Monad, S);\n\n return {\n URI: exports.URI,\n _E: undefined,\n map: _map,\n alt: function alt(fa, that) {\n return function_1.pipe(fa, _alt2(that));\n }\n };\n}\n\nexports.getAltTaskValidation = getAltTaskValidation;\n/**\n * @category instances\n * @since 2.10.0\n */\n\nvar getCompactable = function getCompactable(M) {\n var C = E.getCompactable(M);\n return {\n URI: exports.URI,\n _E: undefined,\n compact: Compactable_1.compact(T.Functor, C),\n separate: Compactable_1.separate(T.Functor, C, E.Functor)\n };\n};\n\nexports.getCompactable = getCompactable;\n/**\n * @category instances\n * @since 2.1.0\n */\n\nfunction getFilterable(M) {\n var F = E.getFilterable(M);\n var C = exports.getCompactable(M);\n\n var _filter = Filterable_1.filter(T.Functor, F);\n\n var _filterMap = Filterable_1.filterMap(T.Functor, F);\n\n var _partition = Filterable_1.partition(T.Functor, F);\n\n var _partitionMap = Filterable_1.partitionMap(T.Functor, F);\n\n return {\n URI: exports.URI,\n _E: undefined,\n map: _map,\n compact: C.compact,\n separate: C.separate,\n filter: function filter(fa, predicate) {\n return function_1.pipe(fa, _filter(predicate));\n },\n filterMap: function filterMap(fa, f) {\n return function_1.pipe(fa, _filterMap(f));\n },\n partition: function partition(fa, predicate) {\n return function_1.pipe(fa, _partition(predicate));\n },\n partitionMap: function partitionMap(fa, f) {\n return function_1.pipe(fa, _partitionMap(f));\n }\n };\n}\n\nexports.getFilterable = getFilterable;\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Functor = {\n URI: exports.URI,\n map: _map\n};\n/**\n * Derivable from `Functor`.\n *\n * @category combinators\n * @since 2.10.0\n */\n\nexports.flap =\n/*#_PURE_*/\nFunctor_1.flap(exports.Functor);\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Pointed = {\n URI: exports.URI,\n of: exports.of\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.ApplyPar = {\n URI: exports.URI,\n map: _map,\n ap: _apPar\n};\n/**\n * Combine two effectful actions, keeping only the result of the first.\n *\n * Derivable from `Apply`.\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.apFirst = /*#__PURE__*/Apply_1.apFirst(exports.ApplyPar);\n/**\n * Combine two effectful actions, keeping only the result of the second.\n *\n * Derivable from `Apply`.\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.apSecond = /*#__PURE__*/Apply_1.apSecond(exports.ApplyPar);\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.ApplicativePar = {\n URI: exports.URI,\n map: _map,\n ap: _apPar,\n of: exports.of\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.ApplySeq = {\n URI: exports.URI,\n map: _map,\n ap: _apSeq\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.ApplicativeSeq = {\n URI: exports.URI,\n map: _map,\n ap: _apSeq,\n of: exports.of\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Chain = {\n URI: exports.URI,\n map: _map,\n ap: _apPar,\n chain: _chain\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.Monad = {\n URI: exports.URI,\n map: _map,\n ap: _apPar,\n chain: _chain,\n of: exports.of\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.MonadIO = {\n URI: exports.URI,\n map: _map,\n ap: _apPar,\n chain: _chain,\n of: exports.of,\n fromIO: exports.fromIO\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.MonadTask = {\n URI: exports.URI,\n map: _map,\n ap: _apPar,\n chain: _chain,\n of: exports.of,\n fromIO: exports.fromIO,\n fromTask: exports.fromTask\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.MonadThrow = {\n URI: exports.URI,\n map: _map,\n ap: _apPar,\n chain: _chain,\n of: exports.of,\n throwError: exports.throwError\n};\n/**\n * Composes computations in sequence, using the return value of one computation to determine the next computation and\n * keeping only the result of the first.\n *\n * Derivable from `Chain`.\n *\n * @category combinators\n * @since 2.0.0\n */\n\nexports.chainFirst = /*#__PURE__*/Chain_1.chainFirst(exports.Chain);\n/**\n * Less strict version of [`chainFirst`](#chainfirst).\n *\n * Derivable from `Chain`.\n *\n * @category combinators\n * @since 2.8.0\n */\n\nexports.chainFirstW = exports.chainFirst;\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Bifunctor = {\n URI: exports.URI,\n bimap: _bimap,\n mapLeft: _mapLeft\n};\n/**\n * @category instances\n * @since 2.7.0\n */\n\nexports.Alt = {\n URI: exports.URI,\n map: _map,\n alt: _alt\n};\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.FromEither = {\n URI: exports.URI,\n fromEither: exports.fromEither\n};\n/**\n * @category constructors\n * @since 2.0.0\n */\n\nexports.fromOption = /*#__PURE__*/FromEither_1.fromOption(exports.FromEither);\n/**\n * @category combinators\n * @since 2.10.0\n */\n\nexports.fromOptionK = /*#__PURE__*/FromEither_1.fromOptionK(exports.FromEither);\n/**\n * @category combinators\n * @since 2.10.0\n */\n\nexports.chainOptionK = /*#__PURE__*/FromEither_1.chainOptionK(exports.FromEither, exports.Chain);\n/**\n * @category combinators\n * @since 2.4.0\n */\n\nexports.chainEitherK = /*#__PURE__*/FromEither_1.chainEitherK(exports.FromEither, exports.Chain);\n/**\n * Less strict version of [`chainEitherK`](#chaineitherk).\n *\n * @category combinators\n * @since 2.6.1\n */\n\nexports.chainEitherKW = exports.chainEitherK;\n/**\n * @category constructors\n * @since 2.0.0\n */\n\nexports.fromPredicate = /*#__PURE__*/FromEither_1.fromPredicate(exports.FromEither);\n/**\n * @category combinators\n * @since 2.0.0\n */\n\nexports.filterOrElse = /*#__PURE__*/FromEither_1.filterOrElse(exports.FromEither, exports.Chain);\n/**\n * Less strict version of [`filterOrElse`](#filterorelse).\n *\n * @category combinators\n * @since 2.9.0\n */\n\nexports.filterOrElseW = exports.filterOrElse;\n/**\n * @category combinators\n * @since 2.4.0\n */\n\nexports.fromEitherK = /*#__PURE__*/FromEither_1.fromEitherK(exports.FromEither);\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.FromIO = {\n URI: exports.URI,\n fromIO: exports.fromIO\n};\n/**\n * @category combinators\n * @since 2.10.0\n */\n\nexports.fromIOK = /*#__PURE__*/FromIO_1.fromIOK(exports.FromIO);\n/**\n * @category combinators\n * @since 2.10.0\n */\n\nexports.chainIOK = /*#__PURE__*/FromIO_1.chainIOK(exports.FromIO, exports.Chain);\n/**\n * @category combinators\n * @since 2.10.0\n */\n\nexports.chainFirstIOK = /*#__PURE__*/FromIO_1.chainFirstIOK(exports.FromIO, exports.Chain);\n/**\n * @category instances\n * @since 2.10.0\n */\n\nexports.FromTask = {\n URI: exports.URI,\n fromIO: exports.fromIO,\n fromTask: exports.fromTask\n};\n/**\n * @category combinators\n * @since 2.10.0\n */\n\nexports.fromTaskK = /*#__PURE__*/FromTask_1.fromTaskK(exports.FromTask);\n/**\n * @category combinators\n * @since 2.10.0\n */\n\nexports.chainTaskK = /*#__PURE__*/FromTask_1.chainTaskK(exports.FromTask, exports.Chain);\n/**\n * @category combinators\n * @since 2.10.0\n */\n\nexports.chainFirstTaskK = /*#__PURE__*/FromTask_1.chainFirstTaskK(exports.FromTask, exports.Chain);\n\nfunction taskify(f) {\n return function () {\n var args = Array.prototype.slice.call(arguments);\n return function () {\n return new Promise(function (resolve) {\n var cbResolver = function cbResolver(e, r) {\n return e != null ? resolve(E.left(e)) : resolve(E.right(r));\n };\n\n f.apply(null, args.concat(cbResolver));\n });\n };\n };\n}\n\nexports.taskify = taskify;\n/**\n * Make sure that a resource is cleaned up in the event of an exception (\\*). The release action is called regardless of\n * whether the body action throws (\\*) or returns.\n *\n * (\\*) i.e. returns a `Left`\n *\n * @since 2.0.0\n */\n\nvar bracket = function bracket(acquire, use, release) {\n return function_1.pipe(acquire, exports.chain(function (a) {\n return function_1.pipe(use(a), T.chain(function (e) {\n return function_1.pipe(release(a, e), exports.chain(function () {\n return T.of(e);\n }));\n }));\n }));\n};\n\nexports.bracket = bracket; // -------------------------------------------------------------------------------------\n// do notation\n// -------------------------------------------------------------------------------------\n\n/**\n * @since 2.9.0\n */\n\nexports.Do = /*#__PURE__*/exports.of({});\n/**\n * @since 2.8.0\n */\n\nexports.bindTo = /*#__PURE__*/Functor_1.bindTo(exports.Functor);\n/**\n * @since 2.8.0\n */\n\nexports.bind = /*#__PURE__*/Chain_1.bind(exports.Chain);\n/**\n * @since 2.8.0\n */\n\nexports.bindW = exports.bind; // -------------------------------------------------------------------------------------\n// pipeable sequence S\n// -------------------------------------------------------------------------------------\n\n/**\n * @since 2.8.0\n */\n\nexports.apS = /*#__PURE__*/Apply_1.apS(exports.ApplyPar);\n/**\n * @since 2.8.0\n */\n\nexports.apSW = exports.apS; // -------------------------------------------------------------------------------------\n// array utils\n// -------------------------------------------------------------------------------------\n\n/**\n * Equivalent to `ReadonlyArray#traverseWithIndex(ApplicativePar)`.\n *\n * @since 2.9.0\n */\n\nvar traverseArrayWithIndex = function traverseArrayWithIndex(f) {\n return function_1.flow(T.traverseArrayWithIndex(f), T.map(E.sequenceArray));\n};\n\nexports.traverseArrayWithIndex = traverseArrayWithIndex;\n/**\n * Equivalent to `ReadonlyArray#traverse(ApplicativePar)`.\n *\n * @since 2.9.0\n */\n\nvar traverseArray = function traverseArray(f) {\n return exports.traverseArrayWithIndex(function (_, a) {\n return f(a);\n });\n};\n\nexports.traverseArray = traverseArray;\n/**\n * Equivalent to `ReadonlyArray#sequence(ApplicativePar)`.\n *\n * @since 2.9.0\n */\n\nexports.sequenceArray = /*#__PURE__*/exports.traverseArray(function_1.identity);\n/**\n * Equivalent to `ReadonlyArray#traverseWithIndex(ApplicativeSeq)`.\n *\n * @since 2.9.0\n */\n\nvar traverseSeqArrayWithIndex = function traverseSeqArrayWithIndex(f) {\n return function (as) {\n return function () {\n return as.reduce(function (acc, a, i) {\n return acc.then(function (ebs) {\n return E.isLeft(ebs) ? acc : f(i, a)().then(function (eb) {\n if (E.isLeft(eb)) {\n return eb;\n }\n\n ebs.right.push(eb.right);\n return ebs;\n });\n });\n }, Promise.resolve(E.right([])));\n };\n };\n};\n\nexports.traverseSeqArrayWithIndex = traverseSeqArrayWithIndex;\n/**\n * Equivalent to `ReadonlyArray#traverse(ApplicativeSeq)`.\n *\n * @since 2.9.0\n */\n\nvar traverseSeqArray = function traverseSeqArray(f) {\n return exports.traverseSeqArrayWithIndex(function (_, a) {\n return f(a);\n });\n};\n\nexports.traverseSeqArray = traverseSeqArray;\n/**\n * Equivalent to `ReadonlyArray#sequence(ApplicativeSeq)`.\n *\n * @since 2.9.0\n */\n\nexports.sequenceSeqArray = /*#__PURE__*/exports.traverseSeqArray(function_1.identity); // -------------------------------------------------------------------------------------\n// deprecated\n// -------------------------------------------------------------------------------------\n// tslint:disable: deprecation\n\n/**\n * Use small, specific instances instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.taskEither = {\n URI: exports.URI,\n bimap: _bimap,\n mapLeft: _mapLeft,\n map: _map,\n of: exports.of,\n ap: _apPar,\n chain: _chain,\n alt: _alt,\n fromIO: exports.fromIO,\n fromTask: exports.fromTask,\n throwError: exports.throwError\n};\n/**\n * Use small, specific instances instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.taskEitherSeq = {\n URI: exports.URI,\n bimap: _bimap,\n mapLeft: _mapLeft,\n map: _map,\n of: exports.of,\n ap: _apSeq,\n chain: _chain,\n alt: _alt,\n fromIO: exports.fromIO,\n fromTask: exports.fromTask,\n throwError: exports.throwError\n};\n/**\n * Use [`getApplySemigroup`](./Apply.ts.html#getApplySemigroup) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getApplySemigroup = /*#__PURE__*/Apply_1.getApplySemigroup(exports.ApplySeq);\n/**\n * Use [`getApplicativeMonoid`](./Applicative.ts.html#getApplicativeMonoid) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nexports.getApplyMonoid = /*#__PURE__*/Applicative_1.getApplicativeMonoid(exports.ApplicativeSeq);\n/**\n * Use [`getApplySemigroup`](./Apply.ts.html#getApplySemigroup) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nvar getSemigroup = function getSemigroup(S) {\n return Apply_1.getApplySemigroup(T.ApplySeq)(E.getSemigroup(S));\n};\n\nexports.getSemigroup = getSemigroup;\n/**\n * Use [`getApplicativeTaskValidation`](#getapplicativetaskvalidation) and [`getAltTaskValidation`](#getalttaskvalidation) instead.\n *\n * @category instances\n * @since 2.0.0\n * @deprecated\n */\n\nfunction getTaskValidation(SE) {\n var applicativeTaskValidation = getApplicativeTaskValidation(T.ApplicativePar, SE);\n var altTaskValidation = getAltTaskValidation(SE);\n return {\n URI: exports.URI,\n _E: undefined,\n map: _map,\n ap: applicativeTaskValidation.ap,\n of: exports.of,\n chain: _chain,\n bimap: _bimap,\n mapLeft: _mapLeft,\n alt: altTaskValidation.alt,\n fromIO: exports.fromIO,\n fromTask: exports.fromTask,\n throwError: exports.throwError\n };\n}\n\nexports.getTaskValidation = getTaskValidation;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.hole = exports.pipe = exports.untupled = exports.tupled = exports.absurd = exports.decrement = exports.increment = exports.tuple = exports.flow = exports.flip = exports.constVoid = exports.constUndefined = exports.constNull = exports.constFalse = exports.constTrue = exports.constant = exports.not = exports.unsafeCoerce = exports.identity = exports.getEndomorphismMonoid = exports.getRing = exports.getSemiring = exports.getMonoid = exports.getSemigroup = exports.getBooleanAlgebra = void 0; // -------------------------------------------------------------------------------------\n// instances\n// -------------------------------------------------------------------------------------\n\n/**\n * @category instances\n * @since 2.10.0\n */\n\nvar getBooleanAlgebra = function getBooleanAlgebra(B) {\n return function () {\n return {\n meet: function meet(x, y) {\n return function (a) {\n return B.meet(x(a), y(a));\n };\n },\n join: function join(x, y) {\n return function (a) {\n return B.join(x(a), y(a));\n };\n },\n zero: function zero() {\n return B.zero;\n },\n one: function one() {\n return B.one;\n },\n implies: function implies(x, y) {\n return function (a) {\n return B.implies(x(a), y(a));\n };\n },\n not: function not(x) {\n return function (a) {\n return B.not(x(a));\n };\n }\n };\n };\n};\n\nexports.getBooleanAlgebra = getBooleanAlgebra;\n/**\n * Unary functions form a semigroup as long as you can provide a semigroup for the codomain.\n *\n * @example\n * import { Predicate, getSemigroup } from 'fp-ts/function'\n * import * as B from 'fp-ts/boolean'\n *\n * const f: Predicate = (n) => n <= 2\n * const g: Predicate = (n) => n >= 0\n *\n * const S1 = getSemigroup(B.SemigroupAll)()\n *\n * assert.deepStrictEqual(S1.concat(f, g)(1), true)\n * assert.deepStrictEqual(S1.concat(f, g)(3), false)\n *\n * const S2 = getSemigroup(B.SemigroupAny)()\n *\n * assert.deepStrictEqual(S2.concat(f, g)(1), true)\n * assert.deepStrictEqual(S2.concat(f, g)(3), true)\n *\n * @category instances\n * @since 2.10.0\n */\n\nvar getSemigroup = function getSemigroup(S) {\n return function () {\n return {\n concat: function concat(f, g) {\n return function (a) {\n return S.concat(f(a), g(a));\n };\n }\n };\n };\n};\n\nexports.getSemigroup = getSemigroup;\n/**\n * Unary functions form a monoid as long as you can provide a monoid for the codomain.\n *\n * @example\n * import { Predicate, getMonoid } from 'fp-ts/function'\n * import * as B from 'fp-ts/boolean'\n *\n * const f: Predicate = (n) => n <= 2\n * const g: Predicate = (n) => n >= 0\n *\n * const M1 = getMonoid(B.MonoidAll)()\n *\n * assert.deepStrictEqual(M1.concat(f, g)(1), true)\n * assert.deepStrictEqual(M1.concat(f, g)(3), false)\n *\n * const M2 = getMonoid(B.MonoidAny)()\n *\n * assert.deepStrictEqual(M2.concat(f, g)(1), true)\n * assert.deepStrictEqual(M2.concat(f, g)(3), true)\n *\n * @category instances\n * @since 2.10.0\n */\n\nvar getMonoid = function getMonoid(M) {\n var getSemigroupM = exports.getSemigroup(M);\n return function () {\n return {\n concat: getSemigroupM().concat,\n empty: function empty() {\n return M.empty;\n }\n };\n };\n};\n\nexports.getMonoid = getMonoid;\n/**\n * @category instances\n * @since 2.10.0\n */\n\nvar getSemiring = function getSemiring(S) {\n return {\n add: function add(f, g) {\n return function (x) {\n return S.add(f(x), g(x));\n };\n },\n zero: function zero() {\n return S.zero;\n },\n mul: function mul(f, g) {\n return function (x) {\n return S.mul(f(x), g(x));\n };\n },\n one: function one() {\n return S.one;\n }\n };\n};\n\nexports.getSemiring = getSemiring;\n/**\n * @category instances\n * @since 2.10.0\n */\n\nvar getRing = function getRing(R) {\n var S = exports.getSemiring(R);\n return {\n add: S.add,\n mul: S.mul,\n one: S.one,\n zero: S.zero,\n sub: function sub(f, g) {\n return function (x) {\n return R.sub(f(x), g(x));\n };\n }\n };\n};\n\nexports.getRing = getRing;\n/**\n * Endomorphism form a monoid where the `empty` value is the identity function.\n *\n * @category instances\n * @since 2.10.0\n */\n\nvar getEndomorphismMonoid = function getEndomorphismMonoid() {\n return {\n concat: function concat(x, y) {\n return function (a) {\n return y(x(a));\n };\n },\n empty: identity\n };\n};\n\nexports.getEndomorphismMonoid = getEndomorphismMonoid;\n/**\n * @since 2.0.0\n */\n\nfunction identity(a) {\n return a;\n}\n\nexports.identity = identity;\n/**\n * @since 2.0.0\n */\n\nexports.unsafeCoerce = identity;\n/**\n * @since 2.0.0\n */\n\nfunction not(predicate) {\n return function (a) {\n return !predicate(a);\n };\n}\n\nexports.not = not;\n/**\n * @since 2.0.0\n */\n\nfunction constant(a) {\n return function () {\n return a;\n };\n}\n\nexports.constant = constant;\n/**\n * A thunk that returns always `true`.\n *\n * @since 2.0.0\n */\n\nexports.constTrue = /*#__PURE__*/constant(true);\n/**\n * A thunk that returns always `false`.\n *\n * @since 2.0.0\n */\n\nexports.constFalse = /*#__PURE__*/constant(false);\n/**\n * A thunk that returns always `null`.\n *\n * @since 2.0.0\n */\n\nexports.constNull = /*#__PURE__*/constant(null);\n/**\n * A thunk that returns always `undefined`.\n *\n * @since 2.0.0\n */\n\nexports.constUndefined = /*#__PURE__*/constant(undefined);\n/**\n * A thunk that returns always `void`.\n *\n * @since 2.0.0\n */\n\nexports.constVoid = exports.constUndefined;\n/**\n * Flips the order of the arguments of a function of two arguments.\n *\n * @since 2.0.0\n */\n\nfunction flip(f) {\n return function (b, a) {\n return f(a, b);\n };\n}\n\nexports.flip = flip;\n\nfunction flow(ab, bc, cd, de, ef, fg, gh, hi, ij) {\n switch (arguments.length) {\n case 1:\n return ab;\n\n case 2:\n return function () {\n return bc(ab.apply(this, arguments));\n };\n\n case 3:\n return function () {\n return cd(bc(ab.apply(this, arguments)));\n };\n\n case 4:\n return function () {\n return de(cd(bc(ab.apply(this, arguments))));\n };\n\n case 5:\n return function () {\n return ef(de(cd(bc(ab.apply(this, arguments)))));\n };\n\n case 6:\n return function () {\n return fg(ef(de(cd(bc(ab.apply(this, arguments))))));\n };\n\n case 7:\n return function () {\n return gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))));\n };\n\n case 8:\n return function () {\n return hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments))))))));\n };\n\n case 9:\n return function () {\n return ij(hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))))));\n };\n }\n\n return;\n}\n\nexports.flow = flow;\n/**\n * @since 2.0.0\n */\n\nfunction tuple() {\n var t = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n t[_i] = arguments[_i];\n }\n\n return t;\n}\n\nexports.tuple = tuple;\n/**\n * @since 2.0.0\n */\n\nfunction increment(n) {\n return n + 1;\n}\n\nexports.increment = increment;\n/**\n * @since 2.0.0\n */\n\nfunction decrement(n) {\n return n - 1;\n}\n\nexports.decrement = decrement;\n/**\n * @since 2.0.0\n */\n\nfunction absurd(_) {\n throw new Error('Called `absurd` function which should be uncallable');\n}\n\nexports.absurd = absurd;\n/**\n * Creates a tupled version of this function: instead of `n` arguments, it accepts a single tuple argument.\n *\n * @example\n * import { tupled } from 'fp-ts/function'\n *\n * const add = tupled((x: number, y: number): number => x + y)\n *\n * assert.strictEqual(add([1, 2]), 3)\n *\n * @since 2.4.0\n */\n\nfunction tupled(f) {\n return function (a) {\n return f.apply(void 0, a);\n };\n}\n\nexports.tupled = tupled;\n/**\n * Inverse function of `tupled`\n *\n * @since 2.4.0\n */\n\nfunction untupled(f) {\n return function () {\n var a = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n a[_i] = arguments[_i];\n }\n\n return f(a);\n };\n}\n\nexports.untupled = untupled;\n\nfunction pipe(a, ab, bc, cd, de, ef, fg, gh, hi, ij, jk, kl, lm, mn, no, op, pq, qr, rs, st) {\n switch (arguments.length) {\n case 1:\n return a;\n\n case 2:\n return ab(a);\n\n case 3:\n return bc(ab(a));\n\n case 4:\n return cd(bc(ab(a)));\n\n case 5:\n return de(cd(bc(ab(a))));\n\n case 6:\n return ef(de(cd(bc(ab(a)))));\n\n case 7:\n return fg(ef(de(cd(bc(ab(a))))));\n\n case 8:\n return gh(fg(ef(de(cd(bc(ab(a)))))));\n\n case 9:\n return hi(gh(fg(ef(de(cd(bc(ab(a))))))));\n\n case 10:\n return ij(hi(gh(fg(ef(de(cd(bc(ab(a)))))))));\n\n case 11:\n return jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a))))))))));\n\n case 12:\n return kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a)))))))))));\n\n case 13:\n return lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a))))))))))));\n\n case 14:\n return mn(lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a)))))))))))));\n\n case 15:\n return no(mn(lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a))))))))))))));\n\n case 16:\n return op(no(mn(lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a)))))))))))))));\n\n case 17:\n return pq(op(no(mn(lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a))))))))))))))));\n\n case 18:\n return qr(pq(op(no(mn(lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a)))))))))))))))));\n\n case 19:\n return rs(qr(pq(op(no(mn(lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a))))))))))))))))));\n\n case 20:\n return st(rs(qr(pq(op(no(mn(lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a)))))))))))))))))));\n }\n\n return;\n}\n\nexports.pipe = pipe;\n/**\n * Type hole simulation\n *\n * @since 2.7.0\n */\n\nexports.hole = absurd;","\"use strict\";\n\nvar __spreadArray = this && this.__spreadArray || function (to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) {\n to[j] = from[i];\n }\n\n return to;\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.fromReadonlyNonEmptyArray = exports.has = exports.isLeft = exports.isSome = void 0; // -------------------------------------------------------------------------------------\n// Option\n// -------------------------------------------------------------------------------------\n\n/** @internal */\n\nvar isSome = function isSome(fa) {\n return fa._tag === 'Some';\n};\n\nexports.isSome = isSome; // -------------------------------------------------------------------------------------\n// Either\n// -------------------------------------------------------------------------------------\n\n/** @internal */\n\nvar isLeft = function isLeft(ma) {\n return ma._tag === 'Left';\n};\n\nexports.isLeft = isLeft; // -------------------------------------------------------------------------------------\n// Record\n// -------------------------------------------------------------------------------------\n\n/** @internal */\n\nexports.has = Object.prototype.hasOwnProperty; // -------------------------------------------------------------------------------------\n// NonEmptyArray\n// -------------------------------------------------------------------------------------\n\n/** @internal */\n\nvar fromReadonlyNonEmptyArray = function fromReadonlyNonEmptyArray(as) {\n return __spreadArray([as[0]], as.slice(1));\n};\n\nexports.fromReadonlyNonEmptyArray = fromReadonlyNonEmptyArray;","\"use strict\";\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nvar __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n});\n\nvar __importStar = this && this.__importStar || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n }\n\n __setModuleDefault(result, mod);\n\n return result;\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.MonoidProduct = exports.MonoidSum = exports.SemigroupProduct = exports.SemigroupSum = exports.Show = exports.Field = exports.Bounded = exports.Ord = exports.Eq = void 0;\n/**\n * @since 2.10.0\n */\n\nvar B = __importStar(require(\"./Bounded\"));\n\nvar E = __importStar(require(\"./Eq\"));\n\nvar F = __importStar(require(\"./Field\"));\n\nvar O = __importStar(require(\"./Ord\"));\n\nvar S = __importStar(require(\"./Show\"));\n\nvar Semigroup_1 = require(\"./Semigroup\");\n\nvar Monoid_1 = require(\"./Monoid\");\n/**\n * @category instances\n * @since 2.10.0\n */\n// tslint:disable-next-line: deprecation\n\n\nexports.Eq = E.eqNumber;\n/**\n * @category instances\n * @since 2.10.0\n */\n// tslint:disable-next-line: deprecation\n\nexports.Ord = O.ordNumber;\n/**\n * @category instances\n * @since 2.10.0\n */\n// tslint:disable-next-line: deprecation\n\nexports.Bounded = B.boundedNumber;\n/**\n * @category instances\n * @since 2.10.0\n */\n// tslint:disable-next-line: deprecation\n\nexports.Field = F.fieldNumber;\n/**\n * @category instances\n * @since 2.10.0\n */\n// tslint:disable-next-line: deprecation\n\nexports.Show = S.showNumber;\n/**\n * `number` semigroup under addition.\n *\n * @example\n * import { SemigroupSum } from 'fp-ts/number'\n *\n * assert.deepStrictEqual(SemigroupSum.concat(2, 3), 5)\n *\n * @category instances\n * @since 2.10.0\n */\n// tslint:disable-next-line: deprecation\n\nexports.SemigroupSum = Semigroup_1.semigroupSum;\n/**\n * `number` semigroup under multiplication.\n *\n * @example\n * import { SemigroupProduct } from 'fp-ts/number'\n *\n * assert.deepStrictEqual(SemigroupProduct.concat(2, 3), 6)\n *\n * @category instances\n * @since 2.10.0\n */\n// tslint:disable-next-line: deprecation\n\nexports.SemigroupProduct = Semigroup_1.semigroupProduct;\n/**\n * `number` monoid under addition.\n *\n * The `empty` value is `0`.\n *\n * @example\n * import { MonoidSum } from 'fp-ts/number'\n *\n * assert.deepStrictEqual(MonoidSum.concat(2, MonoidSum.empty), 2)\n *\n * @category instances\n * @since 2.10.0\n */\n// tslint:disable-next-line: deprecation\n\nexports.MonoidSum = Monoid_1.monoidSum;\n/**\n * `number` monoid under multiplication.\n *\n * The `empty` value is `1`.\n *\n * @example\n * import { MonoidProduct } from 'fp-ts/number'\n *\n * assert.deepStrictEqual(MonoidProduct.concat(2, MonoidProduct.empty), 2)\n *\n * @category instances\n * @since 2.10.0\n */\n// tslint:disable-next-line: deprecation\n\nexports.MonoidProduct = Monoid_1.monoidProduct;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.pipe = exports.pipeable = void 0;\n\nvar function_1 = require(\"./function\");\n\nvar isFunctor = function isFunctor(I) {\n return typeof I.map === 'function';\n};\n\nvar isContravariant = function isContravariant(I) {\n return typeof I.contramap === 'function';\n};\n\nvar isFunctorWithIndex = function isFunctorWithIndex(I) {\n return typeof I.mapWithIndex === 'function';\n};\n\nvar isApply = function isApply(I) {\n return typeof I.ap === 'function';\n};\n\nvar isChain = function isChain(I) {\n return typeof I.chain === 'function';\n};\n\nvar isBifunctor = function isBifunctor(I) {\n return typeof I.bimap === 'function';\n};\n\nvar isExtend = function isExtend(I) {\n return typeof I.extend === 'function';\n};\n\nvar isFoldable = function isFoldable(I) {\n return typeof I.reduce === 'function';\n};\n\nvar isFoldableWithIndex = function isFoldableWithIndex(I) {\n return typeof I.reduceWithIndex === 'function';\n};\n\nvar isAlt = function isAlt(I) {\n return typeof I.alt === 'function';\n};\n\nvar isCompactable = function isCompactable(I) {\n return typeof I.compact === 'function';\n};\n\nvar isFilterable = function isFilterable(I) {\n return typeof I.filter === 'function';\n};\n\nvar isFilterableWithIndex = function isFilterableWithIndex(I) {\n return typeof I.filterWithIndex === 'function';\n};\n\nvar isProfunctor = function isProfunctor(I) {\n return typeof I.promap === 'function';\n};\n\nvar isSemigroupoid = function isSemigroupoid(I) {\n return typeof I.compose === 'function';\n};\n\nvar isMonadThrow = function isMonadThrow(I) {\n return typeof I.throwError === 'function';\n};\n/** @deprecated */\n\n\nfunction pipeable(I) {\n var r = {};\n\n if (isFunctor(I)) {\n var map = function map(f) {\n return function (fa) {\n return I.map(fa, f);\n };\n };\n\n r.map = map;\n }\n\n if (isContravariant(I)) {\n var contramap = function contramap(f) {\n return function (fa) {\n return I.contramap(fa, f);\n };\n };\n\n r.contramap = contramap;\n }\n\n if (isFunctorWithIndex(I)) {\n var mapWithIndex = function mapWithIndex(f) {\n return function (fa) {\n return I.mapWithIndex(fa, f);\n };\n };\n\n r.mapWithIndex = mapWithIndex;\n }\n\n if (isApply(I)) {\n var ap = function ap(fa) {\n return function (fab) {\n return I.ap(fab, fa);\n };\n };\n\n var apFirst = function apFirst(fb) {\n return function (fa) {\n return I.ap(I.map(fa, function (a) {\n return function () {\n return a;\n };\n }), fb);\n };\n };\n\n r.ap = ap;\n r.apFirst = apFirst;\n\n r.apSecond = function (fb) {\n return function (fa) {\n return I.ap(I.map(fa, function () {\n return function (b) {\n return b;\n };\n }), fb);\n };\n };\n }\n\n if (isChain(I)) {\n var chain = function chain(f) {\n return function (ma) {\n return I.chain(ma, f);\n };\n };\n\n var chainFirst = function chainFirst(f) {\n return function (ma) {\n return I.chain(ma, function (a) {\n return I.map(f(a), function () {\n return a;\n });\n });\n };\n };\n\n var flatten = function flatten(mma) {\n return I.chain(mma, function_1.identity);\n };\n\n r.chain = chain;\n r.chainFirst = chainFirst;\n r.flatten = flatten;\n }\n\n if (isBifunctor(I)) {\n var bimap = function bimap(f, g) {\n return function (fa) {\n return I.bimap(fa, f, g);\n };\n };\n\n var mapLeft = function mapLeft(f) {\n return function (fa) {\n return I.mapLeft(fa, f);\n };\n };\n\n r.bimap = bimap;\n r.mapLeft = mapLeft;\n }\n\n if (isExtend(I)) {\n var extend = function extend(f) {\n return function (wa) {\n return I.extend(wa, f);\n };\n };\n\n var duplicate = function duplicate(wa) {\n return I.extend(wa, function_1.identity);\n };\n\n r.extend = extend;\n r.duplicate = duplicate;\n }\n\n if (isFoldable(I)) {\n var reduce = function reduce(b, f) {\n return function (fa) {\n return I.reduce(fa, b, f);\n };\n };\n\n var foldMap = function foldMap(M) {\n var foldMapM = I.foldMap(M);\n return function (f) {\n return function (fa) {\n return foldMapM(fa, f);\n };\n };\n };\n\n var reduceRight = function reduceRight(b, f) {\n return function (fa) {\n return I.reduceRight(fa, b, f);\n };\n };\n\n r.reduce = reduce;\n r.foldMap = foldMap;\n r.reduceRight = reduceRight;\n }\n\n if (isFoldableWithIndex(I)) {\n var reduceWithIndex = function reduceWithIndex(b, f) {\n return function (fa) {\n return I.reduceWithIndex(fa, b, f);\n };\n };\n\n var foldMapWithIndex = function foldMapWithIndex(M) {\n var foldMapM = I.foldMapWithIndex(M);\n return function (f) {\n return function (fa) {\n return foldMapM(fa, f);\n };\n };\n };\n\n var reduceRightWithIndex = function reduceRightWithIndex(b, f) {\n return function (fa) {\n return I.reduceRightWithIndex(fa, b, f);\n };\n };\n\n r.reduceWithIndex = reduceWithIndex;\n r.foldMapWithIndex = foldMapWithIndex;\n r.reduceRightWithIndex = reduceRightWithIndex;\n }\n\n if (isAlt(I)) {\n var alt = function alt(that) {\n return function (fa) {\n return I.alt(fa, that);\n };\n };\n\n r.alt = alt;\n }\n\n if (isCompactable(I)) {\n r.compact = I.compact;\n r.separate = I.separate;\n }\n\n if (isFilterable(I)) {\n var filter = function filter(predicate) {\n return function (fa) {\n return I.filter(fa, predicate);\n };\n };\n\n var filterMap = function filterMap(f) {\n return function (fa) {\n return I.filterMap(fa, f);\n };\n };\n\n var partition = function partition(predicate) {\n return function (fa) {\n return I.partition(fa, predicate);\n };\n };\n\n var partitionMap = function partitionMap(f) {\n return function (fa) {\n return I.partitionMap(fa, f);\n };\n };\n\n r.filter = filter;\n r.filterMap = filterMap;\n r.partition = partition;\n r.partitionMap = partitionMap;\n }\n\n if (isFilterableWithIndex(I)) {\n var filterWithIndex = function filterWithIndex(predicateWithIndex) {\n return function (fa) {\n return I.filterWithIndex(fa, predicateWithIndex);\n };\n };\n\n var filterMapWithIndex = function filterMapWithIndex(f) {\n return function (fa) {\n return I.filterMapWithIndex(fa, f);\n };\n };\n\n var partitionWithIndex = function partitionWithIndex(predicateWithIndex) {\n return function (fa) {\n return I.partitionWithIndex(fa, predicateWithIndex);\n };\n };\n\n var partitionMapWithIndex = function partitionMapWithIndex(f) {\n return function (fa) {\n return I.partitionMapWithIndex(fa, f);\n };\n };\n\n r.filterWithIndex = filterWithIndex;\n r.filterMapWithIndex = filterMapWithIndex;\n r.partitionWithIndex = partitionWithIndex;\n r.partitionMapWithIndex = partitionMapWithIndex;\n }\n\n if (isProfunctor(I)) {\n var promap = function promap(f, g) {\n return function (fa) {\n return I.promap(fa, f, g);\n };\n };\n\n r.promap = promap;\n }\n\n if (isSemigroupoid(I)) {\n var compose = function compose(that) {\n return function (fa) {\n return I.compose(fa, that);\n };\n };\n\n r.compose = compose;\n }\n\n if (isMonadThrow(I)) {\n var fromOption = function fromOption(onNone) {\n return function (ma) {\n return ma._tag === 'None' ? I.throwError(onNone()) : I.of(ma.value);\n };\n };\n\n var fromEither = function fromEither(ma) {\n return ma._tag === 'Left' ? I.throwError(ma.left) : I.of(ma.right);\n };\n\n var fromPredicate = function fromPredicate(predicate, onFalse) {\n return function (a) {\n return predicate(a) ? I.of(a) : I.throwError(onFalse(a));\n };\n };\n\n var filterOrElse = function filterOrElse(predicate, onFalse) {\n return function (ma) {\n return I.chain(ma, function (a) {\n return predicate(a) ? I.of(a) : I.throwError(onFalse(a));\n });\n };\n };\n\n r.fromOption = fromOption;\n r.fromEither = fromEither;\n r.fromPredicate = fromPredicate;\n r.filterOrElse = filterOrElse;\n }\n\n return r;\n}\n\nexports.pipeable = pipeable;\n/**\n * Use [`pipe`](https://gcanti.github.io/fp-ts/modules/function.ts.html#flow) from `function` module instead.\n *\n * @since 2.0.0\n * @deprecated\n */\n\nexports.pipe = function_1.pipe;","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\n\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n\n return result;\n}\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n\n\nfunction overArg(func, transform) {\n return function (arg) {\n return func(transform(arg));\n };\n}\n/** Used for built-in method references. */\n\n\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n/** Used to resolve the decompiled source of functions. */\n\nvar funcToString = funcProto.toString;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/** Used to infer the `Object` constructor. */\n\nvar objectCtorString = funcToString.call(Object);\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n\nvar objectToString = objectProto.toString;\n/** Built-in value references. */\n\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n\n\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || objectToString.call(value) != objectTag || isHostObject(value)) {\n return false;\n }\n\n var proto = getPrototype(value);\n\n if (proto === null) {\n return true;\n }\n\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991;\n/** `Object#toString` result references. */\n\nvar argsTag = '[object Arguments]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n/** Detect free variable `global` from Node.js. */\n\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n/** Detect free variable `self`. */\n\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n/** Used as a reference to the global object. */\n\nvar root = freeGlobal || freeSelf || Function('return this')();\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\n\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0:\n return func.call(thisArg);\n\n case 1:\n return func.call(thisArg, args[0]);\n\n case 2:\n return func.call(thisArg, args[0], args[1]);\n\n case 3:\n return func.call(thisArg, args[0], args[1], args[2]);\n }\n\n return func.apply(thisArg, args);\n}\n/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n\n\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array ? array.length : 0,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n\n return result;\n}\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\n\n\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n\n return array;\n}\n/** Used for built-in method references. */\n\n\nvar objectProto = Object.prototype;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n\nvar objectToString = objectProto.toString;\n/** Built-in value references. */\n\nvar Symbol = root.Symbol,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n/* Built-in method references for those with the same name as other `lodash` methods. */\n\nvar nativeMax = Math.max;\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\n\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n\n return result;\n}\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} props The property identifiers to pick.\n * @returns {Object} Returns the new object.\n */\n\n\nfunction basePick(object, props) {\n object = Object(object);\n return basePickBy(object, props, function (value, key) {\n return key in object;\n });\n}\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} props The property identifiers to pick from.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\n\n\nfunction basePickBy(object, props, predicate) {\n var index = -1,\n length = props.length,\n result = {};\n\n while (++index < length) {\n var key = props[index],\n value = object[key];\n\n if (predicate(value, key)) {\n result[key] = value;\n }\n }\n\n return result;\n}\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n\n\nfunction baseRest(func, start) {\n start = nativeMax(start === undefined ? func.length - 1 : start, 0);\n return function () {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n\n index = -1;\n var otherArgs = Array(start + 1);\n\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n\n otherArgs[start] = array;\n return apply(func, this, otherArgs);\n };\n}\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\n\n\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n\n\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n\n var result = value + '';\n return result == '0' && 1 / value == -INFINITY ? '-0' : result;\n}\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n\n\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n\n\nvar isArray = Array.isArray;\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n\n\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n\n\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n\n\nfunction isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n\n\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n\n\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n\n\nfunction isSymbol(value) {\n return typeof value == 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag;\n}\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [props] The property identifiers to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n\n\nvar pick = baseRest(function (object, props) {\n return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey));\n});\nmodule.exports = pick;","\"use strict\"; // ref: https://github.com/tc39/proposal-global\n\nvar getGlobal = function getGlobal() {\n // the only reliable means to get the global object is\n // `Function('return this')()`\n // However, this causes CSP violations in Chrome apps.\n if (typeof self !== 'undefined') {\n return self;\n }\n\n if (typeof window !== 'undefined') {\n return window;\n }\n\n if (typeof global !== 'undefined') {\n return global;\n }\n\n throw new Error('unable to locate global object');\n};\n\nvar global = getGlobal();\nmodule.exports = exports = global.fetch; // Needed for TypeScript and Webpack.\n\nif (global.fetch) {\n exports.default = global.fetch.bind(global);\n}\n\nexports.Headers = global.Headers;\nexports.Request = global.Request;\nexports.Response = global.Response;","!function (e, t) {\n \"object\" == typeof exports && \"object\" == typeof module ? module.exports = t() : \"function\" == typeof define && define.amd ? define(\"PrismicDOM\", [], t) : \"object\" == typeof exports ? exports.PrismicDOM = t() : e.PrismicDOM = t();\n}(\"undefined\" != typeof self ? self : this, function () {\n return function (e) {\n var t = {};\n\n function n(r) {\n if (t[r]) return t[r].exports;\n var o = t[r] = {\n i: r,\n l: !1,\n exports: {}\n };\n return e[r].call(o.exports, o, o.exports, n), o.l = !0, o.exports;\n }\n\n return n.m = e, n.c = t, n.d = function (e, t, r) {\n n.o(e, t) || Object.defineProperty(e, t, {\n enumerable: !0,\n get: r\n });\n }, n.r = function (e) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {\n value: \"Module\"\n }), Object.defineProperty(e, \"__esModule\", {\n value: !0\n });\n }, n.t = function (e, t) {\n if (1 & t && (e = n(e)), 8 & t) return e;\n if (4 & t && \"object\" == typeof e && e && e.__esModule) return e;\n var r = Object.create(null);\n if (n.r(r), Object.defineProperty(r, \"default\", {\n enumerable: !0,\n value: e\n }), 2 & t && \"string\" != typeof e) for (var o in e) {\n n.d(r, o, function (t) {\n return e[t];\n }.bind(null, o));\n }\n return r;\n }, n.n = function (e) {\n var t = e && e.__esModule ? function () {\n return e.default;\n } : function () {\n return e;\n };\n return n.d(t, \"a\", t), t;\n }, n.o = function (e, t) {\n return Object.prototype.hasOwnProperty.call(e, t);\n }, n.p = \"\", n(n.s = 1);\n }([function (e, t, n) {\n \"undefined\" != typeof self && self, e.exports = function (e) {\n var t = {};\n\n function n(r) {\n if (t[r]) return t[r].exports;\n var o = t[r] = {\n i: r,\n l: !1,\n exports: {}\n };\n return e[r].call(o.exports, o, o.exports, n), o.l = !0, o.exports;\n }\n\n return n.m = e, n.c = t, n.d = function (e, t, r) {\n n.o(e, t) || Object.defineProperty(e, t, {\n enumerable: !0,\n get: r\n });\n }, n.r = function (e) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {\n value: \"Module\"\n }), Object.defineProperty(e, \"__esModule\", {\n value: !0\n });\n }, n.t = function (e, t) {\n if (1 & t && (e = n(e)), 8 & t) return e;\n if (4 & t && \"object\" == typeof e && e && e.__esModule) return e;\n var r = Object.create(null);\n if (n.r(r), Object.defineProperty(r, \"default\", {\n enumerable: !0,\n value: e\n }), 2 & t && \"string\" != typeof e) for (var o in e) {\n n.d(r, o, function (t) {\n return e[t];\n }.bind(null, o));\n }\n return r;\n }, n.n = function (e) {\n var t = e && e.__esModule ? function () {\n return e.default;\n } : function () {\n return e;\n };\n return n.d(t, \"a\", t), t;\n }, n.o = function (e, t) {\n return Object.prototype.hasOwnProperty.call(e, t);\n }, n.p = \"\", n(n.s = 0);\n }([function (e, t, n) {\n e.exports = n(1);\n }, function (e, t, n) {\n var r = n(2),\n o = n(3);\n e.exports = {\n Link: r,\n Date: o\n };\n }, function (e, t, n) {\n e.exports = {\n url: function url(e, t) {\n var n = e && e.value ? e.value.document : e;\n\n if (e && [e.type, e.link_type, e._linkType, e.linkType].some(function (e) {\n return e && [\"Document\", \"Link.Document\", \"Link.document\"].includes(e);\n }) && t && \"function\" == typeof t) {\n var r = t(n);\n if (r) return r;\n }\n\n return n && n.url ? n.url : \"\";\n }\n };\n }, function (e, t) {\n e.exports = function (e) {\n if (!e) return null;\n var t = 24 == e.length ? \"\".concat(e.substring(0, 22), \":\").concat(e.substring(22, 24)) : e;\n return new Date(t);\n };\n }]);\n }, function (e, t, n) {\n e.exports = n(2);\n }, function (e, t, n) {\n var r = n(0),\n o = n(3),\n i = r.Date,\n u = r.Link;\n e.exports = {\n Date: i,\n Link: u,\n RichText: o\n };\n }, function (e, t, n) {\n var r = n(4),\n o = n(0).Link,\n i = n(5),\n u = r.Elements;\n\n function c(e, t, n, r, c) {\n switch (t) {\n case u.heading1:\n return l(\"h1\", n, c);\n\n case u.heading2:\n return l(\"h2\", n, c);\n\n case u.heading3:\n return l(\"h3\", n, c);\n\n case u.heading4:\n return l(\"h4\", n, c);\n\n case u.heading5:\n return l(\"h5\", n, c);\n\n case u.heading6:\n return l(\"h6\", n, c);\n\n case u.paragraph:\n return l(\"p\", n, c);\n\n case u.preformatted:\n return function (e) {\n return \"\").concat(i(e.text), \"\");\n }(n);\n\n case u.strong:\n return l(\"strong\", n, c);\n\n case u.em:\n return l(\"em\", n, c);\n\n case u.listItem:\n case u.oListItem:\n return l(\"li\", n, c);\n\n case u.list:\n return l(\"ul\", n, c);\n\n case u.oList:\n return l(\"ol\", n, c);\n\n case u.image:\n return function (e, t) {\n var n = t.linkTo ? o.url(t.linkTo, e) : null,\n r = t.linkTo && t.linkTo.target ? 'target=\"'.concat(t.linkTo.target, '\" rel=\"noopener\"') : \"\",\n i = [t.label || \"\", \"block-img\"],\n u = '\"').concat(t.alt');\n return '\\n \\n \");\n }(e, n);\n\n case u.embed:\n return function (e) {\n return '\\n
\\n\\n \").concat(e.oembed.html, \"\\n
\\n \");\n }(n);\n\n case u.hyperlink:\n return function (e, t, n) {\n var r = t.data.target ? 'target=\"'.concat(t.data.target, '\" rel=\"noopener\"') : \"\",\n u = i(o.url(t.data, e));\n return \"').concat(n.join(\"\"), \"\");\n }(e, n, c);\n\n case u.label:\n return function (e, t) {\n return \"\").concat(t.join(\"\"), \"\");\n }(n, c);\n\n case u.span:\n return function (e) {\n return e ? i(e).replace(/\\n/g, \"
\") : \"\";\n }(r);\n\n default:\n return \"\";\n }\n }\n\n function a(e) {\n return e.label ? ' class=\"'.concat(e.label, '\"') : \"\";\n }\n\n function l(e, t, n) {\n return \"<\".concat(e).concat(a(t), \">\").concat(n.join(\"\"), \"\");\n }\n\n e.exports = {\n asText: function asText(e, t) {\n return r.asText(e, t);\n },\n asHtml: function asHtml(e, t, n) {\n return r.serialize(e, c.bind(null, t), n).join(\"\");\n },\n Elements: u\n };\n }, function (e, t, n) {\n \"undefined\" != typeof self && self, e.exports = function (e) {\n var t = {};\n\n function n(r) {\n if (t[r]) return t[r].exports;\n var o = t[r] = {\n i: r,\n l: !1,\n exports: {}\n };\n return e[r].call(o.exports, o, o.exports, n), o.l = !0, o.exports;\n }\n\n return n.m = e, n.c = t, n.d = function (e, t, r) {\n n.o(e, t) || Object.defineProperty(e, t, {\n enumerable: !0,\n get: r\n });\n }, n.r = function (e) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {\n value: \"Module\"\n }), Object.defineProperty(e, \"__esModule\", {\n value: !0\n });\n }, n.t = function (e, t) {\n if (1 & t && (e = n(e)), 8 & t) return e;\n if (4 & t && \"object\" == typeof e && e && e.__esModule) return e;\n var r = Object.create(null);\n if (n.r(r), Object.defineProperty(r, \"default\", {\n enumerable: !0,\n value: e\n }), 2 & t && \"string\" != typeof e) for (var o in e) {\n n.d(r, o, function (t) {\n return e[t];\n }.bind(null, o));\n }\n return r;\n }, n.n = function (e) {\n var t = e && e.__esModule ? function () {\n return e.default;\n } : function () {\n return e;\n };\n return n.d(t, \"a\", t), t;\n }, n.o = function (e, t) {\n return Object.prototype.hasOwnProperty.call(e, t);\n }, n.p = \"\", n(n.s = 4);\n }([function (e, t, n) {\n \"use strict\";\n\n var r;\n\n function o(e, t, n) {\n return t in e ? Object.defineProperty(e, t, {\n value: n,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[t] = n, e;\n }\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.PRIORITIES = t.NODE_TYPES = void 0;\n var i = {\n heading1: \"heading1\",\n heading2: \"heading2\",\n heading3: \"heading3\",\n heading4: \"heading4\",\n heading5: \"heading5\",\n heading6: \"heading6\",\n paragraph: \"paragraph\",\n preformatted: \"preformatted\",\n strong: \"strong\",\n em: \"em\",\n listItem: \"list-item\",\n oListItem: \"o-list-item\",\n list: \"group-list-item\",\n oList: \"group-o-list-item\",\n image: \"image\",\n embed: \"embed\",\n hyperlink: \"hyperlink\",\n label: \"label\",\n span: \"span\"\n };\n t.NODE_TYPES = i;\n var u = (o(r = {}, i.heading1, 4), o(r, i.heading2, 4), o(r, i.heading3, 4), o(r, i.heading4, 4), o(r, i.heading5, 4), o(r, i.heading6, 4), o(r, i.paragraph, 3), o(r, i.preformatted, 5), o(r, i.strong, 6), o(r, i.em, 6), o(r, i.oList, 1), o(r, i.list, 1), o(r, i.listItem, 1), o(r, i.oListItem, 1), o(r, i.image, 1), o(r, i.embed, 1), o(r, i.hyperlink, 3), o(r, i.label, 4), o(r, i.span, 7), r);\n t.PRIORITIES = u;\n }, function (e, t, n) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n var r,\n o = n(7),\n i = n(2),\n u = n(8),\n c = n(0),\n a = (r = n(3)) && r.__esModule ? r : {\n default: r\n };\n\n function l(e, t) {\n for (var n = 0; n < t.length; n++) {\n var r = t[n];\n r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);\n }\n }\n\n function s(e) {\n if (0 === e.length) throw new Error(\"Unable to elect node on empty list\");\n\n var t = function (e) {\n return function (e) {\n if (Array.isArray(e)) return e;\n }(e) || function (e) {\n if (Symbol.iterator in Object(e) || \"[object Arguments]\" === Object.prototype.toString.call(e)) return Array.from(e);\n }(e) || function () {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }();\n }(e.sort(function (e, t) {\n if (e.isParentOf(t)) return -1;\n if (t.isParentOf(e)) return 1;\n var n = c.PRIORITIES[e.type] - c.PRIORITIES[t.type];\n return 0 === n ? e.text.length - t.text.length : n;\n }));\n\n return {\n elected: t[0],\n others: t.slice(1)\n };\n }\n\n function f(e, t, n) {\n if (t.length > 0) return function (e, t, n) {\n return t.reduce(function (r, o, u) {\n var c = [],\n a = 0 === u && o.start > n.lower,\n l = u === t.length - 1 && n.upper > o.end;\n\n if (a) {\n var s = new i.TextNode(n.lower, o.start, e.slice(n.lower, o.start));\n c = c.concat(s);\n } else {\n var f = t[u - 1];\n\n if (f && o.start > f.end) {\n var d = e.slice(f.end, o.start),\n p = new i.TextNode(f.end, o.start, d);\n c = c.concat(p);\n }\n }\n\n if (c = c.concat(o), l) {\n var y = new i.TextNode(o.end, n.upper, e.slice(o.end, n.upper));\n c = c.concat(y);\n }\n\n return r.concat(c);\n }, []);\n }(e, d(e, t), n);\n var r = e.slice(n.lower, n.upper);\n return [new i.TextNode(n.lower, n.upper, r)];\n }\n\n function d(e, t) {\n var n = function (e) {\n return function (e, t) {\n return t.reduce(function (e, t) {\n var n = (0, o.last)(e);\n\n if (n) {\n if (n.some(function (e) {\n return e.isParentOf(t);\n })) return (0, o.init)(e).concat([n.concat(t)]);\n var r = (0, o.last)(n);\n return r && function (e, t) {\n return e.end >= t.start;\n }(r, t) ? (0, o.init)(e).concat([n.concat(t)]) : e.concat([[t]]);\n }\n\n return [[t]];\n }, []);\n }(0, (0, o.sort)(e, function (e, t) {\n return n = t, e.start - n.start || function (e, t) {\n return e.end - t.end;\n }(e, t);\n var n;\n }));\n }((0, o.sort)(t, function (e, t) {\n return e.start - t.start;\n })).map(s),\n r = (0, o.flatten)(n.map(function (t) {\n return function (e, t) {\n var n = t.others.reduce(function (n, r) {\n var o = n.inner,\n u = n.outer,\n c = function (e, t, n) {\n return n.start < t.start ? {\n inner: i.SpanNode.slice(n, t.start, n.end, e),\n outer: i.SpanNode.slice(n, n.start, t.start, e)\n } : n.end > t.end ? {\n inner: i.SpanNode.slice(n, n.start, t.end, e),\n outer: i.SpanNode.slice(n, t.end, n.end, e)\n } : {\n inner: n\n };\n }(e, t.elected, r);\n\n return {\n inner: o.concat(c.inner),\n outer: c.outer ? u.concat(c.outer) : u\n };\n }, {\n inner: [],\n outer: []\n }),\n r = n.inner,\n o = n.outer;\n return [t.elected.setChildren(f(e, r, t.elected.boundaries()))].concat(d(e, o));\n }(e, t);\n }));\n\n return (0, o.sort)(r, function (e, t) {\n return e.start - t.start;\n });\n }\n\n var p = function () {\n function e() {\n !function (e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, e);\n }\n\n var t, n;\n return t = e, (n = [{\n key: \"fromRichText\",\n value: function value(e) {\n return {\n key: (0, a.default)(),\n children: e.reduce(function (e, t, n) {\n if (u.RichTextBlock.isEmbedBlock(t.type) || u.RichTextBlock.isImageBlock(t.type)) return e.concat(new i.BlockNode(t.type, t));\n\n var r = function (e) {\n var t = (e.spans || []).map(function (t) {\n var n = e.text.slice(t.start, t.end);\n return new i.SpanNode(t.start, t.end, t.type, n, [], t);\n }),\n n = {\n lower: 0,\n upper: e.text.length\n };\n return f(e.text, t, n);\n }(t),\n c = e[e.length - 1];\n\n if (u.RichTextBlock.isListItem(t.type) && c && c instanceof i.ListBlockNode) {\n var a = new i.ListItemBlockNode(t, r),\n l = c.addChild(a);\n return (0, o.init)(e).concat(l);\n }\n\n if (u.RichTextBlock.isOrderedListItem(t.type) && c && c instanceof i.OrderedListBlockNode) {\n var s = new i.OrderedListItemBlockNode(t, r),\n d = c.addChild(s);\n return (0, o.init)(e).concat(d);\n }\n\n if (u.RichTextBlock.isListItem(t.type)) {\n var p = new i.ListItemBlockNode(t, r),\n y = new i.ListBlockNode(u.RichTextBlock.emptyList(), [p]);\n return e.concat(y);\n }\n\n if (u.RichTextBlock.isOrderedListItem(t.type)) {\n var h = new i.OrderedListItemBlockNode(t, r),\n v = new i.OrderedListBlockNode(u.RichTextBlock.emptyOrderedList(), [h]);\n return e.concat(v);\n }\n\n return e.concat(new i.BlockNode(t.type, t, r));\n }, [])\n };\n }\n }]) && l(t, n), e;\n }();\n\n t.default = p;\n }, function (e, t, n) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.ListBlockNode = t.OrderedListBlockNode = t.OrderedListItemBlockNode = t.ListItemBlockNode = t.BlockNode = t.TextNode = t.SpanNode = t.Node = void 0;\n var r,\n o = (r = n(3)) && r.__esModule ? r : {\n default: r\n },\n i = n(0);\n\n function u(e) {\n return (u = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (e) {\n return typeof e;\n } : function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e;\n })(e);\n }\n\n function c(e, t) {\n for (var n = 0; n < t.length; n++) {\n var r = t[n];\n r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);\n }\n }\n\n function a(e, t, n) {\n return t && c(e.prototype, t), n && c(e, n), e;\n }\n\n function l(e, t) {\n if (\"function\" != typeof t && null !== t) throw new TypeError(\"Super expression must either be null or a function\");\n e.prototype = Object.create(t && t.prototype, {\n constructor: {\n value: e,\n writable: !0,\n configurable: !0\n }\n }), t && function (e, t) {\n (Object.setPrototypeOf || function (e, t) {\n return e.__proto__ = t, e;\n })(e, t);\n }(e, t);\n }\n\n function s(e) {\n return function () {\n var t,\n n = f(e);\n\n if (function () {\n if (\"undefined\" == typeof Reflect || !Reflect.construct) return !1;\n if (Reflect.construct.sham) return !1;\n if (\"function\" == typeof Proxy) return !0;\n\n try {\n return Date.prototype.toString.call(Reflect.construct(Date, [], function () {})), !0;\n } catch (e) {\n return !1;\n }\n }()) {\n var r = f(this).constructor;\n t = Reflect.construct(n, arguments, r);\n } else t = n.apply(this, arguments);\n\n return function (e, t) {\n return !t || \"object\" !== u(t) && \"function\" != typeof t ? function (e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n }(e) : t;\n }(this, t);\n };\n }\n\n function f(e) {\n return (f = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) {\n return e.__proto__ || Object.getPrototypeOf(e);\n })(e);\n }\n\n function d(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }\n\n var p = function e(t, n, r) {\n d(this, e), this.key = (0, o.default)(), this.type = t, this.element = n, this.children = r;\n };\n\n t.Node = p;\n\n var y = function (e) {\n l(n, p);\n var t = s(n);\n\n function n(e, r, o, i, u, c) {\n var a;\n return d(this, n), (a = t.call(this, o, c, u)).start = e, a.end = r, a.text = i, a.children = u, a;\n }\n\n return a(n, [{\n key: \"boundaries\",\n value: function value() {\n return {\n lower: this.start,\n upper: this.end\n };\n }\n }, {\n key: \"isParentOf\",\n value: function value(e) {\n return this.start <= e.start && this.end >= e.end;\n }\n }, {\n key: \"setChildren\",\n value: function value(e) {\n return new n(this.start, this.end, this.type, this.text, e, this.element);\n }\n }], [{\n key: \"slice\",\n value: function value(e, t, r, o) {\n return new n(t, r, e.type, o.slice(t, r), e.children, e.element);\n }\n }]), n;\n }();\n\n t.SpanNode = y;\n\n var h = function (e) {\n l(n, y);\n var t = s(n);\n\n function n(e, r, o) {\n d(this, n);\n var u = {\n type: i.NODE_TYPES.span,\n start: e,\n end: r,\n text: o\n };\n return t.call(this, e, r, i.NODE_TYPES.span, o, [], u);\n }\n\n return n;\n }();\n\n t.TextNode = h;\n\n var v = function (e) {\n l(n, p);\n var t = s(n);\n\n function n(e, r) {\n var o = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : [];\n return d(this, n), t.call(this, e, r, o);\n }\n\n return n;\n }();\n\n t.BlockNode = v;\n\n var m = function (e) {\n l(n, v);\n var t = s(n);\n\n function n(e, r) {\n return d(this, n), t.call(this, i.NODE_TYPES.listItem, e, r);\n }\n\n return n;\n }();\n\n t.ListItemBlockNode = m;\n\n var b = function (e) {\n l(n, v);\n var t = s(n);\n\n function n(e, r) {\n return d(this, n), t.call(this, i.NODE_TYPES.oListItem, e, r);\n }\n\n return n;\n }();\n\n t.OrderedListItemBlockNode = b;\n\n var g = function (e) {\n l(n, v);\n var t = s(n);\n\n function n(e, r) {\n return d(this, n), t.call(this, i.NODE_TYPES.oList, e, r);\n }\n\n return a(n, [{\n key: \"addChild\",\n value: function value(e) {\n var t = this.children.concat(e);\n return new n(this.element, t);\n }\n }]), n;\n }();\n\n t.OrderedListBlockNode = g;\n\n var x = function (e) {\n l(n, v);\n var t = s(n);\n\n function n(e, r) {\n return d(this, n), t.call(this, i.NODE_TYPES.list, e, r);\n }\n\n return a(n, [{\n key: \"addChild\",\n value: function value(e) {\n var t = this.children.concat(e);\n return new n(this.element, t);\n }\n }]), n;\n }();\n\n t.ListBlockNode = x;\n }, function (e, t, n) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = function () {\n var e = new Date().getTime();\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (t) {\n var n = (e + 16 * Math.random()) % 16 | 0;\n return e = Math.floor(e / 16), (\"x\" == t ? n : 3 & n | 8).toString(16);\n });\n };\n }, function (e, t, n) {\n e.exports = n(5);\n }, function (e, t, n) {\n \"use strict\";\n\n var r = c(n(6)),\n o = c(n(1)),\n i = c(n(9)),\n u = n(0);\n\n function c(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n\n e.exports = {\n asText: r.default,\n asTree: o.default.fromRichText,\n serialize: i.default,\n Elements: u.NODE_TYPES\n };\n }, function (e, t, n) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0, t.default = function (e, t) {\n var n = \"string\" == typeof t ? t : \" \";\n return e.map(function (e) {\n return e.text;\n }).join(n);\n };\n }, function (e, t, n) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.init = function (e) {\n return e.slice(0, -1);\n }, t.last = function (e) {\n return e[e.length - 1];\n }, t.flatten = function (e) {\n var t = [],\n n = !0,\n r = !1,\n o = void 0;\n\n try {\n for (var i, u = e[Symbol.iterator](); !(n = (i = u.next()).done); n = !0) {\n var c = i.value;\n Array.isArray(c) ? t.push.apply(t, c) : t.push(c);\n }\n } catch (e) {\n r = !0, o = e;\n } finally {\n try {\n n || null == u.return || u.return();\n } finally {\n if (r) throw o;\n }\n }\n\n return t;\n }, t.sort = function (e, t) {\n return function (e) {\n return function (e) {\n if (Array.isArray(e)) {\n for (var t = 0, n = new Array(e.length); t < e.length; t++) {\n n[t] = e[t];\n }\n\n return n;\n }\n }(e) || function (e) {\n if (Symbol.iterator in Object(e) || \"[object Arguments]\" === Object.prototype.toString.call(e)) return Array.from(e);\n }(e) || function () {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n }();\n }(e).sort(t);\n };\n }, function (e, t, n) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.RichTextBlock = void 0;\n var r = n(0);\n\n function o(e, t) {\n for (var n = 0; n < t.length; n++) {\n var r = t[n];\n r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);\n }\n }\n\n var i = function () {\n function e(t, n, r) {\n !function (e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, e), this.type = t, this.text = n, this.spans = r;\n }\n\n var t, n;\n return t = e, (n = [{\n key: \"isEmbedBlock\",\n value: function value(e) {\n return e === r.NODE_TYPES.embed;\n }\n }, {\n key: \"isImageBlock\",\n value: function value(e) {\n return e === r.NODE_TYPES.image;\n }\n }, {\n key: \"isList\",\n value: function value(e) {\n return e === r.NODE_TYPES.list;\n }\n }, {\n key: \"isOrderedList\",\n value: function value(e) {\n return e === r.NODE_TYPES.oList;\n }\n }, {\n key: \"isListItem\",\n value: function value(e) {\n return e === r.NODE_TYPES.listItem;\n }\n }, {\n key: \"isOrderedListItem\",\n value: function value(e) {\n return e === r.NODE_TYPES.oListItem;\n }\n }, {\n key: \"emptyList\",\n value: function value() {\n return {\n type: r.NODE_TYPES.list,\n spans: [],\n text: \"\"\n };\n }\n }, {\n key: \"emptyOrderedList\",\n value: function value() {\n return {\n type: r.NODE_TYPES.oList,\n spans: [],\n text: \"\"\n };\n }\n }]) && o(t, n), e;\n }();\n\n t.RichTextBlock = i;\n }, function (e, t, n) {\n \"use strict\";\n\n Object.defineProperty(t, \"__esModule\", {\n value: !0\n }), t.default = void 0;\n var r,\n o = (r = n(1)) && r.__esModule ? r : {\n default: r\n },\n i = n(2);\n\n t.default = function (e, t, n) {\n return o.default.fromRichText(e).children.map(function (e, r) {\n return function (e, t, n, r) {\n return function e(n, o) {\n var u = n instanceof i.SpanNode ? n.text : null,\n c = n.children.reduce(function (t, n, r) {\n return t.concat([e(n, r)]);\n }, []);\n return r && r(n.type, n.element, u, c, o) || t(n.type, n.element, u, c, o);\n }(e, n);\n }(e, t, r, n);\n });\n };\n }]);\n }, function (e, t, n) {\n \"use strict\";\n /*!\n * escape-html\n * Copyright(c) 2012-2013 TJ Holowaychuk\n * Copyright(c) 2015 Andreas Lubbe\n * Copyright(c) 2015 Tiancheng \"Timothy\" Gu\n * MIT Licensed\n */\n\n var r = /[\"'&<>]/;\n\n e.exports = function (e) {\n var t,\n n = \"\" + e,\n o = r.exec(n);\n if (!o) return n;\n var i = \"\",\n u = 0,\n c = 0;\n\n for (u = o.index; u < n.length; u++) {\n switch (n.charCodeAt(u)) {\n case 34:\n t = \""\";\n break;\n\n case 38:\n t = \"&\";\n break;\n\n case 39:\n t = \"'\";\n break;\n\n case 60:\n t = \"<\";\n break;\n\n case 62:\n t = \">\";\n break;\n\n default:\n continue;\n }\n\n c !== u && (i += n.substring(c, u)), c = u + 1, i += t;\n }\n\n return c !== u ? i + n.substring(c, u) : i;\n };\n }]);\n});","require(\"core-js/modules/es.promise.finally.js\");\n\n!function (t, e) {\n \"object\" == typeof exports && \"object\" == typeof module ? module.exports = e(require(\"cross-fetch/polyfill\")) : \"function\" == typeof define && define.amd ? define(\"PrismicJS\", [\"cross-fetch/polyfill\"], e) : \"object\" == typeof exports ? exports.PrismicJS = e(require(\"cross-fetch/polyfill\")) : t.PrismicJS = e(t[\"cross-fetch/polyfill\"]);\n}(\"undefined\" != typeof self ? self : this, function (t) {\n return function (t) {\n var e = {};\n\n function n(r) {\n if (e[r]) return e[r].exports;\n var o = e[r] = {\n i: r,\n l: !1,\n exports: {}\n };\n return t[r].call(o.exports, o, o.exports, n), o.l = !0, o.exports;\n }\n\n return n.m = t, n.c = e, n.d = function (t, e, r) {\n n.o(t, e) || Object.defineProperty(t, e, {\n enumerable: !0,\n get: r\n });\n }, n.r = function (t) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {\n value: \"Module\"\n }), Object.defineProperty(t, \"__esModule\", {\n value: !0\n });\n }, n.t = function (t, e) {\n if (1 & e && (t = n(t)), 8 & e) return t;\n if (4 & e && \"object\" == typeof t && t && t.__esModule) return t;\n var r = Object.create(null);\n if (n.r(r), Object.defineProperty(r, \"default\", {\n enumerable: !0,\n value: t\n }), 2 & e && \"string\" != typeof t) for (var o in t) {\n n.d(r, o, function (e) {\n return t[e];\n }.bind(null, o));\n }\n return r;\n }, n.n = function (t) {\n var e = t && t.__esModule ? function () {\n return t.default;\n } : function () {\n return t;\n };\n return n.d(e, \"a\", e), e;\n }, n.o = function (t, e) {\n return Object.prototype.hasOwnProperty.call(t, e);\n }, n.p = \"\", n(n.s = 20);\n }([function (t, e, n) {\n \"use strict\";\n\n e.a = function (t) {\n var e = this.constructor;\n return this.then(function (n) {\n return e.resolve(t()).then(function () {\n return n;\n });\n }, function (n) {\n return e.resolve(t()).then(function () {\n return e.reject(n);\n });\n });\n };\n }, function (t, e, n) {\n \"use strict\";\n\n e.__esModule = !0, e.createPreviewResolver = function (t, e, n) {\n return {\n token: t,\n documentId: e,\n resolve: function resolve(r, o, i) {\n return e && n ? n(e, {\n ref: t\n }).then(function (t) {\n if (t) {\n var e = r(t);\n return i && i(null, e), e;\n }\n\n return i && i(null, o), o;\n }) : Promise.resolve(o);\n }\n };\n };\n }, function (t, e, n) {\n \"use strict\";\n\n var r = this && this.__assign || Object.assign || function (t) {\n for (var e, n = 1, r = arguments.length; n < r; n++) {\n for (var o in e = arguments[n]) {\n Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);\n }\n }\n\n return t;\n };\n\n e.__esModule = !0;\n var o = n(5),\n i = n(4),\n u = n(6),\n a = n(12),\n s = n(1);\n e.PREVIEW_COOKIE = \"io.prismic.preview\", e.EXPERIMENT_COOKIE = \"io.prismic.experiment\";\n\n var f = function () {\n function t(t, e, n) {\n this.data = t, this.masterRef = t.refs.filter(function (t) {\n return t.isMasterRef;\n })[0], this.experiments = new o.Experiments(t.experiments), this.bookmarks = t.bookmarks, this.httpClient = e, this.options = n, this.refs = t.refs, this.tags = t.tags, this.types = t.types, this.languages = t.languages;\n }\n\n return t.prototype.form = function (t) {\n var e = this.data.forms[t];\n return e ? new i.SearchForm(e, this.httpClient) : null;\n }, t.prototype.everything = function () {\n var t = this.form(\"everything\");\n if (!t) throw new Error(\"Missing everything form\");\n return t;\n }, t.prototype.master = function () {\n return this.masterRef.ref;\n }, t.prototype.ref = function (t) {\n var e = this.data.refs.filter(function (e) {\n return e.label === t;\n })[0];\n return e ? e.ref : null;\n }, t.prototype.currentExperiment = function () {\n return this.experiments.current();\n }, t.prototype.query = function (t, n, r) {\n void 0 === r && (r = function r() {});\n var o = \"function\" == typeof n ? {\n options: {},\n callback: n\n } : {\n options: n || {},\n callback: r\n },\n i = o.options,\n u = o.callback,\n s = this.everything();\n\n for (var f in i) {\n s = s.set(f, i[f]);\n }\n\n if (!i.ref) {\n var c = \"\";\n this.options.req ? c = this.options.req.headers.cookie || \"\" : \"undefined\" != typeof window && window.document && (c = window.document.cookie || \"\");\n var l = a.default.parse(c),\n p = l[e.PREVIEW_COOKIE],\n h = this.experiments.refFromCookie(l[e.EXPERIMENT_COOKIE]);\n s = s.ref(p || h || this.masterRef.ref);\n }\n\n return t && s.query(t), s.submit(u);\n }, t.prototype.queryFirst = function (t, e, n) {\n var o = \"function\" == typeof e ? {\n options: {},\n callback: e\n } : {\n options: r({}, e) || {},\n callback: n || function () {}\n },\n i = o.options,\n u = o.callback;\n return i.page = 1, i.pageSize = 1, this.query(t, i).then(function (t) {\n var e = t && t.results && t.results[0];\n return u(null, e), e;\n }).catch(function (t) {\n throw u(t), t;\n });\n }, t.prototype.getByID = function (t, e, n) {\n var o = e ? r({}, e) : {};\n return o.lang || (o.lang = \"*\"), this.queryFirst(u.default.at(\"document.id\", t), o, n);\n }, t.prototype.getByIDs = function (t, e, n) {\n var o = e ? r({}, e) : {};\n return o.lang || (o.lang = \"*\"), this.query(u.default.in(\"document.id\", t), o, n);\n }, t.prototype.getByUID = function (t, e, n, o) {\n var i = n ? r({}, n) : {};\n if (\"*\" === i.lang) throw new Error(\"FORDIDDEN. You can't use getByUID with *, use the predicates instead.\");\n return i.page || (i.page = 1), this.queryFirst(u.default.at(\"my.\" + t + \".uid\", e), i, o);\n }, t.prototype.getSingle = function (t, e, n) {\n var o = e ? r({}, e) : {};\n return this.queryFirst(u.default.at(\"document.type\", t), o, n);\n }, t.prototype.getBookmark = function (t, e, n) {\n var r = this.data.bookmarks[t];\n return r ? this.getByID(r, e, n) : Promise.reject(\"Error retrieving bookmarked id\");\n }, t.prototype.getPreviewResolver = function (t, e) {\n return s.createPreviewResolver(t, e, this.getByID.bind(this));\n }, t.prototype.previewSession = function (t, e, n, r) {\n var o = this;\n return console.warn(\"previewSession function is deprecated in favor of getPreviewResolver function.\"), new Promise(function (i, u) {\n o.httpClient.request(t, function (a, s) {\n if (a) r && r(a), u(a);else if (s) {\n if (s.mainDocument) return o.getByID(s.mainDocument, {\n ref: t\n }).then(function (t) {\n if (t) {\n var o = e(t);\n r && r(null, o), i(o);\n } else r && r(null, n), i(n);\n }).catch(u);\n r && r(null, n), i(n);\n }\n });\n });\n }, t;\n }();\n\n e.default = f;\n }, function (t, e, n) {\n \"use strict\";\n\n e.__esModule = !0;\n var r = n(2),\n o = n(11);\n\n function i(t) {\n return t.indexOf(\"?\") > -1 ? \"&\" : \"?\";\n }\n\n var u = function () {\n function t(t, e) {\n if (this.options = e || {}, this.url = t, this.options.accessToken) {\n var n = \"access_token=\" + this.options.accessToken;\n this.url += i(t) + n;\n }\n\n this.options.routes && (this.url += i(t) + \"routes=\" + encodeURIComponent(JSON.stringify(this.options.routes))), this.apiDataTTL = this.options.apiDataTTL || 5, this.httpClient = new o.default(this.options.requestHandler, this.options.apiCache, this.options.proxyAgent, this.options.timeoutInMs);\n }\n\n return t.prototype.get = function (t) {\n var e = this;\n return this.httpClient.cachedRequest(this.url, {\n ttl: this.apiDataTTL\n }).then(function (n) {\n var o = new r.default(n, e.httpClient, e.options);\n return t && t(null, o), o;\n }).catch(function (e) {\n throw t && t(e), e;\n });\n }, t;\n }();\n\n e.default = u;\n }, function (t, e, n) {\n \"use strict\";\n\n e.__esModule = !0;\n\n var r = function () {\n function t(t, e) {\n this.id = t, this.api = e, this.fields = {};\n }\n\n return t.prototype.set = function (t, e) {\n return this.fields[t] = e, this;\n }, t.prototype.ref = function (t) {\n return this.set(\"ref\", t);\n }, t.prototype.query = function (t) {\n return this.set(\"q\", t);\n }, t.prototype.pageSize = function (t) {\n return this.set(\"pageSize\", t);\n }, t.prototype.fetch = function (t) {\n return console.warn(\"Warning: Using Fetch is deprecated. Use the property `graphQuery` instead.\"), this.set(\"fetch\", t);\n }, t.prototype.fetchLinks = function (t) {\n return console.warn(\"Warning: Using FetchLinks is deprecated. Use the property `graphQuery` instead.\"), this.set(\"fetchLinks\", t);\n }, t.prototype.graphQuery = function (t) {\n return this.set(\"graphQuery\", t);\n }, t.prototype.lang = function (t) {\n return this.set(\"lang\", t);\n }, t.prototype.page = function (t) {\n return this.set(\"page\", t);\n }, t.prototype.after = function (t) {\n return this.set(\"after\", t);\n }, t.prototype.orderings = function (t) {\n return this.set(\"orderings\", t);\n }, t.prototype.url = function () {\n var e = this;\n return this.api.get().then(function (n) {\n return t.toSearchForm(e, n).url();\n });\n }, t.prototype.submit = function (e) {\n var n = this;\n return this.api.get().then(function (r) {\n return t.toSearchForm(n, r).submit(e);\n });\n }, t.toSearchForm = function (t, e) {\n var n = e.form(t.id);\n if (n) return Object.keys(t.fields).reduce(function (e, n) {\n var r = t.fields[n];\n return \"q\" === n ? e.query(r) : \"pageSize\" === n ? e.pageSize(r) : \"fetch\" === n ? e.fetch(r) : \"fetchLinks\" === n ? e.fetchLinks(r) : \"graphQuery\" === n ? e.graphQuery(r) : \"lang\" === n ? e.lang(r) : \"page\" === n ? e.page(r) : \"after\" === n ? e.after(r) : \"orderings\" === n ? e.orderings(r) : e.set(n, r);\n }, n);\n throw new Error(\"Unable to access to form \" + t.id);\n }, t;\n }();\n\n e.LazySearchForm = r;\n\n var o = function () {\n function t(t, e) {\n for (var n in this.httpClient = e, this.form = t, this.data = {}, t.fields) {\n t.fields[n].default && (this.data[n] = [t.fields[n].default]);\n }\n }\n\n return t.prototype.set = function (t, e) {\n var n = this.form.fields[t];\n if (!n) throw new Error(\"Unknown field \" + t);\n var r = \"\" === e || void 0 === e ? null : e,\n o = this.data[t] || [];\n return o = n.multiple ? r ? o.concat([r]) : o : r ? [r] : o, this.data[t] = o, this;\n }, t.prototype.ref = function (t) {\n return this.set(\"ref\", t);\n }, t.prototype.query = function (t) {\n if (\"string\" == typeof t) return this.query([t]);\n if (Array.isArray(t)) return this.set(\"q\", \"[\" + t.join(\"\") + \"]\");\n throw new Error(\"Invalid query : \" + t);\n }, t.prototype.pageSize = function (t) {\n return this.set(\"pageSize\", t);\n }, t.prototype.fetch = function (t) {\n console.warn(\"Warning: Using Fetch is deprecated. Use the property `graphQuery` instead.\");\n var e = Array.isArray(t) ? t.join(\",\") : t;\n return this.set(\"fetch\", e);\n }, t.prototype.fetchLinks = function (t) {\n console.warn(\"Warning: Using FetchLinks is deprecated. Use the property `graphQuery` instead.\");\n var e = Array.isArray(t) ? t.join(\",\") : t;\n return this.set(\"fetchLinks\", e);\n }, t.prototype.graphQuery = function (t) {\n return this.set(\"graphQuery\", t);\n }, t.prototype.lang = function (t) {\n return this.set(\"lang\", t);\n }, t.prototype.page = function (t) {\n return this.set(\"page\", t);\n }, t.prototype.after = function (t) {\n return this.set(\"after\", t);\n }, t.prototype.orderings = function (t) {\n return t ? this.set(\"orderings\", \"[\" + t.join(\",\") + \"]\") : this;\n }, t.prototype.url = function () {\n var t = this.form.action;\n\n if (this.data) {\n var e = t.indexOf(\"?\") > -1 ? \"&\" : \"?\";\n\n for (var n in this.data) {\n if (this.data.hasOwnProperty(n)) {\n var r = this.data[n];\n if (r) for (var o = 0; o < r.length; o++) {\n t += e + n + \"=\" + encodeURIComponent(r[o]), e = \"&\";\n }\n }\n }\n }\n\n return t;\n }, t.prototype.submit = function (t) {\n return this.httpClient.cachedRequest(this.url()).then(function (e) {\n return t && t(null, e), e;\n }).catch(function (e) {\n throw t && t(e), e;\n });\n }, t;\n }();\n\n e.SearchForm = o;\n }, function (t, e, n) {\n \"use strict\";\n\n e.__esModule = !0;\n\n var r = function () {\n function t(t) {\n this.data = {}, this.data = t;\n }\n\n return t.prototype.id = function () {\n return this.data.id;\n }, t.prototype.ref = function () {\n return this.data.ref;\n }, t.prototype.label = function () {\n return this.data.label;\n }, t;\n }();\n\n e.Variation = r;\n\n var o = function () {\n function t(t) {\n this.data = {}, this.data = t, this.variations = (t.variations || []).map(function (t) {\n return new r(t);\n });\n }\n\n return t.prototype.id = function () {\n return this.data.id;\n }, t.prototype.googleId = function () {\n return this.data.googleId;\n }, t.prototype.name = function () {\n return this.data.name;\n }, t;\n }();\n\n e.Experiment = o;\n\n var i = function () {\n function t(t) {\n t && (this.drafts = (t.drafts || []).map(function (t) {\n return new o(t);\n }), this.running = (t.running || []).map(function (t) {\n return new o(t);\n }));\n }\n\n return t.prototype.current = function () {\n return this.running.length > 0 ? this.running[0] : null;\n }, t.prototype.refFromCookie = function (t) {\n if (!t || \"\" === t.trim()) return null;\n var e = t.trim().split(\" \");\n if (e.length < 2) return null;\n var n = e[0],\n r = parseInt(e[1], 10),\n o = this.running.filter(function (t) {\n return t.googleId() === n && t.variations.length > r;\n })[0];\n return o ? o.variations[r].ref() : null;\n }, t;\n }();\n\n e.Experiments = i;\n }, function (t, e, n) {\n \"use strict\";\n\n e.__esModule = !0;\n var r = \"at\",\n o = \"not\",\n i = \"missing\",\n u = \"has\",\n a = \"any\",\n s = \"in\",\n f = \"fulltext\",\n c = \"similar\",\n l = \"number.gt\",\n p = \"number.lt\",\n h = \"number.inRange\",\n d = \"date.before\",\n y = \"date.after\",\n m = \"date.between\",\n g = \"date.day-of-month\",\n v = \"date.day-of-month-after\",\n w = \"date.day-of-month-before\",\n b = \"date.day-of-week\",\n _ = \"date.day-of-week-after\",\n k = \"date.day-of-week-before\",\n I = \"date.month\",\n T = \"date.month-before\",\n E = \"date.month-after\",\n O = \"date.year\",\n A = \"date.hour\",\n x = \"date.hour-before\",\n M = \"date.hour-after\",\n P = \"geopoint.near\";\n\n function j(t) {\n if (\"string\" == typeof t) return '\"' + t + '\"';\n if (\"number\" == typeof t) return t.toString();\n if (t instanceof Date) return t.getTime().toString();\n if (Array.isArray(t)) return \"[\" + t.map(function (t) {\n return j(t);\n }).join(\",\") + \"]\";\n if (\"boolean\" == typeof t) return t.toString();\n throw new Error(\"Unable to encode \" + t + \" of type \" + typeof t);\n }\n\n var q = {\n near: function near(t, e, n, r) {\n return \"[\" + P + \"(\" + t + \", \" + e + \", \" + n + \", \" + r + \")]\";\n }\n },\n R = {\n before: function before(t, e) {\n return \"[\" + d + \"(\" + t + \", \" + j(e) + \")]\";\n },\n after: function after(t, e) {\n return \"[\" + y + \"(\" + t + \", \" + j(e) + \")]\";\n },\n between: function between(t, e, n) {\n return \"[\" + m + \"(\" + t + \", \" + j(e) + \", \" + j(n) + \")]\";\n },\n dayOfMonth: function dayOfMonth(t, e) {\n return \"[\" + g + \"(\" + t + \", \" + e + \")]\";\n },\n dayOfMonthAfter: function dayOfMonthAfter(t, e) {\n return \"[\" + v + \"(\" + t + \", \" + e + \")]\";\n },\n dayOfMonthBefore: function dayOfMonthBefore(t, e) {\n return \"[\" + w + \"(\" + t + \", \" + e + \")]\";\n },\n dayOfWeek: function dayOfWeek(t, e) {\n return \"[\" + b + \"(\" + t + \", \" + j(e) + \")]\";\n },\n dayOfWeekAfter: function dayOfWeekAfter(t, e) {\n return \"[\" + _ + \"(\" + t + \", \" + j(e) + \")]\";\n },\n dayOfWeekBefore: function dayOfWeekBefore(t, e) {\n return \"[\" + k + \"(\" + t + \", \" + j(e) + \")]\";\n },\n month: function month(t, e) {\n return \"[\" + I + \"(\" + t + \", \" + j(e) + \")]\";\n },\n monthBefore: function monthBefore(t, e) {\n return \"[\" + T + \"(\" + t + \", \" + j(e) + \")]\";\n },\n monthAfter: function monthAfter(t, e) {\n return \"[\" + E + \"(\" + t + \", \" + j(e) + \")]\";\n },\n year: function year(t, e) {\n return \"[\" + O + \"(\" + t + \", \" + e + \")]\";\n },\n hour: function hour(t, e) {\n return \"[\" + A + \"(\" + t + \", \" + e + \")]\";\n },\n hourBefore: function hourBefore(t, e) {\n return \"[\" + x + \"(\" + t + \", \" + e + \")]\";\n },\n hourAfter: function hourAfter(t, e) {\n return \"[\" + M + \"(\" + t + \", \" + e + \")]\";\n }\n },\n S = {\n gt: function gt(t, e) {\n return \"[\" + l + \"(\" + t + \", \" + e + \")]\";\n },\n lt: function lt(t, e) {\n return \"[\" + p + \"(\" + t + \", \" + e + \")]\";\n },\n inRange: function inRange(t, e, n) {\n return \"[\" + h + \"(\" + t + \", \" + e + \", \" + n + \")]\";\n }\n };\n e.default = {\n at: function at(t, e) {\n return \"[\" + r + \"(\" + t + \", \" + j(e) + \")]\";\n },\n not: function not(t, e) {\n return \"[\" + o + \"(\" + t + \", \" + j(e) + \")]\";\n },\n missing: function missing(t) {\n return \"[\" + i + \"(\" + t + \")]\";\n },\n has: function has(t) {\n return \"[\" + u + \"(\" + t + \")]\";\n },\n any: function any(t, e) {\n return \"[\" + a + \"(\" + t + \", \" + j(e) + \")]\";\n },\n in: function _in(t, e) {\n return \"[\" + s + \"(\" + t + \", \" + j(e) + \")]\";\n },\n fulltext: function fulltext(t, e) {\n return \"[\" + f + \"(\" + t + \", \" + j(e) + \")]\";\n },\n similar: function similar(t, e) {\n return \"[\" + c + '(\"' + t + '\", ' + e + \")]\";\n },\n date: R,\n dateBefore: R.before,\n dateAfter: R.after,\n dateBetween: R.between,\n dayOfMonth: R.dayOfMonth,\n dayOfMonthAfter: R.dayOfMonthAfter,\n dayOfMonthBefore: R.dayOfMonthBefore,\n dayOfWeek: R.dayOfWeek,\n dayOfWeekAfter: R.dayOfWeekAfter,\n dayOfWeekBefore: R.dayOfWeekBefore,\n month: R.month,\n monthBefore: R.monthBefore,\n monthAfter: R.monthAfter,\n year: R.year,\n hour: R.hour,\n hourBefore: R.hourBefore,\n hourAfter: R.hourAfter,\n number: S,\n gt: S.gt,\n lt: S.lt,\n inRange: S.inRange,\n near: q.near,\n geopoint: q\n };\n }, function (t, e, n) {\n \"use strict\";\n\n (function (t) {\n var r = n(0),\n o = setTimeout;\n\n function i() {}\n\n function u(t) {\n if (!(this instanceof u)) throw new TypeError(\"Promises must be constructed via new\");\n if (\"function\" != typeof t) throw new TypeError(\"not a function\");\n this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], l(t, this);\n }\n\n function a(t, e) {\n for (; 3 === t._state;) {\n t = t._value;\n }\n\n 0 !== t._state ? (t._handled = !0, u._immediateFn(function () {\n var n = 1 === t._state ? e.onFulfilled : e.onRejected;\n\n if (null !== n) {\n var r;\n\n try {\n r = n(t._value);\n } catch (t) {\n return void f(e.promise, t);\n }\n\n s(e.promise, r);\n } else (1 === t._state ? s : f)(e.promise, t._value);\n })) : t._deferreds.push(e);\n }\n\n function s(t, e) {\n try {\n if (e === t) throw new TypeError(\"A promise cannot be resolved with itself.\");\n\n if (e && (\"object\" == typeof e || \"function\" == typeof e)) {\n var n = e.then;\n if (e instanceof u) return t._state = 3, t._value = e, void c(t);\n if (\"function\" == typeof n) return void l(function (t, e) {\n return function () {\n t.apply(e, arguments);\n };\n }(n, e), t);\n }\n\n t._state = 1, t._value = e, c(t);\n } catch (e) {\n f(t, e);\n }\n }\n\n function f(t, e) {\n t._state = 2, t._value = e, c(t);\n }\n\n function c(t) {\n 2 === t._state && 0 === t._deferreds.length && u._immediateFn(function () {\n t._handled || u._unhandledRejectionFn(t._value);\n });\n\n for (var e = 0, n = t._deferreds.length; e < n; e++) {\n a(t, t._deferreds[e]);\n }\n\n t._deferreds = null;\n }\n\n function l(t, e) {\n var n = !1;\n\n try {\n t(function (t) {\n n || (n = !0, s(e, t));\n }, function (t) {\n n || (n = !0, f(e, t));\n });\n } catch (t) {\n if (n) return;\n n = !0, f(e, t);\n }\n }\n\n u.prototype.catch = function (t) {\n return this.then(null, t);\n }, u.prototype.then = function (t, e) {\n var n = new this.constructor(i);\n return a(this, new function (t, e, n) {\n this.onFulfilled = \"function\" == typeof t ? t : null, this.onRejected = \"function\" == typeof e ? e : null, this.promise = n;\n }(t, e, n)), n;\n }, u.prototype.finally = r.a, u.all = function (t) {\n return new u(function (e, n) {\n if (!t || void 0 === t.length) throw new TypeError(\"Promise.all accepts an array\");\n var r = Array.prototype.slice.call(t);\n if (0 === r.length) return e([]);\n var o = r.length;\n\n function i(t, u) {\n try {\n if (u && (\"object\" == typeof u || \"function\" == typeof u)) {\n var a = u.then;\n if (\"function\" == typeof a) return void a.call(u, function (e) {\n i(t, e);\n }, n);\n }\n\n r[t] = u, 0 == --o && e(r);\n } catch (t) {\n n(t);\n }\n }\n\n for (var u = 0; u < r.length; u++) {\n i(u, r[u]);\n }\n });\n }, u.resolve = function (t) {\n return t && \"object\" == typeof t && t.constructor === u ? t : new u(function (e) {\n e(t);\n });\n }, u.reject = function (t) {\n return new u(function (e, n) {\n n(t);\n });\n }, u.race = function (t) {\n return new u(function (e, n) {\n for (var r = 0, o = t.length; r < o; r++) {\n t[r].then(e, n);\n }\n });\n }, u._immediateFn = \"function\" == typeof t && function (e) {\n t(e);\n } || function (t) {\n o(t, 0);\n }, u._unhandledRejectionFn = function (t) {\n \"undefined\" != typeof console && console && console.warn(\"Possible Unhandled Promise Rejection:\", t);\n }, e.a = u;\n }).call(this, n(18).setImmediate);\n }, function (t, e, n) {\n \"use strict\";\n\n e.__esModule = !0;\n\n var r = function () {\n function t(t) {\n this.options = t || {};\n }\n\n return t.prototype.request = function (t, e) {\n !function (t, e, n) {\n var r,\n o = {\n headers: {\n Accept: \"application/json\"\n }\n };\n e && e.proxyAgent && (o.agent = e.proxyAgent);\n var i = fetch(t, o);\n (e.timeoutInMs ? Promise.race([i, new Promise(function (n, o) {\n r = setTimeout(function () {\n return o(new Error(t + \" response timeout\"));\n }, e.timeoutInMs);\n })]) : i).then(function (e) {\n return clearTimeout(r), ~~(e.status / 100 != 2) ? e.text().then(function () {\n var n = new Error(\"Unexpected status code [\" + e.status + \"] on URL \" + t);\n throw n.status = e.status, n;\n }) : e.json().then(function (t) {\n var r = e.headers.get(\"cache-control\"),\n o = r ? /max-age=(\\d+)/.exec(r) : null,\n i = o ? parseInt(o[1], 10) : void 0;\n n(null, t, e, i);\n });\n }).catch(function (t) {\n clearTimeout(r), n(t);\n });\n }(t, this.options, e);\n }, t;\n }();\n\n e.DefaultRequestHandler = r;\n }, function (t, e, n) {\n \"use strict\";\n\n function r(t) {\n this.size = 0, this.limit = t, this._keymap = {};\n }\n\n e.__esModule = !0, e.MakeLRUCache = function (t) {\n return new r(t);\n }, r.prototype.put = function (t, e) {\n var n = {\n key: t,\n value: e\n };\n if (this._keymap[t] = n, this.tail ? (this.tail.newer = n, n.older = this.tail) : this.head = n, this.tail = n, this.size === this.limit) return this.shift();\n this.size++;\n }, r.prototype.shift = function () {\n var t = this.head;\n return t && (this.head.newer ? (this.head = this.head.newer, this.head.older = void 0) : this.head = void 0, t.newer = t.older = void 0, delete this._keymap[t.key]), console.log(\"purging \", t.key), t;\n }, r.prototype.get = function (t, e) {\n var n = this._keymap[t];\n if (void 0 !== n) return n === this.tail ? e ? n : n.value : (n.newer && (n === this.head && (this.head = n.newer), n.newer.older = n.older), n.older && (n.older.newer = n.newer), n.newer = void 0, n.older = this.tail, this.tail && (this.tail.newer = n), this.tail = n, e ? n : n.value);\n }, r.prototype.find = function (t) {\n return this._keymap[t];\n }, r.prototype.set = function (t, e) {\n var n,\n r = this.get(t, !0);\n return r ? (n = r.value, r.value = e) : (n = this.put(t, e)) && (n = n.value), n;\n }, r.prototype.remove = function (t) {\n var e = this._keymap[t];\n if (e) return delete this._keymap[e.key], e.newer && e.older ? (e.older.newer = e.newer, e.newer.older = e.older) : e.newer ? (e.newer.older = void 0, this.head = e.newer) : e.older ? (e.older.newer = void 0, this.tail = e.older) : this.head = this.tail = void 0, this.size--, e.value;\n }, r.prototype.removeAll = function () {\n this.head = this.tail = void 0, this.size = 0, this._keymap = {};\n }, \"function\" == typeof Object.keys ? r.prototype.keys = function () {\n return Object.keys(this._keymap);\n } : r.prototype.keys = function () {\n var t = [];\n\n for (var e in this._keymap) {\n t.push(e);\n }\n\n return t;\n }, r.prototype.forEach = function (t, e, n) {\n var r;\n if (!0 === e ? (n = !0, e = void 0) : \"object\" != typeof e && (e = this), n) for (r = this.tail; r;) {\n t.call(e, r.key, r.value, this), r = r.older;\n } else for (r = this.head; r;) {\n t.call(e, r.key, r.value, this), r = r.newer;\n }\n }, r.prototype.toString = function () {\n for (var t = \"\", e = this.head; e;) {\n t += String(e.key) + \":\" + e.value, (e = e.newer) && (t += \" < \");\n }\n\n return t;\n };\n }, function (t, e, n) {\n \"use strict\";\n\n e.__esModule = !0;\n\n var r = n(9),\n o = function () {\n function t(t) {\n void 0 === t && (t = 1e3), this.lru = r.MakeLRUCache(t);\n }\n\n return t.prototype.isExpired = function (t) {\n var e = this.lru.get(t, !1);\n return !!e && 0 !== e.expiredIn && e.expiredIn < Date.now();\n }, t.prototype.get = function (t, e) {\n var n = this.lru.get(t, !1);\n n && !this.isExpired(t) ? e(null, n.data) : e && e(null);\n }, t.prototype.set = function (t, e, n, r) {\n this.lru.remove(t), this.lru.put(t, {\n data: e,\n expiredIn: n ? Date.now() + 1e3 * n : 0\n }), r && r(null);\n }, t.prototype.remove = function (t, e) {\n this.lru.remove(t), e && e(null);\n }, t.prototype.clear = function (t) {\n this.lru.removeAll(), t && t(null);\n }, t;\n }();\n\n e.DefaultApiCache = o;\n }, function (t, e, n) {\n \"use strict\";\n\n e.__esModule = !0;\n\n var r = n(10),\n o = n(8),\n i = function () {\n function t(t, e, n, i) {\n this.requestHandler = t || new o.DefaultRequestHandler({\n proxyAgent: n,\n timeoutInMs: i\n }), this.cache = e || new r.DefaultApiCache();\n }\n\n return t.prototype.request = function (t, e) {\n this.requestHandler.request(t, function (t, n, r, o) {\n t ? e && e(t, null, r, o) : n && e && e(null, n, r, o);\n });\n }, t.prototype.cachedRequest = function (t, e) {\n var n = this,\n r = e || {};\n return new Promise(function (e, o) {\n !function (e) {\n var o = r.cacheKey || t;\n n.cache.get(o, function (i, u) {\n i || u ? e(i, u) : n.request(t, function (t, i, u, a) {\n if (t) e(t, null);else {\n var s = a || r.ttl;\n s && n.cache.set(o, i, s, e), e(null, i);\n }\n });\n });\n }(function (t, n) {\n t && o(t), n && e(n);\n });\n });\n }, t;\n }();\n\n e.default = i;\n }, function (t, e, n) {\n \"use strict\";\n\n e.__esModule = !0;\n var r = decodeURIComponent;\n e.default = {\n parse: function parse(t, e) {\n if (\"string\" != typeof t) throw new TypeError(\"argument str must be a string\");\n var n = {},\n o = e || {},\n i = t.split(/; */),\n u = o.decode || r;\n return i.forEach(function (t) {\n var e = t.indexOf(\"=\");\n\n if (!(e < 0)) {\n var r = t.substr(0, e).trim(),\n o = t.substr(++e, t.length).trim();\n '\"' == o[0] && (o = o.slice(1, -1)), void 0 == n[r] && (n[r] = function (t, e) {\n try {\n return e(t);\n } catch (e) {\n return t;\n }\n }(o, u));\n }\n }), n;\n }\n };\n }, function (t, e, n) {\n \"use strict\";\n\n e.__esModule = !0;\n\n var r = n(4),\n o = n(3),\n i = n(1),\n u = function () {\n function t(t, e) {\n this.api = new o.default(t, e);\n }\n\n return t.prototype.getApi = function () {\n return this.api.get();\n }, t.prototype.everything = function () {\n return this.form(\"everything\");\n }, t.prototype.form = function (t) {\n return new r.LazySearchForm(t, this.api);\n }, t.prototype.query = function (t, e, n) {\n return this.getApi().then(function (r) {\n return r.query(t, e, n);\n });\n }, t.prototype.queryFirst = function (t, e, n) {\n return this.getApi().then(function (r) {\n return r.queryFirst(t, e, n);\n });\n }, t.prototype.getByID = function (t, e, n) {\n return this.getApi().then(function (r) {\n return r.getByID(t, e, n);\n });\n }, t.prototype.getByIDs = function (t, e, n) {\n return this.getApi().then(function (r) {\n return r.getByIDs(t, e, n);\n });\n }, t.prototype.getByUID = function (t, e, n, r) {\n return this.getApi().then(function (o) {\n return o.getByUID(t, e, n, r);\n });\n }, t.prototype.getSingle = function (t, e, n) {\n return this.getApi().then(function (r) {\n return r.getSingle(t, e, n);\n });\n }, t.prototype.getBookmark = function (t, e, n) {\n return this.getApi().then(function (r) {\n return r.getBookmark(t, e, n);\n });\n }, t.prototype.previewSession = function (t, e, n, r) {\n return this.getApi().then(function (o) {\n return o.previewSession(t, e, n, r);\n });\n }, t.prototype.getPreviewResolver = function (t, e) {\n var n = this;\n return i.createPreviewResolver(t, e, function (t) {\n return n.getApi().then(function (e) {\n return e.getByID(t);\n });\n });\n }, t.getApi = function (t, e) {\n return new o.default(t, e).get();\n }, t;\n }();\n\n e.DefaultClient = u;\n }, function (t, e, n) {\n \"use strict\";\n\n var r,\n o = n(6),\n i = n(5),\n u = n(13),\n a = n(3),\n s = n(2);\n !function (t) {\n function e(t, e) {\n return u.DefaultClient.getApi(t, e);\n }\n\n t.experimentCookie = s.EXPERIMENT_COOKIE, t.previewCookie = s.PREVIEW_COOKIE, t.Predicates = o.default, t.Experiments = i.Experiments, t.Api = a.default, t.client = function (t, e) {\n return new u.DefaultClient(t, e);\n }, t.getApi = e, t.api = function (t, n) {\n return e(t, n);\n };\n }(r || (r = {})), t.exports = r;\n }, function (e, n) {\n e.exports = t;\n }, function (t, e) {\n var n,\n r,\n o = t.exports = {};\n\n function i() {\n throw new Error(\"setTimeout has not been defined\");\n }\n\n function u() {\n throw new Error(\"clearTimeout has not been defined\");\n }\n\n function a(t) {\n if (n === setTimeout) return setTimeout(t, 0);\n if ((n === i || !n) && setTimeout) return n = setTimeout, setTimeout(t, 0);\n\n try {\n return n(t, 0);\n } catch (e) {\n try {\n return n.call(null, t, 0);\n } catch (e) {\n return n.call(this, t, 0);\n }\n }\n }\n\n !function () {\n try {\n n = \"function\" == typeof setTimeout ? setTimeout : i;\n } catch (t) {\n n = i;\n }\n\n try {\n r = \"function\" == typeof clearTimeout ? clearTimeout : u;\n } catch (t) {\n r = u;\n }\n }();\n var s,\n f = [],\n c = !1,\n l = -1;\n\n function p() {\n c && s && (c = !1, s.length ? f = s.concat(f) : l = -1, f.length && h());\n }\n\n function h() {\n if (!c) {\n var t = a(p);\n c = !0;\n\n for (var e = f.length; e;) {\n for (s = f, f = []; ++l < e;) {\n s && s[l].run();\n }\n\n l = -1, e = f.length;\n }\n\n s = null, c = !1, function (t) {\n if (r === clearTimeout) return clearTimeout(t);\n if ((r === u || !r) && clearTimeout) return r = clearTimeout, clearTimeout(t);\n\n try {\n r(t);\n } catch (e) {\n try {\n return r.call(null, t);\n } catch (e) {\n return r.call(this, t);\n }\n }\n }(t);\n }\n }\n\n function d(t, e) {\n this.fun = t, this.array = e;\n }\n\n function y() {}\n\n o.nextTick = function (t) {\n var e = new Array(arguments.length - 1);\n if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) {\n e[n - 1] = arguments[n];\n }\n f.push(new d(t, e)), 1 !== f.length || c || a(h);\n }, d.prototype.run = function () {\n this.fun.apply(null, this.array);\n }, o.title = \"browser\", o.browser = !0, o.env = {}, o.argv = [], o.version = \"\", o.versions = {}, o.on = y, o.addListener = y, o.once = y, o.off = y, o.removeListener = y, o.removeAllListeners = y, o.emit = y, o.prependListener = y, o.prependOnceListener = y, o.listeners = function (t) {\n return [];\n }, o.binding = function (t) {\n throw new Error(\"process.binding is not supported\");\n }, o.cwd = function () {\n return \"/\";\n }, o.chdir = function (t) {\n throw new Error(\"process.chdir is not supported\");\n }, o.umask = function () {\n return 0;\n };\n }, function (t, e, n) {\n (function (t) {\n !function (e, n) {\n \"use strict\";\n\n if (!e.setImmediate) {\n var r,\n o = 1,\n i = {},\n u = !1,\n a = e.document,\n s = Object.getPrototypeOf && Object.getPrototypeOf(e);\n s = s && s.setTimeout ? s : e, \"[object process]\" === {}.toString.call(e.process) ? r = function r(e) {\n t.nextTick(function () {\n c(e);\n });\n } : function () {\n if (e.postMessage && !e.importScripts) {\n var t = !0,\n n = e.onmessage;\n return e.onmessage = function () {\n t = !1;\n }, e.postMessage(\"\", \"*\"), e.onmessage = n, t;\n }\n }() ? function () {\n var t = \"setImmediate$\" + Math.random() + \"$\",\n n = function n(_n) {\n _n.source === e && \"string\" == typeof _n.data && 0 === _n.data.indexOf(t) && c(+_n.data.slice(t.length));\n };\n\n e.addEventListener ? e.addEventListener(\"message\", n, !1) : e.attachEvent(\"onmessage\", n), r = function r(n) {\n e.postMessage(t + n, \"*\");\n };\n }() : e.MessageChannel ? function () {\n var t = new MessageChannel();\n t.port1.onmessage = function (t) {\n c(t.data);\n }, r = function r(e) {\n t.port2.postMessage(e);\n };\n }() : a && \"onreadystatechange\" in a.createElement(\"script\") ? function () {\n var t = a.documentElement;\n\n r = function r(e) {\n var n = a.createElement(\"script\");\n n.onreadystatechange = function () {\n c(e), n.onreadystatechange = null, t.removeChild(n), n = null;\n }, t.appendChild(n);\n };\n }() : r = function r(t) {\n setTimeout(c, 0, t);\n }, s.setImmediate = function (t) {\n \"function\" != typeof t && (t = new Function(\"\" + t));\n\n for (var e = new Array(arguments.length - 1), n = 0; n < e.length; n++) {\n e[n] = arguments[n + 1];\n }\n\n var u = {\n callback: t,\n args: e\n };\n return i[o] = u, r(o), o++;\n }, s.clearImmediate = f;\n }\n\n function f(t) {\n delete i[t];\n }\n\n function c(t) {\n if (u) setTimeout(c, 0, t);else {\n var e = i[t];\n\n if (e) {\n u = !0;\n\n try {\n !function (t) {\n var e = t.callback,\n r = t.args;\n\n switch (r.length) {\n case 0:\n e();\n break;\n\n case 1:\n e(r[0]);\n break;\n\n case 2:\n e(r[0], r[1]);\n break;\n\n case 3:\n e(r[0], r[1], r[2]);\n break;\n\n default:\n e.apply(n, r);\n }\n }(e);\n } finally {\n f(t), u = !1;\n }\n }\n }\n }\n }(\"undefined\" == typeof self ? \"undefined\" == typeof global ? this : global : self);\n }).call(this, n(16));\n }, function (t, e, n) {\n var r = \"undefined\" != typeof global && global || \"undefined\" != typeof self && self || window,\n o = Function.prototype.apply;\n\n function i(t, e) {\n this._id = t, this._clearFn = e;\n }\n\n e.setTimeout = function () {\n return new i(o.call(setTimeout, r, arguments), clearTimeout);\n }, e.setInterval = function () {\n return new i(o.call(setInterval, r, arguments), clearInterval);\n }, e.clearTimeout = e.clearInterval = function (t) {\n t && t.close();\n }, i.prototype.unref = i.prototype.ref = function () {}, i.prototype.close = function () {\n this._clearFn.call(r, this._id);\n }, e.enroll = function (t, e) {\n clearTimeout(t._idleTimeoutId), t._idleTimeout = e;\n }, e.unenroll = function (t) {\n clearTimeout(t._idleTimeoutId), t._idleTimeout = -1;\n }, e._unrefActive = e.active = function (t) {\n clearTimeout(t._idleTimeoutId);\n var e = t._idleTimeout;\n e >= 0 && (t._idleTimeoutId = setTimeout(function () {\n t._onTimeout && t._onTimeout();\n }, e));\n }, n(17), e.setImmediate = \"undefined\" != typeof self && self.setImmediate || \"undefined\" != typeof global && global.setImmediate || this && this.setImmediate, e.clearImmediate = \"undefined\" != typeof self && self.clearImmediate || \"undefined\" != typeof global && global.clearImmediate || this && this.clearImmediate;\n }, function (t, e, n) {\n \"use strict\";\n\n n.r(e);\n\n var r = n(7),\n o = n(0),\n i = function () {\n if (\"undefined\" != typeof self) return self;\n if (\"undefined\" != typeof window) return window;\n if (\"undefined\" != typeof global) return global;\n throw new Error(\"unable to locate global object\");\n }();\n\n i.Promise ? i.Promise.prototype.finally || (i.Promise.prototype.finally = o.a) : i.Promise = r.a;\n }, function (t, e, n) {\n n(19), n(15), t.exports = n(14);\n }]);\n});","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\n\n/* global Reflect, Promise */\nvar _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nvar _assign = function __assign() {\n _assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return _assign.apply(this, arguments);\n};\n\nexport { _assign as __assign };\nexport function __rest(s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {\n if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n }\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\nexport function __param(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\nexport function __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function sent() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n\n while (_) {\n try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n\n case 7:\n op = _.ops.pop();\n\n _.trys.pop();\n\n continue;\n\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n\n if (t && _.label < t[2]) {\n _.label = t[2];\n\n _.ops.push(op);\n\n break;\n }\n\n if (t[2]) _.ops.pop();\n\n _.trys.pop();\n\n continue;\n }\n\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n }\n\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\nexport var __createBinding = Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n};\nexport function __exportStar(m, o) {\n for (var p in m) {\n if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n }\n}\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function next() {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {\n ar.push(r.value);\n }\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n\n return ar;\n}\n/** @deprecated */\n\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++) {\n ar = ar.concat(__read(arguments[i]));\n }\n\n return ar;\n}\n/** @deprecated */\n\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) {\n s += arguments[i].length;\n }\n\n for (var r = Array(s), k = 0, i = 0; i < il; i++) {\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {\n r[k] = a[j];\n }\n }\n\n return r;\n}\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || from);\n}\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []),\n i,\n q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i;\n\n function verb(n) {\n if (g[n]) i[n] = function (v) {\n return new Promise(function (a, b) {\n q.push([n, v, a, b]) > 1 || resume(n, v);\n });\n };\n }\n\n function resume(n, v) {\n try {\n step(g[n](v));\n } catch (e) {\n settle(q[0][3], e);\n }\n }\n\n function step(r) {\n r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);\n }\n\n function fulfill(value) {\n resume(\"next\", value);\n }\n\n function reject(value) {\n resume(\"throw\", value);\n }\n\n function settle(f, v) {\n if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);\n }\n}\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) {\n throw e;\n }), verb(\"return\"), i[Symbol.iterator] = function () {\n return this;\n }, i;\n\n function verb(n, f) {\n i[n] = o[n] ? function (v) {\n return (p = !p) ? {\n value: __await(o[n](v)),\n done: n === \"return\"\n } : f ? f(v) : v;\n } : f;\n }\n}\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator],\n i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i);\n\n function verb(n) {\n i[n] = o[n] && function (v) {\n return new Promise(function (resolve, reject) {\n v = o[n](v), settle(resolve, reject, v.done, v.value);\n });\n };\n }\n\n function settle(resolve, reject, d, v) {\n Promise.resolve(v).then(function (v) {\n resolve({\n value: v,\n done: d\n });\n }, reject);\n }\n}\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n\n return cooked;\n}\n;\n\nvar __setModuleDefault = Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n }\n\n __setModuleDefault(result, mod);\n\n return result;\n}\nexport function __importDefault(mod) {\n return mod && mod.__esModule ? mod : {\n default: mod\n };\n}\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;\n}","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\n\n/* global Reflect, Promise */\nvar _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nvar _assign = function __assign() {\n _assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return _assign.apply(this, arguments);\n};\n\nexport { _assign as __assign };\nexport function __rest(s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {\n if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n }\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\nexport function __param(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\nexport function __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function sent() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n\n while (_) {\n try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n\n case 7:\n op = _.ops.pop();\n\n _.trys.pop();\n\n continue;\n\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n\n if (t && _.label < t[2]) {\n _.label = t[2];\n\n _.ops.push(op);\n\n break;\n }\n\n if (t[2]) _.ops.pop();\n\n _.trys.pop();\n\n continue;\n }\n\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n }\n\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\nexport var __createBinding = Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n};\nexport function __exportStar(m, o) {\n for (var p in m) {\n if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n }\n}\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function next() {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {\n ar.push(r.value);\n }\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n\n return ar;\n}\n/** @deprecated */\n\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++) {\n ar = ar.concat(__read(arguments[i]));\n }\n\n return ar;\n}\n/** @deprecated */\n\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) {\n s += arguments[i].length;\n }\n\n for (var r = Array(s), k = 0, i = 0; i < il; i++) {\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {\n r[k] = a[j];\n }\n }\n\n return r;\n}\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || from);\n}\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []),\n i,\n q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i;\n\n function verb(n) {\n if (g[n]) i[n] = function (v) {\n return new Promise(function (a, b) {\n q.push([n, v, a, b]) > 1 || resume(n, v);\n });\n };\n }\n\n function resume(n, v) {\n try {\n step(g[n](v));\n } catch (e) {\n settle(q[0][3], e);\n }\n }\n\n function step(r) {\n r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);\n }\n\n function fulfill(value) {\n resume(\"next\", value);\n }\n\n function reject(value) {\n resume(\"throw\", value);\n }\n\n function settle(f, v) {\n if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);\n }\n}\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) {\n throw e;\n }), verb(\"return\"), i[Symbol.iterator] = function () {\n return this;\n }, i;\n\n function verb(n, f) {\n i[n] = o[n] ? function (v) {\n return (p = !p) ? {\n value: __await(o[n](v)),\n done: n === \"return\"\n } : f ? f(v) : v;\n } : f;\n }\n}\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator],\n i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i);\n\n function verb(n) {\n i[n] = o[n] && function (v) {\n return new Promise(function (resolve, reject) {\n v = o[n](v), settle(resolve, reject, v.done, v.value);\n });\n };\n }\n\n function settle(resolve, reject, d, v) {\n Promise.resolve(v).then(function (v) {\n resolve({\n value: v,\n done: d\n });\n }, reject);\n }\n}\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n\n return cooked;\n}\n;\n\nvar __setModuleDefault = Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n }\n\n __setModuleDefault(result, mod);\n\n return result;\n}\nexport function __importDefault(mod) {\n return mod && mod.__esModule ? mod : {\n default: mod\n };\n}\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;\n}","/**\n * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt\n */\nvar SUPPORTED_LOCALE = {\n tr: {\n regexp: /\\u0130|\\u0049|\\u0049\\u0307/g,\n map: {\n İ: \"i\",\n I: \"\\u0131\",\n İ: \"i\"\n }\n },\n az: {\n regexp: /\\u0130/g,\n map: {\n İ: \"i\",\n I: \"\\u0131\",\n İ: \"i\"\n }\n },\n lt: {\n regexp: /\\u0049|\\u004A|\\u012E|\\u00CC|\\u00CD|\\u0128/g,\n map: {\n I: \"i\\u0307\",\n J: \"j\\u0307\",\n Į: \"\\u012F\\u0307\",\n Ì: \"i\\u0307\\u0300\",\n Í: \"i\\u0307\\u0301\",\n Ĩ: \"i\\u0307\\u0303\"\n }\n }\n};\n/**\n * Localized lower case.\n */\n\nexport function localeLowerCase(str, locale) {\n var lang = SUPPORTED_LOCALE[locale.toLowerCase()];\n if (lang) return lowerCase(str.replace(lang.regexp, function (m) {\n return lang.map[m];\n }));\n return lowerCase(str);\n}\n/**\n * Lower case as a function.\n */\n\nexport function lowerCase(str) {\n return str.toLowerCase();\n}","import { lowerCase } from \"lower-case\"; // Support camel case (\"camelCase\" -> \"camel Case\" and \"CAMELCase\" -> \"CAMEL Case\").\n\nvar DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g]; // Remove all non-word characters.\n\nvar DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;\n/**\n * Normalize the string into something other libraries can manipulate easier.\n */\n\nexport function noCase(input, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _a = options.splitRegexp,\n splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a,\n _b = options.stripRegexp,\n stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b,\n _c = options.transform,\n transform = _c === void 0 ? lowerCase : _c,\n _d = options.delimiter,\n delimiter = _d === void 0 ? \" \" : _d;\n var result = replace(replace(input, splitRegexp, \"$1\\0$2\"), stripRegexp, \"\\0\");\n var start = 0;\n var end = result.length; // Trim the delimiter from around the output string.\n\n while (result.charAt(start) === \"\\0\") {\n start++;\n }\n\n while (result.charAt(end - 1) === \"\\0\") {\n end--;\n } // Transform each token independently.\n\n\n return result.slice(start, end).split(\"\\0\").map(transform).join(delimiter);\n}\n/**\n * Replace `re` in the input string with the replacement value.\n */\n\nfunction replace(input, re, value) {\n if (re instanceof RegExp) return input.replace(re, value);\n return re.reduce(function (input, re) {\n return input.replace(re, value);\n }, input);\n}","import { __assign } from \"tslib\";\nimport { noCase } from \"no-case\";\nexport function pascalCaseTransform(input, index) {\n var firstChar = input.charAt(0);\n var lowerChars = input.substr(1).toLowerCase();\n\n if (index > 0 && firstChar >= \"0\" && firstChar <= \"9\") {\n return \"_\" + firstChar + lowerChars;\n }\n\n return \"\" + firstChar.toUpperCase() + lowerChars;\n}\nexport function pascalCaseTransformMerge(input) {\n return input.charAt(0).toUpperCase() + input.slice(1).toLowerCase();\n}\nexport function pascalCase(input, options) {\n if (options === void 0) {\n options = {};\n }\n\n return noCase(input, __assign({\n delimiter: \"\",\n transform: pascalCaseTransform\n }, options));\n}","import { __assign } from \"tslib\";\nimport { pascalCase, pascalCaseTransform, pascalCaseTransformMerge } from \"pascal-case\";\nexport function camelCaseTransform(input, index) {\n if (index === 0) return input.toLowerCase();\n return pascalCaseTransform(input, index);\n}\nexport function camelCaseTransformMerge(input, index) {\n if (index === 0) return input.toLowerCase();\n return pascalCaseTransformMerge(input);\n}\nexport function camelCase(input, options) {\n if (options === void 0) {\n options = {};\n }\n\n return pascalCase(input, __assign({\n transform: camelCaseTransform\n }, options));\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}","export default function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nexport default function _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n\n return _wrapNativeSuper(Class);\n}","export default function _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}","import _toArray from \"/codebuild/output/src2413876279/src/leoandlea-blog/node_modules/@babel/runtime/helpers/esm/toArray\";\nimport _slicedToArray from \"/codebuild/output/src2413876279/src/leoandlea-blog/node_modules/@babel/runtime/helpers/esm/slicedToArray\";\nimport _toConsumableArray from \"/codebuild/output/src2413876279/src/leoandlea-blog/node_modules/@babel/runtime/helpers/esm/toConsumableArray\";\nimport _assertThisInitialized from \"/codebuild/output/src2413876279/src/leoandlea-blog/node_modules/@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"/codebuild/output/src2413876279/src/leoandlea-blog/node_modules/@babel/runtime/helpers/esm/inherits\";\nimport _possibleConstructorReturn from \"/codebuild/output/src2413876279/src/leoandlea-blog/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _getPrototypeOf from \"/codebuild/output/src2413876279/src/leoandlea-blog/node_modules/@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _wrapNativeSuper from \"/codebuild/output/src2413876279/src/leoandlea-blog/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper\";\nimport _classCallCheck from \"/codebuild/output/src2413876279/src/leoandlea-blog/node_modules/@babel/runtime/helpers/esm/classCallCheck\";\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nimport _regeneratorRuntime from \"/codebuild/output/src2413876279/src/leoandlea-blog/node_modules/@babel/runtime/regenerator\";\n\nvar _marked = /*#__PURE__*/_regeneratorRuntime.mark(toFailures),\n _marked2 = /*#__PURE__*/_regeneratorRuntime.mark(_check);\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n/**\n * Convert a validation result to an iterable of failures.\n */\n\n\nfunction toFailures(result, context) {\n return _regeneratorRuntime.wrap(function toFailures$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if (!(result === true)) {\n _context.next = 4;\n break;\n }\n\n ;\n _context.next = 10;\n break;\n\n case 4:\n if (!(result === false)) {\n _context.next = 9;\n break;\n }\n\n _context.next = 7;\n return context.fail();\n\n case 7:\n _context.next = 10;\n break;\n\n case 9:\n return _context.delegateYield(result, \"t0\", 10);\n\n case 10:\n case \"end\":\n return _context.stop();\n }\n }\n }, _marked);\n}\n/**\n * Shifts (removes and returns) the first value from the `input` iterator.\n * Like `Array.prototype.shift()` but for an `Iterator`.\n */\n\n\nfunction iteratorShift(input) {\n var _input$next = input.next(),\n done = _input$next.done,\n value = _input$next.value;\n\n return done ? undefined : value;\n}\n/**\n * `Struct` objects encapsulate the schema for a specific data type (with\n * optional coercion). You can then use the `assert`, `is` or `validate` helpers\n * to validate unknown data against a struct.\n */\n\n\nvar Struct = function Struct(props) {\n _classCallCheck(this, Struct);\n\n var type = props.type,\n schema = props.schema,\n _props$coercer = props.coercer,\n coercer = _props$coercer === void 0 ? function (value) {\n return value;\n } : _props$coercer,\n _props$validator = props.validator,\n validator = _props$validator === void 0 ? function () {\n return [];\n } : _props$validator,\n _props$refiner = props.refiner,\n refiner = _props$refiner === void 0 ? function () {\n return [];\n } : _props$refiner;\n this.type = type;\n this.schema = schema;\n this.coercer = coercer;\n this.validator = validator;\n this.refiner = refiner;\n};\n/**\n * `StructError` objects are thrown (or returned) by Superstruct when its\n * validation fails. The error represents the first error encountered during\n * validation. But they also have an `error.failures` property that holds\n * information for all of the failures encountered.\n */\n\n\nvar StructError = /*#__PURE__*/function (_TypeError) {\n _inherits(StructError, _TypeError);\n\n var _super = _createSuper(StructError);\n\n function StructError(failure, moreFailures) {\n var _this;\n\n _classCallCheck(this, StructError);\n\n var path = failure.path,\n value = failure.value,\n type = failure.type,\n branch = failure.branch,\n rest = _objectWithoutProperties(failure, [\"path\", \"value\", \"type\", \"branch\"]);\n\n var message = \"Expected a value of type `\".concat(type, \"`\").concat(path.length ? \" for `\".concat(path.join('.'), \"`\") : '', \" but received `\").concat(JSON.stringify(value), \"`.\");\n var failuresResult;\n\n function failures() {\n if (!failuresResult) {\n failuresResult = [failure].concat(_toConsumableArray(moreFailures));\n }\n\n return failuresResult;\n }\n\n _this = _super.call(this, message);\n _this.value = value;\n Object.assign(_assertThisInitialized(_this), rest);\n _this.type = type;\n _this.path = path;\n _this.branch = branch;\n _this.failures = failures;\n _this.stack = new Error().stack;\n _this.__proto__ = StructError.prototype;\n return _this;\n }\n\n return StructError;\n}( /*#__PURE__*/_wrapNativeSuper(TypeError));\n/**\n * Assert that a value passes a `Struct`, throwing if it doesn't.\n */\n\n\nfunction assert(value, struct) {\n var result = validate(value, struct);\n\n if (result[0]) {\n throw result[0];\n }\n}\n/**\n * Coerce a value with the coercion logic of `Struct` and validate it.\n */\n\n\nfunction coerce(value, struct) {\n var ret = struct.coercer(value);\n assert(ret, struct);\n return ret;\n}\n/**\n * Check if a value passes a `Struct`.\n */\n\n\nfunction is(value, struct) {\n var result = validate(value, struct);\n return !result[0];\n}\n/**\n * Validate a value against a `Struct`, returning an error if invalid.\n */\n\n\nfunction validate(value, struct) {\n var coercing = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n if (coercing) {\n value = struct.coercer(value);\n }\n\n var failures = _check(value, struct);\n\n var failure = iteratorShift(failures);\n\n if (failure) {\n var error = new StructError(failure, failures);\n return [error, undefined];\n } else {\n return [undefined, value];\n }\n}\n/**\n * Check a value against a `Struct`, returning an iterable of failures.\n */\n\n\nfunction _check(value, struct) {\n var path,\n branch,\n type,\n ctx,\n failures,\n failure,\n _args2 = arguments;\n return _regeneratorRuntime.wrap(function _check$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n path = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : [];\n branch = _args2.length > 3 && _args2[3] !== undefined ? _args2[3] : [];\n type = struct.type;\n ctx = {\n value: value,\n type: type,\n branch: branch,\n path: path,\n fail: function fail() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return _objectSpread2({\n value: value,\n type: type,\n path: path,\n branch: [].concat(_toConsumableArray(branch), [value])\n }, props);\n },\n check: function check(v, s, parent, key) {\n var p = parent !== undefined ? [].concat(_toConsumableArray(path), [key]) : path;\n var b = parent !== undefined ? [].concat(_toConsumableArray(branch), [parent]) : branch;\n return _check(v, s, p, b);\n }\n };\n failures = toFailures(struct.validator(value, ctx), ctx);\n failure = iteratorShift(failures);\n\n if (!failure) {\n _context2.next = 12;\n break;\n }\n\n _context2.next = 9;\n return failure;\n\n case 9:\n return _context2.delegateYield(failures, \"t0\", 10);\n\n case 10:\n _context2.next = 13;\n break;\n\n case 12:\n return _context2.delegateYield(toFailures(struct.refiner(value, ctx), ctx), \"t1\", 13);\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _marked2);\n}\n/**\n * Augment a `Struct` to add an additional coercion step to its input.\n */\n\n\nfunction coercion(struct, _coercer) {\n var fn = struct.coercer;\n return new Struct(_objectSpread2(_objectSpread2({}, struct), {}, {\n coercer: function coercer(value) {\n return fn(_coercer(value));\n }\n }));\n}\n/**\n * Augment a struct to coerce a default value for missing values.\n *\n * Note: You must use `coerce(value, Struct)` on the value before validating it\n * to have the value defaulted!\n */\n\n\nfunction defaulted(S, fallback, strict) {\n return coercion(S, function (x) {\n var f = typeof fallback === 'function' ? fallback() : fallback;\n\n if (x === undefined) {\n return f;\n }\n\n if (strict !== true && isPlainObject(x) && isPlainObject(f)) {\n var ret = _objectSpread2({}, x);\n\n var changed = false;\n\n for (var key in f) {\n if (ret[key] === undefined) {\n ret[key] = f[key];\n changed = true;\n }\n }\n\n if (changed) {\n return ret;\n }\n }\n\n return x;\n });\n}\n/**\n * Coerce a value to mask its properties to only that defined in the struct.\n */\n\n\nfunction masked(S) {\n return coercion(S, function (x) {\n if (!isPlainObject(x)) {\n return x;\n }\n\n var ret = {};\n\n for (var key in S.schema) {\n ret[key] = x[key];\n }\n\n return ret;\n });\n}\n/**\n * Check if a value is a plain object.\n */\n\n\nfunction isPlainObject(value) {\n if (Object.prototype.toString.call(value) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(value);\n return prototype === null || prototype === Object.prototype;\n}\n/**\n * Augment a string or array struct to constrain its length to zero.\n */\n\n\nfunction empty(S) {\n return refinement(S, \"\".concat(S.type, \" & Empty\"), function (value) {\n return value.length === 0;\n });\n}\n/**\n * Augment a string or array struct to constrain its length to being between a\n * minimum and maximum size.\n */\n\n\nfunction length(S, min, max) {\n return refinement(S, \"\".concat(S.type, \" & Length<\").concat(min, \",\").concat(max, \">\"), function (value) {\n return min < value.length && value.length < max;\n });\n}\n/**\n * Refine a string struct to match a specific regexp pattern.\n */\n\n\nfunction pattern(S, regexp) {\n return refinement(S, \"\".concat(S.type, \" & Pattern<\").concat(regexp.source, \">\"), function (value) {\n return regexp.test(value);\n });\n}\n/**\n * Augment a `Struct` to add an additional refinement to the validation.\n */\n\n\nfunction refinement(struct, type, _refiner) {\n var fn = struct.refiner;\n return new Struct(_objectSpread2(_objectSpread2({}, struct), {}, {\n type: type,\n refiner: /*#__PURE__*/_regeneratorRuntime.mark(function refiner(value, fail) {\n return _regeneratorRuntime.wrap(function refiner$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n return _context3.delegateYield(toFailures(fn(value, fail), fail), \"t0\", 1);\n\n case 1:\n return _context3.delegateYield(toFailures(_refiner(value, fail), fail), \"t1\", 2);\n\n case 2:\n case \"end\":\n return _context3.stop();\n }\n }\n }, refiner);\n })\n }));\n}\n/**\n * Validate any value.\n */\n\n\nfunction any() {\n return struct('any', function () {\n return true;\n });\n}\n\nfunction array(Element) {\n return new Struct({\n type: \"Array<\".concat(Element ? Element.type : 'unknown', \">\"),\n schema: Element,\n coercer: function coercer(value) {\n return Element && Array.isArray(value) ? value.map(function (v) {\n return coerce(v, Element);\n }) : value;\n },\n validator: /*#__PURE__*/_regeneratorRuntime.mark(function validator(value, ctx) {\n var _iterator, _step, _step$value, i, v;\n\n return _regeneratorRuntime.wrap(function validator$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n if (Array.isArray(value)) {\n _context4.next = 4;\n break;\n }\n\n _context4.next = 3;\n return ctx.fail();\n\n case 3:\n return _context4.abrupt(\"return\");\n\n case 4:\n if (!Element) {\n _context4.next = 21;\n break;\n }\n\n _iterator = _createForOfIteratorHelper(value.entries());\n _context4.prev = 6;\n\n _iterator.s();\n\n case 8:\n if ((_step = _iterator.n()).done) {\n _context4.next = 13;\n break;\n }\n\n _step$value = _slicedToArray(_step.value, 2), i = _step$value[0], v = _step$value[1];\n return _context4.delegateYield(ctx.check(v, Element, value, i), \"t0\", 11);\n\n case 11:\n _context4.next = 8;\n break;\n\n case 13:\n _context4.next = 18;\n break;\n\n case 15:\n _context4.prev = 15;\n _context4.t1 = _context4[\"catch\"](6);\n\n _iterator.e(_context4.t1);\n\n case 18:\n _context4.prev = 18;\n\n _iterator.f();\n\n return _context4.finish(18);\n\n case 21:\n case \"end\":\n return _context4.stop();\n }\n }\n }, validator, null, [[6, 15, 18, 21]]);\n })\n });\n}\n/**\n * Validate that boolean values.\n */\n\n\nfunction boolean() {\n return struct('boolean', function (value) {\n return typeof value === 'boolean';\n });\n}\n/**\n * Validate that `Date` values.\n *\n * Note: this also ensures that the value is *not* an invalid `Date` object,\n * which can occur when parsing a date fails but still returns a `Date`.\n */\n\n\nfunction date() {\n return struct('Date', function (value) {\n return value instanceof Date && !isNaN(value.getTime());\n });\n}\n/**\n * Validate that a value dynamically, determing which struct to use at runtime.\n */\n\n\nfunction dynamic(fn) {\n return struct('Dynamic<...>', function (value, ctx) {\n return ctx.check(value, fn(value, ctx));\n });\n}\n\nfunction enums(values) {\n return struct(\"Enum<\".concat(values.map(toLiteralString), \">\"), function (value) {\n return values.includes(value);\n });\n}\n/**\n * Validate that a value is a function.\n */\n\n\nfunction func() {\n return struct('Function', function (value) {\n return typeof value === 'function';\n });\n}\n/**\n * Validate that a value is an instance of a class.\n */\n\n\nfunction instance(Class) {\n return struct(\"InstanceOf<\".concat(Class.name, \">\"), function (value) {\n return value instanceof Class;\n });\n}\n\nfunction intersection(Structs) {\n return struct(Structs.map(function (s) {\n return s.type;\n }).join(' & '), /*#__PURE__*/_regeneratorRuntime.mark(function _callee(value, ctx) {\n var _iterator2, _step2, S;\n\n return _regeneratorRuntime.wrap(function _callee$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n _iterator2 = _createForOfIteratorHelper(Structs);\n _context5.prev = 1;\n\n _iterator2.s();\n\n case 3:\n if ((_step2 = _iterator2.n()).done) {\n _context5.next = 8;\n break;\n }\n\n S = _step2.value;\n return _context5.delegateYield(ctx.check(value, S), \"t0\", 6);\n\n case 6:\n _context5.next = 3;\n break;\n\n case 8:\n _context5.next = 13;\n break;\n\n case 10:\n _context5.prev = 10;\n _context5.t1 = _context5[\"catch\"](1);\n\n _iterator2.e(_context5.t1);\n\n case 13:\n _context5.prev = 13;\n\n _iterator2.f();\n\n return _context5.finish(13);\n\n case 16:\n case \"end\":\n return _context5.stop();\n }\n }\n }, _callee, null, [[1, 10, 13, 16]]);\n }));\n}\n/**\n * Validate a value lazily, by constructing the struct right before the first\n * validation. This is useful for cases where you want to have self-referential\n * structs for nested data structures.\n */\n\n\nfunction lazy(fn) {\n var S;\n return struct('Lazy<...>', function (value, ctx) {\n if (!S) {\n S = fn();\n }\n\n return ctx.check(value, S);\n });\n}\n\nfunction literal(constant) {\n return struct(\"Literal<\".concat(toLiteralString(constant), \">\"), function (value) {\n return value === constant;\n });\n}\n/**\n * Validate that a value is a map with specific key and value entries.\n */\n\n\nfunction map(Key, Value) {\n return struct(\"Map<\".concat(Key.type, \",\").concat(Value.type, \">\"), /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(value, ctx) {\n var _iterator3, _step3, _step3$value, k, v;\n\n return _regeneratorRuntime.wrap(function _callee2$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n if (value instanceof Map) {\n _context6.next = 4;\n break;\n }\n\n _context6.next = 3;\n return ctx.fail();\n\n case 3:\n return _context6.abrupt(\"return\");\n\n case 4:\n _iterator3 = _createForOfIteratorHelper(value.entries());\n _context6.prev = 5;\n\n _iterator3.s();\n\n case 7:\n if ((_step3 = _iterator3.n()).done) {\n _context6.next = 13;\n break;\n }\n\n _step3$value = _slicedToArray(_step3.value, 2), k = _step3$value[0], v = _step3$value[1];\n return _context6.delegateYield(ctx.check(k, Key, value, k), \"t0\", 10);\n\n case 10:\n return _context6.delegateYield(ctx.check(v, Value, value, k), \"t1\", 11);\n\n case 11:\n _context6.next = 7;\n break;\n\n case 13:\n _context6.next = 18;\n break;\n\n case 15:\n _context6.prev = 15;\n _context6.t2 = _context6[\"catch\"](5);\n\n _iterator3.e(_context6.t2);\n\n case 18:\n _context6.prev = 18;\n\n _iterator3.f();\n\n return _context6.finish(18);\n\n case 21:\n case \"end\":\n return _context6.stop();\n }\n }\n }, _callee2, null, [[5, 15, 18, 21]]);\n }));\n}\n/**\n * Validate that a value always fails.\n */\n\n\nfunction never() {\n return struct('never', function () {\n return false;\n });\n}\n/**\n * Augment a struct to make it accept `null` values.\n */\n\n\nfunction nullable(S) {\n return new Struct({\n type: \"\".concat(S.type, \" | null\"),\n schema: S.schema,\n validator: function validator(value, ctx) {\n return value === null || ctx.check(value, S);\n }\n });\n}\n/**\n * Validate that a value is a number.\n */\n\n\nfunction number() {\n return struct(\"number\", function (value) {\n return typeof value === 'number' && !isNaN(value);\n });\n}\n\nfunction object(Structs) {\n var knowns = Structs ? Object.keys(Structs) : [];\n var Never = never();\n return new Struct({\n type: Structs ? \"Object<{\".concat(knowns.join(','), \"}>\") : 'Object',\n schema: Structs ? Structs : null,\n coercer: Structs ? createObjectCoercer(Structs) : function (x) {\n return x;\n },\n validator: /*#__PURE__*/_regeneratorRuntime.mark(function validator(value, ctx) {\n var unknowns, _iterator4, _step4, key, Value, v, _iterator5, _step5, _key, _v;\n\n return _regeneratorRuntime.wrap(function validator$(_context7) {\n while (1) {\n switch (_context7.prev = _context7.next) {\n case 0:\n if (!(typeof value !== 'object' || value == null)) {\n _context7.next = 4;\n break;\n }\n\n _context7.next = 3;\n return ctx.fail();\n\n case 3:\n return _context7.abrupt(\"return\");\n\n case 4:\n if (!Structs) {\n _context7.next = 42;\n break;\n }\n\n unknowns = new Set(Object.keys(value));\n _iterator4 = _createForOfIteratorHelper(knowns);\n _context7.prev = 7;\n\n _iterator4.s();\n\n case 9:\n if ((_step4 = _iterator4.n()).done) {\n _context7.next = 17;\n break;\n }\n\n key = _step4.value;\n unknowns.delete(key);\n Value = Structs[key];\n v = value[key];\n return _context7.delegateYield(ctx.check(v, Value, value, key), \"t0\", 15);\n\n case 15:\n _context7.next = 9;\n break;\n\n case 17:\n _context7.next = 22;\n break;\n\n case 19:\n _context7.prev = 19;\n _context7.t1 = _context7[\"catch\"](7);\n\n _iterator4.e(_context7.t1);\n\n case 22:\n _context7.prev = 22;\n\n _iterator4.f();\n\n return _context7.finish(22);\n\n case 25:\n _iterator5 = _createForOfIteratorHelper(unknowns);\n _context7.prev = 26;\n\n _iterator5.s();\n\n case 28:\n if ((_step5 = _iterator5.n()).done) {\n _context7.next = 34;\n break;\n }\n\n _key = _step5.value;\n _v = value[_key];\n return _context7.delegateYield(ctx.check(_v, Never, value, _key), \"t2\", 32);\n\n case 32:\n _context7.next = 28;\n break;\n\n case 34:\n _context7.next = 39;\n break;\n\n case 36:\n _context7.prev = 36;\n _context7.t3 = _context7[\"catch\"](26);\n\n _iterator5.e(_context7.t3);\n\n case 39:\n _context7.prev = 39;\n\n _iterator5.f();\n\n return _context7.finish(39);\n\n case 42:\n case \"end\":\n return _context7.stop();\n }\n }\n }, validator, null, [[7, 19, 22, 25], [26, 36, 39, 42]]);\n })\n });\n}\n/**\n * Augment a struct to make it optionally accept `undefined` values.\n */\n\n\nfunction optional(S) {\n return new Struct({\n type: \"\".concat(S.type, \"?\"),\n schema: S.schema,\n validator: function validator(value, ctx) {\n return value === undefined || ctx.check(value, S);\n }\n });\n}\n/**\n * Validate that a partial object with specific entry values.\n */\n\n\nfunction partial(Structs) {\n if (Structs instanceof Struct) {\n Structs = Structs.schema;\n }\n\n var knowns = Object.keys(Structs);\n var Never = never();\n return new Struct({\n type: \"Partial<{\".concat(knowns.join(','), \"}>\"),\n schema: Structs,\n coercer: createObjectCoercer(Structs),\n validator: /*#__PURE__*/_regeneratorRuntime.mark(function validator(value, ctx) {\n var unknowns, _iterator6, _step6, key, Value, v, _iterator7, _step7, _key2, _v2;\n\n return _regeneratorRuntime.wrap(function validator$(_context8) {\n while (1) {\n switch (_context8.prev = _context8.next) {\n case 0:\n if (!(typeof value !== 'object' || value == null)) {\n _context8.next = 4;\n break;\n }\n\n _context8.next = 3;\n return ctx.fail();\n\n case 3:\n return _context8.abrupt(\"return\");\n\n case 4:\n unknowns = new Set(Object.keys(value));\n _iterator6 = _createForOfIteratorHelper(knowns);\n _context8.prev = 6;\n\n _iterator6.s();\n\n case 8:\n if ((_step6 = _iterator6.n()).done) {\n _context8.next = 18;\n break;\n }\n\n key = _step6.value;\n unknowns.delete(key);\n\n if (key in value) {\n _context8.next = 13;\n break;\n }\n\n return _context8.abrupt(\"continue\", 16);\n\n case 13:\n Value = Structs[key];\n v = value[key];\n return _context8.delegateYield(ctx.check(v, Value, value, key), \"t0\", 16);\n\n case 16:\n _context8.next = 8;\n break;\n\n case 18:\n _context8.next = 23;\n break;\n\n case 20:\n _context8.prev = 20;\n _context8.t1 = _context8[\"catch\"](6);\n\n _iterator6.e(_context8.t1);\n\n case 23:\n _context8.prev = 23;\n\n _iterator6.f();\n\n return _context8.finish(23);\n\n case 26:\n _iterator7 = _createForOfIteratorHelper(unknowns);\n _context8.prev = 27;\n\n _iterator7.s();\n\n case 29:\n if ((_step7 = _iterator7.n()).done) {\n _context8.next = 35;\n break;\n }\n\n _key2 = _step7.value;\n _v2 = value[_key2];\n return _context8.delegateYield(ctx.check(_v2, Never, value, _key2), \"t2\", 33);\n\n case 33:\n _context8.next = 29;\n break;\n\n case 35:\n _context8.next = 40;\n break;\n\n case 37:\n _context8.prev = 37;\n _context8.t3 = _context8[\"catch\"](27);\n\n _iterator7.e(_context8.t3);\n\n case 40:\n _context8.prev = 40;\n\n _iterator7.f();\n\n return _context8.finish(40);\n\n case 43:\n case \"end\":\n return _context8.stop();\n }\n }\n }, validator, null, [[6, 20, 23, 26], [27, 37, 40, 43]]);\n })\n });\n}\n/**\n * Validate that a value is a record with specific key and\n * value entries.\n */\n\n\nfunction record(Key, Value) {\n return struct(\"Record<\".concat(Key.type, \",\").concat(Value.type, \">\"), /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(value, ctx) {\n var k, v;\n return _regeneratorRuntime.wrap(function _callee3$(_context9) {\n while (1) {\n switch (_context9.prev = _context9.next) {\n case 0:\n if (!(typeof value !== 'object' || value == null)) {\n _context9.next = 4;\n break;\n }\n\n _context9.next = 3;\n return ctx.fail();\n\n case 3:\n return _context9.abrupt(\"return\");\n\n case 4:\n _context9.t0 = _regeneratorRuntime.keys(value);\n\n case 5:\n if ((_context9.t1 = _context9.t0()).done) {\n _context9.next = 12;\n break;\n }\n\n k = _context9.t1.value;\n v = value[k];\n return _context9.delegateYield(ctx.check(k, Key, value, k), \"t2\", 9);\n\n case 9:\n return _context9.delegateYield(ctx.check(v, Value, value, k), \"t3\", 10);\n\n case 10:\n _context9.next = 5;\n break;\n\n case 12:\n case \"end\":\n return _context9.stop();\n }\n }\n }, _callee3);\n }));\n}\n/**\n * Validate that a set of values matches a specific type.\n */\n\n\nfunction set(Element) {\n return struct(\"Set<\".concat(Element.type, \">\"), function (value, ctx) {\n if (!(value instanceof Set)) {\n return false;\n }\n\n var _iterator8 = _createForOfIteratorHelper(value),\n _step8;\n\n try {\n for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {\n var val = _step8.value;\n\n var _ctx$check = ctx.check(val, Element),\n _ctx$check2 = _slicedToArray(_ctx$check, 1),\n failure = _ctx$check2[0];\n\n if (failure) {\n return false;\n }\n }\n } catch (err) {\n _iterator8.e(err);\n } finally {\n _iterator8.f();\n }\n\n return true;\n });\n}\n/**\n * Validate that a value is a string.\n */\n\n\nfunction string() {\n return struct('string', function (value) {\n return typeof value === 'string';\n });\n}\n/**\n * Define a `Struct` instance with a type and validation function.\n */\n\n\nfunction struct(name, validator) {\n return new Struct({\n type: name,\n validator: validator,\n schema: null\n });\n}\n\nfunction tuple(Elements) {\n var Never = never();\n return struct(\"[\".concat(Elements.map(function (s) {\n return s.type;\n }).join(','), \"]\"), /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(value, ctx) {\n var _iterator9, _step9, _step9$value, _index, Element, _v3, index, v;\n\n return _regeneratorRuntime.wrap(function _callee4$(_context10) {\n while (1) {\n switch (_context10.prev = _context10.next) {\n case 0:\n if (Array.isArray(value)) {\n _context10.next = 4;\n break;\n }\n\n _context10.next = 3;\n return ctx.fail();\n\n case 3:\n return _context10.abrupt(\"return\");\n\n case 4:\n _iterator9 = _createForOfIteratorHelper(Elements.entries());\n _context10.prev = 5;\n\n _iterator9.s();\n\n case 7:\n if ((_step9 = _iterator9.n()).done) {\n _context10.next = 13;\n break;\n }\n\n _step9$value = _slicedToArray(_step9.value, 2), _index = _step9$value[0], Element = _step9$value[1];\n _v3 = value[_index];\n return _context10.delegateYield(ctx.check(_v3, Element, value, _index), \"t0\", 11);\n\n case 11:\n _context10.next = 7;\n break;\n\n case 13:\n _context10.next = 18;\n break;\n\n case 15:\n _context10.prev = 15;\n _context10.t1 = _context10[\"catch\"](5);\n\n _iterator9.e(_context10.t1);\n\n case 18:\n _context10.prev = 18;\n\n _iterator9.f();\n\n return _context10.finish(18);\n\n case 21:\n if (!(value.length > Elements.length)) {\n _context10.next = 25;\n break;\n }\n\n index = Elements.length;\n v = value[index];\n return _context10.delegateYield(ctx.check(v, Never, value, index), \"t2\", 25);\n\n case 25:\n case \"end\":\n return _context10.stop();\n }\n }\n }, _callee4, null, [[5, 15, 18, 21]]);\n }));\n}\n/**\n * Validate that a value matches a specific strutural interface, like the\n * structural typing that TypeScript uses.\n */\n\n\nfunction type(Structs) {\n var keys = Object.keys(Structs);\n return struct(\"Type<{\".concat(keys.join(','), \"}>\"), /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(value, ctx) {\n var _iterator10, _step10, key, Value, v;\n\n return _regeneratorRuntime.wrap(function _callee5$(_context11) {\n while (1) {\n switch (_context11.prev = _context11.next) {\n case 0:\n if (!(typeof value !== 'object' || value == null)) {\n _context11.next = 4;\n break;\n }\n\n _context11.next = 3;\n return ctx.fail();\n\n case 3:\n return _context11.abrupt(\"return\");\n\n case 4:\n _iterator10 = _createForOfIteratorHelper(keys);\n _context11.prev = 5;\n\n _iterator10.s();\n\n case 7:\n if ((_step10 = _iterator10.n()).done) {\n _context11.next = 14;\n break;\n }\n\n key = _step10.value;\n Value = Structs[key];\n v = value[key];\n return _context11.delegateYield(ctx.check(v, Value, value, key), \"t0\", 12);\n\n case 12:\n _context11.next = 7;\n break;\n\n case 14:\n _context11.next = 19;\n break;\n\n case 16:\n _context11.prev = 16;\n _context11.t1 = _context11[\"catch\"](5);\n\n _iterator10.e(_context11.t1);\n\n case 19:\n _context11.prev = 19;\n\n _iterator10.f();\n\n return _context11.finish(19);\n\n case 22:\n case \"end\":\n return _context11.stop();\n }\n }\n }, _callee5, null, [[5, 16, 19, 22]]);\n }));\n}\n\nfunction union(Structs) {\n return struct(\"\".concat(Structs.map(function (s) {\n return s.type;\n }).join(' | ')), /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(value, ctx) {\n var _iterator11, _step11, S, _ctx$check3, _ctx$check4, failures;\n\n return _regeneratorRuntime.wrap(function _callee6$(_context12) {\n while (1) {\n switch (_context12.prev = _context12.next) {\n case 0:\n _iterator11 = _createForOfIteratorHelper(Structs);\n _context12.prev = 1;\n\n _iterator11.s();\n\n case 3:\n if ((_step11 = _iterator11.n()).done) {\n _context12.next = 10;\n break;\n }\n\n S = _step11.value;\n _ctx$check3 = ctx.check(value, S), _ctx$check4 = _toArray(_ctx$check3), failures = _ctx$check4.slice(0);\n\n if (!(failures.length === 0)) {\n _context12.next = 8;\n break;\n }\n\n return _context12.abrupt(\"return\");\n\n case 8:\n _context12.next = 3;\n break;\n\n case 10:\n _context12.next = 15;\n break;\n\n case 12:\n _context12.prev = 12;\n _context12.t0 = _context12[\"catch\"](1);\n\n _iterator11.e(_context12.t0);\n\n case 15:\n _context12.prev = 15;\n\n _iterator11.f();\n\n return _context12.finish(15);\n\n case 18:\n _context12.next = 20;\n return ctx.fail();\n\n case 20:\n case \"end\":\n return _context12.stop();\n }\n }\n }, _callee6, null, [[1, 12, 15, 18]]);\n }));\n}\n/**\n * Convert a value to a literal string.\n */\n\n\nfunction toLiteralString(value) {\n return typeof value === 'string' ? \"\\\"\".concat(value.replace(/\"/g, '\"'), \"\\\"\") : \"\".concat(value);\n}\n/**\n * Coerce the values of an object-like struct.\n */\n\n\nfunction createObjectCoercer(Structs) {\n var knowns = Object.keys(Structs);\n return function (value) {\n if (typeof value !== 'object' || value == null) {\n return value;\n }\n\n var ret = {};\n var unknowns = new Set(Object.keys(value));\n\n var _iterator12 = _createForOfIteratorHelper(knowns),\n _step12;\n\n try {\n for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {\n var key = _step12.value;\n unknowns.delete(key);\n var Value = Structs[key];\n var v = value[key];\n ret[key] = coerce(v, Value);\n }\n } catch (err) {\n _iterator12.e(err);\n } finally {\n _iterator12.f();\n }\n\n var _iterator13 = _createForOfIteratorHelper(unknowns),\n _step13;\n\n try {\n for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) {\n var _key3 = _step13.value;\n ret[_key3] = value[_key3];\n }\n } catch (err) {\n _iterator13.e(err);\n } finally {\n _iterator13.f();\n }\n\n return ret;\n };\n}\n\nexport { Struct, StructError, any, array, assert, boolean, coerce, coercion, date, defaulted, dynamic, empty, enums, func, instance, intersection, is, lazy, length, literal, map, masked, never, nullable, number, object, optional, partial, pattern, record, refinement, set, string, struct, tuple, type, union, validate };","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _toArray(arr) {\n return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();\n}","import * as React from 'react'\nimport { pascalCase, pascalCaseTransformMerge } from 'pascal-case'\n\n/**\n * Returns a namespaced string intended for logging.\n *\n * @param message Message to namespace.\n *\n * @returns Namespaced message.\n */\nexport const msg = (message: string) => `gatsby-source-prismic - ${message}`\n\n/**\n * Maps key-value tuples of an object to new key-value tuples to create a new\n * object.\n *\n * @param fn Function that maps a key-value tuple to a new key-value tuple.\n * @param obj Object to map to a new object.\n *\n * @returns New object with mapped key-values.\n */\nexport const mapObj = (\n fn: (entry: [string, T1]) => [string, T2],\n obj: { [key: string]: T1 },\n): { [key: string]: T2 } => {\n const entries = Object.entries(obj)\n const pairs = entries.map((x) => fn(x))\n\n const result: { [key: string]: T2 } = {}\n\n for (let i = 0; i < pairs.length; i++) {\n const [k, v] = pairs[i]\n result[k] = v\n }\n\n return result\n}\n\n/**\n * Maps key-value tuples of an object to new key-value tuples to create a new\n * object. The mapper function can be async.\n *\n * @param fn Function that maps a key-value tuple to a new key-value tuple.\n * @param obj Object to map to a new object.\n *\n * @returns New object with mapped key-values.\n */\nexport const mapObjP = async (\n fn: (entry: [string, T1]) => Promise<[string, T2]>,\n obj: { [key: string]: T1 },\n): Promise<{ [key: string]: T2 }> => {\n const entries = Object.entries(obj)\n const pairs = await Promise.all(entries.map((x) => Promise.resolve(fn(x))))\n\n const result: { [key: string]: T2 } = {}\n\n for (let i = 0; i < pairs.length; i++) {\n const [k, v] = pairs[i]\n result[k] = v\n }\n\n return result\n}\n\n/**\n * Maps values of an object to new values.\n *\n * @param fn Function that maps a value and key to a new value.\n * @param obj Object to map to a new object.\n *\n * @returns New object with mapped values.\n */\nexport const mapObjVals = (\n fn: (val: T1, key: string) => T2,\n obj: { [key: string]: T1 },\n): { [key: string]: T2 } => {\n const result: { [key: string]: T2 } = {}\n\n for (const key in obj) result[key] = fn(obj[key], key)\n\n return result\n}\n\n/**\n * Maps values of an object to new values.\n *\n * @param fn Function that maps a value and key to a new value.\n * @param obj Object to map to a new object.\n *\n * @returns New object with mapped values.\n */\nexport const mapObjValsP = async (\n fn: (val: T1, key: string) => Promise,\n obj: { [key: string]: T1 },\n): Promise<{ [key: string]: T2 }> => {\n const result: { [key: string]: T2 } = {}\n\n const keys = Object.keys(obj)\n await Promise.all(\n keys.map(async (key) => {\n result[key] = await fn(obj[key], key)\n }),\n )\n\n return result\n}\n\n/**\n * Returns true if the provided object has no keys, false otherwise.\n *\n * @param obj Object to check.\n *\n * @returns `true` if `obj` has no keys, `false` otherwise.\n */\nexport const isEmptyObj = (obj: object) => {\n for (const _ in obj) return false\n return true\n}\n\n/**\n * Returns a valid GraphQL type name for a Prismic schema.\n *\n * @param apiId API ID of the schema.\n *\n * @returns Type name for the schema.\n */\nexport const buildSchemaTypeName = (apiId: string) =>\n pascalCase(`Prismic ${apiId}`, { transform: pascalCaseTransformMerge })\n\n/**\n * Determines whether the current context is the browser.\n *\n * @returns `true` if the current context is the browser, `false` otherwise.\n */\nexport const isBrowser = typeof window !== 'undefined'\n\nexport const getComponentDisplayName = (\n WrappedComponent: React.ComponentType,\n) => WrappedComponent.displayName || WrappedComponent.name || 'Component'\n\n/**\n * Separates an array in to an array of arrays\n * @param arr The array to chunk\n * @param size the maximum size for each of the resulting arrays\n */\nexport function chunk(arr: T[], size: number): Array {\n const chunks = []\n\n let i = 0\n\n while (i < arr.length) {\n const a = arr.slice(i, (i += size))\n chunks.push(a)\n }\n\n return chunks\n}\n","import { FixedObject, FluidObject } from 'gatsby-image'\nimport * as A from 'fp-ts/lib/Array'\nimport * as O from 'fp-ts/lib/Option'\nimport * as R from 'fp-ts/lib/Record'\nimport { eqNumber } from 'fp-ts/lib/Eq'\nimport { ordNumber } from 'fp-ts/lib/Ord'\nimport { pipe } from 'fp-ts/lib/pipeable'\n\nimport { ImgixUrlParams, ImgixFixedArgs, ImgixFluidArgs } from './types'\nimport {\n setURLSearchParams,\n signURL,\n semigroupImgixUrlParams,\n join,\n} from './utils'\n\nexport const DEFAULT_FIXED_WIDTH = 400\nexport const DEFAULT_FLUID_MAX_WIDTH = 800\n\n// Resolutions for `fixed` images. Same as `gatsby-plugin-sharp`.\nconst FIXED_RESOLUTIONS = [1, 1.5, 2]\n\n// Breakpoint factors for `fluid` images. Same as `gatsby-plugin-sharp`.\nconst FLUID_BREAKPOINT_FACTORS = [0.25, 0.5, 1.5, 2]\n\n// Default params for placeholder images.\nconst DEFAULT_LQIP_PARAMS: ImgixUrlParams = { w: 100, blur: 15, q: 20 }\n\nexport const buildImgixUrl = (url: string, secureUrlToken?: string) => (\n params: ImgixUrlParams,\n): string =>\n pipe(\n params,\n // TODO: Replace filterMap with map. filterMap is being used here just\n // because it fibs the types a bit.\n R.filterMap((param) =>\n param === undefined ? O.some(undefined) : O.some(String(param)),\n ),\n setURLSearchParams(url),\n signURL(O.fromNullable(secureUrlToken)),\n )\n\nconst buildImgixLqipUrl = (url: string, secureUrlToken?: string) => (\n params: ImgixUrlParams,\n): string =>\n pipe(\n semigroupImgixUrlParams.concat(DEFAULT_LQIP_PARAMS, params),\n buildImgixUrl(url, secureUrlToken),\n )\n\nconst buildImgixFixedSrcSet = (baseUrl: string, secureUrlToken?: string) => (\n params: ImgixUrlParams,\n): string =>\n pipe(\n FIXED_RESOLUTIONS,\n A.map((dpr) =>\n pipe(\n semigroupImgixUrlParams.concat(params, { dpr }),\n buildImgixUrl(baseUrl, secureUrlToken),\n (url) => `${url} ${dpr}x`,\n ),\n ),\n join(', '),\n )\n\ntype BuildImgixFixedArgs = {\n url: string\n sourceWidth: number\n sourceHeight: number\n secureUrlToken?: string\n args?: ImgixFixedArgs\n}\n\n/**\n * Builds a gatsby-image-compatible fixed image object from a base Imgix image URL.\n *\n * @returns gatsby-image-compatible fixed image object.\n */\nexport const buildImgixFixed = ({\n url,\n sourceWidth,\n sourceHeight,\n secureUrlToken,\n args = {},\n}: BuildImgixFixedArgs): FixedObject => {\n const aspectRatio = sourceWidth / sourceHeight\n\n let width: number\n let height: number\n\n if (args.width != undefined && args.height != undefined) {\n width = args.width\n height = args.height\n } else if (args.width != undefined) {\n width = args.width\n height = Math.round(width / aspectRatio)\n } else if (args.height != undefined) {\n width = Math.round(args.height * aspectRatio)\n height = args.height\n } else {\n width = DEFAULT_FIXED_WIDTH\n height = Math.round(width / aspectRatio)\n }\n\n const base64 = buildImgixLqipUrl(\n url,\n secureUrlToken,\n )({\n ...args.imgixParams,\n ...args.placeholderImgixParams,\n })\n\n const src = buildImgixUrl(\n url,\n secureUrlToken,\n )({\n ...args.imgixParams,\n w: width,\n h: height,\n })\n\n const srcSet = buildImgixFixedSrcSet(\n url,\n secureUrlToken,\n )({\n ...args.imgixParams,\n w: width,\n h: height,\n })\n\n return {\n base64,\n width,\n height,\n src,\n srcWebp: src,\n srcSet,\n srcSetWebp: srcSet,\n }\n}\n\ntype BuildFluidSrcSetArgs = {\n aspectRatio: number\n maxWidth: number\n srcSetBreakpoints?: number[]\n}\n\nconst buildImgixFluidSrcSet = (baseUrl: string, secureUrlToken?: string) => (\n params: ImgixUrlParams,\n) => ({\n aspectRatio,\n maxWidth,\n srcSetBreakpoints = FLUID_BREAKPOINT_FACTORS.map((x) => maxWidth * x),\n}: BuildFluidSrcSetArgs): string =>\n pipe(\n A.cons(maxWidth, srcSetBreakpoints),\n A.uniq(eqNumber),\n A.sort(ordNumber),\n A.map((breakpoint) =>\n pipe(\n semigroupImgixUrlParams.concat(params, {\n w: Math.round(breakpoint),\n h: Math.round(breakpoint / aspectRatio),\n }),\n buildImgixUrl(baseUrl, secureUrlToken),\n (url) => `${url} ${Math.round(breakpoint)}w`,\n ),\n ),\n join(', '),\n )\n\ntype BuildImgixFluidArgs = {\n url: string\n sourceWidth: number\n sourceHeight: number\n secureUrlToken?: string\n args?: ImgixFluidArgs\n}\n\n/**\n * Builds a gatsby-image-compatible fluid image object from a base Imgix image URL.\n *\n * @returns gatsby-image-compatible fluid image object.\n */\nexport const buildImgixFluid = ({\n url,\n sourceWidth,\n sourceHeight,\n secureUrlToken,\n args = {},\n}: BuildImgixFluidArgs): FluidObject => {\n const aspectRatio = sourceWidth / sourceHeight\n const maxWidth = args.maxWidth ?? DEFAULT_FLUID_MAX_WIDTH\n\n const base64 = buildImgixLqipUrl(\n url,\n secureUrlToken,\n )({\n ...args.imgixParams,\n ...args.placeholderImgixParams,\n })\n\n const src = buildImgixUrl(\n url,\n secureUrlToken,\n )({\n ...args.imgixParams,\n w: maxWidth,\n h: args.maxHeight,\n })\n\n const srcSet = buildImgixFluidSrcSet(\n url,\n secureUrlToken,\n )(args.imgixParams ?? {})({\n aspectRatio,\n maxWidth: maxWidth,\n srcSetBreakpoints: args.srcSetBreakpoints,\n })\n\n return {\n base64,\n aspectRatio,\n src,\n srcWebp: src,\n srcSet,\n srcSetWebp: srcSet,\n sizes: '',\n }\n}\n","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import {\n PluginOptions as GatsbyPluginOptions,\n SourceNodesArgs,\n NodeInput,\n Node,\n} from 'gatsby'\nimport { FixedObject, FluidObject } from 'gatsby-image'\nimport { Document as PrismicDocument } from 'prismic-javascript/d.ts/documents'\nimport * as PrismicDOM from 'prismic-dom'\nimport { ImgixUrlParams } from 'gatsby-plugin-imgix'\n\nexport type NodeID = string\n\nexport interface NodeTree {\n [key: string]: Node\n}\n\nexport interface DocumentNodeInput extends NodeInput {\n prismicId: PrismicDocument['id']\n data: { [key: string]: NormalizedField }\n dataString: string\n dataRaw: PrismicDocument['data']\n alternate_languages: NormalizedAlternateLanguagesField\n url?: string\n}\n\nexport interface SliceNodeInput extends NodeInput {\n slice_type: string\n slice_label?: string\n primary: { [key: string]: NormalizedField }\n items: { [key: string]: NormalizedField }[]\n}\n\nexport interface DocumentsToNodesEnvironment {\n createNode: (node: NodeInput) => void\n createNodeId: (input: string) => string\n createContentDigest: (input: string | object) => string\n normalizeImageField: ImageFieldNormalizer\n normalizeLinkField: LinkFieldNormalizer\n normalizeSlicesField: SlicesFieldNormalizer\n normalizeStructuredTextField: StructuredTextFieldNormalizer\n typePaths: TypePath[]\n pluginOptions: PluginOptions\n context:\n | DocumentsToNodesEnvironmentNodeContext\n | DocumentsToNodesEnvironmentBrowserContext\n}\n\nexport interface DocumentsToNodesEnvironmentNodeContext {\n gatsbyContext: SourceNodesArgs\n}\n\nexport interface DocumentsToNodesEnvironmentBrowserContext {\n hasNodeById: (id: string) => boolean\n getNodeById: (id: string) => T & Node\n}\n\nexport interface TypePath {\n path: string[]\n type: GraphQLType | string\n}\n\nexport type FieldNormalizer = (\n apiId: string,\n field: T,\n path: TypePath['path'],\n doc: PrismicDocument,\n env: DocumentsToNodesEnvironment,\n) => N | Promise\n\nexport type ImageFieldNormalizer = FieldNormalizer<\n ImageField,\n NormalizedImageField\n>\n\nexport type LinkFieldNormalizer = FieldNormalizer<\n LinkField,\n NormalizedLinkField\n>\n\nexport type SlicesFieldNormalizer = FieldNormalizer<\n SliceIDsField,\n NormalizedSlicesField\n>\n\nexport type StructuredTextFieldNormalizer = FieldNormalizer<\n StructuredTextField,\n NormalizedStructuredTextField\n>\n\nexport type Field =\n | StructuredTextField\n | ImageField\n | SlicesField\n | GroupField\n | LinkField\n | AlternateLanguagesField\n | string\n | number\n | boolean\n | null\n\nexport type NormalizedField =\n | NormalizedStructuredTextField\n | NormalizedImageField\n | NormalizedSlicesField\n | NormalizedGroupField\n | NormalizedLinkField\n | NormalizedAlternateLanguagesField\n | Field\n\nexport type StructuredTextField = {\n type: string\n text: string\n spans: { [key: string]: unknown }\n}[]\n\nexport interface NormalizedStructuredTextField {\n html: string\n text: string\n raw: StructuredTextField\n}\n\nexport type SlicesField = Slice[]\n\ninterface Slice {\n slice_type: string\n slice_label: string | null\n items: { [key: string]: Field }[]\n primary: { [key: string]: Field }\n}\n\nexport type SliceIDsField = NodeID[]\n\nexport type NormalizedSlicesField = NodeID[]\n\nexport enum LinkFieldType {\n Any = 'Any',\n Document = 'Document',\n Media = 'Media',\n Web = 'Web',\n}\n\nexport interface LinkField {\n link_type: LinkFieldType\n isBroken: boolean\n url?: string\n target?: string\n size?: number\n id?: string\n type?: string\n tags?: string[]\n lang?: string\n slug?: string\n uid?: string\n}\n\nexport interface NormalizedLinkField extends LinkField {\n url: string\n document?: NodeID\n raw: LinkField\n}\n\nexport interface ImageField {\n alt?: string\n copyright?: string\n dimensions?: { width: number; height: number }\n url?: string\n // This should be ImageThumbnailField, but TypeScript does not let us\n // type unknown field types separatly from known without widening the type.\n [key: string]: unknown\n}\n\nexport interface NormalizedImageField extends ImageField {\n thumbnails?: { [key: string]: NormalizedImageField }\n fixed?: FixedObject\n fluid?: FluidObject\n localFile?: NodeID\n}\n\nexport type AlternateLanguagesField = LinkField[]\n\nexport type NormalizedAlternateLanguagesField = AlternateLanguagesField\n\nexport type GroupField = { [key: string]: Field }[]\n\nexport type NormalizedGroupField = { [key: string]: NormalizedField }[]\n\nexport enum FieldType {\n Boolean = 'Boolean',\n Color = 'Color',\n Date = 'Date',\n Embed = 'Embed',\n GeoPoint = 'GeoPoint',\n Group = 'Group',\n Image = 'Image',\n Link = 'Link',\n Number = 'Number',\n Select = 'Select',\n Slice = 'Slice',\n Slices = 'Slices',\n StructuredText = 'StructuredText',\n Text = 'Text',\n Timestamp = 'Timestamp',\n UID = 'UID',\n // Internal plugin-specific field not defined in the in Prismic schema.\n AlternateLanguages = 'AlternateLanguages',\n}\n\nexport enum GraphQLType {\n ID = 'ID',\n Boolean = 'Boolean',\n String = 'String',\n Float = 'Float',\n Date = 'Date',\n JSON = 'JSON',\n Link = 'PrismicLinkType',\n Image = 'PrismicImageType',\n ImageThumbnail = 'PrismicImageThumbnailType',\n ImageThumbnails = 'PrismicImageThumbnailsType',\n Embed = 'PrismicEmbedType',\n GeoPoint = 'PrismicGeoPointType',\n StructuredText = 'PrismicStructuredTextType',\n AllDocumentTypes = 'PrismicAllDocumentTypes',\n Group = 'Group',\n Slices = 'Slices',\n AlternateLanguages = 'AlternateLanguages',\n}\n\nexport interface GraphQLTypeObj {\n type: GraphQLType | string\n extensions?: { [key: string]: any }\n resolve?: Function\n}\n\ninterface BaseFieldConfigSchema {\n label?: string\n labels?: { [key: string]: string[] }\n placeholder?: string\n [key: string]: unknown\n}\n\nexport interface BaseFieldSchema {\n type: FieldType\n config: BaseFieldConfigSchema\n}\n\nexport interface ImageFieldSchema extends BaseFieldSchema {\n type: FieldType.Image\n config: ImageFieldConfigSchema\n}\n\ninterface ThumbnailSchema {\n name: string\n width?: string\n height?: string\n}\n\ninterface ImageFieldConfigSchema extends BaseFieldConfigSchema {\n constraint?: { width?: number; height?: number }\n thumbnails?: ThumbnailSchema[]\n}\n\nexport interface SlicesFieldSchema extends BaseFieldSchema {\n type: FieldType.Slices\n fieldset: string\n config: SlicesFieldConfigSchema\n}\n\ninterface SlicesFieldConfigSchema extends BaseFieldConfigSchema {\n choices: SliceChoicesSchema\n}\n\nexport interface SliceChoicesSchema {\n [sliceId: string]: SliceFieldSchema\n}\n\nenum SliceChoiceDisplay {\n List = 'list',\n Grid = 'grid',\n}\n\nexport interface SliceFieldSchema extends BaseFieldSchema {\n type: FieldType.Slice\n fieldset: string\n description: string\n icon: string\n display: SliceChoiceDisplay\n repeat?: FieldsSchema\n 'non-repeat'?: FieldsSchema\n}\n\nexport interface GroupFieldSchema extends BaseFieldSchema {\n type: FieldType.Group\n config: GroupFieldConfigSchema\n}\n\ninterface GroupFieldConfigSchema extends BaseFieldConfigSchema {\n fields: FieldsSchema\n}\n\nexport type FieldSchema =\n | BaseFieldSchema\n | ImageFieldSchema\n | SlicesFieldSchema\n | GroupFieldSchema\n | SliceFieldSchema\n\nexport interface FieldsSchema {\n [fieldId: string]: FieldSchema\n}\n\nexport interface Schema {\n [tabName: string]: {\n [fieldId: string]: FieldSchema\n }\n}\n\nexport interface Schemas {\n [schemaId: string]: Schema\n}\n\nexport type LinkResolver = (doc: object) => string\nexport type PluginLinkResolver = (input: {\n key?: string\n value?: unknown\n node: PrismicDocument\n}) => LinkResolver\n\nexport type HTMLSerializer = typeof PrismicDOM.HTMLSerializer\nexport type PluginHTMLSerializer = (input: {\n key: string\n value: unknown\n node: PrismicDocument\n}) => HTMLSerializer\n\ntype ShouldDownloadImage = (input: {\n key: string\n value: unknown\n node: PrismicDocument\n}) => boolean | Promise\n\nexport type BrowserPluginOptions = GatsbyPluginOptions &\n Pick<\n PluginOptions,\n | 'repositoryName'\n | 'accessToken'\n | 'fetchLinks'\n | 'schemas'\n | 'lang'\n | 'typePathsFilenamePrefix'\n | 'prismicToolbar'\n >\n\nexport interface PluginOptions extends GatsbyPluginOptions {\n repositoryName: string\n releaseID?: string\n accessToken?: string\n linkResolver?: PluginLinkResolver\n htmlSerializer?: PluginHTMLSerializer\n fetchLinks?: string[]\n schemas: Schemas\n lang?: string\n shouldDownloadImage?: ShouldDownloadImage\n shouldNormalizeImage?: ShouldDownloadImage\n typePathsFilenamePrefix?: string\n prismicToolbar?: boolean | 'legacy'\n imageImgixParams?: ImgixUrlParams\n imagePlaceholderImgixParams?: ImgixUrlParams\n webhookSecret?: string\n}\n\nexport interface WebhookBase {\n type: 'api-update' | 'test-trigger'\n domain: string\n apiUrl: string\n secret: string | null\n}\n\nexport interface TestWebhook extends WebhookBase {\n type: 'test-trigger'\n}\n\ninterface Operations {\n update?: T[]\n addition?: T[]\n deletion?: T[]\n}\n\nexport interface PrismicWebhook extends WebhookBase {\n type: 'api-update'\n masterRef?: string\n releases: Operations\n masks: Operations\n tags: Operations\n documents: string[]\n experiments?: Operations\n}\n\nexport interface WebhookRelease {\n id: string\n ref: string\n label: string\n documents: string[]\n}\n\nexport interface WebhookMask {\n id: string\n label: string\n}\n\nexport interface WebhookTag {\n id: string\n}\n\n// Legacy fields\ninterface WebhookExperimentVariation {\n id: string\n ref: string\n label: string\n}\ninterface WebhookExperiment {\n id: string\n name: string\n variations: WebhookExperimentVariation[]\n}\n","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","import * as struct from 'superstruct'\n\nimport { PluginOptions, BrowserPluginOptions } from './types'\n\nconst baseSchema = {\n repositoryName: struct.string(),\n accessToken: struct.optional(struct.string()),\n releaseID: struct.optional(struct.string()),\n schemas: struct.record(struct.string(), struct.object()),\n linkResolver: struct.defaulted(struct.func(), () => () => () => {}),\n htmlSerializer: struct.defaulted(struct.func(), () => () => () => {}),\n fetchLinks: struct.defaulted(struct.array(struct.string()), []),\n lang: struct.defaulted(struct.string(), '*'),\n typePathsFilenamePrefix: struct.defaulted(\n struct.string(),\n 'prismic-typepaths---',\n ),\n prismicToolbar: struct.defaulted(\n struct.union([struct.boolean(), struct.enums(['legacy'])]),\n false,\n ),\n imageImgixParams: struct.defaulted(\n struct.record(\n struct.string(),\n struct.optional(\n struct.union([struct.string(), struct.number(), struct.boolean()]),\n ),\n ),\n { auto: 'format,compress', fit: 'max', q: 50 },\n ),\n imagePlaceholderImgixParams: struct.defaulted(\n struct.record(\n struct.string(),\n struct.optional(\n struct.union([struct.string(), struct.number(), struct.boolean()]),\n ),\n ),\n { w: 100, blur: 15, q: 20 },\n ),\n plugins: struct.defaulted(struct.empty(struct.array()), []),\n} as const\n\nconst PluginOptions = struct.object({\n ...baseSchema,\n shouldDownloadImage: struct.defaulted(\n struct.optional(struct.func()),\n () => () => false,\n ),\n webhookSecret: struct.optional(struct.string()),\n})\n\nconst BrowserPluginOptions = struct.object({\n ...baseSchema,\n pathResolver: struct.optional(struct.func()),\n schemasDigest: struct.string(),\n})\n\nexport const validatePluginOptions = (pluginOptions: PluginOptions) => {\n const coerced = struct.coerce(pluginOptions, PluginOptions)\n struct.assert(coerced, PluginOptions)\n return (coerced as unknown) as PluginOptions\n}\n\nexport const validateBrowserOptions = (\n browserOptions: BrowserPluginOptions,\n) => {\n const coerced = struct.coerce(browserOptions, BrowserPluginOptions)\n struct.assert(coerced, BrowserPluginOptions)\n return (coerced as unknown) as BrowserPluginOptions\n}\n","export const BROWSER_STORE_KEY = '__GATSBY_SOURCE_PRISMIC__'\n\nexport const IMAGE_FIELD_KEYS = [\n 'alt',\n 'copyright',\n 'dimensions',\n 'url',\n] as const\n\nexport const API_PAGE_SIZE = 100\n\nexport const UUID_NAMESPACE = `638f7a53-c567-4eca-8fc1-b23efb1cfb2b`\n\nexport const PLACEHOLDER_NODE_TYPE_SUFFIX = '__PLACEHOLDER'\n","import { getApi } from 'prismic-javascript'\n\nimport { msg, chunk } from './utils'\nimport { API_PAGE_SIZE } from './constants'\n\nimport { SourceNodesArgs, Reporter } from 'gatsby'\nimport PrismicResolvedApi, {\n QueryOptions,\n} from 'prismic-javascript/d.ts/ResolvedApi'\nimport { Document as PrismicDocument } from 'prismic-javascript/d.ts/documents'\nimport { PluginOptions } from './types'\nimport ApiSearchResponse from 'prismic-javascript/d.ts/ApiSearchResponse'\n\nexport function toPrismicUrl(nameOrUrl: string) {\n const urlRegex = /^https?:\\/\\/([^.]+)\\.(wroom\\.(?:test|io)|prismic\\.io)/\n const addr = nameOrUrl.match(urlRegex)\n\n return addr ? addr[0] + '/api/v2' : `https://${nameOrUrl}.prismic.io/api/v2`\n}\n\nexport const createClient = async (\n repositoryName: string,\n accessToken?: string,\n) => {\n const url = toPrismicUrl(repositoryName)\n return await getApi(url, { accessToken })\n}\n\nconst pagedGet = async (\n client: PrismicResolvedApi,\n queryOptions: QueryOptions,\n page: number,\n pageSize: number,\n documents: PrismicDocument[],\n reporter: Reporter,\n): Promise => {\n reporter.verbose(msg(`fetching documents page ${page}`))\n\n const response = await client.query([], { ...queryOptions, page, pageSize })\n\n for (const doc of response.results) documents.push(doc)\n\n if (page * pageSize < response.total_results_size)\n return await pagedGet(\n client,\n queryOptions,\n page + 1,\n pageSize,\n documents,\n reporter,\n )\n\n return documents\n}\n\nexport const fetchAllDocuments = async (\n pluginOptions: PluginOptions,\n gatsbyContext: SourceNodesArgs,\n) => {\n const {\n repositoryName,\n releaseID,\n accessToken,\n fetchLinks,\n lang,\n } = pluginOptions\n const { reporter } = gatsbyContext\n\n const client = await createClient(repositoryName, accessToken)\n\n const queryOptions: QueryOptions = {}\n if (releaseID) {\n const ref = client.refs.find((r) => r.id === releaseID)\n if (ref) {\n queryOptions.ref = ref.ref\n } else {\n reporter.warn(\n msg(\n `A release with ID \"${releaseID}\" was not found. Defaulting to the master ref instead.`,\n ),\n )\n }\n }\n if (fetchLinks) queryOptions.fetchLinks = fetchLinks\n if (lang) queryOptions.lang = lang\n\n return await pagedGet(client, queryOptions, 1, API_PAGE_SIZE, [], reporter)\n}\n\nexport async function fetchDocumentsByIds(\n pluginOptions: PluginOptions,\n gatsbyContext: SourceNodesArgs,\n documents: string[],\n): Promise {\n const {\n repositoryName,\n releaseID,\n accessToken,\n fetchLinks,\n lang,\n } = pluginOptions\n\n const { reporter } = gatsbyContext\n\n const client = await createClient(repositoryName, accessToken)\n\n const queryOptions: QueryOptions = {}\n\n if (releaseID) {\n const ref = client.refs.find((r) => r.id === releaseID)\n if (ref) {\n queryOptions.ref = ref.ref\n } else {\n reporter.warn(\n msg(\n `A release with ID \"${releaseID}\" was not found. Defaulting to the master ref instead.`,\n ),\n )\n }\n }\n\n if (fetchLinks) queryOptions.fetchLinks = fetchLinks\n\n if (lang) queryOptions.lang = lang\n\n const chunks = chunk(documents, 100).map((docs) =>\n client.getByIDs(docs, queryOptions),\n )\n\n const responses: ApiSearchResponse[] = await Promise.all(chunks)\n\n return responses.flatMap((doc) => doc.results)\n}\n","import { useReducer, useEffect, useCallback, useMemo } from 'react'\nimport { set as setCookie } from 'es-cookie'\nimport { previewCookie } from 'prismic-javascript'\nimport { camelCase } from 'camel-case'\n\nimport { validateBrowserOptions } from './validateOptions'\nimport { createClient } from './api'\nimport { createEnvironment } from './environment.browser'\nimport { documentToNodes } from './documentsToNodes'\nimport { isBrowser } from './utils'\nimport { BROWSER_STORE_KEY } from './constants'\n\nimport { Node } from 'gatsby'\nimport { QueryOptions } from 'prismic-javascript/d.ts/ResolvedApi'\nimport {\n PluginOptions,\n DocumentsToNodesEnvironmentBrowserContext,\n BrowserPluginOptions,\n} from './types'\n\nexport type UsePrismicPreviewOptions = Pick<\n PluginOptions,\n | 'repositoryName'\n | 'accessToken'\n | 'linkResolver'\n | 'htmlSerializer'\n | 'fetchLinks'\n | 'lang'\n | 'typePathsFilenamePrefix'\n> & {\n pathResolver?: PluginOptions['linkResolver']\n schemasDigest?: string\n}\n\nenum ActionType {\n IS_NOT_PREVIEW = 'IS_NOT_PREVIEW',\n IS_PREVIEW = 'IS_PREVIEW',\n DOCUMENT_LOADED = 'DOCUMENT_LOADED',\n RESET = 'RESET',\n}\n\ninterface Action {\n type: ActionType\n payload?: {\n rootNode: Node\n path?: string\n }\n}\n\ninterface State {\n isPreview?: boolean\n isLoading: boolean\n previewData?: { [key: string]: Node }\n path?: string\n}\n\nconst initialState: State = {\n isPreview: undefined,\n isLoading: false,\n previewData: undefined,\n path: undefined,\n}\n\nconst reducer = (state: State, action: Action) => {\n switch (action.type) {\n case ActionType.IS_NOT_PREVIEW: {\n return { ...state, isPreview: false, isLoading: false }\n }\n\n case ActionType.IS_PREVIEW: {\n return { ...state, isPreview: true, isLoading: true }\n }\n\n case ActionType.DOCUMENT_LOADED: {\n if (!action.payload)\n return { ...state, isPreview: false, isLoading: false }\n\n const { rootNode, path } = action.payload\n const type = camelCase(rootNode.internal.type)\n const previewData = { [type]: rootNode }\n\n return { ...state, previewData, path, isPreview: true, isLoading: false }\n }\n\n case ActionType.RESET: {\n return initialState\n }\n\n default:\n throw new Error('Invalid error')\n }\n}\n\nexport const usePrismicPreview = (options: UsePrismicPreviewOptions) => {\n const [state, dispatch] = useReducer(reducer, initialState)\n\n // @ts-expect-error\n const hydratedOptions: UsePrismicPreviewOptions & {\n plugins: []\n schemas: {}\n lang: string\n typePathsFilenamePrefix: string\n schemasDigest: string\n } = useMemo(() => {\n if (!isBrowser) return options\n\n const context = window[BROWSER_STORE_KEY][options.repositoryName]\n\n if (!context)\n throw new Error(\n `Could not find plugin context for repository: \"${options.repositoryName}\". Check that a gatsby-source-plugin instance exists for that repository. `,\n )\n\n return validateBrowserOptions({\n ...context.pluginOptions,\n schemasDigest: context.schemasDigest,\n // Need to include an empty object because environment.browser.ts is\n // expecting it. We do not include the actual schemas in the browser.\n schemas: {},\n ...options,\n })\n }, [options])\n\n const { token, documentId } = useMemo(() => {\n if (!isBrowser) return {}\n\n const params = new URLSearchParams(window.location.search)\n\n return {\n token: params.get('token') ?? undefined,\n documentId: params.get('documentId') ?? undefined,\n }\n }, [isBrowser ? window.location.search : undefined])\n\n /**\n * Set the preview status as soon as possible.\n */\n useEffect(() => {\n const isPreview = Boolean(token && documentId)\n\n dispatch({\n type: isPreview ? ActionType.IS_PREVIEW : ActionType.IS_NOT_PREVIEW,\n })\n }, [token, documentId])\n\n const asyncEffect = useCallback(async () => {\n if (!state.isPreview || !token || !documentId) return\n\n setCookie(previewCookie, token)\n\n const queryOptions: QueryOptions = {}\n if (hydratedOptions.fetchLinks)\n queryOptions.fetchLinks = hydratedOptions.fetchLinks\n\n // Query Prismic's API for the document.\n const client = await createClient(\n hydratedOptions.repositoryName,\n hydratedOptions.accessToken,\n )\n const doc = await client.getByID(documentId, queryOptions)\n\n // Process the document into nodes.\n const typePathsRes = await fetch(\n `/${hydratedOptions.typePathsFilenamePrefix}${hydratedOptions.schemasDigest}.json`,\n { headers: { 'Content-Type': 'application/json' } },\n )\n const typePaths = await typePathsRes.json()\n const env = createEnvironment(\n hydratedOptions as BrowserPluginOptions,\n typePaths,\n )\n const { context } = env\n const { getNodeById } = context as DocumentsToNodesEnvironmentBrowserContext\n const rootNodeId = await documentToNodes(doc, env)\n const rootNode = getNodeById(rootNodeId)\n\n const resolvedPathResolver =\n hydratedOptions.pathResolver ?? hydratedOptions.linkResolver\n const path = resolvedPathResolver\n ? resolvedPathResolver({ node: doc })(doc)\n : undefined\n\n dispatch({ type: ActionType.DOCUMENT_LOADED, payload: { rootNode, path } })\n }, [state.isPreview])\n\n useEffect(() => {\n asyncEffect()\n }, [asyncEffect])\n\n return state\n}\n","import pick from 'lodash.pick'\nimport omit from 'lodash.omit'\n\nimport { mapObjValsP, buildSchemaTypeName } from './utils'\nimport { IMAGE_FIELD_KEYS } from './constants'\n\nimport { Document as PrismicDocument } from 'prismic-javascript/d.ts/documents'\nimport {\n DocumentsToNodesEnvironment,\n TypePath,\n Field,\n AlternateLanguagesField,\n GroupField,\n ImageField,\n LinkField,\n SlicesField,\n StructuredTextField,\n NormalizedField,\n NormalizedAlternateLanguagesField,\n LinkFieldType,\n GraphQLType,\n LinkResolver,\n DocumentNodeInput,\n SliceNodeInput,\n} from './types'\n\nconst getTypeForPath = (\n path: TypePath['path'],\n typePaths: TypePath[],\n): GraphQLType | string | undefined => {\n const stringifiedPath = JSON.stringify(path)\n const def = typePaths.find((x) => JSON.stringify(x.path) === stringifiedPath)\n\n if (!def) return\n if (/^\\[.*GroupType\\]$/.test(def.type)) return GraphQLType.Group\n if (/^\\[.*SlicesType\\]$/.test(def.type)) return GraphQLType.Slices\n\n return def.type\n}\n\nconst normalizeField = async (\n apiId: string,\n field: Field,\n path: TypePath['path'],\n doc: PrismicDocument,\n env: DocumentsToNodesEnvironment,\n): Promise => {\n const {\n createNodeId,\n createNode,\n createContentDigest,\n typePaths,\n normalizeStructuredTextField,\n normalizeLinkField,\n normalizeImageField,\n normalizeSlicesField,\n } = env\n\n const type = getTypeForPath([...path, apiId], typePaths)\n\n switch (type) {\n case GraphQLType.Image: {\n const baseObj: ImageField = pick(field as ImageField, IMAGE_FIELD_KEYS)\n const thumbsObj = omit(field as ImageField, IMAGE_FIELD_KEYS) as {\n [key: string]: ImageField\n }\n\n const base = await normalizeImageField(apiId, baseObj, path, doc, env)\n const thumbs = await mapObjValsP(\n async (thumb) =>\n await normalizeImageField(apiId, thumb, path, doc, env),\n thumbsObj,\n )\n\n return { ...base, thumbnails: thumbs }\n }\n\n case GraphQLType.StructuredText: {\n return await normalizeStructuredTextField(\n apiId,\n field as StructuredTextField,\n path,\n doc,\n env,\n )\n }\n\n case GraphQLType.Link: {\n return await normalizeLinkField(apiId, field as LinkField, path, doc, env)\n }\n\n case GraphQLType.Group: {\n return await normalizeObjs(\n field as GroupField,\n [...path, apiId],\n doc,\n env,\n )\n }\n\n case GraphQLType.Slices: {\n const sliceNodeIds = await Promise.all(\n (field as SlicesField).map(async (slice, index) => {\n const sliceNodeId = createNodeId(\n `${doc.type} ${doc.id} ${apiId} ${index}`,\n )\n\n const normalizedPrimary = await normalizeObj(\n slice.primary,\n [...path, apiId, slice.slice_type, 'primary'],\n doc,\n env,\n )\n\n const normalizedItems = await normalizeObjs(\n slice.items,\n [...path, apiId, slice.slice_type, 'items'],\n doc,\n env,\n )\n\n const node: SliceNodeInput = {\n id: sliceNodeId,\n slice_type: slice.slice_type,\n slice_label: slice.slice_label ?? undefined,\n primary: normalizedPrimary,\n items: normalizedItems,\n internal: {\n type: buildSchemaTypeName(\n `${doc.type} ${apiId} ${slice.slice_type}`,\n ),\n contentDigest: createContentDigest(slice),\n },\n }\n\n createNode(node)\n\n return node.id\n }),\n )\n\n return await normalizeSlicesField(\n apiId,\n sliceNodeIds,\n [...path, apiId],\n doc,\n env,\n )\n }\n\n // This field type is not an actual Prismic type and was assigned manually\n // in `schemasToTypeDefs.ts`.\n case GraphQLType.AlternateLanguages: {\n // Treat the array of alternate language documents as a list of link\n // fields. We need to force the link type to a Document since it is not\n // there by default.\n return await Promise.all(\n (field as AlternateLanguagesField).map(\n async (item) =>\n await normalizeLinkField(\n apiId,\n {\n ...item,\n link_type: LinkFieldType.Document,\n },\n path,\n doc,\n env,\n ),\n ),\n )\n }\n\n default: {\n return field\n }\n }\n}\n\nconst normalizeObj = (\n obj: { [key: string]: Field } = {},\n path: TypePath['path'],\n doc: PrismicDocument,\n env: DocumentsToNodesEnvironment,\n): Promise<{ [key: string]: NormalizedField }> =>\n mapObjValsP(\n (field, fieldApiId) => normalizeField(fieldApiId, field, path, doc, env),\n obj,\n )\n\nconst normalizeObjs = (\n objs: { [key: string]: Field }[] = [],\n path: TypePath['path'],\n doc: PrismicDocument,\n env: DocumentsToNodesEnvironment,\n) => Promise.all(objs.map((obj) => normalizeObj(obj, path, doc, env)))\n\nexport const documentToNodes = async (\n doc: PrismicDocument,\n env: DocumentsToNodesEnvironment,\n) => {\n const { createNode, createContentDigest, createNodeId, pluginOptions } = env\n const { linkResolver } = pluginOptions\n\n let linkResolverForDoc: LinkResolver | undefined = undefined\n if (linkResolver) linkResolverForDoc = linkResolver({ node: doc })\n\n const docNodeId = createNodeId(doc.id)\n const docUrl = linkResolverForDoc ? linkResolverForDoc(doc) : undefined\n\n const normalizedData = await normalizeObj(\n doc.data,\n [doc.type, 'data'],\n doc,\n env,\n )\n const normalizedAlernativeLanguages = (await normalizeField(\n 'alternate_languages',\n (doc.alternate_languages as unknown) as AlternateLanguagesField,\n [doc.type],\n doc,\n env,\n )) as NormalizedAlternateLanguagesField\n\n const node: DocumentNodeInput = {\n ...doc,\n id: docNodeId,\n prismicId: doc.id,\n data: normalizedData,\n dataString: JSON.stringify(doc.data),\n dataRaw: doc.data,\n alternate_languages: normalizedAlernativeLanguages,\n url: docUrl,\n internal: {\n type: buildSchemaTypeName(doc.type),\n contentDigest: createContentDigest(doc),\n },\n _previewable: doc.id,\n }\n\n createNode(node)\n\n return node.id\n}\n\nexport const documentsToNodes = async (\n docs: PrismicDocument[],\n env: DocumentsToNodesEnvironment,\n) => await Promise.all(docs.map((doc) => documentToNodes(doc, env)))\n","import {\n Link as PrismicDOMLink,\n RichText as PrismicDOMRichText,\n} from 'prismic-dom'\nimport { buildImgixFixed, buildImgixFluid } from 'gatsby-plugin-imgix'\nimport { v5 as uuidv5 } from 'uuid'\nimport md5 from 'md5'\n\nimport { createClient } from './api'\nimport { documentToNodes } from './documentsToNodes'\nimport { buildSchemaTypeName } from './utils'\nimport { UUID_NAMESPACE, PLACEHOLDER_NODE_TYPE_SUFFIX } from './constants'\n\nimport { NodeInput } from 'gatsby'\nimport { QueryOptions } from 'prismic-javascript/d.ts/ResolvedApi'\nimport {\n BrowserPluginOptions,\n DocumentsToNodesEnvironment,\n DocumentsToNodesEnvironmentBrowserContext,\n HTMLSerializer,\n ImageFieldNormalizer,\n LinkField,\n LinkFieldNormalizer,\n LinkFieldType,\n LinkResolver,\n NormalizedLinkField,\n SlicesFieldNormalizer,\n StructuredTextFieldNormalizer,\n TypePath,\n NodeID,\n} from './types'\n\ninterface UnbrokenDocumentLinkField extends LinkField {\n link_type: LinkFieldType.Document\n id: string\n isBroken: false\n}\n\nconst loadLinkFieldDocument = async (\n field: UnbrokenDocumentLinkField,\n env: DocumentsToNodesEnvironment,\n) => {\n const {\n createNode,\n createNodeId,\n createContentDigest,\n pluginOptions,\n context,\n } = env\n if (field.link_type !== LinkFieldType.Document || !field.id || field.isBroken)\n return\n\n const { hasNodeById } = context as DocumentsToNodesEnvironmentBrowserContext\n const { repositoryName, accessToken, fetchLinks } = pluginOptions\n\n const linkedDocId = createNodeId(field.id)\n\n // Skip the fetch process if the node already exists in the store.\n if (hasNodeById(linkedDocId)) return\n\n // Create a placeholder node in the store to prevent infinite recursion. This\n // placeholder will be replaced with the actual node during the\n // `documentToNodes` call.\n createNode({\n id: linkedDocId,\n internal: {\n type: buildSchemaTypeName(field.type!) + PLACEHOLDER_NODE_TYPE_SUFFIX,\n contentDigest: createContentDigest(linkedDocId),\n },\n })\n\n const queryOptions: QueryOptions = {}\n if (fetchLinks) queryOptions.fetchLinks = fetchLinks\n\n // Query Prismic's API for the document.\n const client = await createClient(repositoryName, accessToken)\n const doc = await client.getByID(field.id, queryOptions)\n\n await documentToNodes(doc, env)\n}\n\nconst normalizeImageField: ImageFieldNormalizer = async (\n _apiId,\n field,\n _path,\n _doc,\n env,\n) => {\n const { pluginOptions } = env\n\n const url = field.url\n if (!url) return field\n\n const fixed = buildImgixFixed({\n url,\n sourceWidth: field.dimensions!.width,\n sourceHeight: field.dimensions!.height,\n args: {\n imgixParams: pluginOptions.imageImgixParams,\n placeholderImgixParams: pluginOptions.imagePlaceholderImgixParams,\n },\n })\n\n const fluid = buildImgixFluid({\n url,\n sourceWidth: field.dimensions!.width,\n sourceHeight: field.dimensions!.height,\n args: {\n imgixParams: pluginOptions.imageImgixParams,\n placeholderImgixParams: pluginOptions.imagePlaceholderImgixParams,\n },\n })\n\n return { ...field, fixed, fluid }\n}\n\n// TODO: Abstract proxy handler for any `getNodeById` needs (e.g. Slices).\nconst normalizeLinkField: LinkFieldNormalizer = async (\n apiId,\n field,\n _path,\n doc,\n env,\n) => {\n const { createNodeId, pluginOptions, context } = env\n const { getNodeById } = context as DocumentsToNodesEnvironmentBrowserContext\n const { linkResolver } = pluginOptions\n\n let linkResolverForField: LinkResolver | undefined = undefined\n if (linkResolver)\n linkResolverForField = linkResolver({\n key: apiId,\n value: field,\n node: doc,\n })\n\n let linkedDocId: NodeID | undefined = undefined\n if (field && field.link_type === LinkFieldType.Document && field.id)\n linkedDocId = createNodeId(field.id)\n\n if (\n field &&\n field.link_type === LinkFieldType.Document &&\n field.id &&\n !field.isBroken\n )\n await loadLinkFieldDocument(field as UnbrokenDocumentLinkField, env)\n\n return new Proxy(\n {\n ...field,\n url: PrismicDOMLink.url(field, linkResolverForField),\n document: linkedDocId,\n raw: field,\n },\n {\n get: (obj, prop: keyof NormalizedLinkField) => {\n if (prop === 'document') {\n if (\n field &&\n field.link_type === LinkFieldType.Document &&\n !field.isBroken &&\n linkedDocId\n )\n return getNodeById(linkedDocId)\n\n return null\n }\n\n return obj[prop]\n },\n },\n )\n}\n\nconst normalizeSlicesField: SlicesFieldNormalizer = (\n _apiId,\n field,\n _path,\n _doc,\n env,\n) => {\n const { context } = env\n const {\n hasNodeById,\n getNodeById,\n } = context as DocumentsToNodesEnvironmentBrowserContext\n\n return new Proxy(field, {\n get: (obj, prop: number) => {\n const id = obj[prop]\n\n if (hasNodeById(id)) {\n const node = getNodeById(id)\n return { ...node, __typename: node.internal.type }\n }\n\n return id\n },\n })\n}\n\nconst normalizeStructuredTextField: StructuredTextFieldNormalizer = async (\n apiId,\n field,\n _path,\n doc,\n env,\n) => {\n const { pluginOptions } = env\n const { linkResolver, htmlSerializer } = pluginOptions\n\n let linkResolverForField: LinkResolver | undefined = undefined\n if (linkResolver)\n linkResolverForField = linkResolver({\n key: apiId,\n value: field,\n node: doc,\n })\n\n let htmlSerializerForField: HTMLSerializer | undefined = undefined\n if (htmlSerializer)\n htmlSerializerForField = htmlSerializer({\n key: apiId,\n value: field,\n node: doc,\n })\n\n return {\n html: PrismicDOMRichText.asHtml(\n field,\n linkResolverForField,\n htmlSerializerForField,\n ),\n text: PrismicDOMRichText.asText(field),\n raw: field,\n }\n}\n\nexport const createEnvironment = (\n pluginOptions: BrowserPluginOptions,\n typePaths: TypePath[],\n): DocumentsToNodesEnvironment => {\n const nodeStore = new Map()\n\n const createNode = (node: NodeInput) => void nodeStore.set(node.id, node)\n const createNodeId = (input: string) => uuidv5(input, UUID_NAMESPACE)\n const createContentDigest = (input: unknown) => md5(JSON.stringify(input))\n const hasNodeById = (id: string) => nodeStore.has(id)\n const getNodeById = (id: string) => nodeStore.get(id)\n\n return {\n createNode,\n createNodeId,\n createContentDigest,\n normalizeImageField,\n normalizeLinkField,\n normalizeSlicesField,\n normalizeStructuredTextField,\n typePaths,\n pluginOptions,\n context: { hasNodeById, getNodeById },\n }\n}\n","import * as React from 'react'\nimport { NodeTree } from './types'\n\nconst DEFAULT_INITIAL_PAGES = {}\nconst DEFAULT_INITIAL_ENABLED = false\n\nexport enum ActionType {\n AddPage,\n EnablePreviews,\n DisablePreviews,\n}\n\ntype Action =\n | {\n type: ActionType.AddPage\n payload: { path: string; data: NodeTree }\n }\n | { type: Exclude }\n\ninterface State {\n pages: Record\n enabled: boolean\n}\n\nconst createInitialState = (initialState?: Partial): State => ({\n pages: DEFAULT_INITIAL_PAGES,\n enabled: DEFAULT_INITIAL_ENABLED,\n ...initialState,\n})\n\nconst reducer = (state: State, action: Action): State => {\n switch (action.type) {\n case ActionType.AddPage: {\n return {\n ...state,\n pages: {\n ...state.pages,\n [action.payload.path]: action.payload.data,\n },\n enabled: true,\n }\n }\n\n case ActionType.EnablePreviews: {\n return { ...state, enabled: true }\n }\n\n case ActionType.DisablePreviews: {\n return { ...state, enabled: false }\n }\n }\n}\n\nconst PreviewStoreContext = React.createContext([\n createInitialState(),\n () => {},\n] as [State, React.Dispatch])\n\nexport type PreviewStoreProviderProps = {\n children?: React.ReactNode\n initialPages?: State['pages']\n initialEnabled?: State['enabled']\n}\n\nexport const PreviewStoreProvider = ({\n children,\n initialPages = DEFAULT_INITIAL_PAGES,\n initialEnabled = DEFAULT_INITIAL_ENABLED,\n}: PreviewStoreProviderProps) => {\n const reducerTuple = React.useReducer(\n reducer,\n createInitialState({\n pages: initialPages,\n enabled: initialEnabled,\n }),\n )\n\n return (\n \n {children}\n \n )\n}\n\nexport const usePreviewStore = () => React.useContext(PreviewStoreContext)\n","import { Node } from 'gatsby'\nimport isPlainObject from 'lodash.isplainobject'\n\nimport { NodeTree } from './types'\n\n// Root node field used to compare static data with preview data. If values are\n// equal, the preview node can be treated as an updated version of the static\n// node.\nconst PREVIEWABLE_NODE_ID_FIELD = '_previewable'\n\n// TODO: Remove in v4.0.0\n// Same as PREVIEWABLE_NODE_ID_FIELD, but the legacy version that will be phased out in v4.0.0.\nconst LEGACY_PREVIEWABLE_NODE_ID_FIELD = 'prismicId'\n\nconst traverseAndReplace = (node: any, replacementNode: Node): any => {\n if (isPlainObject(node)) {\n // If the nodes share an ID, replace it.\n if (\n node[PREVIEWABLE_NODE_ID_FIELD] ===\n replacementNode[PREVIEWABLE_NODE_ID_FIELD]\n )\n return replacementNode\n\n // TODO: Remove in v4.0.0\n if (\n node[LEGACY_PREVIEWABLE_NODE_ID_FIELD] ===\n replacementNode[LEGACY_PREVIEWABLE_NODE_ID_FIELD]\n ) {\n console.warn(\n 'Warning: Merging nested preview data using the prismicId field will be deprecated in gatsby-source-prismic v4.0.0.\\n\\nIf you are relying on this functionality, please update your GraphQL query to include the _previewable field on documents that should be previewable.',\n )\n return replacementNode\n }\n\n // We did not find the Node to replace. Iterate all properties and continue\n // to find the Node.\n const newNode: typeof node = {}\n for (const subnodeKey in node)\n newNode[subnodeKey] = traverseAndReplace(\n node[subnodeKey],\n replacementNode,\n )\n return newNode\n }\n\n // Iterate all elements in the node to find the Node.\n if (Array.isArray(node))\n return node.map((subnode) => traverseAndReplace(subnode, replacementNode))\n\n // If the node is not an object or array, it cannot be a Node.\n return node\n}\n\nexport interface MergePrismicPreviewDataArgs {\n staticData?: NodeTree\n previewData?: NodeTree\n /**\n * Determines the method with which the function merges preview data into static data.\n *\n * - `traverseAndReplace`: Traverse static data nodes and replace with preview data if IDs match.\n * - `rootReplaceOrInsert`: Replace or insert preview data at the root level.\n */\n strategy?: 'traverseAndReplace' | 'rootReplaceOrInsert'\n}\n\n/**\n * Merges preview data with static data. Different merge strategies can be used\n * for different environments.\n */\nexport const mergePrismicPreviewData = ({\n staticData,\n previewData,\n strategy = 'traverseAndReplace',\n}: MergePrismicPreviewDataArgs): NodeTree | undefined => {\n if (!staticData && !previewData) return\n if (!staticData) return previewData\n if (!previewData) return staticData\n\n switch (strategy) {\n // Unpublished previews must return data at the root to ensure it is always\n // available. If staticData and previewData share root-level keys, they are\n // merged. Otherwise, data will be sibilings.\n case 'rootReplaceOrInsert':\n return { ...staticData, ...previewData }\n\n // Traverse static data nodes and replace with preview data if IDs match.\n case 'traverseAndReplace':\n default: {\n const previewDataRootNodeKey = Object.keys(previewData)[0]\n\n // TODO: Remove in v4.0.0.\n if (\n staticData.hasOwnProperty(previewDataRootNodeKey) &&\n !staticData[previewDataRootNodeKey][PREVIEWABLE_NODE_ID_FIELD] &&\n !staticData[previewDataRootNodeKey][LEGACY_PREVIEWABLE_NODE_ID_FIELD]\n ) {\n // TODO: Add link to more details on _previewable.\n console.warn(\n 'Warning: Merging preview data implicitly will be deprecated in gatsby-source-prismic v4.0.0.\\n\\nIf you are relying on this functionality, please update your GraphQL query to include the _previewable field on documents that should be previewable.',\n )\n return { ...staticData, ...previewData }\n }\n\n return traverseAndReplace(staticData, previewData[previewDataRootNodeKey])\n }\n }\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n"],"sourceRoot":""}

\\n ').concat(n ? \"').concat(u, \"\") : u, \"\\n