-- Generated from the frozen legacy-h5 rules by migration/port-engine.cjs. -- Edit the migration source or an explicit native adapter; regenerate and run parity tests. ---@param _port table ---@param _data table ---@param _rt table return function(_port, _data, _rt) -- H5 engine.js:819 · newEscort _port["newEscort"] = function(qualityIdx, clsKey, entry) local base = {["force"] = 6, ["agility"] = 6, ["insight"] = 6, ["courage"] = 6}; local main = _rt.get(_rt.get(_data["CLASSES"], clsKey), "main"); local at = _rt.assign({}, base); _rt.update(at, main, "+", _rt.add(4, (qualityIdx * 2))); do return {["id"] = _rt.call(_rt.call(_rt.math["random"](), "toString", 36), "slice", 2, 9), ["name"] = _rt.choose(entry, function() return _rt.get(entry, "name") end, function() return _rt.get(_data["NPC_NAMES"], _rt.math["floor"]((_rt.math["random"]() * _rt.get(_data["NPC_NAMES"], "length")))) end), ["bio"] = _rt.choose(entry, function() return _rt.get(entry, "bio") end, function() return "" end), ["cls"] = clsKey, ["q"] = qualityIdx, ["level"] = 1, ["exp"] = 0, ["at"] = {["force"] = _rt.get(at, "force"), ["agility"] = _rt.get(at, "agility"), ["insight"] = _rt.get(at, "insight"), ["courage"] = _rt.get(at, "courage"), ["loyalty"] = 100}, ["equip"] = {["weapon"] = 0, ["mount"] = 0, ["armor"] = 0, ["compass"] = 0}, ["train"] = {["force"] = 0, ["agility"] = 0, ["insight"] = 0, ["courage"] = 0}, ["reforge"] = {["weapon"] = 0, ["mount"] = 0, ["armor"] = 0, ["compass"] = 0}, ["reforgePity"] = {["weapon"] = 0, ["mount"] = 0, ["armor"] = 0, ["compass"] = 0}, ["frag"] = 0} end end -- H5 engine.js:843 · recruitTopOdds _port["recruitTopOdds"] = function(cap) if _rt.truth(_rt.compare("<=", cap, 0)) then do return 0 end end do return _rt.math["max"](0.03, _rt.math["min"](0.18, (0.18 - (0.014 * cap)))) end end -- H5 engine.js:847 · recruitOdds _port["recruitOdds"] = function(cap) (function() cap = _rt.math["max"](0, _rt.math["min"]((_rt.get(_data["QUALITY"], "length") - 1), _rt.orElse(_rt.math["floor"](cap), function() return 0 end))); return cap end)(); if _rt.truth((cap == 0)) then do return _rt.array({{["q"] = 0, ["p"] = 1}}) end end local topP = _port["recruitTopOdds"](cap); local w = _rt.array({}); local sum = 0; do local i = 0; while _rt.truth(_rt.compare("<", i, cap)) do do local v = _rt.math["pow"](0.86, ((cap - 1) - i)); _rt.call(w, "push", v); (function() sum = _rt.add(sum, v); return sum end)(); end ::_continue10:: (function() local _before = i; i = i + (1); return _before end)() end end local out = _rt.array({}); do local i = 0; while _rt.truth(_rt.compare("<", i, cap)) do do _rt.call(out, "push", {["q"] = i, ["p"] = (((1 - topP) * _rt.get(w, i)) / sum)}); end ::_continue11:: (function() local _before = i; i = i + (1); return _before end)() end end _rt.call(out, "push", {["q"] = cap, ["p"] = topP}); do return out end end -- H5 engine.js:858 · rollQuality _port["rollQuality"] = function(s) local cap = _port["maxQuality"](s); local table = _port["recruitOdds"](cap); local r = _rt.math["random"](); local acc = 0; for _, t in ipairs(table) do do (function() acc = _rt.add(acc, _rt.get(t, "p")); return acc end)(); if _rt.truth(_rt.compare("<", r, acc)) then do return _rt.get(t, "q") end end end ::_continue12:: end do return cap end end -- H5 engine.js:867 · recruitPool _port["recruitPool"] = function(s) local cap = _port["maxQuality"](s); local nextIdx = _rt.add(cap, 1); local g = _port["qualityGate"](nextIdx); do return {["cap"] = cap, ["key"] = _rt.get(_rt.get(_data["QUALITY"], cap), "key"), ["mul"] = _rt.get(_rt.get(_data["QUALITY"], cap), "mul"), ["topP"] = _port["recruitTopOdds"](cap), ["secondKey"] = _rt.choose(_rt.compare(">", cap, 0), function() return _rt.get(_rt.get(_data["QUALITY"], (cap - 1)), "key") end, function() return nil end), ["secondP"] = _rt.choose(_rt.compare(">", cap, 0), function() return _rt.get(_rt.orElse(_rt.get(_port["recruitOdds"](cap), (cap - 1)), function() return {} end), "p") end, function() return 0 end), ["nextKey"] = _rt.choose(g, function() return _rt.get(_rt.get(_data["QUALITY"], nextIdx), "key") end, function() return nil end), ["nextGate"] = _rt.choose(g, function() return _rt.get(g, "p") end, function() return nil end), ["tiers"] = _rt.call(_rt.call(_data["QUALITY"], "slice", 0, _rt.add(cap, 1)), "map", function(q) return _rt.get(q, "key") end)} end end _port["RECRUIT_REFRESH_TRIPS"] = 0.8 -- H5 engine.js:883 · refreshCost _port["refreshCost"] = function(s) do return _rt.math["max"](30, _rt.math["round"]((_port["unitFreight"](s) * _port["RECRUIT_REFRESH_TRIPS"]))) end end -- H5 engine.js:887 · genRecruits _port["genRecruits"] = function(s) local owned = _rt.setOf(_rt.call(_rt.get(s, "escorts"), "map", function(e) return _rt.get(e, "name") end)); local pool = _rt.call(_data["ROSTER"], "filter", function(r) return _rt.andThen((not _rt.truth(_rt.call(owned, "has", _rt.get(r, "name")))), function() return (not _rt.truth(_rt.call(_rt.orElse(_rt.get(s, "recruits"), function() return _rt.array({}) end), "some", function(x) return _rt.andThen(x, function() return (_rt.get(x, "name") == _rt.get(r, "name")) end) end))) end) end); local chosen = _rt.array({}); local src = _rt.choose(_rt.compare(">=", _rt.get(pool, "length"), 4), function() return pool end, function() return _data["ROSTER"] end); local cap = _port["maxQuality"](s); local taken = _rt.setOf(); local guard = 0; while _rt.truth(_rt.andThen(_rt.compare("<", _rt.get(chosen, "length"), 4), function() return _rt.compare("<", (function() local _before = guard; guard = guard + (1); return _before end)(), 80) end)) do do local avail = _rt.call(src, "filter", function(r) return (not _rt.truth(_rt.call(taken, "has", _rt.get(r, "name")))) end); local r = _rt.get(_rt.choose(_rt.get(avail, "length"), function() return avail end, function() return src end), _rt.math["floor"]((_rt.math["random"]() * _rt.orElse(_rt.get(avail, "length"), function() return _rt.get(src, "length") end)))); _rt.call(taken, "add", _rt.get(r, "name")); local q = _port["rollQuality"](s); if _rt.truth(_rt.compare(">", _rt.orElse(_rt.get(r, "q"), function() return 0 end), q)) then (function() q = _rt.math["min"](cap, _rt.orElse(_rt.get(r, "q"), function() return 0 end)); return q end)(); end _rt.call(chosen, "push", _port["newEscort"](q, _rt.get(r, "cls"), r)); end ::_continue13:: end do return chosen end end -- H5 engine.js:907 · initState _port["initState"] = function() local s = {["version"] = 8, ["firstDay"] = _port["today"](), ["demoDay"] = 1, ["silver"] = 150, ["prestige"] = 0, ["prestigeTotal"] = 0, ["gift"] = 0, ["branches"] = 1, ["monopoly"] = {}, ["openTier"] = 1, ["catchup"] = {["streak"] = 0}, ["buff"] = {["p2x"] = 0}, ["businessRequirements"] = {["civil"] = _rt.get(_port["businessById"]("civil"), "power")}, ["escorts"] = _rt.array({_port["newEscort"](0, "biaotou", _rt.get(_data["ROSTER"], 0)), _port["newEscort"](0, "hangshang", _rt.get(_data["ROSTER"], 2))}), ["recruits"] = _rt.array({}), ["facilities"] = {["wuguan"] = 1, ["male"] = 1, ["zhangfang"] = 1, ["biaoqi"] = 1, ["fenhao"] = 1}, ["codex"] = {["events"] = _rt.array({}), ["escorts"] = _rt.array({}), ["goods"] = _rt.array({}), ["cities"] = _rt.array({}), ["roster"] = _rt.array({_rt.get(_rt.get(_data["ROSTER"], 0), "name"), _rt.get(_rt.get(_data["ROSTER"], 2), "name")})}, ["stats"] = {["runs"] = 0, ["silverEarned"] = 0, ["left"] = 0, ["battles"] = 0, ["battleWins"] = 0}, ["news"] = _rt.array({"新镖局开张,先接一趟邻县的短途镖练练手。"}), ["ads"] = {["refresh"] = 0, ["speed"] = 0, ["double"] = 0, ["offline"] = 0, ["retry"] = 0, ["loyal"] = 0, ["p2x"] = 0, ["date"] = _port["today"]()}, ["telemetry"] = _rt.array({}), ["cloudId"] = "", ["lastSeen"] = _rt.now(), ["runs"] = _rt.array({}), ["offline"] = nil}; if _rt.truth(_port["CITY_TRIAL"]) then _rt.call(_rt.get(s, "escorts"), "forEach", function(e) _rt.set(e, "at", {["force"] = 14, ["agility"] = 10, ["courage"] = 10, ["insight"] = 10, ["loyalty"] = 100}); end); end _port["journeyState"](s); _rt.set(s, "recruits", _port["genRecruits"](s)); _rt.set(_rt.get(s, "codex"), "roster", _rt.call(_rt.get(s, "escorts"), "map", function(e) return _rt.get(e, "name") end)); do return s end end -- H5 engine.js:931 · migrate _port["migrate"] = function(s) if _rt.truth(_rt.orElse((not _rt.truth(s)), function() return (not _rt.truth(_rt.get(s, "escorts"))) end)) then do return nil end end _port["journeyState"](s); if _rt.truth((not _rt.truth(_rt.get(s, "version")))) then _rt.set(s, "version", 2); if _rt.truth(_rt.get(s, "currentRun")) then local r = _rt.assign({}, _rt.get(s, "currentRun"), {["id"] = _rt.call(_rt.call(_rt.math["random"](), "toString", 36), "slice", 2, 9)}); _rt.set(s, "runs", _rt.array({r})); end _rt.set(s, "currentRun", nil); _rt.set(s, "firstDay", _rt.orElse(_rt.get(s, "firstDay"), function() return _port["today"]() end)); _rt.set(s, "demoDay", _rt.orElse(_rt.get(s, "demoDay"), function() return 1 end)); _rt.set(s, "gift", _rt.orElse(_rt.get(s, "gift"), function() return 0 end)); _rt.set(s, "news", _rt.orElse(_rt.get(s, "news"), function() return _rt.array({}) end)); _rt.set(s, "version", 3); _rt.set(s, "stats", _rt.assign({["runs"] = 0, ["silverEarned"] = 0, ["left"] = 0, ["battles"] = 0, ["battleWins"] = 0}, _rt.orElse(_rt.get(s, "stats"), function() return {} end))); end _rt.call(_rt.orElse(_rt.get(s, "recruits"), function() return _rt.array({}) end), "forEach", function(e) if _rt.truth((not _rt.truth(e))) then do return nil end end local profile = _rt.call(_data["ROSTER"], "find", function(row) return (_rt.get(row, "name") == _rt.get(e, "name")) end); if _rt.truth(profile) then _rt.set(e, "bio", _rt.get(profile, "bio")); end end); _rt.call(_rt.get(s, "escorts"), "forEach", function(e) if _rt.truth((not _rt.truth(_rt.get(e, "equip")))) then _rt.set(e, "equip", {["weapon"] = 0, ["mount"] = 0, ["armor"] = 0, ["compass"] = 0}); end if _rt.truth((not _rt.truth(_rt.get(e, "train")))) then _rt.set(e, "train", {["force"] = 0, ["agility"] = 0, ["insight"] = 0, ["courage"] = 0}); end if _rt.truth((not _rt.truth(_rt.get(e, "reforge")))) then _rt.set(e, "reforge", {["weapon"] = 0, ["mount"] = 0, ["armor"] = 0, ["compass"] = 0}); end if _rt.truth((not _rt.truth(_rt.get(e, "reforgePity")))) then _rt.set(e, "reforgePity", {["weapon"] = 0, ["mount"] = 0, ["armor"] = 0, ["compass"] = 0}); end if _rt.truth((_rt.get(e, "frag") == nil)) then _rt.set(e, "frag", 0); end if _rt.truth((_rt.get(_rt.get(e, "at"), "loyalty") == nil)) then _rt.set(_rt.get(e, "at"), "loyalty", 100); end local profile = _rt.call(_data["ROSTER"], "find", function(row) return (_rt.get(row, "name") == _rt.get(e, "name")) end); _rt.set(e, "bio", _rt.choose(profile, function() return _rt.get(profile, "bio") end, function() return _rt.orElse(_rt.get(e, "bio"), function() return "" end) end)); end); if _rt.truth(_rt.compare("<", _rt.get(s, "version"), 5)) then _rt.set(s, "version", 5); end if _rt.truth((_rt.get(s, "branches") == nil)) then _rt.set(s, "branches", 1); end if _rt.truth((not _rt.truth(_rt.get(s, "monopoly")))) then _rt.set(s, "monopoly", {}); end if _rt.truth((_rt.get(s, "openTier") == nil)) then _rt.set(s, "openTier", 1); end if _rt.truth((not _rt.truth(_rt.get(s, "catchup")))) then _rt.set(s, "catchup", {["streak"] = 0}); end if _rt.truth((not _rt.truth(_rt.get(s, "buff")))) then _rt.set(s, "buff", {["p2x"] = 0}); end if _rt.truth(_rt.compare("<", _rt.get(s, "version"), 7)) then _rt.set(s, "version", 7); end if _rt.truth(_rt.compare("<", _rt.get(s, "version"), 8)) then _rt.set(s, "version", 8); end local defaultFacilities = {["wuguan"] = 1, ["male"] = 1, ["zhangfang"] = 1, ["biaoqi"] = 1, ["fenhao"] = 1}; _rt.set(s, "facilities", _rt.assign({}, defaultFacilities, _rt.orElse(_rt.get(s, "facilities"), function() return {} end))); if _rt.truth((not _rt.truth(_rt.get(s, "codex")))) then _rt.set(s, "codex", {["events"] = _rt.array({}), ["escorts"] = _rt.array({}), ["goods"] = _rt.array({}), ["cities"] = _rt.array({}), ["roster"] = _rt.array({})}); end if _rt.truth((not _rt.truth(_rt.get(_rt.get(s, "codex"), "roster")))) then _rt.set(_rt.get(s, "codex"), "roster", _rt.call(_rt.get(s, "escorts"), "map", function(e) return _rt.get(e, "name") end)); end if _rt.truth((not _rt.truth(_rt.get(_rt.get(s, "codex"), "cities")))) then _rt.set(_rt.get(s, "codex"), "cities", _rt.array({})); end if _rt.truth((not _rt.truth(_rt.get(s, "telemetry")))) then _rt.set(s, "telemetry", _rt.array({})); end if _rt.truth((_rt.get(s, "cloudId") == nil)) then _rt.set(s, "cloudId", ""); end if _rt.truth((not _rt.truth(_rt.get(s, "runs")))) then _rt.set(s, "runs", _rt.array({})); end if _rt.truth((not _rt.truth(_rt.get(s, "businessRequirements")))) then _rt.set(s, "businessRequirements", {}); _rt.call(_rt.call(_port["businessList"](), "slice", 0, _port["openedTier"](s)), "forEach", function(b, i) _rt.set(_rt.get(s, "businessRequirements"), _rt.get(b, "id"), _rt.orElse(_rt.get(_rt.array({40, 200, 400, 800, 1500, 2500, 4000}), i), function() return _rt.get(b, "power") end)); end); end _rt.call(_rt.get(s, "runs"), "forEach", function(r) if _rt.truth((not _rt.truth(_rt.get(r, "bizId")))) then local b = _port["businessForRoute"](_rt.get(r, "routeId")); if _rt.truth(b) then _rt.set(r, "bizId", _rt.get(b, "id")); end end end); _rt.call(_rt.get(s, "runs"), "forEach", function(r) if _rt.truth(_rt.get(r, "cityGoalId")) then _rt.set(r, "bizName", _port["cityRunName"](r)); if _rt.truth(_rt.get(r, "settleDetail")) then _rt.set(_rt.get(r, "settleDetail"), "bizName", _rt.get(r, "bizName")); end if _rt.truth(_rt.andThen(_rt.get(r, "journeyDecision"), function() return _rt.get(r, "pendingEvent") end)) then _rt.set(r, "pendingEvent", _port["cityDecisionEvent"](r)); end else if _rt.truth(_rt.get(r, "pendingEvent")) then local current = _rt.call(_data["EVENTS"], "find", function(event) return (_rt.get(event, "id") == _rt.get(_rt.get(r, "pendingEvent"), "id")) end); if _rt.truth(current) then _rt.set(r, "pendingEvent", current); end end end if _rt.truth((_rt.get(r, "legs") == nil)) then _rt.set(r, "legs", 1); end if _rt.truth((_rt.get(r, "legIdx") == nil)) then _rt.set(r, "legIdx", 0); end if _rt.truth((not _rt.truth(_rt.get(r, "paid")))) then _rt.set(r, "paid", {["silver"] = 0, ["prestige"] = 0}); end end); if _rt.truth((not _rt.truth(_rt.get(s, "news")))) then _rt.set(s, "news", _rt.array({})); end if _rt.truth((_rt.get(s, "prestigeTotal") == nil)) then _rt.set(s, "prestigeTotal", _rt.orElse(_rt.get(s, "prestige"), function() return 0 end)); end if _rt.truth((not _rt.truth(_rt.get(s, "ads")))) then _rt.set(s, "ads", {["refresh"] = 0, ["speed"] = 0, ["double"] = 0, ["offline"] = 0, ["retry"] = 0, ["loyal"] = 0, ["p2x"] = 0, ["date"] = _port["today"]()}); end if _rt.truth((_rt.get(_rt.get(s, "ads"), "p2x") == nil)) then _rt.set(_rt.get(s, "ads"), "p2x", 0); end if _rt.truth((_rt.get(_rt.get(s, "ads"), "date") ~= _port["today"]())) then _rt.set(s, "ads", {["refresh"] = 0, ["speed"] = 0, ["double"] = 0, ["offline"] = 0, ["retry"] = 0, ["loyal"] = 0, ["p2x"] = 0, ["date"] = _port["today"]()}); end if _rt.truth((not _rt.truth(_rt.get(s, "recruits")))) then _rt.set(s, "recruits", _port["genRecruits"](s)); else local remaining = _rt.array({}); do local i = 0; while _rt.truth(_rt.compare("<", i, _rt.math["max"](4, _rt.get(_rt.get(s, "recruits"), "length")))) do do if _rt.truth(_rt.get(_rt.get(s, "recruits"), i)) then _rt.call(remaining, "push", _rt.get(_rt.get(s, "recruits"), i)); end end ::_continue14:: (function() local _before = i; i = i + (1); return _before end)() end end _rt.set(s, "recruits", remaining); end do return s end end _port["OFFLINE_EFF"] = 0.4 -- H5 engine.js:1031 · offlinePlan _port["offlinePlan"] = function(s) local teams = _rt.array({}); if _rt.truth((not _rt.truth(_port["unlocked"](s, "offline")))) then do return {["teams"] = teams, ["hourly"] = 0, ["freightHourly"] = 0, ["passiveHourly"] = 0, ["efficiency"] = _port["OFFLINE_EFF"]} end end local zoneMul = _rt.get(_port["powerProfile"](s, _rt.array({})), "zoneMul"); local contributions = {}; for _, e in ipairs(_rt.get(s, "escorts")) do do _rt.set(contributions, _rt.get(e, "id"), _rt.get(_port["escortPowerContribution"](e), "rawQL")); end ::_continue15:: end local strength = function(ids) return _rt.math["round"]((_rt.call(ids, "reduce", function(sum, id) return _rt.add(sum, _rt.orElse(_rt.get(contributions, id), function() return 0 end)) end, 0) * zoneMul)) end; local crew = _rt.call(_rt.call(_rt.orElse(_rt.get(s, "escorts"), function() return _rt.array({}) end), "filter", function(e) return _rt.compare(">", _rt.get(_rt.get(e, "at"), "loyalty"), 35) end), "sort", function(a, b) return (strength(_rt.array({_rt.get(b, "id")})) - strength(_rt.array({_rt.get(a, "id")}))) end); local businesses = _rt.call(_port["businessList"](), "filter", function(b) return _rt.andThen(_port["businessUnlocked"](s, b), function() return _port["shopOpened"](s, b) end) end); local freightHourly = 0; do local ceiling = 0; while _rt.truth(_rt.compare("<", ceiling, _rt.get(businesses, "length"))) do do local pool = _rt.concat(crew); local candidateTeams = _rt.array({}); local candidateHourly = 0; do local slot = 0; while _rt.truth(_rt.andThen(_rt.compare("<", slot, _port["parallelLimit"](s)), function() return _rt.get(pool, "length") end)) do do local sent = false; do local i = ceiling; while _rt.truth(_rt.compare(">=", i, 0)) do do local biz = _rt.get(businesses, i); local need = _port["businessPower"](s, biz); local ids = _rt.array({}); for _, e in ipairs(pool) do do _rt.call(ids, "push", _rt.get(e, "id")); if _rt.truth(_rt.compare(">=", strength(ids), need)) then break end end ::_continue19:: end local power = strength(ids); if _rt.truth(_rt.orElse((not _rt.truth(_rt.get(ids, "length"))), function() return _rt.compare("<", power, need) end)) then goto _continue18 end local route = _rt.call(_data["ROUTES"], "find", function(r) return (_rt.get(r, "id") == _rt.get(biz, "route")) end); local q = _port["quoteOf"](s, ids); _rt.set(q, "baseSilver", _rt.add(_rt.add(1, _port["rankBonus"](_port["rankIndex"](_port["progressionPrestige"](s)))), (0.04 * (_rt.get(_rt.get(s, "facilities"), "zhangfang") - 1)))); _rt.set(q, "silverBonus", (_rt.get(q, "baseSilver") * _rt.get(q, "rfSilver"))); local run = {["routeId"] = _rt.get(biz, "route"), ["bizId"] = _rt.get(biz, "id"), ["value"] = _rt.get(biz, "value"), ["power"] = power, ["need"] = need, ["escortIds"] = ids, ["insight"] = _port["insightSum"](s, ids), ["quote"] = q, ["effects"] = {["silver"] = 1, ["power"] = 1, ["time"] = 1, ["exp"] = 0, ["prestige"] = 0}}; local silver = _rt.get(_port["settle"](s, run), "silver"); local duration = _port["durationSec"](s, route, ids, need, power); local hourly = (((silver / duration) * 3600) * _port["OFFLINE_EFF"]); _rt.call(candidateTeams, "push", {["bizId"] = _rt.get(biz, "id"), ["bizName"] = _rt.get(biz, "name"), ["escortIds"] = ids, ["power"] = power, ["need"] = need, ["silver"] = silver, ["duration"] = duration, ["hourly"] = hourly}); (function() candidateHourly = _rt.add(candidateHourly, hourly); return candidateHourly end)(); (function() pool = _rt.call(pool, "filter", function(e) return (not _rt.truth(_rt.call(ids, "includes", _rt.get(e, "id")))) end); return pool end)(); (function() sent = true; return sent end)(); break end ::_continue18:: (function() local _before = i; i = i + (-1); return _before end)() end end if _rt.truth((not _rt.truth(sent))) then break end end ::_continue17:: (function() local _before = slot; slot = slot + (1); return _before end)() end end if _rt.truth(_rt.compare(">", candidateHourly, freightHourly)) then (function() freightHourly = candidateHourly; return freightHourly end)(); (function() teams = candidateTeams; return teams end)(); end end ::_continue16:: (function() local _before = ceiling; ceiling = ceiling + (1); return _before end)() end end local passiveHourly = _port["monopolyHourly"](s); do return {["teams"] = teams, ["hourly"] = _rt.math["round"](_rt.add(freightHourly, passiveHourly)), ["freightHourly"] = freightHourly, ["passiveHourly"] = passiveHourly, ["efficiency"] = _port["OFFLINE_EFF"]} end end -- H5 engine.js:1067 · offlineRate _port["offlineRate"] = function(s) do return _rt.get(_port["offlinePlan"](s), "hourly") end end end