@earth-app/shovel
Version:
Kotlin Multiplatform Web Scraping Framework
105 lines (103 loc) • 4.11 kB
JavaScript
(function (factory) {
if (typeof define === 'function' && define.amd)
define(['exports', './kotlin-kotlin-stdlib.js', './ksoup-ksoup-engine-common.js'], factory);
else if (typeof exports === 'object')
factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./ksoup-ksoup-engine-common.js'));
else {
if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
throw new Error("Error loading module 'ksoup-ksoup-engine-lite'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'ksoup-ksoup-engine-lite'.");
}
if (typeof globalThis['ksoup-ksoup-engine-common'] === 'undefined') {
throw new Error("Error loading module 'ksoup-ksoup-engine-lite'. Its dependency 'ksoup-ksoup-engine-common' was not found. Please, check whether 'ksoup-ksoup-engine-common' is loaded prior to 'ksoup-ksoup-engine-lite'.");
}
globalThis['ksoup-ksoup-engine-lite'] = factory(typeof globalThis['ksoup-ksoup-engine-lite'] === 'undefined' ? {} : globalThis['ksoup-ksoup-engine-lite'], globalThis['kotlin-kotlin-stdlib'], globalThis['ksoup-ksoup-engine-common']);
}
}(function (_, kotlin_kotlin, kotlin_com_fleeksoft_ksoup_ksoup_engine_common) {
'use strict';
//region block: imports
var protoOf = kotlin_kotlin.$_$.y7;
var initMetadataForObject = kotlin_kotlin.$_$.n7;
var toString = kotlin_kotlin.$_$.c8;
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.o1;
var Unit_instance = kotlin_kotlin.$_$.a3;
var canEncode = kotlin_com_fleeksoft_ksoup_ksoup_engine_common.$_$.d;
var canEncode_0 = kotlin_com_fleeksoft_ksoup_ksoup_engine_common.$_$.c;
var Charset = kotlin_com_fleeksoft_ksoup_ksoup_engine_common.$_$.e;
var initMetadataForClass = kotlin_kotlin.$_$.h7;
var VOID = kotlin_kotlin.$_$.h;
//endregion
//region block: pre-declaration
initMetadataForObject(KsoupEngineImpl, 'KsoupEngineImpl');
initMetadataForClass(CharsetImpl, 'CharsetImpl', VOID, VOID, [Charset]);
//endregion
function KsoupEngineImpl() {
}
protoOf(KsoupEngineImpl).a3k = function () {
return new CharsetImpl('UTF-8');
};
var KsoupEngineImpl_instance;
function KsoupEngineImpl_getInstance() {
return KsoupEngineImpl_instance;
}
function CharsetImpl(name) {
this.b3k_1 = name;
var tmp;
var tmp_0;
var tmp_1;
var tmp_2;
// Inline function 'kotlin.text.lowercase' call
// Inline function 'kotlin.js.asDynamic' call
if (this.b3k_1.toLowerCase() === 'utf8') {
tmp_2 = true;
} else {
// Inline function 'kotlin.text.lowercase' call
// Inline function 'kotlin.js.asDynamic' call
tmp_2 = this.b3k_1.toLowerCase() === 'utf-8';
}
if (tmp_2) {
tmp_1 = true;
} else {
// Inline function 'kotlin.text.lowercase' call
// Inline function 'kotlin.js.asDynamic' call
tmp_1 = this.b3k_1.toLowerCase() === 'iso-8859-1';
}
if (tmp_1) {
tmp_0 = true;
} else {
// Inline function 'kotlin.text.lowercase' call
// Inline function 'kotlin.js.asDynamic' call
tmp_0 = this.b3k_1.toLowerCase() === 'ascii';
}
if (tmp_0) {
tmp = true;
} else {
// Inline function 'kotlin.text.lowercase' call
// Inline function 'kotlin.js.asDynamic' call
tmp = this.b3k_1.toLowerCase() === 'us-ascii';
}
// Inline function 'kotlin.require' call
if (!tmp) {
var message = 'Charset ' + this.b3k_1 + ' not supported';
throw IllegalArgumentException_init_$Create$(toString(message));
}
}
protoOf(CharsetImpl).w3j = function () {
return this.b3k_1;
};
protoOf(CharsetImpl).z3j = function () {
return true;
};
//region block: post-declaration
protoOf(CharsetImpl).x3j = canEncode;
protoOf(CharsetImpl).y3j = canEncode_0;
//endregion
//region block: init
KsoupEngineImpl_instance = new KsoupEngineImpl();
//endregion
//region block: exports
_.$_$ = _.$_$ || {};
_.$_$.a = KsoupEngineImpl_instance;
//endregion
return _;
}));
//# sourceMappingURL=ksoup-ksoup-engine-lite.js.map