(function (_, XXH, kotlin_kotlin, kotlin_io_ktor_ktor_io) { 'use strict'; //region block: imports var protoOf = kotlin_kotlin.$_$.uc; var interfaceMeta = kotlin_kotlin.$_$.vb; var setMetadataFor = kotlin_kotlin.$_$.vc; var classMeta = kotlin_kotlin.$_$.jb; var VOID = kotlin_kotlin.$_$.f; var toULong = kotlin_kotlin.$_$.zg; var _ULong___get_data__impl__fggpzb = kotlin_kotlin.$_$.b4; var Charsets_getInstance = kotlin_io_ktor_ktor_io.$_$.f; var encodeToByteArray = kotlin_kotlin.$_$.te; var encodeToByteArray_0 = kotlin_io_ktor_ktor_io.$_$.j; //endregion //region block: pre-declaration setMetadataFor(XXHasher64Factory, 'XXHasher64Factory', interfaceMeta); setMetadataFor(XXStringHasher, 'XXStringHasher', interfaceMeta); setMetadataFor(XXHasher64FactoryJs, 'XXHasher64FactoryJs', classMeta, VOID, [XXHasher64Factory], XXHasher64FactoryJs); setMetadataFor(XXHasher64Js, 'XXHasher64Js', classMeta); setMetadataFor(XXStringHasherJs, 'XXStringHasherJs', classMeta, VOID, [XXStringHasher], XXStringHasherJs); //endregion function XXHasher64Factory() { } function XXStringHasher() { } function XXHasher64FactoryJs() { } protoOf(XXHasher64FactoryJs).lli = function (seed) { var hasher = XXH.h64(); hasher.init(seed); return new XXHasher64Js(hasher); }; function XXHasher64Js(hasher64) { this.nli_1 = hasher64; } protoOf(XXHasher64Js).oli = function (data) { // Inline function 'js.typedarrays.toUint8Array' call // Inline function 'js.typedarrays.asInt8Array' call // Inline function 'kotlin.js.unsafeCast' call // Inline function 'kotlin.js.asDynamic' call var array = data; var array_0 = new Uint8Array(array.buffer, array.byteOffset, array.length); this.nli_1.update(array_0.buffer); }; protoOf(XXHasher64Js).pli = function () { var digestStr = this.nli_1.digest().toString(10); // Inline function 'kotlin.ULong.toLong' call var this_0 = toULong(digestStr); return _ULong___get_data__impl__fggpzb(this_0); }; function XXStringHasherJs() { } protoOf(XXStringHasherJs).mli = function (string) { // Inline function 'js.typedarrays.toUint8Array' call var tmp$ret$0; $l$block: { // Inline function 'io.ktor.utils.io.core.toByteArray' call var charset = Charsets_getInstance().m2h_1; if (charset.equals(Charsets_getInstance().m2h_1)) { tmp$ret$0 = encodeToByteArray(string); break $l$block; } tmp$ret$0 = encodeToByteArray_0(charset.q2h(), string, 0, string.length); } // Inline function 'js.typedarrays.asInt8Array' call // Inline function 'kotlin.js.unsafeCast' call // Inline function 'kotlin.js.asDynamic' call var array = tmp$ret$0; var array_0 = new Uint8Array(array.buffer, array.byteOffset, array.length); var hash = XXH.h64(array_0.buffer, 0).toString(10); // Inline function 'kotlin.ULong.toLong' call var this_0 = toULong(hash); return _ULong___get_data__impl__fggpzb(this_0); }; //region block: exports _.$_$ = _.$_$ || {}; _.$_$.a = XXHasher64FactoryJs; _.$_$.b = XXStringHasherJs; _.$_$.c = XXHasher64Factory; _.$_$.d = XXStringHasher; //endregion return _; }(module.exports, require('xxhashjs'), require('./kotlin-kotlin-stdlib.js'), require('./ktor-ktor-io.js'))); //# sourceMappingURL=UstadMobile-lib-xxhashkmp-core.js.map