@mapxus/mapxus-map-jp 10.0.0 → 10.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,110 @@
1
+ import { dispatch as a } from "d3-dispatch";
2
+ import { HTTPSession as c, SDKName as o, base64Encode as I, reportLog as l } from "@mapxus/mapxus-auth-jp";
3
+ const S = "10.0.1", E = {
4
+ version: S
5
+ }, h = E.version, p = "https://map-api.mapxus.co.jp/bms", K = 10, L = 1, G = "api/v5/venues", $ = "api/v5/buildings", B = "api/v5/pois", P = "api/v5/categories/group", U = "api/v4/route/query", z = "api/v3/tiles/styles";
6
+ class e {
7
+ static instance;
8
+ _globalDispatcher;
9
+ _httpSession;
10
+ _theme = null;
11
+ _isSDKInitialized = !1;
12
+ constructor() {
13
+ }
14
+ static getInstance() {
15
+ return e.instance || (e.instance = new e()), e.instance;
16
+ }
17
+ setGlobalDispatcher(t) {
18
+ this._globalDispatcher = t;
19
+ }
20
+ getGlobalDispatcher() {
21
+ return this._globalDispatcher;
22
+ }
23
+ async getHttpSession() {
24
+ return this._httpSession || (this.registerSDK(), this._httpSession = await c.create(
25
+ o.MapSDK,
26
+ I(`version-${h}`)
27
+ ), this._httpSession.setBaseURL(p), this._httpSession.setRetryConfig(3)), this._httpSession;
28
+ }
29
+ registerSDK() {
30
+ this._isSDKInitialized || (this._isSDKInitialized = !0, l(`${o.MapSDK} initialized`));
31
+ }
32
+ get theme() {
33
+ return this._theme;
34
+ }
35
+ setTheme(t) {
36
+ this._theme = t;
37
+ }
38
+ clear() {
39
+ this._httpSession.destroy(), this._globalDispatcher = null, e.instance = null;
40
+ }
41
+ }
42
+ const A = ["unauthorized", "initError"], n = globalThis, r = a(...A);
43
+ e.getInstance().setGlobalDispatcher(r);
44
+ n.MapxusMapEvents = n.MapxusMapEvents || {};
45
+ n.MapxusMapEvents.on = function(s, t) {
46
+ return r.on(s, t), { off: () => r.on(s, null) };
47
+ };
48
+ const C = "reserve_mapxus-level-fill", F = "reserve_mapxus-shared-level-fill", V = "reserve_mapxus-building-fill";
49
+ var i = /* @__PURE__ */ ((s) => (s.ENGLISH = "en", s.CHINESE_SIMPLIFIED = "zh-Hans", s.CHINESE_TRADITIONAL = "zh-Hant", s.CHINESE_TRADITIONAL_TW = "zh-Hant-TW", s.JAPANESE = "ja", s.KOREAN = "ko", s.FILIPINO = "fil", s.INDONESIAN = "id", s.PORTUGUESE = "pt", s.THAI = "th", s.VIETNAMESE = "vi", s.ARABIC = "ar", s))(i || {});
50
+ function Y(s) {
51
+ let t = null;
52
+ return f(s) ? t = i.ENGLISH : T(s) ? t = i.CHINESE_SIMPLIFIED : _(s) ? t = i.CHINESE_TRADITIONAL : N(s) ? t = i.CHINESE_TRADITIONAL_TW : u(s) ? t = i.JAPANESE : D(s) ? t = i.KOREAN : O(s) ? t = i.FILIPINO : R(s) ? t = i.INDONESIAN : H(s) ? t = i.PORTUGUESE : v(s) ? t = i.THAI : d(s) ? t = i.VIETNAMESE : m(s) && (t = i.ARABIC), t;
53
+ }
54
+ function f(s) {
55
+ return /^en(-(US|GB|AU))?$/.test(s);
56
+ }
57
+ function T(s) {
58
+ return /^zh(-(Hans|CN))?$/.test(s);
59
+ }
60
+ function _(s) {
61
+ return /^zh-(Hant|HK|MO)$/.test(s);
62
+ }
63
+ function N(s) {
64
+ return s === "zh-TW";
65
+ }
66
+ function u(s) {
67
+ return /^ja(-JP)?$/.test(s);
68
+ }
69
+ function D(s) {
70
+ return /^ko(-KR)?$/.test(s);
71
+ }
72
+ function O(s) {
73
+ return /^(fil|tl)(-PH)?$/.test(s);
74
+ }
75
+ function R(s) {
76
+ return /^id(-ID)?$/.test(s);
77
+ }
78
+ function H(s) {
79
+ return /^pt(-(BR|PT))?$/.test(s);
80
+ }
81
+ function v(s) {
82
+ return /^th(-TH)?$/.test(s);
83
+ }
84
+ function d(s) {
85
+ return /^vi(-VN)?$/.test(s);
86
+ }
87
+ function m(s) {
88
+ return /^ar(-(DZ|BH|EG|IQ|JO|KW|LB|LY|MA|OM|QA|SA|SY|TN|AE|YE))?$/.test(
89
+ s
90
+ );
91
+ }
92
+ export {
93
+ C as A,
94
+ $ as B,
95
+ e as C,
96
+ A as E,
97
+ K as O,
98
+ i as P,
99
+ U as R,
100
+ z as S,
101
+ G as V,
102
+ B as a,
103
+ L as b,
104
+ Y as c,
105
+ P as d,
106
+ F as e,
107
+ V as f,
108
+ p as g,
109
+ h
110
+ };
package/es/style.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- declare module "@mapxus-private/mapxus-map/style" {
1
+ declare module "./style" {
2
2
  const content: string;
3
3
  export default content;
4
4
  }
@@ -1,20 +1,20 @@
1
- import { b as a, A as s, E as S, a as O, O as R, V as A, c as E } from "../languages-C5nRc9Ll.mjs";
2
- const r = {
1
+ import { e as s, A as a, E as S, b as O, O as R, h as A, c as E } from "../languages-D7yV3lDz.mjs";
2
+ const o = {
3
3
  convertBrowserLangToPresetLang: E,
4
4
  VERSION: A,
5
5
  OFFSET: R,
6
6
  PAGE: O,
7
7
  ERRORS: S,
8
- ASSISTANT_LAYER_INDOOR_FLOORS: s,
9
- ASSISTANT_LAYER_SHARED_FLOORS: a
8
+ ASSISTANT_LAYER_INDOOR_FLOORS: a,
9
+ ASSISTANT_LAYER_SHARED_FLOORS: s
10
10
  };
11
11
  export {
12
- s as ASSISTANT_LAYER_INDOOR_FLOORS,
13
- a as ASSISTANT_LAYER_SHARED_FLOORS,
12
+ a as ASSISTANT_LAYER_INDOOR_FLOORS,
13
+ s as ASSISTANT_LAYER_SHARED_FLOORS,
14
14
  S as ERRORS,
15
15
  R as OFFSET,
16
16
  O as PAGE,
17
17
  A as VERSION,
18
18
  E as convertBrowserLangToPresetLang,
19
- r as default
19
+ o as default
20
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapxus/mapxus-map-jp",
3
- "version": "10.0.0",
3
+ "version": "10.0.1",
4
4
  "description": "mapxus map web sdk - kawasaki-prod",
5
5
  "main": "dist/utils.cjs",
6
6
  "unpkg": "dist/index.umd.js",
@@ -38,7 +38,7 @@
38
38
  "author": "Maphive Technology Limited",
39
39
  "license": "BSD-3-Clause",
40
40
  "peerDependencies": {
41
- "@mapxus/mapxus-auth-jp": "~0.0.1",
41
+ "@mapxus/mapxus-auth-jp": ">=0.1.0 <1.0.0",
42
42
  "maplibre-gl": "^5.2.0"
43
43
  },
44
44
  "dependencies": {
@@ -1,165 +0,0 @@
1
- import { HTTPSession as p, SDKName as u, base64Encode as I, reportLog as A } from "@mapxus/mapxus-auth-jp";
2
- var _ = { value: () => {
3
- } };
4
- function S() {
5
- for (var t = 0, n = arguments.length, s = {}, i; t < n; ++t) {
6
- if (!(i = arguments[t] + "") || i in s || /[\s.]/.test(i)) throw new Error("illegal type: " + i);
7
- s[i] = [];
8
- }
9
- return new a(s);
10
- }
11
- function a(t) {
12
- this._ = t;
13
- }
14
- function T(t, n) {
15
- return t.trim().split(/^|\s+/).map(function(s) {
16
- var i = "", e = s.indexOf(".");
17
- if (e >= 0 && (i = s.slice(e + 1), s = s.slice(0, e)), s && !n.hasOwnProperty(s)) throw new Error("unknown type: " + s);
18
- return { type: s, name: i };
19
- });
20
- }
21
- a.prototype = S.prototype = {
22
- constructor: a,
23
- on: function(t, n) {
24
- var s = this._, i = T(t + "", s), e, o = -1, c = i.length;
25
- if (arguments.length < 2) {
26
- for (; ++o < c; ) if ((e = (t = i[o]).type) && (e = N(s[e], t.name))) return e;
27
- return;
28
- }
29
- if (n != null && typeof n != "function") throw new Error("invalid callback: " + n);
30
- for (; ++o < c; )
31
- if (e = (t = i[o]).type) s[e] = E(s[e], t.name, n);
32
- else if (n == null) for (e in s) s[e] = E(s[e], t.name, null);
33
- return this;
34
- },
35
- copy: function() {
36
- var t = {}, n = this._;
37
- for (var s in n) t[s] = n[s].slice();
38
- return new a(t);
39
- },
40
- call: function(t, n) {
41
- if ((e = arguments.length - 2) > 0) for (var s = new Array(e), i = 0, e, o; i < e; ++i) s[i] = arguments[i + 2];
42
- if (!this._.hasOwnProperty(t)) throw new Error("unknown type: " + t);
43
- for (o = this._[t], i = 0, e = o.length; i < e; ++i) o[i].value.apply(n, s);
44
- },
45
- apply: function(t, n, s) {
46
- if (!this._.hasOwnProperty(t)) throw new Error("unknown type: " + t);
47
- for (var i = this._[t], e = 0, o = i.length; e < o; ++e) i[e].value.apply(n, s);
48
- }
49
- };
50
- function N(t, n) {
51
- for (var s = 0, i = t.length, e; s < i; ++s)
52
- if ((e = t[s]).name === n)
53
- return e.value;
54
- }
55
- function E(t, n, s) {
56
- for (var i = 0, e = t.length; i < e; ++i)
57
- if (t[i].name === n) {
58
- t[i] = _, t = t.slice(0, i).concat(t.slice(i + 1));
59
- break;
60
- }
61
- return s != null && t.push({ name: n, value: s }), t;
62
- }
63
- const v = "10.0.0", O = {
64
- version: v
65
- }, D = O.version, m = "https://map-api.mapxus.co.jp/bms", U = 10, P = 1;
66
- class l {
67
- static instance;
68
- _globalDispatcher;
69
- _httpSession;
70
- _theme = null;
71
- _isSDKInitialized = !1;
72
- constructor() {
73
- }
74
- static getInstance() {
75
- return l.instance || (l.instance = new l()), l.instance;
76
- }
77
- setGlobalDispatcher(n) {
78
- this._globalDispatcher = n;
79
- }
80
- getGlobalDispatcher() {
81
- return this._globalDispatcher;
82
- }
83
- async getHttpSession() {
84
- return this._httpSession || (this.registerSDK(), this._httpSession = await p.create(
85
- u.MapSDK,
86
- I(`version-${D}`)
87
- ), this._httpSession.setBaseURL(m), this._httpSession.setRetryConfig(3)), this._httpSession;
88
- }
89
- registerSDK() {
90
- this._isSDKInitialized || (this._isSDKInitialized = !0, A(`${u.MapSDK} initialized`));
91
- }
92
- get theme() {
93
- return this._theme;
94
- }
95
- setTheme(n) {
96
- this._theme = n;
97
- }
98
- clear() {
99
- this._httpSession.destroy(), this._globalDispatcher = null, l.instance = null;
100
- }
101
- }
102
- const R = ["unauthorized", "initError"], h = globalThis, f = S(...R);
103
- l.getInstance().setGlobalDispatcher(f);
104
- h.MapxusMapEvents = h.MapxusMapEvents || {};
105
- h.MapxusMapEvents.on = function(t, n) {
106
- return f.on(t, n), { off: () => f.on(t, null) };
107
- };
108
- const y = "reserve_mapxus-level-fill", V = "reserve_mapxus-shared-level-fill", W = "reserve_mapxus-building-fill";
109
- var r = /* @__PURE__ */ ((t) => (t.ENGLISH = "en", t.CHINESE_SIMPLIFIED = "zh-Hans", t.CHINESE_TRADITIONAL = "zh-Hant", t.CHINESE_TRADITIONAL_TW = "zh-Hant-TW", t.JAPANESE = "ja", t.KOREAN = "ko", t.FILIPINO = "fil", t.INDONESIAN = "id", t.PORTUGUESE = "pt", t.THAI = "th", t.VIETNAMESE = "vi", t.ARABIC = "ar", t))(r || {});
110
- function Y(t) {
111
- let n = null;
112
- return w(t) ? n = r.ENGLISH : H(t) ? n = r.CHINESE_SIMPLIFIED : d(t) ? n = r.CHINESE_TRADITIONAL : M(t) ? n = r.CHINESE_TRADITIONAL_TW : K(t) ? n = r.JAPANESE : $(t) ? n = r.KOREAN : b(t) ? n = r.FILIPINO : L(t) ? n = r.INDONESIAN : z(t) ? n = r.PORTUGUESE : B(t) ? n = r.THAI : G(t) ? n = r.VIETNAMESE : C(t) && (n = r.ARABIC), n;
113
- }
114
- function w(t) {
115
- return /^en(-(US|GB|AU))?$/.test(t);
116
- }
117
- function H(t) {
118
- return /^zh(-(Hans|CN))?$/.test(t);
119
- }
120
- function d(t) {
121
- return /^zh-(Hant|HK|MO)$/.test(t);
122
- }
123
- function M(t) {
124
- return t === "zh-TW";
125
- }
126
- function K(t) {
127
- return /^ja(-JP)?$/.test(t);
128
- }
129
- function $(t) {
130
- return /^ko(-KR)?$/.test(t);
131
- }
132
- function b(t) {
133
- return /^(fil|tl)(-PH)?$/.test(t);
134
- }
135
- function L(t) {
136
- return /^id(-ID)?$/.test(t);
137
- }
138
- function z(t) {
139
- return /^pt(-(BR|PT))?$/.test(t);
140
- }
141
- function B(t) {
142
- return /^th(-TH)?$/.test(t);
143
- }
144
- function G(t) {
145
- return /^vi(-VN)?$/.test(t);
146
- }
147
- function C(t) {
148
- return /^ar(-(DZ|BH|EG|IQ|JO|KW|LB|LY|MA|OM|QA|SA|SY|TN|AE|YE))?$/.test(
149
- t
150
- );
151
- }
152
- export {
153
- y as A,
154
- m as B,
155
- l as C,
156
- R as E,
157
- U as O,
158
- r as P,
159
- D as V,
160
- P as a,
161
- V as b,
162
- Y as c,
163
- S as d,
164
- W as e
165
- };