diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..107bae0 Binary files /dev/null and b/.DS_Store differ diff --git a/README.html b/README.html new file mode 100644 index 0000000..e5c3b65 --- /dev/null +++ b/README.html @@ -0,0 +1,682 @@ + + + +README.md + + + + + + + + + + +

Line-Deno-Client

+

Line-Deno-ClientはDenoで書かれたLINEの非公式APIです。

+

DenoまたはDeno DeployのHTTPサーバーを利用してブラウザ上で、またDeno単体でも実行できます。

+

使用方法

+
git clone -b dev https://github.com/test0987654321234567890/Line-Deno-Client +cd Line-Deno-Client +# HTTPサーバー起動 +deno run server/main.js +
+

コード例

+

インスタンス生成と初期化

+

Denoの場合、importします。

+
import LineClient from "./server/line_deno.js"; +
+

Webの場合、deno run server/main.jsでサーバーを起動してからlocalhost:7070にアクセスします。

+

または、Deno Deployのテストサーバーにアクセスします。

+

メールとパスワードでログイン:

+
const Line = new LineClient(); +await Line.init({ + device: "device", + email: "email", + pw: "pass_word", + pincall: (pincode) => { + // pincode callback + }, +}); +
+

Tokenで初期化:

+
const Line = new LineClient(); +await Line.init({ + authToken: "FHZWgN1MvZyCcGvljBib.vVQ0sVYTH+QJRnQ0rDoTsW.GBdUE+X+C7SrvpMBMbBrjaVbhQc+hCFoijX6xE29cbM=", + device: "IOSIPAD", +}); +
+

Lineリクエストを送信

+

LineClient.requestを使用してthriftデータを送信、受信できます:

+
await Line.request( + CHRdata = [], // CHRLINE Thrift [[ftype,fid,value],...] + methodName, // Method Name + protocol_type = 3, // 3:TBINARY 4:TCOMPACT + parse = true, // true:auto-parse false:no-parse "name":name-parse + path = "/S3", // gw.line.naver.jp{path} + headers = {}, // HTTP headers +); +// return Promise<Object(thriftData)> +// throw error.cause = thriftExceptionData +
+

実装されているメソッドを利用することもできます:

+
// SquareServise +await Line.getJoinedSquares(limit = 50, continuationToken); +await Line.inviteIntoSquareChat(inviteeMids, squareChatMid); +await Line.inviteToSquare(squareMid, invitees, squareChatMid); +await Line.markAsRead(squareChatMid, messageId); +await Line.reactToMessage(squareChatMid, messageId, reactionType = 2); +/* + reactionType + ALL = 0, + UNDO = 1, + NICE = 2, + LOVE = 3, + FUN = 4, + AMAZING = 5, + SAD = 6, + OMG = 7, +*/ +await Line.findSquareByInvitationTicket(invitationTicket); +await Line.fetchMyEvents( + syncToken = undefined, + limit = 100, + continuationToken = undefined, + subscriptionId, +); +await Line.fetchSquareChatEvents( + squareChatMid, + syncToken = undefined, + continuationToken = undefined, + subscriptionId = 0, + limit = 100, +); +await Line.sendSquareMessage( + squareChatMid, + text = "test Message", + contentType = 0, + contentMetadata = {}, + relatedMessageId = undefined, +); +await Line.getSquare(squareMid); +await Line.getSquareChat(squareChatMid); +await Line.getJoinableSquareChats( + squareMid, + continuationToken = undefined, + limit = 100, +); +await Line.createSquare( + name = "TEST Square", + displayName = "Tester", + profileImageObsHash = + "0h6tJf0hQsaVt3H0eLAsAWDFheczgHd3wTCTx2eApNKSoefHNVGRdwfgxbdgUMLi8MSngnPFMeNmpbLi8MSngnPFMeNmpbLi8MSngnOA", + desc = "test with Line-Deno-Client", + searchable = true, + SquareJoinMethodType = 0, +); +/* + SquareJoinMethodType + NONE(0), + APPROVAL(1), + CODE(2); +*/ +await Line.getSquareChatAnnouncements(squareChatMid); +await Line.updateSquareFeatureSet( + updateAttributes = [], + squareMid, + revision, + creatingSecretSquareChat = 0, +); +/* + updateAttributes: + CREATING_SECRET_SQUARE_CHAT(1), + INVITING_INTO_OPEN_SQUARE_CHAT(2), + CREATING_SQUARE_CHAT(3), + READONLY_DEFAULT_CHAT(4), + SHOWING_ADVERTISEMENT(5), + DELEGATE_JOIN_TO_PLUG(6), + DELEGATE_KICK_OUT_TO_PLUG(7), + DISABLE_UPDATE_JOIN_METHOD(8), + DISABLE_TRANSFER_ADMIN(9), + CREATING_LIVE_TALK(10); +*/ +await Line.joinSquare( + squareMid, + displayName, + ableToReceiveMessage = false, + passCode = undefined, +); +await Line.removeSubscriptions(subscriptionIds = []); +await Line.unsendSquareMessage(squareChatMid, messageId); +await Line.createSquareChat( + squareChatMid, + name, + chatImageObsHash, + squareChatType = 1, + maxMemberCount = 5000, + ableToSearchMessage = 1, + squareMemberMids = [], +); +/* + - SquareChatType: + OPEN(1), + SECRET(2), + ONE_ON_ONE(3), + SQUARE_DEFAULT(4); + - ableToSearchMessage: + NONE(0), + OFF(1), + ON(2); +*/ +await Line.getSquareChatMembers( + squareChatMid, + continuationToken = undefined, + limit = 200, +); +await Line.getSquareFeatureSet(squareMid); +await Line.getSquareInvitationTicketUrl(mid); +await Line.updateSquareChatMember( + squareMemberMid, + squareChatMid, + notificationForMessage = true, + notificationForNewMember = true, + updatedAttrs = [6], +); +/* + - SquareChatMemberAttribute: + MEMBERSHIP_STATE(4), + NOTIFICATION_MESSAGE(6), + NOTIFICATION_NEW_MEMBER(7); +*/ +await Line.updateSquareMember( + updatedAttrs = [], + updatedPreferenceAttrs = [], + squareMemberMid, + squareMid, + revision, + displayName, + membershipState, + role, +); +/* + SquareMemberAttribute: + DISPLAY_NAME(1), + PROFILE_IMAGE(2), + ABLE_TO_RECEIVE_MESSAGE(3), + MEMBERSHIP_STATE(5), + ROLE(6), + PREFERENCE(7); + SquareMembershipState: + JOIN_REQUESTED(1), + JOINED(2), + REJECTED(3), + LEFT(4), + KICK_OUT(5), + BANNED(6), + DELETED(7); +*/ +await Line.kickOutSquareMember(sid, pid); +await Line.checkSquareJoinCode(squareMid, code); +await Line.createSquareChatAnnouncement( + squareChatMid, + messageId, + text, + senderSquareMemberMid, + createdAt, + announcementType = 0, +); +await Line.getSquareMember(squareMemberMid); +await Line.searchSquareChatMembers( + squareChatMid, + displayName = "", + continuationToken, + limit = 20, +); +await Line.getSquareEmid(squareMid); +await Line.getSquareMembersBySquare(squareMid, squareMemberMids = []); +await Line.manualRepair(syncToken, limit = 100, continuationToken); +await Line.sendSquareRequestByName(METHOD_NAME, params); // send SquareRequest +// LineServise +await Line.getProfile(); +// LiffServise +await Line.issueLiffView( + chatMid, + liffId = "1562242036-RW04okm", + lang = "ja_JP", +); +// ChannelService +await Line.approveChannelAndIssueChannelToken(channelId = "1341209850"); +
+

イベントハンドラー

+

Squareでイベントハンドラーを利用できます。

+

fetchMyEventsのハンドラー:

+
const handler = (event, line) => { + console.log(event); +}; +const remove = await Line.squareEvent(handler, ?syncToken, ?interval, ?remove); +function stopRoop() { + remove.remove = true; +} +
+

fetchSquareChatEventsのハンドラー:

+
const handler = (event, line, mid) => { + console.log(event); +}; +const remove = await Line.squareChatEvent( + handler, + mid, + ?syncToken, + ?interval, + ?remove, +); +function stopRoop() { + remove.remove = true; +} +
+

addEventListener

+

addEventListenerを利用して処理することもできます。

+

fetchMyEventsのハンドラー:

+
const eventTarget = Line.getSquareEventTarget(); +eventTarget.addEventListener( + "message", + (e) => console.log(e.squareMessage.message.text), +); +eventTarget.onmessage = (e) => console.log(e.squareMessage.message.text); + +function stopRoop() { + eventTarget.remove.remove = true; +} +
+

fetchSquareChatEventsのハンドラー:

+
const eventTarget = Line.getSquareChatEventTarget(mid); +eventTarget.addEventListener( + "message", + (e) => { + console.log(e.squareMessage.message.text); + Line.sendSquareMessage( + mid, + e.squareMessage.message.text, + ); + // echo BOT + }, +); +eventTarget.onmessage = (e) => console.log(e.squareMessage.message.text); +// message は receiveMessage,sendMessage の受信時にも発火します +eventTarget.addEventListener( + "markAsRead", + (e) => console.log("既読:", e), +); + +function stopRoop() { + eventTarget.remove.remove = true; +} +
+

イベント名の配列は以下のコードで取得できます:

+
const eventNameArray = Line.parser.def.SquareEventPayload.map((e) => { + let name = e.name.replace("notified", "") + .replace("notification", ""); + name = name[0].toLowerCase() + name.substring(1); + return name; +}); +
+

ただし、全てのイベントが確実に発生するとは限りません。

+

例えば、メッセージの受信時にsquareEventTargetではmessageのみ発生しますが、squareChatEventTargetではsendMessagereceiveMessageも発生します。

+

また、/site/res/thrift.json|for webに記載されていないイベントではイベント名はそのfidの値になります。

+

Thanks

+

このプロジェクトは直接的、または間接的に以下の人々/プロジェクトの支援を得ました。深く感謝します。

+ +

Licence free

+ + + diff --git a/README.md b/README.md index b73d0cd..205befe 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,370 @@ # Line-Deno-Client -Line Deno ClientはDenoで書かれたLINEの非公式APIです +Line-Deno-ClientはDenoで書かれたLINEの非公式APIです。 -$ deno run ./server/main.js +DenoまたはDeno DeployのHTTPサーバーを利用してブラウザ上で、またDeno単体でも実行できます。 -WEB sample -> https://line-selfbot.deno.dev/tmp/tmp.html +## 使用方法 -```bash -# format -deno fmt -``` \ No newline at end of file +```sh +git clone -b dev https://github.com/test0987654321234567890/Line-Deno-Client +cd Line-Deno-Client +# HTTPサーバー起動 +deno run server/main.js +``` + +## コード例 + +### インスタンス生成と初期化 + +Denoの場合、importします。 + +```js +import LineClient from "./server/line_deno.js"; +``` + +Webの場合、`deno run server/main.js`でサーバーを起動してから[localhost:7070](http://localhost:7070)にアクセスします。 + +または、[Deno Deployのテストサーバー](https://line-selfbot--dev.deno.dev/)にアクセスします。 + +メールとパスワードでログイン: + +```js +const Line = new LineClient(); +await Line.init({ + device: "device", + email: "email", + pw: "pass_word", + pincall: (pincode) => { + // pincode callback + }, +}); +``` + +Tokenで初期化: + +```js +const Line = new LineClient(); +await Line.init({ + authToken: "FHZWgN1MvZyCcGvljBib.vVQ0sVYTH+QJRnQ0rDoTsW.GBdUE+X+C7SrvpMBMbBrjaVbhQc+hCFoijX6xE29cbM=", + device: "IOSIPAD", +}); +``` + +### Lineリクエストを送信 + +`LineClient.request`を使用してthriftデータを送信、受信できます: + +```js +await Line.request( + CHRdata = [], // CHRLINE Thrift [[ftype,fid,value],...] + methodName, // Method Name + protocol_type = 3, // 3:TBINARY 4:TCOMPACT + parse = true, // true:auto-parse false:no-parse "name":name-parse + path = "/S3", // gw.line.naver.jp{path} + headers = {}, // HTTP headers +); +// return Promise +// throw error.cause = thriftExceptionData +``` + +実装されているメソッドを利用することもできます: + +```js +// SquareServise +await Line.getJoinedSquares(limit = 50, continuationToken); +await Line.inviteIntoSquareChat(inviteeMids, squareChatMid); +await Line.inviteToSquare(squareMid, invitees, squareChatMid); +await Line.markAsRead(squareChatMid, messageId); +await Line.reactToMessage(squareChatMid, messageId, reactionType = 2); +/* + reactionType + ALL = 0, + UNDO = 1, + NICE = 2, + LOVE = 3, + FUN = 4, + AMAZING = 5, + SAD = 6, + OMG = 7, +*/ +await Line.findSquareByInvitationTicket(invitationTicket); +await Line.fetchMyEvents( + syncToken = undefined, + limit = 100, + continuationToken = undefined, + subscriptionId, +); +await Line.fetchSquareChatEvents( + squareChatMid, + syncToken = undefined, + continuationToken = undefined, + subscriptionId = 0, + limit = 100, +); +await Line.sendSquareMessage( + squareChatMid, + text = "test Message", + contentType = 0, + contentMetadata = {}, + relatedMessageId = undefined, +); +await Line.getSquare(squareMid); +await Line.getSquareChat(squareChatMid); +await Line.getJoinableSquareChats( + squareMid, + continuationToken = undefined, + limit = 100, +); +await Line.createSquare( + name = "TEST Square", + displayName = "Tester", + profileImageObsHash = + "0h6tJf0hQsaVt3H0eLAsAWDFheczgHd3wTCTx2eApNKSoefHNVGRdwfgxbdgUMLi8MSngnPFMeNmpbLi8MSngnPFMeNmpbLi8MSngnOA", + desc = "test with Line-Deno-Client", + searchable = true, + SquareJoinMethodType = 0, +); +/* + SquareJoinMethodType + NONE(0), + APPROVAL(1), + CODE(2); +*/ +await Line.getSquareChatAnnouncements(squareChatMid); +await Line.updateSquareFeatureSet( + updateAttributes = [], + squareMid, + revision, + creatingSecretSquareChat = 0, +); +/* + updateAttributes: + CREATING_SECRET_SQUARE_CHAT(1), + INVITING_INTO_OPEN_SQUARE_CHAT(2), + CREATING_SQUARE_CHAT(3), + READONLY_DEFAULT_CHAT(4), + SHOWING_ADVERTISEMENT(5), + DELEGATE_JOIN_TO_PLUG(6), + DELEGATE_KICK_OUT_TO_PLUG(7), + DISABLE_UPDATE_JOIN_METHOD(8), + DISABLE_TRANSFER_ADMIN(9), + CREATING_LIVE_TALK(10); +*/ +await Line.joinSquare( + squareMid, + displayName, + ableToReceiveMessage = false, + passCode = undefined, +); +await Line.removeSubscriptions(subscriptionIds = []); +await Line.unsendSquareMessage(squareChatMid, messageId); +await Line.createSquareChat( + squareChatMid, + name, + chatImageObsHash, + squareChatType = 1, + maxMemberCount = 5000, + ableToSearchMessage = 1, + squareMemberMids = [], +); +/* + - SquareChatType: + OPEN(1), + SECRET(2), + ONE_ON_ONE(3), + SQUARE_DEFAULT(4); + - ableToSearchMessage: + NONE(0), + OFF(1), + ON(2); +*/ +await Line.getSquareChatMembers( + squareChatMid, + continuationToken = undefined, + limit = 200, +); +await Line.getSquareFeatureSet(squareMid); +await Line.getSquareInvitationTicketUrl(mid); +await Line.updateSquareChatMember( + squareMemberMid, + squareChatMid, + notificationForMessage = true, + notificationForNewMember = true, + updatedAttrs = [6], +); +/* + - SquareChatMemberAttribute: + MEMBERSHIP_STATE(4), + NOTIFICATION_MESSAGE(6), + NOTIFICATION_NEW_MEMBER(7); +*/ +await Line.updateSquareMember( + updatedAttrs = [], + updatedPreferenceAttrs = [], + squareMemberMid, + squareMid, + revision, + displayName, + membershipState, + role, +); +/* + SquareMemberAttribute: + DISPLAY_NAME(1), + PROFILE_IMAGE(2), + ABLE_TO_RECEIVE_MESSAGE(3), + MEMBERSHIP_STATE(5), + ROLE(6), + PREFERENCE(7); + SquareMembershipState: + JOIN_REQUESTED(1), + JOINED(2), + REJECTED(3), + LEFT(4), + KICK_OUT(5), + BANNED(6), + DELETED(7); +*/ +await Line.kickOutSquareMember(sid, pid); +await Line.checkSquareJoinCode(squareMid, code); +await Line.createSquareChatAnnouncement( + squareChatMid, + messageId, + text, + senderSquareMemberMid, + createdAt, + announcementType = 0, +); +await Line.getSquareMember(squareMemberMid); +await Line.searchSquareChatMembers( + squareChatMid, + displayName = "", + continuationToken, + limit = 20, +); +await Line.getSquareEmid(squareMid); +await Line.getSquareMembersBySquare(squareMid, squareMemberMids = []); +await Line.manualRepair(syncToken, limit = 100, continuationToken); +await Line.sendSquareRequestByName(METHOD_NAME, params); // send SquareRequest +// LineServise +await Line.getProfile(); +// LiffServise +await Line.issueLiffView( + chatMid, + liffId = "1562242036-RW04okm", + lang = "ja_JP", +); +// ChannelService +await Line.approveChannelAndIssueChannelToken(channelId = "1341209850"); +``` + +### イベントハンドラー + +Squareでイベントハンドラーを利用できます。 + +fetchMyEventsのハンドラー: + +```js +const handler = (event, line) => { + console.log(event); +}; +const remove = await Line.squareEvent(handler, ?syncToken, ?interval, ?remove); +function stopRoop() { + remove.remove = true; +} +``` + +fetchSquareChatEventsのハンドラー: + +```js +const handler = (event, line, mid) => { + console.log(event); +}; +const remove = await Line.squareChatEvent( + handler, + mid, + ?syncToken, + ?interval, + ?remove, +); +function stopRoop() { + remove.remove = true; +} +``` + +#### addEventListener + +addEventListenerを利用して処理することもできます。 + +fetchMyEventsのハンドラー: + +```js +const eventTarget = Line.getSquareEventTarget(); +eventTarget.addEventListener( + "message", + (e) => console.log(e.squareMessage.message.text), +); +eventTarget.onmessage = (e) => console.log(e.squareMessage.message.text); + +function stopRoop() { + eventTarget.remove.remove = true; +} +``` + +fetchSquareChatEventsのハンドラー: + +```js +const eventTarget = Line.getSquareChatEventTarget(mid); +eventTarget.addEventListener( + "message", + (e) => { + console.log(e.squareMessage.message.text); + Line.sendSquareMessage( + mid, + e.squareMessage.message.text, + ); + // echo BOT + }, +); +eventTarget.onmessage = (e) => console.log(e.squareMessage.message.text); +// message は receiveMessage,sendMessage の受信時にも発火します +eventTarget.addEventListener( + "markAsRead", + (e) => console.log("既読:", e), +); + +function stopRoop() { + eventTarget.remove.remove = true; +} +``` + +イベント名の配列は以下のコードで取得できます: + +```js +const eventNameArray = Line.parser.def.SquareEventPayload.map((e) => { + let name = e.name.replace("notified", "") + .replace("notification", ""); + name = name[0].toLowerCase() + name.substring(1); + return name; +}); +``` + +ただし、全てのイベントが確実に発生するとは限りません。 + +例えば、メッセージの受信時に`squareEventTarget`では`message`のみ発生しますが、`squareChatEventTarget`では`sendMessage`と`receiveMessage`も発生します。 + +また、[`/site/res/thrift.json`](./site/res/thrift.json)|[for web](/res/thrift.json)に記載されていないイベントではイベント名はその`fid`の値になります。 + +## Thanks + +`このプロジェクトは直接的、または間接的に以下の人々/プロジェクトの支援を得ました。深く感謝します。` + +- [EdamAmex](https://github.com/EdamAme-x) +- [羽風](https://github.com/hafusun) +- [jkFujiyama](https://github.com/jkFujiyama) +- [DeachSword/CHRLINE](https://github.com/DeachSword/CHRLINE) +- [thriftrw-node](https://github.com/thriftrw/thriftrw-node/) +- Line open-chat 拓也集落's group members + +## Licence free diff --git a/deno.json b/deno.json deleted file mode 100644 index 760261c..0000000 --- a/deno.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "fmt": { - "singleQuote": false, - "indentWidth": 4, - "lineWidth": 120, - "semiColons": true, - "useTabs": true, - "proseWrap": "preserve" - } -} diff --git a/run.bat b/run.bat deleted file mode 100644 index 1ca8762..0000000 --- a/run.bat +++ /dev/null @@ -1 +0,0 @@ -deno run --allow-all ./server/main.js \ No newline at end of file diff --git a/server/.DS_Store b/server/.DS_Store new file mode 100644 index 0000000..700aa33 Binary files /dev/null and b/server/.DS_Store differ diff --git a/server/denows.js b/server/denows.js index b49107a..5865941 100644 --- a/server/denows.js +++ b/server/denows.js @@ -1,96 +1,148 @@ -import write from "./write_deno.js"; -import read from "./read_deno.js"; - -export default async function ws(request) { - const url = new URL(request.url); - var path; - path = url.searchParams.get("path"); - const upgradeHeader = request.headers.get("Upgrade"); - if (!upgradeHeader || upgradeHeader !== "websocket") { - return new Response("Expected Upgrade: websocket", { status: 426 }); - } - async function post(req, headers) { - let json, res, id; - try { - json = JSON.parse(req); - res = {}; - id = json.id; - - const Trequest = write(json); - //await Deno.writeFile("./tmpReq.bin", Trequest)///////////////////////// - const fet = await fetch("https://gw.line.naver.jp" + path, { - method: "POST", - headers: headers, - body: Trequest, - }); - res = await fet.arrayBuffer(); - res = new Uint8Array(res); - //Deno.writeFile("./tmpRes.bin", res)///////////////////////////// - res = read(res, json.type); - if (json.type == 5) { - let a = id; - let b = []; - while (a) { - b.push(a % 0xff); - a = Math.floor(a / 0xff); - } - return new Uint8Array([33, 4, b.length, ...b, ...res]); - } - res.id = id; - } catch (error) { - res.err = error.stack; - res.id = id; - } - - return JSON.stringify(res); - } - const { socket, response } = Deno.upgradeWebSocket(request); - - var auth, ua, type, extraH; - ua = url.searchParams.get("ua"); - type = url.searchParams.get("type"); - auth = url.searchParams.get("auth"); - extraH = url.searchParams.get("ex"); - var headers = { - "Host": "gw.line.naver.jp", - "accept": "application/x-thrift", - "user-agent": ua, - "x-line-application": type, - "x-line-access": auth, - "content-type": "application/x-thrift", - "x-lal": "ja_JP", - //'x-le': '18', 'x-lap': '5', - "x-lpv": "1", - "x-lhm": "POST", - //"x-lcs":'0005svgBAiJMiGMJdzBkKqR/78GAZEMOQ6E0p3FJkMBZA/NXe10zfYnVQDufzNaRMEW1nvYJYsLWZaWb4ww7EsebLNXGbuhmyAT2V4Fr3tA23xzvvbOaLjCahQK/4qrha2gC54XuPRbtSFNzALjs3rAyfWyczSnlenV/KFv06iqMmt1v+l3KBQdBkN9uLqGRTXzII0Y/rXtkw1wTYvMZZB7b6KunfzHf9AbFOMCqyveInGhYAetFN9Ly9x3kf2uC2czTSlynvelkYn4qn2VeGmAWOLqZrbQelyh/rRIFPttCILbOrWNEwv71Y7Pa1C0MTGFGlWWQQKlBHj0lcK+kJL13Ww==', - "accept-encoding": "gzip", - }; - if (auth == 0) { - delete headers["x-line-access"]; - } - if (extraH) { - extraH = JSON.parse(extraH); - Object.keys(extraH).forEach((e) => { - headers[e] = extraH[e]; - }); - } - socket.onopen = () => { - socket.send(JSON.stringify({ headers: headers, path: path })); - }; - socket.onmessage = async (event) => { - try { - //console.log("[msg] ",event.data) - let resp = await post(event.data, headers); - socket.send(resp); - } catch (e) { - try { - socket.send('{"server":"error"}'); - } catch (error) { - } - } - }; - return response; -} - -export async function interval(data) { -} +import write from "./write_deno.js"; +import read from "./read_deno.js"; +import { TBinaryProtocol, TCompactProtocol } from "npm:thrift@0.20.0"; +import { Buffer } from "node:buffer"; +TBinaryProtocol.genHeader = (name) => { + return Buffer.from([ + 0x80, + 1, + 0, + 1, + 0, + 0, + 0, + name.length, + ...Buffer.from(name), + 0, + 0, + 0, + 0, + ]); +}; +TCompactProtocol.genHeader = (name) => { + return Buffer.from([ + 0x82, + 0x21, + 0, + name.length, + ...Buffer.from(name), + ]); +}; + +const Protocols = { + 4: TCompactProtocol, + 3: TBinaryProtocol, + 0: Buffer, +}; + +export default function ws(request) { + const url = new URL(request.url); + const upgradeHeader = request.headers.get("Upgrade"); + if (!upgradeHeader || upgradeHeader !== "websocket") { + return new Response("Expected Upgrade: websocket", { status: 426 }); + } + const { socket, response } = Deno.upgradeWebSocket(request); + const Account = { + ua: url.searchParams.get("ua"), + type: url.searchParams.get("type"), + authToken: url.searchParams.get("auth"), + }; + const base_headers = { + "Host": "gw.line.naver.jp", + "accept": "application/x-thrift", + "user-agent": Account.ua, + "x-line-application": Account.type, + "x-line-access": Account.authToken, + "content-type": "application/x-thrift", + "x-lal": "ja_JP", + //'x-le': '18', 'x-lap': '5', + "x-lpv": "1", + "x-lhm": "POST", + //"x-lcs":'0005svgBAiJMiGMJdzBkKqR/78GAZEMOQ6E0p3FJkMBZA/NXe10zfYnVQDufzNaRMEW1nvYJYsLWZaWb4ww7EsebLNXGbuhmyAT2V4Fr3tA23xzvvbOaLjCahQK/4qrha2gC54XuPRbtSFNzALjs3rAyfWyczSnlenV/KFv06iqMmt1v+l3KBQdBkN9uLqGRTXzII0Y/rXtkw1wTYvMZZB7b6KunfzHf9AbFOMCqyveInGhYAetFN9Ly9x3kf2uC2czTSlynvelkYn4qn2VeGmAWOLqZrbQelyh/rRIFPttCILbOrWNEwv71Y7Pa1C0MTGFGlWWQQKlBHj0lcK+kJL13Ww==', + "accept-encoding": "gzip", + }; + if (Account.authToken == 0) { + delete base_headers["x-line-access"]; + } + let add_headers = url.searchParams.get("ex"); + if (add_headers) { + add_headers = JSON.parse(extraH); + } else { + add_headers = {}; + } + const headers = base_headers; //{ ...base_headers, ...add_headers }; + socket.onopen = () => { + socket.send(JSON.stringify({ headers: headers })); + }; + socket.onmessage = async (event) => { + try { + const parse = JSON.parse(event.data); + const resp = await post(...parse.arg); + resp.id = parse.id; + socket.send(JSON.stringify(resp)); + } catch (e) { + } + }; + async function post(path, value, name, ptype = 4, add_headers = {}) { + if (path === "!CONFIG") { + switch (value) { + case "UPDATE_TOKEN": + headers["x-line-access"] = name; + break; + + default: + break; + } + const ret = {}; + ret[value] = name; + return ret; + } + const Protocol = Protocols[ptype]; + const send_headers = headers; //{ ...headers, ...add_headers }; + let res; + if (Protocol !== Buffer) { + try { + res = {}; + const Trequest = write(value, name, Protocol); + const fet = await fetch("https://gw.line.naver.jp" + path, { + method: "POST", + headers: send_headers, + body: Trequest, + }); + if (fet.headers["x-line-next-access"]) { + base_headers["x-line-access"] = fet.headers["x-line-next-access"]; + socket.send( + JSON.stringify({ event: fet.headers["x-line-next-access"] }), + ); + } + let bres = await fet.arrayBuffer(); + bres = new Uint8Array(bres); + res = read(bres, Protocol); + } catch (error) { + res.err = error.stack; + } + return res; + } else { + try { + res = {}; + const Trequest = new Uint8Array( + ...Buffer.from(value, "base64"), + ); + //await Deno.writeFile("./tmpReq.bin", Trequest); ///////////////////////// + const fet = await fetch("https://gw.line.naver.jp" + path, { + method: "POST", + headers: headers, + body: Trequest, + }); + let bres = await fet.arrayBuffer(); + bres = new Uint8Array(bres); + res.b64 = Buffer.from(bres).toString("base64"); + //Deno.writeFile("./tmpRes.bin", res); ///////////////////////////// + } catch (error) { + res.err = error.stack; + } + return res; + } + } + return response; +} diff --git a/server/line_.thrift b/server/line_.thrift new file mode 100644 index 0000000..791e48e --- /dev/null +++ b/server/line_.thrift @@ -0,0 +1,4924 @@ + + +enum ApplicationType { + IOS = 16, + IOS_RC = 17, + IOS_BETA = 18, + IOS_ALPHA = 19, + ANDROID = 32, + ANDROID_RC = 33, + ANDROID_BETA = 34, + ANDROID_ALPHA = 35, + WAP = 48, + WAP_RC = 49, + WAP_BETA = 50, + WAP_ALPHA = 51, + BOT = 64, + BOT_RC = 65, + BOT_BETA = 66, + BOT_ALPHA = 67, + WEB = 80, + WEB_RC = 81, + WEB_BETA = 82, + WEB_ALPHA = 83, + DESKTOPWIN = 96, + DESKTOPWIN_RC = 97, + DESKTOPWIN_BETA = 98, + DESKTOPWIN_ALPHA = 99, + DESKTOPMAC = 112, + DESKTOPMAC_RC = 113, + DESKTOPMAC_BETA = 114, + DESKTOPMAC_ALPHA = 115, + CHANNELGW = 128, + CHANNELGW_RC = 129, + CHANNELGW_BETA = 130, + CHANNELGW_ALPHA = 131, + CHANNELCP = 144, + CHANNELCP_RC = 145, + CHANNELCP_BETA = 146, + CHANNELCP_ALPHA = 147, + WINPHONE = 160, + WINPHONE_RC = 161, + WINPHONE_BETA = 162, + WINPHONE_ALPHA = 163, + BLACKBERRY = 176, + BLACKBERRY_RC = 177, + BLACKBERRY_BETA = 178, + BLACKBERRY_ALPHA = 179, + WINMETRO = 192, + WINMETRO_RC = 193, + WINMETRO_BETA = 194, + WINMETRO_ALPHA = 195, + S40 = 208, + S40_RC = 209, + S40_BETA = 210, + S40_ALPHA = 211, + CHRONO = 224, + CHRONO_RC = 225, + CHRONO_BETA = 226, + CHRONO_ALPHA = 227, + TIZEN = 256, + TIZEN_RC = 257, + TIZEN_BETA = 258, + TIZEN_ALPHA = 259, + VIRTUAL = 272, + FIREFOXOS = 288, + FIREFOXOS_RC = 289, + FIREFOXOS_BETA = 290, + FIREFOXOS_ALPHA = 291, + IOSIPAD = 304, + IOSIPAD_RC = 305, + IOSIPAD_BETA = 306, + IOSIPAD_ALPHA = 307, + BIZIOS = 320, + BIZIOS_RC = 321, + BIZIOS_BETA = 322, + BIZIOS_ALPHA = 323, + BIZANDROID = 336, + BIZANDROID_RC = 337, + BIZANDROID_BETA = 338, + BIZANDROID_ALPHA = 339, + BIZBOT = 352, + BIZBOT_RC = 353, + BIZBOT_BETA = 354, + BIZBOT_ALPHA = 355, + CHROMEOS = 368, + CHROMEOS_RC = 369, + CHROMEOS_BETA = 370, + CHROMEOS_ALPHA = 371, + ANDROIDLITE = 384, + ANDROIDLITE_RC = 385, + ANDROIDLITE_BETA = 386, + ANDROIDLITE_ALPHA = 387, + WIN10 = 400, + WIN10_RC = 401, + WIN10_BETA = 402, + WIN10_ALPHA = 403, + BIZWEB = 416, + BIZWEB_RC = 417, + BIZWEB_BETA = 418, + BIZWEB_ALPHA = 419, + DUMMYPRIMARY = 432, + DUMMYPRIMARY_RC = 433, + DUMMYPRIMARY_BETA = 434, + DUMMYPRIMARY_ALPHA = 435, + SQUARE = 448, + SQUARE_RC = 449, + SQUARE_BETA = 450, + SQUARE_ALPHA = 451, + INTERNAL = 464, + INTERNAL_RC = 465, + INTERNAL_BETA = 466, + INTERNAL_ALPHA = 467, + CLOVAFRIENDS = 480, + CLOVAFRIENDS_RC = 481, + CLOVAFRIENDS_BETA = 482, + CLOVAFRIENDS_ALPHA = 483, + WATCHOS = 496, + WATCHOS_RC = 497, + WATCHOS_BETA = 498, + WATCHOS_ALPHA = 499, + OPENCHAT_PLUG = 512, + OPENCHAT_PLUG_RC = 513, + OPENCHAT_PLUG_BETA = 514, + OPENCHAT_PLUG_ALPHA = 515, + ANDROIDSECONDARY = 528, + ANDROIDSECONDARY_RC = 529, + ANDROIDSECONDARY_BETA = 530, + ANDROIDSECONDARY_ALPHA = 531, + WEAROS = 544, + WEAROS_RC = 545, + WEAROS_BETA = 546, + WEAROS_ALPHA = 547, +} + +enum ErrorCode { + ILLEGAL_ARGUMENT = 0, + AUTHENTICATION_FAILED = 1, + DB_FAILED = 2, + INVALID_STATE = 3, + EXCESSIVE_ACCESS = 4, + NOT_FOUND = 5, + INVALID_LENGTH = 6, + NOT_AVAILABLE_USER = 7, + NOT_AUTHORIZED_DEVICE = 8, + INVALID_MID = 9, + NOT_A_MEMBER = 10, + INCOMPATIBLE_APP_VERSION = 11, + NOT_READY = 12, + NOT_AVAILABLE_SESSION = 13, + NOT_AUTHORIZED_SESSION = 14, + SYSTEM_ERROR = 15, + NO_AVAILABLE_VERIFICATION_METHOD = 16, + NOT_AUTHENTICATED = 17, + INVALID_IDENTITY_CREDENTIAL = 18, + NOT_AVAILABLE_IDENTITY_IDENTIFIER = 19, + INTERNAL_ERROR = 20, + NO_SUCH_IDENTITY_IDENFIER = 21, + DEACTIVATED_ACCOUNT_BOUND_TO_THIS_IDENTITY = 22, + ILLEGAL_IDENTITY_CREDENTIAL = 23, + UNKNOWN_CHANNEL = 24, + NO_SUCH_MESSAGE_BOX = 25, + NOT_AVAILABLE_MESSAGE_BOX = 26, + CHANNEL_DOES_NOT_MATCH = 27, + NOT_YOUR_MESSAGE = 28, + MESSAGE_DEFINED_ERROR = 29, + USER_CANNOT_ACCEPT_PRESENTS = 30, + USER_NOT_STICKER_OWNER = 32, + MAINTENANCE_ERROR = 33, + ACCOUNT_NOT_MATCHED = 34, + ABUSE_BLOCK = 35, + NOT_FRIEND = 36, + NOT_ALLOWED_CALL = 37, + BLOCK_FRIEND = 38, + INCOMPATIBLE_VOIP_VERSION = 39, + INVALID_SNS_ACCESS_TOKEN = 40, + EXTERNAL_SERVICE_NOT_AVAILABLE = 41, + NOT_ALLOWED_ADD_CONTACT = 42, + NOT_CERTIFICATED = 43, + NOT_ALLOWED_SECONDARY_DEVICE = 44, + INVALID_PIN_CODE = 45, + NOT_FOUND_IDENTITY_CREDENTIAL = 46, + EXCEED_FILE_MAX_SIZE = 47, + EXCEED_DAILY_QUOTA = 48, + NOT_SUPPORT_SEND_FILE = 49, + MUST_UPGRADE = 50, + NOT_AVAILABLE_PIN_CODE_SESSION = 51, + EXPIRED_REVISION = 52, + NOT_YET_PHONE_NUMBER = 54, + BAD_CALL_NUMBER = 55, + UNAVAILABLE_CALL_NUMBER = 56, + NOT_SUPPORT_CALL_SERVICE = 57, + CONGESTION_CONTROL = 58, + NO_BALANCE = 59, + NOT_PERMITTED_CALLER_ID = 60, + NO_CALLER_ID_LIMIT_EXCEEDED = 61, + CALLER_ID_VERIFICATION_REQUIRED = 62, + NO_CALLER_ID_LIMIT_EXCEEDED_AND_VERIFICATION_REQUIRED = 63, + MESSAGE_NOT_FOUND = 64, + INVALID_ACCOUNT_MIGRATION_PINCODE_FORMAT = 65, + ACCOUNT_MIGRATION_PINCODE_NOT_MATCHED = 66, + ACCOUNT_MIGRATION_PINCODE_BLOCKED = 67, + INVALID_PASSWORD_FORMAT = 69, + FEATURE_RESTRICTED = 70, + MESSAGE_NOT_DESTRUCTIBLE = 71, + PAID_CALL_REDEEM_FAILED = 72, + PREVENTED_JOIN_BY_TICKET = 73, + SEND_MESSAGE_NOT_PERMITTED_FROM_LINE_AT = 75, + SEND_MESSAGE_NOT_PERMITTED_WHILE_AUTO_REPLY = 76, + SECURITY_CENTER_NOT_VERIFIED = 77, + SECURITY_CENTER_BLOCKED_BY_SETTING = 78, + SECURITY_CENTER_BLOCKED = 79, + TALK_PROXY_EXCEPTION = 80, + E2EE_INVALID_PROTOCOL = 81, + E2EE_RETRY_ENCRYPT = 82, + E2EE_UPDATE_SENDER_KEY = 83, + E2EE_UPDATE_RECEIVER_KEY = 84, + E2EE_INVALID_ARGUMENT = 85, + E2EE_INVALID_VERSION = 86, + E2EE_SENDER_DISABLED = 87, + E2EE_RECEIVER_DISABLED = 88, + E2EE_SENDER_NOT_ALLOWED = 89, + E2EE_RECEIVER_NOT_ALLOWED = 90, + E2EE_RESEND_FAIL = 91, + E2EE_RESEND_OK = 92, + HITOKOTO_BACKUP_NO_AVAILABLE_DATA = 93, + E2EE_UPDATE_PRIMARY_DEVICE = 94, + SUCCESS = 95, + CANCEL = 96, + E2EE_PRIMARY_NOT_SUPPORT = 97, + E2EE_RETRY_PLAIN = 98, + E2EE_RECREATE_GROUP_KEY = 99, + E2EE_GROUP_TOO_MANY_MEMBERS = 100, + SERVER_BUSY = 101, + NOT_ALLOWED_ADD_FOLLOW = 102, + INCOMING_FRIEND_REQUEST_LIMIT = 103, + OUTGOING_FRIEND_REQUEST_LIMIT = 104, + OUTGOING_FRIEND_REQUEST_QUOTA = 105, + DUPLICATED = 106, + BANNED = 107, + NOT_AN_INVITEE = 108, + NOT_AN_OUTSIDER = 109, + EMPTY_GROUP = 111, + EXCEED_FOLLOW_LIMIT = 112, + UNSUPPORTED_ACCOUNT_TYPE = 113, + AGREEMENT_REQUIRED = 114, + SHOULD_RETRY = 115, + OVER_MAX_CHATS_PER_USER = 116, + NOT_AVAILABLE_API = 117, + INVALID_OTP = 118, + MUST_REFRESH_V3_TOKEN = 119, + ALREADY_EXPIRED = 120, + USER_NOT_STICON_OWNER = 121, + REFRESH_MEDIA_FLOW = 122, + EXCEED_FOLLOWER_LIMIT = 123, +} + +enum LiffErrorCode { + INVALID_REQUEST = 1, + UNAUTHORIZED = 2, + CONSENT_REQUIRED = 3, + VERSION_UPDATE_REQUIRED = 4, + COMPREHENSIVE_AGREEMENT_REQUIRED = 5, + SPLASH_SCREEN_REQUIRED = 6, + SERVER_ERROR = 100, +} + +enum ChannelErrorCode { + ILLEGAL_ARGUMENT = 0, + INTERNAL_ERROR = 1, + CONNECTION_ERROR = 2, + AUTHENTICATIONI_FAILED = 3, + NEED_PERMISSION_APPROVAL = 4, + COIN_NOT_USABLE = 5, + WEBVIEW_NOT_ALLOWED = 6, +} + +enum PreconditionFailedExtraInfo { + DUPLICATED_DISPLAY_NAME = 0, +} + +enum SquareErrorCode { + UNKNOWN = 0, + INTERNAL_ERROR = 500, + NOT_IMPLEMENTED = 501, + TRY_AGAIN_LATER = 503, + MAINTENANCE = 505, + NO_PRESENCE_EXISTS = 506, + ILLEGAL_ARGUMENT = 400, + AUTHENTICATION_FAILURE = 401, + FORBIDDEN = 403, + NOT_FOUND = 404, + REVISION_MISMATCH = 409, + PRECONDITION_FAILED = 410, +} + +enum HomeExceptionCode { + INTERNAL_ERROR = 0, + ILLEGAL_ARGUMENT = 1, + VERIFICATION_FAILED = 2, + NOT_FOUND = 3, + RETRY_LATER = 4, + HUMAN_VERIFICATION_REQUIRED = 5, + INVALID_CONTEXT = 100, + APP_UPGRADE_REQUIRED = 101, + NO_CONTENT = 102, +} + +enum ChatappErrorCode { + INVALID_REQUEST = 1, + UNAUTHORIZED = 2, + SERVER_ERROR = 100, +} + +enum MembershipErrorCode { + ILLEGAL_ARGUMENT = 0, + AUTHENTICATION_FAILED = 1, + NOT_FOUND = 5, + INTERNAL_ERROR = 20, + MAINTENANCE_ERROR = 33, +} + +enum BotErrorCode { + UNKNOWN = 0, + BOT_NOT_FOUND = 1, + BOT_NOT_AVAILABLE = 2, + NOT_A_MEMBER = 3, + AUTHENTICATION_FAILED = 401, + ILLEGAL_ARGUMENT = 400, + INTERNAL_ERROR = 500, +} + +enum BotExternalErrorCode { + ILLEGAL_ARGUMENT = 0, + INTERNAL_ERROR = 1, +} + +enum AccessTokenRefreshErrorCode { + INVALID_REQUEST = 1000, + RETRY_REQUIRED = 1001, +} + +enum AccountEapConnectErrorCode { + INTERNAL_ERROR = 0, + ILLEGAL_ARGUMENT = 1, + VERIFICATION_FAILED = 2, + RETRY_LATER = 4, + HUMAN_VERIFICATION_REQUIRED = 5, + APP_UPGRADE_REQUIRED = 101, +} + +enum PwlessCredentialErrorCode { + INTERNAL_ERROR = 0, + ILLEGAL_ARGUMENT = 1, + VERIFICATION_FAILED = 2, + EXTERNAL_SERVICE_UNAVAILABLE = 3, + RETRY_LATER = 4, + INVALID_CONTEXT = 100, + NOT_SUPPORTED = 101, + FORBIDDEN = 102, + FIDO_RETRY_WITH_ANOTHER_AUTHENTICATOR = 201, +} + +enum SecondAuthFactorPinCodeErrorCode { + INTERNAL_ERROR = 0, + ILLEGAL_ARGUMENT = 1, + VERIFICATION_FAILED = 2, + RETRY_LATER = 3, + INVALID_CONTEXT = 100, + APP_UPGRADE_REQUIRED = 101, +} + +enum AuthErrorCode { + INTERNAL_ERROR = 0, + ILLEGAL_ARGUMENT = 1, + VERIFICATION_FAILED = 2, + NOT_FOUND = 3, + RETRY_LATER = 4, + HUMAN_VERIFICATION_REQUIRED = 5, + INVALID_CONTEXT = 100, + APP_UPGRADE_REQUIRED = 101, +} + +enum SecondaryPwlessLoginErrorCode { + INTERNAL_ERROR = 0, + VERIFICATION_FAILED = 1, + LOGIN_NOT_ALLOWED = 2, + EXTERNAL_SERVICE_UNAVAILABLE = 3, + RETRY_LATER = 4, + NOT_SUPPORTED = 100, + ILLEGAL_ARGUMENT = 101, + INVALID_CONTEXT = 102, + FORBIDDEN = 103, + FIDO_UNKNOWN_CREDENTIAL_ID = 200, + FIDO_RETRY_WITH_ANOTHER_AUTHENTICATOR = 201, + FIDO_UNACCEPTABLE_CONTENT = 202, +} + +enum SecondaryQrCodeErrorCode { + INTERNAL_ERROR = 0, + ILLEGAL_ARGUMENT = 1, + VERIFICATION_FAILED = 2, + NOT_ALLOWED_QR_CODE_LOGIN = 3, + VERIFICATION_NOTICE_FAILED = 4, + RETRY_LATER = 5, + INVALID_CONTEXT = 100, + APP_UPGRADE_REQUIRED = 101, +} + +enum PaymentErrorCode { + SUCCESS = 0, + GENERAL_USER_ERROR = 1000, + ACCOUNT_NOT_EXISTS = 1101, + ACCOUNT_INVALID_STATUS = 1102, + ACCOUNT_ALREADY_EXISTS = 1103, + MERCHANT_NOT_EXISTS = 1104, + MERCHANT_INVALID_STATUS = 1105, + AGREEMENT_REQUIRED = 1107, + BLACKLISTED = 1108, + WRONG_PASSWORD = 1109, + INVALID_CREDIT_CARD = 1110, + LIMIT_EXCEEDED = 1111, + CANNOT_PROCEED = 1115, + TOO_WEAK_PASSWORD = 1120, + CANNOT_CREATE_ACCOUNT = 1125, + TEMPORARY_PASSWORD_ERROR = 1130, + MISSING_PARAMETERS = 1140, + NO_VALID_MYCODE_ACCOUNT = 1141, + INSUFFICIENT_BALANCE = 1142, + TRANSACTION_NOT_FOUND = 1150, + TRANSACTION_FINISHED = 1152, + PAYMENT_AMOUNT_WRONG = 1153, + BALANCE_ACCOUNT_NOT_EXISTS = 1157, + DUPLICATED_CITIZEN_ID = 1158, + PAYMENT_REQUEST_NOT_FOUND = 1159, + AUTH_FAILED = 1169, + PASSWORD_SETTING_REQUIRED = 1171, + TRANSACTION_ALREADY_PROCESSED = 1172, + CURRENCY_NOT_SUPPORTED = 1178, + PAYMENT_NOT_AVAILABLE = 1180, + TRANSFER_REQUEST_NOT_FOUND = 1181, + INVALID_PAYMENT_AMOUNT = 1183, + INSUFFICIENT_PAYMENT_AMOUNT = 1184, + EXTERNAL_SYSTEM_MAINTENANCE = 1185, + EXTERNAL_SYSTEM_INOPERATIONAL = 1186, + SESSION_EXPIRED = 1192, + UPGRADE_REQUIRED = 1195, + REQUEST_TOKEN_EXPIRED = 1196, + OPERATION_FINISHED = 1198, + EXTERNAL_SYSTEM_ERROR = 1199, + PARTIAL_AMOUNT_APPROVED = 1299, + PINCODE_AUTH_REQUIRED = 1600, + ADDITIONAL_AUTH_REQUIRED = 1601, + NOT_BOUND = 1603, + OTP_USER_REGISTRATION_ERROR = 1610, + OTP_CARD_REGISTRATION_ERROR = 1611, + NO_AUTH_METHOD = 1612, + GENERAL_USER_ERROR_RESTART = 1696, + GENERAL_USER_ERROR_REFRESH = 1697, + GENERAL_USER_ERROR_CLOSE = 1698, + INTERNAL_SERVER_ERROR = 9000, + INTERNAL_SYSTEM_MAINTENANCE = 9999, + UNKNOWN_ERROR = 10000, +} + +enum SettingsErrorCode { + UNKNOWN = 0, + NONE = 1, + ILLEGAL_ARGUMENT = 16641, + NOT_FOUND = 16642, + NOT_AVAILABLE = 16643, + TOO_LARGE_VALUE = 16644, + CLOCK_DRIFT_DETECTED = 16645, + UNSUPPORTED_APPLICATION_TYPE = 16646, + DUPLICATED_ENTRY = 16647, + AUTHENTICATION_FAILED = 16897, + INTERNAL_SERVER_ERROR = 20737, + SERVICE_IN_MAINTENANCE_MODE = 20738, + SERVICE_UNAVAILABLE = 20739, +} + +enum ThingsErrorCode { + INTERNAL_SERVER_ERROR = 0, + UNAUTHORIZED = 1, + INVALID_REQUEST = 2, + INVALID_STATE = 3, + DEVICE_LIMIT_EXCEEDED = 4096, + UNSUPPORTED_REGION = 4097, +} + +enum SuggestTrialErrorCode { + UNKNOWN = 0, + NONE = 1, + ILLEGAL_ARGUMENT = 16641, + NOT_FOUND = 16642, + NOT_AVAILABLE = 16643, + AUTHENTICATION_FAILED = 16897, + INTERNAL_SERVER_ERROR = 20737, + SERVICE_UNAVAILABLE = 20739, +} + +enum LFLPremiumErrorCode { + ILLEGAL_ARGUMENT = 16641, + MAJOR_VERSION_NOT_SUPPORTED = 16642, + AUTHENTICATION_FAILED = 16897, + INTERNAL_SERVER_ERROR = 20737, +} + +enum WalletErrorCode { + INVALID_PARAMETER = 400, + AUTHENTICATION_FAILED = 401, + INTERNAL_SERVER_ERROR = 500, + SERVICE_IN_MAINTENANCE_MODE = 503, +} + +enum ShopErrorCode { + UNKNOWN = 0, + NONE = 1, + ILLEGAL_ARGUMENT = 16641, + NOT_FOUND = 16642, + NOT_AVAILABLE = 16643, + NOT_PAID_PRODUCT = 16644, + NOT_FREE_PRODUCT = 16645, + ALREADY_OWNED = 16646, + ERROR_WITH_CUSTOM_MESSAGE = 16647, + NOT_AVAILABLE_TO_RECIPIENT = 16648, + NOT_AVAILABLE_FOR_CHANNEL_ID = 16649, + NOT_SALE_FOR_COUNTRY = 16650, + NOT_SALES_PERIOD = 16651, + NOT_SALE_FOR_DEVICE = 16652, + NOT_SALE_FOR_VERSION = 16653, + ALREADY_EXPIRED = 16654, + LIMIT_EXCEEDED = 16655, + MISSING_CAPABILITY = 16656, + AUTHENTICATION_FAILED = 16897, + BALANCE_SHORTAGE = 17153, + INTERNAL_SERVER_ERROR = 20737, + SERVICE_IN_MAINTENANCE_MODE = 20738, + SERVICE_UNAVAILABLE = 20739, +} + +enum PointErrorCode { + REQUEST_DUPLICATION = 3001, + INVALID_PARAMETER = 3002, + NOT_ENOUGH_BALANCE = 3003, + AUTHENTICATION_FAIL = 3004, + API_ACCESS_FORBIDDEN = 3005, + MEMBER_ACCOUNT_NOT_FOUND = 3006, + SERVICE_ACCOUNT_NOT_FOUND = 3007, + TRANSACTION_NOT_FOUND = 3008, + ALREADY_REVERSED_TRANSACTION = 3009, + MESSAGE_NOT_READABLE = 3010, + HTTP_REQUEST_METHOD_NOT_SUPPORTED = 3011, + HTTP_MEDIA_TYPE_NOT_SUPPORTED = 3012, + NOT_ALLOWED_TO_DEPOSIT = 3013, + NOT_ALLOWED_TO_PAY = 3014, + TRANSACTION_ACCESS_FORBIDDEN = 3015, + INVALID_SERVICE_CONFIGURATION = 4001, + DCS_COMMUNICATION_FAIL = 5004, + UPDATE_BALANCE_FAIL = 5007, + SYSTEM_MAINTENANCE = 5888, + SYSTEM_ERROR = 5999, +} + +enum E2EEKeyBackupErrorCode { + ILLEGAL_ARGUMENT = 0, + AUTHENTICATION_FAILED = 1, + INTERNAL_ERROR = 2, + RESTORE_KEY_FIRST = 3, + NO_BACKUP = 4, + LOCKOUT = 5, + INVALID_PIN = 6, +} + +enum TalkSyncReason { + UNSPECIFIED = 0, + UNKNOWN = 1, + INITIALIZATION = 2, + OPERATION = 3, + FULL_SYNC = 4, + AUTO_REPAIR = 5, + MANUAL_REPAIR = 6, + INTERNAL = 7, + USER_INITIATED = 8, +} + +enum OpType { + END_OF_OPERATION = 0, + UPDATE_PROFILE = 1, + NOTIFIED_UPDATE_PROFILE = 2, + REGISTER_USERID = 3, + ADD_CONTACT = 4, + NOTIFIED_ADD_CONTACT = 5, + BLOCK_CONTACT = 6, + UNBLOCK_CONTACT = 7, + NOTIFIED_RECOMMEND_CONTACT = 8, + CREATE_GROUP = 9, + UPDATE_GROUP = 10, + NOTIFIED_UPDATE_GROUP = 11, + INVITE_INTO_GROUP = 12, + NOTIFIED_INVITE_INTO_GROUP = 13, + LEAVE_GROUP = 14, + NOTIFIED_LEAVE_GROUP = 15, + ACCEPT_GROUP_INVITATION = 16, + NOTIFIED_ACCEPT_GROUP_INVITATION = 17, + KICKOUT_FROM_GROUP = 18, + NOTIFIED_KICKOUT_FROM_GROUP = 19, + CREATE_ROOM = 20, + INVITE_INTO_ROOM = 21, + NOTIFIED_INVITE_INTO_ROOM = 22, + LEAVE_ROOM = 23, + NOTIFIED_LEAVE_ROOM = 24, + SEND_MESSAGE = 25, + RECEIVE_MESSAGE = 26, + SEND_MESSAGE_RECEIPT = 27, + RECEIVE_MESSAGE_RECEIPT = 28, + SEND_CONTENT_RECEIPT = 29, + RECEIVE_ANNOUNCEMENT = 30, + CANCEL_INVITATION_GROUP = 31, + NOTIFIED_CANCEL_INVITATION_GROUP = 32, + NOTIFIED_UNREGISTER_USER = 33, + REJECT_GROUP_INVITATION = 34, + NOTIFIED_REJECT_GROUP_INVITATION = 35, + UPDATE_SETTINGS = 36, + NOTIFIED_REGISTER_USER = 37, + INVITE_VIA_EMAIL = 38, + NOTIFIED_REQUEST_RECOVERY = 39, + SEND_CHAT_CHECKED = 40, + SEND_CHAT_REMOVED = 41, + NOTIFIED_FORCE_SYNC = 42, + SEND_CONTENT = 43, + SEND_MESSAGE_MYHOME = 44, + NOTIFIED_UPDATE_CONTENT_PREVIEW = 45, + REMOVE_ALL_MESSAGES = 46, + NOTIFIED_UPDATE_PURCHASES = 47, + DUMMY = 48, + UPDATE_CONTACT = 49, + NOTIFIED_RECEIVED_CALL = 50, + CANCEL_CALL = 51, + NOTIFIED_REDIRECT = 52, + NOTIFIED_CHANNEL_SYNC = 53, + FAILED_SEND_MESSAGE = 54, + NOTIFIED_READ_MESSAGE = 55, + FAILED_EMAIL_CONFIRMATION = 56, + NOTIFIED_CHAT_CONTENT = 58, + NOTIFIED_PUSH_NOTICENTER_ITEM = 59, + NOTIFIED_JOIN_CHAT = 60, + NOTIFIED_LEAVE_CHAT = 61, + NOTIFIED_TYPING = 62, + FRIEND_REQUEST_ACCEPTED = 63, + DESTROY_MESSAGE = 64, + NOTIFIED_DESTROY_MESSAGE = 65, + UPDATE_PUBLICKEYCHAIN = 66, + NOTIFIED_UPDATE_PUBLICKEYCHAIN = 67, + NOTIFIED_BLOCK_CONTACT = 68, + NOTIFIED_UNBLOCK_CONTACT = 69, + UPDATE_GROUPPREFERENCE = 70, + NOTIFIED_PAYMENT_EVENT = 71, + REGISTER_E2EE_PUBLICKEY = 72, + NOTIFIED_E2EE_KEY_EXCHANGE_REQ = 73, + NOTIFIED_E2EE_KEY_EXCHANGE_RESP = 74, + NOTIFIED_E2EE_MESSAGE_RESEND_REQ = 75, + NOTIFIED_E2EE_MESSAGE_RESEND_RESP = 76, + NOTIFIED_E2EE_KEY_UPDATE = 77, + NOTIFIED_BUDDY_UPDATE_PROFILE = 78, + NOTIFIED_UPDATE_LINEAT_TABS = 79, + UPDATE_ROOM = 80, + NOTIFIED_BEACON_DETECTED = 81, + UPDATE_EXTENDED_PROFILE = 82, + ADD_FOLLOW = 83, + NOTIFIED_ADD_FOLLOW = 84, + DELETE_FOLLOW = 85, + NOTIFIED_DELETE_FOLLOW = 86, + UPDATE_TIMELINE_SETTINGS = 87, + NOTIFIED_FRIEND_REQUEST = 88, + UPDATE_RINGBACK_TONE = 89, + NOTIFIED_POSTBACK = 90, + RECEIVE_READ_WATERMARK = 91, + NOTIFIED_MESSAGE_DELIVERED = 92, + NOTIFIED_UPDATE_CHAT_BAR = 93, + NOTIFIED_CHATAPP_INSTALLED = 94, + NOTIFIED_CHATAPP_UPDATED = 95, + NOTIFIED_CHATAPP_NEW_MARK = 96, + NOTIFIED_CHATAPP_DELETED = 97, + NOTIFIED_CHATAPP_SYNC = 98, + NOTIFIED_UPDATE_MESSAGE = 99, + UPDATE_CHATROOMBGM = 100, + NOTIFIED_UPDATE_CHATROOMBGM = 101, + UPDATE_RINGTONE = 102, + UPDATE_USER_SETTINGS = 118, + NOTIFIED_UPDATE_STATUS_BAR = 119, + CREATE_CHAT = 120, + UPDATE_CHAT = 121, + NOTIFIED_UPDATE_CHAT = 122, + INVITE_INTO_CHAT = 123, + NOTIFIED_INVITE_INTO_CHAT = 124, + CANCEL_CHAT_INVITATION = 125, + NOTIFIED_CANCEL_CHAT_INVITATION = 126, + DELETE_SELF_FROM_CHAT = 127, + NOTIFIED_DELETE_SELF_FROM_CHAT = 128, + ACCEPT_CHAT_INVITATION = 129, + NOTIFIED_ACCEPT_CHAT_INVITATION = 130, + REJECT_CHAT_INVITATION = 131, + DELETE_OTHER_FROM_CHAT = 132, + NOTIFIED_DELETE_OTHER_FROM_CHAT = 133, + NOTIFIED_CONTACT_CALENDAR_EVENT = 134, + NOTIFIED_CONTACT_CALENDAR_EVENT_ALL = 135, + UPDATE_THINGS_OPERATIONS = 136, + SEND_CHAT_HIDDEN = 137, + CHAT_META_SYNC_ALL = 138, + SEND_REACTION = 139, + NOTIFIED_SEND_REACTION = 140, + NOTIFIED_UPDATE_PROFILE_CONTENT = 141, + FAILED_DELIVERY_MESSAGE = 142, +} + +enum OpStatus { + NORMAL = 0, + ALERT_DISABLED = 1, + ALWAYS = 2, +} + +enum MIDType { + USER = 0, + ROOM = 1, + GROUP = 2, + SQUARE = 3, + SQUARE_CHAT = 4, + SQUARE_MEMBER = 5, + BOT = 6, +} + +enum MessageRelationType { + FORWARD = 0, + AUTO_REPLY = 1, + SUBORDINATE = 2, + REPLY = 3, +} + +enum ServiceCode { + UNKNOWN = 0, + TALK = 1, + SQUARE = 2, +} + +enum AppExtensionType { + SIRI = 1, + GOOGLE_ASSISTANT = 2, + OS_SHARE = 3, +} + +enum PredefinedReactionType { + NICE = 2, + LOVE = 3, + FUN = 4, + AMAZING = 5, + SAD = 6, + OMG = 7, +} + +enum PlaceSearchProvider { + GOOGLE = 0, + BAIDU = 1, + FOURSQUARE = 2, +} + +enum GeolocationAccuracyMode { + UNKNOWN = 0, + IOS_REDUCED_ACCURACY = 1, + IOS_FULL_ACCURACY = 2, + AOS_PRECISE_LOCATION = 3, + AOS_APPROXIMATE_LOCATION = 4, +} + +enum ContentType { + NONE = 0, + IMAGE = 1, + VIDEO = 2, + AUDIO = 3, + HTML = 4, + PDF = 5, + CALL = 6, + STICKER = 7, + PRESENCE = 8, + GIFT = 9, + GROUPBOARD = 10, + APPLINK = 11, + LINK = 12, + CONTACT = 13, + FILE = 14, + LOCATION = 15, + POSTNOTIFICATION = 16, + RICH = 17, + CHATEVENT = 18, + MUSIC = 19, + PAYMENT = 20, + EXTIMAGE = 21, + FLEX = 22, +} + +enum ContactType { + MID = 0, + PHONE = 1, + EMAIL = 2, + USERID = 3, + PROXIMITY = 4, + GROUP = 5, + USER = 6, + QRCODE = 7, + PROMOTION_BOT = 8, + CONTACT_MESSAGE = 9, + FRIEND_REQUEST = 10, + BEACON = 11, + REPAIR = 128, + FACEBOOK = 2305, + SINA = 2306, + RENREN = 2307, + FEIXIN = 2308, + BBM = 2309, +} + +enum ContactStatus { + UNSPECIFIED = 0, + FRIEND = 1, + FRIEND_BLOCKED = 2, + RECOMMEND = 3, + RECOMMEND_BLOCKED = 4, + DELETED = 5, + DELETED_BLOCKED = 6, +} + +enum ContactRelation { + ONEWAY = 0, + BOTH = 1, + NOT_REGISTERED = 2, +} + +enum FriendRequestStatus { + NONE = 0, + AVAILABLE = 1, + ALREADY_REQUESTED = 2, + UNAVAILABLE = 3, +} + +enum ContactCalendarEventType { + BIRTHDAY = 0, +} + +enum UserStatus { + NORMAL = 0, + UNBOUND = 1, + UNREGISTERED = 2, + UNKNOWN = 3, +} + +enum ContactCalendarEventState { + SHOW = 0, + HIDE = 1, +} + +enum SnsIdType { + FACEBOOK = 1, + SINA = 2, + RENREN = 3, + FEIXIN = 4, + BBM = 5, + APPLE = 6, + YAHOOJAPAN = 7, +} + +enum UserAgeType { + OVER = 1, + UNDER = 2, + UNDEFINED = 3, +} + +enum UserAllowProfileHistoryType { + OWNER = 0, + FRIEND = 1, +} + +enum UserStatusMessageHistoryType { + NONE = 1, + ALL = 2, +} + +enum UserSharePersonalInfoToFriendsType { + NEVER_SHOW = 0, + ONE_WAY = 1, + MUTUAL = 2, +} + +enum IdentityProvider { + UNKNOWN = 0, + LINE = 1, + NAVER_KR = 2, + LINE_PHONE = 3, +} + +enum EmailConfirmationStatus { + NOT_SPECIFIED = 0, + NOT_YET = 1, + DONE = 3, + NEED_ENFORCED_INPUT = 4, +} + +enum AccountMigrationPincodeType { + NOT_APPLICABLE = 0, + NOT_SET = 1, + SET = 2, + NEED_ENFORCED_INPUT = 3, +} + +enum SecurityCenterSettingsType { + NOT_APPLICABLE = 0, + NOT_SET = 1, + SET = 2, + NEED_ENFORCED_INPUT = 3, +} + +enum CustomMode { + PROMOTION_FRIENDS_INVITE = 1, + CAPABILITY_SERVER_SIDE_SMS = 2, + LINE_CLIENT_ANALYTICS_CONFIGURATION = 3, +} + +enum VerificationMethod { + NO_AVAILABLE = 0, + PIN_VIA_SMS = 1, + CALLERID_INDIGO = 2, + PIN_VIA_TTS = 4, + SKIP = 10, +} + +enum ContactSetting { + CONTACT_SETTING_NOTIFICATION_DISABLE = 1, + CONTACT_SETTING_DISPLAY_NAME_OVERRIDE = 2, + CONTACT_SETTING_CONTACT_HIDE = 4, + CONTACT_SETTING_FAVORITE = 8, + CONTACT_SETTING_DELETE = 16, +} + +enum FriendRequestMethod { + TIMELINE = 1, + NEARBY = 2, + SQUARE = 3, +} + +enum CharType { + GROUP = 0, + ROOM = 1, + PEER = 2, +} + +enum FeatureType { + OBS_VIDEO = 1, + OBS_GENERAL = 2, + OBS_RINGBACK_TONE = 3, +} + +enum NotificationType { + APPLE_APNS = 1, + GOOGLE_C2DM = 2, + NHN_NNI = 3, + SKT_AOM = 4, + MS_MPNS = 5, + RIM_BIS = 6, + GOOGLE_GCM = 7, + NOKIA_NNAPI = 8, + TIZEN = 9, + MOZILLA_SIMPLE = 10, + LINE_BOT = 17, + LINE_WAP = 18, + APPLE_APNS_VOIP = 19, + MS_WNS = 20, + GOOGLE_FCM = 21, + CLOVA = 22, + CLOVA_VOIP = 23, + HUAWEI_HCM = 24, +} + +enum ModificationType { + ADD = 0, + REMOVE = 1, + MODIFY = 2, +} + +enum ChatAttribute { + NAME = 1, + PICTURE_STATUS = 2, + PREVENTED_JOIN_BY_TICKET = 4, + NOTIFICATION_SETTING = 8, + INVITATION_TICKET = 16, + FAVORITE_TIMESTAMP = 32, + CHAT_TYPE = 64, +} + +enum BotType { + RESERVED = 0, + OFFICIAL = 1, + LINE_AT_0 = 2, + LINE_AT = 3, +} + +enum BuddyOnAirLabel { + ON_AIR = 0, + LIVE = 1, + GLP = 2, +} + +enum BuddyBotActiveStatus { + UNSPECIFIED = 0, + INACTIVE = 1, + ACTIVE = 2, + DELETED = 3, +} + +enum GroupCallMediaType { + AUDIO = 1, + VIDEO = 2, + LIVE = 3, +} + +enum GroupCallProtocol { + STANDARD = 1, + CONSTELLA = 2, +} + +enum SyncTriggerReason { + UNKNOWN = 0, + REVISION_GAP_TOO_LARGE_CLIENT = 1, + REVISION_GAP_TOO_LARGE_SERVER = 2, + OPERATION_EXPIRED = 3, + REVISION_HOLE = 4, + FORCE_TRIGGERED = 5, +} + +enum NotificationStatus { + NOTIFICATION_ITEM_EXIST = 1, + TIMELINE_ITEM_EXIST = 2, + NOTE_GROUP_NEW_ITEM_EXIST = 4, + TIMELINE_BUDDYGROUP_CHANGED = 8, + NOTE_ONE_TO_ONE_NEW_ITEM_EXIST = 16, + ALBUM_ITEM_EXIST = 32, + TIMELINE_ITEM_DELETED = 64, + OTOGROUP_ITEM_EXIST = 128, + GROUPHOME_NEW_ITEM_EXIST = 256, + GROUPHOME_HIDDEN_ITEM_CHANGED = 512, + NOTIFICATION_ITEM_CHANGED = 1024, + BEAD_ITEM_HIDE = 2048, + BEAD_ITEM_SHOW = 4096, + LINE_TICKET_UPDATED = 8192, + TIMELINE_STORY_UPDATED = 16384, + SMARTCH_UPDATED = 32768, + AVATAR_UPDATED = 65536, + HOME_NOTIFICATION_ITEM_EXIST = 131072, + TIMELINE_REBOOT_COMPLETED = 262144, + TIMELINE_GUIDE_STORY_UPDATED = 524288, +} + +enum GlobalEventType { + DUMMY = 0, + NOTICE = 1, + MORETAB = 2, + STICKERSHOP = 3, + CHANNEL = 4, + DENY_KEYWORD = 5, + CONNECTIONINFO = 6, + BUDDY = 7, + TIMELINEINFO = 8, + THEMESHOP = 9, + CALLRATE = 10, + CONFIGURATION = 11, + STICONSHOP = 12, + SUGGESTDICTIONARY = 13, + SUGGESTSETTINGS = 14, + USERSETTINGS = 15, + ANALYTICSINFO = 16, + SEARCHPOPULARKEYWORD = 17, + SEARCHNOTICE = 18, + TIMELINE = 19, + SEARCHPOPULARCATEGORY = 20, + EXTENDEDPROFILE = 21, + SEASONALMARKETING = 22, + NEWSTAB = 23, + SUGGESTDICTIONARYV2 = 24, + CHATAPPSYNC = 25, + AGREEMENTS = 26, + INSTANTNEWS = 27, + EMOJI_MAPPING = 28, + SEARCHBARKEYWORDS = 29, + SHOPPING = 30, + CHAT_EFFECT_BACKGROUND = 31, + CHAT_EFFECT_KEYWORD = 32, + SEARCHINDEX = 33, + HUBTAB = 34, + PAY_RULE_UPDATED = 35, + SMARTCH = 36, + HOME_SERVICE_LIST = 37, + TIMELINESTORY = 38, + WALLET_TAB = 39, + POD_TAB = 40, + HOME_SAFETY_CHECK = 41, +} + +enum SyncCategories { + ALL = 0, + PROFILE = 1, + SETTINGS = 2, + CONFIGURATIONS = 3, + CONTACT = 4, + GROUP = 5, + E2EE = 6, + MESSAGE = 7, +} + +enum MediaMessageFlow { + V1 = 1, + V2 = 2, +} + +enum MessageReactionType { + ALL = 0, + UNDO = 1, + NICE = 2, + LOVE = 3, + FUN = 4, + AMAZING = 5, + SAD = 6, + OMG = 7, +} + +enum SquareChatAnnouncementType { +} + +enum PictureSource { + NFT = 1, + AVATAR = 2, + SNOW = 3, + ARCZ = 4, +} + +enum RejectionReason { + UNKNOWN = 0, + INVALID_TARGET_USER = 1, + AGE_VALIDATION = 2, + TOO_MANY_FRIENDS = 3, + TOO_MANY_REQUESTS = 4, + MALFORMED_REQUEST = 5, +} + + + + + + +exception TalkException { + 1: ErrorCode code; + 2: string reason; + 3: map parameterMap; +} + + +exception ChannelException { + 1: ChannelErrorCode code; + 2: string reason; + 3: map parameterMap; +} + + +exception SquareException { + 1: SquareErrorCode errorCode; + 2: ErrorExtraInfo errorExtraInfo; + 3: string reason; +} + + +exception LiffException { + 1: LiffErrorCode code; + 2: string message; + 3: LiffErrorPayload payload; +} + + +exception HomeException { + 1: HomeExceptionCode exceptionCode; + 2: string message; + 3: i64 retryTimeMillis; +} + + +exception ChatappException { + 1: ChatappErrorCode code; + 2: string reason; +} + + +exception MembershipException { + 1: MembershipErrorCode code; + 2: string reason; + 3: map parameterMap; +} + + +exception BotException { + 1: BotErrorCode errorCode; + 2: string reason; + 3: map parameterMap; +} + + +exception BotExternalException { + 1: BotExternalErrorCode errorCode; + 2: string reason; +} + + +exception LiffChannelException { + 1: ChannelErrorCode code; + 2: string reason; + 3: map parameterMap; +} + + +exception AccessTokenRefreshException { + 1: AccessTokenRefreshErrorCode errorCode; + 2: i64 reasonCode; +} + + +exception AccountEapConnectException { + 1: AccountEapConnectErrorCode code; + 2: string alertMessage; + 11: WebAuthDetails webAuthDetails +} + + +exception PwlessCredentialException { + 1: PwlessCredentialErrorCode code; + 2: string alertMessage; +} + + +exception SecondAuthFactorPinCodeException { + 1: SecondAuthFactorPinCodeErrorCode code; + 2: string alertMessage; +} + + +exception AuthException { + 1: AuthErrorCode code; + 2: string alertMessage; + 11: WebAuthDetails webAuthDetails +} + + +exception SecondaryPwlessLoginException { + 1: SecondaryPwlessLoginErrorCode code; + 2: string alertMessage; +} + + +exception SecondaryQrCodeException { + 1: SecondaryQrCodeErrorCode code; + 2: string alertMessage; +} + + +exception PaymentException { + 1: PaymentErrorCode errorCode; + 2: string debugReason; + 3: string serverDefinedMessage; + 4: map errorDetailMap; +} + + +exception SettingsException { + 1: SettingsErrorCode code; + 2: string reason; + 3: map parameterMap; +} + + +exception TicketException { + 1: i32 code; + 2: string reason; + 3: map parameterMap; +} + + +exception ThingsException { + 1: ThingsErrorCode code; + 2: string reason; +} + + +exception SuggestTrialException { + 1: SuggestTrialErrorCode code; + 2: string reason; + 3: map parameterMap; +} + + +exception LFLPremiumException { + 1: LFLPremiumErrorCode code; +} + + +exception WalletException { + 1: WalletErrorCode code; + 2: string reason; + 3: map attributes; +} + + +exception ShopException { + 1: ShopErrorCode code; + 2: string reason; + 3: map parameterMap; +} + + +exception PointException { + 1: PointErrorCode code; + 2: string reason; + 3: map extra; +} + + +exception E2EEKeyBackupException { + 1: E2EEKeyBackupErrorCode code; + 2: string reason; + 3: map parameterMap; +} + + +exception RejectedException { + 1: RejectionReason rejectionReason; + 2: string hint; +} + +exception ServerFailureException { + 1: string hint; +} + + + +struct UpdateChatRequest { + 1: i32 reqSeq; + 2: Chat chat; + 3: i32 updatedAttribute; +} + +struct UpdateChatResponse { +} + +struct AcceptChatInvitationByTicketRequest { + 1: i32 reqSeq; + 2: string chatMid; + 3: string ticketId; +} + +struct AcceptChatInvitationByTicketResponse { +} + +struct AcceptChatInvitationRequest { + 1: i32 reqSeq; + 2: string chatMid; +} + +struct ReissueChatTicketRequest { + 1: i32 reqSeq; + 2: string groupMid; +} + +struct AcceptChatInvitationResponse { +} + +struct ReissueChatTicketResponse { + 1: string ticketId; +} + +struct RejectChatInvitationRequest { + 1: i32 reqSeq; + 2: string chatMid; +} + +struct GetAllChatMidsRequest { + 1: optional bool withMemberChats; + 2: optional bool withInvitedChats; +} + +struct RejectChatInvitationResponse { +} + +struct GetAllChatMidsResponse { + 1: set memberChatMids; + 2: set invitedChatMids; +} + +struct CreateChatRequest { + 1: i32 reqSeq; + 2: i32 type; + 3: optional string name; + 4: set targetUserMids; + 5: optional string picturePath; +} + +struct CreateChatResponse { + 1: Chat chat; +} + +struct BeaconCondition { + 1: string inFriends; + 2: string notInFriends; + 3: bool termsAgreed; +} + +struct BeaconBackgroundNotification { + 1: i64 actionInterval; + 2: list actionAndConditions; + 3: i64 actionDelay; + 4: list actionConditions; +} + +struct LiffErrorPayload { + 3: LiffErrorConsentRequired consentRequired; +} + +struct LiffErrorConsentRequired { + 1: string channelId; + 2: string consentUrl; +} + +struct ErrorExtraInfo { + 1: PreconditionFailedExtraInfo preconditionFailedExtraInfo; + 2: UserRestrictionExtraInfo userRestrictionInfo; +} + +struct UserRestrictionExtraInfo { + 1: string linkUrl; +} + +struct WebAuthDetails { + 1: string baseUrl; + 2: string token; +} + +struct Profile { + 1: string mid; + 3: string userid; + 10: string phone; + 11: string email; + 12: string regionCode; + 20: string displayName; + 21: string phoneticName; + 22: string pictureStatus; + 23: string thumbnailUrl; + 24: string statusMessage; + 31: bool allowSearchByUserid; + 32: bool allowSearchByEmail; + 33: string picturePath; + 34: string musicProfile; + 35: string videoProfile; + 36: map statusMessageContentMetadata; + 37: AvatarProfile avatarProfile; + 38: bool nftProfile; + 39: PictureSource pictureSource; +} + +struct AvatarProfile { + 1: string version; + 2: i64 updatedMillis; + 3: string thumbnail; + 4: bool usablePublicly; +} + +struct Operation { + 1: i64 revision; + 2: i64 createdTime; + 3: OpType type; + 4: i32 reqSeq; + 5: string checksum; + 7: OpStatus status; + 10: string param1; + 11: string param2; + 12: string param3; + 20: Message message; +} + +struct Message { + 1: string _from; + 2: string to; + 3: MIDType toType; + 4: string id; + 5: i64 createdTime; + 6: i64 deliveredTime; + 10: string text; + 11: Location location; + 14: bool hasContent; + 15: ContentType contentType; + 17: binary contentPreview; + 18: map contentMetadata; + 19: i8 sessionId; + 20: list chunks; + 21: string relatedMessageId; + 22: MessageRelationType messageRelationType; + 23: i64 readCount; + 24: ServiceCode relatedMessageServiceCode; + 25: AppExtensionType appExtensionType; + 27: list reactions; +} + +struct Reaction { + 1: string fromUserMid; + 2: i64 atMillis; + 3: ReactionType reactionType; +} + +struct ReactionType { + 1: PredefinedReactionType predefinedReactionType; +} + +struct ReactRequest { + 1: i32 reqSeq; + 2: i64 messageId; + 3: ReactionType reactionType; +} + +struct Location { + 1: string title; + 2: string address; + 3: double latitude; + 4: double longitude; + 5: string phone; + 6: string categoryId; + 7: PlaceSearchProvider provider; + 8: GeolocationAccuracy accuracy; + 9: double altitudeMeters; +} + +struct GeolocationAccuracy { + 1: double radiusMeters; + 2: double radiusConfidence; + 3: double altitudeAccuracy; + 4: double velocityAccuracy; + 5: double bearingAccuracy; + 6: GeolocationAccuracyMode accuracyMode; +} + +struct Contact { + 1: string mid; + 2: i64 createdTime; + 10: ContactType type; + 11: ContactStatus status; + 21: ContactRelation relation; + 22: string displayName; + 23: string phoneticName; + 24: string pictureStatus; + 25: string thumbnailUrl; + 26: string statusMessage; + 27: string displayNameOverridden; + 28: i64 favoriteTime; + 31: bool capableVoiceCall; + 32: bool capableVideoCall; + 33: bool capableMyhome; + 34: bool capableBuddy; + 35: i32 attributes; + 36: i64 settings; + 37: string picturePath; + 38: string recommendParams; + 39: FriendRequestStatus friendRequestStatus; + 40: string musicProfile; + 42: string videoProfile; + 43: map statusMessageContentMetadata; + 44: AvatarProfile avatarProfile; + 45: string friendRingtone; + 46: string friendRingbackTone; + 47: bool nftProfile; + 48: PictureSource pictureSource; +} + +struct GetContactsV2Request { + 1: list targetUserMids; + 2: set neededContactCalendarEvents; + 3: bool withUserStatus; +} + +struct GetContactsV2Response { + 1: map contacts; +} + +struct ContactEntry { + 1: UserStatus userStatus; + 2: i64 snapshotTimeMillis; + 3: Contact contact; + 4: ContactCalendarEvents calendarEvents; +} + +struct ContactCalendarEvents { + 1: map events; +} + +struct ContactCalendarEvent { + 1: string id; + 2: ContactCalendarEventState state; + 3: i32 year; + 4: i32 month; + 5: i32 day; +} + +struct Configurations { + 1: i64 revision; + 2: map configMap; +} + +struct E2EEPublicKey { + 1: i32 version; + 2: i32 keyId; + 4: binary keyData; + 5: i64 createdTime; +} + +struct RSAKey { + 1: string keynm; + 2: string nvalue; + 3: string evalue; + 4: string sessionKey; +} + +struct Settings { + 10: bool notificationEnable; + 11: i64 notificationMuteExpiration; + 12: bool notificationNewMessage; + 13: bool notificationGroupInvitation; + 14: bool notificationShowMessage; + 15: bool notificationIncomingCall; + 16: string notificationSoundMessage; + 17: string notificationSoundGroup; + 18: bool notificationDisabledWithSub; + 19: bool notificationPayment; + 20: bool privacySyncContacts; + 21: bool privacySearchByPhoneNumber; + 22: bool privacySearchByUserid; + 23: bool privacySearchByEmail; + 24: bool privacyAllowSecondaryDeviceLogin; + 25: bool privacyProfileImagePostToMyhome; + 26: bool privacyReceiveMessagesFromNotFriend; + 27: bool privacyAgreeUseLineCoinToPaidCall; + 28: bool privacyAgreeUsePaidCall; + 29: bool privacyAllowFriendRequest; + 30: string contactMyTicket; + 40: IdentityProvider identityProvider; + 41: string identityIdentifier; + 42: map snsAccounts; + 43: bool phoneRegistration; + 44: EmailConfirmationStatus emailConfirmationStatus; + 45: AccountMigrationPincodeType accountMigrationPincodeType; + 46: bool enforcedInputAccountMigrationPincode; + 47: SecurityCenterSettingsType securityCenterSettingsType; + 48: bool allowUnregistrationSecondaryDevice; + 49: bool pwlessPrimaryCredentialRegistration; + 50: string preferenceLocale; + 60: map customModes; + 61: bool e2eeEnable; + 62: bool hitokotoBackupRequested; + 63: bool privacyProfileMusicPostToMyhome; + 65: bool privacyAllowNearby; + 66: i64 agreementNearbyTime; + 67: i64 agreementSquareTime; + 68: bool notificationMention; + 69: i64 botUseAgreementAcceptedAt; + 70: i64 agreementShakeFunction; + 71: i64 agreementMobileContactName; + 73: i64 agreementSoundToText; + 74: string privacyPolicyVersion; + 75: i64 agreementAdByWebAccess; + 76: i64 agreementPhoneNumberMatching; + 77: i64 agreementCommunicationInfo; + 78: UserSharePersonalInfoToFriendsType privacySharePersonalInfoToFriends; + 79: i64 agreementThingsWirelessCommunication; + 80: i64 agreementGdpr; + 81: UserStatusMessageHistoryType privacyStatusMessageHistory; + 82: i64 agreementProvideLocation; + 83: i64 agreementBeacon; + 85: UserAllowProfileHistoryType privacyAllowProfileHistory; + 86: i64 agreementContentsSuggest; + 87: i64 agreementContentsSuggestDataCollection; + 88: UserAgeType privacyAgeResult; + 89: bool privacyAgeResultReceived; + 72: bool notificationThumbnail; + 90: i64 agreementOcrImageCollection; + 91: bool privacyAllowFollow; + 92: bool privacyShowFollowList; + 93: bool notificationBadgeTalkOnly; + 94: i64 agreementIcna; + 95: bool notificationReaction; + 96: i64 agreementMid; + 97: bool homeNotificationNewFriend; + 98: bool homeNotificationFavoriteFriendUpdate; + 99: bool homeNotificationGroupMemberUpdate; + 100: bool homeNotificationBirthday; + 101: map eapAllowedToConnect; + 102: i64 agreementLineOutUse; + 103: i64 agreementLineOutProvideInfo; + 104: bool notificationShowProfileImage; + 105: i64 agreementPdpa; + 106: string agreementLocationVersion; + 107: bool zhdPageAllowedToShow; +} + +struct E2EENegotiationResult { + 1: set allowedTypes; + 2: E2EEPublicKey publicKey; + 3: i32 specVersion; +} + +struct ContactRegistration { + 1: Contact contact; + 10: string luid; + 11: ContactType contactType; + 12: string contactKey; +} + +struct E2EEGroupSharedKey { + 1: i32 keyVersion; + 2: i32 groupKeyId; + 3: string creator; + 4: i32 creatorKeyId; + 5: string receiver; + 6: i32 receiverKeyId; + 7: binary encryptedSharedKey; + 8: set allowedTypes; + 9: i32 specVersion; +} + +struct VerificationSessionData { + 1: string sessionId; + 2: VerificationMethod method; + 3: string callback; + 4: string normalizedPhone; + 5: string countryCode; + 6: string nationalSignificantNumber; + 7: list availableVerificationMethods; + 8: string callerIdMask; +} + +struct FollowRequest { + 1: FollowMid followMid; +} + +struct FollowMid { + 1: string mid; + 2: string eMid; +} + +struct UnfollowRequest { + 1: FollowMid followMid; +} + +struct Ticket { + 1: string id; + 10: i64 expirationTime; + 21: i32 maxUseCount; +} + +struct GetChatsRequest { + 1: list chatMids; + 2: bool withMembers; + 3: bool withInvitees; +} + +struct GetChatsResponse { + 1: list chats; +} + +struct Chat { + 1: CharType type; + 2: string chatMid; + 3: i64 createdTime; + 4: bool notificationDisabled; + 5: i64 favoriteTimestamp; + 6: string chatName; + 7: string picturePath; + 8: Extra extra; +} + +struct Extra { + 1: GroupExtra groupExtra; + 2: PeerExtra peerExtra; +} + +struct GroupExtra { + 1: string creator; + 2: bool preventedJoinByTicket; + 3: string invitationTicket; + 4: map memberMids; + 5: map inviteeMids; + 6: bool addFriendDisabled; + 7: bool ticketDisabled; +} + +struct PeerExtra { +// ? +} + +struct GetFollowersRequest { + 1: FollowMid followMid; + 2: string cursor; +} + +struct GetFollowersResponse { + 1: list profiles; + 2: string cursor; + 3: i64 followingCount; + 4: i64 followerCount; +} + +struct FollowProfile { + 1: FollowMid followMid; + 2: string displayName; + 3: string picturePath; + 4: bool following; + 5: bool allowFollow; + 6: FollowBuddyDetail followBuddyDetail; +} + +struct FollowBuddyDetail { + 1: i32 iconType; +} + +struct GetFollowingsRequest { + 1: FollowMid followMid; + 2: string cursor; +} + +struct GetFollowingsResponse { + 1: list profiles; + 2: string cursor; + 3: i64 followingCount; + 4: i64 followerCount; +} + +struct Room { + 1: string mid; + 2: i64 createdTime; + 10: list contacts; + 31: bool notificationDisabled; + 40: list memberMids; +} + +struct ContactModification { + 1: ModificationType type; + 2: string luid; + 11: list phones; + 12: list emails; + 13: list userids; +} + +struct GetE2EEKeyBackupCertificatesRequest { +} + +struct GetE2EEKeyBackupCertificatesResponse { + 1: list urlHashList; +} + +struct DeleteOtherFromChatRequest { + 1: i32 reqSeq; + 2: string chatMid; + 3: set targetUserMids; +} + +struct DeleteOtherFromChatResponse { +} + +struct InviteIntoChatRequest { + 1: i32 reqSeq; + 2: string chatMid; + 3: set targetUserMids; +} + +struct InviteIntoChatResponse { +} + +struct CancelChatInvitationRequest { + 1: i32 reqSeq; + 2: string chatMid; + 3: set targetUserMids; +} + +struct CancelChatInvitationResponse { +} + +struct DeleteSelfFromChatRequest { + 1: i32 reqSeq; + 2: string chatMid; + 3: i64 lastSeenMessageDeliveredTime; + 4: string lastSeenMessageId; + 5: i64 lastMessageDeliveredTime; + 6: string lastMessageId; +} + +struct DeleteSelfFromChatResponse { +} + +struct FindChatByTicketRequest { + 1: string ticketId; +} + +struct FindChatByTicketResponse { + 1: Chat chat; +} + +struct RefreshAccessTokenRequest { + 1: string refreshToken; +} + +struct RefreshAccessTokenResponse { + 1: string accessToken; + 2: i64 durationUntilRefreshInSec; + 3: RetryPolicy retryPolicy; + 4: i64 tokenIssueTimeEpochSec; + 5: string refreshToken; +} + +struct RetryPolicy { + 1: i64 initialDelayInMillis; + 2: i64 maxDelayInMillis; + 3: double multiplier; + 4: double jitterRate; +} + +struct TMessageReadRange { + 1: string chatId; + 2: map> ranges; +} + +struct TMessageReadRangeEntry { + 1: i64 startMessageId; + 2: i64 endMessageId; + 3: i64 startTime; + 4: i64 endTime; +} + +struct BuddyDetail { + 1: string mid; + 2: i64 memberCount; + 3: bool onAir; + 4: bool businessAccount; + 5: bool addable; + 6: set acceptableContentTypes; + 7: bool capableMyhome; + 8: bool freePhoneCallable; + 9: string phoneNumberToDial; + 10: bool needPermissionApproval; + 11: string channelId; + 12: string channelProviderName; + 13: i32 iconType; + 14: BotType botType; + 15: bool showRichMenu; + 16: i64 richMenuRevision; + 17: BuddyOnAirLabel onAirLabel; + 18: bool useTheme; + 19: string themeId; + 20: bool useBar; + 21: i64 barRevision; + 22: bool useBackground; + 23: string backgroundId; + 24: bool statusBarEnabled; + 25: i64 statusBarRevision; + 26: string searchId; + 27: i32 onAirVersion; + 28: bool blockable; + 29: BuddyBotActiveStatus botActiveStatus; + 30: bool membershipEnabled; +} + +struct MessageBoxV2MessageId { + 1: i64 deliveredTime; + 2: i64 messageId; +} + +struct GetPreviousMessagesV2Request { + 1: string messageBoxId; + 2: MessageBoxV2MessageId endMessageId; + 3: i32 messagesCount; + 4: bool withReadCount; + 5: bool receivedOnly; +} + +struct ChannelToken { + 1: string token; + 2: string obsToken; + 3: i64 expiration; + 4: string refreshToken; + 5: string channelAccessToken; +} + +struct GroupCall { + 1: bool online; + 2: string chatMid; + 3: string hostMids; + 4: list memberMids; + 5: i64 started; + 6: GroupCallMediaType mediaType; + 7: GroupCallProtocol protocol; +} + +struct SyncResponse { + 1: OperationResponse operationResponse; + 2: FullSyncResponse fullSyncResponse; + 3: PartialFullSyncResponse partialFullSyncResponse +} + +struct OperationResponse { + 1: list operations; + 2: bool hasMoreOps; + 3: TGlobalEvents globalEvents; + 4: TIndividualEvents individualEvents; +} + +struct FullSyncResponse { + 1: set reasons; + 2: i64 nextRevision +} + +struct PartialFullSyncResponse { + 1: map targetCategories; +} + +struct TGlobalEvents { + 1: map events; + 2: i64 lastRevision; +} + +struct TIndividualEvents { + 1: set events + 2: i64 lastRevision; +} + +struct GlobalEvent { + 1: GlobalEventType type; + 2: i32 minDelayInMinutes; + 3: i32 maxDelayInMinutes; + 4: i64 createTimeMillis; + 5: bool maxDelayHardLimit; +} + +struct DetermineMediaMessageFlowResponse { + 1: map flowMap; + 2: i64 cacheTtlMillis; +} + +struct ChatRoomAnnouncementContentMetadata { + 1: string replace; + 2: string sticonOwnership; + 3: string postNotificationMetadata; +} + +struct ChatRoomAnnouncementContents { + 1: i32 displayFields; + 2: string text; + 3: string link; + 4: string thumbnail; + 5: ChatRoomAnnouncementContentMetadata contentMetadata; +} + +struct ChatRoomAnnouncement { + 1: i64 announcementSeq; + 2: i32 type; + 3: ChatRoomAnnouncementContents contents; + 4: string creatorMid; + 5: i64 createdTime; + 6: i32 deletePermission; +} + + +service TalkService { + Profile getProfile(1: TalkSyncReason syncReason) throws(1: TalkException e); + Message sendMessage(1: i32 seq, 2: Message message) throws(1: TalkException e); + void unsendMessage(1: i32 seq, 2: string messageId) throws(1: TalkException e); + void requestResendMessage(1: i32 reqSeq, 2: string senderMid, 3: string messageId) throws(1: TalkException e); + void respondResendMessage(1: i32 reqSeq, 2: string receiverMid, 3: string originalMessageId, 4: Message resendMessage, 5: ErrorCode errorCode) throws(1: TalkException e); + void sendChatChecked(1: i32 seq, 2: string chatMid, 3: string lastMessageId, 4: i8 sessionId;) throws(1: TalkException e); + Contact getContact(2: string id) throws(1: TalkException e); + list getContacts(2: list ids) throws(1: TalkException e); + GetContactsV2Response getContactsV2(1: GetContactsV2Request request, 2: TalkSyncReason syncReason) throws(1: TalkException e); + map findAndAddContactsByMid(1: i32 reqSeq, 2: string mid, 3: ContactType type, 4: string reference) throws(1: TalkException e); + map findAndAddContactsByPhone(1: i32 reqSeq, 2: set phones, 3: string reference) throws(1: TalkException e); + list getAllContactIds() throws(1: TalkException e); + list getBlockedContactIds() throws(1: TalkException e); + list getBlockedRecommendationIds() throws(1: TalkException e); + Configurations getConfigurations(2: i64 revision, 3: string regionOfUsim, 4: string regionOfTelephone, 5: string regionOfLocale, 6: string carrier, 7: TalkSyncReason syncReason) throws(1: TalkException e); + E2EEPublicKey getE2EEPublicKey(2: string mid, 3: i32 version, 4: i32 keyId) throws(1: TalkException e); + map findAndAddContactsByUserid(1: i32 reqSeq, 2: string searchId, 3: string reference) throws(1: TalkException e); + RSAKey getRSAKeyInfo(2: IdentityProvider provider) throws(1: TalkException e); + list getRecommendationIds() throws(1: TalkException e); + Settings getSettings() throws(1: TalkException e); + Settings getSettingsAttributes2() throws(1: TalkException e); + E2EENegotiationResult negotiateE2EEPublicKey(2: string mid) throws(1: TalkException e); + E2EEPublicKey registerE2EEPublicKey(1: i32 reqSeq, 2: E2EEPublicKey publicKey) throws(1: TalkException e); + map syncContacts(1: i32 reqSeq, 2: list localContacts) throws(1: TalkException e); + string unregisterUserAndDevice() throws(1: TalkException e); + E2EEGroupSharedKey registerE2EEGroupKey() throws(1: TalkException e); + void removeFollower() throws(1: TalkException e); + void report() throws(1: TalkException e); + void reportProfile() throws(1: TalkException e); + void reportPushRecvReports() throws(1: TalkException e); + void reportSettings() throws(1: TalkException e); + void requestAccountPasswordReset() throws(1: TalkException e); + VerificationSessionData changeVerificationMethod() throws(1: TalkException e); + void resendPinCode() throws(1: TalkException e); + void clearRingbackTone() throws(1: TalkException e); + void clearRingtone() throws(1: TalkException e); + list fetchOps(2: i64 localRev, 3: i32 count, 4: i64 globalRev, 5: i64 individualRev) throws(1: TalkException e); + string decryptFollowEMid(2: string eMid) throws(1: TalkException e); + Contact findContactByUserTicket(2: string ticketIdWithTag) throws(1: TalkException e); + void updateContactSetting(1: i32 reqSeq, 2: string mid, 3: ContactSetting flag, 4: string value) throws(1: TalkException e); + map findContactsByPhone(2: set phones) throws(1: TalkException e); + void tryFriendRequest(1: string midOrEMid, 2: FriendRequestMethod method, 3: string friendRequestParams) throws(1: TalkException e); + void follow(2: FollowRequest followRequest) throws(1: TalkException e); + void unfollow(2: UnfollowRequest unfollowRequest) throws(1: TalkException e); + Ticket generateUserTicket(3: i64 expirationTime, 4: i32 maxUseCount) throws(1: TalkException e); + GetChatsResponse getChats(1: GetChatsRequest request) throws(1: TalkException e); + void updateNotificationToken(3: NotificationType type, 2: string token) throws(1: TalkException e); + ContactRegistration getContactRegistration(1: string id, 2: ContactType type) throws(1: TalkException e); + E2EEGroupSharedKey getE2EEGroupSharedKey(2: i32 keyVersion, 3: string chatMid, 4: i32 groupKeyId) throws(1: TalkException e); + string verifyQrcode(2: string verifier, 3: string pinCode) throws(1: TalkException e); + bool wakeUpLongPolling(2: i64 clientRevision) throws(1: TalkException e); + GetFollowersResponse getFollowers(2: GetFollowersRequest getFollowersRequest) throws(1: TalkException e); + GetFollowingsResponse getFollowings(2: GetFollowingsRequest getFollowingsRequest) throws(1: TalkException e); + E2EEGroupSharedKey getLastE2EEGroupSharedKey(2: i32 keyVersion, 3: string chatMid) throws(1: TalkException e); + map getLastE2EEPublicKeys(2: string chatMid) throws(1: TalkException e); + i64 getLastOpRevision() throws(1: TalkException e); + list getRoomsV2(2: list roomIds) throws(1: TalkException e); + bool isUseridAvailable(2: string userid) throws(1: TalkException e); + string acquireEncryptedAccessToken(2: FeatureType featureType) throws(1: TalkException e); + RejectChatInvitationResponse rejectChatInvitation(1: RejectChatInvitationRequest request) throws(1: TalkException e); + GetAllChatMidsResponse getAllChatMids(1: GetAllChatMidsRequest request, 2: i32 syncReason) throws(1: TalkException e); + DeleteSelfFromChatResponse deleteSelfFromChat(1: DeleteSelfFromChatRequest request) throws(1: TalkException e); + FindChatByTicketResponse findChatByTicket(1: FindChatByTicketRequest request) throws(1: TalkException e); + InviteIntoChatResponse inviteIntoChat(1: InviteIntoChatRequest request) throws(1: TalkException e); + DeleteOtherFromChatResponse deleteOtherFromChat(1: DeleteOtherFromChatRequest request) throws(1: TalkException e); + CreateChatResponse createChat(1: CreateChatRequest request) throws(1: TalkException e); + ReissueChatTicketResponse reissueChatTicket(1: ReissueChatTicketRequest request) throws(1: TalkException e); + CancelChatInvitationResponse cancelChatInvitation(1: CancelChatInvitationRequest request) throws(1: TalkException e); + UpdateChatResponse updateChat(1: UpdateChatRequest request) throws(1: TalkException e); + AcceptChatInvitationResponse acceptChatInvitation(1: AcceptChatInvitationRequest request) throws(1: TalkException e); + AcceptChatInvitationByTicketResponse acceptChatInvitationByTicket(1: AcceptChatInvitationByTicketRequest request) throws(1: TalkException e); + list getMessageReadRange(2: list chatIds, 3: TalkSyncReason syncReason;) throws(1: TalkException e); + void react(1: ReactRequest reactRequest) throws(1: TalkException e); + list getPreviousMessagesV2WithRequest(2: GetPreviousMessagesV2Request request, 3: TalkSyncReason syncReason) throws(1: TalkException e); + list getPreviousMessagesV2() throws(1: TalkException e); + list getRecentMessagesV2(2: string messageBoxId, 3: i32 messagesCount) throws(1: TalkException e); + void cancelReaction(// 1: CancelReactionRequest cancelReactionRequest; +) throws(1: TalkException e); + DetermineMediaMessageFlowResponse determineMediaMessageFlow(# 1: GetMediaMessageFlowRequest getMediaMessageFlowRequest; +) throws(1: TalkException e); + map> getChatRoomAnnouncementsBulk() throws(1: TalkException e); + list getChatRoomAnnouncements() throws(1: TalkException e); + void removeChatRoomAnnouncement() throws(1: TalkException e); + ChatRoomAnnouncement createChatRoomAnnouncement() throws(1: TalkException e); +} + + +service E2EEKeyBackupService { + GetE2EEKeyBackupCertificatesResponse getE2EEKeyBackupCertificates(2: GetE2EEKeyBackupCertificatesRequest request) throws(1: E2EEKeyBackupException e); +} + + +service AccessTokenRefreshService { + RefreshAccessTokenResponse refresh(1: RefreshAccessTokenRequest request,) throws(1: AccessTokenRefreshException e); +} + + +service BuddyService { + BuddyDetail getBuddyDetail(4: string buddyMid) throws(1: TalkException e); +} + + +service CallService { + GroupCall getGroupCall(2: string chatMid) throws(1: TalkException e); +} + + +service SyncService { + SyncResponse sync() throws(1: TalkException e); +} + + + + +struct DisasterInfo { + 1: string disasterId; + 2: string title; + 3: string region; + 4: string disasterDescription; + 5: string seeMoreUrl; + 7: i32 status; +} + +struct GetDisasterCasesRequest { +} + +struct GetDisasterCasesResponse { + 1: list disasters; + 2: list messageTemplate; + 3: i64 ttlInMillis; +} + + + + + +service HomeSafetyCheckService { + void deleteSafetyStatus(# 1: DeleteSafetyStatusRequest req, +) throws(1: HomeException e); + GetDisasterCasesResponse getDisasterCases(1: GetDisasterCasesRequest req,) throws(1: HomeException e); + void updateSafetyStatus(# 1: UpdateSafetyStatusRequest req, +) throws(1: HomeException e); +} + + +enum SquareMessageState { + SENT = 1; + DELETED = 2; + FORBIDDEN = 3; + UNSENT = 4; +} + +enum SquareEventType { + RECEIVE_MESSAGE = 0; + SEND_MESSAGE = 1; + MUTATE_MESSAGE = 41; + NOTIFIED_JOIN_SQUARE_CHAT = 2; + NOTIFIED_INVITE_INTO_SQUARE_CHAT = 3; + NOTIFIED_LEAVE_SQUARE_CHAT = 4; + NOTIFIED_DESTROY_MESSAGE = 5; + NOTIFIED_MARK_AS_READ = 6; + NOTIFIED_UPDATE_SQUARE_MEMBER_PROFILE = 7; + NOTIFIED_KICKOUT_FROM_SQUARE = 19; + NOTIFIED_SHUTDOWN_SQUARE = 18; + NOTIFIED_DELETE_SQUARE_CHAT = 20; + NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_NAME = 30; + NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_IMAGE = 31; + NOTIFIED_UPDATE_SQUARE_CHAT_MAX_MEMBER_COUNT = 38; + NOTIFIED_UPDATE_SQUARE_CHAT_ANNOUNCEMENT = 37; + NOTIFIED_ADD_BOT = 33; + NOTIFIED_REMOVE_BOT = 34; + NOTIFIED_UPDATE_READONLY_CHAT = 43; + NOTIFIED_UPDATE_MESSAGE_STATUS = 46; + NOTIFIED_CHAT_POPUP = 48; + NOTIFIED_SYSTEM_MESSAGE = 49; + NOTIFIED_UPDATE_SQUARE = 8; + NOTIFIED_UPDATE_SQUARE_STATUS = 9; + NOTIFIED_UPDATE_SQUARE_AUTHORITY = 10; + NOTIFIED_UPDATE_SQUARE_MEMBER = 11; + NOTIFIED_UPDATE_SQUARE_CHAT = 12; + NOTIFIED_UPDATE_SQUARE_CHAT_STATUS = 13; + NOTIFIED_UPDATE_SQUARE_CHAT_MEMBER = 14; + NOTIFIED_CREATE_SQUARE_MEMBER = 15; + NOTIFIED_CREATE_SQUARE_CHAT_MEMBER = 16; + NOTIFIED_UPDATE_SQUARE_MEMBER_RELATION = 17; + NOTIFIED_UPDATE_SQUARE_FEATURE_SET = 32; + NOTIFIED_UPDATE_SQUARE_CHAT_FEATURE_SET = 50; + NOTIFIED_UPDATE_SQUARE_NOTE_STATUS = 36; + NOTIFICATION_JOIN_REQUEST = 21; + NOTIFICATION_JOINED = 22; + NOTIFICATION_PROMOTED_COADMIN = 23; + NOTIFICATION_PROMOTED_ADMIN = 24; + NOTIFICATION_DEMOTED_MEMBER = 25; + NOTIFICATION_KICKED_OUT = 26; + NOTIFICATION_SQUARE_DELETE = 27; + NOTIFICATION_SQUARE_CHAT_DELETE = 28; + NOTIFICATION_MESSAGE = 29; + NOTIFICATION_POST_ANNOUNCEMENT = 39; + NOTIFICATION_POST = 40; + NOTIFICATION_NEW_CHAT_MEMBER = 42; + NOTIFICATION_MESSAGE_REACTION = 47; +} + +enum SquareEventStatus { + NORMAL = 1; + ALERT_DISABLED = 2; +} + +struct SquareMessage { + 1: Message message; + 3: MIDType fromType; + 4: i64 squareMessageRevision; + 5: SquareMessageState state; +} + +enum SquareMembershipState { + JOIN_REQUESTED = 1; + JOINED = 2; + REJECTED = 3; + LEFT = 4; + KICK_OUT = 5; + BANNED = 6; + DELETED = 7; +} + +enum SquareMemberRole { + ADMIN = 1; + CO_ADMIN = 2; + MEMBER = 10; +} + +struct SquarePreference { + 1: i64 favoriteTimestamp; + 2: bool notiForNewJoinRequest; +} + +struct SquareMember { + 1: string squareMemberMid; + 2: string squareMid; + 3: string displayName; + 4: string profileImageObsHash; + 5: bool ableToReceiveMessage; + 7: SquareMembershipState membershipState; + 8: SquareMemberRole role; + 9: i64 revision; + 10: SquarePreference preference; + 11: string joinMessage; +} + +struct SquareMessageReaction { + 1: MessageReactionType type; + 2: SquareMember reactor; + 3: i64 createdAt; + 4: i64 updatedAt; +} + +struct SquareMessageReactionStatus { + 1: i32 totalCount; + 2: map countByReactionType; + 3: SquareMessageReaction myReaction; +} + +struct SquareEventReceiveMessage { + 1: string squareChatMid; + 2: SquareMessage squareMessage; + 3: string senderDisplayName; + 4: SquareMessageReactionStatus messageReactionStatus; + 5: i64 senderRevision; + 6: string squareMid; +} + +struct SquareEventSendMessage { + 1: string squareChatMid; + 2: SquareMessage squareMessage; + 3: i32 reqSeq; + 4: string senderDisplayName; + 5: SquareMessageReactionStatus messageReactionStatus; +} + +struct SquareEventMutateMessage { + 1: string squareChatMid; + 2: SquareMessage squareMessage; + 3: i32 reqSeq; + 4: string senderDisplayName; +} + +struct SquareEventNotifiedJoinSquareChat { + 1: string squareChatMid; + 2: SquareMember joinedMember; +} + +enum SquareMemberRelationState { + NONE = 1; + BLOCKED = 2; +} + +struct SquareMemberRelation { + 1: SquareMemberRelationState state; + 2: i64 revision; +} + +struct SquareEventNotifiedInviteIntoSquareChat { + 1: string squareChatMid; + 2: list invitees; + 3: SquareMember invitor; + 4: SquareMemberRelation invitorRelation; +} + +struct SquareEventNotifiedLeaveSquareChat { + 1: string squareChatMid; + 2: string squareMemberMid; + 3: bool sayGoodbye; + 4: SquareMember squareMember; +} + +struct SquareEventNotifiedDestroyMessage { + 1: string squareChatMid; + 3: string messageId; +} + +struct SquareEventNotifiedMarkAsRead { + 1: string squareChatMid; + 2: string sMemberMid; + 4: string messageId; +} + +struct SquareEventNotifiedUpdateSquareMemberProfile { + 1: string squareChatMid; + 2: SquareMember squareMember; +} + +struct SquareEventNotifiedKickoutFromSquare { + 1: string squareChatMid; + 2: list kickees; + 4: SquareMember kicker; +} + +enum SquareType { + CLOSED = 0; + OPEN = 1; +} + +enum SquareState { + ALIVE = 0; + DELETED = 1; + SUSPENDED = 2; +} + +enum SquareEmblem { + SUPER = 1; + OFFICIAL = 2; +} + +enum SquareJoinMethodType { + NONE = 0; + APPROVAL = 1; + CODE = 2; +} + +struct ApprovalValue { + 1: string message; +} + +struct CodeValue { + 1: string code; +} + +struct SquareJoinMethodValue { + 1: ApprovalValue approvalValue; + 2: CodeValue codeValue; +} + +struct SquareJoinMethod { + 1: SquareJoinMethodType type; + 2: SquareJoinMethodValue value; +} + +enum BooleanState { + NONE = 0; + OFF = 1; + ON = 2; +} + +struct Square { + 1: string mid; + 2: string name; + 3: string welcomeMessage; + 4: string profileImageObsHash; + 5: string desc; + 6: bool searchable; + 7: SquareType type; + 8: i32 categoryId; + 9: string invitationURL; + 10: i64 revision; + 11: bool ableToUseInvitationTicket; + 12: SquareState state; + 13: list emblems; + 14: SquareJoinMethod joinMethod; + 15: BooleanState adultOnly; + 16: list svcTags; + 17: i64 createdAt; +} + +struct SquareEventNotifiedShutdownSquare { + 1: string squareChatMid; + 2: Square square; +} + +enum SquareChatType { + OPEN = 1; + SECRET = 2; + ONE_ON_ONE = 3; + SQUARE_DEFAULT = 4; +} + +enum SquareChatState { + ALIVE = 0; + DELETED = 1; + SUSPENDED = 2; +} + +struct MessageVisibility { + 1: bool showJoinMessage; + 2: bool showLeaveMessage; + 3: bool showKickoutMessage; +} + +struct SquareChat { + 1: string squareChatMid; + 2: string squareMid; + 3: SquareChatType type; + 4: string name; + 5: string chatImageObsHash; + 6: i64 squareChatRevision; + 7: i32 maxMemberCount; + 8: SquareChatState state; + 9: string invitationUrl; + 10: MessageVisibility messageVisibility; + 11: BooleanState ableToSearchMessage; +} + +struct SquareEventNotifiedDeleteSquareChat { + 1: SquareChat squareChat; +} + +struct SquareEventNotifiedUpdateSquareChatProfileName { + 1: string squareChatMid; + 2: SquareMember editor; + 3: string updatedChatName; +} + +struct SquareEventNotifiedUpdateSquareChatProfileImage { + 1: string squareChatMid; + 2: SquareMember editor; +} + +struct SquareEventNotifiedUpdateSquareChatMaxMemberCount { + 1: string squareChatMid; + 2: i32 maxMemberCount; + 3: SquareMember editor; +} + +struct SquareEventNotifiedAddBot { + 1: string squareChatMid; + 2: SquareMember squareMember; + 3: string botMid; + 4: string botDisplayName; +} + +struct SquareEventNotifiedRemoveBot { + 1: string squareChatMid; + 2: SquareMember squareMember; + 3: string botMid; + 4: string botDisplayName; +} + +struct SquareEventNotifiedUpdateReadonlyChat { + 1: string squareChatMid; + 2: bool readonly; +} + +enum MessageStatusType { +} + +struct MessageStatusContents { + 1: SquareMessageReactionStatus messageReactionStatus; +} + +struct SquareMessageStatus { + 1: string squareChatMid; + 2: string globalMessageId; + 3: MessageStatusType type; + 4: MessageStatusContents contents; + 5: i64 publishedAt; +} + +struct SquareEventNotifiedUpdateMessageStatus { + 1: string squareChatMid; + 2: string messageId; + 3: SquareMessageStatus messageStatus; +} + +struct UrlButton { + 1: string text; + 2: string url; +} + +struct TextButton { + 1: string text; +} + +struct OkButton { + 1: string text; +} + +struct ButtonContent { + 1: UrlButton urlButton; + 2: TextButton textButton; + 3: OkButton okButton; +} + +struct SquareEventChatPopup { + 1: string squareChatMid; + 2: i64 popupId; + 3: string flexJson; + 4: ButtonContent button; +} + +struct SquareEventNotifiedSystemMessage { + 1: string squareChatMid; + 2: string text; +} + +struct SquareEventNotifiedUpdateSquare { + 1: string squareChatMid; + 2: Square square; +} + +struct SquareStatus { + 1: i32 memberCount; + 2: i32 joinRequestCount; + 3: i64 lastJoinRequestAt; + 4: i32 openChatCount; +} + +struct SquareEventNotifiedUpdateSquareStatus { + 1: string squareChatMid; + 2: SquareStatus squareStatus; +} + +struct SquareEventNotifiedUpdateSquareMember { + 1: string squareChatMid; + 2: string squareMemberMid; + 3: SquareMember squareMember; +} + +struct SquareEventNotifiedUpdateSquareChat { + 1: string squareMid; + 2: string squareChatMid; + 3: SquareChat squareChat; +} + +enum NotifiedMessageType { + MENTION = 1; + REPLY = 2; +} + +struct SquareChatStatusWithoutMessage { + 1: i32 memberCount; + 2: i32 unreadMessageCount; + 3: string markedAsReadMessageId; + 4: string mentionedMessageId; + 5: NotifiedMessageType notifiedMessageType; +} + +struct SquareEventNotifiedUpdateSquareChatStatus { + 1: string squareChatMid; + 2: SquareChatStatusWithoutMessage statusWithoutMessage; +} + +enum SquareChatMembershipState { + JOINED = 1; + LEFT = 2; +} + +struct SquareChatMember { + 1: string squareMemberMid; + 2: string squareChatMid; + 3: i64 revision; + 4: SquareChatMembershipState membershipState; + 5: bool notificationForMessage; + 6: bool notificationForNewMember; +} + +struct SquareEventNotifiedUpdateSquareChatMember { + 1: string squareChatMid; + 2: SquareChatMember squareChatMember; +} + +struct SquareAuthority { + 1: string squareMid; + 2: SquareMemberRole updateSquareProfile; + 3: SquareMemberRole inviteNewMember; + 4: SquareMemberRole approveJoinRequest; + 5: SquareMemberRole createPost; + 6: SquareMemberRole createOpenSquareChat; + 7: SquareMemberRole deleteSquareChatOrPost; + 8: SquareMemberRole removeSquareMember; + 9: SquareMemberRole grantRole; + 10: SquareMemberRole enableInvitationTicket; + 11: i64 revision; + 12: SquareMemberRole createSquareChatAnnouncement; + 13: SquareMemberRole updateMaxChatMemberCount; + 14: SquareMemberRole useReadonlyDefaultChat; +} + +struct SquareEventNotifiedUpdateSquareAuthority { + 1: string squareMid; + 2: SquareAuthority squareAuthority; +} + +enum SquareFeatureControlState { + DISABLED = 1; + ENABLED = 2; +} + +struct SquareFeature { + 1: SquareFeatureControlState controlState; + 2: BooleanState booleanValue; +} + +struct SquareFeatureSet { + 1: string squareMid; + 2: i64 revision; + 11: SquareFeature creatingSecretSquareChat; + 12: SquareFeature invitingIntoOpenSquareChat; + 13: SquareFeature creatingSquareChat; + 14: SquareFeature readonlyDefaultChat; + 15: SquareFeature showingAdvertisement; + 16: SquareFeature delegateJoinToPlug; + 17: SquareFeature delegateKickOutToPlug; + 18: SquareFeature disableUpdateJoinMethod; + 19: SquareFeature disableTransferAdmin; + 20: SquareFeature creatingLiveTalk; + 21: SquareFeature disableUpdateSearchable; +} + +struct NoteStatus { + 1: i32 noteCount; + 2: i64 latestCreatedAt; +} + +struct SquareEventNotifiedCreateSquareMember { + 1: Square square; + 2: SquareAuthority squareAuthority; + 3: SquareStatus squareStatus; + 4: SquareMember squareMember; + 5: SquareFeatureSet squareFeatureSet; + 6: NoteStatus noteStatus; +} + +struct SquareChatStatus { + 3: SquareMessage lastMessage; + 4: string senderDisplayName; + 5: SquareChatStatusWithoutMessage otherStatus; +} + +enum SquareChatFeatureControlState { + DISABLED = 1; + ENABLED = 2; +} + +struct SquareChatFeature { + 1: SquareChatFeatureControlState controlState; + 2: BooleanState booleanValue; +} + +struct SquareChatFeatureSet { + 1: string squareChatMid; + 2: i64 revision; + 11: SquareChatFeature disableUpdateMaxChatMemberCount; + 12: SquareChatFeature disableMarkAsReadEvent; +} + +struct SquareEventNotifiedCreateSquareChatMember { + 1: SquareChat chat; + 2: SquareChatStatus chatStatus; + 3: SquareChatMember chatMember; + 4: i64 joinedAt; + 5: SquareMember peerSquareMember; + 6: SquareChatFeatureSet squareChatFeatureSet; +} + +struct SquareEventNotifiedUpdateSquareMemberRelation { + 1: string squareMid; + 2: string myMemberMid; + 3: string targetSquareMemberMid; + 4: SquareMemberRelation squareMemberRelation; +} + +struct SquareEventNotifiedUpdateSquareFeatureSet { + 1: SquareFeatureSet squareFeatureSet; +} + +struct SquareEventNotifiedUpdateSquareChatFeatureSet { + 1: SquareChatFeatureSet squareChatFeatureSet; +} + +struct SquareEventNotifiedUpdateSquareNoteStatus { + 1: string squareMid; + 2: NoteStatus noteStatus; +} + +struct SquareEventNotifiedUpdateSquareChatAnnouncement { + 1: string squareChatMid; + 2: i64 announcementSeq; +} + +struct SquareEventNotificationJoinRequest { + 1: string squareMid; + 2: string squareName; + 3: string requestMemberName; + 4: string profileImageObsHash; +} + +struct SquareEventNotificationMemberUpdate { + 1: string squareMid; + 2: string squareName; + 3: string profileImageObsHash; +} + +struct SquareEventNotificationSquareDelete { + 1: string squareMid; + 2: string squareName; + 3: string profileImageObsHash; +} + +struct SquareEventNotificationSquareChatDelete { + 1: string squareChatMid; + 2: string squareChatName; + 3: string profileImageObsHash; +} + +struct SquareEventNotificationMessage { + 1: string squareChatMid; + 2: SquareMessage squareMessage; + 3: string senderDisplayName; + 4: i32 unreadCount; + 5: bool requiredToFetchChatEvents; + 6: string mentionedMessageId; + 7: NotifiedMessageType notifiedMessageType; + 8: i32 reqSeq; +} + +struct SquareEventNotificationPostAnnouncement { + 1: string squareMid; + 2: string squareName; + 3: string squareProfileImageObsHash; + 4: string actionUri; +} + +enum NotificationPostType { + POST_MENTION = 2; + POST_LIKE = 3; + POST_COMMENT = 4; + POST_COMMENT_MENTION = 5; + POST_COMMENT_LIKE = 6; + POST_RELAY_JOIN = 7; +} + +struct SquareEventNotificationPost { + 1: string squareMid; + 2: NotificationPostType notificationPostType; + 3: string thumbnailObsHash; + 4: string text; + 5: string actionUri; +} + +struct SquareEventNotificationNewChatMember { + 1: string squareChatMid; + 2: string squareChatName; +} + +struct SquareEventNotificationMessageReaction { + 1: string squareChatMid; + 2: string messageId; + 3: string squareChatName; + 4: string reactorName; + 5: string thumbnailObsHash; + 6: string messageText; + 7: MessageReactionType type; +} + +struct SquareEventPayload { + 1: SquareEventReceiveMessage receiveMessage; + 2: SquareEventSendMessage sendMessage; + 3: SquareEventNotifiedJoinSquareChat notifiedJoinSquareChat; + 4: SquareEventNotifiedInviteIntoSquareChat notifiedInviteIntoSquareChat; + 5: SquareEventNotifiedLeaveSquareChat notifiedLeaveSquareChat; + 6: SquareEventNotifiedDestroyMessage notifiedDestroyMessage; + 7: SquareEventNotifiedMarkAsRead notifiedMarkAsRead; + 8: SquareEventNotifiedUpdateSquareMemberProfile notifiedUpdateSquareMemberProfile; + 9: SquareEventNotifiedUpdateSquare notifiedUpdateSquare; + 10: SquareEventNotifiedUpdateSquareMember notifiedUpdateSquareMember; + 11: SquareEventNotifiedUpdateSquareChat notifiedUpdateSquareChat; + 12: SquareEventNotifiedUpdateSquareChatMember notifiedUpdateSquareChatMember; + 13: SquareEventNotifiedUpdateSquareAuthority notifiedUpdateSquareAuthority; + 14: SquareEventNotifiedUpdateSquareStatus notifiedUpdateSquareStatus; + 15: SquareEventNotifiedUpdateSquareChatStatus notifiedUpdateSquareChatStatus; + 16: SquareEventNotifiedCreateSquareMember notifiedCreateSquareMember; + 17: SquareEventNotifiedCreateSquareChatMember notifiedCreateSquareChatMember; + 18: SquareEventNotifiedUpdateSquareMemberRelation notifiedUpdateSquareMemberRelation; + 19: SquareEventNotifiedShutdownSquare notifiedShutdownSquare; + 20: SquareEventNotifiedKickoutFromSquare notifiedKickoutFromSquare; + 21: SquareEventNotifiedDeleteSquareChat notifiedDeleteSquareChat; + 22: SquareEventNotificationJoinRequest notificationJoinRequest; + 23: SquareEventNotificationMemberUpdate notificationJoined; + 24: SquareEventNotificationMemberUpdate notificationPromoteCoadmin; + 25: SquareEventNotificationMemberUpdate notificationPromoteAdmin; + 26: SquareEventNotificationMemberUpdate notificationDemoteMember; + 27: SquareEventNotificationMemberUpdate notificationKickedOut; + 28: SquareEventNotificationSquareDelete notificationSquareDelete; + 29: SquareEventNotificationSquareChatDelete notificationSquareChatDelete; + 30: SquareEventNotificationMessage notificationMessage; + 31: SquareEventNotifiedUpdateSquareChatProfileName notifiedUpdateSquareChatProfileName; + 32: SquareEventNotifiedUpdateSquareChatProfileImage notifiedUpdateSquareChatProfileImage; + 33: SquareEventNotifiedUpdateSquareFeatureSet notifiedUpdateSquareFeatureSet; + 34: SquareEventNotifiedAddBot notifiedAddBot; + 35: SquareEventNotifiedRemoveBot notifiedRemoveBot; + 36: SquareEventNotifiedUpdateSquareNoteStatus notifiedUpdateSquareNoteStatus; + 37: SquareEventNotifiedUpdateSquareChatAnnouncement notifiedUpdateSquareChatAnnouncement; + 38: SquareEventNotifiedUpdateSquareChatMaxMemberCount notifiedUpdateSquareChatMaxMemberCount; + 39: SquareEventNotificationPostAnnouncement notificationPostAnnouncement; + 40: SquareEventNotificationPost notificationPost; + 41: SquareEventMutateMessage mutateMessage; + 42: SquareEventNotificationNewChatMember notificationNewChatMember; + 43: SquareEventNotifiedUpdateReadonlyChat notifiedUpdateReadonlyChat; + 44: SquareEventNotifiedUpdateMessageStatus notifiedUpdateMessageStatus; + 45: SquareEventNotificationMessageReaction notificationMessageReaction; + 46: SquareEventChatPopup chatPopup; + 47: SquareEventNotifiedSystemMessage notifiedSystemMessage; + 48: SquareEventNotifiedUpdateSquareChatFeatureSet notifiedUpdateSquareChatFeatureSet; +} + +struct SquareEvent { + 2: i64 createdTime; + 3: SquareEventType type; + 4: SquareEventPayload payload; + 5: string syncToken; + 6: SquareEventStatus eventStatus; +} + +struct SendMessageResponse { + 1: SquareMessage createdSquareMessage; +} + +struct UnsendMessageResponse { + 1: SquareMessage unsentMessage; +} + +struct FetchMyEventsResponse { + 1: SubscriptionState subscription; + 2: list events; + 3: string syncToken; + 4: string continuationToken; +} + +struct GetSquareEmidResponse { + 1: string squareEmid; +} + +struct GetSquareMembersBySquareResponse { + 1: list members; +} + +struct ManualRepairResponse { + 1: list events; + 2: string syncToken; + 3: string continuationToken; +} + +struct InviteIntoSquareChatResponse { + 1: list inviteeMids; +} + +struct InviteToSquareResponse { +} + +struct GetJoinedSquaresResponse { + 1: list squares; + 2: map members; + 3: map authorities; + 4: map statuses; + 5: string continuationToken; + 6: map noteStatuses; +} + +struct MarkAsReadResponse { +} + +struct ReactToMessageResponse { + 1: SquareMessageReaction reaction; + 2: SquareMessageReactionStatus status; +} + +struct FindSquareByInvitationTicketResponse { + 1: Square square; + 2: SquareMember myMembership; + 3: SquareAuthority squareAuthority; + 4: SquareStatus squareStatus; + 5: SquareFeatureSet squareFeatureSet; + 6: NoteStatus noteStatus; + 7: SquareChat chat; + 8: SquareChatStatus chatStatus; +} + +struct SubscriptionState { + 1: i64 subscriptionId; + 2: i64 ttlMillis; +} + +struct FetchSquareChatEventsResponse { + 1: SubscriptionState subscription; + 2: list events; + 3: string syncToken; + 4: string continuationToken; +} + +struct GetSquareResponse { + 1: Square square; + 2: SquareMember myMembership; + 3: SquareAuthority squareAuthority; + 4: SquareStatus squareStatus; + 5: SquareFeatureSet squareFeatureSet; + 6: NoteStatus noteStatus; +} + +struct GetJoinableSquareChatsResponse { + 1: list squareChats; + 2: string continuationToken; + 3: i32 totalSquareChatCount; + 4: map squareChatStatuses; +} + +struct CreateSquareResponse { + 1: Square square; + 2: SquareMember creator; + 3: SquareAuthority authority; + 4: SquareStatus status; + 5: SquareFeatureSet featureSet; + 6: NoteStatus noteStatus; + 7: SquareChat squareChat; + 8: SquareChatStatus squareChatStatus; + 9: SquareChatMember squareChatMember; + 10: SquareChatFeatureSet squareChatFeatureSet; +} + +struct TextMessageAnnouncementContents { + 1: string messageId; + 2: string text; + 3: string senderSquareMemberMid; + 4: i64 createdAt; + 5: string senderMid; +} + +struct SquareChatAnnouncementContents { + 1: TextMessageAnnouncementContents textMessageAnnouncementContents; +} + +struct SquareChatAnnouncement { + 1: i64 announcementSeq; + 2: SquareChatAnnouncementType type; + 3: SquareChatAnnouncementContents contents; + 4: i64 createdAt; + 5: string creator; +} + +struct GetSquareChatAnnouncementsResponse { + 1: list announcements; +} + +struct GetSquareFeatureSetResponse { + 1: SquareFeatureSet squareFeatureSet; +} + +struct GetSquareChatFeatureSetResponse { + 1: SquareChatFeatureSet squareChatFeatureSet; +} + +struct SyncSquareMembersResponse { + 1: list updatedSquareMembers; +} + +enum SquareChatThreadState { + ACTIVE = 1, + INACTIVE = 2; +} + +struct SquareChatThread { + 1: string squareChatThreadMid; + 2: string squareChatMid; + 3: string squareMid; + 4: string messageId; + 5: SquareChatThreadState state; +} + +struct GetJoinedSquareChatThreadsResponse { + 1: list squareChatThreads; + 2: string continuationToken; +} + +struct CreateSquareChatThreadResponse { + 1: SquareChatThread squareChatThread; +} + +enum SquareChatThreadeMembershipState { + ACTIVATED = 1, + DEACTIVATED = 2; +} + +struct SquareChatThreadMember { + 1: string squareMemberMid; + 2: string squareChatThreadMid; + 3: i64 revision; + 4: SquareChatThreadeMembershipState membershipState; +} + +struct GetSquareChatThreadResponse { + 1: SquareChatThread squareChatThread; + 2: SquareChatThreadMember mySquareChatThreadMember; +} + +struct JoinSquareChatThreadResponse { + 1: SquareChatThread squareChatThread; +} + + +service SquareService { + SendMessageResponse sendMessage() throws(1: SquareException e); + UnsendMessageResponse unsendSquareMessage() throws(1: SquareException e); + FetchMyEventsResponse fetchMyEvents() throws(1: SquareException e); + GetSquareEmidResponse getSquareEmid() throws(1: SquareException e); + GetSquareMembersBySquareResponse getSquareMembersBySquare() throws(1: SquareException e); + ManualRepairResponse manualRepair() throws(1: SquareException e); + InviteIntoSquareChatResponse inviteIntoSquareChat() throws(1: SquareException e); + InviteToSquareResponse inviteToSquare() throws(1: SquareException e); + GetJoinedSquaresResponse getJoinedSquares() throws(1: SquareException e); + MarkAsReadResponse markAsRead() throws(1: SquareException e); + ReactToMessageResponse reactToMessage() throws(1: SquareException e); + FindSquareByInvitationTicketResponse findSquareByInvitationTicket() throws(1: SquareException e); + FetchSquareChatEventsResponse fetchSquareChatEvents() throws(1: SquareException e); + GetSquareResponse getSquare() throws(1: SquareException e); + GetJoinableSquareChatsResponse getJoinableSquareChats() throws(1: SquareException e); + CreateSquareResponse createSquare() throws(1: SquareException e); + GetSquareChatAnnouncementsResponse getSquareChatAnnouncements() throws(1: SquareException e); + GetSquareFeatureSetResponse getSquareFeatureSet() throws(1: SquareException e); + GetSquareChatFeatureSetResponse getSquareChatFeatureSet() throws(1: SquareException e); + GetJoinedSquareChatThreadsResponse getJoinedSquareChatThreads() throws(1: SquareException e); + CreateSquareChatThreadResponse createSquareChatThread() throws(1: SquareException e); + GetSquareChatThreadResponse getSquareChatThread() throws(1: SquareException e); + JoinSquareChatThreadResponse joinSquareChatThread() throws(1: SquareException e); + SyncSquareMembersResponse syncSquareMembers() throws(1: SquareException e); +} + + +struct AcceptSpeakersResponse { +} + +struct AcceptToChangeRoleResponse { +} + +struct AcceptToListenResponse { +} + +struct AcceptToSpeakResponse { +} + +struct CancelToSpeakResponse { +} + +struct EndLiveTalkResponse { +} + +enum LiveTalkEventType { + NOTIFIED_UPDATE_LIVE_TALK_TITLE = 1; + NOTIFIED_UPDATE_LIVE_TALK_SPEAKER_SETTING = 2; + NOTIFIED_UPDATE_LIVE_TALK_ANNOUNCEMENT = 3; + NOTIFIED_UPDATE_SQUARE_MEMBER_ROLE = 4; + NOTIFIED_UPDATE_LIVE_TALK_ALLOW_REQUEST_TO_SPEAK = 5; +} + +struct LiveTalkEventNotifiedUpdateLiveTalkTitle { + 1: string title; +} + +enum LiveTalkSpeakerSetting { + LIMITED_SPEAKERS = 1; + ALL_AS_SPEAKERS = 2; +} + +struct LiveTalkEventNotifiedUpdateLiveTalkSpeakerSetting { + 1: LiveTalkSpeakerSetting speakerSetting; +} + +struct LiveTalkEventNotifiedUpdateLiveTalkAnnouncement { + 1: string announcement; +} + +struct LiveTalkEventNotifiedUpdateSquareMemberRole { + 1: string squareMemberMid; + 2: SquareMemberRole role; +} + +struct LiveTalkEventNotifiedUpdateLiveTalkAllowRequestToSpeak { + 1: bool allowRequestToSpeak; +} + +struct LiveTalkEventPayload { + 1: LiveTalkEventNotifiedUpdateLiveTalkTitle notifiedUpdateLiveTalkTitle; + 2: LiveTalkEventNotifiedUpdateLiveTalkSpeakerSetting notifiedUpdateLiveTalkSpeakerSetting; + 3: LiveTalkEventNotifiedUpdateLiveTalkAnnouncement notifiedUpdateLiveTalkAnnouncement; + 4: LiveTalkEventNotifiedUpdateSquareMemberRole notifiedUpdateSquareMemberRole; + 5: LiveTalkEventNotifiedUpdateLiveTalkAllowRequestToSpeak notifiedUpdateLiveTalkAllowRequestToSpeak; +} + +struct LiveTalkEvent { + 1: LiveTalkEventType type; + 2: LiveTalkEventPayload payload; + 3: string syncToken; +} + +struct FetchLiveTalkEventsResponse { + 1: list events; + 2: string syncToken; + 3: bool hasMore; +} + +enum LiveTalkType { + PUBLIC = 1; + PRIVATE = 2; +} + +struct LiveTalk { + 1: string squareChatMid; + 2: string sessionId; + 3: string title; + 4: LiveTalkType type; + 5: LiveTalkSpeakerSetting speakerSetting; + 6: bool allowRequestToSpeak; + 7: string announcement; + 8: i32 participantCount; + 9: i64 revision; + 10: i64 startedAt; +} + +struct FindLiveTalkByInvitationTicketResponse { + 1: string chatInvitationTicket; + 2: LiveTalk liveTalk; + 3: SquareChat chat; + 4: SquareMember squareMember; + 5: SquareChatMembershipState chatMembershipState; +} + +struct ForceEndLiveTalkResponse { +} + +struct LiveTalkSpeaker { + 1: string displayName; + 2: string profileImageObsHash; + 3: SquareMemberRole role; +} + +struct GetLiveTalkInfoForNonMemberResponse { + 1: string chatName; + 2: LiveTalk liveTalk; + 3: list speakers + 4: string chatInvitationUrl; +} + +struct GetLiveTalkInvitationUrlResponse { + 1: string invitationUrl; +} + +struct GetLiveTalkSpeakersForNonMemberResponse { + 1: list speakers; +} + +struct GetSquareInfoByChatMidResponse { + 1: string defaultChatMid; + 2: string squareName; + 3: string squareDesc; +} + +struct InviteToChangeRoleResponse { +} + +struct InviteToListenResponse { +} + +struct InviteToLiveTalkResponse { +} + +struct InviteToSpeakResponse { + 1: string inviteRequestId; +} + +struct JoinLiveTalkResponse { + 1: string hostMemberMid; + 2: string memberSessionId; + 3: string token; + 4: string proto; + 5: string voipAddress; + 6: string voipAddress6; + 7: i32 voipUdpPort; + 8: i32 voipTcpPort; + 9: string fromZone; + 10: string commParam; + 11: string orionAddress; + 12: string polarisAddress; + 13: string polarisZone; + 14: i32 polarisUdpPort; +} + +struct KickOutLiveTalkParticipantsResponse { +} + +struct RejectSpeakersResponse { +} + +struct RejectToSpeakResponse { +} + +struct ReportLiveTalkResponse { +} + +struct ReportLiveTalkSpeakerResponse { +} + +struct RequestToListenResponse { +} + +struct RequestToSpeakResponse { +} + +struct StartLiveTalkResponse { + 1: LiveTalk liveTalk; +} + +struct UpdateLiveTalkAttrsResponse { +} + +struct AcquireLiveTalkResponse { + 1: LiveTalk liveTalk; +} + + +service SquareLiveTalkService { + AcceptSpeakersResponse acceptSpeakers() throws(1: SquareException e); + AcceptToChangeRoleResponse acceptToChangeRole() throws(1: SquareException e); + AcceptToListenResponse acceptToListen() throws(1: SquareException e); + AcceptToSpeakResponse acceptToSpeak() throws(1: SquareException e); + CancelToSpeakResponse cancelToSpeak() throws(1: SquareException e); + EndLiveTalkResponse endLiveTalk() throws(1: SquareException e); + FetchLiveTalkEventsResponse fetchLiveTalkEvents() throws(1: SquareException e); + FindLiveTalkByInvitationTicketResponse findLiveTalkByInvitationTicket() throws(1: SquareException e); + ForceEndLiveTalkResponse forceEndLiveTalk() throws(1: SquareException e); + GetLiveTalkInfoForNonMemberResponse getLiveTalkInfoForNonMember() throws(1: SquareException e); + GetLiveTalkInvitationUrlResponse getLiveTalkInvitationUrl() throws(1: SquareException e); + GetLiveTalkSpeakersForNonMemberResponse getLiveTalkSpeakersForNonMember() throws(1: SquareException e); + GetSquareInfoByChatMidResponse getSquareInfoByChatMid() throws(1: SquareException e); + InviteToChangeRoleResponse inviteToChangeRole() throws(1: SquareException e); + InviteToListenResponse inviteToListen() throws(1: SquareException e); + InviteToLiveTalkResponse inviteToLiveTalk() throws(1: SquareException e); + InviteToSpeakResponse inviteToSpeak() throws(1: SquareException e); + JoinLiveTalkResponse joinLiveTalk() throws(1: SquareException e); + KickOutLiveTalkParticipantsResponse kickOutLiveTalkParticipants() throws(1: SquareException e); + RejectSpeakersResponse rejectSpeakers() throws(1: SquareException e); + RejectSpeakersResponse rejectToSpeak() throws(1: SquareException e); + ReportLiveTalkResponse reportLiveTalk() throws(1: SquareException e); + ReportLiveTalkSpeakerResponse reportLiveTalkSpeaker() throws(1: SquareException e); + RequestToListenResponse requestToListen() throws(1: SquareException e); + RequestToSpeakResponse requestToSpeak() throws(1: SquareException e); + StartLiveTalkResponse startLiveTalk() throws(1: SquareException e); + UpdateLiveTalkAttrsResponse updateLiveTalkAttrs() throws(1: SquareException e); + AcquireLiveTalkResponse acquireLiveTalk() throws(1: SquareException e); +} + +struct CreateQrCodeForSecureResponse { + 1: string callbackUrl; + 2: i32 longPollingMaxCount; + 3: i32 longPollingIntervalSec; + 4: string nonce; +} + +struct RefreshApiRetryPolicy { + 1: i64 initialDelayInMillis; + 2: i64 maxDelayInMillis; + 3: double multiplier; + 4: double jitterRate; +} + +struct TokenV3IssueResult { + 1: string accessToken; + 2: string refreshToken; + 3: i64 durationUntilRefreshInSec; + 4: RefreshApiRetryPolicy refreshApiRetryPolicy; + 5: string loginSessionId; + 6: i64 tokenIssueTimeEpochSec; +} + +struct QrCodeLoginV2Response { + 1: string certificate; + 2: string accessTokenV2; + 3: TokenV3IssueResult tokenV3IssueResult; + 4: string mid; + 9: i64 lastBindTimestamp; + 10: map metaData; +} + + +service SecondaryQrCodeLoginService { + CreateQrCodeForSecureResponse createQrCodeForSecure() throws(1: SecondaryQrCodeException e); + QrCodeLoginV2Response qrCodeLoginV2ForSecure() throws(1: SecondaryQrCodeException e); +} + + + +enum UserType { + USER = 1 + BOT = 2 +} + +struct RichString { + 1: string content; + 2: map meta; +} + +struct TargetProfileDetail { + 1: i64 snapshotTimeMillis; + 2: string profileName; + 3: string picturePath; + 4: RichString statusMessage; + 5: string musicProfile; + 6: string videoProfile; + 7: AvatarProfile avatarProfile; + 8: PictureSource pictureSource; + 9: string pictureStatus; +} + +struct UserFriendDetail { + 1: i64 createdTime; + 3: string overriddenName; + 4: i64 favoriteTime; + 6: bool hidden; + 7: string ringtone; + 8: string ringbackTone; +} + +struct BotFriendDetail { + 1: i64 createdTime; + 4: i64 favoriteTime; + 6: bool hidden; +} + +struct NotFriend { +} + +struct FriendDetail { + 1: UserFriendDetail user; + 2: BotFriendDetail bot; + 3: NotFriend notFriend; +} + +struct UserBlockDetail { + 3: bool deletedFromBlockList; +} + +struct BotBlockDetail { + 3: bool deletedFromBlockList; +} + +struct NotBlocked { +} + +struct BlockDetail { + 1: UserBlockDetail user; + 2: BotBlockDetail bot; + 3: NotBlocked notBlocked; +} + +struct RecommendationReasonSharedChat { + 1: string chatMid; +} + +struct RecommendationReasonReverseFriendByUserId { +} + +struct RecommendationReasonReverseFriendByQRCode { +} + +struct RecommendationReasonReverseFriendByPhone { +} + +struct RecommendationReason { + 1: RecommendationReasonSharedChat sharedChat; + 2: RecommendationReasonReverseFriendByUserId reverseFriendByUserId; + 3: RecommendationReasonReverseFriendByQRCode reverseFriendByQrCode; + 4: RecommendationReasonReverseFriendByPhone reverseFriendByPhone; +} + +struct Recommended { + 1: i64 createdTime; + 2: list reasons; + 4: bool hidden; +} + +struct NotRecommended { +} + +struct RecommendationDetail { + 1: Recommended recommendationDetail; + 2: NotRecommended notRecommended; +} + +struct NotificationSetting { + 1: bool mute; +} + +struct NotificationSettingEntry { + 1: NotificationSetting notificationSetting; +} + +struct GetContactV3Response { + 1: string targetUserMid; + 2: UserType userType; + 3: TargetProfileDetail targetProfileDetail; + 4: FriendDetail friendDetail; + 5: BlockDetail blockDetail; + 6: RecommendationDetail recommendationDetail; + 7: NotificationSettingEntry notificationSettingEntry; +} + +struct GetContactsV3Response { + 1: list responses; +} + +struct AddFriendByMidResponse { +} + +struct GetContactCalendarEventResponse { + 1: string targetUserMid; + 2: UserType userType; + 3: ContactCalendarEvents contactCalendarEvents; + 4: i64 snapshotTimeMillis; +} + +struct GetContactCalendarEventsResponse { + 1: list responses; +} + + + + + + + +service RelationService { + GetContactsV3Response getContactsV3() throws( + 1:RejectedException be; + 2:ServerFailureException ce; + 3:TalkException te + ); + + AddFriendByMidResponse addFriendByMid() throws( + 1:RejectedException be; + 2:ServerFailureException ce; + 3:TalkException te + ); + + GetContactCalendarEventsResponse getContactCalendarEvents() throws( + 1:RejectedException be; + 2:ServerFailureException ce; + 3:TalkException te + ); +} + + + + +enum ProductType { + STICKER = 1, + THEME = 2, + STICON = 3, +} + +enum StickerResourceType { + STATIC = 1, + ANIMATION = 2, + SOUND = 3, + ANIMATION_SOUND = 4, + POPUP = 5, + POPUP_SOUND = 6, + NAME_TEXT = 7, + PER_STICKER_TEXT = 8, +} + +enum ThemeResourceType { + STATIC = 1, + ANIMATION = 2, +} + +enum SticonResourceType { + STATIC = 1, + ANIMATION = 2, +} + +enum ImageTextStatus { + OK = 0, + PRODUCT_UNSUPPORTED = 1, + TEXT_NOT_SPECIFIED = 2, + TEXT_STYLE_UNAVAILABLE = 3, + CHARACTER_COUNT_LIMIT_EXCEEDED = 4, + CONTAINS_INVALID_WORD = 5, +} + +enum SubType { + GENERAL = 0, + CREATORS = 1, + STICON = 2, +} + +enum StickerSize { + NORMAL = 0, + BIG = 1, +} + +enum PopupLayer { + FOREGROUND = 0, + BACKGROUND = 1, +} + +enum ProductSalesState { + ON_SALE = 0, + OUTDATED_VERSION = 1, + NOT_ON_SALE = 2, +} + +enum PromotionType { + NONE = 0, + CARRIER = 1, + BUDDY = 2, + INSTALL = 3, + MISSION = 4, + MUSTBUY = 5, +} + +enum PromotionMissionType { + DEFAULT = 1, + VIEW_VIDEO = 2, +} + +enum BrandType { + PREMIUM = 1, + VERIFIED = 2, + UNVERIFIED = 3, +} + +enum EditorsPickShowcaseType { + STATIC = 0, + POPULAR = 1, + NEW_RELEASE = 2, +} + +struct Locale { + 1: required string language, + 2: required string country, +} + +struct GetProductRequest { + 1: required ProductType productType, + 2: required string productId, + 3: required string carrierCode, + 4: required bool saveBrowsingHistory, +} + +struct GetProductResponse { + 1: required ProductDetail productDetail, +} + +struct ProductDetail { + 1: required string id, + 2: required string billingItemId, + 3: required string type, + 4: required SubType subtype, + 5: required string billingCpId, + 11: required string name, + 12: required string author, + 13: required string details, + 14: required string copyright, + 15: required string notice, + 16: required PromotionInfo promotionInfo, + 21: required i64 latestVersion, + 22: required string latestVersionString, + 23: required i64 version, + 24: required string versionString, + 25: required ApplicationVersionRange applicationVersionRange, + 31: required bool owned, + 32: required bool grantedByDefault, + 41: required i32 validFor, + 42: required i64 validUntil, + 51: required bool onSale, + 52: required set salesFlag, + 53: required bool availableForPresent, + 54: required bool availableForMyself, + 61: required i32 priceTier, + 62: required Price price, + 63: required string priceInLineCoin, + 64: required Price localizedPrice, + 91: required map> images, + 92: required map attributes, + 93: required string authorId, + 94: required StickerResourceType stickerResourceType, + 95: required ProductProperty productProperty, + 96: required ProductSalesState productSalesState, + 97: required i64 installedTime, + 101: required ProductWishProperty wishProperty, + 102: required ProductSubscriptionProperty subscriptionProperty, + 103: required ProductPromotionProperty productPromotionProperty, + 104: required bool availableInCountry, + 105: required list editorsPickBanners, + 106: required bool ableToBeGivenAsPresent, + 107: required bool madeWithStickerMaker, + 108: required string customDownloadButtonLabel, +} + +struct ApplicationVersionRange { + 1: required string lowerBound, + 2: required bool lowerBoundInclusive, + 3: required string upperBound, + 4: required bool upperBoundInclusive, +} + +struct EditorsPickBannerForClient { + 1: required i64 id, + 2: required string endPageBannerImageUrl, + 3: required EditorsPickShowcaseType defaulteditorsPickShowcaseType, + 4: required bool showNewBadge, + 5: required string name, + 6: required string description, +} + +struct Price { + 1: required string currency, + 2: required string amount, + 3: required string priceString, +} + +struct ProductProperty { + 1: required StickerProperty stickerProperty, + 2: required ThemeProperty themeProperty, + 3: required SticonProperty sticonProperty, +} + +struct StickerProperty { + 1: required bool hasAnimation, + 2: required bool hasSound, + 3: required bool hasPopup, + 4: required StickerResourceType stickerResourceType, + 5: required string stickerOptions, + 6: required i32 compactStickerOptions, + 7: required string stickerHash, + 9: required list stickerIds, + 10: required ImageTextProperty nameTextProperty, + 11: required bool availableForPhotoEdit, + 12: required map stickerDefaultTexts, + 13: required StickerSize stickerSize, + 14: required PopupLayer popupLayer, + 15: required bool cpdProduct, + 16: required bool availableForCombinationSticker, +} + +struct ThemeProperty { + 1: required string thumbnail, + 2: required ThemeResourceType themeResourceType, +} + +struct SticonProperty { + 2: required list sticonIds, + 3: required bool availableForPhotoEdit, + 4: required SticonResourceType sticonResourceType, + 5: required list> endPageMainImages, +} + +struct ImageTextProperty { + 1: required ImageTextStatus status, + 2: required string plaintext, + 3: required i32 nameTextMaxCharacterCount, + 4: required string encryptedText, +} + +struct LpPromotionProperty { + 1: required string landingPageUrl, + 2: required string label, + 3: required string buttonLabel, +} + +struct ProductWishProperty { + 1: required i64 totalCount, +} + +struct ProductSubscriptionProperty { + 1: required bool availableForSubscribe, + 2: required i32 subscriptionAvailability, +} + +struct ProductPromotionProperty { + 1: required LpPromotionProperty lpPromotionProperty, +} + +struct PromotionDetail { + 1: required PromotionBuddyInfo promotionBuddyInfo, + 2: required PromotionInstallInfo promotionInstallInfo, + 3: required PromotionMissionInfo promotionMissionInfo, +} + +struct PromotionInfo { + 1: required PromotionType promotionType, + 2: required PromotionDetail promotionDetail, + 51: required PromotionBuddyInfo buddyInfo, +} + +struct PromotionBuddyInfo { + 1: required string buddyMid, + 2: required PromotionBuddyDetail promotionBuddyDetail, + 3: required bool showBanner, +} + +struct PromotionInstallInfo { + 1: required string downloadUrl, + 2: required string customUrlSchema, +} + +struct PromotionMissionInfo { + 1: required PromotionMissionType promotionMissionType, + 2: required bool missionCompleted, + 3: required string downloadUrl, + 4: required string customUrlSchema, + 5: required string oaMid, +} + +struct PromotionBuddyDetail { + 1: required string searchId, + 2: required ContactStatus contactStatus, + 3: required string name, + 4: required string pictureUrl, + 5: required string statusMessage, + 6: required BrandType brandType, +} + +struct PurchaseOrder { + 1: required string shopId, + 2: required string productId, + 5: required string recipientMid, + 11: required Price price, + 12: required bool enableLinePointAutoExchange, + 21: required Locale locale, + 31: required map presentAttributes, +} + +struct PurchaseOrderResponse { + 1: required string orderId, + 11: required map attributes, + 12: required string billingConfirmUrl, +} + +struct PurchaseRecordList { + 1: required list purchaseRecords, + 2: required i32 offset, + 3: required i32 totalSize, +} + +struct PurchaseRecord { + 1: required ProductDetail productDetail, + 11: required i64 purchasedTime, + 21: required string giver, + 22: required string recipient, + 31: required Price purchasedPrice, +} + +struct DetailedProductList { + 1: required list productList, + 2: required i32 offset, + 3: required i32 totalSize, +} + +struct CreateCombinationStickerResponse { + 1: required string id, +} + +enum ProductAvailability { + PURCHASE_ONLY = 0, + PURCHASE_OR_SUBSCRIPTION = 1, + SUBSCRIPTION_ONLY = 2, +} + +struct ProductSearchSummary { + 1: required string id, + 2: required ProductType type, + 3: required string name, + 4: required string author, + 5: required PromotionInfo promotionInfo, + 6: required i64 version, + 7: required bool newFlag, + 8: required i32 priceTier, + 9: required string priceInLineCoin, + 10: required ProductProperty property, + 11: required SubType subType, + 12: required bool onSale, + 13: required bool availableForPresent, + 14: required bool availableForPurchase, + 15: required i32 validDays, + 16: required string authorId, + 17: required bool bargainFlag, + 18: required string copyright, + 19: required ProductAvailability availability, + 20: required string interactionEventParameter, + 21: required set editorsPickIds, +} + +enum DemographicGenderType { + ALL = 0, + MALE = 1, + FEMALE = 2, +} + +enum DemographicAgeType { + ALL = 0, + AGE_0_19 = 1, + AGE_20_29 = 2, + AGE_30_39 = 3, + AGE_40_INF = 4, + AGE_40_49 = 5, + AGE_50_INF = 6, +} + +enum ShowcaseType { + POPULAR = 0, + NEW_RELEASE = 1, + EVENT = 2, + RECOMMENDED = 3, + POPULAR_WEEKLY = 4, + POPULAR_MONTHLY = 5, + POPULAR_RECENTLY_PUBLISHED = 6, + BUDDY = 7, + EXTRA_EVENT = 8, + BROWSING_HISTORY = 9, + POPULAR_TOTAL_SALES = 10, + NEW_SUBSCRIPTION = 11, + POPULAR_SUBSCRIPTION_30D = 12, + CPD_STICKER = 13, + POPULAR_WITH_FREE = 14, +} + +struct DemographicType { + 1: required DemographicGenderType demographicGenderType, + 2: required DemographicAgeType demographicAgeType, + 3: required bool defaultOrder, +} + +struct ShowcaseV3 { + 1: required list productList, + 2: required string continuationToken, + 3: required i64 totalSize, + 4: required ShowcaseType showcaseType, + 5: required ProductType productType, + 6: required SubType subType, + 7: required DemographicType demographicType, +} + +struct StickerIdRange { + 1: required i64 start, + 2: required i32 size, +} + +struct StickerSummary { + 1: required list stickerIdRanges, + 2: required i64 suggestVersion, + 3: required string stickerHash, + 4: required bool defaultDisplayOnKeyboard, + 5: required StickerResourceType stickerResourceType, + 6: required ImageTextProperty nameTextProperty, + 7: required bool availableForPhotoEdit, + 8: required PopupLayer popupLayer, + 9: required StickerSize stickerSize, + 10: required bool availableForCombinationSticker, +} + +struct ThemeSummary { + 1: required string imagePath, + 2: required i64 version, + 3: required string versionString, +} + +struct SticonSummary { + 1: required i64 suggestVersion, + 2: required bool availableForPhotoEdit, + 3: required SticonResourceType sticonResourceType, +} + +struct ProductTypeSummary { + 1: required StickerSummary stickerSummary, + 2: required ThemeSummary themeSummary, + 3: required SticonSummary sticonSummary, +} + +struct ProductSummary { + 1: required string id, + 11: required string name, + 21: required i64 latestVersion, + 25: required ApplicationVersionRange applicationVersionRange, + 32: required bool grantedByDefault, + 92: required map attributes, + 93: required ProductTypeSummary productTypeSummary, + 94: required i64 validUntil, + 95: required i32 validFor, + 96: required i64 installedTime, + 97: required ProductAvailability availability, + 98: required string authorId, + 99: required bool canAutoDownload, + 100: required PromotionInfo promotionInfo, +} + +struct ProductSummaryList { + 1: required list productList, + 2: required i32 offset, + 3: required i32 totalSize, +} + +struct ProductValidationScheme { + 10: required string key, + 11: required i64 offset, + 12: required i64 size, +} + +struct ProductValidationResult { + 1: required bool validated, +} + +struct ShopUpdates { + 1: required string shopId, + 11: required i64 latestUpdateTime, +} + +struct SearchProductsV2Response { + 1: required list results, + 2: required string continuationToken, + 3: required i64 totalSize, +} + +struct EditorsPickBanner { + 1: required i64 id, + 2: required string imageUrl, + 3: required string homeBannerImageUrl, + 4: required string showcaseBannerImageUrl, + 5: required list enableEditorsPickShowcaseTypes, + 6: required EditorsPickShowcaseType defaulteditorsPickShowcaseType, + 7: required string homeBannerV2ImageUrl, + 8: required string name, + 9: required bool containsProducts, + 10: required i64 displayPeriodBegin, + 11: required string description, + 12: required bool showNewBadge, +} + +struct AuthorForShowcase { + 1: required i64 authorId, + 2: required list productList, + 3: required i64 productTotalSize, +} + +struct ImageSearchSummary { + 1: required string imageId, + 2: required ProductSearchSummary product, +} + +struct KeywordImageList { + 1: required string tagId, + 2: required string keyword, + 3: required list imageList, +} + +struct URLItem { + 1: required string title, + 2: required string imageUrl, + 3: required string url, +} + +struct EditorsPickContent { + 1: required URLItem urlItem, + 2: required ProductDetail productDetail, +} + +enum EditorsPickContentType { // ContentType + STICKER = 1, + URL = 2, + THEME = 3, + EMOJI = 4, +} + +struct EditorsPick { + 1: required EditorsPickContentType contentType, + 2: required EditorsPickContent editorsPickContent, +} + +struct EditorsPickTab { + 1: required i64 editorsPickId, + 2: required string name, + 3: required ShowcaseType showcaseType, +} + +struct EditorsPickShowcase { + 1: required i64 id, + 2: required string name, + 3: required EditorsPickBanner banner, + 4: required list editorsPicks, + 5: required string continuationToken, + 6: required i32 totalSize, + 7: required string description, + 8: required EditorsPickShowcaseType type, + 9: required list tabs, +} + +struct Category { + 1: required i64 id, + 11: required string name, + 12: required bool newFlag, + 13: required i32 productCount, + 14: required string thumbnailUrl, +} + +enum TagType { + UNKNOWN = 0, + CHARACTER = 1, + TASTE = 2, +} + +struct Tag { + 1: required i64 id, + 11: required string name, + 12: required TagType tagType, + 13: required i32 productCount, + 14: required string thumbnailUrl, +} + +struct ProductList { + 1: required list productList, + 2: required i32 offset, + 3: required i32 totalSize, + 11: required string title, +} + +struct CategoryProductList { + 1: required Category category, + 2: required ProductList productList, +} + +struct AggregatedHomeV2Response { + 1: required list showcases, + 2: required list editorsPickBanners, + 3: required list authorList, + 4: required list keywordStickerList, + 5: required EditorsPickShowcase detailedEditorsPick, + 6: required list detailedCategoryList, + 7: required list categoryList, + 8: required list tagList, +} + +enum CategoryType { + GENERAL_CATEGORY = 1, + CREATORS_TAG = 2, +} + +struct AggregatedCategory { + 1: required i64 id, + 2: required CategoryType categoryType, + 3: required string name, + 4: required i32 productCount, + 5: required string thumbnailUrl, +} + +struct ListContentData { + 1: required ShowcaseV3 showcase, + 2: required list editorsPickBanners, + 3: required list categories, +} + +struct ListContent { + 1: required ListContentData contentData, + 2: required string localizedTitle, + 3: required string tsKey, + 4: required string moreLinkFragment, +} + +struct AggregatedHomeNativeResponse { + 1: required list listContents, +} + +struct DynamicHomeNativeResponse { + 1: required list listContents, +} + +struct TagsProductList { + 1: required Tag tasteTag, + 2: required Tag characterTag, + 3: required list products, +} + +struct AggregatedPremiumHomeResponse { + 1: required list showcases, + 2: required list editorsPickBanners, + 3: required AuthorForShowcase popularCreator, + 4: required TagsProductList featuredCategory, + 5: required list categoryList, + 6: required ShowcaseV3 browsingHistory, + 7: required ShowcaseV3 subscriptionSlotHistory, +} + +struct AggregatedShowcaseV4 { + 1: required list showcases, +} + +struct GetRecommendationResponse { + 1: required list results, + 2: required string continuationToken, + 3: required i64 totalSize, +} + +struct AuthorListResponse { + 1: required list authorList, + 2: required i64 totalSize, + 3: required string continuationToken, +} + +struct ProductResourceType { + 1: required StickerResourceType stickerResourceType, + 2: required ThemeResourceType themeResourceType, + 3: required SticonResourceType sticonResourceType, +} + +struct LatestProductByAuthorItem { + 1: required string productId, + 2: required string displayName, + 3: required i64 version, + 4: required bool newFlag, + 5: required ProductResourceType productResourceType, + 6: required PopupLayer popupLayer, +} + +struct LatestProductsByAuthorResponse { + 1: required i64 authorId, + 2: required string author, + 3: required list items, +} + +struct GetExperimentsResponse { + 1: required map variables, +} + +struct ProductSummaryForAutoSuggest { + 1: required string id, + 2: required i64 version, + 3: required string name, + 4: required StickerResourceType stickerResourceType, + 5: required i64 suggestVersion, + 6: required PopupLayer popupLayer, + 7: required ProductType type, + 8: required ProductResourceType resourceType, + 9: required StickerSize stickerSize, +} + +struct AutoSuggestionShowcaseResponse { + 1: required list productList, + 2: required i64 totalSize, +} + +struct SuggestResource { + 1: required string dataUrl, + 2: required i64 version, + 3: required i64 updatedTime, +} + +struct SuggestDictionarySetting { + 1: required string language, + 2: required string name, + 3: required bool preload, + 4: required SuggestResource suggestResource, + 5: required map patch, + 6: required SuggestResource suggestTagResource, + 7: required map tagPatch, + 8: required SuggestResource corpusResource, +} + +struct GetSuggestDictionarySettingResponse { + 1: required list results, +} + +struct GetRecommendOaResponse { + 1: required list buddyMids, +} + +struct GetSuggestResourcesResponse { + 1: required map suggestResources, +} + +struct GetSuggestResourcesV2Response { + 1: required map suggestResources, +} + +struct GetTagClusterFileResponse { + 1: required string path, + 2: required i64 updatedTimeMillis, +} + +struct GetResourceFileReponse { + 1: required GetTagClusterFileResponse tagClusterFileResponse, +} + +struct BrowsingHistory { + 1: required ProductSearchSummary productSearchSummary, + 2: required i64 browsingTime, +} + +struct GetBrowsingHistoryResponse { + 1: required list browsingHistory, + 2: required string continuationToken, + 3: required i32 totalSize, +} + +struct DeleteAllBrowsingHistoryResponse { +} + +struct SticonProductMapping { + 1: required string productId, + 2: required string oldProductId, + 3: required map newToOldSticonIdMapping, + 4: required i32 oldPackageVersion, + 5: required i32 oldMetaVersion, + 6: required i64 stickerPackageId, + 7: required i32 stickerPackageVersion, + 8: required map stickerIds, +} + +struct GetOldSticonMappingResponse { + 1: required list sticonProductMappings, + 2: required i64 updatedTimeMillis, + 3: required bool updated, +} + +struct SimilarImageShowcase { + 1: required ImageSearchSummary chosenImage, + 2: required list similarImageList, + 3: required string continuationToken, +} + +struct CustomizeImageTextResponse { + 1: required ImageTextProperty nameTextProperty, +} + +enum SubscriptionPlanAvailability { + AVAILABLE = 0, + DIFFERENT_STORE = 1, + NOT_STUDENT = 2, + ALREADY_PURCHASED = 3, +} + +enum SubscriptionServiceType { + STICKERS_PREMIUM = 1, +} + +enum SubscriptionPlanTarget { + GENERAL = 1, + STUDENT = 2, +} + +enum SubscriptionPlanType { + MONTHLY = 1, + YEARLY = 2, +} + +enum SubscriptionPlanTier { + BASIC = 1, + DELUXE = 2, +} + +enum SubscriptionSlotModificationResult { + OK = 0, + UNKNOWN = 1, + NO_SUBSCRIPTION = 2, + EXISTS = 3, + NOT_FOUND = 4, + EXCEEDS_LIMIT = 5, + NOT_AVAILABLE = 6, +} + +enum SubscriptionBillingResult { + OK = 0, + UNKNOWN = 1, + NOT_SUPPORTED = 2, + NO_SUBSCRIPTION = 3, + SUBSCRIPTION_EXISTS = 4, + NOT_AVAILABLE = 5, + CONFLICT = 6, + OUTDATED_VERSION = 7, + NO_STUDENT_INFORMATION = 8, + ACCOUNT_HOLD = 9, + RETRY_STATE = 10, +} + +enum SubscriptionCampaignType { + MISSION = 1, + FREE_TRIAL = 2, +} + +enum SubscriptionSortType { + DATE_ASC = 1, + DATE_DESC = 2, +} + +enum StartBundleSubscriptionResult { + OK = 0, + UNKNOWN = 1, + INVALID_PARAMETER = 2, + NOT_ELIGIBLE = 3, + CONFLICT = 4, + ACCOUNT_HOLD = 5, + RETRY_STATE = 6, +} + +enum StopBundleSubscriptionResult { + OK = 0, + INVALID_PARAMETER = 1, + NOT_FOUND = 2, + NOT_SUPPORTED = 3, + CONFLICT = 4, + NOT_ELIGIBLE = 5, +} + +enum GetSubscriptionCouponCodeResult { + OK = 0, + UNKNOWN = 1, + NOT_SUPPORTED = 2, + NOT_AVAILABLE = 3, + NOT_APPLICABLE = 4, +} + +enum GetFriendStatusWithPremiumOaResult { + FRIEND = 0, + BLOCKED = 1, + NOT_FRIEND = 2, + ERROR = 3, +} + +enum SubscriptionCouponCampaignStatus { + OK = 0, + UNKNOWN = 1, + NOT_SUPPORTED = 2, + NOT_ACTIVE = 3, + NOT_APPLICABLE = 4, +} + +enum AcceptSubscriptionAgreementResult { + OK = 0, + UNKNOWN = 1, + NOT_SUPPORTED = 2, + NO_SUBSCRIPTION = 3, +} + +enum StoreCode { + GOOGLE = 0, + APPLE = 1, + WEBSTORE = 2, + LINEMO = 3, + LINE_MUSIC = 4, + LYP = 5, + TW_CHT = 6, + FREEMIUM = 7, +} + +struct SubscriptionPlan { + 1: required string billingItemId, + 2: required SubscriptionServiceType subscriptionService, + 3: required SubscriptionPlanTarget target, + 4: required SubscriptionPlanType type, + 5: required string period, + 6: required string freeTrial, + 7: required string localizedName, + 8: required Price price, + 9: required SubscriptionPlanAvailability availability, + 10: required string cpId, + 11: required string nameKey, + 12: required SubscriptionPlanTier tier, +} + +struct GetSubscriptionPlansResponse { + 1: required list plans, +} + +struct SubscriptionStatus { + 1: required string billingItemId, + 2: required SubscriptionServiceType subscriptionService, + 3: required string period, + 4: required string localizedName, + 5: required bool freeTrial, + 6: required bool expired, + 7: required i64 validUntil, + 8: required i32 maxSlotCount, + 9: required SubscriptionPlanTarget target, + 10: required SubscriptionPlanType type, + 11: required StoreCode storeCode, + 12: required string nameKey, + 13: required SubscriptionPlanTier tier, + 14: required bool accountHold, + 15: required map maxSlotCountsByProductType, + 16: required bool agreementAccepted, +} + +struct GetSubscriptionStatusResponse { + 1: required map subscriptions, + 2: required bool hasValidStudentInformation, + 3: required map> otherOwnedSubscriptions, +} + +struct GetProductSummariesInSubscriptionSlotsResponse { + 1: required list products, + 2: required string continuationToken, + 3: required i64 totalSize, + 4: required i32 maxSlotCount, +} + +struct AddProductToSubscriptionSlotResponse { + 1: required SubscriptionSlotModificationResult result, +} + +struct AddThemeToSubscriptionSlotResponse { + 1: required SubscriptionSlotModificationResult result, +} + +struct RemoveProductFromSubscriptionSlotResponse { + 1: required SubscriptionSlotModificationResult result, +} + +struct PurchaseSubscriptionResponse { + 1: required SubscriptionBillingResult result, + 2: required string orderId, + 3: required string confirmUrl, +} + +struct ChangeSubscriptionResponse { + 1: required SubscriptionBillingResult result, + 2: required string orderId, + 3: required string confirmUrl, +} + +struct RestoreSubscriptionResponse { + 1: required SubscriptionBillingResult result, + 2: required string orderId, + 3: required string confirmUrl, +} + +struct GetProductsByTagsV2Response { + 1: required list results, + 2: required string continuationToken, + 3: required i64 totalSize, +} + +struct StudentInformation { + 1: required string schoolName, + 2: required string graduationDate, +} + +struct GetStudentInformationResponse { + 1: required StudentInformation studentInformation, + 2: required bool isValid, +} + +struct SaveStudentInformationResponse { +} + +struct PurchasedSubscription { + 1: required string orderId, + 2: required SubscriptionServiceType subscriptionService, + 3: required string billingItemId, + 4: required SubscriptionPlanType type, + 5: required string localizedName, + 6: required i64 purchasedTime, + 7: required i64 validUntil, + 8: required Price price, + 9: required string nameKey, + 10: required SubscriptionPlanTier tier, +} + +struct GetPurchasedSubscriptionsResponse { + 1: required list subscriptions, + 2: required string continuationToken, + 3: required i64 totalSize, +} + +struct FindRestorablePlanResponse { + 1: required SubscriptionBillingResult result, + 2: required string billingItemId, + 3: required string storeOrderId, + 4: required string originalStoreOrderId, + 5: required string orderId, + 6: required string mid, +} + +struct SubscriptionMissionCampaign { + 1: required ProductType productType, + 2: required string productId, +} + +struct SubscriptionCampaignPayload { + 1: required SubscriptionMissionCampaign mission, +} + +struct SubscriptionCampaign { + 1: required string campaignId, + 2: required i64 fromInclusive, + 3: required i64 toExclusive, + 4: required SubscriptionCampaignType type, + 5: required SubscriptionCampaignPayload payload, +} + +struct GetSubscriptionCampaignsResponse { + 1: required list campaigns, +} + +struct GetSubscriptionRecommendationsResponse { + 1: required list products, +} + +struct InteractionEventResponse { + 1: required i32 responseStatus, +} + +struct LibraExperiment { + 1: required string experimentId, + 2: required string groupId, +} + +struct GetExperimentsV2Response { + 1: required map experiments, +} + +enum BirthdayGiftAssociationVerifyTokenStatus { + VALID = 0, + INVALID = 1, +} + +struct BirthdayGiftAssociationVerifyResponse { + 1: required BirthdayGiftAssociationVerifyTokenStatus tokenStatus, + 2: required string recipientUserMid, +} + +struct SubscriptionSlotHistory { + 1: required ProductSearchSummary product, + 2: required i64 addedTime, + 3: required i64 removedTime, +} + +struct GetSubscriptionSlotHistoryResponse { + 1: required list history, + 2: required string continuationToken, + 3: required i64 totalSize, +} + +struct PopupDisplaySettings { + 1: required set pages, + 2: required set editorsPickIds, +} + +struct PopupPage { + 1: required string imageUrl, + 2: required string title, + 3: required string body, +} + +struct PopupActionButton { + 1: required string label, + 2: required string actionUrl, + 3: required string textColorCode, + 4: required string backgroundColorCode, +} + +struct PopupDismissButton { + 1: required string label, + 2: required string textColorCode, + 3: required string backgroundColorCode, +} + +struct PopupContent { + 1: required list pages, + 2: required PopupActionButton actionButton, + 3: required PopupDismissButton dismissButton, +} + +enum PopupDesignTemplate { + FIXED = 0, +} + +enum PopupDisplayCount { + ONCE = 0, +} + +enum PopupVisualType { + BASIC = 0, + FULLSCREEN = 1, +} + +struct ShopPopup { + 1: required string popupId, + 2: required PopupDisplaySettings displaySettings, + 3: required PopupDisplayCount displayCount, + 4: required PopupContent content, + 5: required i32 displayPriority, + 6: required PopupVisualType visualType, + 7: required i32 displayIntervalInDays, +} + +struct GetPopupsResponse { + 1: required list popups, +} + +struct GetSubscriptionSlotStatusResponse { + 1: required set productIdsInSlots, + 2: required i32 usedSlotCount, + 3: required i32 maxSlotCount, +} + +struct GetProductKeyboardListResponse { + 1: required ProductType productType, + 2: required list keyboardProductIds, +} + +struct GetMusicSubscriptionStatusResponse { + 1: required i64 validUntil, + 2: required bool expired, + 3: required bool isStickersPremiumEnabled, +} + +struct StartBundleSubscriptionResponse { + 1: required StartBundleSubscriptionResult result, +} + +struct StopBundleSubscriptionResponse { + 1: required StopBundleSubscriptionResult result, +} + +struct GetSubscriptionCouponCodeResponse { + 1: required GetSubscriptionCouponCodeResult result, + 2: required string couponCode, +} + +struct GetSubscriptionCouponCampaignResponse { + 1: required SubscriptionCouponCampaignStatus status, +} + +struct PopupModel { + 1: required string popupId, + 2: required bool active, +} + +struct GetPopupDisplayStatusResponse { + 1: required map popups, +} + +struct GetFilteredProductsResponse { + 1: required list results, + 2: required string continuationToken, + 3: required i64 totalSize, +} + +struct GetProductLatestVersionForUserResponse { + 1: required i64 latestVersion, + 2: required string latestVersionString, +} + +struct GetSubscriptionAgreementStatusResponse { + 1: required bool accepted, +} + +struct AcceptSubscriptionAgreementResponse { + 1: required AcceptSubscriptionAgreementResult result, +} + +struct ShouldShowWelcomeStickerBannerResponse { + 1: required bool shouldShowBanner, +} + + +service ShopService { + CreateCombinationStickerResponse createCombinationSticker() throws(1: ShopException e), + GetProductResponse getProductV2() throws(1: ShopException e), + PurchaseOrderResponse placePurchaseOrderForFreeProduct() throws(1: ShopException e), + PurchaseOrderResponse placePurchaseOrderWithLineCoin() throws(1: ShopException e), + void canReceivePresent() throws(1: ShopException e), + PurchaseRecordList getSentPresents() throws(1: ShopException e), + PurchaseRecordList getPurchasedProducts() throws(1: ShopException e), + PurchaseRecordList getReceivedPresents() throws(1: ShopException e), + DetailedProductList getOwnedProducts() throws(1: ShopException e), + ShowcaseV3 getShowcaseV3() throws(1: ShopException e), + ProductDetail getProduct() throws(1: ShopException e), + ProductDetail getProductByVersion() throws(1: ShopException e), + PurchaseOrderResponse placePurchaseOrderWithIAP() throws(1: ShopException e), + ProductSummaryList getOwnedProductSummaries() throws(1: ShopException e), + void notifyProductEvent() throws(1: ShopException e), + ProductValidationScheme getProductValidationScheme() throws(1: ShopException e), + ProductValidationResult validateProduct() throws(1: ShopException e), + DetailedProductList getProductsByBillingItemId() throws(1: ShopException e), + ShopUpdates getUpdates() throws(1: ShopException e), + SearchProductsV2Response searchProductsV2() throws(1: ShopException e), + AggregatedHomeV2Response getAggregatedHomeV2() throws(1: ShopException e), + AggregatedHomeNativeResponse getAggregatedHomeNative() throws(1: ShopException e), + DynamicHomeNativeResponse getDynamicHomeNative() throws(1: ShopException e), + AggregatedPremiumHomeResponse getAggregatedPremiumHome() throws(1: ShopException e), + AggregatedShowcaseV4 getAggregatedShowcaseV4() throws(1: ShopException e), + ProductList getRecommendationForUser() throws(1: ShopException e), + GetRecommendationResponse getRecommendationList() throws(1: ShopException e), + list getCategories() throws(1: ShopException e), + ProductList getProductsByCategory() throws(1: ShopException e), + list getTags() throws(1: ShopException e), + ProductList getProductsByTags() throws(1: ShopException e), + void buyMustbuyProduct() throws(1: ShopException e), + ProductList getProductsByAuthor() throws(1: ShopException e), + AuthorListResponse getAuthorList() throws(1: ShopException e), + LatestProductsByAuthorResponse getAuthorsLatestProducts() throws(1: ShopException e), + EditorsPickShowcase getEditorsPickShowcase() throws(1: ShopException e), + GetExperimentsResponse getExperiments() throws(1: ShopException e), + AutoSuggestionShowcaseResponse getAutoSuggestionShowcase() throws(1: ShopException e), + GetSuggestDictionarySettingResponse getSuggestDictionarySetting() throws(1: ShopException e), + GetRecommendOaResponse getRecommendOa() throws(1: ShopException e), + GetSuggestResourcesResponse getSuggestResources() throws(1: ShopException e), + GetSuggestResourcesV2Response getSuggestResourcesV2() throws(1: ShopException e), + GetResourceFileReponse getResourceFile() throws(1: ShopException e), + GetBrowsingHistoryResponse getBrowsingHistory() throws(1: ShopException e), + DeleteAllBrowsingHistoryResponse deleteAllBrowsingHistory() throws(1: ShopException e), + GetOldSticonMappingResponse getOldSticonMapping() throws(1: ShopException e), + void sendReport() throws(1: ShopException e), + SimilarImageShowcase getSimilarImageShowcase() throws(1: ShopException e), + CustomizeImageTextResponse previewCustomizedImageText() throws(1: ShopException e), + CustomizeImageTextResponse setCustomizedImageText() throws(1: ShopException e), + GetSubscriptionPlansResponse getSubscriptionPlans() throws(1: ShopException e), + GetSubscriptionStatusResponse getSubscriptionStatus() throws(1: ShopException e), + GetProductSummariesInSubscriptionSlotsResponse getProductSummariesInSubscriptionSlots() throws(1: ShopException e), + AddProductToSubscriptionSlotResponse addProductToSubscriptionSlot() throws(1: ShopException e), + AddThemeToSubscriptionSlotResponse addThemeToSubscriptionSlot() throws(1: ShopException e), + RemoveProductFromSubscriptionSlotResponse removeProductFromSubscriptionSlot() throws(1: ShopException e), + PurchaseSubscriptionResponse purchaseSubscription() throws(1: ShopException e), + ChangeSubscriptionResponse changeSubscription() throws(1: ShopException e), + RestoreSubscriptionResponse restoreSubscription() throws(1: ShopException e), + GetProductsByTagsV2Response getProductsByTagsV2() throws(1: ShopException e), + GetStudentInformationResponse getStudentInformation() throws(1: ShopException e), + SaveStudentInformationResponse saveStudentInformation() throws(1: ShopException e), + ShowcaseV3 getSubscriptionShowcase() throws(1: ShopException e), + GetPurchasedSubscriptionsResponse getPurchasedSubscriptions() throws(1: ShopException e), + FindRestorablePlanResponse findRestorablePlan() throws(1: ShopException e), + GetSubscriptionCampaignsResponse getSubscriptionCampaigns() throws(1: ShopException e), + GetSubscriptionRecommendationsResponse getSubscriptionRecommendations() throws(1: ShopException e), + InteractionEventResponse produceInteractionEvent() throws(1: ShopException e), + GetExperimentsV2Response getExperimentsV2() throws(1: ShopException e), + BirthdayGiftAssociationVerifyResponse verifyBirthdayGiftAssociationToken() throws(1: ShopException e), + GetSubscriptionSlotHistoryResponse getSubscriptionSlotHistory() throws(1: ShopException e), + GetPopupsResponse getPopups() throws(1: ShopException e), + GetSubscriptionSlotStatusResponse getSubscriptionSlotStatus() throws(1: ShopException e), + GetProductKeyboardListResponse getProductKeyboardGlobalSetting() throws(1: ShopException e), + GetMusicSubscriptionStatusResponse getMusicSubscriptionStatus() throws(1: ShopException e), + StartBundleSubscriptionResponse startBundleSubscription() throws(1: ShopException e), + StopBundleSubscriptionResponse stopBundleSubscription() throws(1: ShopException e), + GetSubscriptionCouponCodeResponse getSubscriptionCouponCode() throws(1: ShopException e), + GetSubscriptionCouponCampaignResponse getSubscriptionCouponCampaign() throws(1: ShopException e), + GetPopupDisplayStatusResponse getPopupDisplayStatus() throws(1: ShopException e), + GetFilteredProductsResponse getFilteredProducts() throws(1: ShopException e), + GetProductLatestVersionForUserResponse getProductLatestVersionForUser() throws(1: ShopException e), + GetSubscriptionAgreementStatusResponse getSubscriptionAgreementStatus() throws(1: ShopException e), + AcceptSubscriptionAgreementResponse acceptSubscriptionAgreement() throws(1: ShopException e), + ShouldShowWelcomeStickerBannerResponse shouldShowWelcomeStickerBanner() throws(1: ShopException e), +} + +struct StickerDisplayData { + 1: required string stickerHash, + 2: required StickerResourceType stickerResourceType, + 3: required ImageTextProperty nameTextProperty, + 4: required PopupLayer popupLayer, + 5: required StickerSize stickerSize, + 6: required ProductAvailability productAvailability, + 7: required i32 height, + 8: required i32 width, + 9: required i64 version, + 10: required bool availableForCombinationSticker, +} + +struct DisplayData { + 1: required StickerDisplayData stickerSummary, +} + +struct CollectionItem { + 1: required string itemId, + 2: required string productId, + 3: required DisplayData displayData, + 4: required i32 sortId, +} + +struct Collection { + 1: required string collectionId, + 2: required list items, + 3: required ProductType productType, + 4: required i64 createdTimeMillis, + 5: required i64 updatedTimeMillis, +} + +struct GetUserCollectionsResponse { + 1: required list collections, + 2: required bool updated, +} + +struct CreateCollectionForUserResponse { + 1: required Collection collection, +} + +struct AddItemToCollectionResponse { +} + +struct RemoveItemFromCollectionResponse { +} + +struct IsProductForCollectionsResponse { + 1: required bool isAvailable, +} + + +service ShopCollectionService { + GetUserCollectionsResponse getUserCollections() throws(1: ShopException e), + CreateCollectionForUserResponse createCollectionForUser() throws(1: ShopException e), + AddItemToCollectionResponse addItemToCollection() throws(1: ShopException e), + RemoveItemFromCollectionResponse removeItemFromCollection() throws(1: ShopException e), + IsProductForCollectionsResponse isProductForCollections() throws(1: ShopException e), +} \ No newline at end of file diff --git a/server/line_deno.js b/server/line_deno.js new file mode 100644 index 0000000..828df76 --- /dev/null +++ b/server/line_deno.js @@ -0,0 +1,1357 @@ +import write from "./write_deno.js"; +import read from "./read_deno.js"; +import { TBinaryProtocol, TCompactProtocol } from "npm:thrift@0.20.0"; +import { Buffer } from "node:buffer"; +import ThriftRenameParser from "../site/js/thrift/rename_thrift.js"; +import PinVerifier from "./pinVerifier.js"; +import thriftJson from "./thriftJson.js" + +TBinaryProtocol.genHeader = (name) => { + return Buffer.from([ + 0x80, + 1, + 0, + 1, + 0, + 0, + 0, + name.length, + ...Buffer.from(name), + 0, + 0, + 0, + 0, + ]); +}; +TCompactProtocol.genHeader = (name) => { + return Buffer.from([ + 0x82, + 0x21, + 0, + name.length, + ...Buffer.from(name), + ]); +}; + +const Protocols = { + 4: TCompactProtocol, + 3: TBinaryProtocol, + 0: Buffer, +}; +class SquareServise { + SquareService_API_PATH = "/SQ1"; + SquareService_P_TYPE = 4; + async getJoinedSquares(limit = 50, continuationToken) { + return await this.request( + [[11, 2, continuationToken], [8, 3, limit]], + "getJoinedSquares", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async inviteIntoSquareChat(inviteeMids, squareChatMid) { + return await this.request( + [[15, 1, [11, inviteeMids]], [11, 2, squareChatMid]], + "inviteIntoSquareChat", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async inviteToSquare(squareMid, invitees, squareChatMid) { + return await this.request( + [[11, 2, squareMid], [15, 3, [11, invitees]], [ + 11, + 4, + squareChatMid, + ]], + "inviteToSquare", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async markAsRead(squareChatMid, messageId) { + return await this.request( + [[11, 2, squareChatMid], [11, 4, messageId]], + "markAsRead", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async reactToMessage(squareChatMid, messageId, reactionType = 2) { + /* + reactionType + ALL = 0, + UNDO = 1, + NICE = 2, + LOVE = 3, + FUN = 4, + AMAZING = 5, + SAD = 6, + OMG = 7, + */ + return await this.request( + [ + [8, 1, 0], + [11, 2, squareChatMid], + [11, 3, messageId], + [8, 4, reactionType], + ], + "reactToMessage", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async findSquareByInvitationTicket(invitationTicket) { + return await this.request( + [[11, 2, invitationTicket]], + "findSquareByInvitationTicket", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async fetchMyEvents( + syncToken = undefined, + limit = 100, + continuationToken = undefined, + subscriptionId, + ) { + return await this.request( + [ + [10, 1, subscriptionId], + [11, 2, syncToken], + [8, 3, limit], + [11, 4, continuationToken], + ], + "fetchMyEvents", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async fetchSquareChatEvents( + squareChatMid, + syncToken = undefined, + continuationToken = undefined, + subscriptionId = 0, + limit = 100, + ) { + return await this.request( + [ + [10, 1, subscriptionId], + [11, 2, squareChatMid], + [11, 3, syncToken], + [8, 4, limit], + [8, 5, 1], + [8, 6, 1], + [11, 7, continuationToken], + [8, 8, 1], + ], + "fetchSquareChatEvents", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async sendSquareMessage( + squareChatMid, + text = "test Message", + contentType = 0, + contentMetadata = {}, + relatedMessageId = undefined, + ) { + const msg = [ + [11, 2, squareChatMid], + [11, 10, text], + [8, 15, contentType], + [13, 18, [11, 11, contentMetadata]], + ]; + if (relatedMessageId) { + msg.push( + [11, 21, relatedMessageId], + [8, 22, 3], + [8, 24, 2], + ); + } + return await this.request( + [ + [8, 1, 0], + [11, 2, squareChatMid], + [ + 12, + 3, + [ + [12, 1, msg], + [8, 3, 4], + ], + ], + ], + "sendMessage", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquare(squareMid) { + return await this.request( + [[11, 2, squareMid]], + "getSquare", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + async getSquareChat(squareChatMid) { + return await this.request( + [[11, 1, squareChatMid]], + "getSquareChat", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + async getJoinableSquareChats( + squareMid, + continuationToken = undefined, + limit = 100, + ) { + return await this.request( + [[11, 1, squareMid], [11, 10, continuationToken], [8, 11, limit]], + "getJoinableSquareChats", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async createSquare( + name = "TEST Square", + displayName = "Tester", + profileImageObsHash = + "0h6tJf0hQsaVt3H0eLAsAWDFheczgHd3wTCTx2eApNKSoefHNVGRdwfgxbdgUMLi8MSngnPFMeNmpbLi8MSngnPFMeNmpbLi8MSngnOA", + desc = "test with LINE-Deno-Client", + searchable = true, + SquareJoinMethodType = 0, + ) { + /* + SquareJoinMethodType + NONE(0), + APPROVAL(1), + CODE(2); + */ + return await this.request( + [ + [8, 2, 0], + [ + 12, + 2, + [ + [11, 2, name], + [11, 4, profileImageObsHash], + [11, 5, desc], + [2, 6, searchable], + [8, 7, 1], // type + [8, 8, 1], // categoryId + [10, 10, 0], // revision + [2, 11, true], // ableToUseInvitationTicket + [12, 14, [[8, 1, SquareJoinMethodType]]], + [2, 15, false], // adultOnly + [15, 16, [11, []]], // svcTags + ], + ], + [ + 12, + 3, + [ + [11, 3, displayName], + // [11, 4, profileImageObsHash], + [2, 5, true], // ableToReceiveMessage + [10, 9, 0], // revision + ], + ], + ], + "createSquare", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquareChatAnnouncements(squareChatMid) { + return await this.request( + [[11, 2, squareChatMid]], + "getSquareChatAnnouncements", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async updateSquareFeatureSet( + updateAttributes = [], + squareMid, + revision, + creatingSecretSquareChat = 0, + ) { + /* + updateAttributes: + CREATING_SECRET_SQUARE_CHAT(1), + INVITING_INTO_OPEN_SQUARE_CHAT(2), + CREATING_SQUARE_CHAT(3), + READONLY_DEFAULT_CHAT(4), + SHOWING_ADVERTISEMENT(5), + DELEGATE_JOIN_TO_PLUG(6), + DELEGATE_KICK_OUT_TO_PLUG(7), + DISABLE_UPDATE_JOIN_METHOD(8), + DISABLE_TRANSFER_ADMIN(9), + CREATING_LIVE_TALK(10); + */ + const SquareFeatureSet = [ + [11, 1, squareMid], + [10, 2, revision], + ]; + if (creatingSecretSquareChat) { + SquareFeatureSet.push([12, 11, [ + [8, 1, 1], + [8, 2, creatingSecretSquareChat], + ]]); + } + return await this.request( + [ + [14, 2, [8, updateAttributes]], + [12, 3, SquareFeatureSet], + ], + "updateSquareFeatureSet", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async joinSquare( + squareMid, + displayName, + ableToReceiveMessage = false, + passCode = undefined, + ) { + return await this.request( + [ + [11, 2, squareMid], + [ + 12, + 3, + [ + [11, 2, squareMid], + [11, 3, displayName], + [2, 5, ableToReceiveMessage], + [10, 9, 0], + ], + ], + [12, 5, [[12, 2, [[11, 1, passCode]]]]], + ], + "joinSquare", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async removeSubscriptions(subscriptionIds = []) { + return await this.request( + [ + [15, 2, [10, subscriptionIds]], + ], + "removeSubscriptions", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async unsendSquareMessage(squareChatMid, messageId) { + return await this.request( + [[11, 2, squareChatMid], [11, 3, messageId]], + "unsendMessage", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async createSquareChat( + squareChatMid, + name, + chatImageObsHash, + squareChatType = 1, + maxMemberCount = 5000, + ableToSearchMessage = 1, + squareMemberMids = [], + ) { + /* + - SquareChatType: + OPEN(1), + SECRET(2), + ONE_ON_ONE(3), + SQUARE_DEFAULT(4); + - ableToSearchMessage: + NONE(0), + OFF(1), + ON(2); + */ + return await this.request( + [ + [8, 1, 0], + [ + 12, + 2, + [ + [11, 1, squareChatMid], + [8, 3, squareChatType], + [11, 4, name], + [11, 5, chatImageObsHash], + [8, 7, maxMemberCount], + [8, 11, ableToSearchMessage], + ], + ], + [15, 3, [11, squareMemberMids]], + ], + "createSquareChat", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquareChatMembers( + squareChatMid, + continuationToken = undefined, + limit = 200, + ) { + const req = [[11, 1, squareChatMid], [8, 3, limit]]; + if (continuationToken) { + req.push([11, 2, continuationToken]); + } + return await this.request( + req, + "getSquareChatMembers", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquareFeatureSet(squareMid) { + return await this.request( + [ + [11, 2, squareMid], + ], + "getSquareFeatureSet", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquareInvitationTicketUrl(mid) { + return await this.request( + [ + [11, 2, mid], + ], + "getInvitationTicketUrl", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async updateSquareChatMember( + squareMemberMid, + squareChatMid, + notificationForMessage = true, + notificationForNewMember = true, + updatedAttrs = [6], + ) { + /* + - SquareChatMemberAttribute: + MEMBERSHIP_STATE(4), + NOTIFICATION_MESSAGE(6), + NOTIFICATION_NEW_MEMBER(7); + */ + return await this.request( + [ + [14, 2, [8, updatedAttrs]], + [ + 12, + 3, + [ + [11, 1, squareMemberMid], + [11, 2, squareChatMid], + [2, 5, notificationForMessage], + [2, 6, notificationForNewMember], + ], + ], + ], + "updateSquareChatMember", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async updateSquareMember( + updatedAttrs = [], + updatedPreferenceAttrs = [], + squareMemberMid, + squareMid, + revision, + displayName, + membershipState, + role, + ) { + /* + SquareMemberAttribute: + DISPLAY_NAME(1), + PROFILE_IMAGE(2), + ABLE_TO_RECEIVE_MESSAGE(3), + MEMBERSHIP_STATE(5), + ROLE(6), + PREFERENCE(7); + SquareMembershipState: + JOIN_REQUESTED(1), + JOINED(2), + REJECTED(3), + LEFT(4), + KICK_OUT(5), + BANNED(6), + DELETED(7); + */ + const squareMember = [[11, 1, squareMemberMid], [11, 2, squareMid]]; + if (updatedAttrs.includes(1)) { + squareMember.push([11, 3, displayName]); + } + if (updatedAttrs.includes(5)) { + squareMember.push([8, 7, membershipState]); + } + if (updatedAttrs.includes(6)) { + squareMember.push([8, 8, role]); + } + squareMember.push([10, 9, revision]); + return await this.request( + [ + [14, 2, [8, updatedAttrs]], + [14, 3, [8, updatedPreferenceAttrs]], + [12, 4, squareMember], + ], + "updateSquareMember", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async kickOutSquareMember(sid, pid) { + const UPDATE_PREF_ATTRS = []; + const UPDATE_ATTRS = [5]; + const MEMBERSHIP_STATE = 5; + const getSquareMemberResp = this.getSquareMember(pid); + const squareMember = getSquareMemberResp[1]; + const squareMemberRevision = squareMember[9]; + return await this.updateSquareMember( + UPDATE_ATTRS, + UPDATE_PREF_ATTRS, + pid, + sid, + squareMemberRevision, + undefined, + MEMBERSHIP_STATE, + ); + } + + async checkSquareJoinCode(squareMid, code) { + return await this.request( + [ + [11, 2, squareMid], + [11, 3, code], + ], + "checkJoinCode", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async createSquareChatAnnouncement( + squareChatMid, + messageId, + text, + senderSquareMemberMid, + createdAt, + announcementType = 0, + ) { + return await this.request( + [ + [8, 1, 0], + [11, 2, squareChatMid], + [ + 12, + 3, + [ + [8, 2, announcementType], + [ + 12, + 3, + [ + [ + 12, + 1, + [ + [11, 1, messageId], + [11, 2, text], + [11, 3, senderSquareMemberMid], + [10, 4, createdAt], + ], + ], + ], + ], + ], + ], + ], + "createSquareChatAnnouncement", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquareMember(squareMemberMid) { + return await this.request( + [ + [11, 2, squareMemberMid], + ], + "getSquareMember", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async searchSquareChatMembers( + squareChatMid, + displayName = "", + continuationToken, + limit = 20, + ) { + const req = [ + [11, 1, squareChatMid], + [ + 12, + 2, + [ + [11, 1, displayName], + ], + ], + [8, 4, limit], + [11, 3, continuationToken], + ]; + return await this.request( + [[12, 1, req]], + "searchSquareChatMembers", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquareEmid(squareMid) { + return await this.request( + [[11, 1, squareMid]], + "getSquareEmid", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquareMembersBySquare(squareMid, squareMemberMids = []) { + return await this.request( + [ + [11, 2, squareMid], + [14, 3, [11, squareMemberMids]], + ], + "getSquareMembersBySquare", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async manualRepair(syncToken, limit = 100, continuationToken) { + return await this.request( + [ + [11, 1, syncToken], + [8, 2, limit], + [11, 3, continuationToken], + ], + "manualRepair", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async leaveSquare(squareMid) { + return await this.request( + [ + [11, 2, squareMid], + ], + "leaveSquare", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async reportSquare(squareMid, reportType, otherReason) { + /* + ReportType { + ADVERTISING = 1; + GENDER_HARASSMENT = 2; + HARASSMENT = 3; + OTHER = 4; + } + */ + return await this.parse_request( + { + squareMid, + reportType, + otherReason, + }, + "reportSquare", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + async sendSquareRequestByName(METHOD_NAME, params) { + return await this.request( + params, + METHOD_NAME, + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + async getSyncToken() { + return (await Line.manualRepair(null, 1)).continuationToken; + } + async squareEvent(handler, syncToken, i, remove = {}) { + if (!syncToken) { + syncToken = await this.getSyncToken(); + } + const res = await this.fetchMyEvents(syncToken); + const _syncToken = res.syncToken; + if (syncToken) { + res.events.forEach((e) => { + handler(e, this); + }); + } + let interval = 1000; + if (!res.events.length) { + interval = 2000; + } + if (!remove.remove) { + setTimeout(() => { + this.squareEvent(handler, _syncToken, i, remove); + }, i ? i : interval); + } + return remove; + } + getSquareEventTarget() { + if (this.squareEventTarget && (!this.squareEventTarget.remove.remove)) { + return this.squareEventTarget; + } + const squareEventTarget = new EventTarget(); + this.squareEventTarget = squareEventTarget; + this.parser.def.SquareEventPayload.forEach((e) => { + let name = e.name.replace("notified", "") + .replace("notification", ""); + name = name[0].toLowerCase() + name.substring(1); + squareEventTarget["on" + name] = null; + }); + squareEventTarget.remove = { remove: false }; + this.squareEvent( + (event) => { + let name = Object.keys(event.payload)[0].toString().replace( + "notified", + "", + ) + .replace("notification", ""); + name = name[0].toLowerCase() + name.substring(1); + const data = event.payload[Object.keys(event.payload)[0]]; + const squareEvent = new Event(name); + objectPlus(squareEvent, data); + if (typeof squareEventTarget["on" + name] === "function") { + squareEventTarget["on" + name](squareEvent); + } + squareEventTarget.dispatchEvent(squareEvent); + }, + null, + null, + squareEventTarget.remove, + ); + return this.squareEventTarget; + } + async squareChatEvent(handler, mid, syncToken, i, remove = {}) { + if (remove.remove) return; + const res = await this.fetchSquareChatEvents(mid, syncToken); + if (remove.remove) return; + const _syncToken = res.syncToken; + for (let i = 0; i < res.events.length; i++) { + const event = res.events[i]; + if (remove.remove) return; + await handler(event, this, mid); + } + let interval = 1000; + if (!res.events.length) { + interval = 2000; + } + if (!remove.remove) { + setTimeout(() => { + this.squareChatEvent(handler, mid, _syncToken, i, remove); + }, i ? i : interval); + } + return remove; + } + squareChatEventTargets = {}; + getSquareChatEventTarget(mid) { + if (this.squareChatEventTargets[mid]) { + return this.squareChatEventTargets[mid]; + } + const squareEventTarget = new EventTarget(); + this.squareChatEventTargets[mid] = squareEventTarget; + squareEventTarget.remove = { remove: false }; + this.parser.def.SquareEventPayload.forEach((e) => { + let name = e.name.replace("notified", "") + .replace("notification", ""); + name = name[0].toLowerCase() + name.substring(1); + squareEventTarget["on" + name] = null; + }); + this.squareChatEvent( + (event) => { + let name = Object.keys(event.payload)[0].toString().replace( + "notified", + "", + ) + .replace("notification", ""); + name = name[0].toLowerCase() + name.substring(1); + const data = event.payload[Object.keys(event.payload)[0]]; + const squareEvent = new Event(name); + objectPlus(squareEvent, data); + if (typeof squareEventTarget["on" + name] === "function") { + squareEventTarget["on" + name](squareEvent); + } + squareEventTarget.dispatchEvent(squareEvent); + if (name == "receiveMessage" || name == "sendMessage") { + const squareEventM = new Event("message"); + objectPlus(squareEventM, data); + if (typeof squareEventTarget["onmessage"] === "function") { + squareEventTarget["onmessage"](squareEventM); + } + } + }, + mid, + null, + null, + squareEventTarget.remove, + ); + return this.squareChatEventTargets[mid]; + } +} +class LINEServise { + LINEService_API_PATH = "/S4"; + LINEService_P_TYPE = 4; + async getProfile() { + const profile = await this.request( + [], + "getProfile", + this.LINEService_P_TYPE, + "Profile", + this.LINEService_API_PATH, + ); + this.profile = profile; + return profile; + } +} +class LiffServise { + LiffService_API_PATH = "/LIFF1"; + LiffService_P_TYPE = 4; + async issueLiffView( + chatMid, + liffId = "1562242036-RW04okm", + lang = "ja_JP", + ) { + let context = [12, 1, []]; + let chatType; + if (chatMid) { + chat = [11, 1, chatMid]; + if (chatMid[0] in ["u", "c", "r"]) { + chatType = 2; + } else { + chatType = 3; + } + context = [12, chatType, [chat]]; + } + return await this.request( + [ + [11, 1, liffId], + [12, 2, [ + context, + ]], + [11, 3, lang], + ], + "issueLiffView", + this.LiffService_P_TYPE, + true, + this.LiffService_API_PATH, + ); + } +} +class ChannelService { + ChannelService_API_PATH = "/CH3"; + ChannelService_P_TYPE = 3; + Channels = {}; + async approveChannelAndIssueChannelToken(channelId = "1341209850") { + const res = await this.direct_request( + [[11, 1, channelId]], + "approveChannelAndIssueChannelToken", + this.ChannelService_P_TYPE, + true, + this.ChannelService_API_PATH, + ); + this.Channels[channelId] = res; + return res; + } + async getChannelToken(channelId, refresh = false) { + if (this.Channels[channelId] && (!refresh)) { + return this.Channels[channelId][5]; + } + return (await this.approveChannelAndIssueChannelToken(channelId))[5]; + } +} +class LineMethod { + async voom2mid(postId) { + const postf = await fetch( + "https://gw.line.naver.jp/mh/api/v57/post/get.json?postId=" + + postId + + "&sourceType=TALKROOM", + { + method: "GET", + headers: { + "x-line-bdbtemplateversion": "v1", + "x-lsr": "JP", + "user-agent": this.thrift.config.ua, + "x-line-channeltoken": await this.getChannelToken( + "1341209850", + ), + "accept-encoding": "gzip", + "x-line-global-config": + "discover.enable=true; follow.enable=true; reboot.phase=scenario", + "x-line-mid": this.profile.mid, + "content-type": "application/json; charset=UTF-8", + "x-line-application": this.thrift.config.appName, + "x-lal": "ja_JP", + "x-lpv": "1", + }, + }, + ); + const info = await postf.json(); + const resp = {}; + if (info.message == "success") { + resp.postUser = { + name: info.result.feed.post.userInfo.nickname, + mid: info.result.feed.post.userInfo.mid, + }; + if (info.result.feed.post.comments) { + resp.commentUsers = []; + for ( + let i = 0; + i < info.result.feed.post.comments.length; + i++ + ) { + resp.commentUsers[i] = { + name: + info.result.feed.post.comments[i].userInfo.nickname, + mid: info.result.feed.post.comments[i].userInfo.mid, + }; + } + } + if (info.result.feed.post.likes) { + resp.likeUsers = []; + for (let i = 0; i < info.result.feed.post.likes.length; i++) { + resp.likeUsers[i] = { + name: info.result.feed.post.likes[i].userInfo.nickname, + mid: info.result.feed.post.likes[i].userInfo.mid, + }; + } + } + return resp; + } + throw new Error(info.message); + } +} + +function objectPlus(baseObj, object) { + for (const key in object) { + if (Object.hasOwnProperty.call(object, key)) { + baseObj[key] = object[key]; + } + } +} + +class LoginAPI { + certs = {}; + async requestEmailLogin( + email, + pw, + cert, + pin = (p) => console.log(`Enter Pincode:`, p), + e2ee = false, + ) { + const rsaKey = await this.getRSAKeyInfo(); + const keynm = rsaKey[1]; + const nvalue = rsaKey[2]; + const evalue = rsaKey[3]; + const sessionKey = rsaKey[4]; + const message = String.fromCharCode(sessionKey.length) + + sessionKey + + String.fromCharCode(email.length) + + email + + String.fromCharCode(pw.length) + + pw; + const crypto = + new PinVerifier(message).getRSACrypto(rsaKey).credentials; + let secret; + if (e2ee) { //ß + secret = + "0\x8aEH\x96\xa7\x8d#5<\xfb\x91c\x12\x15\xbd\x13H\xfa\x04d\xcf\x96\xee1e\xa0]v,\x9f\xf2"; + throw new Error("e2ee Login Beta"); + } + const res = await this.loginV2( + keynm, + crypto, + secret, + this.device, + cert, //this.certs[email], + null, + "loginZ", + ); + if (res[1]) { + this.authToken = res[1]; + return res; + } else { + pin(res[4]); + const headers = { + "Host": "gw.line.naver.jp", + "accept": "application/x-thrift", + "user-agent": this.ua, + "x-line-application": this.type, + "x-line-access": res[3], + "x-lal": "ja_JP", + //'x-le': '18', 'x-lap': '5', + "x-lpv": "1", + "x-lhm": "GET", + //"x-lcs":'0005svgBAiJMiGMJdzBkKqR/78GAZEMOQ6E0p3FJkMBZA/NXe10zfYnVQDufzNaRMEW1nvYJYsLWZaWb4ww7EsebLNXGbuhmyAT2V4Fr3tA23xzvvbOaLjCahQK/4qrha2gC54XuPRbtSFNzALjs3rAyfWyczSnlenV/KFv06iqMmt1v+l3KBQdBkN9uLqGRTXzII0Y/rXtkw1wTYvMZZB7b6KunfzHf9AbFOMCqyveInGhYAetFN9Ly9x3kf2uC2czTSlynvelkYn4qn2VeGmAWOLqZrbQelyh/rRIFPttCILbOrWNEwv71Y7Pa1C0MTGFGlWWQQKlBHj0lcK+kJL13Ww==', + "accept-encoding": "gzip", + }; + const verifier = await fetch("https://gw.line.naver.jp/Q", { + headers: headers, + }).then((res) => res.json()); + const login_res = await this.loginV2( + keynm, + crypto, + secret, + this.device, + null, + verifier.result.verifier, + "loginZ", + ); + this.authToken = login_res[1]; + return login_res; + } + } + async loginV2( + keynm, + encData, + secret, + deviceName = this.device, + cert, + verifier, + calledName = "loginV2", + ) { + let loginType = 2; + if (!secret) loginType = 0; + if (verifier) { + loginType = 1; + } + return await this.direct_request( + [ + [ + 12, + 2, + [ + [8, 1, loginType], + [8, 2, 1], + [11, 3, keynm], + [11, 4, encData], + [2, 5, 0], + [11, 6, ""], + [11, 7, deviceName], + [11, 8, cert], + [11, 9, verifier], + [11, 10, secret], + [8, 11, 1], + [11, 12, "System Product Name"], + ], + ], + ], + calledName, + 3, + true, + "/api/v3p/rs", + ); + } + async getRSAKeyInfo(provider = 0) { + return await this.request( + [ + [8, 2, provider], + ], + "getRSAKeyInfo", + 3, + true, + "/api/v3/TalkService.do", + ); + } +} + +function Classes(...bases) { + class Bases { + constructor() { + bases.forEach((base) => Object.assign(this, new base())); + } + } + bases.forEach((base) => { + Object.getOwnPropertyNames(base.prototype) + .filter((prop) => prop != "constructor") + .forEach((prop) => Bases.prototype[prop] = base.prototype[prop]); + }); + return Bases; +} + +export default class lineClient extends Classes( + LoginAPI, + LineMethod, + ChannelService, + SquareServise, + LiffServise, + LINEServise, +) { + constructor() { + super(); + } + async init({ + authToken, + device, + email, + pw, + pincall, + noLogin, + }) { + let appVer, sysName, sysVer; + sysVer = "12.1.4"; + switch (device) { + case "DESKTOPWIN": + appVer = "7.16.1.3000"; + sysName = "WINDOWS"; + sysVer = "10.0.0-NT-x64"; + break; + case "DESKTOPMAC": + appVer = "7.16.1.3000"; + sysName = "MAC"; + break; + case "CHROMEOS": + appVer = "3.0.3"; + sysName = "Chrome_OS"; + sysVer = "1"; + break; + case "ANDROID": + appVer = "13.4.1"; + sysName = "Android OS"; + break; + case "IOS": + appVer = "13.3.0"; + sysName = "iOS"; + break; + case "IOSIPAD": + appVer = "13.3.0"; + sysName = "iOS"; + break; + case "WATCHOS": + appVer = "13.3.0"; + sysName = "Watch OS"; + break; + case "WEAROS": + appVer = "13.4.1"; + sysName = "Wear OS"; + break; + default: + throw new Error("deviceName is wrong"); + break; + } + this.type = device + "\t" + appVer + "\t" + sysName + "\t" + sysVer; + this.ua = "Line/" + appVer; + this.authToken = authToken; + this.device = device; + this.parser = new ThriftRenameParser(); + this.parser.def = thriftJson + if ((!authToken) && (!noLogin)) { + if (!(email && pw)) { + throw new Error("No Email or Pw"); + } + const cert = this.getEmailCert(email); + const loginRes = this.requestEmailLogin(email, pw, cert, pincall); + if (loginRes[2]) { + this.saveEmailCert(loginRes[2], email); + } + } + } + async _request(path, value, name, ptype, add_headers = {}, parse = true) { + const Protocol = Protocols[ptype]; + let headers = { + "Host": "gw.line.naver.jp", + "accept": "application/x-thrift", + "user-agent": this.ua, + "x-line-application": this.type, + "x-line-access": this.authToken, + "content-type": "application/x-thrift", + "x-lal": "ja_JP", + //'x-le': '18', 'x-lap': '5', + "x-lpv": "1", + "x-lhm": "POST", + //"x-lcs":'0005svgBAiJMiGMJdzBkKqR/78GAZEMOQ6E0p3FJkMBZA/NXe10zfYnVQDufzNaRMEW1nvYJYsLWZaWb4ww7EsebLNXGbuhmyAT2V4Fr3tA23xzvvbOaLjCahQK/4qrha2gC54XuPRbtSFNzALjs3rAyfWyczSnlenV/KFv06iqMmt1v+l3KBQdBkN9uLqGRTXzII0Y/rXtkw1wTYvMZZB7b6KunfzHf9AbFOMCqyveInGhYAetFN9Ly9x3kf2uC2czTSlynvelkYn4qn2VeGmAWOLqZrbQelyh/rRIFPttCILbOrWNEwv71Y7Pa1C0MTGFGlWWQQKlBHj0lcK+kJL13Ww==', + "accept-encoding": "gzip", + }; + + headers = { ...headers, ...add_headers }; + let res; + if (Protocol !== Buffer) { + try { + res = {}; + const Trequest = write(value, name, Protocol); + const fet = await fetch("https://gw.line.naver.jp" + path, { + method: "POST", + headers: headers, + body: Trequest, + }); + if (fet.headers["x-line-next-access"]) { + this.authToken = fet.headers["x-line-next-access"] + } + res = await fet.arrayBuffer(); + res = new Uint8Array(res); + res = read(res, Protocol); + if (parse === true) { + this.parser.rename_data(res); + } else if (typeof parse === "string") { + res.value = this.parser.rename_thrift(parse, res.value); + } + } catch (error) { + console.log(error, "\ndata:", res); + } + if (res.e) { + throw new Error(JSON.stringify(res.e, null, 2), { + cause: res.e, + }); + } + return res; + } else { + try { + res = {}; + const Trequest = value; + const fet = await fetch("https://gw.line.naver.jp" + path, { + method: "POST", + headers: headers, + body: Trequest, + }); + res = await fet.arrayBuffer(); + res = new Uint8Array(res); + } catch (error) { + console.log(error, "/", res); + } + return res; + } + } + async getEmailCert(email) { + let cert; + try { + cert = await Deno.readTextFile(email + ".cert"); + } catch { + } + return cert; + } + async saveEmailCert(cert, email) { + await Deno.writeTextFile(email + ".cert", cert); + } + async request( + CHRdata, + methodName, + protocol_type = 3, + parse = true, + path = "/S3", + headers = {}, + ) { + return (await this._request( + path, + [ + [ + 12, + 1, + CHRdata, + ], + ], + methodName, + protocol_type, + headers, + parse, + )).value; + } + async direct_request( + CHRdata, + methodName, + protocol_type = 3, + parse = true, + path = "/S3", + headers = {}, + ) { + return (await this._request( + path, + CHRdata, + methodName, + protocol_type, + headers, + parse, + )).value; + } +} diff --git a/server/line_types_deno.js b/server/line_types_deno.js deleted file mode 100644 index 3a6b0e5..0000000 --- a/server/line_types_deno.js +++ /dev/null @@ -1,32817 +0,0 @@ -// -// Autogenerated by Thrift Compiler (0.19.0) -// -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -// -"use strict"; -import * as thrift from "npm:thrift@0.11.0"; - -function XreadX(input) { - var Thrift = thrift.Thrift; - var returnData = {}; - input.readStructBegin(); - var ret, ftype, fid; - while (true) { - try { - ret = input.readFieldBegin(); - ftype = ret.ftype; - fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - returnData[fid] = power(input, ftype); - input.readFieldEnd(); - } catch {} - } - input.readStructEnd(); - return returnData; -} -function power(input, ftype) { - var Thrift = thrift.Thrift; - if (ftype == Thrift.Type.STRUCT) { - return XreadX(input); - } else if (ftype == Thrift.Type.I32) { - return input.readI32(); - } else if (ftype == Thrift.Type.I64) { - return input.readI64(); - } else if (ftype == Thrift.Type.STRING) { - return input.readString(); - } else if (ftype == Thrift.Type.LIST) { - let returnData = []; - var _rtmp = input.readListBegin(); - var _size = _rtmp.size || 0; - for (var _i = 0; _i < _size; ++_i) { - var elem = null; - elem = power(input, _rtmp.etype); - returnData.push(elem); - } - input.readListEnd(); - return returnData; - } else if (ftype == Thrift.Type.MAP) { - let returnData = {}; - var _rtmp3384 = input.readMapBegin(); - var _size383 = _rtmp3384.size || 0; - for (var _i385 = 0; _i385 < _size383; ++_i385) { - var key386 = null; - var val387 = null; - key386 = power(input, _rtmp3384.ktype); - val387 = power(input, _rtmp3384.vtype); - returnData[key386] = val387; - } - input.readMapEnd(); - return returnData; - } else if (ftype == Thrift.Type.BOOL) { - return input.readBool(); - } else if (ftype == Thrift.Type.DOUBLE) { - return input.readDouble(); - } else { - console.log(fid, ftype, val, "unknown"); - input.skip(ftype); - return; - } - input.skip(ftype); -} - -var Thrift = thrift.Thrift; -var Q = thrift.Q; - -export var ttypes = {}; -ttypes.ApplicationType = { - "IOS": 16, - "IOS_RC": 17, - "IOS_BETA": 18, - "IOS_ALPHA": 19, - "ANDROID": 32, - "ANDROID_RC": 33, - "ANDROID_BETA": 34, - "ANDROID_ALPHA": 35, - "WAP": 48, - "WAP_RC": 49, - "WAP_BETA": 50, - "WAP_ALPHA": 51, - "BOT": 64, - "BOT_RC": 65, - "BOT_BETA": 66, - "BOT_ALPHA": 67, - "WEB": 80, - "WEB_RC": 81, - "WEB_BETA": 82, - "WEB_ALPHA": 83, - "DESKTOPWIN": 96, - "DESKTOPWIN_RC": 97, - "DESKTOPWIN_BETA": 98, - "DESKTOPWIN_ALPHA": 99, - "DESKTOPMAC": 112, - "DESKTOPMAC_RC": 113, - "DESKTOPMAC_BETA": 114, - "DESKTOPMAC_ALPHA": 115, - "CHANNELGW": 128, - "CHANNELGW_RC": 129, - "CHANNELGW_BETA": 130, - "CHANNELGW_ALPHA": 131, - "CHANNELCP": 144, - "CHANNELCP_RC": 145, - "CHANNELCP_BETA": 146, - "CHANNELCP_ALPHA": 147, - "WINPHONE": 160, - "WINPHONE_RC": 161, - "WINPHONE_BETA": 162, - "WINPHONE_ALPHA": 163, - "BLACKBERRY": 176, - "BLACKBERRY_RC": 177, - "BLACKBERRY_BETA": 178, - "BLACKBERRY_ALPHA": 179, - "WINMETRO": 192, - "WINMETRO_RC": 193, - "WINMETRO_BETA": 194, - "WINMETRO_ALPHA": 195, - "S40": 208, - "S40_RC": 209, - "S40_BETA": 210, - "S40_ALPHA": 211, - "CHRONO": 224, - "CHRONO_RC": 225, - "CHRONO_BETA": 226, - "CHRONO_ALPHA": 227, - "TIZEN": 256, - "TIZEN_RC": 257, - "TIZEN_BETA": 258, - "TIZEN_ALPHA": 259, - "VIRTUAL": 272, - "FIREFOXOS": 288, - "FIREFOXOS_RC": 289, - "FIREFOXOS_BETA": 290, - "FIREFOXOS_ALPHA": 291, - "IOSIPAD": 304, - "IOSIPAD_RC": 305, - "IOSIPAD_BETA": 306, - "IOSIPAD_ALPHA": 307, - "BIZIOS": 320, - "BIZIOS_RC": 321, - "BIZIOS_BETA": 322, - "BIZIOS_ALPHA": 323, - "BIZANDROID": 336, - "BIZANDROID_RC": 337, - "BIZANDROID_BETA": 338, - "BIZANDROID_ALPHA": 339, - "BIZBOT": 352, - "BIZBOT_RC": 353, - "BIZBOT_BETA": 354, - "BIZBOT_ALPHA": 355, - "CHROMEOS": 368, - "CHROMEOS_RC": 369, - "CHROMEOS_BETA": 370, - "CHROMEOS_ALPHA": 371, - "ANDROIDLITE": 384, - "ANDROIDLITE_RC": 385, - "ANDROIDLITE_BETA": 386, - "ANDROIDLITE_ALPHA": 387, - "WIN10": 400, - "WIN10_RC": 401, - "WIN10_BETA": 402, - "WIN10_ALPHA": 403, - "BIZWEB": 416, - "BIZWEB_RC": 417, - "BIZWEB_BETA": 418, - "BIZWEB_ALPHA": 419, - "DUMMYPRIMARY": 432, - "DUMMYPRIMARY_RC": 433, - "DUMMYPRIMARY_BETA": 434, - "DUMMYPRIMARY_ALPHA": 435, - "SQUARE": 448, - "SQUARE_RC": 449, - "SQUARE_BETA": 450, - "SQUARE_ALPHA": 451, - "INTERNAL": 464, - "INTERNAL_RC": 465, - "INTERNAL_BETA": 466, - "INTERNAL_ALPHA": 467, - "CLOVAFRIENDS": 480, - "CLOVAFRIENDS_RC": 481, - "CLOVAFRIENDS_BETA": 482, - "CLOVAFRIENDS_ALPHA": 483, -}; -ttypes.ExtendedProfileAttribute = {}; -ttypes.PrivacyLevelType = { "PUBLIC": 0, "PRIVATE": 1 }; -ttypes.PaidCallerIdStatus = { - "NOT_SPECIFIED": 0, - "VALID": 1, - "VERIFICATION_REQUIRED": 2, - "NOT_PERMITTED": 3, - "LIMIT_EXCEEDED": 4, - "LIMIT_EXCEEDED_AND_VERIFICATION_REQUIRED": 5, -}; -ttypes.PaidCallProductType = { "COIN": 0, "CREDIT": 1, "MONTHLY": 2 }; -ttypes.PaidCallType = { "OUT": 0, "IN": 1, "TOLLFREE": 2, "RECORD": 3, "AD": 4, "CS": 5 }; -ttypes.BotType = { "RESERVED": 0, "OFFICIAL": 1, "LINE_AT_0": 2, "LINE_AT": 3 }; -ttypes.BuddyOnAirLabel = { "ON_AIR": 0, "LIVE": 1 }; -ttypes.BuddyBannerLinkType = { "BUDDY_BANNER_LINK_HIDDEN": 0, "BUDDY_BANNER_LINK_MID": 1, "BUDDY_BANNER_LINK_URL": 2 }; -ttypes.BuddyOnAirType = { "NORMAL": 0, "LIVE": 1, "VOIP": 2 }; -ttypes.Diff = { "ADDED": 0, "UPDATED": 1, "REMOVED": 2 }; -ttypes.ReportType = { "ADVERTISING": 1, "GENDER_HARASSMENT": 2, "HARASSMENT": 3, "OTHER": 4 }; -ttypes.SyncTriggerReason = { "OTHER": 0, "REVISION_GAP_TOO_LARGE": 1, "OPERATION_EXPIRED": 2 }; -ttypes.ReportCategory = { "PUSH_NORMAL_PLAIN": 0, "PUSH_NORMAL_E2EE": 1, "PUSH_VOIP_PLAIN": 2, "PUSH_VOIP_E2EE": 3 }; -ttypes.BuddyResultState = { - "ACCEPTED": 1, - "SUCCEEDED": 2, - "FAILED": 3, - "CANCELLED": 4, - "NOTIFY_FAILED": 5, - "STORING": 11, - "UPLOADING": 21, - "NOTIFYING": 31, - "REMOVING_SUBSCRIPTION": 41, - "UNREGISTERING_ACCOUNT": 42, - "NOTIFYING_LEAVE_CHAT": 43, -}; -ttypes.BuddySearchRequestSource = { "NA": 0, "FRIEND_VIEW": 1, "OFFICIAL_ACCOUNT_VIEW": 2 }; -ttypes.CarrierCode = { - "NOT_SPECIFIED": 0, - "JP_DOCOMO": 1, - "JP_AU": 2, - "JP_SOFTBANK": 3, - "JP_DOCOMO_LINE": 4, - "KR_SKT": 17, - "KR_KT": 18, - "KR_LGT": 19, -}; -ttypes.ChannelConfiguration = { "MESSAGE": 0, "MESSAGE_NOTIFICATION": 1, "NOTIFICATION_CENTER": 2 }; -ttypes.ChannelPermission = { "PROFILE": 0, "FRIENDS": 1, "GROUP": 2 }; -ttypes.ChannelFeatureLicense = { - "BLE_LCS_API_USABLE": 26, - "PROHIBIT_MINIMIZE_CHANNEL_BROWSER": 27, - "ALLOW_IOS_WEBKIT": 28, -}; -ttypes.ChannelErrorCode = { - "ILLEGAL_ARGUMENT": 0, - "INTERNAL_ERROR": 1, - "CONNECTION_ERROR": 2, - "AUTHENTICATIONI_FAILED": 3, - "NEED_PERMISSION_APPROVAL": 4, - "COIN_NOT_USABLE": 5, - "WEBVIEW_NOT_ALLOWED": 6, -}; -ttypes.ChannelSyncType = { "SYNC": 0, "REMOVE": 1, "REMOVE_ALL": 2 }; -ttypes.LoginType = { "ID_CREDENTIAL": 0, "QRCODE": 1, "ID_CREDENTIAL_WITH_E2EE": 2 }; -ttypes.ContactAttribute = { - "CONTACT_ATTRIBUTE_CAPABLE_VOICE_CALL": 1, - "CONTACT_ATTRIBUTE_CAPABLE_VIDEO_CALL": 2, - "CONTACT_ATTRIBUTE_CAPABLE_MY_HOME": 16, - "CONTACT_ATTRIBUTE_CAPABLE_BUDDY": 32, -}; -ttypes.ContactCategory = { "NORMAL": 0, "RECOMMEND": 1 }; -ttypes.ContactRelation = { "ONEWAY": 0, "BOTH": 1, "NOT_REGISTERED": 2 }; -ttypes.AsymmetricKeyAlgorithm = { "ASYMMETRIC_KEY_ALGORITHM_RSA": 1, "ASYMMETRIC_KEY_ALGORITHM_ECDH": 2 }; -ttypes.ContactSetting = { - "CONTACT_SETTING_NOTIFICATION_DISABLE": 1, - "CONTACT_SETTING_DISPLAY_NAME_OVERRIDE": 2, - "CONTACT_SETTING_CONTACT_HIDE": 4, - "CONTACT_SETTING_FAVORITE": 8, - "CONTACT_SETTING_DELETE": 16, -}; -ttypes.ContactStatus = { - "UNSPECIFIED": 0, - "FRIEND": 1, - "FRIEND_BLOCKED": 2, - "RECOMMEND": 3, - "RECOMMEND_BLOCKED": 4, - "DELETED": 5, - "DELETED_BLOCKED": 6, -}; -ttypes.ContactType = { - "MID": 0, - "PHONE": 1, - "EMAIL": 2, - "USERID": 3, - "PROXIMITY": 4, - "GROUP": 5, - "USER": 6, - "QRCODE": 7, - "PROMOTION_BOT": 8, - "CONTACT_MESSAGE": 9, - "FRIEND_REQUEST": 10, - "REPAIR": 128, - "FACEBOOK": 2305, - "SINA": 2306, - "RENREN": 2307, - "FEIXIN": 2308, - "BBM": 2309, - "BEACON": 11, -}; -ttypes.GroupPreferenceAttribute = { "INVITATION_TICKET": 1, "FAVORITE_TIMESTAMP": 2 }; -ttypes.ContentType = { - "NONE": 0, - "IMAGE": 1, - "VIDEO": 2, - "AUDIO": 3, - "HTML": 4, - "PDF": 5, - "CALL": 6, - "STICKER": 7, - "PRESENCE": 8, - "GIFT": 9, - "GROUPBOARD": 10, - "APPLINK": 11, - "LINK": 12, - "CONTACT": 13, - "FILE": 14, - "LOCATION": 15, - "POSTNOTIFICATION": 16, - "RICH": 17, - "CHATEVENT": 18, - "MUSIC": 19, - "PAYMENT": 20, - "EXTIMAGE": 21, -}; -ttypes.MessageRelationType = { "FORWARD": 0, "AUTO_REPLY": 1, "SUBORDINATE": 2 }; -ttypes.CustomMode = { - "PROMOTION_FRIENDS_INVITE": 1, - "CAPABILITY_SERVER_SIDE_SMS": 2, - "LINE_CLIENT_ANALYTICS_CONFIGURATION": 3, -}; -ttypes.RoomAttribute = { "ALL": 255, "NOTIFICATION_SETTING": 1 }; -ttypes.UserStatus = { "NORMAL": 0, "UNBOUND": 1, "UNREGISTERED": 2 }; -ttypes.EmailConfirmationStatus = { "NOT_SPECIFIED": 0, "NOT_YET": 1, "DONE": 3, "NEED_ENFORCED_INPUT": 4 }; -ttypes.AccountMigrationPincodeType = { "NOT_APPLICABLE": 0, "NOT_SET": 1, "SET": 2, "NEED_ENFORCED_INPUT": 3 }; -ttypes.AccountMigrationCheckType = { "SKIP": 0, "PINCODE": 1, "SECURITY_CENTER": 2 }; -ttypes.SecurityCenterSettingsType = { "NOT_APPLICABLE": 0, "NOT_SET": 1, "SET": 2, "NEED_ENFORCED_INPUT": 3 }; -ttypes.EmailConfirmationType = { "SERVER_SIDE_EMAIL": 0, "CLIENT_SIDE_EMAIL": 1 }; -ttypes.SquareChatAnnouncementType = { "TEXT_MESSAGE": 0 }; -ttypes.SquareChatAttribute = { "NAME": 2, "SQUARE_CHAT_IMAGE": 3, "STATE": 4 }; -ttypes.SquareMemberAttribute = { - "DISPLAY_NAME": 1, - "PROFILE_IMAGE": 2, - "ABLE_TO_RECEIVE_MESSAGE": 3, - "MEMBERSHIP_STATE": 5, - "ROLE": 6, - "PREFERENCE": 7, -}; -ttypes.SquareMemberRelationAttribute = { "BLOCKED": 1 }; -ttypes.SquarePreferenceAttribute = { "FAVORITE": 1, "NOTI_FOR_NEW_JOIN_REQUEST": 2 }; -ttypes.SquareState = { "ALIVE": 0, "DELETED": 1, "SUSPENDED": 2 }; -ttypes.CommitMessageResultCode = { "DELIVERED": 0, "DELIVERY_SKIPPED": 1, "DELIVERY_RESTRICTED": 2 }; -ttypes.ErrorCode = { - "ILLEGAL_ARGUMENT": 0, - "AUTHENTICATION_FAILED": 1, - "DB_FAILED": 2, - "INVALID_STATE": 3, - "EXCESSIVE_ACCESS": 4, - "NOT_FOUND": 5, - "INVALID_MID": 9, - "NOT_A_MEMBER": 10, - "INVALID_LENGTH": 6, - "NOT_AVAILABLE_USER": 7, - "NOT_AUTHORIZED_DEVICE": 8, - "NOT_AUTHORIZED_SESSION": 14, - "INCOMPATIBLE_APP_VERSION": 11, - "NOT_READY": 12, - "NOT_AVAILABLE_SESSION": 13, - "SYSTEM_ERROR": 15, - "NO_AVAILABLE_VERIFICATION_METHOD": 16, - "NOT_AUTHENTICATED": 17, - "INVALID_IDENTITY_CREDENTIAL": 18, - "NOT_AVAILABLE_IDENTITY_IDENTIFIER": 19, - "INTERNAL_ERROR": 20, - "NO_SUCH_IDENTITY_IDENFIER": 21, - "DEACTIVATED_ACCOUNT_BOUND_TO_THIS_IDENTITY": 22, - "ILLEGAL_IDENTITY_CREDENTIAL": 23, - "UNKNOWN_CHANNEL": 24, - "NO_SUCH_MESSAGE_BOX": 25, - "NOT_AVAILABLE_MESSAGE_BOX": 26, - "CHANNEL_DOES_NOT_MATCH": 27, - "NOT_YOUR_MESSAGE": 28, - "MESSAGE_DEFINED_ERROR": 29, - "USER_CANNOT_ACCEPT_PRESENTS": 30, - "USER_NOT_STICKER_OWNER": 32, - "MAINTENANCE_ERROR": 33, - "ACCOUNT_NOT_MATCHED": 34, - "ABUSE_BLOCK": 35, - "NOT_FRIEND": 36, - "NOT_ALLOWED_CALL": 37, - "BLOCK_FRIEND": 38, - "INCOMPATIBLE_VOIP_VERSION": 39, - "INVALID_SNS_ACCESS_TOKEN": 40, - "EXTERNAL_SERVICE_NOT_AVAILABLE": 41, - "NOT_ALLOWED_ADD_CONTACT": 42, - "NOT_CERTIFICATED": 43, - "NOT_ALLOWED_SECONDARY_DEVICE": 44, - "INVALID_PIN_CODE": 45, - "NOT_FOUND_IDENTITY_CREDENTIAL": 46, - "EXCEED_FILE_MAX_SIZE": 47, - "EXCEED_DAILY_QUOTA": 48, - "NOT_SUPPORT_SEND_FILE": 49, - "MUST_UPGRADE": 50, - "NOT_AVAILABLE_PIN_CODE_SESSION": 51, - "EXPIRED_REVISION": 52, - "NOT_YET_PHONE_NUMBER": 54, - "BAD_CALL_NUMBER": 55, - "UNAVAILABLE_CALL_NUMBER": 56, - "NOT_SUPPORT_CALL_SERVICE": 57, - "CONGESTION_CONTROL": 58, - "NO_BALANCE": 59, - "NOT_PERMITTED_CALLER_ID": 60, - "NO_CALLER_ID_LIMIT_EXCEEDED": 61, - "CALLER_ID_VERIFICATION_REQUIRED": 62, - "NO_CALLER_ID_LIMIT_EXCEEDED_AND_VERIFICATION_REQUIRED": 63, - "MESSAGE_NOT_FOUND": 64, - "INVALID_ACCOUNT_MIGRATION_PINCODE_FORMAT": 65, - "ACCOUNT_MIGRATION_PINCODE_NOT_MATCHED": 66, - "ACCOUNT_MIGRATION_PINCODE_BLOCKED": 67, - "INVALID_PASSWORD_FORMAT": 69, - "FEATURE_RESTRICTED": 70, - "MESSAGE_NOT_DESTRUCTIBLE": 71, - "PAID_CALL_REDEEM_FAILED": 72, - "PREVENTED_JOIN_BY_TICKET": 73, - "SEND_MESSAGE_NOT_PERMITTED_FROM_LINE_AT": 75, - "SEND_MESSAGE_NOT_PERMITTED_WHILE_AUTO_REPLY": 76, - "SECURITY_CENTER_NOT_VERIFIED": 77, - "SECURITY_CENTER_BLOCKED_BY_SETTING": 78, - "SECURITY_CENTER_BLOCKED": 79, - "TALK_PROXY_EXCEPTION": 80, - "E2EE_INVALID_PROTOCOL": 81, - "E2EE_RETRY_ENCRYPT": 82, - "E2EE_UPDATE_SENDER_KEY": 83, - "E2EE_UPDATE_RECEIVER_KEY": 84, - "E2EE_INVALID_ARGUMENT": 85, - "E2EE_INVALID_VERSION": 86, - "E2EE_SENDER_DISABLED": 87, - "E2EE_RECEIVER_DISABLED": 88, - "E2EE_SENDER_NOT_ALLOWED": 89, - "E2EE_RECEIVER_NOT_ALLOWED": 90, - "E2EE_RESEND_FAIL": 91, - "E2EE_RESEND_OK": 92, - "HITOKOTO_BACKUP_NO_AVAILABLE_DATA": 93, - "E2EE_UPDATE_PRIMARY_DEVICE": 94, - "SUCCESS": 95, - "CANCEL": 96, - "E2EE_PRIMARY_NOT_SUPPORT": 97, - "E2EE_RETRY_PLAIN": 98, - "E2EE_RECREATE_GROUP_KEY": 99, - "E2EE_GROUP_TOO_MANY_MEMBERS": 100, - "SERVER_BUSY": 101, - "NOT_ALLOWED_ADD_FOLLOW": 102, - "INCOMING_FRIEND_REQUEST_LIMIT": 103, - "OUTGOING_FRIEND_REQUEST_LIMIT": 104, - "OUTGOING_FRIEND_REQUEST_QUOTA": 105, - "DUPLICATED": 106, - "BANNED": 107, -}; -ttypes.FeatureType = { "OBS_VIDEO": 1, "OBS_GENERAL": 2 }; -ttypes.GroupAttribute = { - "NAME": 1, - "PICTURE_STATUS": 2, - "ALL": 255, - "PREVENTED_JOIN_BY_TICKET": 4, - "NOTIFICATION_SETTING": 8, -}; -ttypes.IdentityProvider = { "UNKNOWN": 0, "LINE": 1, "NAVER_KR": 2, "LINE_PHONE": 3 }; -ttypes.LoginResultType = { "SUCCESS": 1, "REQUIRE_QRCODE": 2, "REQUIRE_DEVICE_CONFIRM": 3, "REQUIRE_SMS_CONFIRM": 4 }; -ttypes.MessageOperationType = { - "SEND_MESSAGE": 1, - "RECEIVE_MESSAGE": 2, - "READ_MESSAGE": 3, - "NOTIFIED_READ_MESSAGE": 4, - "NOTIFIED_JOIN_CHAT": 5, - "FAILED_SEND_MESSAGE": 6, - "SEND_CONTENT": 7, - "SEND_CONTENT_RECEIPT": 8, - "SEND_CHAT_REMOVED": 9, - "REMOVE_ALL_MESSAGES": 10, -}; -ttypes.MIDType = { "USER": 0, "ROOM": 1, "GROUP": 2, "SQUARE": 3, "SQUARE_CHAT": 4, "SQUARE_MEMBER": 5, "BOT": 6 }; -ttypes.ServiceCode = { "UNKNOWN": 0, "TALK": 1, "SQUARE": 2 }; -ttypes.FriendRequestDirection = { "INCOMING": 1, "OUTGOING": 2 }; -ttypes.FriendRequestMethod = { "TIMELINE": 1, "NEARBY": 2, "SQUARE": 3 }; -ttypes.FriendRequestStatus = { "NONE": 0, "AVAILABLE": 1, "ALREADY_REQUESTED": 2, "UNAVAILABLE": 3 }; -ttypes.ModificationType = { "ADD": 0, "REMOVE": 1, "MODIFY": 2 }; -ttypes.NotificationItemFetchMode = { "ALL": 0, "APPEND": 1 }; -ttypes.NotificationQueueType = { "GLOBAL": 1, "MESSAGE": 2, "PRIMARY": 3 }; -ttypes.GroupCallMediaType = { "AUDIO": 1, "VIDEO": 2 }; -ttypes.PersonalInfo = { "EMAIL": 0, "PHONE": 1, "BIRTHDAY": 2, "RAW_BIRTHDAY": 3 }; -ttypes.NotificationStatus = { - "NOTIFICATION_ITEM_EXIST": 1, - "TIMELINE_ITEM_EXIST": 2, - "NOTE_GROUP_NEW_ITEM_EXIST": 4, - "TIMELINE_BUDDYGROUP_CHANGED": 8, - "NOTE_ONE_TO_ONE_NEW_ITEM_EXIST": 16, - "ALBUM_ITEM_EXIST": 32, - "TIMELINE_ITEM_DELETED": 64, - "OTOGROUP_ITEM_EXIST": 128, - "GROUPHOME_NEW_ITEM_EXIST": 256, - "GROUPHOME_HIDDEN_ITEM_CHANGED": 512, - "NOTIFICATION_ITEM_CHANGED": 1024, - "BEAD_ITEM_HIDE": 2048, - "BEAD_ITEM_SHOW": 4096, -}; -ttypes.NotificationType = { - "APPLE_APNS": 1, - "GOOGLE_C2DM": 2, - "NHN_NNI": 3, - "SKT_AOM": 4, - "MS_MPNS": 5, - "RIM_BIS": 6, - "GOOGLE_GCM": 7, - "NOKIA_NNAPI": 8, - "TIZEN": 9, - "LINE_BOT": 17, - "LINE_WAP": 18, - "APPLE_APNS_VOIP": 19, - "MS_WNS": 20, - "GOOGLE_FCM": 21, -}; -ttypes.OpStatus = { "NORMAL": 0, "ALERT_DISABLED": 1, "ALWAYS": 2 }; -ttypes.OpType = { - "END_OF_OPERATION": 0, - "UPDATE_PROFILE": 1, - "UPDATE_SETTINGS": 36, - "NOTIFIED_UPDATE_PROFILE": 2, - "REGISTER_USERID": 3, - "ADD_CONTACT": 4, - "NOTIFIED_ADD_CONTACT": 5, - "BLOCK_CONTACT": 6, - "UNBLOCK_CONTACT": 7, - "NOTIFIED_RECOMMEND_CONTACT": 8, - "CREATE_GROUP": 9, - "UPDATE_GROUP": 10, - "NOTIFIED_UPDATE_GROUP": 11, - "INVITE_INTO_GROUP": 12, - "NOTIFIED_INVITE_INTO_GROUP": 13, - "CANCEL_INVITATION_GROUP": 31, - "NOTIFIED_CANCEL_INVITATION_GROUP": 32, - "LEAVE_GROUP": 14, - "NOTIFIED_LEAVE_GROUP": 15, - "ACCEPT_GROUP_INVITATION": 16, - "NOTIFIED_ACCEPT_GROUP_INVITATION": 17, - "REJECT_GROUP_INVITATION": 34, - "NOTIFIED_REJECT_GROUP_INVITATION": 35, - "KICKOUT_FROM_GROUP": 18, - "NOTIFIED_KICKOUT_FROM_GROUP": 19, - "CREATE_ROOM": 20, - "INVITE_INTO_ROOM": 21, - "NOTIFIED_INVITE_INTO_ROOM": 22, - "LEAVE_ROOM": 23, - "NOTIFIED_LEAVE_ROOM": 24, - "SEND_MESSAGE": 25, - "RECEIVE_MESSAGE": 26, - "SEND_MESSAGE_RECEIPT": 27, - "RECEIVE_MESSAGE_RECEIPT": 28, - "SEND_CONTENT_RECEIPT": 29, - "RECEIVE_ANNOUNCEMENT": 30, - "NOTIFIED_UNREGISTER_USER": 33, - "INVITE_VIA_EMAIL": 38, - "NOTIFIED_REGISTER_USER": 37, - "NOTIFIED_REQUEST_RECOVERY": 39, - "SEND_CHAT_CHECKED": 40, - "SEND_CHAT_REMOVED": 41, - "NOTIFIED_FORCE_SYNC": 42, - "SEND_CONTENT": 43, - "SEND_MESSAGE_MYHOME": 44, - "NOTIFIED_UPDATE_CONTENT_PREVIEW": 45, - "REMOVE_ALL_MESSAGES": 46, - "NOTIFIED_UPDATE_PURCHASES": 47, - "DUMMY": 48, - "UPDATE_CONTACT": 49, - "NOTIFIED_RECEIVED_CALL": 50, - "CANCEL_CALL": 51, - "NOTIFIED_REDIRECT": 52, - "NOTIFIED_CHANNEL_SYNC": 53, - "FAILED_SEND_MESSAGE": 54, - "NOTIFIED_READ_MESSAGE": 55, - "FAILED_EMAIL_CONFIRMATION": 56, - "NOTIFIED_CHAT_CONTENT": 58, - "NOTIFIED_PUSH_NOTICENTER_ITEM": 59, - "NOTIFIED_JOIN_CHAT": 60, - "NOTIFIED_LEAVE_CHAT": 61, - "NOTIFIED_TYPING": 62, - "FRIEND_REQUEST_ACCEPTED": 63, - "DESTROY_MESSAGE": 64, - "NOTIFIED_DESTROY_MESSAGE": 65, - "UPDATE_PUBLICKEYCHAIN": 66, - "NOTIFIED_UPDATE_PUBLICKEYCHAIN": 67, - "NOTIFIED_BLOCK_CONTACT": 68, - "NOTIFIED_UNBLOCK_CONTACT": 69, - "UPDATE_GROUPPREFERENCE": 70, - "NOTIFIED_PAYMENT_EVENT": 71, - "REGISTER_E2EE_PUBLICKEY": 72, - "NOTIFIED_E2EE_KEY_EXCHANGE_REQ": 73, - "NOTIFIED_E2EE_KEY_EXCHANGE_RESP": 74, - "NOTIFIED_E2EE_MESSAGE_RESEND_REQ": 75, - "NOTIFIED_E2EE_MESSAGE_RESEND_RESP": 76, - "NOTIFIED_E2EE_KEY_UPDATE": 77, - "NOTIFIED_BUDDY_UPDATE_PROFILE": 78, - "NOTIFIED_UPDATE_LINEAT_TABS": 79, - "UPDATE_ROOM": 80, - "NOTIFIED_BEACON_DETECTED": 81, - "UPDATE_EXTENDED_PROFILE": 82, - "ADD_FOLLOW": 83, - "NOTIFIED_ADD_FOLLOW": 84, - "DELETE_FOLLOW": 85, - "NOTIFIED_DELETE_FOLLOW": 86, - "UPDATE_TIMELINE_SETTINGS": 87, - "NOTIFIED_FRIEND_REQUEST": 88, - "UPDATE_RINGBACK_TONE": 89, - "NOTIFIED_POSTBACK": 90, - "RECEIVE_READ_WATERMARK": 91, - "NOTIFIED_MESSAGE_DELIVERED": 92, - "NOTIFIED_UPDATE_CHAT_BAR": 93, - "NOTIFIED_CHATAPP_INSTALLED": 94, - "NOTIFIED_CHATAPP_UPDATED": 95, - "NOTIFIED_CHATAPP_NEW_MARK": 96, - "NOTIFIED_CHATAPP_DELETED": 97, - "NOTIFIED_CHATAPP_SYNC": 98, - "NOTIFIED_UPDATE_MESSAGE": 99, -}; -ttypes.PayloadType = { "PAYLOAD_BUY": 101, "PAYLOAD_CS": 111, "PAYLOAD_BONUS": 121, "PAYLOAD_EVENT": 131 }; -ttypes.PaymentPgType = { "PAYMENT_PG_NONE": 0, "PAYMENT_PG_AU": 1, "PAYMENT_PG_AL": 2 }; -ttypes.PaymentType = { "PAYMENT_APPLE": 1, "PAYMENT_GOOGLE": 2 }; -ttypes.ProductBannerLinkType = { - "BANNER_LINK_NONE": 0, - "BANNER_LINK_ITEM": 1, - "BANNER_LINK_URL": 2, - "BANNER_LINK_CATEGORY": 3, -}; -ttypes.ProductEventType = { - "NO_EVENT": 0, - "CARRIER_ANY": 65537, - "BUDDY_ANY": 131073, - "INSTALL_IOS": 196609, - "INSTALL_ANDROID": 196610, - "MISSION_ANY": 262145, - "MUSTBUY_ANY": 327681, -}; -ttypes.StickerResourceType = { - "STATIC": 1, - "ANIMATION": 2, - "SOUND": 3, - "ANIMATION_SOUND": 4, - "POPUP": 5, - "POPUP_SOUND": 6, -}; -ttypes.PlaceSearchProvider = { "GOOGLE": 0, "BAIDU": 1 }; -ttypes.PointErrorCode = { - "REQUEST_DUPLICATION": 3001, - "INVALID_PARAMETER": 3002, - "NOT_ENOUGH_BALANCE": 3003, - "AUTHENTICATION_FAIL": 3004, - "API_ACCESS_FORBIDDEN": 3005, - "MEMBER_ACCOUNT_NOT_FOUND": 3006, - "SERVICE_ACCOUNT_NOT_FOUND": 3007, - "TRANSACTION_NOT_FOUND": 3008, - "ALREADY_REVERSED_TRANSACTION": 3009, - "MESSAGE_NOT_READABLE": 3010, - "HTTP_REQUEST_METHOD_NOT_SUPPORTED": 3011, - "HTTP_MEDIA_TYPE_NOT_SUPPORTED": 3012, - "NOT_ALLOWED_TO_DEPOSIT": 3013, - "NOT_ALLOWED_TO_PAY": 3014, - "TRANSACTION_ACCESS_FORBIDDEN": 3015, - "INVALID_SERVICE_CONFIGURATION": 4001, - "DCS_COMMUNICATION_FAIL": 5004, - "UPDATE_BALANCE_FAIL": 5007, - "SYSTEM_ERROR": 5999, - "SYSTEM_MAINTENANCE": 5888, -}; -ttypes.ProfileAttribute = { - "ALL": 511, - "EMAIL": 1, - "DISPLAY_NAME": 2, - "PHONETIC_NAME": 4, - "PICTURE": 8, - "STATUS_MESSAGE": 16, - "ALLOW_SEARCH_BY_USERID": 32, - "ALLOW_SEARCH_BY_EMAIL": 64, - "BUDDY_STATUS": 128, - "MUSIC_PROFILE": 256, -}; -ttypes.PublicType = { "HIDDEN": 0, "PUBLIC": 1000 }; -ttypes.RedirectType = { "NONE": 0, "EXPIRE_SECOND": 1 }; -ttypes.RegistrationType = { - "PHONE": 0, - "EMAIL_WAP": 1, - "FACEBOOK": 2305, - "SINA": 2306, - "RENREN": 2307, - "FEIXIN": 2308, -}; -ttypes.ChatRoomAnnouncementType = { "MESSAGE": 0, "NOTE": 1 }; -ttypes.SettingsAttribute = { - "ALL": 2147483647, - "NOTIFICATION_ENABLE": 1, - "NOTIFICATION_MUTE_EXPIRATION": 2, - "NOTIFICATION_NEW_MESSAGE": 4, - "NOTIFICATION_GROUP_INVITATION": 8, - "NOTIFICATION_SHOW_MESSAGE": 16, - "NOTIFICATION_INCOMING_CALL": 32, - "NOTIFICATION_SOUND_MESSAGE": 256, - "NOTIFICATION_SOUND_GROUP": 512, - "NOTIFICATION_DISABLED_WITH_SUB": 65536, - "NOTIFICATION_PAYMENT": 131072, - "PRIVACY_SYNC_CONTACTS": 64, - "PRIVACY_SEARCH_BY_PHONE_NUMBER": 128, - "PRIVACY_SEARCH_BY_USERID": 8192, - "PRIVACY_SEARCH_BY_EMAIL": 16384, - "PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN": 2097152, - "PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME": 8388608, - "PRIVACY_ALLOW_FRIEND_REQUEST": 1073741824, - "PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND": 33554432, - "PRIVACY_AGREE_USE_LINECOIN_TO_PAIDCALL": 67108864, - "PRIVACY_AGREE_USE_PAIDCALL": 134217728, - "CONTACT_MY_TICKET": 1024, - "IDENTITY_PROVIDER": 2048, - "IDENTITY_IDENTIFIER": 4096, - "SNS_ACCOUNT": 524288, - "PHONE_REGISTRATION": 1048576, - "PREFERENCE_LOCALE": 32768, - "CUSTOM_MODE": 4194304, - "EMAIL_CONFIRMATION_STATUS": 16777216, - "ACCOUNT_MIGRATION_PINCODE": 268435456, - "ENFORCED_INPUT_ACCOUNT_MIGRATION_PINCODE": 536870912, - "SECURITY_CENTER_SETTINGS": 262144, -}; -ttypes.SettingsAttributeEx = { - "NOTIFICATION_ENABLE": 0, - "NOTIFICATION_MUTE_EXPIRATION": 1, - "NOTIFICATION_NEW_MESSAGE": 2, - "NOTIFICATION_GROUP_INVITATION": 3, - "NOTIFICATION_SHOW_MESSAGE": 4, - "NOTIFICATION_INCOMING_CALL": 5, - "NOTIFICATION_SOUND_MESSAGE": 8, - "NOTIFICATION_SOUND_GROUP": 9, - "NOTIFICATION_DISABLED_WITH_SUB": 16, - "NOTIFICATION_PAYMENT": 17, - "NOTIFICATION_MENTION": 40, - "NOTIFICATION_THUMBNAIL": 45, - "PRIVACY_SYNC_CONTACTS": 6, - "PRIVACY_SEARCH_BY_PHONE_NUMBER": 7, - "PRIVACY_SEARCH_BY_USERID": 13, - "PRIVACY_SEARCH_BY_EMAIL": 14, - "PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN": 21, - "PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME": 23, - "PRIVACY_PROFILE_MUSIC_POST_TO_MYHOME": 35, - "PRIVACY_ALLOW_FRIEND_REQUEST": 30, - "PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND": 25, - "PRIVACY_AGREE_USE_LINECOIN_TO_PAIDCALL": 26, - "PRIVACY_AGREE_USE_PAIDCALL": 27, - "CONTACT_MY_TICKET": 10, - "IDENTITY_PROVIDER": 11, - "IDENTITY_IDENTIFIER": 12, - "SNS_ACCOUNT": 19, - "PHONE_REGISTRATION": 20, - "PREFERENCE_LOCALE": 15, - "CUSTOM_MODE": 22, - "EMAIL_CONFIRMATION_STATUS": 24, - "ACCOUNT_MIGRATION_PINCODE": 28, - "ENFORCED_INPUT_ACCOUNT_MIGRATION_PINCODE": 29, - "SECURITY_CENTER_SETTINGS": 18, - "E2EE_ENABLE": 33, - "ENABLE_SOUND_TO_TEXT": 47, - "HITOKOTO_BACKUP_REQUESTED": 34, - "CONTACT_ALLOW_FOLLOWING": 36, - "PRIVACY_ALLOW_NEARBY": 37, - "AGREEMENT_NEARBY": 38, - "AGREEMENT_SQUARE": 39, - "ALLOW_UNREGISTRATION_SECONDARY_DEVICE": 41, - "AGREEMENT_BOT_USE": 42, - "AGREEMENT_SHAKE_FUNCTION": 43, - "AGREEMENT_MOBILE_CONTACT_NAME": 44, - "AGREEMENT_SOUND_TO_TEXT": 46, -}; -ttypes.SnsIdType = { "FACEBOOK": 1, "SINA": 2, "RENREN": 3, "FEIXIN": 4, "BBM": 5 }; -ttypes.SpammerReason = { "OTHER": 0, "ADVERTISING": 1, "GENDER_HARASSMENT": 2, "HARASSMENT": 3 }; -ttypes.SyncActionType = { "SYNC": 0, "REPORT": 1 }; -ttypes.SpotCategory = { - "UNKNOWN": 0, - "GOURMET": 1, - "BEAUTY": 2, - "TRAVEL": 3, - "SHOPPING": 4, - "ENTERTAINMENT": 5, - "SPORTS": 6, - "TRANSPORT": 7, - "LIFE": 8, - "HOSPITAL": 9, - "FINANCE": 10, - "EDUCATION": 11, - "OTHER": 12, - "ALL": 10000, -}; -ttypes.SyncCategory = { - "PROFILE": 0, - "SETTINGS": 1, - "OPS": 2, - "CONTACT": 3, - "RECOMMEND": 4, - "BLOCK": 5, - "GROUP": 6, - "ROOM": 7, - "NOTIFICATION": 8, - "ADDRESS_BOOK": 9, -}; -ttypes.TMessageBoxStatus = { "ACTIVATED": 1, "UNREAD": 2 }; -ttypes.UniversalNotificationServiceErrorCode = { - "INTERNAL_ERROR": 0, - "INVALID_KEY": 1, - "ILLEGAL_ARGUMENT": 2, - "TOO_MANY_REQUEST": 3, - "AUTHENTICATION_FAILED": 4, - "NO_WRITE_PERMISSION": 5, -}; -ttypes.UnregistrationReason = { "UNREGISTRATION_REASON_UNREGISTER_USER": 1, "UNREGISTRATION_REASON_UNBIND_DEVICE": 2 }; -ttypes.UserAgeType = { "OVER": 1, "UNDER": 2, "UNDEFINED": 3 }; -ttypes.VerificationMethod = { "NO_AVAILABLE": 0, "PIN_VIA_SMS": 1, "CALLERID_INDIGO": 2, "PIN_VIA_TTS": 4, "SKIP": 10 }; -ttypes.VerificationResult = { - "FAILED": 0, - "OK_NOT_REGISTERED_YET": 1, - "OK_REGISTERED_WITH_SAME_DEVICE": 2, - "OK_REGISTERED_WITH_ANOTHER_DEVICE": 3, -}; -ttypes.WapInvitationType = { "REGISTRATION": 1, "CHAT": 2 }; -ttypes.MediaType = { "AUDIO": 1, "VIDEO": 2 }; -ttypes.SQErrorCode = { - "UNKNOWN": 0, - "ILLEGAL_ARGUMENT": 400, - "AUTHENTICATION_FAILURE": 401, - "FORBIDDEN": 403, - "NOT_FOUND": 404, - "REVISION_MISMATCH": 409, - "PRECONDITION_FAILED": 410, - "INTERNAL_ERROR": 500, - "NOT_IMPLEMENTED": 501, - "TRY_AGAIN_LATER": 505, -}; -ttypes.SquareEventType = { - "RECEIVE_MESSAGE": 0, - "SEND_MESSAGE": 1, - "NOTIFIED_JOIN_SQUARE_CHAT": 2, - "NOTIFIED_INVITE_INTO_SQUARE_CHAT": 3, - "NOTIFIED_LEAVE_SQUARE_CHAT": 4, - "NOTIFIED_DESTROY_MESSAGE": 5, - "NOTIFIED_MARK_AS_READ": 6, - "NOTIFIED_UPDATE_SQUARE_MEMBER_PROFILE": 7, - "NOTIFIED_KICKOUT_FROM_SQUARE": 19, - "NOTIFIED_SHUTDOWN_SQUARE": 18, - "NOTIFIED_DELETE_SQUARE_CHAT": 20, - "NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_NAME": 30, - "NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_IMAGE": 31, - "NOTIFIED_UPDATE_SQUARE_CHAT_ANNOUNCEMENT": 37, - "NOTIFIED_ADD_BOT": 33, - "NOTIFIED_REMOVE_BOT": 34, - "NOTIFIED_UPDATE_SQUARE": 8, - "NOTIFIED_UPDATE_SQUARE_STATUS": 9, - "NOTIFIED_UPDATE_SQUARE_AUTHORITY": 10, - "NOTIFIED_UPDATE_SQUARE_MEMBER": 11, - "NOTIFIED_UPDATE_SQUARE_CHAT": 12, - "NOTIFIED_UPDATE_SQUARE_CHAT_STATUS": 13, - "NOTIFIED_UPDATE_SQUARE_CHAT_MEMBER": 14, - "NOTIFIED_CREATE_SQUARE_MEMBER": 15, - "NOTIFIED_CREATE_SQUARE_CHAT_MEMBER": 16, - "NOTIFIED_UPDATE_SQUARE_MEMBER_RELATION": 17, - "NOTIFIED_UPDATE_SQUARE_FEATURE_SET": 32, - "NOTIFIED_UPDATE_SQUARE_NOTE_STATUS": 36, - "NOTIFICATION_JOIN_REQUEST": 21, - "NOTIFICATION_JOINED": 22, - "NOTIFICATION_PROMOTED_COADMIN": 23, - "NOTIFICATION_PROMOTED_ADMIN": 24, - "NOTIFICATION_DEMOTED_MEMBER": 25, - "NOTIFICATION_KICKED_OUT": 26, - "NOTIFICATION_SQUARE_DELETE": 27, - "NOTIFICATION_SQUARE_CHAT_DELETE": 28, - "NOTIFICATION_MESSAGE": 29, -}; -ttypes.SquareMemberRelationState = { "NONE": 1, "BLOCKED": 2 }; -ttypes.SquareFeatureControlState = { "DISABLED": 1, "ENABLED": 2 }; -ttypes.BooleanState = { "NONE": 0, "OFF": 1, "ON": 2 }; -ttypes.SquareType = { "CLOSED": 0, "OPEN": 1 }; -ttypes.SquareChatType = { "OPEN": 1, "SECRET": 2, "ONE_ON_ONE": 3, "SQUARE_DEFAULT": 4 }; -ttypes.SquareErrorCode = { - "UNKNOWN": 0, - "INTERNAL_ERROR": 500, - "NOT_IMPLEMENTED": 501, - "TRY_AGAIN_LATER": 503, - "MAINTENANCE": 505, - "ILLEGAL_ARGUMENT": 400, - "AUTHENTICATION_FAILURE": 401, - "FORBIDDEN": 403, - "NOT_FOUND": 404, - "REVISION_MISMATCH": 409, - "PRECONDITION_FAILED": 410, -}; -ttypes.SquareChatState = { "ALIVE": 0, "DELETED": 1, "SUSPENDED": 2 }; -ttypes.SquareFeatureSetAttribute = { "CREATING_SECRET_SQUARE_CHAT": 1, "INVITING_INTO_OPEN_SQUARE_CHAT": 2 }; -ttypes.SquareMembershipState = { - "JOIN_REQUESTED": 1, - "JOINED": 2, - "REJECTED": 3, - "LEFT": 4, - "KICK_OUT": 5, - "BANNED": 6, - "DELETED": 7, -}; -ttypes.SquareChatMemberAttribute = { "MEMBERSHIP_STATE": 4, "NOTIFICATION_MESSAGE": 6 }; -ttypes.SquareMemberRole = { "ADMIN": 1, "CO_ADMIN": 2, "MEMBER": 10 }; -ttypes.PreconditionFailedExtraInfo = { "DUPLICATED_DISPLAY_NAME": 0 }; -ttypes.SquareChatMembershipState = { "JOINED": 1, "LEFT": 2 }; -ttypes.FetchDirection = { "FORWARD": 1, "BACKWARD": 2 }; -ttypes.SquareAttribute = { - "NAME": 1, - "WELCOME_MESSAGE": 2, - "PROFILE_IMAGE": 3, - "DESCRIPTION": 4, - "SEARCHABLE": 6, - "CATEGORY": 7, - "INVITATION_URL": 8, - "ABLE_TO_USE_INVITATION_URL": 9, - "STATE": 10, -}; -ttypes.SquareAuthorityAttribute = { - "UPDATE_SQUARE_PROFILE": 1, - "INVITE_NEW_MEMBER": 2, - "APPROVE_JOIN_REQUEST": 3, - "CREATE_POST": 4, - "CREATE_OPEN_SQUARE_CHAT": 5, - "DELETE_SQUARE_CHAT_OR_POST": 6, - "REMOVE_SQUARE_MEMBER": 7, - "GRANT_ROLE": 8, - "ENABLE_INVITATION_TICKET": 9, - "CREATE_CHAT_ANNOUNCEMENT": 10, -}; -ttypes.SquareEventStatus = { "NORMAL": 1, "ALERT_DISABLED": 2 }; -ttypes.SuggestDictionaryIncrementStatus = { - "SUCCESS": 0, - "INVALID_REVISION": 1, - "TOO_LARGE_DATA": 2, - "SCHEME_CHANGED": 3, - "RETRY": 4, - "FAIL": 5, - "TOO_OLD_DATA": 6, -}; - -ttypes.Location = function (args) { - this.title = null; - this.address = null; - this.latitude = null; - this.longitude = null; - this.phone = null; - if (args) { - if (args.title !== undefined && args.title !== null) { - this.title = args.title; - } - if (args.address !== undefined && args.address !== null) { - this.address = args.address; - } - if (args.latitude !== undefined && args.latitude !== null) { - this.latitude = args.latitude; - } - if (args.longitude !== undefined && args.longitude !== null) { - this.longitude = args.longitude; - } - if (args.phone !== undefined && args.phone !== null) { - this.phone = args.phone; - } - } -}; -ttypes.Location.prototype = {}; -ttypes.Location.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.title = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.address = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.DOUBLE) { - this.latitude = input.readDouble(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.DOUBLE) { - this.longitude = input.readDouble(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.phone = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.Location.prototype.write = function (output) { - output.writeStructBegin("Location"); - if (this.title !== null && this.title !== undefined) { - output.writeFieldBegin("title", Thrift.Type.STRING, 1); - output.writeString(this.title); - output.writeFieldEnd(); - } - if (this.address !== null && this.address !== undefined) { - output.writeFieldBegin("address", Thrift.Type.STRING, 2); - output.writeString(this.address); - output.writeFieldEnd(); - } - if (this.latitude !== null && this.latitude !== undefined) { - output.writeFieldBegin("latitude", Thrift.Type.DOUBLE, 3); - output.writeDouble(this.latitude); - output.writeFieldEnd(); - } - if (this.longitude !== null && this.longitude !== undefined) { - output.writeFieldBegin("longitude", Thrift.Type.DOUBLE, 4); - output.writeDouble(this.longitude); - output.writeFieldEnd(); - } - if (this.phone !== null && this.phone !== undefined) { - output.writeFieldBegin("phone", Thrift.Type.STRING, 5); - output.writeString(this.phone); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.MessageBoxV2MessageId = function (args) { - this.deliveredTime = null; - this.messageId = null; - if (args) { - if (args.deliveredTime !== undefined && args.deliveredTime !== null) { - this.deliveredTime = args.deliveredTime; - } - if (args.messageId !== undefined && args.messageId !== null) { - this.messageId = args.messageId; - } - } -}; -ttypes.MessageBoxV2MessageId.prototype = {}; -ttypes.MessageBoxV2MessageId.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.deliveredTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.messageId = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.MessageBoxV2MessageId.prototype.write = function (output) { - output.writeStructBegin("MessageBoxV2MessageId"); - if (this.deliveredTime !== null && this.deliveredTime !== undefined) { - output.writeFieldBegin("deliveredTime", Thrift.Type.I64, 1); - output.writeI64(this.deliveredTime); - output.writeFieldEnd(); - } - if (this.messageId !== null && this.messageId !== undefined) { - output.writeFieldBegin("messageId", Thrift.Type.I64, 2); - output.writeI64(this.messageId); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.MessageCommitResult = function (args) { - this.requestId = null; - this.state = null; - this.messageStoreRequestId = null; - this.messageIds = null; - this.receiverCount = null; - this.successCount = null; - this.failCount = null; - this.blockCount = null; - this.unregisteredCount = null; - this.unrelatedCount = null; - this.errorDescription = null; - if (args) { - if (args.requestId !== undefined && args.requestId !== null) { - this.requestId = args.requestId; - } - if (args.state !== undefined && args.state !== null) { - this.state = args.state; - } - if (args.messageStoreRequestId !== undefined && args.messageStoreRequestId !== null) { - this.messageStoreRequestId = args.messageStoreRequestId; - } - if (args.messageIds !== undefined && args.messageIds !== null) { - this.messageIds = Thrift.copyList(args.messageIds, [null]); - } - if (args.receiverCount !== undefined && args.receiverCount !== null) { - this.receiverCount = args.receiverCount; - } - if (args.successCount !== undefined && args.successCount !== null) { - this.successCount = args.successCount; - } - if (args.failCount !== undefined && args.failCount !== null) { - this.failCount = args.failCount; - } - if (args.blockCount !== undefined && args.blockCount !== null) { - this.blockCount = args.blockCount; - } - if (args.unregisteredCount !== undefined && args.unregisteredCount !== null) { - this.unregisteredCount = args.unregisteredCount; - } - if (args.unrelatedCount !== undefined && args.unrelatedCount !== null) { - this.unrelatedCount = args.unrelatedCount; - } - if (args.errorDescription !== undefined && args.errorDescription !== null) { - this.errorDescription = args.errorDescription; - } - } -}; -ttypes.MessageCommitResult.prototype = {}; -ttypes.MessageCommitResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.requestId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.state = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.messageStoreRequestId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.LIST) { - this.messageIds = []; - var _rtmp31 = input.readListBegin(); - var _size0 = _rtmp31.size || 0; - for (var _i2 = 0; _i2 < _size0; ++_i2) { - var elem3 = null; - elem3 = input.readString(); - this.messageIds.push(elem3); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.I64) { - this.receiverCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.I64) { - this.successCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 13: - if (ftype == Thrift.Type.I64) { - this.failCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 14: - if (ftype == Thrift.Type.I64) { - this.blockCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 15: - if (ftype == Thrift.Type.I64) { - this.unregisteredCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 16: - if (ftype == Thrift.Type.I64) { - this.unrelatedCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 21: - if (ftype == Thrift.Type.STRING) { - this.errorDescription = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.MessageCommitResult.prototype.write = function (output) { - output.writeStructBegin("MessageCommitResult"); - if (this.requestId !== null && this.requestId !== undefined) { - output.writeFieldBegin("requestId", Thrift.Type.STRING, 1); - output.writeString(this.requestId); - output.writeFieldEnd(); - } - if (this.state !== null && this.state !== undefined) { - output.writeFieldBegin("state", Thrift.Type.I32, 2); - output.writeI32(this.state); - output.writeFieldEnd(); - } - if (this.messageStoreRequestId !== null && this.messageStoreRequestId !== undefined) { - output.writeFieldBegin("messageStoreRequestId", Thrift.Type.STRING, 3); - output.writeString(this.messageStoreRequestId); - output.writeFieldEnd(); - } - if (this.messageIds !== null && this.messageIds !== undefined) { - output.writeFieldBegin("messageIds", Thrift.Type.LIST, 4); - output.writeListBegin(Thrift.Type.STRING, this.messageIds.length); - for (var iter4 in this.messageIds) { - if (this.messageIds.hasOwnProperty(iter4)) { - iter4 = this.messageIds[iter4]; - output.writeString(iter4); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.receiverCount !== null && this.receiverCount !== undefined) { - output.writeFieldBegin("receiverCount", Thrift.Type.I64, 11); - output.writeI64(this.receiverCount); - output.writeFieldEnd(); - } - if (this.successCount !== null && this.successCount !== undefined) { - output.writeFieldBegin("successCount", Thrift.Type.I64, 12); - output.writeI64(this.successCount); - output.writeFieldEnd(); - } - if (this.failCount !== null && this.failCount !== undefined) { - output.writeFieldBegin("failCount", Thrift.Type.I64, 13); - output.writeI64(this.failCount); - output.writeFieldEnd(); - } - if (this.blockCount !== null && this.blockCount !== undefined) { - output.writeFieldBegin("blockCount", Thrift.Type.I64, 14); - output.writeI64(this.blockCount); - output.writeFieldEnd(); - } - if (this.unregisteredCount !== null && this.unregisteredCount !== undefined) { - output.writeFieldBegin("unregisteredCount", Thrift.Type.I64, 15); - output.writeI64(this.unregisteredCount); - output.writeFieldEnd(); - } - if (this.unrelatedCount !== null && this.unrelatedCount !== undefined) { - output.writeFieldBegin("unrelatedCount", Thrift.Type.I64, 16); - output.writeI64(this.unrelatedCount); - output.writeFieldEnd(); - } - if (this.errorDescription !== null && this.errorDescription !== undefined) { - output.writeFieldBegin("errorDescription", Thrift.Type.STRING, 21); - output.writeString(this.errorDescription); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.CallHost = function (args) { - this.host = null; - this.port = null; - this.zone = null; - if (args) { - if (args.host !== undefined && args.host !== null) { - this.host = args.host; - } - if (args.port !== undefined && args.port !== null) { - this.port = args.port; - } - if (args.zone !== undefined && args.zone !== null) { - this.zone = args.zone; - } - } -}; -ttypes.CallHost.prototype = {}; -ttypes.CallHost.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.host = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.port = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.zone = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.CallHost.prototype.write = function (output) { - output.writeStructBegin("CallHost"); - if (this.host !== null && this.host !== undefined) { - output.writeFieldBegin("host", Thrift.Type.STRING, 1); - output.writeString(this.host); - output.writeFieldEnd(); - } - if (this.port !== null && this.port !== undefined) { - output.writeFieldBegin("port", Thrift.Type.I32, 2); - output.writeI32(this.port); - output.writeFieldEnd(); - } - if (this.zone !== null && this.zone !== undefined) { - output.writeFieldBegin("zone", Thrift.Type.STRING, 3); - output.writeString(this.zone); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.AgeCheckDocomoResult = function (args) { - this.authUrl = null; - this.userAgeType = null; - if (args) { - if (args.authUrl !== undefined && args.authUrl !== null) { - this.authUrl = args.authUrl; - } - if (args.userAgeType !== undefined && args.userAgeType !== null) { - this.userAgeType = args.userAgeType; - } - } -}; -ttypes.AgeCheckDocomoResult.prototype = {}; -ttypes.AgeCheckDocomoResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.authUrl = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.userAgeType = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.AgeCheckDocomoResult.prototype.write = function (output) { - output.writeStructBegin("AgeCheckDocomoResult"); - if (this.authUrl !== null && this.authUrl !== undefined) { - output.writeFieldBegin("authUrl", Thrift.Type.STRING, 1); - output.writeString(this.authUrl); - output.writeFieldEnd(); - } - if (this.userAgeType !== null && this.userAgeType !== undefined) { - output.writeFieldBegin("userAgeType", Thrift.Type.I32, 2); - output.writeI32(this.userAgeType); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.AgeCheckRequestResult = function (args) { - this.authUrl = null; - this.sessionId = null; - if (args) { - if (args.authUrl !== undefined && args.authUrl !== null) { - this.authUrl = args.authUrl; - } - if (args.sessionId !== undefined && args.sessionId !== null) { - this.sessionId = args.sessionId; - } - } -}; -ttypes.AgeCheckRequestResult.prototype = {}; -ttypes.AgeCheckRequestResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.authUrl = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.sessionId = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.AgeCheckRequestResult.prototype.write = function (output) { - output.writeStructBegin("AgeCheckRequestResult"); - if (this.authUrl !== null && this.authUrl !== undefined) { - output.writeFieldBegin("authUrl", Thrift.Type.STRING, 1); - output.writeString(this.authUrl); - output.writeFieldEnd(); - } - if (this.sessionId !== null && this.sessionId !== undefined) { - output.writeFieldBegin("sessionId", Thrift.Type.STRING, 2); - output.writeString(this.sessionId); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.TextMessageAnnouncementContents = function (args) { - this.messageId = null; - this.text = null; - this.senderSquareMemberMid = null; - this.createdAt = null; - if (args) { - if (args.messageId !== undefined && args.messageId !== null) { - this.messageId = args.messageId; - } - if (args.text !== undefined && args.text !== null) { - this.text = args.text; - } - if (args.senderSquareMemberMid !== undefined && args.senderSquareMemberMid !== null) { - this.senderSquareMemberMid = args.senderSquareMemberMid; - } - if (args.createdAt !== undefined && args.createdAt !== null) { - this.createdAt = args.createdAt; - } - } -}; -ttypes.TextMessageAnnouncementContents.prototype = {}; -ttypes.TextMessageAnnouncementContents.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.messageId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.text = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.senderSquareMemberMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I64) { - this.createdAt = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.TextMessageAnnouncementContents.prototype.write = function (output) { - output.writeStructBegin("TextMessageAnnouncementContents"); - if (this.messageId !== null && this.messageId !== undefined) { - output.writeFieldBegin("messageId", Thrift.Type.STRING, 1); - output.writeString(this.messageId); - output.writeFieldEnd(); - } - if (this.text !== null && this.text !== undefined) { - output.writeFieldBegin("text", Thrift.Type.STRING, 2); - output.writeString(this.text); - output.writeFieldEnd(); - } - if (this.senderSquareMemberMid !== null && this.senderSquareMemberMid !== undefined) { - output.writeFieldBegin("senderSquareMemberMid", Thrift.Type.STRING, 3); - output.writeString(this.senderSquareMemberMid); - output.writeFieldEnd(); - } - if (this.createdAt !== null && this.createdAt !== undefined) { - output.writeFieldBegin("createdAt", Thrift.Type.I64, 4); - output.writeI64(this.createdAt); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareChatAnnouncementContents = function (args) { - this.textMessageAnnouncementContents = null; - if (args) { - if (args.textMessageAnnouncementContents !== undefined && args.textMessageAnnouncementContents !== null) { - this.textMessageAnnouncementContents = new ttypes.TextMessageAnnouncementContents( - args.textMessageAnnouncementContents, - ); - } - } -}; -ttypes.SquareChatAnnouncementContents.prototype = {}; -ttypes.SquareChatAnnouncementContents.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.textMessageAnnouncementContents = new ttypes.TextMessageAnnouncementContents(); - this.textMessageAnnouncementContents.read(input); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareChatAnnouncementContents.prototype.write = function (output) { - output.writeStructBegin("SquareChatAnnouncementContents"); - if (this.textMessageAnnouncementContents !== null && this.textMessageAnnouncementContents !== undefined) { - output.writeFieldBegin("textMessageAnnouncementContents", Thrift.Type.STRUCT, 1); - this.textMessageAnnouncementContents.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareChatAnnouncement = function (args) { - this.announcementSeq = null; - this.type = null; - this.contents = null; - if (args) { - if (args.announcementSeq !== undefined && args.announcementSeq !== null) { - this.announcementSeq = args.announcementSeq; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.contents !== undefined && args.contents !== null) { - this.contents = new ttypes.SquareChatAnnouncementContents(args.contents); - } - } -}; -ttypes.SquareChatAnnouncement.prototype = {}; -ttypes.SquareChatAnnouncement.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.announcementSeq = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.type = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.contents = new ttypes.SquareChatAnnouncementContents(); - this.contents.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareChatAnnouncement.prototype.write = function (output) { - output.writeStructBegin("SquareChatAnnouncement"); - if (this.announcementSeq !== null && this.announcementSeq !== undefined) { - output.writeFieldBegin("announcementSeq", Thrift.Type.I64, 1); - output.writeI64(this.announcementSeq); - output.writeFieldEnd(); - } - if (this.type !== null && this.type !== undefined) { - output.writeFieldBegin("type", Thrift.Type.I32, 2); - output.writeI32(this.type); - output.writeFieldEnd(); - } - if (this.contents !== null && this.contents !== undefined) { - output.writeFieldBegin("contents", Thrift.Type.STRUCT, 3); - this.contents.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.Announcement = function (args) { - this.index = null; - this.forceUpdate = null; - this.title = null; - this.text = null; - this.createdTime = null; - this.pictureUrl = null; - this.thumbnailUrl = null; - if (args) { - if (args.index !== undefined && args.index !== null) { - this.index = args.index; - } - if (args.forceUpdate !== undefined && args.forceUpdate !== null) { - this.forceUpdate = args.forceUpdate; - } - if (args.title !== undefined && args.title !== null) { - this.title = args.title; - } - if (args.text !== undefined && args.text !== null) { - this.text = args.text; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.pictureUrl !== undefined && args.pictureUrl !== null) { - this.pictureUrl = args.pictureUrl; - } - if (args.thumbnailUrl !== undefined && args.thumbnailUrl !== null) { - this.thumbnailUrl = args.thumbnailUrl; - } - } -}; -ttypes.Announcement.prototype = {}; -ttypes.Announcement.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.index = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.BOOL) { - this.forceUpdate = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.STRING) { - this.title = input.readString(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.STRING) { - this.text = input.readString(); - } else { - input.skip(ftype); - } - break; - case 13: - if (ftype == Thrift.Type.I64) { - this.createdTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 14: - if (ftype == Thrift.Type.STRING) { - this.pictureUrl = input.readString(); - } else { - input.skip(ftype); - } - break; - case 15: - if (ftype == Thrift.Type.STRING) { - this.thumbnailUrl = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.Announcement.prototype.write = function (output) { - output.writeStructBegin("Announcement"); - if (this.index !== null && this.index !== undefined) { - output.writeFieldBegin("index", Thrift.Type.I32, 1); - output.writeI32(this.index); - output.writeFieldEnd(); - } - if (this.forceUpdate !== null && this.forceUpdate !== undefined) { - output.writeFieldBegin("forceUpdate", Thrift.Type.BOOL, 10); - output.writeBool(this.forceUpdate); - output.writeFieldEnd(); - } - if (this.title !== null && this.title !== undefined) { - output.writeFieldBegin("title", Thrift.Type.STRING, 11); - output.writeString(this.title); - output.writeFieldEnd(); - } - if (this.text !== null && this.text !== undefined) { - output.writeFieldBegin("text", Thrift.Type.STRING, 12); - output.writeString(this.text); - output.writeFieldEnd(); - } - if (this.createdTime !== null && this.createdTime !== undefined) { - output.writeFieldBegin("createdTime", Thrift.Type.I64, 13); - output.writeI64(this.createdTime); - output.writeFieldEnd(); - } - if (this.pictureUrl !== null && this.pictureUrl !== undefined) { - output.writeFieldBegin("pictureUrl", Thrift.Type.STRING, 14); - output.writeString(this.pictureUrl); - output.writeFieldEnd(); - } - if (this.thumbnailUrl !== null && this.thumbnailUrl !== undefined) { - output.writeFieldBegin("thumbnailUrl", Thrift.Type.STRING, 15); - output.writeString(this.thumbnailUrl); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ChannelProvider = function (args) { - this.name = null; - if (args) { - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - } -}; -ttypes.ChannelProvider.prototype = {}; -ttypes.ChannelProvider.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.name = input.readString(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ChannelProvider.prototype.write = function (output) { - output.writeStructBegin("ChannelProvider"); - if (this.name !== null && this.name !== undefined) { - output.writeFieldBegin("name", Thrift.Type.STRING, 1); - output.writeString(this.name); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.E2EEPublicKey = function (args) { - this.version = null; - this.keyId = null; - this.keyData = null; - this.createdTime = null; - if (args) { - if (args.version !== undefined && args.version !== null) { - this.version = args.version; - } - if (args.keyId !== undefined && args.keyId !== null) { - this.keyId = args.keyId; - } - if (args.keyData !== undefined && args.keyData !== null) { - this.keyData = args.keyData; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - } -}; -ttypes.E2EEPublicKey.prototype = {}; -ttypes.E2EEPublicKey.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.version = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.keyId = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.keyData = input.readBinary(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I64) { - this.createdTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.E2EEPublicKey.prototype.write = function (output) { - output.writeStructBegin("E2EEPublicKey"); - if (this.version !== null && this.version !== undefined) { - output.writeFieldBegin("version", Thrift.Type.I32, 1); - output.writeI32(this.version); - output.writeFieldEnd(); - } - if (this.keyId !== null && this.keyId !== undefined) { - output.writeFieldBegin("keyId", Thrift.Type.I32, 2); - output.writeI32(this.keyId); - output.writeFieldEnd(); - } - if (this.keyData !== null && this.keyData !== undefined) { - output.writeFieldBegin("keyData", Thrift.Type.STRING, 4); - output.writeBinary(this.keyData); - output.writeFieldEnd(); - } - if (this.createdTime !== null && this.createdTime !== undefined) { - output.writeFieldBegin("createdTime", Thrift.Type.I64, 5); - output.writeI64(this.createdTime); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ChannelDomain = function (args) { - this.host = null; - this.removed = null; - if (args) { - if (args.host !== undefined && args.host !== null) { - this.host = args.host; - } - if (args.removed !== undefined && args.removed !== null) { - this.removed = args.removed; - } - } -}; -ttypes.ChannelDomain.prototype = {}; -ttypes.ChannelDomain.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.host = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.BOOL) { - this.removed = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ChannelDomain.prototype.write = function (output) { - output.writeStructBegin("ChannelDomain"); - if (this.host !== null && this.host !== undefined) { - output.writeFieldBegin("host", Thrift.Type.STRING, 1); - output.writeString(this.host); - output.writeFieldEnd(); - } - if (this.removed !== null && this.removed !== undefined) { - output.writeFieldBegin("removed", Thrift.Type.BOOL, 2); - output.writeBool(this.removed); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.E2EENegotiationResult = function (args) { - this.allowedTypes = null; - this.publicKey = null; - if (args) { - if (args.allowedTypes !== undefined && args.allowedTypes !== null) { - this.allowedTypes = Thrift.copyList(args.allowedTypes, [null]); - } - if (args.publicKey !== undefined && args.publicKey !== null) { - this.publicKey = new ttypes.E2EEPublicKey(args.publicKey); - } - } -}; -ttypes.E2EENegotiationResult.prototype = {}; -ttypes.E2EENegotiationResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.SET) { - this.allowedTypes = []; - var _rtmp36 = input.readSetBegin(); - var _size5 = _rtmp36.size || 0; - for (var _i7 = 0; _i7 < _size5; ++_i7) { - var elem8 = null; - elem8 = input.readI32(); - this.allowedTypes.push(elem8); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.publicKey = new ttypes.E2EEPublicKey(); - this.publicKey.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.E2EENegotiationResult.prototype.write = function (output) { - output.writeStructBegin("E2EENegotiationResult"); - if (this.allowedTypes !== null && this.allowedTypes !== undefined) { - output.writeFieldBegin("allowedTypes", Thrift.Type.SET, 1); - output.writeSetBegin(Thrift.Type.I32, this.allowedTypes.length); - for (var iter9 in this.allowedTypes) { - if (this.allowedTypes.hasOwnProperty(iter9)) { - iter9 = this.allowedTypes[iter9]; - output.writeI32(iter9); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - if (this.publicKey !== null && this.publicKey !== undefined) { - output.writeFieldBegin("publicKey", Thrift.Type.STRUCT, 2); - this.publicKey.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.OTPResult = function (args) { - this.otpId = null; - this.otp = null; - if (args) { - if (args.otpId !== undefined && args.otpId !== null) { - this.otpId = args.otpId; - } - if (args.otp !== undefined && args.otp !== null) { - this.otp = args.otp; - } - } -}; -ttypes.OTPResult.prototype = {}; -ttypes.OTPResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.otpId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.otp = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.OTPResult.prototype.write = function (output) { - output.writeStructBegin("OTPResult"); - if (this.otpId !== null && this.otpId !== undefined) { - output.writeFieldBegin("otpId", Thrift.Type.STRING, 1); - output.writeString(this.otpId); - output.writeFieldEnd(); - } - if (this.otp !== null && this.otp !== undefined) { - output.writeFieldBegin("otp", Thrift.Type.STRING, 2); - output.writeString(this.otp); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.Square = function (args) { - this.mid = null; - this.name = null; - this.welcomeMessage = null; - this.profileImageObsHash = null; - this.desc = null; - this.searchable = null; - this.type = null; - this.categoryID = null; - this.invitationURL = null; - this.revision = null; - this.ableToUseInvitationTicket = null; - this.state = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - if (args.welcomeMessage !== undefined && args.welcomeMessage !== null) { - this.welcomeMessage = args.welcomeMessage; - } - if (args.profileImageObsHash !== undefined && args.profileImageObsHash !== null) { - this.profileImageObsHash = args.profileImageObsHash; - } - if (args.desc !== undefined && args.desc !== null) { - this.desc = args.desc; - } - if (args.searchable !== undefined && args.searchable !== null) { - this.searchable = args.searchable; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.categoryID !== undefined && args.categoryID !== null) { - this.categoryID = args.categoryID; - } - if (args.invitationURL !== undefined && args.invitationURL !== null) { - this.invitationURL = args.invitationURL; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.ableToUseInvitationTicket !== undefined && args.ableToUseInvitationTicket !== null) { - this.ableToUseInvitationTicket = args.ableToUseInvitationTicket; - } - if (args.state !== undefined && args.state !== null) { - this.state = args.state; - } - } -}; -ttypes.Square.prototype = {}; -ttypes.Square.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.mid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.name = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.welcomeMessage = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.profileImageObsHash = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.desc = input.readString(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.BOOL) { - this.searchable = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.I32) { - this.type = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 8: - if (ftype == Thrift.Type.I32) { - this.categoryID = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 9: - if (ftype == Thrift.Type.STRING) { - this.invitationURL = input.readString(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.BOOL) { - this.ableToUseInvitationTicket = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.I32) { - this.state = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.Square.prototype.write = function (output) { - output.writeStructBegin("Square"); - if (this.mid !== null && this.mid !== undefined) { - output.writeFieldBegin("mid", Thrift.Type.STRING, 1); - output.writeString(this.mid); - output.writeFieldEnd(); - } - if (this.name !== null && this.name !== undefined) { - output.writeFieldBegin("name", Thrift.Type.STRING, 2); - output.writeString(this.name); - output.writeFieldEnd(); - } - if (this.welcomeMessage !== null && this.welcomeMessage !== undefined) { - output.writeFieldBegin("welcomeMessage", Thrift.Type.STRING, 3); - output.writeString(this.welcomeMessage); - output.writeFieldEnd(); - } - if (this.profileImageObsHash !== null && this.profileImageObsHash !== undefined) { - output.writeFieldBegin("profileImageObsHash", Thrift.Type.STRING, 4); - output.writeString(this.profileImageObsHash); - output.writeFieldEnd(); - } - if (this.desc !== null && this.desc !== undefined) { - output.writeFieldBegin("desc", Thrift.Type.STRING, 5); - output.writeString(this.desc); - output.writeFieldEnd(); - } - if (this.searchable !== null && this.searchable !== undefined) { - output.writeFieldBegin("searchable", Thrift.Type.BOOL, 6); - output.writeBool(this.searchable); - output.writeFieldEnd(); - } - if (this.type !== null && this.type !== undefined) { - output.writeFieldBegin("type", Thrift.Type.I32, 7); - output.writeI32(this.type); - output.writeFieldEnd(); - } - if (this.categoryID !== null && this.categoryID !== undefined) { - output.writeFieldBegin("categoryID", Thrift.Type.I32, 8); - output.writeI32(this.categoryID); - output.writeFieldEnd(); - } - if (this.invitationURL !== null && this.invitationURL !== undefined) { - output.writeFieldBegin("invitationURL", Thrift.Type.STRING, 9); - output.writeString(this.invitationURL); - output.writeFieldEnd(); - } - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 10); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - if (this.ableToUseInvitationTicket !== null && this.ableToUseInvitationTicket !== undefined) { - output.writeFieldBegin("ableToUseInvitationTicket", Thrift.Type.BOOL, 11); - output.writeBool(this.ableToUseInvitationTicket); - output.writeFieldEnd(); - } - if (this.state !== null && this.state !== undefined) { - output.writeFieldBegin("state", Thrift.Type.I32, 12); - output.writeI32(this.state); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareAuthority = function (args) { - this.squareMid = null; - this.updateSquareProfile = null; - this.inviteNewMember = null; - this.approveJoinRequest = null; - this.createPost = null; - this.createOpenSquareChat = null; - this.deleteSquareChatOrPost = null; - this.removeSquareMember = null; - this.grantRole = null; - this.enableInvitationTicket = null; - this.revision = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.updateSquareProfile !== undefined && args.updateSquareProfile !== null) { - this.updateSquareProfile = args.updateSquareProfile; - } - if (args.inviteNewMember !== undefined && args.inviteNewMember !== null) { - this.inviteNewMember = args.inviteNewMember; - } - if (args.approveJoinRequest !== undefined && args.approveJoinRequest !== null) { - this.approveJoinRequest = args.approveJoinRequest; - } - if (args.createPost !== undefined && args.createPost !== null) { - this.createPost = args.createPost; - } - if (args.createOpenSquareChat !== undefined && args.createOpenSquareChat !== null) { - this.createOpenSquareChat = args.createOpenSquareChat; - } - if (args.deleteSquareChatOrPost !== undefined && args.deleteSquareChatOrPost !== null) { - this.deleteSquareChatOrPost = args.deleteSquareChatOrPost; - } - if (args.removeSquareMember !== undefined && args.removeSquareMember !== null) { - this.removeSquareMember = args.removeSquareMember; - } - if (args.grantRole !== undefined && args.grantRole !== null) { - this.grantRole = args.grantRole; - } - if (args.enableInvitationTicket !== undefined && args.enableInvitationTicket !== null) { - this.enableInvitationTicket = args.enableInvitationTicket; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - } -}; -ttypes.SquareAuthority.prototype = {}; -ttypes.SquareAuthority.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.updateSquareProfile = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.inviteNewMember = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.approveJoinRequest = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I32) { - this.createPost = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.I32) { - this.createOpenSquareChat = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.I32) { - this.deleteSquareChatOrPost = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 8: - if (ftype == Thrift.Type.I32) { - this.removeSquareMember = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 9: - if (ftype == Thrift.Type.I32) { - this.grantRole = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.I32) { - this.enableInvitationTicket = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareAuthority.prototype.write = function (output) { - output.writeStructBegin("SquareAuthority"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 1); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.updateSquareProfile !== null && this.updateSquareProfile !== undefined) { - output.writeFieldBegin("updateSquareProfile", Thrift.Type.I32, 2); - output.writeI32(this.updateSquareProfile); - output.writeFieldEnd(); - } - if (this.inviteNewMember !== null && this.inviteNewMember !== undefined) { - output.writeFieldBegin("inviteNewMember", Thrift.Type.I32, 3); - output.writeI32(this.inviteNewMember); - output.writeFieldEnd(); - } - if (this.approveJoinRequest !== null && this.approveJoinRequest !== undefined) { - output.writeFieldBegin("approveJoinRequest", Thrift.Type.I32, 4); - output.writeI32(this.approveJoinRequest); - output.writeFieldEnd(); - } - if (this.createPost !== null && this.createPost !== undefined) { - output.writeFieldBegin("createPost", Thrift.Type.I32, 5); - output.writeI32(this.createPost); - output.writeFieldEnd(); - } - if (this.createOpenSquareChat !== null && this.createOpenSquareChat !== undefined) { - output.writeFieldBegin("createOpenSquareChat", Thrift.Type.I32, 6); - output.writeI32(this.createOpenSquareChat); - output.writeFieldEnd(); - } - if (this.deleteSquareChatOrPost !== null && this.deleteSquareChatOrPost !== undefined) { - output.writeFieldBegin("deleteSquareChatOrPost", Thrift.Type.I32, 7); - output.writeI32(this.deleteSquareChatOrPost); - output.writeFieldEnd(); - } - if (this.removeSquareMember !== null && this.removeSquareMember !== undefined) { - output.writeFieldBegin("removeSquareMember", Thrift.Type.I32, 8); - output.writeI32(this.removeSquareMember); - output.writeFieldEnd(); - } - if (this.grantRole !== null && this.grantRole !== undefined) { - output.writeFieldBegin("grantRole", Thrift.Type.I32, 9); - output.writeI32(this.grantRole); - output.writeFieldEnd(); - } - if (this.enableInvitationTicket !== null && this.enableInvitationTicket !== undefined) { - output.writeFieldBegin("enableInvitationTicket", Thrift.Type.I32, 10); - output.writeI32(this.enableInvitationTicket); - output.writeFieldEnd(); - } - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 11); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquarePreference = function (args) { - this.favoriteTimestamp = null; - this.notiForNewJoinRequest = null; - if (args) { - if (args.favoriteTimestamp !== undefined && args.favoriteTimestamp !== null) { - this.favoriteTimestamp = args.favoriteTimestamp; - } - if (args.notiForNewJoinRequest !== undefined && args.notiForNewJoinRequest !== null) { - this.notiForNewJoinRequest = args.notiForNewJoinRequest; - } - } -}; -ttypes.SquarePreference.prototype = {}; -ttypes.SquarePreference.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.favoriteTimestamp = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.BOOL) { - this.notiForNewJoinRequest = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquarePreference.prototype.write = function (output) { - output.writeStructBegin("SquarePreference"); - if (this.favoriteTimestamp !== null && this.favoriteTimestamp !== undefined) { - output.writeFieldBegin("favoriteTimestamp", Thrift.Type.I64, 1); - output.writeI64(this.favoriteTimestamp); - output.writeFieldEnd(); - } - if (this.notiForNewJoinRequest !== null && this.notiForNewJoinRequest !== undefined) { - output.writeFieldBegin("notiForNewJoinRequest", Thrift.Type.BOOL, 2); - output.writeBool(this.notiForNewJoinRequest); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareMember = function (args) { - this.squareMemberMid = null; - this.squareMid = null; - this.displayName = null; - this.profileImageObsHash = null; - this.ableToReceiveMessage = null; - this.membershipState = null; - this.role = null; - this.revision = null; - this.preference = null; - this.joinMessage = null; - if (args) { - if (args.squareMemberMid !== undefined && args.squareMemberMid !== null) { - this.squareMemberMid = args.squareMemberMid; - } - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.displayName !== undefined && args.displayName !== null) { - this.displayName = args.displayName; - } - if (args.profileImageObsHash !== undefined && args.profileImageObsHash !== null) { - this.profileImageObsHash = args.profileImageObsHash; - } - if (args.ableToReceiveMessage !== undefined && args.ableToReceiveMessage !== null) { - this.ableToReceiveMessage = args.ableToReceiveMessage; - } - if (args.membershipState !== undefined && args.membershipState !== null) { - this.membershipState = args.membershipState; - } - if (args.role !== undefined && args.role !== null) { - this.role = args.role; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.preference !== undefined && args.preference !== null) { - this.preference = new ttypes.SquarePreference(args.preference); - } - if (args.joinMessage !== undefined && args.joinMessage !== null) { - this.joinMessage = args.joinMessage; - } - } -}; -ttypes.SquareMember.prototype = {}; -ttypes.SquareMember.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareMemberMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.displayName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.profileImageObsHash = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.BOOL) { - this.ableToReceiveMessage = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.I32) { - this.membershipState = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 8: - if (ftype == Thrift.Type.I32) { - this.role = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 9: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.STRUCT) { - this.preference = new ttypes.SquarePreference(); - this.preference.read(input); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.STRING) { - this.joinMessage = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareMember.prototype.write = function (output) { - output.writeStructBegin("SquareMember"); - if (this.squareMemberMid !== null && this.squareMemberMid !== undefined) { - output.writeFieldBegin("squareMemberMid", Thrift.Type.STRING, 1); - output.writeString(this.squareMemberMid); - output.writeFieldEnd(); - } - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 2); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.displayName !== null && this.displayName !== undefined) { - output.writeFieldBegin("displayName", Thrift.Type.STRING, 3); - output.writeString(this.displayName); - output.writeFieldEnd(); - } - if (this.profileImageObsHash !== null && this.profileImageObsHash !== undefined) { - output.writeFieldBegin("profileImageObsHash", Thrift.Type.STRING, 4); - output.writeString(this.profileImageObsHash); - output.writeFieldEnd(); - } - if (this.ableToReceiveMessage !== null && this.ableToReceiveMessage !== undefined) { - output.writeFieldBegin("ableToReceiveMessage", Thrift.Type.BOOL, 5); - output.writeBool(this.ableToReceiveMessage); - output.writeFieldEnd(); - } - if (this.membershipState !== null && this.membershipState !== undefined) { - output.writeFieldBegin("membershipState", Thrift.Type.I32, 7); - output.writeI32(this.membershipState); - output.writeFieldEnd(); - } - if (this.role !== null && this.role !== undefined) { - output.writeFieldBegin("role", Thrift.Type.I32, 8); - output.writeI32(this.role); - output.writeFieldEnd(); - } - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 9); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - if (this.preference !== null && this.preference !== undefined) { - output.writeFieldBegin("preference", Thrift.Type.STRUCT, 10); - this.preference.write(output); - output.writeFieldEnd(); - } - if (this.joinMessage !== null && this.joinMessage !== undefined) { - output.writeFieldBegin("joinMessage", Thrift.Type.STRING, 11); - output.writeString(this.joinMessage); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareMemberRelation = function (args) { - this.state = null; - this.revision = null; - if (args) { - if (args.state !== undefined && args.state !== null) { - this.state = args.state; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - } -}; -ttypes.SquareMemberRelation.prototype = {}; -ttypes.SquareMemberRelation.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.state = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareMemberRelation.prototype.write = function (output) { - output.writeStructBegin("SquareMemberRelation"); - if (this.state !== null && this.state !== undefined) { - output.writeFieldBegin("state", Thrift.Type.I32, 1); - output.writeI32(this.state); - output.writeFieldEnd(); - } - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 2); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareFeature = function (args) { - this.controlState = null; - this.booleanValue = null; - if (args) { - if (args.controlState !== undefined && args.controlState !== null) { - this.controlState = args.controlState; - } - if (args.booleanValue !== undefined && args.booleanValue !== null) { - this.booleanValue = args.booleanValue; - } - } -}; -ttypes.SquareFeature.prototype = {}; -ttypes.SquareFeature.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.controlState = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.booleanValue = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareFeature.prototype.write = function (output) { - output.writeStructBegin("SquareFeature"); - if (this.controlState !== null && this.controlState !== undefined) { - output.writeFieldBegin("controlState", Thrift.Type.I32, 1); - output.writeI32(this.controlState); - output.writeFieldEnd(); - } - if (this.booleanValue !== null && this.booleanValue !== undefined) { - output.writeFieldBegin("booleanValue", Thrift.Type.I32, 2); - output.writeI32(this.booleanValue); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareFeatureSet = function (args) { - this.squareMid = null; - this.revision = null; - this.creatingSecretSquareChat = null; - this.invitingIntoOpenSquareChat = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.creatingSecretSquareChat !== undefined && args.creatingSecretSquareChat !== null) { - this.creatingSecretSquareChat = new ttypes.SquareFeature(args.creatingSecretSquareChat); - } - if (args.invitingIntoOpenSquareChat !== undefined && args.invitingIntoOpenSquareChat !== null) { - this.invitingIntoOpenSquareChat = new ttypes.SquareFeature(args.invitingIntoOpenSquareChat); - } - } -}; -ttypes.SquareFeatureSet.prototype = {}; -ttypes.SquareFeatureSet.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.STRUCT) { - this.creatingSecretSquareChat = new ttypes.SquareFeature(); - this.creatingSecretSquareChat.read(input); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.STRUCT) { - this.invitingIntoOpenSquareChat = new ttypes.SquareFeature(); - this.invitingIntoOpenSquareChat.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareFeatureSet.prototype.write = function (output) { - output.writeStructBegin("SquareFeatureSet"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 1); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 2); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - if (this.creatingSecretSquareChat !== null && this.creatingSecretSquareChat !== undefined) { - output.writeFieldBegin("creatingSecretSquareChat", Thrift.Type.STRUCT, 11); - this.creatingSecretSquareChat.write(output); - output.writeFieldEnd(); - } - if (this.invitingIntoOpenSquareChat !== null && this.invitingIntoOpenSquareChat !== undefined) { - output.writeFieldBegin("invitingIntoOpenSquareChat", Thrift.Type.STRUCT, 12); - this.invitingIntoOpenSquareChat.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareStatus = function (args) { - this.memberCount = null; - this.joinRequestCount = null; - this.lastJoinRequestAt = null; - this.openChatCount = null; - if (args) { - if (args.memberCount !== undefined && args.memberCount !== null) { - this.memberCount = args.memberCount; - } - if (args.joinRequestCount !== undefined && args.joinRequestCount !== null) { - this.joinRequestCount = args.joinRequestCount; - } - if (args.lastJoinRequestAt !== undefined && args.lastJoinRequestAt !== null) { - this.lastJoinRequestAt = args.lastJoinRequestAt; - } - if (args.openChatCount !== undefined && args.openChatCount !== null) { - this.openChatCount = args.openChatCount; - } - } -}; -ttypes.SquareStatus.prototype = {}; -ttypes.SquareStatus.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.memberCount = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.joinRequestCount = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I64) { - this.lastJoinRequestAt = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.openChatCount = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareStatus.prototype.write = function (output) { - output.writeStructBegin("SquareStatus"); - if (this.memberCount !== null && this.memberCount !== undefined) { - output.writeFieldBegin("memberCount", Thrift.Type.I32, 1); - output.writeI32(this.memberCount); - output.writeFieldEnd(); - } - if (this.joinRequestCount !== null && this.joinRequestCount !== undefined) { - output.writeFieldBegin("joinRequestCount", Thrift.Type.I32, 2); - output.writeI32(this.joinRequestCount); - output.writeFieldEnd(); - } - if (this.lastJoinRequestAt !== null && this.lastJoinRequestAt !== undefined) { - output.writeFieldBegin("lastJoinRequestAt", Thrift.Type.I64, 3); - output.writeI64(this.lastJoinRequestAt); - output.writeFieldEnd(); - } - if (this.openChatCount !== null && this.openChatCount !== undefined) { - output.writeFieldBegin("openChatCount", Thrift.Type.I32, 4); - output.writeI32(this.openChatCount); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareChat = function (args) { - this.squareChatMid = null; - this.squareMid = null; - this.type = null; - this.name = null; - this.chatImageObsHash = null; - this.squareChatRevision = null; - this.maxMemberCount = null; - this.state = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - if (args.chatImageObsHash !== undefined && args.chatImageObsHash !== null) { - this.chatImageObsHash = args.chatImageObsHash; - } - if (args.squareChatRevision !== undefined && args.squareChatRevision !== null) { - this.squareChatRevision = args.squareChatRevision; - } - if (args.maxMemberCount !== undefined && args.maxMemberCount !== null) { - this.maxMemberCount = args.maxMemberCount; - } - if (args.state !== undefined && args.state !== null) { - this.state = args.state; - } - } -}; -ttypes.SquareChat.prototype = {}; -ttypes.SquareChat.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.type = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.name = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.chatImageObsHash = input.readString(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.I64) { - this.squareChatRevision = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.I32) { - this.maxMemberCount = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 8: - if (ftype == Thrift.Type.I32) { - this.state = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareChat.prototype.write = function (output) { - output.writeStructBegin("SquareChat"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 1); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 2); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.type !== null && this.type !== undefined) { - output.writeFieldBegin("type", Thrift.Type.I32, 3); - output.writeI32(this.type); - output.writeFieldEnd(); - } - if (this.name !== null && this.name !== undefined) { - output.writeFieldBegin("name", Thrift.Type.STRING, 4); - output.writeString(this.name); - output.writeFieldEnd(); - } - if (this.chatImageObsHash !== null && this.chatImageObsHash !== undefined) { - output.writeFieldBegin("chatImageObsHash", Thrift.Type.STRING, 5); - output.writeString(this.chatImageObsHash); - output.writeFieldEnd(); - } - if (this.squareChatRevision !== null && this.squareChatRevision !== undefined) { - output.writeFieldBegin("squareChatRevision", Thrift.Type.I64, 6); - output.writeI64(this.squareChatRevision); - output.writeFieldEnd(); - } - if (this.maxMemberCount !== null && this.maxMemberCount !== undefined) { - output.writeFieldBegin("maxMemberCount", Thrift.Type.I32, 7); - output.writeI32(this.maxMemberCount); - output.writeFieldEnd(); - } - if (this.state !== null && this.state !== undefined) { - output.writeFieldBegin("state", Thrift.Type.I32, 8); - output.writeI32(this.state); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.NoteStatus = function (args) { - this.noteCount = null; - this.latestCreatedAt = null; - if (args) { - if (args.noteCount !== undefined && args.noteCount !== null) { - this.noteCount = args.noteCount; - } - if (args.latestCreatedAt !== undefined && args.latestCreatedAt !== null) { - this.latestCreatedAt = args.latestCreatedAt; - } - } -}; -ttypes.NoteStatus.prototype = {}; -ttypes.NoteStatus.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.noteCount = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.latestCreatedAt = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.NoteStatus.prototype.write = function (output) { - output.writeStructBegin("NoteStatus"); - if (this.noteCount !== null && this.noteCount !== undefined) { - output.writeFieldBegin("noteCount", Thrift.Type.I32, 1); - output.writeI32(this.noteCount); - output.writeFieldEnd(); - } - if (this.latestCreatedAt !== null && this.latestCreatedAt !== undefined) { - output.writeFieldBegin("latestCreatedAt", Thrift.Type.I64, 2); - output.writeI64(this.latestCreatedAt); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareInfo = function (args) { - this.square = null; - this.squareStatus = null; - this.squareNoteStatus = null; - if (args) { - if (args.square !== undefined && args.square !== null) { - this.square = new ttypes.Square(args.square); - } - if (args.squareStatus !== undefined && args.squareStatus !== null) { - this.squareStatus = new ttypes.SquareStatus(args.squareStatus); - } - if (args.squareNoteStatus !== undefined && args.squareNoteStatus !== null) { - this.squareNoteStatus = new ttypes.NoteStatus(args.squareNoteStatus); - } - } -}; -ttypes.SquareInfo.prototype = {}; -ttypes.SquareInfo.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.square = new ttypes.Square(); - this.square.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.squareStatus = new ttypes.SquareStatus(); - this.squareStatus.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.squareNoteStatus = new ttypes.NoteStatus(); - this.squareNoteStatus.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareInfo.prototype.write = function (output) { - output.writeStructBegin("SquareInfo"); - if (this.square !== null && this.square !== undefined) { - output.writeFieldBegin("square", Thrift.Type.STRUCT, 1); - this.square.write(output); - output.writeFieldEnd(); - } - if (this.squareStatus !== null && this.squareStatus !== undefined) { - output.writeFieldBegin("squareStatus", Thrift.Type.STRUCT, 2); - this.squareStatus.write(output); - output.writeFieldEnd(); - } - if (this.squareNoteStatus !== null && this.squareNoteStatus !== undefined) { - output.writeFieldBegin("squareNoteStatus", Thrift.Type.STRUCT, 3); - this.squareNoteStatus.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.BotUseInfo = function (args) { - this.botUseAgreementAccepted = null; - this.botInFriends = null; - this.primaryApplication = null; - this.locale = null; - if (args) { - if (args.botUseAgreementAccepted !== undefined && args.botUseAgreementAccepted !== null) { - this.botUseAgreementAccepted = args.botUseAgreementAccepted; - } - if (args.botInFriends !== undefined && args.botInFriends !== null) { - this.botInFriends = args.botInFriends; - } - if (args.primaryApplication !== undefined && args.primaryApplication !== null) { - this.primaryApplication = args.primaryApplication; - } - if (args.locale !== undefined && args.locale !== null) { - this.locale = args.locale; - } - } -}; -ttypes.BotUseInfo.prototype = {}; -ttypes.BotUseInfo.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.BOOL) { - this.botUseAgreementAccepted = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.BOOL) { - this.botInFriends = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.primaryApplication = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.locale = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.BotUseInfo.prototype.write = function (output) { - output.writeStructBegin("BotUseInfo"); - if (this.botUseAgreementAccepted !== null && this.botUseAgreementAccepted !== undefined) { - output.writeFieldBegin("botUseAgreementAccepted", Thrift.Type.BOOL, 1); - output.writeBool(this.botUseAgreementAccepted); - output.writeFieldEnd(); - } - if (this.botInFriends !== null && this.botInFriends !== undefined) { - output.writeFieldBegin("botInFriends", Thrift.Type.BOOL, 2); - output.writeBool(this.botInFriends); - output.writeFieldEnd(); - } - if (this.primaryApplication !== null && this.primaryApplication !== undefined) { - output.writeFieldBegin("primaryApplication", Thrift.Type.STRING, 3); - output.writeString(this.primaryApplication); - output.writeFieldEnd(); - } - if (this.locale !== null && this.locale !== undefined) { - output.writeFieldBegin("locale", Thrift.Type.STRING, 4); - output.writeString(this.locale); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.PaidCallAdCountry = function (args) { - this.countryCode = null; - this.rateDivision = null; - if (args) { - if (args.countryCode !== undefined && args.countryCode !== null) { - this.countryCode = args.countryCode; - } - if (args.rateDivision !== undefined && args.rateDivision !== null) { - this.rateDivision = args.rateDivision; - } - } -}; -ttypes.PaidCallAdCountry.prototype = {}; -ttypes.PaidCallAdCountry.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.countryCode = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.rateDivision = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.PaidCallAdCountry.prototype.write = function (output) { - output.writeStructBegin("PaidCallAdCountry"); - if (this.countryCode !== null && this.countryCode !== undefined) { - output.writeFieldBegin("countryCode", Thrift.Type.STRING, 1); - output.writeString(this.countryCode); - output.writeFieldEnd(); - } - if (this.rateDivision !== null && this.rateDivision !== undefined) { - output.writeFieldBegin("rateDivision", Thrift.Type.STRING, 2); - output.writeString(this.rateDivision); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.PaidCallAdResult = function (args) { - this.adRemains = null; - if (args) { - if (args.adRemains !== undefined && args.adRemains !== null) { - this.adRemains = args.adRemains; - } - } -}; -ttypes.PaidCallAdResult.prototype = {}; -ttypes.PaidCallAdResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.adRemains = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.PaidCallAdResult.prototype.write = function (output) { - output.writeStructBegin("PaidCallAdResult"); - if (this.adRemains !== null && this.adRemains !== undefined) { - output.writeFieldBegin("adRemains", Thrift.Type.I32, 1); - output.writeI32(this.adRemains); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.PaidCallBalance = function (args) { - this.productType = null; - this.productName = null; - this.unit = null; - this.limitedPaidBalance = null; - this.limitedFreeBalance = null; - this.unlimitedPaidBalance = null; - this.unlimitedFreeBalance = null; - this.startTime = null; - this.endTime = null; - this.autopayEnabled = null; - if (args) { - if (args.productType !== undefined && args.productType !== null) { - this.productType = args.productType; - } - if (args.productName !== undefined && args.productName !== null) { - this.productName = args.productName; - } - if (args.unit !== undefined && args.unit !== null) { - this.unit = args.unit; - } - if (args.limitedPaidBalance !== undefined && args.limitedPaidBalance !== null) { - this.limitedPaidBalance = args.limitedPaidBalance; - } - if (args.limitedFreeBalance !== undefined && args.limitedFreeBalance !== null) { - this.limitedFreeBalance = args.limitedFreeBalance; - } - if (args.unlimitedPaidBalance !== undefined && args.unlimitedPaidBalance !== null) { - this.unlimitedPaidBalance = args.unlimitedPaidBalance; - } - if (args.unlimitedFreeBalance !== undefined && args.unlimitedFreeBalance !== null) { - this.unlimitedFreeBalance = args.unlimitedFreeBalance; - } - if (args.startTime !== undefined && args.startTime !== null) { - this.startTime = args.startTime; - } - if (args.endTime !== undefined && args.endTime !== null) { - this.endTime = args.endTime; - } - if (args.autopayEnabled !== undefined && args.autopayEnabled !== null) { - this.autopayEnabled = args.autopayEnabled; - } - } -}; -ttypes.PaidCallBalance.prototype = {}; -ttypes.PaidCallBalance.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.productType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.productName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.unit = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.limitedPaidBalance = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I32) { - this.limitedFreeBalance = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.I32) { - this.unlimitedPaidBalance = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.I32) { - this.unlimitedFreeBalance = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 8: - if (ftype == Thrift.Type.I64) { - this.startTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 9: - if (ftype == Thrift.Type.I64) { - this.endTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.BOOL) { - this.autopayEnabled = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.PaidCallBalance.prototype.write = function (output) { - output.writeStructBegin("PaidCallBalance"); - if (this.productType !== null && this.productType !== undefined) { - output.writeFieldBegin("productType", Thrift.Type.I32, 1); - output.writeI32(this.productType); - output.writeFieldEnd(); - } - if (this.productName !== null && this.productName !== undefined) { - output.writeFieldBegin("productName", Thrift.Type.STRING, 2); - output.writeString(this.productName); - output.writeFieldEnd(); - } - if (this.unit !== null && this.unit !== undefined) { - output.writeFieldBegin("unit", Thrift.Type.STRING, 3); - output.writeString(this.unit); - output.writeFieldEnd(); - } - if (this.limitedPaidBalance !== null && this.limitedPaidBalance !== undefined) { - output.writeFieldBegin("limitedPaidBalance", Thrift.Type.I32, 4); - output.writeI32(this.limitedPaidBalance); - output.writeFieldEnd(); - } - if (this.limitedFreeBalance !== null && this.limitedFreeBalance !== undefined) { - output.writeFieldBegin("limitedFreeBalance", Thrift.Type.I32, 5); - output.writeI32(this.limitedFreeBalance); - output.writeFieldEnd(); - } - if (this.unlimitedPaidBalance !== null && this.unlimitedPaidBalance !== undefined) { - output.writeFieldBegin("unlimitedPaidBalance", Thrift.Type.I32, 6); - output.writeI32(this.unlimitedPaidBalance); - output.writeFieldEnd(); - } - if (this.unlimitedFreeBalance !== null && this.unlimitedFreeBalance !== undefined) { - output.writeFieldBegin("unlimitedFreeBalance", Thrift.Type.I32, 7); - output.writeI32(this.unlimitedFreeBalance); - output.writeFieldEnd(); - } - if (this.startTime !== null && this.startTime !== undefined) { - output.writeFieldBegin("startTime", Thrift.Type.I64, 8); - output.writeI64(this.startTime); - output.writeFieldEnd(); - } - if (this.endTime !== null && this.endTime !== undefined) { - output.writeFieldBegin("endTime", Thrift.Type.I64, 9); - output.writeI64(this.endTime); - output.writeFieldEnd(); - } - if (this.autopayEnabled !== null && this.autopayEnabled !== undefined) { - output.writeFieldBegin("autopayEnabled", Thrift.Type.BOOL, 10); - output.writeBool(this.autopayEnabled); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.PaidCallCurrencyExchangeRate = function (args) { - this.currencyCode = null; - this.currencyName = null; - this.currencySign = null; - this.preferred = null; - this.coinRate = null; - this.creditRate = null; - if (args) { - if (args.currencyCode !== undefined && args.currencyCode !== null) { - this.currencyCode = args.currencyCode; - } - if (args.currencyName !== undefined && args.currencyName !== null) { - this.currencyName = args.currencyName; - } - if (args.currencySign !== undefined && args.currencySign !== null) { - this.currencySign = args.currencySign; - } - if (args.preferred !== undefined && args.preferred !== null) { - this.preferred = args.preferred; - } - if (args.coinRate !== undefined && args.coinRate !== null) { - this.coinRate = args.coinRate; - } - if (args.creditRate !== undefined && args.creditRate !== null) { - this.creditRate = args.creditRate; - } - } -}; -ttypes.PaidCallCurrencyExchangeRate.prototype = {}; -ttypes.PaidCallCurrencyExchangeRate.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.currencyCode = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.currencyName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.currencySign = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.BOOL) { - this.preferred = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.coinRate = input.readString(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRING) { - this.creditRate = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.PaidCallCurrencyExchangeRate.prototype.write = function (output) { - output.writeStructBegin("PaidCallCurrencyExchangeRate"); - if (this.currencyCode !== null && this.currencyCode !== undefined) { - output.writeFieldBegin("currencyCode", Thrift.Type.STRING, 1); - output.writeString(this.currencyCode); - output.writeFieldEnd(); - } - if (this.currencyName !== null && this.currencyName !== undefined) { - output.writeFieldBegin("currencyName", Thrift.Type.STRING, 2); - output.writeString(this.currencyName); - output.writeFieldEnd(); - } - if (this.currencySign !== null && this.currencySign !== undefined) { - output.writeFieldBegin("currencySign", Thrift.Type.STRING, 3); - output.writeString(this.currencySign); - output.writeFieldEnd(); - } - if (this.preferred !== null && this.preferred !== undefined) { - output.writeFieldBegin("preferred", Thrift.Type.BOOL, 4); - output.writeBool(this.preferred); - output.writeFieldEnd(); - } - if (this.coinRate !== null && this.coinRate !== undefined) { - output.writeFieldBegin("coinRate", Thrift.Type.STRING, 5); - output.writeString(this.coinRate); - output.writeFieldEnd(); - } - if (this.creditRate !== null && this.creditRate !== undefined) { - output.writeFieldBegin("creditRate", Thrift.Type.STRING, 6); - output.writeString(this.creditRate); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ExtendedProfileBirthday = function (args) { - this.year = null; - this.yearPrivacyLevelType = null; - this.yearEnabled = null; - this.day = null; - this.dayPrivacyLevelType = null; - this.dayEnabled = null; - if (args) { - if (args.year !== undefined && args.year !== null) { - this.year = args.year; - } - if (args.yearPrivacyLevelType !== undefined && args.yearPrivacyLevelType !== null) { - this.yearPrivacyLevelType = args.yearPrivacyLevelType; - } - if (args.yearEnabled !== undefined && args.yearEnabled !== null) { - this.yearEnabled = args.yearEnabled; - } - if (args.day !== undefined && args.day !== null) { - this.day = args.day; - } - if (args.dayPrivacyLevelType !== undefined && args.dayPrivacyLevelType !== null) { - this.dayPrivacyLevelType = args.dayPrivacyLevelType; - } - if (args.dayEnabled !== undefined && args.dayEnabled !== null) { - this.dayEnabled = args.dayEnabled; - } - } -}; -ttypes.ExtendedProfileBirthday.prototype = {}; -ttypes.ExtendedProfileBirthday.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.year = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.yearPrivacyLevelType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.BOOL) { - this.yearEnabled = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.day = input.readString(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.I32) { - this.dayPrivacyLevelType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.BOOL) { - this.dayEnabled = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ExtendedProfileBirthday.prototype.write = function (output) { - output.writeStructBegin("ExtendedProfileBirthday"); - if (this.year !== null && this.year !== undefined) { - output.writeFieldBegin("year", Thrift.Type.STRING, 1); - output.writeString(this.year); - output.writeFieldEnd(); - } - if (this.yearPrivacyLevelType !== null && this.yearPrivacyLevelType !== undefined) { - output.writeFieldBegin("yearPrivacyLevelType", Thrift.Type.I32, 2); - output.writeI32(this.yearPrivacyLevelType); - output.writeFieldEnd(); - } - if (this.yearEnabled !== null && this.yearEnabled !== undefined) { - output.writeFieldBegin("yearEnabled", Thrift.Type.BOOL, 3); - output.writeBool(this.yearEnabled); - output.writeFieldEnd(); - } - if (this.day !== null && this.day !== undefined) { - output.writeFieldBegin("day", Thrift.Type.STRING, 5); - output.writeString(this.day); - output.writeFieldEnd(); - } - if (this.dayPrivacyLevelType !== null && this.dayPrivacyLevelType !== undefined) { - output.writeFieldBegin("dayPrivacyLevelType", Thrift.Type.I32, 6); - output.writeI32(this.dayPrivacyLevelType); - output.writeFieldEnd(); - } - if (this.dayEnabled !== null && this.dayEnabled !== undefined) { - output.writeFieldBegin("dayEnabled", Thrift.Type.BOOL, 7); - output.writeBool(this.dayEnabled); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ExtendedProfile = function (args) { - this.birthday = null; - if (args) { - if (args.birthday !== undefined && args.birthday !== null) { - this.birthday = new ttypes.ExtendedProfileBirthday(args.birthday); - } - } -}; -ttypes.ExtendedProfile.prototype = {}; -ttypes.ExtendedProfile.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.birthday = new ttypes.ExtendedProfileBirthday(); - this.birthday.read(input); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ExtendedProfile.prototype.write = function (output) { - output.writeStructBegin("ExtendedProfile"); - if (this.birthday !== null && this.birthday !== undefined) { - output.writeFieldBegin("birthday", Thrift.Type.STRUCT, 1); - this.birthday.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.PaidCallDialing = function (args) { - this.type = null; - this.dialedNumber = null; - this.serviceDomain = null; - this.productType = null; - this.productName = null; - this.multipleProduct = null; - this.callerIdStatus = null; - this.balance = null; - this.unit = null; - this.rate = null; - this.displayCode = null; - this.calledNumber = null; - this.calleeNationalNumber = null; - this.calleeCallingCode = null; - this.rateDivision = null; - this.adMaxMin = null; - this.adRemains = null; - this.adSessionId = null; - if (args) { - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.dialedNumber !== undefined && args.dialedNumber !== null) { - this.dialedNumber = args.dialedNumber; - } - if (args.serviceDomain !== undefined && args.serviceDomain !== null) { - this.serviceDomain = args.serviceDomain; - } - if (args.productType !== undefined && args.productType !== null) { - this.productType = args.productType; - } - if (args.productName !== undefined && args.productName !== null) { - this.productName = args.productName; - } - if (args.multipleProduct !== undefined && args.multipleProduct !== null) { - this.multipleProduct = args.multipleProduct; - } - if (args.callerIdStatus !== undefined && args.callerIdStatus !== null) { - this.callerIdStatus = args.callerIdStatus; - } - if (args.balance !== undefined && args.balance !== null) { - this.balance = args.balance; - } - if (args.unit !== undefined && args.unit !== null) { - this.unit = args.unit; - } - if (args.rate !== undefined && args.rate !== null) { - this.rate = args.rate; - } - if (args.displayCode !== undefined && args.displayCode !== null) { - this.displayCode = args.displayCode; - } - if (args.calledNumber !== undefined && args.calledNumber !== null) { - this.calledNumber = args.calledNumber; - } - if (args.calleeNationalNumber !== undefined && args.calleeNationalNumber !== null) { - this.calleeNationalNumber = args.calleeNationalNumber; - } - if (args.calleeCallingCode !== undefined && args.calleeCallingCode !== null) { - this.calleeCallingCode = args.calleeCallingCode; - } - if (args.rateDivision !== undefined && args.rateDivision !== null) { - this.rateDivision = args.rateDivision; - } - if (args.adMaxMin !== undefined && args.adMaxMin !== null) { - this.adMaxMin = args.adMaxMin; - } - if (args.adRemains !== undefined && args.adRemains !== null) { - this.adRemains = args.adRemains; - } - if (args.adSessionId !== undefined && args.adSessionId !== null) { - this.adSessionId = args.adSessionId; - } - } -}; -ttypes.PaidCallDialing.prototype = {}; -ttypes.PaidCallDialing.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.type = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.dialedNumber = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.serviceDomain = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.productType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.productName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.BOOL) { - this.multipleProduct = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.I32) { - this.callerIdStatus = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.I32) { - this.balance = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.STRING) { - this.unit = input.readString(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.I32) { - this.rate = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 13: - if (ftype == Thrift.Type.STRING) { - this.displayCode = input.readString(); - } else { - input.skip(ftype); - } - break; - case 14: - if (ftype == Thrift.Type.STRING) { - this.calledNumber = input.readString(); - } else { - input.skip(ftype); - } - break; - case 15: - if (ftype == Thrift.Type.STRING) { - this.calleeNationalNumber = input.readString(); - } else { - input.skip(ftype); - } - break; - case 16: - if (ftype == Thrift.Type.STRING) { - this.calleeCallingCode = input.readString(); - } else { - input.skip(ftype); - } - break; - case 17: - if (ftype == Thrift.Type.STRING) { - this.rateDivision = input.readString(); - } else { - input.skip(ftype); - } - break; - case 20: - if (ftype == Thrift.Type.I32) { - this.adMaxMin = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 21: - if (ftype == Thrift.Type.I32) { - this.adRemains = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 22: - if (ftype == Thrift.Type.STRING) { - this.adSessionId = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.PaidCallDialing.prototype.write = function (output) { - output.writeStructBegin("PaidCallDialing"); - if (this.type !== null && this.type !== undefined) { - output.writeFieldBegin("type", Thrift.Type.I32, 1); - output.writeI32(this.type); - output.writeFieldEnd(); - } - if (this.dialedNumber !== null && this.dialedNumber !== undefined) { - output.writeFieldBegin("dialedNumber", Thrift.Type.STRING, 2); - output.writeString(this.dialedNumber); - output.writeFieldEnd(); - } - if (this.serviceDomain !== null && this.serviceDomain !== undefined) { - output.writeFieldBegin("serviceDomain", Thrift.Type.STRING, 3); - output.writeString(this.serviceDomain); - output.writeFieldEnd(); - } - if (this.productType !== null && this.productType !== undefined) { - output.writeFieldBegin("productType", Thrift.Type.I32, 4); - output.writeI32(this.productType); - output.writeFieldEnd(); - } - if (this.productName !== null && this.productName !== undefined) { - output.writeFieldBegin("productName", Thrift.Type.STRING, 5); - output.writeString(this.productName); - output.writeFieldEnd(); - } - if (this.multipleProduct !== null && this.multipleProduct !== undefined) { - output.writeFieldBegin("multipleProduct", Thrift.Type.BOOL, 6); - output.writeBool(this.multipleProduct); - output.writeFieldEnd(); - } - if (this.callerIdStatus !== null && this.callerIdStatus !== undefined) { - output.writeFieldBegin("callerIdStatus", Thrift.Type.I32, 7); - output.writeI32(this.callerIdStatus); - output.writeFieldEnd(); - } - if (this.balance !== null && this.balance !== undefined) { - output.writeFieldBegin("balance", Thrift.Type.I32, 10); - output.writeI32(this.balance); - output.writeFieldEnd(); - } - if (this.unit !== null && this.unit !== undefined) { - output.writeFieldBegin("unit", Thrift.Type.STRING, 11); - output.writeString(this.unit); - output.writeFieldEnd(); - } - if (this.rate !== null && this.rate !== undefined) { - output.writeFieldBegin("rate", Thrift.Type.I32, 12); - output.writeI32(this.rate); - output.writeFieldEnd(); - } - if (this.displayCode !== null && this.displayCode !== undefined) { - output.writeFieldBegin("displayCode", Thrift.Type.STRING, 13); - output.writeString(this.displayCode); - output.writeFieldEnd(); - } - if (this.calledNumber !== null && this.calledNumber !== undefined) { - output.writeFieldBegin("calledNumber", Thrift.Type.STRING, 14); - output.writeString(this.calledNumber); - output.writeFieldEnd(); - } - if (this.calleeNationalNumber !== null && this.calleeNationalNumber !== undefined) { - output.writeFieldBegin("calleeNationalNumber", Thrift.Type.STRING, 15); - output.writeString(this.calleeNationalNumber); - output.writeFieldEnd(); - } - if (this.calleeCallingCode !== null && this.calleeCallingCode !== undefined) { - output.writeFieldBegin("calleeCallingCode", Thrift.Type.STRING, 16); - output.writeString(this.calleeCallingCode); - output.writeFieldEnd(); - } - if (this.rateDivision !== null && this.rateDivision !== undefined) { - output.writeFieldBegin("rateDivision", Thrift.Type.STRING, 17); - output.writeString(this.rateDivision); - output.writeFieldEnd(); - } - if (this.adMaxMin !== null && this.adMaxMin !== undefined) { - output.writeFieldBegin("adMaxMin", Thrift.Type.I32, 20); - output.writeI32(this.adMaxMin); - output.writeFieldEnd(); - } - if (this.adRemains !== null && this.adRemains !== undefined) { - output.writeFieldBegin("adRemains", Thrift.Type.I32, 21); - output.writeI32(this.adRemains); - output.writeFieldEnd(); - } - if (this.adSessionId !== null && this.adSessionId !== undefined) { - output.writeFieldBegin("adSessionId", Thrift.Type.STRING, 22); - output.writeString(this.adSessionId); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SpotItem = function (args) { - this.name = null; - this.phone = null; - this.category = null; - this.mid = null; - this.countryAreaCode = null; - this.freePhoneCallable = null; - if (args) { - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - if (args.phone !== undefined && args.phone !== null) { - this.phone = args.phone; - } - if (args.category !== undefined && args.category !== null) { - this.category = args.category; - } - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.countryAreaCode !== undefined && args.countryAreaCode !== null) { - this.countryAreaCode = args.countryAreaCode; - } - if (args.freePhoneCallable !== undefined && args.freePhoneCallable !== null) { - this.freePhoneCallable = args.freePhoneCallable; - } - } -}; -ttypes.SpotItem.prototype = {}; -ttypes.SpotItem.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.name = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.phone = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.category = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.mid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRING) { - this.countryAreaCode = input.readString(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.BOOL) { - this.freePhoneCallable = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SpotItem.prototype.write = function (output) { - output.writeStructBegin("SpotItem"); - if (this.name !== null && this.name !== undefined) { - output.writeFieldBegin("name", Thrift.Type.STRING, 2); - output.writeString(this.name); - output.writeFieldEnd(); - } - if (this.phone !== null && this.phone !== undefined) { - output.writeFieldBegin("phone", Thrift.Type.STRING, 3); - output.writeString(this.phone); - output.writeFieldEnd(); - } - if (this.category !== null && this.category !== undefined) { - output.writeFieldBegin("category", Thrift.Type.I32, 4); - output.writeI32(this.category); - output.writeFieldEnd(); - } - if (this.mid !== null && this.mid !== undefined) { - output.writeFieldBegin("mid", Thrift.Type.STRING, 5); - output.writeString(this.mid); - output.writeFieldEnd(); - } - if (this.countryAreaCode !== null && this.countryAreaCode !== undefined) { - output.writeFieldBegin("countryAreaCode", Thrift.Type.STRING, 6); - output.writeString(this.countryAreaCode); - output.writeFieldEnd(); - } - if (this.freePhoneCallable !== null && this.freePhoneCallable !== undefined) { - output.writeFieldBegin("freePhoneCallable", Thrift.Type.BOOL, 10); - output.writeBool(this.freePhoneCallable); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SpotNearbyItem = function (args) { - this.spotItem = null; - this.location = null; - if (args) { - if (args.spotItem !== undefined && args.spotItem !== null) { - this.spotItem = new ttypes.SpotItem(args.spotItem); - } - if (args.location !== undefined && args.location !== null) { - this.location = new ttypes.Location(args.location); - } - } -}; -ttypes.SpotNearbyItem.prototype = {}; -ttypes.SpotNearbyItem.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.spotItem = new ttypes.SpotItem(); - this.spotItem.read(input); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.STRUCT) { - this.location = new ttypes.Location(); - this.location.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SpotNearbyItem.prototype.write = function (output) { - output.writeStructBegin("SpotNearbyItem"); - if (this.spotItem !== null && this.spotItem !== undefined) { - output.writeFieldBegin("spotItem", Thrift.Type.STRUCT, 2); - this.spotItem.write(output); - output.writeFieldEnd(); - } - if (this.location !== null && this.location !== undefined) { - output.writeFieldBegin("location", Thrift.Type.STRUCT, 11); - this.location.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SpotNearbyResponse = function (args) { - this.spotNearbyItems = null; - if (args) { - if (args.spotNearbyItems !== undefined && args.spotNearbyItems !== null) { - this.spotNearbyItems = Thrift.copyList(args.spotNearbyItems, [ttypes.SpotNearbyItem]); - } - } -}; -ttypes.SpotNearbyResponse.prototype = {}; -ttypes.SpotNearbyResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.spotNearbyItems = []; - var _rtmp311 = input.readListBegin(); - var _size10 = _rtmp311.size || 0; - for (var _i12 = 0; _i12 < _size10; ++_i12) { - var elem13 = null; - elem13 = new ttypes.SpotNearbyItem(); - elem13.read(input); - this.spotNearbyItems.push(elem13); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SpotNearbyResponse.prototype.write = function (output) { - output.writeStructBegin("SpotNearbyResponse"); - if (this.spotNearbyItems !== null && this.spotNearbyItems !== undefined) { - output.writeFieldBegin("spotNearbyItems", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.spotNearbyItems.length); - for (var iter14 in this.spotNearbyItems) { - if (this.spotNearbyItems.hasOwnProperty(iter14)) { - iter14 = this.spotNearbyItems[iter14]; - iter14.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SpotPhoneNumberResponse = function (args) { - this.spotItems = null; - if (args) { - if (args.spotItems !== undefined && args.spotItems !== null) { - this.spotItems = Thrift.copyList(args.spotItems, [ttypes.SpotItem]); - } - } -}; -ttypes.SpotPhoneNumberResponse.prototype = {}; -ttypes.SpotPhoneNumberResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.spotItems = []; - var _rtmp316 = input.readListBegin(); - var _size15 = _rtmp316.size || 0; - for (var _i17 = 0; _i17 < _size15; ++_i17) { - var elem18 = null; - elem18 = new ttypes.SpotItem(); - elem18.read(input); - this.spotItems.push(elem18); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SpotPhoneNumberResponse.prototype.write = function (output) { - output.writeStructBegin("SpotPhoneNumberResponse"); - if (this.spotItems !== null && this.spotItems !== undefined) { - output.writeFieldBegin("spotItems", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.spotItems.length); - for (var iter19 in this.spotItems) { - if (this.spotItems.hasOwnProperty(iter19)) { - iter19 = this.spotItems[iter19]; - iter19.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.PaidCallHistory = function (args) { - this.seq = null; - this.type = null; - this.dialedNumber = null; - this.calledNumber = null; - this.toMid = null; - this.toName = null; - this.setupTime = null; - this.startTime = null; - this.endTime = null; - this.duration = null; - this.terminate = null; - this.productType = null; - this.charge = null; - this.unit = null; - this.result = null; - if (args) { - if (args.seq !== undefined && args.seq !== null) { - this.seq = args.seq; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.dialedNumber !== undefined && args.dialedNumber !== null) { - this.dialedNumber = args.dialedNumber; - } - if (args.calledNumber !== undefined && args.calledNumber !== null) { - this.calledNumber = args.calledNumber; - } - if (args.toMid !== undefined && args.toMid !== null) { - this.toMid = args.toMid; - } - if (args.toName !== undefined && args.toName !== null) { - this.toName = args.toName; - } - if (args.setupTime !== undefined && args.setupTime !== null) { - this.setupTime = args.setupTime; - } - if (args.startTime !== undefined && args.startTime !== null) { - this.startTime = args.startTime; - } - if (args.endTime !== undefined && args.endTime !== null) { - this.endTime = args.endTime; - } - if (args.duration !== undefined && args.duration !== null) { - this.duration = args.duration; - } - if (args.terminate !== undefined && args.terminate !== null) { - this.terminate = args.terminate; - } - if (args.productType !== undefined && args.productType !== null) { - this.productType = args.productType; - } - if (args.charge !== undefined && args.charge !== null) { - this.charge = args.charge; - } - if (args.unit !== undefined && args.unit !== null) { - this.unit = args.unit; - } - if (args.result !== undefined && args.result !== null) { - this.result = args.result; - } - } -}; -ttypes.PaidCallHistory.prototype = {}; -ttypes.PaidCallHistory.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.seq = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.type = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.dialedNumber = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.calledNumber = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.toMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRING) { - this.toName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.I64) { - this.setupTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 8: - if (ftype == Thrift.Type.I64) { - this.startTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 9: - if (ftype == Thrift.Type.I64) { - this.endTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.I64) { - this.duration = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.I32) { - this.terminate = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.I32) { - this.productType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 13: - if (ftype == Thrift.Type.I32) { - this.charge = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 14: - if (ftype == Thrift.Type.STRING) { - this.unit = input.readString(); - } else { - input.skip(ftype); - } - break; - case 15: - if (ftype == Thrift.Type.STRING) { - this.result = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.PaidCallHistory.prototype.write = function (output) { - output.writeStructBegin("PaidCallHistory"); - if (this.seq !== null && this.seq !== undefined) { - output.writeFieldBegin("seq", Thrift.Type.I64, 1); - output.writeI64(this.seq); - output.writeFieldEnd(); - } - if (this.type !== null && this.type !== undefined) { - output.writeFieldBegin("type", Thrift.Type.I32, 2); - output.writeI32(this.type); - output.writeFieldEnd(); - } - if (this.dialedNumber !== null && this.dialedNumber !== undefined) { - output.writeFieldBegin("dialedNumber", Thrift.Type.STRING, 3); - output.writeString(this.dialedNumber); - output.writeFieldEnd(); - } - if (this.calledNumber !== null && this.calledNumber !== undefined) { - output.writeFieldBegin("calledNumber", Thrift.Type.STRING, 4); - output.writeString(this.calledNumber); - output.writeFieldEnd(); - } - if (this.toMid !== null && this.toMid !== undefined) { - output.writeFieldBegin("toMid", Thrift.Type.STRING, 5); - output.writeString(this.toMid); - output.writeFieldEnd(); - } - if (this.toName !== null && this.toName !== undefined) { - output.writeFieldBegin("toName", Thrift.Type.STRING, 6); - output.writeString(this.toName); - output.writeFieldEnd(); - } - if (this.setupTime !== null && this.setupTime !== undefined) { - output.writeFieldBegin("setupTime", Thrift.Type.I64, 7); - output.writeI64(this.setupTime); - output.writeFieldEnd(); - } - if (this.startTime !== null && this.startTime !== undefined) { - output.writeFieldBegin("startTime", Thrift.Type.I64, 8); - output.writeI64(this.startTime); - output.writeFieldEnd(); - } - if (this.endTime !== null && this.endTime !== undefined) { - output.writeFieldBegin("endTime", Thrift.Type.I64, 9); - output.writeI64(this.endTime); - output.writeFieldEnd(); - } - if (this.duration !== null && this.duration !== undefined) { - output.writeFieldBegin("duration", Thrift.Type.I64, 10); - output.writeI64(this.duration); - output.writeFieldEnd(); - } - if (this.terminate !== null && this.terminate !== undefined) { - output.writeFieldBegin("terminate", Thrift.Type.I32, 11); - output.writeI32(this.terminate); - output.writeFieldEnd(); - } - if (this.productType !== null && this.productType !== undefined) { - output.writeFieldBegin("productType", Thrift.Type.I32, 12); - output.writeI32(this.productType); - output.writeFieldEnd(); - } - if (this.charge !== null && this.charge !== undefined) { - output.writeFieldBegin("charge", Thrift.Type.I32, 13); - output.writeI32(this.charge); - output.writeFieldEnd(); - } - if (this.unit !== null && this.unit !== undefined) { - output.writeFieldBegin("unit", Thrift.Type.STRING, 14); - output.writeString(this.unit); - output.writeFieldEnd(); - } - if (this.result !== null && this.result !== undefined) { - output.writeFieldBegin("result", Thrift.Type.STRING, 15); - output.writeString(this.result); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.PaidCallHistoryResult = function (args) { - this.historys = null; - this.hasNext = null; - if (args) { - if (args.historys !== undefined && args.historys !== null) { - this.historys = Thrift.copyList(args.historys, [ttypes.PaidCallHistory]); - } - if (args.hasNext !== undefined && args.hasNext !== null) { - this.hasNext = args.hasNext; - } - } -}; -ttypes.PaidCallHistoryResult.prototype = {}; -ttypes.PaidCallHistoryResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.historys = []; - var _rtmp321 = input.readListBegin(); - var _size20 = _rtmp321.size || 0; - for (var _i22 = 0; _i22 < _size20; ++_i22) { - var elem23 = null; - elem23 = new ttypes.PaidCallHistory(); - elem23.read(input); - this.historys.push(elem23); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.BOOL) { - this.hasNext = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.PaidCallHistoryResult.prototype.write = function (output) { - output.writeStructBegin("PaidCallHistoryResult"); - if (this.historys !== null && this.historys !== undefined) { - output.writeFieldBegin("historys", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.historys.length); - for (var iter24 in this.historys) { - if (this.historys.hasOwnProperty(iter24)) { - iter24 = this.historys[iter24]; - iter24.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.hasNext !== null && this.hasNext !== undefined) { - output.writeFieldBegin("hasNext", Thrift.Type.BOOL, 2); - output.writeBool(this.hasNext); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.PaidCallMetadataResult = function (args) { - this.currencyExchangeRates = null; - this.recommendedCountryCodes = null; - this.adCountries = null; - if (args) { - if (args.currencyExchangeRates !== undefined && args.currencyExchangeRates !== null) { - this.currencyExchangeRates = Thrift.copyList(args.currencyExchangeRates, [ - ttypes.PaidCallCurrencyExchangeRate, - ]); - } - if (args.recommendedCountryCodes !== undefined && args.recommendedCountryCodes !== null) { - this.recommendedCountryCodes = Thrift.copyList(args.recommendedCountryCodes, [null]); - } - if (args.adCountries !== undefined && args.adCountries !== null) { - this.adCountries = Thrift.copyList(args.adCountries, [ttypes.PaidCallAdCountry]); - } - } -}; -ttypes.PaidCallMetadataResult.prototype = {}; -ttypes.PaidCallMetadataResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.currencyExchangeRates = []; - var _rtmp326 = input.readListBegin(); - var _size25 = _rtmp326.size || 0; - for (var _i27 = 0; _i27 < _size25; ++_i27) { - var elem28 = null; - elem28 = new ttypes.PaidCallCurrencyExchangeRate(); - elem28.read(input); - this.currencyExchangeRates.push(elem28); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.LIST) { - this.recommendedCountryCodes = []; - var _rtmp330 = input.readListBegin(); - var _size29 = _rtmp330.size || 0; - for (var _i31 = 0; _i31 < _size29; ++_i31) { - var elem32 = null; - elem32 = input.readString(); - this.recommendedCountryCodes.push(elem32); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.LIST) { - this.adCountries = []; - var _rtmp334 = input.readListBegin(); - var _size33 = _rtmp334.size || 0; - for (var _i35 = 0; _i35 < _size33; ++_i35) { - var elem36 = null; - elem36 = new ttypes.PaidCallAdCountry(); - elem36.read(input); - this.adCountries.push(elem36); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.PaidCallMetadataResult.prototype.write = function (output) { - output.writeStructBegin("PaidCallMetadataResult"); - if (this.currencyExchangeRates !== null && this.currencyExchangeRates !== undefined) { - output.writeFieldBegin("currencyExchangeRates", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.currencyExchangeRates.length); - for (var iter37 in this.currencyExchangeRates) { - if (this.currencyExchangeRates.hasOwnProperty(iter37)) { - iter37 = this.currencyExchangeRates[iter37]; - iter37.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.recommendedCountryCodes !== null && this.recommendedCountryCodes !== undefined) { - output.writeFieldBegin("recommendedCountryCodes", Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.STRING, this.recommendedCountryCodes.length); - for (var iter38 in this.recommendedCountryCodes) { - if (this.recommendedCountryCodes.hasOwnProperty(iter38)) { - iter38 = this.recommendedCountryCodes[iter38]; - output.writeString(iter38); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.adCountries !== null && this.adCountries !== undefined) { - output.writeFieldBegin("adCountries", Thrift.Type.LIST, 3); - output.writeListBegin(Thrift.Type.STRUCT, this.adCountries.length); - for (var iter39 in this.adCountries) { - if (this.adCountries.hasOwnProperty(iter39)) { - iter39 = this.adCountries[iter39]; - iter39.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.PaidCallRedeemResult = function (args) { - this.eventName = null; - this.eventAmount = null; - if (args) { - if (args.eventName !== undefined && args.eventName !== null) { - this.eventName = args.eventName; - } - if (args.eventAmount !== undefined && args.eventAmount !== null) { - this.eventAmount = args.eventAmount; - } - } -}; -ttypes.PaidCallRedeemResult.prototype = {}; -ttypes.PaidCallRedeemResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.eventName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.eventAmount = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.PaidCallRedeemResult.prototype.write = function (output) { - output.writeStructBegin("PaidCallRedeemResult"); - if (this.eventName !== null && this.eventName !== undefined) { - output.writeFieldBegin("eventName", Thrift.Type.STRING, 1); - output.writeString(this.eventName); - output.writeFieldEnd(); - } - if (this.eventAmount !== null && this.eventAmount !== undefined) { - output.writeFieldBegin("eventAmount", Thrift.Type.I32, 2); - output.writeI32(this.eventAmount); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.PaidCallResponse = function (args) { - this.host = null; - this.dialing = null; - this.token = null; - this.spotItems = null; - if (args) { - if (args.host !== undefined && args.host !== null) { - this.host = new ttypes.CallHost(args.host); - } - if (args.dialing !== undefined && args.dialing !== null) { - this.dialing = new ttypes.PaidCallDialing(args.dialing); - } - if (args.token !== undefined && args.token !== null) { - this.token = args.token; - } - if (args.spotItems !== undefined && args.spotItems !== null) { - this.spotItems = Thrift.copyList(args.spotItems, [ttypes.SpotItem]); - } - } -}; -ttypes.PaidCallResponse.prototype = {}; -ttypes.PaidCallResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.host = new ttypes.CallHost(); - this.host.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.dialing = new ttypes.PaidCallDialing(); - this.dialing.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.token = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.LIST) { - this.spotItems = []; - var _rtmp341 = input.readListBegin(); - var _size40 = _rtmp341.size || 0; - for (var _i42 = 0; _i42 < _size40; ++_i42) { - var elem43 = null; - elem43 = new ttypes.SpotItem(); - elem43.read(input); - this.spotItems.push(elem43); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.PaidCallResponse.prototype.write = function (output) { - output.writeStructBegin("PaidCallResponse"); - if (this.host !== null && this.host !== undefined) { - output.writeFieldBegin("host", Thrift.Type.STRUCT, 1); - this.host.write(output); - output.writeFieldEnd(); - } - if (this.dialing !== null && this.dialing !== undefined) { - output.writeFieldBegin("dialing", Thrift.Type.STRUCT, 2); - this.dialing.write(output); - output.writeFieldEnd(); - } - if (this.token !== null && this.token !== undefined) { - output.writeFieldBegin("token", Thrift.Type.STRING, 3); - output.writeString(this.token); - output.writeFieldEnd(); - } - if (this.spotItems !== null && this.spotItems !== undefined) { - output.writeFieldBegin("spotItems", Thrift.Type.LIST, 4); - output.writeListBegin(Thrift.Type.STRUCT, this.spotItems.length); - for (var iter44 in this.spotItems) { - if (this.spotItems.hasOwnProperty(iter44)) { - iter44 = this.spotItems[iter44]; - iter44.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.PaidCallUserRate = function (args) { - this.countryCode = null; - this.rate = null; - this.rateDivision = null; - this.rateName = null; - if (args) { - if (args.countryCode !== undefined && args.countryCode !== null) { - this.countryCode = args.countryCode; - } - if (args.rate !== undefined && args.rate !== null) { - this.rate = args.rate; - } - if (args.rateDivision !== undefined && args.rateDivision !== null) { - this.rateDivision = args.rateDivision; - } - if (args.rateName !== undefined && args.rateName !== null) { - this.rateName = args.rateName; - } - } -}; -ttypes.PaidCallUserRate.prototype = {}; -ttypes.PaidCallUserRate.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.countryCode = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.rate = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.rateDivision = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.rateName = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.PaidCallUserRate.prototype.write = function (output) { - output.writeStructBegin("PaidCallUserRate"); - if (this.countryCode !== null && this.countryCode !== undefined) { - output.writeFieldBegin("countryCode", Thrift.Type.STRING, 1); - output.writeString(this.countryCode); - output.writeFieldEnd(); - } - if (this.rate !== null && this.rate !== undefined) { - output.writeFieldBegin("rate", Thrift.Type.I32, 2); - output.writeI32(this.rate); - output.writeFieldEnd(); - } - if (this.rateDivision !== null && this.rateDivision !== undefined) { - output.writeFieldBegin("rateDivision", Thrift.Type.STRING, 3); - output.writeString(this.rateDivision); - output.writeFieldEnd(); - } - if (this.rateName !== null && this.rateName !== undefined) { - output.writeFieldBegin("rateName", Thrift.Type.STRING, 4); - output.writeString(this.rateName); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ChannelInfo = function (args) { - this.channelId = null; - this.name = null; - this.entryPageUrl = null; - this.descriptionText = null; - this.provider = null; - this.publicType = null; - this.iconImage = null; - this.permissions = null; - this.iconThumbnailImage = null; - this.channelConfigurations = null; - this.lcsAllApiUsable = null; - this.allowedPermissions = null; - this.channelDomains = null; - this.updatedTimestamp = null; - if (args) { - if (args.channelId !== undefined && args.channelId !== null) { - this.channelId = args.channelId; - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - if (args.entryPageUrl !== undefined && args.entryPageUrl !== null) { - this.entryPageUrl = args.entryPageUrl; - } - if (args.descriptionText !== undefined && args.descriptionText !== null) { - this.descriptionText = args.descriptionText; - } - if (args.provider !== undefined && args.provider !== null) { - this.provider = new ttypes.ChannelProvider(args.provider); - } - if (args.publicType !== undefined && args.publicType !== null) { - this.publicType = args.publicType; - } - if (args.iconImage !== undefined && args.iconImage !== null) { - this.iconImage = args.iconImage; - } - if (args.permissions !== undefined && args.permissions !== null) { - this.permissions = Thrift.copyList(args.permissions, [null]); - } - if (args.iconThumbnailImage !== undefined && args.iconThumbnailImage !== null) { - this.iconThumbnailImage = args.iconThumbnailImage; - } - if (args.channelConfigurations !== undefined && args.channelConfigurations !== null) { - this.channelConfigurations = Thrift.copyList(args.channelConfigurations, [null]); - } - if (args.lcsAllApiUsable !== undefined && args.lcsAllApiUsable !== null) { - this.lcsAllApiUsable = args.lcsAllApiUsable; - } - if (args.allowedPermissions !== undefined && args.allowedPermissions !== null) { - this.allowedPermissions = Thrift.copyList(args.allowedPermissions, [null]); - } - if (args.channelDomains !== undefined && args.channelDomains !== null) { - this.channelDomains = Thrift.copyList(args.channelDomains, [ttypes.ChannelDomain]); - } - if (args.updatedTimestamp !== undefined && args.updatedTimestamp !== null) { - this.updatedTimestamp = args.updatedTimestamp; - } - } -}; -ttypes.ChannelInfo.prototype = {}; -ttypes.ChannelInfo.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.channelId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.name = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.entryPageUrl = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.descriptionText = input.readString(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRUCT) { - this.provider = new ttypes.ChannelProvider(); - this.provider.read(input); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.I32) { - this.publicType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 8: - if (ftype == Thrift.Type.STRING) { - this.iconImage = input.readString(); - } else { - input.skip(ftype); - } - break; - case 9: - if (ftype == Thrift.Type.LIST) { - this.permissions = []; - var _rtmp346 = input.readListBegin(); - var _size45 = _rtmp346.size || 0; - for (var _i47 = 0; _i47 < _size45; ++_i47) { - var elem48 = null; - elem48 = input.readString(); - this.permissions.push(elem48); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.STRING) { - this.iconThumbnailImage = input.readString(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.LIST) { - this.channelConfigurations = []; - var _rtmp350 = input.readListBegin(); - var _size49 = _rtmp350.size || 0; - for (var _i51 = 0; _i51 < _size49; ++_i51) { - var elem52 = null; - elem52 = input.readI32(); - this.channelConfigurations.push(elem52); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 13: - if (ftype == Thrift.Type.BOOL) { - this.lcsAllApiUsable = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 14: - if (ftype == Thrift.Type.SET) { - this.allowedPermissions = []; - var _rtmp354 = input.readSetBegin(); - var _size53 = _rtmp354.size || 0; - for (var _i55 = 0; _i55 < _size53; ++_i55) { - var elem56 = null; - elem56 = input.readI32(); - this.allowedPermissions.push(elem56); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 15: - if (ftype == Thrift.Type.LIST) { - this.channelDomains = []; - var _rtmp358 = input.readListBegin(); - var _size57 = _rtmp358.size || 0; - for (var _i59 = 0; _i59 < _size57; ++_i59) { - var elem60 = null; - elem60 = new ttypes.ChannelDomain(); - elem60.read(input); - this.channelDomains.push(elem60); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 16: - if (ftype == Thrift.Type.I64) { - this.updatedTimestamp = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ChannelInfo.prototype.write = function (output) { - output.writeStructBegin("ChannelInfo"); - if (this.channelId !== null && this.channelId !== undefined) { - output.writeFieldBegin("channelId", Thrift.Type.STRING, 1); - output.writeString(this.channelId); - output.writeFieldEnd(); - } - if (this.name !== null && this.name !== undefined) { - output.writeFieldBegin("name", Thrift.Type.STRING, 3); - output.writeString(this.name); - output.writeFieldEnd(); - } - if (this.entryPageUrl !== null && this.entryPageUrl !== undefined) { - output.writeFieldBegin("entryPageUrl", Thrift.Type.STRING, 4); - output.writeString(this.entryPageUrl); - output.writeFieldEnd(); - } - if (this.descriptionText !== null && this.descriptionText !== undefined) { - output.writeFieldBegin("descriptionText", Thrift.Type.STRING, 5); - output.writeString(this.descriptionText); - output.writeFieldEnd(); - } - if (this.provider !== null && this.provider !== undefined) { - output.writeFieldBegin("provider", Thrift.Type.STRUCT, 6); - this.provider.write(output); - output.writeFieldEnd(); - } - if (this.publicType !== null && this.publicType !== undefined) { - output.writeFieldBegin("publicType", Thrift.Type.I32, 7); - output.writeI32(this.publicType); - output.writeFieldEnd(); - } - if (this.iconImage !== null && this.iconImage !== undefined) { - output.writeFieldBegin("iconImage", Thrift.Type.STRING, 8); - output.writeString(this.iconImage); - output.writeFieldEnd(); - } - if (this.permissions !== null && this.permissions !== undefined) { - output.writeFieldBegin("permissions", Thrift.Type.LIST, 9); - output.writeListBegin(Thrift.Type.STRING, this.permissions.length); - for (var iter61 in this.permissions) { - if (this.permissions.hasOwnProperty(iter61)) { - iter61 = this.permissions[iter61]; - output.writeString(iter61); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.iconThumbnailImage !== null && this.iconThumbnailImage !== undefined) { - output.writeFieldBegin("iconThumbnailImage", Thrift.Type.STRING, 11); - output.writeString(this.iconThumbnailImage); - output.writeFieldEnd(); - } - if (this.channelConfigurations !== null && this.channelConfigurations !== undefined) { - output.writeFieldBegin("channelConfigurations", Thrift.Type.LIST, 12); - output.writeListBegin(Thrift.Type.I32, this.channelConfigurations.length); - for (var iter62 in this.channelConfigurations) { - if (this.channelConfigurations.hasOwnProperty(iter62)) { - iter62 = this.channelConfigurations[iter62]; - output.writeI32(iter62); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.lcsAllApiUsable !== null && this.lcsAllApiUsable !== undefined) { - output.writeFieldBegin("lcsAllApiUsable", Thrift.Type.BOOL, 13); - output.writeBool(this.lcsAllApiUsable); - output.writeFieldEnd(); - } - if (this.allowedPermissions !== null && this.allowedPermissions !== undefined) { - output.writeFieldBegin("allowedPermissions", Thrift.Type.SET, 14); - output.writeSetBegin(Thrift.Type.I32, this.allowedPermissions.length); - for (var iter63 in this.allowedPermissions) { - if (this.allowedPermissions.hasOwnProperty(iter63)) { - iter63 = this.allowedPermissions[iter63]; - output.writeI32(iter63); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - if (this.channelDomains !== null && this.channelDomains !== undefined) { - output.writeFieldBegin("channelDomains", Thrift.Type.LIST, 15); - output.writeListBegin(Thrift.Type.STRUCT, this.channelDomains.length); - for (var iter64 in this.channelDomains) { - if (this.channelDomains.hasOwnProperty(iter64)) { - iter64 = this.channelDomains[iter64]; - iter64.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.updatedTimestamp !== null && this.updatedTimestamp !== undefined) { - output.writeFieldBegin("updatedTimestamp", Thrift.Type.I64, 16); - output.writeI64(this.updatedTimestamp); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ApprovedChannelInfo = function (args) { - this.channelInfo = null; - this.approvedAt = null; - if (args) { - if (args.channelInfo !== undefined && args.channelInfo !== null) { - this.channelInfo = new ttypes.ChannelInfo(args.channelInfo); - } - if (args.approvedAt !== undefined && args.approvedAt !== null) { - this.approvedAt = args.approvedAt; - } - } -}; -ttypes.ApprovedChannelInfo.prototype = {}; -ttypes.ApprovedChannelInfo.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.channelInfo = new ttypes.ChannelInfo(); - this.channelInfo.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.approvedAt = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ApprovedChannelInfo.prototype.write = function (output) { - output.writeStructBegin("ApprovedChannelInfo"); - if (this.channelInfo !== null && this.channelInfo !== undefined) { - output.writeFieldBegin("channelInfo", Thrift.Type.STRUCT, 1); - this.channelInfo.write(output); - output.writeFieldEnd(); - } - if (this.approvedAt !== null && this.approvedAt !== undefined) { - output.writeFieldBegin("approvedAt", Thrift.Type.I64, 2); - output.writeI64(this.approvedAt); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ApprovedChannelInfos = function (args) { - this.approvedChannelInfos = null; - this.revision = null; - if (args) { - if (args.approvedChannelInfos !== undefined && args.approvedChannelInfos !== null) { - this.approvedChannelInfos = Thrift.copyList(args.approvedChannelInfos, [ttypes.ApprovedChannelInfo]); - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - } -}; -ttypes.ApprovedChannelInfos.prototype = {}; -ttypes.ApprovedChannelInfos.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.approvedChannelInfos = []; - var _rtmp366 = input.readListBegin(); - var _size65 = _rtmp366.size || 0; - for (var _i67 = 0; _i67 < _size65; ++_i67) { - var elem68 = null; - elem68 = new ttypes.ApprovedChannelInfo(); - elem68.read(input); - this.approvedChannelInfos.push(elem68); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ApprovedChannelInfos.prototype.write = function (output) { - output.writeStructBegin("ApprovedChannelInfos"); - if (this.approvedChannelInfos !== null && this.approvedChannelInfos !== undefined) { - output.writeFieldBegin("approvedChannelInfos", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.approvedChannelInfos.length); - for (var iter69 in this.approvedChannelInfos) { - if (this.approvedChannelInfos.hasOwnProperty(iter69)) { - iter69 = this.approvedChannelInfos[iter69]; - iter69.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 2); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.AuthQrcode = function (args) { - this.qrcode = null; - this.verifier = null; - this.callbackUrl = null; - if (args) { - if (args.qrcode !== undefined && args.qrcode !== null) { - this.qrcode = args.qrcode; - } - if (args.verifier !== undefined && args.verifier !== null) { - this.verifier = args.verifier; - } - if (args.callbackUrl !== undefined && args.callbackUrl !== null) { - this.callbackUrl = args.callbackUrl; - } - } -}; -ttypes.AuthQrcode.prototype = {}; -ttypes.AuthQrcode.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.qrcode = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.verifier = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.callbackUrl = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.AuthQrcode.prototype.write = function (output) { - output.writeStructBegin("AuthQrcode"); - if (this.qrcode !== null && this.qrcode !== undefined) { - output.writeFieldBegin("qrcode", Thrift.Type.STRING, 1); - output.writeString(this.qrcode); - output.writeFieldEnd(); - } - if (this.verifier !== null && this.verifier !== undefined) { - output.writeFieldBegin("verifier", Thrift.Type.STRING, 2); - output.writeString(this.verifier); - output.writeFieldEnd(); - } - if (this.callbackUrl !== null && this.callbackUrl !== undefined) { - output.writeFieldBegin("callbackUrl", Thrift.Type.STRING, 3); - output.writeString(this.callbackUrl); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.AnalyticsInfo = function (args) { - this.gaSamplingRate = null; - this.tmid = null; - if (args) { - if (args.gaSamplingRate !== undefined && args.gaSamplingRate !== null) { - this.gaSamplingRate = args.gaSamplingRate; - } - if (args.tmid !== undefined && args.tmid !== null) { - this.tmid = args.tmid; - } - } -}; -ttypes.AnalyticsInfo.prototype = {}; -ttypes.AnalyticsInfo.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.DOUBLE) { - this.gaSamplingRate = input.readDouble(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.tmid = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.AnalyticsInfo.prototype.write = function (output) { - output.writeStructBegin("AnalyticsInfo"); - if (this.gaSamplingRate !== null && this.gaSamplingRate !== undefined) { - output.writeFieldBegin("gaSamplingRate", Thrift.Type.DOUBLE, 1); - output.writeDouble(this.gaSamplingRate); - output.writeFieldEnd(); - } - if (this.tmid !== null && this.tmid !== undefined) { - output.writeFieldBegin("tmid", Thrift.Type.STRING, 2); - output.writeString(this.tmid); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ContactTransition = function (args) { - this.ownerMid = null; - this.targetMid = null; - this.previousStatus = null; - this.resultStatus = null; - if (args) { - if (args.ownerMid !== undefined && args.ownerMid !== null) { - this.ownerMid = args.ownerMid; - } - if (args.targetMid !== undefined && args.targetMid !== null) { - this.targetMid = args.targetMid; - } - if (args.previousStatus !== undefined && args.previousStatus !== null) { - this.previousStatus = args.previousStatus; - } - if (args.resultStatus !== undefined && args.resultStatus !== null) { - this.resultStatus = args.resultStatus; - } - } -}; -ttypes.ContactTransition.prototype = {}; -ttypes.ContactTransition.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.ownerMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.targetMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.previousStatus = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.resultStatus = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ContactTransition.prototype.write = function (output) { - output.writeStructBegin("ContactTransition"); - if (this.ownerMid !== null && this.ownerMid !== undefined) { - output.writeFieldBegin("ownerMid", Thrift.Type.STRING, 1); - output.writeString(this.ownerMid); - output.writeFieldEnd(); - } - if (this.targetMid !== null && this.targetMid !== undefined) { - output.writeFieldBegin("targetMid", Thrift.Type.STRING, 2); - output.writeString(this.targetMid); - output.writeFieldEnd(); - } - if (this.previousStatus !== null && this.previousStatus !== undefined) { - output.writeFieldBegin("previousStatus", Thrift.Type.I32, 3); - output.writeI32(this.previousStatus); - output.writeFieldEnd(); - } - if (this.resultStatus !== null && this.resultStatus !== undefined) { - output.writeFieldBegin("resultStatus", Thrift.Type.I32, 4); - output.writeI32(this.resultStatus); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.UserTicketResponse = function (args) { - this.mid = null; - this.userTicket = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.userTicket !== undefined && args.userTicket !== null) { - this.userTicket = args.userTicket; - } - } -}; -ttypes.UserTicketResponse.prototype = {}; -ttypes.UserTicketResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.mid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.userTicket = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.UserTicketResponse.prototype.write = function (output) { - output.writeStructBegin("UserTicketResponse"); - if (this.mid !== null && this.mid !== undefined) { - output.writeFieldBegin("mid", Thrift.Type.STRING, 1); - output.writeString(this.mid); - output.writeFieldEnd(); - } - if (this.userTicket !== null && this.userTicket !== undefined) { - output.writeFieldBegin("userTicket", Thrift.Type.STRING, 2); - output.writeString(this.userTicket); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.BuddyBanner = function (args) { - this.buddyBannerLinkType = null; - this.buddyBannerLink = null; - this.buddyBannerImageUrl = null; - if (args) { - if (args.buddyBannerLinkType !== undefined && args.buddyBannerLinkType !== null) { - this.buddyBannerLinkType = args.buddyBannerLinkType; - } - if (args.buddyBannerLink !== undefined && args.buddyBannerLink !== null) { - this.buddyBannerLink = args.buddyBannerLink; - } - if (args.buddyBannerImageUrl !== undefined && args.buddyBannerImageUrl !== null) { - this.buddyBannerImageUrl = args.buddyBannerImageUrl; - } - } -}; -ttypes.BuddyBanner.prototype = {}; -ttypes.BuddyBanner.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.buddyBannerLinkType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.buddyBannerLink = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.buddyBannerImageUrl = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.BuddyBanner.prototype.write = function (output) { - output.writeStructBegin("BuddyBanner"); - if (this.buddyBannerLinkType !== null && this.buddyBannerLinkType !== undefined) { - output.writeFieldBegin("buddyBannerLinkType", Thrift.Type.I32, 1); - output.writeI32(this.buddyBannerLinkType); - output.writeFieldEnd(); - } - if (this.buddyBannerLink !== null && this.buddyBannerLink !== undefined) { - output.writeFieldBegin("buddyBannerLink", Thrift.Type.STRING, 2); - output.writeString(this.buddyBannerLink); - output.writeFieldEnd(); - } - if (this.buddyBannerImageUrl !== null && this.buddyBannerImageUrl !== undefined) { - output.writeFieldBegin("buddyBannerImageUrl", Thrift.Type.STRING, 3); - output.writeString(this.buddyBannerImageUrl); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.BuddyDetail = function (args) { - this.mid = null; - this.memberCount = null; - this.onAir = null; - this.businessAccount = null; - this.addable = null; - this.acceptableContentTypes = null; - this.capableMyhome = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.memberCount !== undefined && args.memberCount !== null) { - this.memberCount = args.memberCount; - } - if (args.onAir !== undefined && args.onAir !== null) { - this.onAir = args.onAir; - } - if (args.businessAccount !== undefined && args.businessAccount !== null) { - this.businessAccount = args.businessAccount; - } - if (args.addable !== undefined && args.addable !== null) { - this.addable = args.addable; - } - if (args.acceptableContentTypes !== undefined && args.acceptableContentTypes !== null) { - this.acceptableContentTypes = Thrift.copyList(args.acceptableContentTypes, [null]); - } - if (args.capableMyhome !== undefined && args.capableMyhome !== null) { - this.capableMyhome = args.capableMyhome; - } - } -}; -ttypes.BuddyDetail.prototype = {}; -ttypes.BuddyDetail.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.mid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.memberCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.BOOL) { - this.onAir = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.BOOL) { - this.businessAccount = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.BOOL) { - this.addable = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.SET) { - this.acceptableContentTypes = []; - var _rtmp371 = input.readSetBegin(); - var _size70 = _rtmp371.size || 0; - for (var _i72 = 0; _i72 < _size70; ++_i72) { - var elem73 = null; - elem73 = input.readI32(); - this.acceptableContentTypes.push(elem73); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.BOOL) { - this.capableMyhome = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.BuddyDetail.prototype.write = function (output) { - output.writeStructBegin("BuddyDetail"); - if (this.mid !== null && this.mid !== undefined) { - output.writeFieldBegin("mid", Thrift.Type.STRING, 1); - output.writeString(this.mid); - output.writeFieldEnd(); - } - if (this.memberCount !== null && this.memberCount !== undefined) { - output.writeFieldBegin("memberCount", Thrift.Type.I64, 2); - output.writeI64(this.memberCount); - output.writeFieldEnd(); - } - if (this.onAir !== null && this.onAir !== undefined) { - output.writeFieldBegin("onAir", Thrift.Type.BOOL, 3); - output.writeBool(this.onAir); - output.writeFieldEnd(); - } - if (this.businessAccount !== null && this.businessAccount !== undefined) { - output.writeFieldBegin("businessAccount", Thrift.Type.BOOL, 4); - output.writeBool(this.businessAccount); - output.writeFieldEnd(); - } - if (this.addable !== null && this.addable !== undefined) { - output.writeFieldBegin("addable", Thrift.Type.BOOL, 5); - output.writeBool(this.addable); - output.writeFieldEnd(); - } - if (this.acceptableContentTypes !== null && this.acceptableContentTypes !== undefined) { - output.writeFieldBegin("acceptableContentTypes", Thrift.Type.SET, 6); - output.writeSetBegin(Thrift.Type.I32, this.acceptableContentTypes.length); - for (var iter74 in this.acceptableContentTypes) { - if (this.acceptableContentTypes.hasOwnProperty(iter74)) { - iter74 = this.acceptableContentTypes[iter74]; - output.writeI32(iter74); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - if (this.capableMyhome !== null && this.capableMyhome !== undefined) { - output.writeFieldBegin("capableMyhome", Thrift.Type.BOOL, 7); - output.writeBool(this.capableMyhome); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.Contact = function (args) { - this.mid = null; - this.createdTime = null; - this.type = null; - this.status = null; - this.relation = null; - this.displayName = null; - this.phoneticName = null; - this.pictureStatus = null; - this.thumbnailUrl = null; - this.statusMessage = null; - this.displayNameOverridden = null; - this.favoriteTime = null; - this.capableVoiceCall = null; - this.capableVideoCall = null; - this.capableMyhome = null; - this.capableBuddy = null; - this.attributes = null; - this.settings = null; - this.picturePath = null; - this.recommendParams = null; - this.friendRequestStatus = null; - this.musicProfile = null; - this.videoProfile = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.status !== undefined && args.status !== null) { - this.status = args.status; - } - if (args.relation !== undefined && args.relation !== null) { - this.relation = args.relation; - } - if (args.displayName !== undefined && args.displayName !== null) { - this.displayName = args.displayName; - } - if (args.phoneticName !== undefined && args.phoneticName !== null) { - this.phoneticName = args.phoneticName; - } - if (args.pictureStatus !== undefined && args.pictureStatus !== null) { - this.pictureStatus = args.pictureStatus; - } - if (args.thumbnailUrl !== undefined && args.thumbnailUrl !== null) { - this.thumbnailUrl = args.thumbnailUrl; - } - if (args.statusMessage !== undefined && args.statusMessage !== null) { - this.statusMessage = args.statusMessage; - } - if (args.displayNameOverridden !== undefined && args.displayNameOverridden !== null) { - this.displayNameOverridden = args.displayNameOverridden; - } - if (args.favoriteTime !== undefined && args.favoriteTime !== null) { - this.favoriteTime = args.favoriteTime; - } - if (args.capableVoiceCall !== undefined && args.capableVoiceCall !== null) { - this.capableVoiceCall = args.capableVoiceCall; - } - if (args.capableVideoCall !== undefined && args.capableVideoCall !== null) { - this.capableVideoCall = args.capableVideoCall; - } - if (args.capableMyhome !== undefined && args.capableMyhome !== null) { - this.capableMyhome = args.capableMyhome; - } - if (args.capableBuddy !== undefined && args.capableBuddy !== null) { - this.capableBuddy = args.capableBuddy; - } - if (args.attributes !== undefined && args.attributes !== null) { - this.attributes = args.attributes; - } - if (args.settings !== undefined && args.settings !== null) { - this.settings = args.settings; - } - if (args.picturePath !== undefined && args.picturePath !== null) { - this.picturePath = args.picturePath; - } - if (args.recommendParams !== undefined && args.recommendParams !== null) { - this.recommendParams = args.recommendParams; - } - if (args.friendRequestStatus !== undefined && args.friendRequestStatus !== null) { - this.friendRequestStatus = args.friendRequestStatus; - } - if (args.musicProfile !== undefined && args.musicProfile !== null) { - this.musicProfile = args.musicProfile; - } - if (args.videoProfile !== undefined && args.videoProfile !== null) { - this.videoProfile = args.videoProfile; - } - } -}; -ttypes.Contact.prototype = {}; -ttypes.Contact.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.mid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.createdTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.I32) { - this.type = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.I32) { - this.status = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 21: - if (ftype == Thrift.Type.I32) { - this.relation = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 22: - if (ftype == Thrift.Type.STRING) { - this.displayName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 23: - if (ftype == Thrift.Type.STRING) { - this.phoneticName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 24: - if (ftype == Thrift.Type.STRING) { - this.pictureStatus = input.readString(); - } else { - input.skip(ftype); - } - break; - case 25: - if (ftype == Thrift.Type.STRING) { - this.thumbnailUrl = input.readString(); - } else { - input.skip(ftype); - } - break; - case 26: - if (ftype == Thrift.Type.STRING) { - this.statusMessage = input.readString(); - } else { - input.skip(ftype); - } - break; - case 27: - if (ftype == Thrift.Type.STRING) { - this.displayNameOverridden = input.readString(); - } else { - input.skip(ftype); - } - break; - case 28: - if (ftype == Thrift.Type.I64) { - this.favoriteTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 31: - if (ftype == Thrift.Type.BOOL) { - this.capableVoiceCall = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 32: - if (ftype == Thrift.Type.BOOL) { - this.capableVideoCall = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 33: - if (ftype == Thrift.Type.BOOL) { - this.capableMyhome = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 34: - if (ftype == Thrift.Type.BOOL) { - this.capableBuddy = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 35: - if (ftype == Thrift.Type.I32) { - this.attributes = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 36: - if (ftype == Thrift.Type.I64) { - this.settings = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 37: - if (ftype == Thrift.Type.STRING) { - this.picturePath = input.readString(); - } else { - input.skip(ftype); - } - break; - case 38: - if (ftype == Thrift.Type.STRING) { - this.recommendParams = input.readString(); - } else { - input.skip(ftype); - } - break; - case 39: - if (ftype == Thrift.Type.I32) { - this.friendRequestStatus = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 40: - if (ftype == Thrift.Type.STRING) { - this.musicProfile = input.readString(); - } else { - input.skip(ftype); - } - break; - case 42: - if (ftype == Thrift.Type.STRING) { - this.videoProfile = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.Contact.prototype.write = function (output) { - output.writeStructBegin("Contact"); - if (this.mid !== null && this.mid !== undefined) { - output.writeFieldBegin("mid", Thrift.Type.STRING, 1); - output.writeString(this.mid); - output.writeFieldEnd(); - } - if (this.createdTime !== null && this.createdTime !== undefined) { - output.writeFieldBegin("createdTime", Thrift.Type.I64, 2); - output.writeI64(this.createdTime); - output.writeFieldEnd(); - } - if (this.type !== null && this.type !== undefined) { - output.writeFieldBegin("type", Thrift.Type.I32, 10); - output.writeI32(this.type); - output.writeFieldEnd(); - } - if (this.status !== null && this.status !== undefined) { - output.writeFieldBegin("status", Thrift.Type.I32, 11); - output.writeI32(this.status); - output.writeFieldEnd(); - } - if (this.relation !== null && this.relation !== undefined) { - output.writeFieldBegin("relation", Thrift.Type.I32, 21); - output.writeI32(this.relation); - output.writeFieldEnd(); - } - if (this.displayName !== null && this.displayName !== undefined) { - output.writeFieldBegin("displayName", Thrift.Type.STRING, 22); - output.writeString(this.displayName); - output.writeFieldEnd(); - } - if (this.phoneticName !== null && this.phoneticName !== undefined) { - output.writeFieldBegin("phoneticName", Thrift.Type.STRING, 23); - output.writeString(this.phoneticName); - output.writeFieldEnd(); - } - if (this.pictureStatus !== null && this.pictureStatus !== undefined) { - output.writeFieldBegin("pictureStatus", Thrift.Type.STRING, 24); - output.writeString(this.pictureStatus); - output.writeFieldEnd(); - } - if (this.thumbnailUrl !== null && this.thumbnailUrl !== undefined) { - output.writeFieldBegin("thumbnailUrl", Thrift.Type.STRING, 25); - output.writeString(this.thumbnailUrl); - output.writeFieldEnd(); - } - if (this.statusMessage !== null && this.statusMessage !== undefined) { - output.writeFieldBegin("statusMessage", Thrift.Type.STRING, 26); - output.writeString(this.statusMessage); - output.writeFieldEnd(); - } - if (this.displayNameOverridden !== null && this.displayNameOverridden !== undefined) { - output.writeFieldBegin("displayNameOverridden", Thrift.Type.STRING, 27); - output.writeString(this.displayNameOverridden); - output.writeFieldEnd(); - } - if (this.favoriteTime !== null && this.favoriteTime !== undefined) { - output.writeFieldBegin("favoriteTime", Thrift.Type.I64, 28); - output.writeI64(this.favoriteTime); - output.writeFieldEnd(); - } - if (this.capableVoiceCall !== null && this.capableVoiceCall !== undefined) { - output.writeFieldBegin("capableVoiceCall", Thrift.Type.BOOL, 31); - output.writeBool(this.capableVoiceCall); - output.writeFieldEnd(); - } - if (this.capableVideoCall !== null && this.capableVideoCall !== undefined) { - output.writeFieldBegin("capableVideoCall", Thrift.Type.BOOL, 32); - output.writeBool(this.capableVideoCall); - output.writeFieldEnd(); - } - if (this.capableMyhome !== null && this.capableMyhome !== undefined) { - output.writeFieldBegin("capableMyhome", Thrift.Type.BOOL, 33); - output.writeBool(this.capableMyhome); - output.writeFieldEnd(); - } - if (this.capableBuddy !== null && this.capableBuddy !== undefined) { - output.writeFieldBegin("capableBuddy", Thrift.Type.BOOL, 34); - output.writeBool(this.capableBuddy); - output.writeFieldEnd(); - } - if (this.attributes !== null && this.attributes !== undefined) { - output.writeFieldBegin("attributes", Thrift.Type.I32, 35); - output.writeI32(this.attributes); - output.writeFieldEnd(); - } - if (this.settings !== null && this.settings !== undefined) { - output.writeFieldBegin("settings", Thrift.Type.I64, 36); - output.writeI64(this.settings); - output.writeFieldEnd(); - } - if (this.picturePath !== null && this.picturePath !== undefined) { - output.writeFieldBegin("picturePath", Thrift.Type.STRING, 37); - output.writeString(this.picturePath); - output.writeFieldEnd(); - } - if (this.recommendParams !== null && this.recommendParams !== undefined) { - output.writeFieldBegin("recommendParams", Thrift.Type.STRING, 38); - output.writeString(this.recommendParams); - output.writeFieldEnd(); - } - if (this.friendRequestStatus !== null && this.friendRequestStatus !== undefined) { - output.writeFieldBegin("friendRequestStatus", Thrift.Type.I32, 39); - output.writeI32(this.friendRequestStatus); - output.writeFieldEnd(); - } - if (this.musicProfile !== null && this.musicProfile !== undefined) { - output.writeFieldBegin("musicProfile", Thrift.Type.STRING, 40); - output.writeString(this.musicProfile); - output.writeFieldEnd(); - } - if (this.videoProfile !== null && this.videoProfile !== undefined) { - output.writeFieldBegin("videoProfile", Thrift.Type.STRING, 42); - output.writeString(this.videoProfile); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.BuddyList = function (args) { - this.classification = null; - this.displayName = null; - this.totalBuddyCount = null; - this.popularContacts = null; - if (args) { - if (args.classification !== undefined && args.classification !== null) { - this.classification = args.classification; - } - if (args.displayName !== undefined && args.displayName !== null) { - this.displayName = args.displayName; - } - if (args.totalBuddyCount !== undefined && args.totalBuddyCount !== null) { - this.totalBuddyCount = args.totalBuddyCount; - } - if (args.popularContacts !== undefined && args.popularContacts !== null) { - this.popularContacts = Thrift.copyList(args.popularContacts, [ttypes.Contact]); - } - } -}; -ttypes.BuddyList.prototype = {}; -ttypes.BuddyList.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.classification = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.displayName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.totalBuddyCount = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.LIST) { - this.popularContacts = []; - var _rtmp376 = input.readListBegin(); - var _size75 = _rtmp376.size || 0; - for (var _i77 = 0; _i77 < _size75; ++_i77) { - var elem78 = null; - elem78 = new ttypes.Contact(); - elem78.read(input); - this.popularContacts.push(elem78); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.BuddyList.prototype.write = function (output) { - output.writeStructBegin("BuddyList"); - if (this.classification !== null && this.classification !== undefined) { - output.writeFieldBegin("classification", Thrift.Type.STRING, 1); - output.writeString(this.classification); - output.writeFieldEnd(); - } - if (this.displayName !== null && this.displayName !== undefined) { - output.writeFieldBegin("displayName", Thrift.Type.STRING, 2); - output.writeString(this.displayName); - output.writeFieldEnd(); - } - if (this.totalBuddyCount !== null && this.totalBuddyCount !== undefined) { - output.writeFieldBegin("totalBuddyCount", Thrift.Type.I32, 3); - output.writeI32(this.totalBuddyCount); - output.writeFieldEnd(); - } - if (this.popularContacts !== null && this.popularContacts !== undefined) { - output.writeFieldBegin("popularContacts", Thrift.Type.LIST, 4); - output.writeListBegin(Thrift.Type.STRUCT, this.popularContacts.length); - for (var iter79 in this.popularContacts) { - if (this.popularContacts.hasOwnProperty(iter79)) { - iter79 = this.popularContacts[iter79]; - iter79.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.RegisterWithPhoneNumberResult = function (args) { - this.authToken = null; - this.recommendEmailRegistration = null; - this.certificate = null; - if (args) { - if (args.authToken !== undefined && args.authToken !== null) { - this.authToken = args.authToken; - } - if (args.recommendEmailRegistration !== undefined && args.recommendEmailRegistration !== null) { - this.recommendEmailRegistration = args.recommendEmailRegistration; - } - if (args.certificate !== undefined && args.certificate !== null) { - this.certificate = args.certificate; - } - } -}; -ttypes.RegisterWithPhoneNumberResult.prototype = {}; -ttypes.RegisterWithPhoneNumberResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.authToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.BOOL) { - this.recommendEmailRegistration = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.certificate = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.RegisterWithPhoneNumberResult.prototype.write = function (output) { - output.writeStructBegin("RegisterWithPhoneNumberResult"); - if (this.authToken !== null && this.authToken !== undefined) { - output.writeFieldBegin("authToken", Thrift.Type.STRING, 1); - output.writeString(this.authToken); - output.writeFieldEnd(); - } - if (this.recommendEmailRegistration !== null && this.recommendEmailRegistration !== undefined) { - output.writeFieldBegin("recommendEmailRegistration", Thrift.Type.BOOL, 2); - output.writeBool(this.recommendEmailRegistration); - output.writeFieldEnd(); - } - if (this.certificate !== null && this.certificate !== undefined) { - output.writeFieldBegin("certificate", Thrift.Type.STRING, 3); - output.writeString(this.certificate); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.BuddyMessageRequest = function (args) { - this.contentType = null; - this.text = null; - this.location = null; - this.content = null; - this.contentMetadata = null; - if (args) { - if (args.contentType !== undefined && args.contentType !== null) { - this.contentType = args.contentType; - } - if (args.text !== undefined && args.text !== null) { - this.text = args.text; - } - if (args.location !== undefined && args.location !== null) { - this.location = new ttypes.Location(args.location); - } - if (args.content !== undefined && args.content !== null) { - this.content = args.content; - } - if (args.contentMetadata !== undefined && args.contentMetadata !== null) { - this.contentMetadata = Thrift.copyMap(args.contentMetadata, [null]); - } - } -}; -ttypes.BuddyMessageRequest.prototype = {}; -ttypes.BuddyMessageRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.contentType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.text = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.location = new ttypes.Location(); - this.location.read(input); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.content = input.readBinary(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.MAP) { - this.contentMetadata = {}; - var _rtmp381 = input.readMapBegin(); - var _size80 = _rtmp381.size || 0; - for (var _i82 = 0; _i82 < _size80; ++_i82) { - var key83 = null; - var val84 = null; - key83 = input.readString(); - val84 = input.readString(); - this.contentMetadata[key83] = val84; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.BuddyMessageRequest.prototype.write = function (output) { - output.writeStructBegin("BuddyMessageRequest"); - if (this.contentType !== null && this.contentType !== undefined) { - output.writeFieldBegin("contentType", Thrift.Type.I32, 1); - output.writeI32(this.contentType); - output.writeFieldEnd(); - } - if (this.text !== null && this.text !== undefined) { - output.writeFieldBegin("text", Thrift.Type.STRING, 2); - output.writeString(this.text); - output.writeFieldEnd(); - } - if (this.location !== null && this.location !== undefined) { - output.writeFieldBegin("location", Thrift.Type.STRUCT, 3); - this.location.write(output); - output.writeFieldEnd(); - } - if (this.content !== null && this.content !== undefined) { - output.writeFieldBegin("content", Thrift.Type.STRING, 4); - output.writeBinary(this.content); - output.writeFieldEnd(); - } - if (this.contentMetadata !== null && this.contentMetadata !== undefined) { - output.writeFieldBegin("contentMetadata", Thrift.Type.MAP, 5); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.contentMetadata)); - for (var kiter85 in this.contentMetadata) { - if (this.contentMetadata.hasOwnProperty(kiter85)) { - var viter86 = this.contentMetadata[kiter85]; - output.writeString(kiter85); - output.writeString(viter86); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.BuddyOnAirUrls = function (args) { - this.hls = null; - this.smoothStreaming = null; - if (args) { - if (args.hls !== undefined && args.hls !== null) { - this.hls = Thrift.copyMap(args.hls, [null]); - } - if (args.smoothStreaming !== undefined && args.smoothStreaming !== null) { - this.smoothStreaming = Thrift.copyMap(args.smoothStreaming, [null]); - } - } -}; -ttypes.BuddyOnAirUrls.prototype = {}; -ttypes.BuddyOnAirUrls.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.MAP) { - this.hls = {}; - var _rtmp388 = input.readMapBegin(); - var _size87 = _rtmp388.size || 0; - for (var _i89 = 0; _i89 < _size87; ++_i89) { - var key90 = null; - var val91 = null; - key90 = input.readString(); - val91 = input.readString(); - this.hls[key90] = val91; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.MAP) { - this.smoothStreaming = {}; - var _rtmp393 = input.readMapBegin(); - var _size92 = _rtmp393.size || 0; - for (var _i94 = 0; _i94 < _size92; ++_i94) { - var key95 = null; - var val96 = null; - key95 = input.readString(); - val96 = input.readString(); - this.smoothStreaming[key95] = val96; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.BuddyOnAirUrls.prototype.write = function (output) { - output.writeStructBegin("BuddyOnAirUrls"); - if (this.hls !== null && this.hls !== undefined) { - output.writeFieldBegin("hls", Thrift.Type.MAP, 1); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.hls)); - for (var kiter97 in this.hls) { - if (this.hls.hasOwnProperty(kiter97)) { - var viter98 = this.hls[kiter97]; - output.writeString(kiter97); - output.writeString(viter98); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - if (this.smoothStreaming !== null && this.smoothStreaming !== undefined) { - output.writeFieldBegin("smoothStreaming", Thrift.Type.MAP, 2); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.smoothStreaming)); - for (var kiter99 in this.smoothStreaming) { - if (this.smoothStreaming.hasOwnProperty(kiter99)) { - var viter100 = this.smoothStreaming[kiter99]; - output.writeString(kiter99); - output.writeString(viter100); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.BuddyOnAir = function (args) { - this.mid = null; - this.freshnessLifetime = null; - this.onAirId = null; - this.onAir = null; - this.text = null; - this.viewerCount = null; - this.targetCount = null; - this.onAirType = null; - this.onAirUrls = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.freshnessLifetime !== undefined && args.freshnessLifetime !== null) { - this.freshnessLifetime = args.freshnessLifetime; - } - if (args.onAirId !== undefined && args.onAirId !== null) { - this.onAirId = args.onAirId; - } - if (args.onAir !== undefined && args.onAir !== null) { - this.onAir = args.onAir; - } - if (args.text !== undefined && args.text !== null) { - this.text = args.text; - } - if (args.viewerCount !== undefined && args.viewerCount !== null) { - this.viewerCount = args.viewerCount; - } - if (args.targetCount !== undefined && args.targetCount !== null) { - this.targetCount = args.targetCount; - } - if (args.onAirType !== undefined && args.onAirType !== null) { - this.onAirType = args.onAirType; - } - if (args.onAirUrls !== undefined && args.onAirUrls !== null) { - this.onAirUrls = new ttypes.BuddyOnAirUrls(args.onAirUrls); - } - } -}; -ttypes.BuddyOnAir.prototype = {}; -ttypes.BuddyOnAir.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.mid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I64) { - this.freshnessLifetime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.onAirId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.BOOL) { - this.onAir = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.STRING) { - this.text = input.readString(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.I64) { - this.viewerCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 13: - if (ftype == Thrift.Type.I64) { - this.targetCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 31: - if (ftype == Thrift.Type.I32) { - this.onAirType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 32: - if (ftype == Thrift.Type.STRUCT) { - this.onAirUrls = new ttypes.BuddyOnAirUrls(); - this.onAirUrls.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.BuddyOnAir.prototype.write = function (output) { - output.writeStructBegin("BuddyOnAir"); - if (this.mid !== null && this.mid !== undefined) { - output.writeFieldBegin("mid", Thrift.Type.STRING, 1); - output.writeString(this.mid); - output.writeFieldEnd(); - } - if (this.freshnessLifetime !== null && this.freshnessLifetime !== undefined) { - output.writeFieldBegin("freshnessLifetime", Thrift.Type.I64, 3); - output.writeI64(this.freshnessLifetime); - output.writeFieldEnd(); - } - if (this.onAirId !== null && this.onAirId !== undefined) { - output.writeFieldBegin("onAirId", Thrift.Type.STRING, 4); - output.writeString(this.onAirId); - output.writeFieldEnd(); - } - if (this.onAir !== null && this.onAir !== undefined) { - output.writeFieldBegin("onAir", Thrift.Type.BOOL, 5); - output.writeBool(this.onAir); - output.writeFieldEnd(); - } - if (this.text !== null && this.text !== undefined) { - output.writeFieldBegin("text", Thrift.Type.STRING, 11); - output.writeString(this.text); - output.writeFieldEnd(); - } - if (this.viewerCount !== null && this.viewerCount !== undefined) { - output.writeFieldBegin("viewerCount", Thrift.Type.I64, 12); - output.writeI64(this.viewerCount); - output.writeFieldEnd(); - } - if (this.targetCount !== null && this.targetCount !== undefined) { - output.writeFieldBegin("targetCount", Thrift.Type.I64, 13); - output.writeI64(this.targetCount); - output.writeFieldEnd(); - } - if (this.onAirType !== null && this.onAirType !== undefined) { - output.writeFieldBegin("onAirType", Thrift.Type.I32, 31); - output.writeI32(this.onAirType); - output.writeFieldEnd(); - } - if (this.onAirUrls !== null && this.onAirUrls !== undefined) { - output.writeFieldBegin("onAirUrls", Thrift.Type.STRUCT, 32); - this.onAirUrls.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.BuddyProfile = function (args) { - this.buddyId = null; - this.mid = null; - this.searchId = null; - this.displayName = null; - this.statusMessage = null; - this.contactCount = null; - if (args) { - if (args.buddyId !== undefined && args.buddyId !== null) { - this.buddyId = args.buddyId; - } - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.searchId !== undefined && args.searchId !== null) { - this.searchId = args.searchId; - } - if (args.displayName !== undefined && args.displayName !== null) { - this.displayName = args.displayName; - } - if (args.statusMessage !== undefined && args.statusMessage !== null) { - this.statusMessage = args.statusMessage; - } - if (args.contactCount !== undefined && args.contactCount !== null) { - this.contactCount = args.contactCount; - } - } -}; -ttypes.BuddyProfile.prototype = {}; -ttypes.BuddyProfile.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.buddyId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.mid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.searchId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.displayName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.statusMessage = input.readString(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.I64) { - this.contactCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.BuddyProfile.prototype.write = function (output) { - output.writeStructBegin("BuddyProfile"); - if (this.buddyId !== null && this.buddyId !== undefined) { - output.writeFieldBegin("buddyId", Thrift.Type.STRING, 1); - output.writeString(this.buddyId); - output.writeFieldEnd(); - } - if (this.mid !== null && this.mid !== undefined) { - output.writeFieldBegin("mid", Thrift.Type.STRING, 2); - output.writeString(this.mid); - output.writeFieldEnd(); - } - if (this.searchId !== null && this.searchId !== undefined) { - output.writeFieldBegin("searchId", Thrift.Type.STRING, 3); - output.writeString(this.searchId); - output.writeFieldEnd(); - } - if (this.displayName !== null && this.displayName !== undefined) { - output.writeFieldBegin("displayName", Thrift.Type.STRING, 4); - output.writeString(this.displayName); - output.writeFieldEnd(); - } - if (this.statusMessage !== null && this.statusMessage !== undefined) { - output.writeFieldBegin("statusMessage", Thrift.Type.STRING, 5); - output.writeString(this.statusMessage); - output.writeFieldEnd(); - } - if (this.contactCount !== null && this.contactCount !== undefined) { - output.writeFieldBegin("contactCount", Thrift.Type.I64, 11); - output.writeI64(this.contactCount); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.CommitMessageResult = function (args) { - this.message = null; - this.code = null; - this.reason = null; - this.successCount = null; - this.failCount = null; - this.unregisterCount = null; - this.blockCount = null; - if (args) { - if (args.message !== undefined && args.message !== null) { - this.message = new ttypes.Message(args.message); - } - if (args.code !== undefined && args.code !== null) { - this.code = args.code; - } - if (args.reason !== undefined && args.reason !== null) { - this.reason = args.reason; - } - if (args.successCount !== undefined && args.successCount !== null) { - this.successCount = args.successCount; - } - if (args.failCount !== undefined && args.failCount !== null) { - this.failCount = args.failCount; - } - if (args.unregisterCount !== undefined && args.unregisterCount !== null) { - this.unregisterCount = args.unregisterCount; - } - if (args.blockCount !== undefined && args.blockCount !== null) { - this.blockCount = args.blockCount; - } - } -}; -ttypes.CommitMessageResult.prototype = {}; -ttypes.CommitMessageResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.message = new ttypes.Message(); - this.message.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.code = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.reason = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I64) { - this.successCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I64) { - this.failCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.I64) { - this.unregisterCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.I64) { - this.blockCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.CommitMessageResult.prototype.write = function (output) { - output.writeStructBegin("CommitMessageResult"); - if (this.message !== null && this.message !== undefined) { - output.writeFieldBegin("message", Thrift.Type.STRUCT, 1); - this.message.write(output); - output.writeFieldEnd(); - } - if (this.code !== null && this.code !== undefined) { - output.writeFieldBegin("code", Thrift.Type.I32, 2); - output.writeI32(this.code); - output.writeFieldEnd(); - } - if (this.reason !== null && this.reason !== undefined) { - output.writeFieldBegin("reason", Thrift.Type.STRING, 3); - output.writeString(this.reason); - output.writeFieldEnd(); - } - if (this.successCount !== null && this.successCount !== undefined) { - output.writeFieldBegin("successCount", Thrift.Type.I64, 4); - output.writeI64(this.successCount); - output.writeFieldEnd(); - } - if (this.failCount !== null && this.failCount !== undefined) { - output.writeFieldBegin("failCount", Thrift.Type.I64, 5); - output.writeI64(this.failCount); - output.writeFieldEnd(); - } - if (this.unregisterCount !== null && this.unregisterCount !== undefined) { - output.writeFieldBegin("unregisterCount", Thrift.Type.I64, 6); - output.writeI64(this.unregisterCount); - output.writeFieldEnd(); - } - if (this.blockCount !== null && this.blockCount !== undefined) { - output.writeFieldBegin("blockCount", Thrift.Type.I64, 7); - output.writeI64(this.blockCount); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.BuddySearchResult = function (args) { - this.mid = null; - this.displayName = null; - this.pictureStatus = null; - this.picturePath = null; - this.statusMessage = null; - this.businessAccount = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.displayName !== undefined && args.displayName !== null) { - this.displayName = args.displayName; - } - if (args.pictureStatus !== undefined && args.pictureStatus !== null) { - this.pictureStatus = args.pictureStatus; - } - if (args.picturePath !== undefined && args.picturePath !== null) { - this.picturePath = args.picturePath; - } - if (args.statusMessage !== undefined && args.statusMessage !== null) { - this.statusMessage = args.statusMessage; - } - if (args.businessAccount !== undefined && args.businessAccount !== null) { - this.businessAccount = args.businessAccount; - } - } -}; -ttypes.BuddySearchResult.prototype = {}; -ttypes.BuddySearchResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.mid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.displayName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.pictureStatus = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.picturePath = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.statusMessage = input.readString(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.BOOL) { - this.businessAccount = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.BuddySearchResult.prototype.write = function (output) { - output.writeStructBegin("BuddySearchResult"); - if (this.mid !== null && this.mid !== undefined) { - output.writeFieldBegin("mid", Thrift.Type.STRING, 1); - output.writeString(this.mid); - output.writeFieldEnd(); - } - if (this.displayName !== null && this.displayName !== undefined) { - output.writeFieldBegin("displayName", Thrift.Type.STRING, 2); - output.writeString(this.displayName); - output.writeFieldEnd(); - } - if (this.pictureStatus !== null && this.pictureStatus !== undefined) { - output.writeFieldBegin("pictureStatus", Thrift.Type.STRING, 3); - output.writeString(this.pictureStatus); - output.writeFieldEnd(); - } - if (this.picturePath !== null && this.picturePath !== undefined) { - output.writeFieldBegin("picturePath", Thrift.Type.STRING, 4); - output.writeString(this.picturePath); - output.writeFieldEnd(); - } - if (this.statusMessage !== null && this.statusMessage !== undefined) { - output.writeFieldBegin("statusMessage", Thrift.Type.STRING, 5); - output.writeString(this.statusMessage); - output.writeFieldEnd(); - } - if (this.businessAccount !== null && this.businessAccount !== undefined) { - output.writeFieldBegin("businessAccount", Thrift.Type.BOOL, 6); - output.writeBool(this.businessAccount); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SyncParamMid = function (args) { - this.mid = null; - this.diff = null; - this.revision = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.diff !== undefined && args.diff !== null) { - this.diff = args.diff; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - } -}; -ttypes.SyncParamMid.prototype = {}; -ttypes.SyncParamMid.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.mid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.diff = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SyncParamMid.prototype.write = function (output) { - output.writeStructBegin("SyncParamMid"); - if (this.mid !== null && this.mid !== undefined) { - output.writeFieldBegin("mid", Thrift.Type.STRING, 1); - output.writeString(this.mid); - output.writeFieldEnd(); - } - if (this.diff !== null && this.diff !== undefined) { - output.writeFieldBegin("diff", Thrift.Type.I32, 2); - output.writeI32(this.diff); - output.writeFieldEnd(); - } - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 3); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SIMInfo = function (args) { - this.phoneNumber = null; - this.countryCode = null; - if (args) { - if (args.phoneNumber !== undefined && args.phoneNumber !== null) { - this.phoneNumber = args.phoneNumber; - } - if (args.countryCode !== undefined && args.countryCode !== null) { - this.countryCode = args.countryCode; - } - } -}; -ttypes.SIMInfo.prototype = {}; -ttypes.SIMInfo.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.phoneNumber = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.countryCode = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SIMInfo.prototype.write = function (output) { - output.writeStructBegin("SIMInfo"); - if (this.phoneNumber !== null && this.phoneNumber !== undefined) { - output.writeFieldBegin("phoneNumber", Thrift.Type.STRING, 1); - output.writeString(this.phoneNumber); - output.writeFieldEnd(); - } - if (this.countryCode !== null && this.countryCode !== undefined) { - output.writeFieldBegin("countryCode", Thrift.Type.STRING, 2); - output.writeString(this.countryCode); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SyncParamContact = function (args) { - this.syncParamMid = null; - this.contactStatus = null; - if (args) { - if (args.syncParamMid !== undefined && args.syncParamMid !== null) { - this.syncParamMid = new ttypes.SyncParamMid(args.syncParamMid); - } - if (args.contactStatus !== undefined && args.contactStatus !== null) { - this.contactStatus = args.contactStatus; - } - } -}; -ttypes.SyncParamContact.prototype = {}; -ttypes.SyncParamContact.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.syncParamMid = new ttypes.SyncParamMid(); - this.syncParamMid.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.contactStatus = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SyncParamContact.prototype.write = function (output) { - output.writeStructBegin("SyncParamContact"); - if (this.syncParamMid !== null && this.syncParamMid !== undefined) { - output.writeFieldBegin("syncParamMid", Thrift.Type.STRUCT, 1); - this.syncParamMid.write(output); - output.writeFieldEnd(); - } - if (this.contactStatus !== null && this.contactStatus !== undefined) { - output.writeFieldBegin("contactStatus", Thrift.Type.I32, 2); - output.writeI32(this.contactStatus); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ChannelDomains = function (args) { - this.channelDomains = null; - this.revision = null; - if (args) { - if (args.channelDomains !== undefined && args.channelDomains !== null) { - this.channelDomains = Thrift.copyList(args.channelDomains, [ttypes.ChannelDomain]); - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - } -}; -ttypes.ChannelDomains.prototype = {}; -ttypes.ChannelDomains.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.channelDomains = []; - var _rtmp3102 = input.readListBegin(); - var _size101 = _rtmp3102.size || 0; - for (var _i103 = 0; _i103 < _size101; ++_i103) { - var elem104 = null; - elem104 = new ttypes.ChannelDomain(); - elem104.read(input); - this.channelDomains.push(elem104); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ChannelDomains.prototype.write = function (output) { - output.writeStructBegin("ChannelDomains"); - if (this.channelDomains !== null && this.channelDomains !== undefined) { - output.writeFieldBegin("channelDomains", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.channelDomains.length); - for (var iter105 in this.channelDomains) { - if (this.channelDomains.hasOwnProperty(iter105)) { - iter105 = this.channelDomains[iter105]; - iter105.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 2); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ProductCategory = function (args) { - this.productCategoryId = null; - this.title = null; - this.productCount = null; - this.newFlag = null; - if (args) { - if (args.productCategoryId !== undefined && args.productCategoryId !== null) { - this.productCategoryId = args.productCategoryId; - } - if (args.title !== undefined && args.title !== null) { - this.title = args.title; - } - if (args.productCount !== undefined && args.productCount !== null) { - this.productCount = args.productCount; - } - if (args.newFlag !== undefined && args.newFlag !== null) { - this.newFlag = args.newFlag; - } - } -}; -ttypes.ProductCategory.prototype = {}; -ttypes.ProductCategory.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.productCategoryId = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.title = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.productCount = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.BOOL) { - this.newFlag = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ProductCategory.prototype.write = function (output) { - output.writeStructBegin("ProductCategory"); - if (this.productCategoryId !== null && this.productCategoryId !== undefined) { - output.writeFieldBegin("productCategoryId", Thrift.Type.I64, 1); - output.writeI64(this.productCategoryId); - output.writeFieldEnd(); - } - if (this.title !== null && this.title !== undefined) { - output.writeFieldBegin("title", Thrift.Type.STRING, 2); - output.writeString(this.title); - output.writeFieldEnd(); - } - if (this.productCount !== null && this.productCount !== undefined) { - output.writeFieldBegin("productCount", Thrift.Type.I32, 3); - output.writeI32(this.productCount); - output.writeFieldEnd(); - } - if (this.newFlag !== null && this.newFlag !== undefined) { - output.writeFieldBegin("newFlag", Thrift.Type.BOOL, 4); - output.writeBool(this.newFlag); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ChannelInfos = function (args) { - this.channelInfos = null; - this.revision = null; - if (args) { - if (args.channelInfos !== undefined && args.channelInfos !== null) { - this.channelInfos = Thrift.copyList(args.channelInfos, [ttypes.ChannelInfo]); - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - } -}; -ttypes.ChannelInfos.prototype = {}; -ttypes.ChannelInfos.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.channelInfos = []; - var _rtmp3107 = input.readListBegin(); - var _size106 = _rtmp3107.size || 0; - for (var _i108 = 0; _i108 < _size106; ++_i108) { - var elem109 = null; - elem109 = new ttypes.ChannelInfo(); - elem109.read(input); - this.channelInfos.push(elem109); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ChannelInfos.prototype.write = function (output) { - output.writeStructBegin("ChannelInfos"); - if (this.channelInfos !== null && this.channelInfos !== undefined) { - output.writeFieldBegin("channelInfos", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.channelInfos.length); - for (var iter110 in this.channelInfos) { - if (this.channelInfos.hasOwnProperty(iter110)) { - iter110 = this.channelInfos[iter110]; - iter110.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 2); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ChannelNotificationSetting = function (args) { - this.channelId = null; - this.name = null; - this.notificationReceivable = null; - this.messageReceivable = null; - this.showDefault = null; - if (args) { - if (args.channelId !== undefined && args.channelId !== null) { - this.channelId = args.channelId; - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - if (args.notificationReceivable !== undefined && args.notificationReceivable !== null) { - this.notificationReceivable = args.notificationReceivable; - } - if (args.messageReceivable !== undefined && args.messageReceivable !== null) { - this.messageReceivable = args.messageReceivable; - } - if (args.showDefault !== undefined && args.showDefault !== null) { - this.showDefault = args.showDefault; - } - } -}; -ttypes.ChannelNotificationSetting.prototype = {}; -ttypes.ChannelNotificationSetting.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.channelId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.name = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.BOOL) { - this.notificationReceivable = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.BOOL) { - this.messageReceivable = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.BOOL) { - this.showDefault = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ChannelNotificationSetting.prototype.write = function (output) { - output.writeStructBegin("ChannelNotificationSetting"); - if (this.channelId !== null && this.channelId !== undefined) { - output.writeFieldBegin("channelId", Thrift.Type.STRING, 1); - output.writeString(this.channelId); - output.writeFieldEnd(); - } - if (this.name !== null && this.name !== undefined) { - output.writeFieldBegin("name", Thrift.Type.STRING, 2); - output.writeString(this.name); - output.writeFieldEnd(); - } - if (this.notificationReceivable !== null && this.notificationReceivable !== undefined) { - output.writeFieldBegin("notificationReceivable", Thrift.Type.BOOL, 3); - output.writeBool(this.notificationReceivable); - output.writeFieldEnd(); - } - if (this.messageReceivable !== null && this.messageReceivable !== undefined) { - output.writeFieldBegin("messageReceivable", Thrift.Type.BOOL, 4); - output.writeBool(this.messageReceivable); - output.writeFieldEnd(); - } - if (this.showDefault !== null && this.showDefault !== undefined) { - output.writeFieldBegin("showDefault", Thrift.Type.BOOL, 5); - output.writeBool(this.showDefault); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ChannelSyncDatas = function (args) { - this.channelInfos = null; - this.channelDomains = null; - this.revision = null; - this.expires = null; - if (args) { - if (args.channelInfos !== undefined && args.channelInfos !== null) { - this.channelInfos = Thrift.copyList(args.channelInfos, [ttypes.ChannelInfo]); - } - if (args.channelDomains !== undefined && args.channelDomains !== null) { - this.channelDomains = Thrift.copyList(args.channelDomains, [ttypes.ChannelDomain]); - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.expires !== undefined && args.expires !== null) { - this.expires = args.expires; - } - } -}; -ttypes.ChannelSyncDatas.prototype = {}; -ttypes.ChannelSyncDatas.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.channelInfos = []; - var _rtmp3112 = input.readListBegin(); - var _size111 = _rtmp3112.size || 0; - for (var _i113 = 0; _i113 < _size111; ++_i113) { - var elem114 = null; - elem114 = new ttypes.ChannelInfo(); - elem114.read(input); - this.channelInfos.push(elem114); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.LIST) { - this.channelDomains = []; - var _rtmp3116 = input.readListBegin(); - var _size115 = _rtmp3116.size || 0; - for (var _i117 = 0; _i117 < _size115; ++_i117) { - var elem118 = null; - elem118 = new ttypes.ChannelDomain(); - elem118.read(input); - this.channelDomains.push(elem118); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I64) { - this.expires = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ChannelSyncDatas.prototype.write = function (output) { - output.writeStructBegin("ChannelSyncDatas"); - if (this.channelInfos !== null && this.channelInfos !== undefined) { - output.writeFieldBegin("channelInfos", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.channelInfos.length); - for (var iter119 in this.channelInfos) { - if (this.channelInfos.hasOwnProperty(iter119)) { - iter119 = this.channelInfos[iter119]; - iter119.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.channelDomains !== null && this.channelDomains !== undefined) { - output.writeFieldBegin("channelDomains", Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.STRUCT, this.channelDomains.length); - for (var iter120 in this.channelDomains) { - if (this.channelDomains.hasOwnProperty(iter120)) { - iter120 = this.channelDomains[iter120]; - iter120.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 3); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - if (this.expires !== null && this.expires !== undefined) { - output.writeFieldBegin("expires", Thrift.Type.I64, 4); - output.writeI64(this.expires); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.NotiCenterEventData = function (args) { - this.id = null; - this.to = null; - this.from_ = null; - this.toChannel = null; - this.fromChannel = null; - this.eventType = null; - this.createdTime = null; - this.operationRevision = null; - this.content = null; - this.push = null; - if (args) { - if (args.id !== undefined && args.id !== null) { - this.id = args.id; - } - if (args.to !== undefined && args.to !== null) { - this.to = args.to; - } - if (args.from_ !== undefined && args.from_ !== null) { - this.from_ = args.from_; - } - if (args.toChannel !== undefined && args.toChannel !== null) { - this.toChannel = args.toChannel; - } - if (args.fromChannel !== undefined && args.fromChannel !== null) { - this.fromChannel = args.fromChannel; - } - if (args.eventType !== undefined && args.eventType !== null) { - this.eventType = args.eventType; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.operationRevision !== undefined && args.operationRevision !== null) { - this.operationRevision = args.operationRevision; - } - if (args.content !== undefined && args.content !== null) { - this.content = Thrift.copyMap(args.content, [null]); - } - if (args.push !== undefined && args.push !== null) { - this.push = Thrift.copyMap(args.push, [null]); - } - } -}; -ttypes.NotiCenterEventData.prototype = {}; -ttypes.NotiCenterEventData.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.id = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.to = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.from_ = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.toChannel = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.fromChannel = input.readString(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRING) { - this.eventType = input.readString(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.I64) { - this.createdTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 8: - if (ftype == Thrift.Type.I64) { - this.operationRevision = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 9: - if (ftype == Thrift.Type.MAP) { - this.content = {}; - var _rtmp3122 = input.readMapBegin(); - var _size121 = _rtmp3122.size || 0; - for (var _i123 = 0; _i123 < _size121; ++_i123) { - var key124 = null; - var val125 = null; - key124 = input.readString(); - val125 = input.readString(); - this.content[key124] = val125; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.MAP) { - this.push = {}; - var _rtmp3127 = input.readMapBegin(); - var _size126 = _rtmp3127.size || 0; - for (var _i128 = 0; _i128 < _size126; ++_i128) { - var key129 = null; - var val130 = null; - key129 = input.readString(); - val130 = input.readString(); - this.push[key129] = val130; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.NotiCenterEventData.prototype.write = function (output) { - output.writeStructBegin("NotiCenterEventData"); - if (this.id !== null && this.id !== undefined) { - output.writeFieldBegin("id", Thrift.Type.STRING, 1); - output.writeString(this.id); - output.writeFieldEnd(); - } - if (this.to !== null && this.to !== undefined) { - output.writeFieldBegin("to", Thrift.Type.STRING, 2); - output.writeString(this.to); - output.writeFieldEnd(); - } - if (this.from_ !== null && this.from_ !== undefined) { - output.writeFieldBegin("from_", Thrift.Type.STRING, 3); - output.writeString(this.from_); - output.writeFieldEnd(); - } - if (this.toChannel !== null && this.toChannel !== undefined) { - output.writeFieldBegin("toChannel", Thrift.Type.STRING, 4); - output.writeString(this.toChannel); - output.writeFieldEnd(); - } - if (this.fromChannel !== null && this.fromChannel !== undefined) { - output.writeFieldBegin("fromChannel", Thrift.Type.STRING, 5); - output.writeString(this.fromChannel); - output.writeFieldEnd(); - } - if (this.eventType !== null && this.eventType !== undefined) { - output.writeFieldBegin("eventType", Thrift.Type.STRING, 6); - output.writeString(this.eventType); - output.writeFieldEnd(); - } - if (this.createdTime !== null && this.createdTime !== undefined) { - output.writeFieldBegin("createdTime", Thrift.Type.I64, 7); - output.writeI64(this.createdTime); - output.writeFieldEnd(); - } - if (this.operationRevision !== null && this.operationRevision !== undefined) { - output.writeFieldBegin("operationRevision", Thrift.Type.I64, 8); - output.writeI64(this.operationRevision); - output.writeFieldEnd(); - } - if (this.content !== null && this.content !== undefined) { - output.writeFieldBegin("content", Thrift.Type.MAP, 9); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.content)); - for (var kiter131 in this.content) { - if (this.content.hasOwnProperty(kiter131)) { - var viter132 = this.content[kiter131]; - output.writeString(kiter131); - output.writeString(viter132); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - if (this.push !== null && this.push !== undefined) { - output.writeFieldBegin("push", Thrift.Type.MAP, 10); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.push)); - for (var kiter133 in this.push) { - if (this.push.hasOwnProperty(kiter133)) { - var viter134 = this.push[kiter133]; - output.writeString(kiter133); - output.writeString(viter134); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ChannelToken = function (args) { - this.token = null; - this.obsToken = null; - this.expiration = null; - this.refreshToken = null; - this.channelAccessToken = null; - if (args) { - if (args.token !== undefined && args.token !== null) { - this.token = args.token; - } - if (args.obsToken !== undefined && args.obsToken !== null) { - this.obsToken = args.obsToken; - } - if (args.expiration !== undefined && args.expiration !== null) { - this.expiration = args.expiration; - } - if (args.refreshToken !== undefined && args.refreshToken !== null) { - this.refreshToken = args.refreshToken; - } - if (args.channelAccessToken !== undefined && args.channelAccessToken !== null) { - this.channelAccessToken = args.channelAccessToken; - } - } -}; -ttypes.ChannelToken.prototype = {}; -ttypes.ChannelToken.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.token = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.obsToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I64) { - this.expiration = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.refreshToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.channelAccessToken = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ChannelToken.prototype.write = function (output) { - output.writeStructBegin("ChannelToken"); - if (this.token !== null && this.token !== undefined) { - output.writeFieldBegin("token", Thrift.Type.STRING, 1); - output.writeString(this.token); - output.writeFieldEnd(); - } - if (this.obsToken !== null && this.obsToken !== undefined) { - output.writeFieldBegin("obsToken", Thrift.Type.STRING, 2); - output.writeString(this.obsToken); - output.writeFieldEnd(); - } - if (this.expiration !== null && this.expiration !== undefined) { - output.writeFieldBegin("expiration", Thrift.Type.I64, 3); - output.writeI64(this.expiration); - output.writeFieldEnd(); - } - if (this.refreshToken !== null && this.refreshToken !== undefined) { - output.writeFieldBegin("refreshToken", Thrift.Type.STRING, 4); - output.writeString(this.refreshToken); - output.writeFieldEnd(); - } - if (this.channelAccessToken !== null && this.channelAccessToken !== undefined) { - output.writeFieldBegin("channelAccessToken", Thrift.Type.STRING, 5); - output.writeString(this.channelAccessToken); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ChannelSettings = function (args) { - this.unapprovedMessageReceivable = null; - if (args) { - if (args.unapprovedMessageReceivable !== undefined && args.unapprovedMessageReceivable !== null) { - this.unapprovedMessageReceivable = args.unapprovedMessageReceivable; - } - } -}; -ttypes.ChannelSettings.prototype = {}; -ttypes.ChannelSettings.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.BOOL) { - this.unapprovedMessageReceivable = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ChannelSettings.prototype.write = function (output) { - output.writeStructBegin("ChannelSettings"); - if (this.unapprovedMessageReceivable !== null && this.unapprovedMessageReceivable !== undefined) { - output.writeFieldBegin("unapprovedMessageReceivable", Thrift.Type.BOOL, 1); - output.writeBool(this.unapprovedMessageReceivable); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ChannelIdWithLastUpdated = function (args) { - this.channelId = null; - this.lastUpdated = null; - if (args) { - if (args.channelId !== undefined && args.channelId !== null) { - this.channelId = args.channelId; - } - if (args.lastUpdated !== undefined && args.lastUpdated !== null) { - this.lastUpdated = args.lastUpdated; - } - } -}; -ttypes.ChannelIdWithLastUpdated.prototype = {}; -ttypes.ChannelIdWithLastUpdated.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.channelId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.lastUpdated = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ChannelIdWithLastUpdated.prototype.write = function (output) { - output.writeStructBegin("ChannelIdWithLastUpdated"); - if (this.channelId !== null && this.channelId !== undefined) { - output.writeFieldBegin("channelId", Thrift.Type.STRING, 1); - output.writeString(this.channelId); - output.writeFieldEnd(); - } - if (this.lastUpdated !== null && this.lastUpdated !== undefined) { - output.writeFieldBegin("lastUpdated", Thrift.Type.I64, 2); - output.writeI64(this.lastUpdated); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.Coin = function (args) { - this.freeCoinBalance = null; - this.payedCoinBalance = null; - this.totalCoinBalance = null; - this.rewardCoinBalance = null; - if (args) { - if (args.freeCoinBalance !== undefined && args.freeCoinBalance !== null) { - this.freeCoinBalance = args.freeCoinBalance; - } - if (args.payedCoinBalance !== undefined && args.payedCoinBalance !== null) { - this.payedCoinBalance = args.payedCoinBalance; - } - if (args.totalCoinBalance !== undefined && args.totalCoinBalance !== null) { - this.totalCoinBalance = args.totalCoinBalance; - } - if (args.rewardCoinBalance !== undefined && args.rewardCoinBalance !== null) { - this.rewardCoinBalance = args.rewardCoinBalance; - } - } -}; -ttypes.Coin.prototype = {}; -ttypes.Coin.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.freeCoinBalance = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.payedCoinBalance = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.totalCoinBalance = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.rewardCoinBalance = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.Coin.prototype.write = function (output) { - output.writeStructBegin("Coin"); - if (this.freeCoinBalance !== null && this.freeCoinBalance !== undefined) { - output.writeFieldBegin("freeCoinBalance", Thrift.Type.I32, 1); - output.writeI32(this.freeCoinBalance); - output.writeFieldEnd(); - } - if (this.payedCoinBalance !== null && this.payedCoinBalance !== undefined) { - output.writeFieldBegin("payedCoinBalance", Thrift.Type.I32, 2); - output.writeI32(this.payedCoinBalance); - output.writeFieldEnd(); - } - if (this.totalCoinBalance !== null && this.totalCoinBalance !== undefined) { - output.writeFieldBegin("totalCoinBalance", Thrift.Type.I32, 3); - output.writeI32(this.totalCoinBalance); - output.writeFieldEnd(); - } - if (this.rewardCoinBalance !== null && this.rewardCoinBalance !== undefined) { - output.writeFieldBegin("rewardCoinBalance", Thrift.Type.I32, 4); - output.writeI32(this.rewardCoinBalance); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.CoinPayLoad = function (args) { - this.payCoin = null; - this.freeCoin = null; - this.type = null; - this.rewardCoin = null; - if (args) { - if (args.payCoin !== undefined && args.payCoin !== null) { - this.payCoin = args.payCoin; - } - if (args.freeCoin !== undefined && args.freeCoin !== null) { - this.freeCoin = args.freeCoin; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.rewardCoin !== undefined && args.rewardCoin !== null) { - this.rewardCoin = args.rewardCoin; - } - } -}; -ttypes.CoinPayLoad.prototype = {}; -ttypes.CoinPayLoad.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.payCoin = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.freeCoin = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.type = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.rewardCoin = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.CoinPayLoad.prototype.write = function (output) { - output.writeStructBegin("CoinPayLoad"); - if (this.payCoin !== null && this.payCoin !== undefined) { - output.writeFieldBegin("payCoin", Thrift.Type.I32, 1); - output.writeI32(this.payCoin); - output.writeFieldEnd(); - } - if (this.freeCoin !== null && this.freeCoin !== undefined) { - output.writeFieldBegin("freeCoin", Thrift.Type.I32, 2); - output.writeI32(this.freeCoin); - output.writeFieldEnd(); - } - if (this.type !== null && this.type !== undefined) { - output.writeFieldBegin("type", Thrift.Type.I32, 3); - output.writeI32(this.type); - output.writeFieldEnd(); - } - if (this.rewardCoin !== null && this.rewardCoin !== undefined) { - output.writeFieldBegin("rewardCoin", Thrift.Type.I32, 4); - output.writeI32(this.rewardCoin); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.CoinHistory = function (args) { - this.payDate = null; - this.coinBalance = null; - this.coin = null; - this.price = null; - this.title = null; - this.refund = null; - this.paySeq = null; - this.currency = null; - this.currencySign = null; - this.displayPrice = null; - this.payload = null; - this.channelId = null; - if (args) { - if (args.payDate !== undefined && args.payDate !== null) { - this.payDate = args.payDate; - } - if (args.coinBalance !== undefined && args.coinBalance !== null) { - this.coinBalance = args.coinBalance; - } - if (args.coin !== undefined && args.coin !== null) { - this.coin = args.coin; - } - if (args.price !== undefined && args.price !== null) { - this.price = args.price; - } - if (args.title !== undefined && args.title !== null) { - this.title = args.title; - } - if (args.refund !== undefined && args.refund !== null) { - this.refund = args.refund; - } - if (args.paySeq !== undefined && args.paySeq !== null) { - this.paySeq = args.paySeq; - } - if (args.currency !== undefined && args.currency !== null) { - this.currency = args.currency; - } - if (args.currencySign !== undefined && args.currencySign !== null) { - this.currencySign = args.currencySign; - } - if (args.displayPrice !== undefined && args.displayPrice !== null) { - this.displayPrice = args.displayPrice; - } - if (args.payload !== undefined && args.payload !== null) { - this.payload = new ttypes.CoinPayLoad(args.payload); - } - if (args.channelId !== undefined && args.channelId !== null) { - this.channelId = args.channelId; - } - } -}; -ttypes.CoinHistory.prototype = {}; -ttypes.CoinHistory.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.payDate = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.coinBalance = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.coin = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.price = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.title = input.readString(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.BOOL) { - this.refund = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.STRING) { - this.paySeq = input.readString(); - } else { - input.skip(ftype); - } - break; - case 8: - if (ftype == Thrift.Type.STRING) { - this.currency = input.readString(); - } else { - input.skip(ftype); - } - break; - case 9: - if (ftype == Thrift.Type.STRING) { - this.currencySign = input.readString(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.STRING) { - this.displayPrice = input.readString(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.STRUCT) { - this.payload = new ttypes.CoinPayLoad(); - this.payload.read(input); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.STRING) { - this.channelId = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.CoinHistory.prototype.write = function (output) { - output.writeStructBegin("CoinHistory"); - if (this.payDate !== null && this.payDate !== undefined) { - output.writeFieldBegin("payDate", Thrift.Type.I64, 1); - output.writeI64(this.payDate); - output.writeFieldEnd(); - } - if (this.coinBalance !== null && this.coinBalance !== undefined) { - output.writeFieldBegin("coinBalance", Thrift.Type.I32, 2); - output.writeI32(this.coinBalance); - output.writeFieldEnd(); - } - if (this.coin !== null && this.coin !== undefined) { - output.writeFieldBegin("coin", Thrift.Type.I32, 3); - output.writeI32(this.coin); - output.writeFieldEnd(); - } - if (this.price !== null && this.price !== undefined) { - output.writeFieldBegin("price", Thrift.Type.STRING, 4); - output.writeString(this.price); - output.writeFieldEnd(); - } - if (this.title !== null && this.title !== undefined) { - output.writeFieldBegin("title", Thrift.Type.STRING, 5); - output.writeString(this.title); - output.writeFieldEnd(); - } - if (this.refund !== null && this.refund !== undefined) { - output.writeFieldBegin("refund", Thrift.Type.BOOL, 6); - output.writeBool(this.refund); - output.writeFieldEnd(); - } - if (this.paySeq !== null && this.paySeq !== undefined) { - output.writeFieldBegin("paySeq", Thrift.Type.STRING, 7); - output.writeString(this.paySeq); - output.writeFieldEnd(); - } - if (this.currency !== null && this.currency !== undefined) { - output.writeFieldBegin("currency", Thrift.Type.STRING, 8); - output.writeString(this.currency); - output.writeFieldEnd(); - } - if (this.currencySign !== null && this.currencySign !== undefined) { - output.writeFieldBegin("currencySign", Thrift.Type.STRING, 9); - output.writeString(this.currencySign); - output.writeFieldEnd(); - } - if (this.displayPrice !== null && this.displayPrice !== undefined) { - output.writeFieldBegin("displayPrice", Thrift.Type.STRING, 10); - output.writeString(this.displayPrice); - output.writeFieldEnd(); - } - if (this.payload !== null && this.payload !== undefined) { - output.writeFieldBegin("payload", Thrift.Type.STRUCT, 11); - this.payload.write(output); - output.writeFieldEnd(); - } - if (this.channelId !== null && this.channelId !== undefined) { - output.writeFieldBegin("channelId", Thrift.Type.STRING, 12); - output.writeString(this.channelId); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.CoinHistoryCondition = function (args) { - this.start = null; - this.size = null; - this.language = null; - this.eddt = null; - this.appStoreCode = null; - if (args) { - if (args.start !== undefined && args.start !== null) { - this.start = args.start; - } - if (args.size !== undefined && args.size !== null) { - this.size = args.size; - } - if (args.language !== undefined && args.language !== null) { - this.language = args.language; - } - if (args.eddt !== undefined && args.eddt !== null) { - this.eddt = args.eddt; - } - if (args.appStoreCode !== undefined && args.appStoreCode !== null) { - this.appStoreCode = args.appStoreCode; - } - } -}; -ttypes.CoinHistoryCondition.prototype = {}; -ttypes.CoinHistoryCondition.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.start = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.size = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.language = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.eddt = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I32) { - this.appStoreCode = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.CoinHistoryCondition.prototype.write = function (output) { - output.writeStructBegin("CoinHistoryCondition"); - if (this.start !== null && this.start !== undefined) { - output.writeFieldBegin("start", Thrift.Type.I64, 1); - output.writeI64(this.start); - output.writeFieldEnd(); - } - if (this.size !== null && this.size !== undefined) { - output.writeFieldBegin("size", Thrift.Type.I32, 2); - output.writeI32(this.size); - output.writeFieldEnd(); - } - if (this.language !== null && this.language !== undefined) { - output.writeFieldBegin("language", Thrift.Type.STRING, 3); - output.writeString(this.language); - output.writeFieldEnd(); - } - if (this.eddt !== null && this.eddt !== undefined) { - output.writeFieldBegin("eddt", Thrift.Type.STRING, 4); - output.writeString(this.eddt); - output.writeFieldEnd(); - } - if (this.appStoreCode !== null && this.appStoreCode !== undefined) { - output.writeFieldBegin("appStoreCode", Thrift.Type.I32, 5); - output.writeI32(this.appStoreCode); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.CoinHistoryResult = function (args) { - this.historys = null; - this.balance = null; - this.hasNext = null; - if (args) { - if (args.historys !== undefined && args.historys !== null) { - this.historys = Thrift.copyList(args.historys, [ttypes.CoinHistory]); - } - if (args.balance !== undefined && args.balance !== null) { - this.balance = new ttypes.Coin(args.balance); - } - if (args.hasNext !== undefined && args.hasNext !== null) { - this.hasNext = args.hasNext; - } - } -}; -ttypes.CoinHistoryResult.prototype = {}; -ttypes.CoinHistoryResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.historys = []; - var _rtmp3136 = input.readListBegin(); - var _size135 = _rtmp3136.size || 0; - for (var _i137 = 0; _i137 < _size135; ++_i137) { - var elem138 = null; - elem138 = new ttypes.CoinHistory(); - elem138.read(input); - this.historys.push(elem138); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.balance = new ttypes.Coin(); - this.balance.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.BOOL) { - this.hasNext = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.CoinHistoryResult.prototype.write = function (output) { - output.writeStructBegin("CoinHistoryResult"); - if (this.historys !== null && this.historys !== undefined) { - output.writeFieldBegin("historys", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.historys.length); - for (var iter139 in this.historys) { - if (this.historys.hasOwnProperty(iter139)) { - iter139 = this.historys[iter139]; - iter139.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.balance !== null && this.balance !== undefined) { - output.writeFieldBegin("balance", Thrift.Type.STRUCT, 2); - this.balance.write(output); - output.writeFieldEnd(); - } - if (this.hasNext !== null && this.hasNext !== undefined) { - output.writeFieldBegin("hasNext", Thrift.Type.BOOL, 3); - output.writeBool(this.hasNext); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.CoinProductItem = function (args) { - this.itemId = null; - this.coin = null; - this.freeCoin = null; - this.currency = null; - this.price = null; - this.displayPrice = null; - this.name = null; - this.desc = null; - if (args) { - if (args.itemId !== undefined && args.itemId !== null) { - this.itemId = args.itemId; - } - if (args.coin !== undefined && args.coin !== null) { - this.coin = args.coin; - } - if (args.freeCoin !== undefined && args.freeCoin !== null) { - this.freeCoin = args.freeCoin; - } - if (args.currency !== undefined && args.currency !== null) { - this.currency = args.currency; - } - if (args.price !== undefined && args.price !== null) { - this.price = args.price; - } - if (args.displayPrice !== undefined && args.displayPrice !== null) { - this.displayPrice = args.displayPrice; - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - if (args.desc !== undefined && args.desc !== null) { - this.desc = args.desc; - } - } -}; -ttypes.CoinProductItem.prototype = {}; -ttypes.CoinProductItem.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.itemId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.coin = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.freeCoin = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.currency = input.readString(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRING) { - this.price = input.readString(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.STRING) { - this.displayPrice = input.readString(); - } else { - input.skip(ftype); - } - break; - case 8: - if (ftype == Thrift.Type.STRING) { - this.name = input.readString(); - } else { - input.skip(ftype); - } - break; - case 9: - if (ftype == Thrift.Type.STRING) { - this.desc = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.CoinProductItem.prototype.write = function (output) { - output.writeStructBegin("CoinProductItem"); - if (this.itemId !== null && this.itemId !== undefined) { - output.writeFieldBegin("itemId", Thrift.Type.STRING, 1); - output.writeString(this.itemId); - output.writeFieldEnd(); - } - if (this.coin !== null && this.coin !== undefined) { - output.writeFieldBegin("coin", Thrift.Type.I32, 2); - output.writeI32(this.coin); - output.writeFieldEnd(); - } - if (this.freeCoin !== null && this.freeCoin !== undefined) { - output.writeFieldBegin("freeCoin", Thrift.Type.I32, 3); - output.writeI32(this.freeCoin); - output.writeFieldEnd(); - } - if (this.currency !== null && this.currency !== undefined) { - output.writeFieldBegin("currency", Thrift.Type.STRING, 5); - output.writeString(this.currency); - output.writeFieldEnd(); - } - if (this.price !== null && this.price !== undefined) { - output.writeFieldBegin("price", Thrift.Type.STRING, 6); - output.writeString(this.price); - output.writeFieldEnd(); - } - if (this.displayPrice !== null && this.displayPrice !== undefined) { - output.writeFieldBegin("displayPrice", Thrift.Type.STRING, 7); - output.writeString(this.displayPrice); - output.writeFieldEnd(); - } - if (this.name !== null && this.name !== undefined) { - output.writeFieldBegin("name", Thrift.Type.STRING, 8); - output.writeString(this.name); - output.writeFieldEnd(); - } - if (this.desc !== null && this.desc !== undefined) { - output.writeFieldBegin("desc", Thrift.Type.STRING, 9); - output.writeString(this.desc); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.CoinPurchaseConfirm = function (args) { - this.orderId = null; - this.appStoreCode = null; - this.receipt = null; - this.signature = null; - this.seller = null; - this.requestType = null; - this.ignoreReceipt = null; - if (args) { - if (args.orderId !== undefined && args.orderId !== null) { - this.orderId = args.orderId; - } - if (args.appStoreCode !== undefined && args.appStoreCode !== null) { - this.appStoreCode = args.appStoreCode; - } - if (args.receipt !== undefined && args.receipt !== null) { - this.receipt = args.receipt; - } - if (args.signature !== undefined && args.signature !== null) { - this.signature = args.signature; - } - if (args.seller !== undefined && args.seller !== null) { - this.seller = args.seller; - } - if (args.requestType !== undefined && args.requestType !== null) { - this.requestType = args.requestType; - } - if (args.ignoreReceipt !== undefined && args.ignoreReceipt !== null) { - this.ignoreReceipt = args.ignoreReceipt; - } - } -}; -ttypes.CoinPurchaseConfirm.prototype = {}; -ttypes.CoinPurchaseConfirm.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.orderId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.appStoreCode = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.receipt = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.signature = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.seller = input.readString(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRING) { - this.requestType = input.readString(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.BOOL) { - this.ignoreReceipt = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.CoinPurchaseConfirm.prototype.write = function (output) { - output.writeStructBegin("CoinPurchaseConfirm"); - if (this.orderId !== null && this.orderId !== undefined) { - output.writeFieldBegin("orderId", Thrift.Type.STRING, 1); - output.writeString(this.orderId); - output.writeFieldEnd(); - } - if (this.appStoreCode !== null && this.appStoreCode !== undefined) { - output.writeFieldBegin("appStoreCode", Thrift.Type.I32, 2); - output.writeI32(this.appStoreCode); - output.writeFieldEnd(); - } - if (this.receipt !== null && this.receipt !== undefined) { - output.writeFieldBegin("receipt", Thrift.Type.STRING, 3); - output.writeString(this.receipt); - output.writeFieldEnd(); - } - if (this.signature !== null && this.signature !== undefined) { - output.writeFieldBegin("signature", Thrift.Type.STRING, 4); - output.writeString(this.signature); - output.writeFieldEnd(); - } - if (this.seller !== null && this.seller !== undefined) { - output.writeFieldBegin("seller", Thrift.Type.STRING, 5); - output.writeString(this.seller); - output.writeFieldEnd(); - } - if (this.requestType !== null && this.requestType !== undefined) { - output.writeFieldBegin("requestType", Thrift.Type.STRING, 6); - output.writeString(this.requestType); - output.writeFieldEnd(); - } - if (this.ignoreReceipt !== null && this.ignoreReceipt !== undefined) { - output.writeFieldBegin("ignoreReceipt", Thrift.Type.BOOL, 7); - output.writeBool(this.ignoreReceipt); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.CoinPurchaseReservation = function (args) { - this.productId = null; - this.country = null; - this.currency = null; - this.price = null; - this.appStoreCode = null; - this.language = null; - this.pgCode = null; - this.redirectUrl = null; - if (args) { - if (args.productId !== undefined && args.productId !== null) { - this.productId = args.productId; - } - if (args.country !== undefined && args.country !== null) { - this.country = args.country; - } - if (args.currency !== undefined && args.currency !== null) { - this.currency = args.currency; - } - if (args.price !== undefined && args.price !== null) { - this.price = args.price; - } - if (args.appStoreCode !== undefined && args.appStoreCode !== null) { - this.appStoreCode = args.appStoreCode; - } - if (args.language !== undefined && args.language !== null) { - this.language = args.language; - } - if (args.pgCode !== undefined && args.pgCode !== null) { - this.pgCode = args.pgCode; - } - if (args.redirectUrl !== undefined && args.redirectUrl !== null) { - this.redirectUrl = args.redirectUrl; - } - } -}; -ttypes.CoinPurchaseReservation.prototype = {}; -ttypes.CoinPurchaseReservation.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.productId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.country = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.currency = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.price = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I32) { - this.appStoreCode = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRING) { - this.language = input.readString(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.I32) { - this.pgCode = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 8: - if (ftype == Thrift.Type.STRING) { - this.redirectUrl = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.CoinPurchaseReservation.prototype.write = function (output) { - output.writeStructBegin("CoinPurchaseReservation"); - if (this.productId !== null && this.productId !== undefined) { - output.writeFieldBegin("productId", Thrift.Type.STRING, 1); - output.writeString(this.productId); - output.writeFieldEnd(); - } - if (this.country !== null && this.country !== undefined) { - output.writeFieldBegin("country", Thrift.Type.STRING, 2); - output.writeString(this.country); - output.writeFieldEnd(); - } - if (this.currency !== null && this.currency !== undefined) { - output.writeFieldBegin("currency", Thrift.Type.STRING, 3); - output.writeString(this.currency); - output.writeFieldEnd(); - } - if (this.price !== null && this.price !== undefined) { - output.writeFieldBegin("price", Thrift.Type.STRING, 4); - output.writeString(this.price); - output.writeFieldEnd(); - } - if (this.appStoreCode !== null && this.appStoreCode !== undefined) { - output.writeFieldBegin("appStoreCode", Thrift.Type.I32, 5); - output.writeI32(this.appStoreCode); - output.writeFieldEnd(); - } - if (this.language !== null && this.language !== undefined) { - output.writeFieldBegin("language", Thrift.Type.STRING, 6); - output.writeString(this.language); - output.writeFieldEnd(); - } - if (this.pgCode !== null && this.pgCode !== undefined) { - output.writeFieldBegin("pgCode", Thrift.Type.I32, 7); - output.writeI32(this.pgCode); - output.writeFieldEnd(); - } - if (this.redirectUrl !== null && this.redirectUrl !== undefined) { - output.writeFieldBegin("redirectUrl", Thrift.Type.STRING, 8); - output.writeString(this.redirectUrl); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.CoinUseReservationItem = function (args) { - this.itemId = null; - this.itemName = null; - this.amount = null; - if (args) { - if (args.itemId !== undefined && args.itemId !== null) { - this.itemId = args.itemId; - } - if (args.itemName !== undefined && args.itemName !== null) { - this.itemName = args.itemName; - } - if (args.amount !== undefined && args.amount !== null) { - this.amount = args.amount; - } - } -}; -ttypes.CoinUseReservationItem.prototype = {}; -ttypes.CoinUseReservationItem.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.itemId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.itemName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.amount = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.CoinUseReservationItem.prototype.write = function (output) { - output.writeStructBegin("CoinUseReservationItem"); - if (this.itemId !== null && this.itemId !== undefined) { - output.writeFieldBegin("itemId", Thrift.Type.STRING, 1); - output.writeString(this.itemId); - output.writeFieldEnd(); - } - if (this.itemName !== null && this.itemName !== undefined) { - output.writeFieldBegin("itemName", Thrift.Type.STRING, 2); - output.writeString(this.itemName); - output.writeFieldEnd(); - } - if (this.amount !== null && this.amount !== undefined) { - output.writeFieldBegin("amount", Thrift.Type.I32, 3); - output.writeI32(this.amount); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.CoinUseReservation = function (args) { - this.channelId = null; - this.shopOrderId = null; - this.appStoreCode = null; - this.items = null; - this.country = null; - if (args) { - if (args.channelId !== undefined && args.channelId !== null) { - this.channelId = args.channelId; - } - if (args.shopOrderId !== undefined && args.shopOrderId !== null) { - this.shopOrderId = args.shopOrderId; - } - if (args.appStoreCode !== undefined && args.appStoreCode !== null) { - this.appStoreCode = args.appStoreCode; - } - if (args.items !== undefined && args.items !== null) { - this.items = Thrift.copyList(args.items, [ttypes.CoinUseReservationItem]); - } - if (args.country !== undefined && args.country !== null) { - this.country = args.country; - } - } -}; -ttypes.CoinUseReservation.prototype = {}; -ttypes.CoinUseReservation.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.channelId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.shopOrderId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.appStoreCode = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.LIST) { - this.items = []; - var _rtmp3141 = input.readListBegin(); - var _size140 = _rtmp3141.size || 0; - for (var _i142 = 0; _i142 < _size140; ++_i142) { - var elem143 = null; - elem143 = new ttypes.CoinUseReservationItem(); - elem143.read(input); - this.items.push(elem143); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.country = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.CoinUseReservation.prototype.write = function (output) { - output.writeStructBegin("CoinUseReservation"); - if (this.channelId !== null && this.channelId !== undefined) { - output.writeFieldBegin("channelId", Thrift.Type.STRING, 1); - output.writeString(this.channelId); - output.writeFieldEnd(); - } - if (this.shopOrderId !== null && this.shopOrderId !== undefined) { - output.writeFieldBegin("shopOrderId", Thrift.Type.STRING, 2); - output.writeString(this.shopOrderId); - output.writeFieldEnd(); - } - if (this.appStoreCode !== null && this.appStoreCode !== undefined) { - output.writeFieldBegin("appStoreCode", Thrift.Type.I32, 3); - output.writeI32(this.appStoreCode); - output.writeFieldEnd(); - } - if (this.items !== null && this.items !== undefined) { - output.writeFieldBegin("items", Thrift.Type.LIST, 4); - output.writeListBegin(Thrift.Type.STRUCT, this.items.length); - for (var iter144 in this.items) { - if (this.items.hasOwnProperty(iter144)) { - iter144 = this.items[iter144]; - iter144.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.country !== null && this.country !== undefined) { - output.writeFieldBegin("country", Thrift.Type.STRING, 5); - output.writeString(this.country); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.CompactContact = function (args) { - this.mid = null; - this.createdTime = null; - this.modifiedTime = null; - this.status = null; - this.settings = null; - this.displayNameOverridden = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.modifiedTime !== undefined && args.modifiedTime !== null) { - this.modifiedTime = args.modifiedTime; - } - if (args.status !== undefined && args.status !== null) { - this.status = args.status; - } - if (args.settings !== undefined && args.settings !== null) { - this.settings = args.settings; - } - if (args.displayNameOverridden !== undefined && args.displayNameOverridden !== null) { - this.displayNameOverridden = args.displayNameOverridden; - } - } -}; -ttypes.CompactContact.prototype = {}; -ttypes.CompactContact.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.mid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.createdTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I64) { - this.modifiedTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.status = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I64) { - this.settings = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRING) { - this.displayNameOverridden = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.CompactContact.prototype.write = function (output) { - output.writeStructBegin("CompactContact"); - if (this.mid !== null && this.mid !== undefined) { - output.writeFieldBegin("mid", Thrift.Type.STRING, 1); - output.writeString(this.mid); - output.writeFieldEnd(); - } - if (this.createdTime !== null && this.createdTime !== undefined) { - output.writeFieldBegin("createdTime", Thrift.Type.I64, 2); - output.writeI64(this.createdTime); - output.writeFieldEnd(); - } - if (this.modifiedTime !== null && this.modifiedTime !== undefined) { - output.writeFieldBegin("modifiedTime", Thrift.Type.I64, 3); - output.writeI64(this.modifiedTime); - output.writeFieldEnd(); - } - if (this.status !== null && this.status !== undefined) { - output.writeFieldBegin("status", Thrift.Type.I32, 4); - output.writeI32(this.status); - output.writeFieldEnd(); - } - if (this.settings !== null && this.settings !== undefined) { - output.writeFieldBegin("settings", Thrift.Type.I64, 5); - output.writeI64(this.settings); - output.writeFieldEnd(); - } - if (this.displayNameOverridden !== null && this.displayNameOverridden !== undefined) { - output.writeFieldBegin("displayNameOverridden", Thrift.Type.STRING, 6); - output.writeString(this.displayNameOverridden); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ContactModification = function (args) { - this.type = null; - this.luid = null; - this.phones = null; - this.emails = null; - this.userids = null; - if (args) { - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.luid !== undefined && args.luid !== null) { - this.luid = args.luid; - } - if (args.phones !== undefined && args.phones !== null) { - this.phones = Thrift.copyList(args.phones, [null]); - } - if (args.emails !== undefined && args.emails !== null) { - this.emails = Thrift.copyList(args.emails, [null]); - } - if (args.userids !== undefined && args.userids !== null) { - this.userids = Thrift.copyList(args.userids, [null]); - } - } -}; -ttypes.ContactModification.prototype = {}; -ttypes.ContactModification.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.type = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.luid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.LIST) { - this.phones = []; - var _rtmp3146 = input.readListBegin(); - var _size145 = _rtmp3146.size || 0; - for (var _i147 = 0; _i147 < _size145; ++_i147) { - var elem148 = null; - elem148 = input.readString(); - this.phones.push(elem148); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.LIST) { - this.emails = []; - var _rtmp3150 = input.readListBegin(); - var _size149 = _rtmp3150.size || 0; - for (var _i151 = 0; _i151 < _size149; ++_i151) { - var elem152 = null; - elem152 = input.readString(); - this.emails.push(elem152); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 13: - if (ftype == Thrift.Type.LIST) { - this.userids = []; - var _rtmp3154 = input.readListBegin(); - var _size153 = _rtmp3154.size || 0; - for (var _i155 = 0; _i155 < _size153; ++_i155) { - var elem156 = null; - elem156 = input.readString(); - this.userids.push(elem156); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ContactModification.prototype.write = function (output) { - output.writeStructBegin("ContactModification"); - if (this.type !== null && this.type !== undefined) { - output.writeFieldBegin("type", Thrift.Type.I32, 1); - output.writeI32(this.type); - output.writeFieldEnd(); - } - if (this.luid !== null && this.luid !== undefined) { - output.writeFieldBegin("luid", Thrift.Type.STRING, 2); - output.writeString(this.luid); - output.writeFieldEnd(); - } - if (this.phones !== null && this.phones !== undefined) { - output.writeFieldBegin("phones", Thrift.Type.LIST, 11); - output.writeListBegin(Thrift.Type.STRING, this.phones.length); - for (var iter157 in this.phones) { - if (this.phones.hasOwnProperty(iter157)) { - iter157 = this.phones[iter157]; - output.writeString(iter157); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.emails !== null && this.emails !== undefined) { - output.writeFieldBegin("emails", Thrift.Type.LIST, 12); - output.writeListBegin(Thrift.Type.STRING, this.emails.length); - for (var iter158 in this.emails) { - if (this.emails.hasOwnProperty(iter158)) { - iter158 = this.emails[iter158]; - output.writeString(iter158); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.userids !== null && this.userids !== undefined) { - output.writeFieldBegin("userids", Thrift.Type.LIST, 13); - output.writeListBegin(Thrift.Type.STRING, this.userids.length); - for (var iter159 in this.userids) { - if (this.userids.hasOwnProperty(iter159)) { - iter159 = this.userids[iter159]; - output.writeString(iter159); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ContactRegistration = function (args) { - this.contact = null; - this.luid = null; - this.contactType = null; - this.contactKey = null; - if (args) { - if (args.contact !== undefined && args.contact !== null) { - this.contact = new ttypes.Contact(args.contact); - } - if (args.luid !== undefined && args.luid !== null) { - this.luid = args.luid; - } - if (args.contactType !== undefined && args.contactType !== null) { - this.contactType = args.contactType; - } - if (args.contactKey !== undefined && args.contactKey !== null) { - this.contactKey = args.contactKey; - } - } -}; -ttypes.ContactRegistration.prototype = {}; -ttypes.ContactRegistration.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.contact = new ttypes.Contact(); - this.contact.read(input); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.STRING) { - this.luid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.I32) { - this.contactType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.STRING) { - this.contactKey = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ContactRegistration.prototype.write = function (output) { - output.writeStructBegin("ContactRegistration"); - if (this.contact !== null && this.contact !== undefined) { - output.writeFieldBegin("contact", Thrift.Type.STRUCT, 1); - this.contact.write(output); - output.writeFieldEnd(); - } - if (this.luid !== null && this.luid !== undefined) { - output.writeFieldBegin("luid", Thrift.Type.STRING, 10); - output.writeString(this.luid); - output.writeFieldEnd(); - } - if (this.contactType !== null && this.contactType !== undefined) { - output.writeFieldBegin("contactType", Thrift.Type.I32, 11); - output.writeI32(this.contactType); - output.writeFieldEnd(); - } - if (this.contactKey !== null && this.contactKey !== undefined) { - output.writeFieldBegin("contactKey", Thrift.Type.STRING, 12); - output.writeString(this.contactKey); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ContactReport = function (args) { - this.mid = null; - this.exists = null; - this.contact = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.exists !== undefined && args.exists !== null) { - this.exists = args.exists; - } - if (args.contact !== undefined && args.contact !== null) { - this.contact = new ttypes.Contact(args.contact); - } - } -}; -ttypes.ContactReport.prototype = {}; -ttypes.ContactReport.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.mid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.BOOL) { - this.exists = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.contact = new ttypes.Contact(); - this.contact.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ContactReport.prototype.write = function (output) { - output.writeStructBegin("ContactReport"); - if (this.mid !== null && this.mid !== undefined) { - output.writeFieldBegin("mid", Thrift.Type.STRING, 1); - output.writeString(this.mid); - output.writeFieldEnd(); - } - if (this.exists !== null && this.exists !== undefined) { - output.writeFieldBegin("exists", Thrift.Type.BOOL, 2); - output.writeBool(this.exists); - output.writeFieldEnd(); - } - if (this.contact !== null && this.contact !== undefined) { - output.writeFieldBegin("contact", Thrift.Type.STRUCT, 3); - this.contact.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ContactReportResult = function (args) { - this.mid = null; - this.exists = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.exists !== undefined && args.exists !== null) { - this.exists = args.exists; - } - } -}; -ttypes.ContactReportResult.prototype = {}; -ttypes.ContactReportResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.mid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.BOOL) { - this.exists = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ContactReportResult.prototype.write = function (output) { - output.writeStructBegin("ContactReportResult"); - if (this.mid !== null && this.mid !== undefined) { - output.writeFieldBegin("mid", Thrift.Type.STRING, 1); - output.writeString(this.mid); - output.writeFieldEnd(); - } - if (this.exists !== null && this.exists !== undefined) { - output.writeFieldBegin("exists", Thrift.Type.BOOL, 2); - output.writeBool(this.exists); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.DeviceInfo = function (args) { - this.deviceName = null; - this.systemName = null; - this.systemVersion = null; - this.model = null; - this.carrierCode = null; - this.carrierName = null; - this.applicationType = null; - if (args) { - if (args.deviceName !== undefined && args.deviceName !== null) { - this.deviceName = args.deviceName; - } - if (args.systemName !== undefined && args.systemName !== null) { - this.systemName = args.systemName; - } - if (args.systemVersion !== undefined && args.systemVersion !== null) { - this.systemVersion = args.systemVersion; - } - if (args.model !== undefined && args.model !== null) { - this.model = args.model; - } - if (args.carrierCode !== undefined && args.carrierCode !== null) { - this.carrierCode = args.carrierCode; - } - if (args.carrierName !== undefined && args.carrierName !== null) { - this.carrierName = args.carrierName; - } - if (args.applicationType !== undefined && args.applicationType !== null) { - this.applicationType = args.applicationType; - } - } -}; -ttypes.DeviceInfo.prototype = {}; -ttypes.DeviceInfo.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.deviceName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.systemName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.systemVersion = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.model = input.readString(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.I32) { - this.carrierCode = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.STRING) { - this.carrierName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 20: - if (ftype == Thrift.Type.I32) { - this.applicationType = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.DeviceInfo.prototype.write = function (output) { - output.writeStructBegin("DeviceInfo"); - if (this.deviceName !== null && this.deviceName !== undefined) { - output.writeFieldBegin("deviceName", Thrift.Type.STRING, 1); - output.writeString(this.deviceName); - output.writeFieldEnd(); - } - if (this.systemName !== null && this.systemName !== undefined) { - output.writeFieldBegin("systemName", Thrift.Type.STRING, 2); - output.writeString(this.systemName); - output.writeFieldEnd(); - } - if (this.systemVersion !== null && this.systemVersion !== undefined) { - output.writeFieldBegin("systemVersion", Thrift.Type.STRING, 3); - output.writeString(this.systemVersion); - output.writeFieldEnd(); - } - if (this.model !== null && this.model !== undefined) { - output.writeFieldBegin("model", Thrift.Type.STRING, 4); - output.writeString(this.model); - output.writeFieldEnd(); - } - if (this.carrierCode !== null && this.carrierCode !== undefined) { - output.writeFieldBegin("carrierCode", Thrift.Type.I32, 10); - output.writeI32(this.carrierCode); - output.writeFieldEnd(); - } - if (this.carrierName !== null && this.carrierName !== undefined) { - output.writeFieldBegin("carrierName", Thrift.Type.STRING, 11); - output.writeString(this.carrierName); - output.writeFieldEnd(); - } - if (this.applicationType !== null && this.applicationType !== undefined) { - output.writeFieldBegin("applicationType", Thrift.Type.I32, 20); - output.writeI32(this.applicationType); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.EmailConfirmation = function (args) { - this.usePasswordSet = null; - this.email = null; - this.password = null; - this.ignoreDuplication = null; - if (args) { - if (args.usePasswordSet !== undefined && args.usePasswordSet !== null) { - this.usePasswordSet = args.usePasswordSet; - } - if (args.email !== undefined && args.email !== null) { - this.email = args.email; - } - if (args.password !== undefined && args.password !== null) { - this.password = args.password; - } - if (args.ignoreDuplication !== undefined && args.ignoreDuplication !== null) { - this.ignoreDuplication = args.ignoreDuplication; - } - } -}; -ttypes.EmailConfirmation.prototype = {}; -ttypes.EmailConfirmation.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.BOOL) { - this.usePasswordSet = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.email = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.password = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.BOOL) { - this.ignoreDuplication = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.EmailConfirmation.prototype.write = function (output) { - output.writeStructBegin("EmailConfirmation"); - if (this.usePasswordSet !== null && this.usePasswordSet !== undefined) { - output.writeFieldBegin("usePasswordSet", Thrift.Type.BOOL, 1); - output.writeBool(this.usePasswordSet); - output.writeFieldEnd(); - } - if (this.email !== null && this.email !== undefined) { - output.writeFieldBegin("email", Thrift.Type.STRING, 2); - output.writeString(this.email); - output.writeFieldEnd(); - } - if (this.password !== null && this.password !== undefined) { - output.writeFieldBegin("password", Thrift.Type.STRING, 3); - output.writeString(this.password); - output.writeFieldEnd(); - } - if (this.ignoreDuplication !== null && this.ignoreDuplication !== undefined) { - output.writeFieldBegin("ignoreDuplication", Thrift.Type.BOOL, 4); - output.writeBool(this.ignoreDuplication); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.EmailConfirmationSession = function (args) { - this.emailConfirmationType = null; - this.verifier = null; - this.targetEmail = null; - if (args) { - if (args.emailConfirmationType !== undefined && args.emailConfirmationType !== null) { - this.emailConfirmationType = args.emailConfirmationType; - } - if (args.verifier !== undefined && args.verifier !== null) { - this.verifier = args.verifier; - } - if (args.targetEmail !== undefined && args.targetEmail !== null) { - this.targetEmail = args.targetEmail; - } - } -}; -ttypes.EmailConfirmationSession.prototype = {}; -ttypes.EmailConfirmationSession.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.emailConfirmationType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.verifier = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.targetEmail = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.EmailConfirmationSession.prototype.write = function (output) { - output.writeStructBegin("EmailConfirmationSession"); - if (this.emailConfirmationType !== null && this.emailConfirmationType !== undefined) { - output.writeFieldBegin("emailConfirmationType", Thrift.Type.I32, 1); - output.writeI32(this.emailConfirmationType); - output.writeFieldEnd(); - } - if (this.verifier !== null && this.verifier !== undefined) { - output.writeFieldBegin("verifier", Thrift.Type.STRING, 2); - output.writeString(this.verifier); - output.writeFieldEnd(); - } - if (this.targetEmail !== null && this.targetEmail !== undefined) { - output.writeFieldBegin("targetEmail", Thrift.Type.STRING, 3); - output.writeString(this.targetEmail); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.FriendChannelMatrix = function (args) { - this.channelId = null; - this.representMid = null; - this.count = null; - this.point = null; - if (args) { - if (args.channelId !== undefined && args.channelId !== null) { - this.channelId = args.channelId; - } - if (args.representMid !== undefined && args.representMid !== null) { - this.representMid = args.representMid; - } - if (args.count !== undefined && args.count !== null) { - this.count = args.count; - } - if (args.point !== undefined && args.point !== null) { - this.point = args.point; - } - } -}; -ttypes.FriendChannelMatrix.prototype = {}; -ttypes.FriendChannelMatrix.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.channelId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.representMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.count = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.point = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.FriendChannelMatrix.prototype.write = function (output) { - output.writeStructBegin("FriendChannelMatrix"); - if (this.channelId !== null && this.channelId !== undefined) { - output.writeFieldBegin("channelId", Thrift.Type.STRING, 1); - output.writeString(this.channelId); - output.writeFieldEnd(); - } - if (this.representMid !== null && this.representMid !== undefined) { - output.writeFieldBegin("representMid", Thrift.Type.STRING, 2); - output.writeString(this.representMid); - output.writeFieldEnd(); - } - if (this.count !== null && this.count !== undefined) { - output.writeFieldBegin("count", Thrift.Type.I32, 3); - output.writeI32(this.count); - output.writeFieldEnd(); - } - if (this.point !== null && this.point !== undefined) { - output.writeFieldBegin("point", Thrift.Type.I32, 4); - output.writeI32(this.point); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.FriendChannelMatricesResponse = function (args) { - this.expires = null; - this.matrices = null; - if (args) { - if (args.expires !== undefined && args.expires !== null) { - this.expires = args.expires; - } - if (args.matrices !== undefined && args.matrices !== null) { - this.matrices = Thrift.copyList(args.matrices, [ttypes.FriendChannelMatrix]); - } - } -}; -ttypes.FriendChannelMatricesResponse.prototype = {}; -ttypes.FriendChannelMatricesResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.expires = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.LIST) { - this.matrices = []; - var _rtmp3161 = input.readListBegin(); - var _size160 = _rtmp3161.size || 0; - for (var _i162 = 0; _i162 < _size160; ++_i162) { - var elem163 = null; - elem163 = new ttypes.FriendChannelMatrix(); - elem163.read(input); - this.matrices.push(elem163); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.FriendChannelMatricesResponse.prototype.write = function (output) { - output.writeStructBegin("FriendChannelMatricesResponse"); - if (this.expires !== null && this.expires !== undefined) { - output.writeFieldBegin("expires", Thrift.Type.I64, 1); - output.writeI64(this.expires); - output.writeFieldEnd(); - } - if (this.matrices !== null && this.matrices !== undefined) { - output.writeFieldBegin("matrices", Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.STRUCT, this.matrices.length); - for (var iter164 in this.matrices) { - if (this.matrices.hasOwnProperty(iter164)) { - iter164 = this.matrices[iter164]; - iter164.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.FriendRequest = function (args) { - this.eMid = null; - this.mid = null; - this.direction = null; - this.method = null; - this.param = null; - this.timestamp = null; - this.seqId = null; - this.displayName = null; - this.picturePath = null; - this.pictureStatus = null; - if (args) { - if (args.eMid !== undefined && args.eMid !== null) { - this.eMid = args.eMid; - } - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.direction !== undefined && args.direction !== null) { - this.direction = args.direction; - } - if (args.method !== undefined && args.method !== null) { - this.method = args.method; - } - if (args.param !== undefined && args.param !== null) { - this.param = args.param; - } - if (args.timestamp !== undefined && args.timestamp !== null) { - this.timestamp = args.timestamp; - } - if (args.seqId !== undefined && args.seqId !== null) { - this.seqId = args.seqId; - } - if (args.displayName !== undefined && args.displayName !== null) { - this.displayName = args.displayName; - } - if (args.picturePath !== undefined && args.picturePath !== null) { - this.picturePath = args.picturePath; - } - if (args.pictureStatus !== undefined && args.pictureStatus !== null) { - this.pictureStatus = args.pictureStatus; - } - } -}; -ttypes.FriendRequest.prototype = {}; -ttypes.FriendRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.eMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.mid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.direction = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.method = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.param = input.readString(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.I64) { - this.timestamp = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.I64) { - this.seqId = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.STRING) { - this.displayName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.STRING) { - this.picturePath = input.readString(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.STRING) { - this.pictureStatus = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.FriendRequest.prototype.write = function (output) { - output.writeStructBegin("FriendRequest"); - if (this.eMid !== null && this.eMid !== undefined) { - output.writeFieldBegin("eMid", Thrift.Type.STRING, 1); - output.writeString(this.eMid); - output.writeFieldEnd(); - } - if (this.mid !== null && this.mid !== undefined) { - output.writeFieldBegin("mid", Thrift.Type.STRING, 2); - output.writeString(this.mid); - output.writeFieldEnd(); - } - if (this.direction !== null && this.direction !== undefined) { - output.writeFieldBegin("direction", Thrift.Type.I32, 3); - output.writeI32(this.direction); - output.writeFieldEnd(); - } - if (this.method !== null && this.method !== undefined) { - output.writeFieldBegin("method", Thrift.Type.I32, 4); - output.writeI32(this.method); - output.writeFieldEnd(); - } - if (this.param !== null && this.param !== undefined) { - output.writeFieldBegin("param", Thrift.Type.STRING, 5); - output.writeString(this.param); - output.writeFieldEnd(); - } - if (this.timestamp !== null && this.timestamp !== undefined) { - output.writeFieldBegin("timestamp", Thrift.Type.I64, 6); - output.writeI64(this.timestamp); - output.writeFieldEnd(); - } - if (this.seqId !== null && this.seqId !== undefined) { - output.writeFieldBegin("seqId", Thrift.Type.I64, 7); - output.writeI64(this.seqId); - output.writeFieldEnd(); - } - if (this.displayName !== null && this.displayName !== undefined) { - output.writeFieldBegin("displayName", Thrift.Type.STRING, 10); - output.writeString(this.displayName); - output.writeFieldEnd(); - } - if (this.picturePath !== null && this.picturePath !== undefined) { - output.writeFieldBegin("picturePath", Thrift.Type.STRING, 11); - output.writeString(this.picturePath); - output.writeFieldEnd(); - } - if (this.pictureStatus !== null && this.pictureStatus !== undefined) { - output.writeFieldBegin("pictureStatus", Thrift.Type.STRING, 12); - output.writeString(this.pictureStatus); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.FriendRequestsInfo = function (args) { - this.totalIncomingCount = null; - this.totalOutgoingCount = null; - this.recentIncomings = null; - this.recentOutgoings = null; - this.totalIncomingLimit = null; - this.totalOutgoingLimit = null; - if (args) { - if (args.totalIncomingCount !== undefined && args.totalIncomingCount !== null) { - this.totalIncomingCount = args.totalIncomingCount; - } - if (args.totalOutgoingCount !== undefined && args.totalOutgoingCount !== null) { - this.totalOutgoingCount = args.totalOutgoingCount; - } - if (args.recentIncomings !== undefined && args.recentIncomings !== null) { - this.recentIncomings = Thrift.copyList(args.recentIncomings, [ttypes.FriendRequest]); - } - if (args.recentOutgoings !== undefined && args.recentOutgoings !== null) { - this.recentOutgoings = Thrift.copyList(args.recentOutgoings, [ttypes.FriendRequest]); - } - if (args.totalIncomingLimit !== undefined && args.totalIncomingLimit !== null) { - this.totalIncomingLimit = args.totalIncomingLimit; - } - if (args.totalOutgoingLimit !== undefined && args.totalOutgoingLimit !== null) { - this.totalOutgoingLimit = args.totalOutgoingLimit; - } - } -}; -ttypes.FriendRequestsInfo.prototype = {}; -ttypes.FriendRequestsInfo.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.totalIncomingCount = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.totalOutgoingCount = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.LIST) { - this.recentIncomings = []; - var _rtmp3166 = input.readListBegin(); - var _size165 = _rtmp3166.size || 0; - for (var _i167 = 0; _i167 < _size165; ++_i167) { - var elem168 = null; - elem168 = new ttypes.FriendRequest(); - elem168.read(input); - this.recentIncomings.push(elem168); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.LIST) { - this.recentOutgoings = []; - var _rtmp3170 = input.readListBegin(); - var _size169 = _rtmp3170.size || 0; - for (var _i171 = 0; _i171 < _size169; ++_i171) { - var elem172 = null; - elem172 = new ttypes.FriendRequest(); - elem172.read(input); - this.recentOutgoings.push(elem172); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I32) { - this.totalIncomingLimit = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.I32) { - this.totalOutgoingLimit = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.FriendRequestsInfo.prototype.write = function (output) { - output.writeStructBegin("FriendRequestsInfo"); - if (this.totalIncomingCount !== null && this.totalIncomingCount !== undefined) { - output.writeFieldBegin("totalIncomingCount", Thrift.Type.I32, 1); - output.writeI32(this.totalIncomingCount); - output.writeFieldEnd(); - } - if (this.totalOutgoingCount !== null && this.totalOutgoingCount !== undefined) { - output.writeFieldBegin("totalOutgoingCount", Thrift.Type.I32, 2); - output.writeI32(this.totalOutgoingCount); - output.writeFieldEnd(); - } - if (this.recentIncomings !== null && this.recentIncomings !== undefined) { - output.writeFieldBegin("recentIncomings", Thrift.Type.LIST, 3); - output.writeListBegin(Thrift.Type.STRUCT, this.recentIncomings.length); - for (var iter173 in this.recentIncomings) { - if (this.recentIncomings.hasOwnProperty(iter173)) { - iter173 = this.recentIncomings[iter173]; - iter173.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.recentOutgoings !== null && this.recentOutgoings !== undefined) { - output.writeFieldBegin("recentOutgoings", Thrift.Type.LIST, 4); - output.writeListBegin(Thrift.Type.STRUCT, this.recentOutgoings.length); - for (var iter174 in this.recentOutgoings) { - if (this.recentOutgoings.hasOwnProperty(iter174)) { - iter174 = this.recentOutgoings[iter174]; - iter174.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.totalIncomingLimit !== null && this.totalIncomingLimit !== undefined) { - output.writeFieldBegin("totalIncomingLimit", Thrift.Type.I32, 5); - output.writeI32(this.totalIncomingLimit); - output.writeFieldEnd(); - } - if (this.totalOutgoingLimit !== null && this.totalOutgoingLimit !== undefined) { - output.writeFieldBegin("totalOutgoingLimit", Thrift.Type.I32, 6); - output.writeI32(this.totalOutgoingLimit); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.Geolocation = function (args) { - this.longitude = null; - this.latitude = null; - if (args) { - if (args.longitude !== undefined && args.longitude !== null) { - this.longitude = args.longitude; - } - if (args.latitude !== undefined && args.latitude !== null) { - this.latitude = args.latitude; - } - } -}; -ttypes.Geolocation.prototype = {}; -ttypes.Geolocation.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.DOUBLE) { - this.longitude = input.readDouble(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.DOUBLE) { - this.latitude = input.readDouble(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.Geolocation.prototype.write = function (output) { - output.writeStructBegin("Geolocation"); - if (this.longitude !== null && this.longitude !== undefined) { - output.writeFieldBegin("longitude", Thrift.Type.DOUBLE, 1); - output.writeDouble(this.longitude); - output.writeFieldEnd(); - } - if (this.latitude !== null && this.latitude !== undefined) { - output.writeFieldBegin("latitude", Thrift.Type.DOUBLE, 2); - output.writeDouble(this.latitude); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.NotificationTarget = function (args) { - this.applicationType = null; - this.applicationVersion = null; - this.region = null; - if (args) { - if (args.applicationType !== undefined && args.applicationType !== null) { - this.applicationType = args.applicationType; - } - if (args.applicationVersion !== undefined && args.applicationVersion !== null) { - this.applicationVersion = args.applicationVersion; - } - if (args.region !== undefined && args.region !== null) { - this.region = args.region; - } - } -}; -ttypes.NotificationTarget.prototype = {}; -ttypes.NotificationTarget.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.applicationType = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.applicationVersion = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.region = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.NotificationTarget.prototype.write = function (output) { - output.writeStructBegin("NotificationTarget"); - if (this.applicationType !== null && this.applicationType !== undefined) { - output.writeFieldBegin("applicationType", Thrift.Type.STRING, 1); - output.writeString(this.applicationType); - output.writeFieldEnd(); - } - if (this.applicationVersion !== null && this.applicationVersion !== undefined) { - output.writeFieldBegin("applicationVersion", Thrift.Type.STRING, 2); - output.writeString(this.applicationVersion); - output.writeFieldEnd(); - } - if (this.region !== null && this.region !== undefined) { - output.writeFieldBegin("region", Thrift.Type.STRING, 3); - output.writeString(this.region); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GlobalEvent = function (args) { - this.key = null; - this.targets = null; - this.createdTime = null; - this.data = null; - this.maxDelay = null; - if (args) { - if (args.key !== undefined && args.key !== null) { - this.key = args.key; - } - if (args.targets !== undefined && args.targets !== null) { - this.targets = Thrift.copyList(args.targets, [ttypes.NotificationTarget]); - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.data !== undefined && args.data !== null) { - this.data = args.data; - } - if (args.maxDelay !== undefined && args.maxDelay !== null) { - this.maxDelay = args.maxDelay; - } - } -}; -ttypes.GlobalEvent.prototype = {}; -ttypes.GlobalEvent.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.key = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.LIST) { - this.targets = []; - var _rtmp3176 = input.readListBegin(); - var _size175 = _rtmp3176.size || 0; - for (var _i177 = 0; _i177 < _size175; ++_i177) { - var elem178 = null; - elem178 = new ttypes.NotificationTarget(); - elem178.read(input); - this.targets.push(elem178); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I64) { - this.createdTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I64) { - this.data = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I32) { - this.maxDelay = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GlobalEvent.prototype.write = function (output) { - output.writeStructBegin("GlobalEvent"); - if (this.key !== null && this.key !== undefined) { - output.writeFieldBegin("key", Thrift.Type.STRING, 1); - output.writeString(this.key); - output.writeFieldEnd(); - } - if (this.targets !== null && this.targets !== undefined) { - output.writeFieldBegin("targets", Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.STRUCT, this.targets.length); - for (var iter179 in this.targets) { - if (this.targets.hasOwnProperty(iter179)) { - iter179 = this.targets[iter179]; - iter179.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.createdTime !== null && this.createdTime !== undefined) { - output.writeFieldBegin("createdTime", Thrift.Type.I64, 3); - output.writeI64(this.createdTime); - output.writeFieldEnd(); - } - if (this.data !== null && this.data !== undefined) { - output.writeFieldBegin("data", Thrift.Type.I64, 4); - output.writeI64(this.data); - output.writeFieldEnd(); - } - if (this.maxDelay !== null && this.maxDelay !== undefined) { - output.writeFieldBegin("maxDelay", Thrift.Type.I32, 5); - output.writeI32(this.maxDelay); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GroupPreference = function (args) { - this.invitationTicket = null; - this.favoriteTimestamp = null; - if (args) { - if (args.invitationTicket !== undefined && args.invitationTicket !== null) { - this.invitationTicket = args.invitationTicket; - } - if (args.favoriteTimestamp !== undefined && args.favoriteTimestamp !== null) { - this.favoriteTimestamp = args.favoriteTimestamp; - } - } -}; -ttypes.GroupPreference.prototype = {}; -ttypes.GroupPreference.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.invitationTicket = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.favoriteTimestamp = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GroupPreference.prototype.write = function (output) { - output.writeStructBegin("GroupPreference"); - if (this.invitationTicket !== null && this.invitationTicket !== undefined) { - output.writeFieldBegin("invitationTicket", Thrift.Type.STRING, 1); - output.writeString(this.invitationTicket); - output.writeFieldEnd(); - } - if (this.favoriteTimestamp !== null && this.favoriteTimestamp !== undefined) { - output.writeFieldBegin("favoriteTimestamp", Thrift.Type.I64, 2); - output.writeI64(this.favoriteTimestamp); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.Group = function (args) { - this.id = null; - this.createdTime = null; - this.name = null; - this.pictureStatus = null; - this.preventedJoinByTicket = null; - this.groupPreference = null; - this.members = null; - this.creator = null; - this.invitee = null; - this.notificationDisabled = null; - if (args) { - if (args.id !== undefined && args.id !== null) { - this.id = args.id; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - if (args.pictureStatus !== undefined && args.pictureStatus !== null) { - this.pictureStatus = args.pictureStatus; - } - if (args.preventedJoinByTicket !== undefined && args.preventedJoinByTicket !== null) { - this.preventedJoinByTicket = args.preventedJoinByTicket; - } - if (args.groupPreference !== undefined && args.groupPreference !== null) { - this.groupPreference = new ttypes.GroupPreference(args.groupPreference); - } - if (args.members !== undefined && args.members !== null) { - this.members = Thrift.copyList(args.members, [ttypes.Contact]); - } - if (args.creator !== undefined && args.creator !== null) { - this.creator = new ttypes.Contact(args.creator); - } - if (args.invitee !== undefined && args.invitee !== null) { - this.invitee = Thrift.copyList(args.invitee, [ttypes.Contact]); - } - if (args.notificationDisabled !== undefined && args.notificationDisabled !== null) { - this.notificationDisabled = args.notificationDisabled; - } - } -}; -ttypes.Group.prototype = {}; -ttypes.Group.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.id = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.createdTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.STRING) { - this.name = input.readString(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.STRING) { - this.pictureStatus = input.readString(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.BOOL) { - this.preventedJoinByTicket = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 13: - if (ftype == Thrift.Type.STRUCT) { - this.groupPreference = new ttypes.GroupPreference(); - this.groupPreference.read(input); - } else { - input.skip(ftype); - } - break; - case 20: - if (ftype == Thrift.Type.LIST) { - this.members = []; - var _rtmp3181 = input.readListBegin(); - var _size180 = _rtmp3181.size || 0; - for (var _i182 = 0; _i182 < _size180; ++_i182) { - var elem183 = null; - elem183 = new ttypes.Contact(); - elem183.read(input); - this.members.push(elem183); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 21: - if (ftype == Thrift.Type.STRUCT) { - this.creator = new ttypes.Contact(); - this.creator.read(input); - } else { - input.skip(ftype); - } - break; - case 22: - if (ftype == Thrift.Type.LIST) { - this.invitee = []; - var _rtmp3185 = input.readListBegin(); - var _size184 = _rtmp3185.size || 0; - for (var _i186 = 0; _i186 < _size184; ++_i186) { - var elem187 = null; - elem187 = new ttypes.Contact(); - elem187.read(input); - this.invitee.push(elem187); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 31: - if (ftype == Thrift.Type.BOOL) { - this.notificationDisabled = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.Group.prototype.write = function (output) { - output.writeStructBegin("Group"); - if (this.id !== null && this.id !== undefined) { - output.writeFieldBegin("id", Thrift.Type.STRING, 1); - output.writeString(this.id); - output.writeFieldEnd(); - } - if (this.createdTime !== null && this.createdTime !== undefined) { - output.writeFieldBegin("createdTime", Thrift.Type.I64, 2); - output.writeI64(this.createdTime); - output.writeFieldEnd(); - } - if (this.name !== null && this.name !== undefined) { - output.writeFieldBegin("name", Thrift.Type.STRING, 10); - output.writeString(this.name); - output.writeFieldEnd(); - } - if (this.pictureStatus !== null && this.pictureStatus !== undefined) { - output.writeFieldBegin("pictureStatus", Thrift.Type.STRING, 11); - output.writeString(this.pictureStatus); - output.writeFieldEnd(); - } - if (this.preventedJoinByTicket !== null && this.preventedJoinByTicket !== undefined) { - output.writeFieldBegin("preventedJoinByTicket", Thrift.Type.BOOL, 12); - output.writeBool(this.preventedJoinByTicket); - output.writeFieldEnd(); - } - if (this.groupPreference !== null && this.groupPreference !== undefined) { - output.writeFieldBegin("groupPreference", Thrift.Type.STRUCT, 13); - this.groupPreference.write(output); - output.writeFieldEnd(); - } - if (this.members !== null && this.members !== undefined) { - output.writeFieldBegin("members", Thrift.Type.LIST, 20); - output.writeListBegin(Thrift.Type.STRUCT, this.members.length); - for (var iter188 in this.members) { - if (this.members.hasOwnProperty(iter188)) { - iter188 = this.members[iter188]; - iter188.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.creator !== null && this.creator !== undefined) { - output.writeFieldBegin("creator", Thrift.Type.STRUCT, 21); - this.creator.write(output); - output.writeFieldEnd(); - } - if (this.invitee !== null && this.invitee !== undefined) { - output.writeFieldBegin("invitee", Thrift.Type.LIST, 22); - output.writeListBegin(Thrift.Type.STRUCT, this.invitee.length); - for (var iter189 in this.invitee) { - if (this.invitee.hasOwnProperty(iter189)) { - iter189 = this.invitee[iter189]; - iter189.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.notificationDisabled !== null && this.notificationDisabled !== undefined) { - output.writeFieldBegin("notificationDisabled", Thrift.Type.BOOL, 31); - output.writeBool(this.notificationDisabled); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.IdentityCredential = function (args) { - this.provider = null; - this.identifier = null; - this.password = null; - if (args) { - if (args.provider !== undefined && args.provider !== null) { - this.provider = args.provider; - } - if (args.identifier !== undefined && args.identifier !== null) { - this.identifier = args.identifier; - } - if (args.password !== undefined && args.password !== null) { - this.password = args.password; - } - } -}; -ttypes.IdentityCredential.prototype = {}; -ttypes.IdentityCredential.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.provider = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.identifier = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.password = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.IdentityCredential.prototype.write = function (output) { - output.writeStructBegin("IdentityCredential"); - if (this.provider !== null && this.provider !== undefined) { - output.writeFieldBegin("provider", Thrift.Type.I32, 1); - output.writeI32(this.provider); - output.writeFieldEnd(); - } - if (this.identifier !== null && this.identifier !== undefined) { - output.writeFieldBegin("identifier", Thrift.Type.STRING, 2); - output.writeString(this.identifier); - output.writeFieldEnd(); - } - if (this.password !== null && this.password !== undefined) { - output.writeFieldBegin("password", Thrift.Type.STRING, 3); - output.writeString(this.password); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.LastReadMessageId = function (args) { - this.mid = null; - this.lastReadMessageId = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.lastReadMessageId !== undefined && args.lastReadMessageId !== null) { - this.lastReadMessageId = args.lastReadMessageId; - } - } -}; -ttypes.LastReadMessageId.prototype = {}; -ttypes.LastReadMessageId.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.mid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.lastReadMessageId = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.LastReadMessageId.prototype.write = function (output) { - output.writeStructBegin("LastReadMessageId"); - if (this.mid !== null && this.mid !== undefined) { - output.writeFieldBegin("mid", Thrift.Type.STRING, 1); - output.writeString(this.mid); - output.writeFieldEnd(); - } - if (this.lastReadMessageId !== null && this.lastReadMessageId !== undefined) { - output.writeFieldBegin("lastReadMessageId", Thrift.Type.STRING, 2); - output.writeString(this.lastReadMessageId); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.LastReadMessageIds = function (args) { - this.chatId = null; - this.lastReadMessageIds = null; - if (args) { - if (args.chatId !== undefined && args.chatId !== null) { - this.chatId = args.chatId; - } - if (args.lastReadMessageIds !== undefined && args.lastReadMessageIds !== null) { - this.lastReadMessageIds = Thrift.copyList(args.lastReadMessageIds, [ttypes.LastReadMessageId]); - } - } -}; -ttypes.LastReadMessageIds.prototype = {}; -ttypes.LastReadMessageIds.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.chatId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.LIST) { - this.lastReadMessageIds = []; - var _rtmp3191 = input.readListBegin(); - var _size190 = _rtmp3191.size || 0; - for (var _i192 = 0; _i192 < _size190; ++_i192) { - var elem193 = null; - elem193 = new ttypes.LastReadMessageId(); - elem193.read(input); - this.lastReadMessageIds.push(elem193); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.LastReadMessageIds.prototype.write = function (output) { - output.writeStructBegin("LastReadMessageIds"); - if (this.chatId !== null && this.chatId !== undefined) { - output.writeFieldBegin("chatId", Thrift.Type.STRING, 1); - output.writeString(this.chatId); - output.writeFieldEnd(); - } - if (this.lastReadMessageIds !== null && this.lastReadMessageIds !== undefined) { - output.writeFieldBegin("lastReadMessageIds", Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.STRUCT, this.lastReadMessageIds.length); - for (var iter194 in this.lastReadMessageIds) { - if (this.lastReadMessageIds.hasOwnProperty(iter194)) { - iter194 = this.lastReadMessageIds[iter194]; - iter194.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.VerificationSessionData = function (args) { - this.sessionId = null; - this.method = null; - this.callback = null; - this.normalizedPhone = null; - this.countryCode = null; - this.nationalSignificantNumber = null; - this.availableVerificationMethods = null; - if (args) { - if (args.sessionId !== undefined && args.sessionId !== null) { - this.sessionId = args.sessionId; - } - if (args.method !== undefined && args.method !== null) { - this.method = args.method; - } - if (args.callback !== undefined && args.callback !== null) { - this.callback = args.callback; - } - if (args.normalizedPhone !== undefined && args.normalizedPhone !== null) { - this.normalizedPhone = args.normalizedPhone; - } - if (args.countryCode !== undefined && args.countryCode !== null) { - this.countryCode = args.countryCode; - } - if (args.nationalSignificantNumber !== undefined && args.nationalSignificantNumber !== null) { - this.nationalSignificantNumber = args.nationalSignificantNumber; - } - if (args.availableVerificationMethods !== undefined && args.availableVerificationMethods !== null) { - this.availableVerificationMethods = Thrift.copyList(args.availableVerificationMethods, [null]); - } - } -}; -ttypes.VerificationSessionData.prototype = {}; -ttypes.VerificationSessionData.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.sessionId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.method = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.callback = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.normalizedPhone = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.countryCode = input.readString(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRING) { - this.nationalSignificantNumber = input.readString(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.LIST) { - this.availableVerificationMethods = []; - var _rtmp3196 = input.readListBegin(); - var _size195 = _rtmp3196.size || 0; - for (var _i197 = 0; _i197 < _size195; ++_i197) { - var elem198 = null; - elem198 = input.readI32(); - this.availableVerificationMethods.push(elem198); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.VerificationSessionData.prototype.write = function (output) { - output.writeStructBegin("VerificationSessionData"); - if (this.sessionId !== null && this.sessionId !== undefined) { - output.writeFieldBegin("sessionId", Thrift.Type.STRING, 1); - output.writeString(this.sessionId); - output.writeFieldEnd(); - } - if (this.method !== null && this.method !== undefined) { - output.writeFieldBegin("method", Thrift.Type.I32, 2); - output.writeI32(this.method); - output.writeFieldEnd(); - } - if (this.callback !== null && this.callback !== undefined) { - output.writeFieldBegin("callback", Thrift.Type.STRING, 3); - output.writeString(this.callback); - output.writeFieldEnd(); - } - if (this.normalizedPhone !== null && this.normalizedPhone !== undefined) { - output.writeFieldBegin("normalizedPhone", Thrift.Type.STRING, 4); - output.writeString(this.normalizedPhone); - output.writeFieldEnd(); - } - if (this.countryCode !== null && this.countryCode !== undefined) { - output.writeFieldBegin("countryCode", Thrift.Type.STRING, 5); - output.writeString(this.countryCode); - output.writeFieldEnd(); - } - if (this.nationalSignificantNumber !== null && this.nationalSignificantNumber !== undefined) { - output.writeFieldBegin("nationalSignificantNumber", Thrift.Type.STRING, 6); - output.writeString(this.nationalSignificantNumber); - output.writeFieldEnd(); - } - if (this.availableVerificationMethods !== null && this.availableVerificationMethods !== undefined) { - output.writeFieldBegin("availableVerificationMethods", Thrift.Type.LIST, 7); - output.writeListBegin(Thrift.Type.I32, this.availableVerificationMethods.length); - for (var iter199 in this.availableVerificationMethods) { - if (this.availableVerificationMethods.hasOwnProperty(iter199)) { - iter199 = this.availableVerificationMethods[iter199]; - output.writeI32(iter199); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.LoginResult = function (args) { - this.authToken = null; - this.certificate = null; - this.verifier = null; - this.pinCode = null; - this.type = null; - this.lastPrimaryBindTime = null; - this.displayMessage = null; - this.sessionForSMSConfirm = null; - if (args) { - if (args.authToken !== undefined && args.authToken !== null) { - this.authToken = args.authToken; - } - if (args.certificate !== undefined && args.certificate !== null) { - this.certificate = args.certificate; - } - if (args.verifier !== undefined && args.verifier !== null) { - this.verifier = args.verifier; - } - if (args.pinCode !== undefined && args.pinCode !== null) { - this.pinCode = args.pinCode; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.lastPrimaryBindTime !== undefined && args.lastPrimaryBindTime !== null) { - this.lastPrimaryBindTime = args.lastPrimaryBindTime; - } - if (args.displayMessage !== undefined && args.displayMessage !== null) { - this.displayMessage = args.displayMessage; - } - if (args.sessionForSMSConfirm !== undefined && args.sessionForSMSConfirm !== null) { - this.sessionForSMSConfirm = new ttypes.VerificationSessionData(args.sessionForSMSConfirm); - } - } -}; -ttypes.LoginResult.prototype = {}; -ttypes.LoginResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.authToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.certificate = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.verifier = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.pinCode = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I32) { - this.type = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.I64) { - this.lastPrimaryBindTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.STRING) { - this.displayMessage = input.readString(); - } else { - input.skip(ftype); - } - break; - case 8: - if (ftype == Thrift.Type.STRUCT) { - this.sessionForSMSConfirm = new ttypes.VerificationSessionData(); - this.sessionForSMSConfirm.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.LoginResult.prototype.write = function (output) { - output.writeStructBegin("LoginResult"); - if (this.authToken !== null && this.authToken !== undefined) { - output.writeFieldBegin("authToken", Thrift.Type.STRING, 1); - output.writeString(this.authToken); - output.writeFieldEnd(); - } - if (this.certificate !== null && this.certificate !== undefined) { - output.writeFieldBegin("certificate", Thrift.Type.STRING, 2); - output.writeString(this.certificate); - output.writeFieldEnd(); - } - if (this.verifier !== null && this.verifier !== undefined) { - output.writeFieldBegin("verifier", Thrift.Type.STRING, 3); - output.writeString(this.verifier); - output.writeFieldEnd(); - } - if (this.pinCode !== null && this.pinCode !== undefined) { - output.writeFieldBegin("pinCode", Thrift.Type.STRING, 4); - output.writeString(this.pinCode); - output.writeFieldEnd(); - } - if (this.type !== null && this.type !== undefined) { - output.writeFieldBegin("type", Thrift.Type.I32, 5); - output.writeI32(this.type); - output.writeFieldEnd(); - } - if (this.lastPrimaryBindTime !== null && this.lastPrimaryBindTime !== undefined) { - output.writeFieldBegin("lastPrimaryBindTime", Thrift.Type.I64, 6); - output.writeI64(this.lastPrimaryBindTime); - output.writeFieldEnd(); - } - if (this.displayMessage !== null && this.displayMessage !== undefined) { - output.writeFieldBegin("displayMessage", Thrift.Type.STRING, 7); - output.writeString(this.displayMessage); - output.writeFieldEnd(); - } - if (this.sessionForSMSConfirm !== null && this.sessionForSMSConfirm !== undefined) { - output.writeFieldBegin("sessionForSMSConfirm", Thrift.Type.STRUCT, 8); - this.sessionForSMSConfirm.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.LoginRequest = function (args) { - this.type = null; - this.identityProvider = null; - this.identifier = null; - this.password = null; - this.keepLoggedIn = null; - this.accessLocation = null; - this.systemName = null; - this.certificate = null; - this.verifier = null; - this.secret = null; - this.e2eeVersion = null; - if (args) { - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.identityProvider !== undefined && args.identityProvider !== null) { - this.identityProvider = args.identityProvider; - } - if (args.identifier !== undefined && args.identifier !== null) { - this.identifier = args.identifier; - } - if (args.password !== undefined && args.password !== null) { - this.password = args.password; - } - if (args.keepLoggedIn !== undefined && args.keepLoggedIn !== null) { - this.keepLoggedIn = args.keepLoggedIn; - } - if (args.accessLocation !== undefined && args.accessLocation !== null) { - this.accessLocation = args.accessLocation; - } - if (args.systemName !== undefined && args.systemName !== null) { - this.systemName = args.systemName; - } - if (args.certificate !== undefined && args.certificate !== null) { - this.certificate = args.certificate; - } - if (args.verifier !== undefined && args.verifier !== null) { - this.verifier = args.verifier; - } - if (args.secret !== undefined && args.secret !== null) { - this.secret = args.secret; - } - if (args.e2eeVersion !== undefined && args.e2eeVersion !== null) { - this.e2eeVersion = args.e2eeVersion; - } - } -}; -ttypes.LoginRequest.prototype = {}; -ttypes.LoginRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.type = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.identityProvider = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.identifier = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.password = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.BOOL) { - this.keepLoggedIn = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRING) { - this.accessLocation = input.readString(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.STRING) { - this.systemName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 8: - if (ftype == Thrift.Type.STRING) { - this.certificate = input.readString(); - } else { - input.skip(ftype); - } - break; - case 9: - if (ftype == Thrift.Type.STRING) { - this.verifier = input.readString(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.STRING) { - this.secret = input.readString(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.I32) { - this.e2eeVersion = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.LoginRequest.prototype.write = function (output) { - output.writeStructBegin("LoginRequest"); - if (this.type !== null && this.type !== undefined) { - output.writeFieldBegin("type", Thrift.Type.I32, 1); - output.writeI32(this.type); - output.writeFieldEnd(); - } - if (this.identityProvider !== null && this.identityProvider !== undefined) { - output.writeFieldBegin("identityProvider", Thrift.Type.I32, 2); - output.writeI32(this.identityProvider); - output.writeFieldEnd(); - } - if (this.identifier !== null && this.identifier !== undefined) { - output.writeFieldBegin("identifier", Thrift.Type.STRING, 3); - output.writeString(this.identifier); - output.writeFieldEnd(); - } - if (this.password !== null && this.password !== undefined) { - output.writeFieldBegin("password", Thrift.Type.STRING, 4); - output.writeString(this.password); - output.writeFieldEnd(); - } - if (this.keepLoggedIn !== null && this.keepLoggedIn !== undefined) { - output.writeFieldBegin("keepLoggedIn", Thrift.Type.BOOL, 5); - output.writeBool(this.keepLoggedIn); - output.writeFieldEnd(); - } - if (this.accessLocation !== null && this.accessLocation !== undefined) { - output.writeFieldBegin("accessLocation", Thrift.Type.STRING, 6); - output.writeString(this.accessLocation); - output.writeFieldEnd(); - } - if (this.systemName !== null && this.systemName !== undefined) { - output.writeFieldBegin("systemName", Thrift.Type.STRING, 7); - output.writeString(this.systemName); - output.writeFieldEnd(); - } - if (this.certificate !== null && this.certificate !== undefined) { - output.writeFieldBegin("certificate", Thrift.Type.STRING, 8); - output.writeString(this.certificate); - output.writeFieldEnd(); - } - if (this.verifier !== null && this.verifier !== undefined) { - output.writeFieldBegin("verifier", Thrift.Type.STRING, 9); - output.writeString(this.verifier); - output.writeFieldEnd(); - } - if (this.secret !== null && this.secret !== undefined) { - output.writeFieldBegin("secret", Thrift.Type.STRING, 10); - output.writeString(this.secret); - output.writeFieldEnd(); - } - if (this.e2eeVersion !== null && this.e2eeVersion !== undefined) { - output.writeFieldBegin("e2eeVersion", Thrift.Type.I32, 11); - output.writeI32(this.e2eeVersion); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.LoginSession = function (args) { - this.tokenKey = null; - this.expirationTime = null; - this.applicationType = null; - this.systemName = null; - this.accessLocation = null; - if (args) { - if (args.tokenKey !== undefined && args.tokenKey !== null) { - this.tokenKey = args.tokenKey; - } - if (args.expirationTime !== undefined && args.expirationTime !== null) { - this.expirationTime = args.expirationTime; - } - if (args.applicationType !== undefined && args.applicationType !== null) { - this.applicationType = args.applicationType; - } - if (args.systemName !== undefined && args.systemName !== null) { - this.systemName = args.systemName; - } - if (args.accessLocation !== undefined && args.accessLocation !== null) { - this.accessLocation = args.accessLocation; - } - } -}; -ttypes.LoginSession.prototype = {}; -ttypes.LoginSession.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.tokenKey = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I64) { - this.expirationTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.I32) { - this.applicationType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.STRING) { - this.systemName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 22: - if (ftype == Thrift.Type.STRING) { - this.accessLocation = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.LoginSession.prototype.write = function (output) { - output.writeStructBegin("LoginSession"); - if (this.tokenKey !== null && this.tokenKey !== undefined) { - output.writeFieldBegin("tokenKey", Thrift.Type.STRING, 1); - output.writeString(this.tokenKey); - output.writeFieldEnd(); - } - if (this.expirationTime !== null && this.expirationTime !== undefined) { - output.writeFieldBegin("expirationTime", Thrift.Type.I64, 3); - output.writeI64(this.expirationTime); - output.writeFieldEnd(); - } - if (this.applicationType !== null && this.applicationType !== undefined) { - output.writeFieldBegin("applicationType", Thrift.Type.I32, 11); - output.writeI32(this.applicationType); - output.writeFieldEnd(); - } - if (this.systemName !== null && this.systemName !== undefined) { - output.writeFieldBegin("systemName", Thrift.Type.STRING, 12); - output.writeString(this.systemName); - output.writeFieldEnd(); - } - if (this.accessLocation !== null && this.accessLocation !== undefined) { - output.writeFieldBegin("accessLocation", Thrift.Type.STRING, 22); - output.writeString(this.accessLocation); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.Message = function (args) { - this._from = null; - this.to = null; - this.toType = null; - this.id = null; - this.createdTime = null; - this.deliveredTime = null; - this.text = null; - this.location = null; - this.hasContent = null; - this.contentType = null; - this.contentPreview = null; - this.contentMetadata = null; - this.sessionId = null; - this.chunks = null; - this.relatedMessageId = null; - this.messageRelationType = null; - this.readCount = null; - this.relatedMessageServiceCode = null; - if (args) { - if (args._from !== undefined && args._from !== null) { - this._from = args._from; - } - if (args.to !== undefined && args.to !== null) { - this.to = args.to; - } - if (args.toType !== undefined && args.toType !== null) { - this.toType = args.toType; - } - if (args.id !== undefined && args.id !== null) { - this.id = args.id; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.deliveredTime !== undefined && args.deliveredTime !== null) { - this.deliveredTime = args.deliveredTime; - } - if (args.text !== undefined && args.text !== null) { - this.text = args.text; - } - if (args.location !== undefined && args.location !== null) { - this.location = new ttypes.Location(args.location); - } - if (args.hasContent !== undefined && args.hasContent !== null) { - this.hasContent = args.hasContent; - } - if (args.contentType !== undefined && args.contentType !== null) { - this.contentType = args.contentType; - } - if (args.contentPreview !== undefined && args.contentPreview !== null) { - this.contentPreview = args.contentPreview; - } - if (args.contentMetadata !== undefined && args.contentMetadata !== null) { - this.contentMetadata = Thrift.copyMap(args.contentMetadata, [null]); - } - if (args.sessionId !== undefined && args.sessionId !== null) { - this.sessionId = args.sessionId; - } - if (args.chunks !== undefined && args.chunks !== null) { - this.chunks = Thrift.copyList(args.chunks, [null]); - } - if (args.relatedMessageId !== undefined && args.relatedMessageId !== null) { - this.relatedMessageId = args.relatedMessageId; - } - if (args.messageRelationType !== undefined && args.messageRelationType !== null) { - this.messageRelationType = args.messageRelationType; - } - if (args.readCount !== undefined && args.readCount !== null) { - this.readCount = args.readCount; - } - if (args.relatedMessageServiceCode !== undefined && args.relatedMessageServiceCode !== null) { - this.relatedMessageServiceCode = args.relatedMessageServiceCode; - } - } -}; -ttypes.Message.prototype = {}; -ttypes.Message.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this._from = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.to = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.toType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.id = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I64) { - this.createdTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.I64) { - this.deliveredTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.STRING) { - this.text = input.readString(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.STRUCT) { - this.location = new ttypes.Location(); - this.location.read(input); - } else { - input.skip(ftype); - } - break; - case 14: - if (ftype == Thrift.Type.BOOL) { - this.hasContent = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 15: - if (ftype == Thrift.Type.I32) { - this.contentType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 17: - if (ftype == Thrift.Type.STRING) { - this.contentPreview = input.readBinary(); - } else { - input.skip(ftype); - } - break; - case 18: - if (ftype == Thrift.Type.MAP) { - this.contentMetadata = {}; - var _rtmp3201 = input.readMapBegin(); - var _size200 = _rtmp3201.size || 0; - for (var _i202 = 0; _i202 < _size200; ++_i202) { - var key203 = null; - var val204 = null; - key203 = input.readString(); - val204 = input.readString(); - this.contentMetadata[key203] = val204; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - case 19: - if (ftype == Thrift.Type.BYTE) { - this.sessionId = input.readByte(); - } else { - input.skip(ftype); - } - break; - case 20: - if (ftype == Thrift.Type.LIST) { - this.chunks = []; - var _rtmp3206 = input.readListBegin(); - var _size205 = _rtmp3206.size || 0; - for (var _i207 = 0; _i207 < _size205; ++_i207) { - var elem208 = null; - elem208 = input.readBinary(); - this.chunks.push(elem208); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 21: - if (ftype == Thrift.Type.STRING) { - this.relatedMessageId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 22: - if (ftype == Thrift.Type.I32) { - this.messageRelationType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 23: - if (ftype == Thrift.Type.I64) { - this.readCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 24: - if (ftype == Thrift.Type.I32) { - this.relatedMessageServiceCode = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.Message.prototype.write = function (output) { - output.writeStructBegin("Message"); - if (this._from !== null && this._from !== undefined) { - output.writeFieldBegin("_from", Thrift.Type.STRING, 1); - output.writeString(this._from); - output.writeFieldEnd(); - } - if (this.to !== null && this.to !== undefined) { - output.writeFieldBegin("to", Thrift.Type.STRING, 2); - output.writeString(this.to); - output.writeFieldEnd(); - } - if (this.toType !== null && this.toType !== undefined) { - output.writeFieldBegin("toType", Thrift.Type.I32, 3); - output.writeI32(this.toType); - output.writeFieldEnd(); - } - if (this.id !== null && this.id !== undefined) { - output.writeFieldBegin("id", Thrift.Type.STRING, 4); - output.writeString(this.id); - output.writeFieldEnd(); - } - if (this.createdTime !== null && this.createdTime !== undefined) { - output.writeFieldBegin("createdTime", Thrift.Type.I64, 5); - output.writeI64(this.createdTime); - output.writeFieldEnd(); - } - if (this.deliveredTime !== null && this.deliveredTime !== undefined) { - output.writeFieldBegin("deliveredTime", Thrift.Type.I64, 6); - output.writeI64(this.deliveredTime); - output.writeFieldEnd(); - } - if (this.text !== null && this.text !== undefined) { - output.writeFieldBegin("text", Thrift.Type.STRING, 10); - output.writeString(this.text); - output.writeFieldEnd(); - } - if (this.location !== null && this.location !== undefined) { - output.writeFieldBegin("location", Thrift.Type.STRUCT, 11); - this.location.write(output); - output.writeFieldEnd(); - } - if (this.hasContent !== null && this.hasContent !== undefined) { - output.writeFieldBegin("hasContent", Thrift.Type.BOOL, 14); - output.writeBool(this.hasContent); - output.writeFieldEnd(); - } - if (this.contentType !== null && this.contentType !== undefined) { - output.writeFieldBegin("contentType", Thrift.Type.I32, 15); - output.writeI32(this.contentType); - output.writeFieldEnd(); - } - if (this.contentPreview !== null && this.contentPreview !== undefined) { - output.writeFieldBegin("contentPreview", Thrift.Type.STRING, 17); - output.writeBinary(this.contentPreview); - output.writeFieldEnd(); - } - if (this.contentMetadata !== null && this.contentMetadata !== undefined) { - output.writeFieldBegin("contentMetadata", Thrift.Type.MAP, 18); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.contentMetadata)); - for (var kiter209 in this.contentMetadata) { - if (this.contentMetadata.hasOwnProperty(kiter209)) { - var viter210 = this.contentMetadata[kiter209]; - output.writeString(kiter209); - output.writeString(viter210); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - if (this.sessionId !== null && this.sessionId !== undefined) { - output.writeFieldBegin("sessionId", Thrift.Type.BYTE, 19); - output.writeByte(this.sessionId); - output.writeFieldEnd(); - } - if (this.chunks !== null && this.chunks !== undefined) { - output.writeFieldBegin("chunks", Thrift.Type.LIST, 20); - output.writeListBegin(Thrift.Type.STRING, this.chunks.length); - for (var iter211 in this.chunks) { - if (this.chunks.hasOwnProperty(iter211)) { - iter211 = this.chunks[iter211]; - output.writeBinary(iter211); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.relatedMessageId !== null && this.relatedMessageId !== undefined) { - output.writeFieldBegin("relatedMessageId", Thrift.Type.STRING, 21); - output.writeString(this.relatedMessageId); - output.writeFieldEnd(); - } - if (this.messageRelationType !== null && this.messageRelationType !== undefined) { - output.writeFieldBegin("messageRelationType", Thrift.Type.I32, 22); - output.writeI32(this.messageRelationType); - output.writeFieldEnd(); - } - if (this.readCount !== null && this.readCount !== undefined) { - output.writeFieldBegin("readCount", Thrift.Type.I64, 23); - output.writeI64(this.readCount); - output.writeFieldEnd(); - } - if (this.relatedMessageServiceCode !== null && this.relatedMessageServiceCode !== undefined) { - output.writeFieldBegin("relatedMessageServiceCode", Thrift.Type.I32, 24); - output.writeI32(this.relatedMessageServiceCode); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareMessage = function (args) { - this.message = null; - this.fromType = null; - this.squareMessageRevision = null; - if (args) { - if (args.message !== undefined && args.message !== null) { - this.message = new ttypes.Message(args.message); - } - if (args.fromType !== undefined && args.fromType !== null) { - this.fromType = args.fromType; - } - if (args.squareMessageRevision !== undefined && args.squareMessageRevision !== null) { - this.squareMessageRevision = args.squareMessageRevision; - } - } -}; -ttypes.SquareMessage.prototype = {}; -ttypes.SquareMessage.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.message = new ttypes.Message(); - this.message.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.fromType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I64) { - this.squareMessageRevision = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareMessage.prototype.write = function (output) { - output.writeStructBegin("SquareMessage"); - if (this.message !== null && this.message !== undefined) { - output.writeFieldBegin("message", Thrift.Type.STRUCT, 1); - this.message.write(output); - output.writeFieldEnd(); - } - if (this.fromType !== null && this.fromType !== undefined) { - output.writeFieldBegin("fromType", Thrift.Type.I32, 3); - output.writeI32(this.fromType); - output.writeFieldEnd(); - } - if (this.squareMessageRevision !== null && this.squareMessageRevision !== undefined) { - output.writeFieldBegin("squareMessageRevision", Thrift.Type.I64, 4); - output.writeI64(this.squareMessageRevision); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareChatStatusWithoutMessage = function (args) { - this.memberCount = null; - this.unreadMessageCount = null; - if (args) { - if (args.memberCount !== undefined && args.memberCount !== null) { - this.memberCount = args.memberCount; - } - if (args.unreadMessageCount !== undefined && args.unreadMessageCount !== null) { - this.unreadMessageCount = args.unreadMessageCount; - } - } -}; -ttypes.SquareChatStatusWithoutMessage.prototype = {}; -ttypes.SquareChatStatusWithoutMessage.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.memberCount = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.unreadMessageCount = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareChatStatusWithoutMessage.prototype.write = function (output) { - output.writeStructBegin("SquareChatStatusWithoutMessage"); - if (this.memberCount !== null && this.memberCount !== undefined) { - output.writeFieldBegin("memberCount", Thrift.Type.I32, 1); - output.writeI32(this.memberCount); - output.writeFieldEnd(); - } - if (this.unreadMessageCount !== null && this.unreadMessageCount !== undefined) { - output.writeFieldBegin("unreadMessageCount", Thrift.Type.I32, 2); - output.writeI32(this.unreadMessageCount); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareChatStatus = function (args) { - this.lastMessage = null; - this.senderDisplayName = null; - this.otherStatus = null; - if (args) { - if (args.lastMessage !== undefined && args.lastMessage !== null) { - this.lastMessage = new ttypes.SquareMessage(args.lastMessage); - } - if (args.senderDisplayName !== undefined && args.senderDisplayName !== null) { - this.senderDisplayName = args.senderDisplayName; - } - if (args.otherStatus !== undefined && args.otherStatus !== null) { - this.otherStatus = new ttypes.SquareChatStatusWithoutMessage(args.otherStatus); - } - } -}; -ttypes.SquareChatStatus.prototype = {}; -ttypes.SquareChatStatus.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.lastMessage = new ttypes.SquareMessage(); - this.lastMessage.read(input); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.senderDisplayName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRUCT) { - this.otherStatus = new ttypes.SquareChatStatusWithoutMessage(); - this.otherStatus.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareChatStatus.prototype.write = function (output) { - output.writeStructBegin("SquareChatStatus"); - if (this.lastMessage !== null && this.lastMessage !== undefined) { - output.writeFieldBegin("lastMessage", Thrift.Type.STRUCT, 3); - this.lastMessage.write(output); - output.writeFieldEnd(); - } - if (this.senderDisplayName !== null && this.senderDisplayName !== undefined) { - output.writeFieldBegin("senderDisplayName", Thrift.Type.STRING, 4); - output.writeString(this.senderDisplayName); - output.writeFieldEnd(); - } - if (this.otherStatus !== null && this.otherStatus !== undefined) { - output.writeFieldBegin("otherStatus", Thrift.Type.STRUCT, 5); - this.otherStatus.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareChatMember = function (args) { - this.squareMemberMid = null; - this.squareChatMid = null; - this.revision = null; - this.membershipState = null; - this.notificationForMessage = null; - if (args) { - if (args.squareMemberMid !== undefined && args.squareMemberMid !== null) { - this.squareMemberMid = args.squareMemberMid; - } - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.membershipState !== undefined && args.membershipState !== null) { - this.membershipState = args.membershipState; - } - if (args.notificationForMessage !== undefined && args.notificationForMessage !== null) { - this.notificationForMessage = args.notificationForMessage; - } - } -}; -ttypes.SquareChatMember.prototype = {}; -ttypes.SquareChatMember.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareMemberMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.membershipState = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.BOOL) { - this.notificationForMessage = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareChatMember.prototype.write = function (output) { - output.writeStructBegin("SquareChatMember"); - if (this.squareMemberMid !== null && this.squareMemberMid !== undefined) { - output.writeFieldBegin("squareMemberMid", Thrift.Type.STRING, 1); - output.writeString(this.squareMemberMid); - output.writeFieldEnd(); - } - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 2); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 3); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - if (this.membershipState !== null && this.membershipState !== undefined) { - output.writeFieldBegin("membershipState", Thrift.Type.I32, 4); - output.writeI32(this.membershipState); - output.writeFieldEnd(); - } - if (this.notificationForMessage !== null && this.notificationForMessage !== undefined) { - output.writeFieldBegin("notificationForMessage", Thrift.Type.BOOL, 5); - output.writeBool(this.notificationForMessage); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.MessageOperation = function (args) { - this.revision = null; - this.createdTime = null; - this.type = null; - this.reqSeq = null; - this.status = null; - this.param1 = null; - this.param2 = null; - this.param3 = null; - this.message = null; - if (args) { - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.reqSeq !== undefined && args.reqSeq !== null) { - this.reqSeq = args.reqSeq; - } - if (args.status !== undefined && args.status !== null) { - this.status = args.status; - } - if (args.param1 !== undefined && args.param1 !== null) { - this.param1 = args.param1; - } - if (args.param2 !== undefined && args.param2 !== null) { - this.param2 = args.param2; - } - if (args.param3 !== undefined && args.param3 !== null) { - this.param3 = args.param3; - } - if (args.message !== undefined && args.message !== null) { - this.message = new ttypes.Message(args.message); - } - } -}; -ttypes.MessageOperation.prototype = {}; -ttypes.MessageOperation.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.createdTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.type = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.reqSeq = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I32) { - this.status = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.STRING) { - this.param1 = input.readString(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.STRING) { - this.param2 = input.readString(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.STRING) { - this.param3 = input.readString(); - } else { - input.skip(ftype); - } - break; - case 20: - if (ftype == Thrift.Type.STRUCT) { - this.message = new ttypes.Message(); - this.message.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.MessageOperation.prototype.write = function (output) { - output.writeStructBegin("MessageOperation"); - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 1); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - if (this.createdTime !== null && this.createdTime !== undefined) { - output.writeFieldBegin("createdTime", Thrift.Type.I64, 2); - output.writeI64(this.createdTime); - output.writeFieldEnd(); - } - if (this.type !== null && this.type !== undefined) { - output.writeFieldBegin("type", Thrift.Type.I32, 3); - output.writeI32(this.type); - output.writeFieldEnd(); - } - if (this.reqSeq !== null && this.reqSeq !== undefined) { - output.writeFieldBegin("reqSeq", Thrift.Type.I32, 4); - output.writeI32(this.reqSeq); - output.writeFieldEnd(); - } - if (this.status !== null && this.status !== undefined) { - output.writeFieldBegin("status", Thrift.Type.I32, 5); - output.writeI32(this.status); - output.writeFieldEnd(); - } - if (this.param1 !== null && this.param1 !== undefined) { - output.writeFieldBegin("param1", Thrift.Type.STRING, 10); - output.writeString(this.param1); - output.writeFieldEnd(); - } - if (this.param2 !== null && this.param2 !== undefined) { - output.writeFieldBegin("param2", Thrift.Type.STRING, 11); - output.writeString(this.param2); - output.writeFieldEnd(); - } - if (this.param3 !== null && this.param3 !== undefined) { - output.writeFieldBegin("param3", Thrift.Type.STRING, 12); - output.writeString(this.param3); - output.writeFieldEnd(); - } - if (this.message !== null && this.message !== undefined) { - output.writeFieldBegin("message", Thrift.Type.STRUCT, 20); - this.message.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.MessageOperations = function (args) { - this.operations = null; - this.endFlag = null; - if (args) { - if (args.operations !== undefined && args.operations !== null) { - this.operations = Thrift.copyList(args.operations, [ttypes.MessageOperation]); - } - if (args.endFlag !== undefined && args.endFlag !== null) { - this.endFlag = args.endFlag; - } - } -}; -ttypes.MessageOperations.prototype = {}; -ttypes.MessageOperations.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.operations = []; - var _rtmp3213 = input.readListBegin(); - var _size212 = _rtmp3213.size || 0; - for (var _i214 = 0; _i214 < _size212; ++_i214) { - var elem215 = null; - elem215 = new ttypes.MessageOperation(); - elem215.read(input); - this.operations.push(elem215); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.BOOL) { - this.endFlag = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.MessageOperations.prototype.write = function (output) { - output.writeStructBegin("MessageOperations"); - if (this.operations !== null && this.operations !== undefined) { - output.writeFieldBegin("operations", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.operations.length); - for (var iter216 in this.operations) { - if (this.operations.hasOwnProperty(iter216)) { - iter216 = this.operations[iter216]; - iter216.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.endFlag !== null && this.endFlag !== undefined) { - output.writeFieldBegin("endFlag", Thrift.Type.BOOL, 2); - output.writeBool(this.endFlag); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.MessageStoreResult = function (args) { - this.requestId = null; - this.messageIds = null; - if (args) { - if (args.requestId !== undefined && args.requestId !== null) { - this.requestId = args.requestId; - } - if (args.messageIds !== undefined && args.messageIds !== null) { - this.messageIds = Thrift.copyList(args.messageIds, [null]); - } - } -}; -ttypes.MessageStoreResult.prototype = {}; -ttypes.MessageStoreResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.requestId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.LIST) { - this.messageIds = []; - var _rtmp3218 = input.readListBegin(); - var _size217 = _rtmp3218.size || 0; - for (var _i219 = 0; _i219 < _size217; ++_i219) { - var elem220 = null; - elem220 = input.readString(); - this.messageIds.push(elem220); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.MessageStoreResult.prototype.write = function (output) { - output.writeStructBegin("MessageStoreResult"); - if (this.requestId !== null && this.requestId !== undefined) { - output.writeFieldBegin("requestId", Thrift.Type.STRING, 1); - output.writeString(this.requestId); - output.writeFieldEnd(); - } - if (this.messageIds !== null && this.messageIds !== undefined) { - output.writeFieldBegin("messageIds", Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.STRING, this.messageIds.length); - for (var iter221 in this.messageIds) { - if (this.messageIds.hasOwnProperty(iter221)) { - iter221 = this.messageIds[iter221]; - output.writeString(iter221); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.MetaProfile = function (args) { - this.createTime = null; - this.regionCode = null; - this.identities = null; - if (args) { - if (args.createTime !== undefined && args.createTime !== null) { - this.createTime = args.createTime; - } - if (args.regionCode !== undefined && args.regionCode !== null) { - this.regionCode = args.regionCode; - } - if (args.identities !== undefined && args.identities !== null) { - this.identities = Thrift.copyMap(args.identities, [null]); - } - } -}; -ttypes.MetaProfile.prototype = {}; -ttypes.MetaProfile.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.createTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.regionCode = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.MAP) { - this.identities = {}; - var _rtmp3223 = input.readMapBegin(); - var _size222 = _rtmp3223.size || 0; - for (var _i224 = 0; _i224 < _size222; ++_i224) { - var key225 = null; - var val226 = null; - key225 = input.readI32(); - val226 = input.readString(); - this.identities[key225] = val226; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.MetaProfile.prototype.write = function (output) { - output.writeStructBegin("MetaProfile"); - if (this.createTime !== null && this.createTime !== undefined) { - output.writeFieldBegin("createTime", Thrift.Type.I64, 1); - output.writeI64(this.createTime); - output.writeFieldEnd(); - } - if (this.regionCode !== null && this.regionCode !== undefined) { - output.writeFieldBegin("regionCode", Thrift.Type.STRING, 2); - output.writeString(this.regionCode); - output.writeFieldEnd(); - } - if (this.identities !== null && this.identities !== undefined) { - output.writeFieldBegin("identities", Thrift.Type.MAP, 3); - output.writeMapBegin(Thrift.Type.I32, Thrift.Type.STRING, Thrift.objectLength(this.identities)); - for (var kiter227 in this.identities) { - if (this.identities.hasOwnProperty(kiter227)) { - var viter228 = this.identities[kiter227]; - output.writeI32(kiter227); - output.writeString(viter228); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.NotificationItem = function (args) { - this.id = null; - this._from = null; - this.to = null; - this.fromChannel = null; - this.toChannel = null; - this.revision = null; - this.createdTime = null; - this.content = null; - if (args) { - if (args.id !== undefined && args.id !== null) { - this.id = args.id; - } - if (args._from !== undefined && args._from !== null) { - this._from = args._from; - } - if (args.to !== undefined && args.to !== null) { - this.to = args.to; - } - if (args.fromChannel !== undefined && args.fromChannel !== null) { - this.fromChannel = args.fromChannel; - } - if (args.toChannel !== undefined && args.toChannel !== null) { - this.toChannel = args.toChannel; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.content !== undefined && args.content !== null) { - this.content = Thrift.copyMap(args.content, [null]); - } - } -}; -ttypes.NotificationItem.prototype = {}; -ttypes.NotificationItem.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.id = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this._from = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.to = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.fromChannel = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.toChannel = input.readString(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 8: - if (ftype == Thrift.Type.I64) { - this.createdTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 9: - if (ftype == Thrift.Type.MAP) { - this.content = {}; - var _rtmp3230 = input.readMapBegin(); - var _size229 = _rtmp3230.size || 0; - for (var _i231 = 0; _i231 < _size229; ++_i231) { - var key232 = null; - var val233 = null; - key232 = input.readString(); - val233 = input.readString(); - this.content[key232] = val233; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.NotificationItem.prototype.write = function (output) { - output.writeStructBegin("NotificationItem"); - if (this.id !== null && this.id !== undefined) { - output.writeFieldBegin("id", Thrift.Type.STRING, 1); - output.writeString(this.id); - output.writeFieldEnd(); - } - if (this._from !== null && this._from !== undefined) { - output.writeFieldBegin("_from", Thrift.Type.STRING, 2); - output.writeString(this._from); - output.writeFieldEnd(); - } - if (this.to !== null && this.to !== undefined) { - output.writeFieldBegin("to", Thrift.Type.STRING, 3); - output.writeString(this.to); - output.writeFieldEnd(); - } - if (this.fromChannel !== null && this.fromChannel !== undefined) { - output.writeFieldBegin("fromChannel", Thrift.Type.STRING, 4); - output.writeString(this.fromChannel); - output.writeFieldEnd(); - } - if (this.toChannel !== null && this.toChannel !== undefined) { - output.writeFieldBegin("toChannel", Thrift.Type.STRING, 5); - output.writeString(this.toChannel); - output.writeFieldEnd(); - } - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 7); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - if (this.createdTime !== null && this.createdTime !== undefined) { - output.writeFieldBegin("createdTime", Thrift.Type.I64, 8); - output.writeI64(this.createdTime); - output.writeFieldEnd(); - } - if (this.content !== null && this.content !== undefined) { - output.writeFieldBegin("content", Thrift.Type.MAP, 9); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.content)); - for (var kiter234 in this.content) { - if (this.content.hasOwnProperty(kiter234)) { - var viter235 = this.content[kiter234]; - output.writeString(kiter234); - output.writeString(viter235); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.NotificationFetchResult = function (args) { - this.fetchMode = null; - this.itemList = null; - if (args) { - if (args.fetchMode !== undefined && args.fetchMode !== null) { - this.fetchMode = args.fetchMode; - } - if (args.itemList !== undefined && args.itemList !== null) { - this.itemList = Thrift.copyList(args.itemList, [ttypes.NotificationItem]); - } - } -}; -ttypes.NotificationFetchResult.prototype = {}; -ttypes.NotificationFetchResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.fetchMode = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.LIST) { - this.itemList = []; - var _rtmp3237 = input.readListBegin(); - var _size236 = _rtmp3237.size || 0; - for (var _i238 = 0; _i238 < _size236; ++_i238) { - var elem239 = null; - elem239 = new ttypes.NotificationItem(); - elem239.read(input); - this.itemList.push(elem239); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.NotificationFetchResult.prototype.write = function (output) { - output.writeStructBegin("NotificationFetchResult"); - if (this.fetchMode !== null && this.fetchMode !== undefined) { - output.writeFieldBegin("fetchMode", Thrift.Type.I32, 1); - output.writeI32(this.fetchMode); - output.writeFieldEnd(); - } - if (this.itemList !== null && this.itemList !== undefined) { - output.writeFieldBegin("itemList", Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.STRUCT, this.itemList.length); - for (var iter240 in this.itemList) { - if (this.itemList.hasOwnProperty(iter240)) { - iter240 = this.itemList[iter240]; - iter240.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.Operation = function (args) { - this.revision = null; - this.createdTime = null; - this.type = null; - this.reqSeq = null; - this.checksum = null; - this.status = null; - this.param1 = null; - this.param2 = null; - this.param3 = null; - this.message = null; - if (args) { - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.reqSeq !== undefined && args.reqSeq !== null) { - this.reqSeq = args.reqSeq; - } - if (args.checksum !== undefined && args.checksum !== null) { - this.checksum = args.checksum; - } - if (args.status !== undefined && args.status !== null) { - this.status = args.status; - } - if (args.param1 !== undefined && args.param1 !== null) { - this.param1 = args.param1; - } - if (args.param2 !== undefined && args.param2 !== null) { - this.param2 = args.param2; - } - if (args.param3 !== undefined && args.param3 !== null) { - this.param3 = args.param3; - } - if (args.message !== undefined && args.message !== null) { - this.message = new ttypes.Message(args.message); - } - } -}; -ttypes.Operation.prototype = {}; -ttypes.Operation.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.createdTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.type = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.reqSeq = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.checksum = input.readString(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.I32) { - this.status = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.STRING) { - this.param1 = input.readString(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.STRING) { - this.param2 = input.readString(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.STRING) { - this.param3 = input.readString(); - } else { - input.skip(ftype); - } - break; - case 20: - if (ftype == Thrift.Type.STRUCT) { - this.message = new ttypes.Message(); - this.message.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.Operation.prototype.write = function (output) { - output.writeStructBegin("Operation"); - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 1); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - if (this.createdTime !== null && this.createdTime !== undefined) { - output.writeFieldBegin("createdTime", Thrift.Type.I64, 2); - output.writeI64(this.createdTime); - output.writeFieldEnd(); - } - if (this.type !== null && this.type !== undefined) { - output.writeFieldBegin("type", Thrift.Type.I32, 3); - output.writeI32(this.type); - output.writeFieldEnd(); - } - if (this.reqSeq !== null && this.reqSeq !== undefined) { - output.writeFieldBegin("reqSeq", Thrift.Type.I32, 4); - output.writeI32(this.reqSeq); - output.writeFieldEnd(); - } - if (this.checksum !== null && this.checksum !== undefined) { - output.writeFieldBegin("checksum", Thrift.Type.STRING, 5); - output.writeString(this.checksum); - output.writeFieldEnd(); - } - if (this.status !== null && this.status !== undefined) { - output.writeFieldBegin("status", Thrift.Type.I32, 7); - output.writeI32(this.status); - output.writeFieldEnd(); - } - if (this.param1 !== null && this.param1 !== undefined) { - output.writeFieldBegin("param1", Thrift.Type.STRING, 10); - output.writeString(this.param1); - output.writeFieldEnd(); - } - if (this.param2 !== null && this.param2 !== undefined) { - output.writeFieldBegin("param2", Thrift.Type.STRING, 11); - output.writeString(this.param2); - output.writeFieldEnd(); - } - if (this.param3 !== null && this.param3 !== undefined) { - output.writeFieldBegin("param3", Thrift.Type.STRING, 12); - output.writeString(this.param3); - output.writeFieldEnd(); - } - if (this.message !== null && this.message !== undefined) { - output.writeFieldBegin("message", Thrift.Type.STRUCT, 20); - this.message.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.PaymentReservation = function (args) { - this.receiverMid = null; - this.productId = null; - this.language = null; - this.location = null; - this.currency = null; - this.price = null; - this.appStoreCode = null; - this.messageText = null; - this.messageTemplate = null; - this.packageId = null; - if (args) { - if (args.receiverMid !== undefined && args.receiverMid !== null) { - this.receiverMid = args.receiverMid; - } - if (args.productId !== undefined && args.productId !== null) { - this.productId = args.productId; - } - if (args.language !== undefined && args.language !== null) { - this.language = args.language; - } - if (args.location !== undefined && args.location !== null) { - this.location = args.location; - } - if (args.currency !== undefined && args.currency !== null) { - this.currency = args.currency; - } - if (args.price !== undefined && args.price !== null) { - this.price = args.price; - } - if (args.appStoreCode !== undefined && args.appStoreCode !== null) { - this.appStoreCode = args.appStoreCode; - } - if (args.messageText !== undefined && args.messageText !== null) { - this.messageText = args.messageText; - } - if (args.messageTemplate !== undefined && args.messageTemplate !== null) { - this.messageTemplate = args.messageTemplate; - } - if (args.packageId !== undefined && args.packageId !== null) { - this.packageId = args.packageId; - } - } -}; -ttypes.PaymentReservation.prototype = {}; -ttypes.PaymentReservation.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.receiverMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.productId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.language = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.location = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.currency = input.readString(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRING) { - this.price = input.readString(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.I32) { - this.appStoreCode = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 8: - if (ftype == Thrift.Type.STRING) { - this.messageText = input.readString(); - } else { - input.skip(ftype); - } - break; - case 9: - if (ftype == Thrift.Type.I32) { - this.messageTemplate = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.I64) { - this.packageId = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.PaymentReservation.prototype.write = function (output) { - output.writeStructBegin("PaymentReservation"); - if (this.receiverMid !== null && this.receiverMid !== undefined) { - output.writeFieldBegin("receiverMid", Thrift.Type.STRING, 1); - output.writeString(this.receiverMid); - output.writeFieldEnd(); - } - if (this.productId !== null && this.productId !== undefined) { - output.writeFieldBegin("productId", Thrift.Type.STRING, 2); - output.writeString(this.productId); - output.writeFieldEnd(); - } - if (this.language !== null && this.language !== undefined) { - output.writeFieldBegin("language", Thrift.Type.STRING, 3); - output.writeString(this.language); - output.writeFieldEnd(); - } - if (this.location !== null && this.location !== undefined) { - output.writeFieldBegin("location", Thrift.Type.STRING, 4); - output.writeString(this.location); - output.writeFieldEnd(); - } - if (this.currency !== null && this.currency !== undefined) { - output.writeFieldBegin("currency", Thrift.Type.STRING, 5); - output.writeString(this.currency); - output.writeFieldEnd(); - } - if (this.price !== null && this.price !== undefined) { - output.writeFieldBegin("price", Thrift.Type.STRING, 6); - output.writeString(this.price); - output.writeFieldEnd(); - } - if (this.appStoreCode !== null && this.appStoreCode !== undefined) { - output.writeFieldBegin("appStoreCode", Thrift.Type.I32, 7); - output.writeI32(this.appStoreCode); - output.writeFieldEnd(); - } - if (this.messageText !== null && this.messageText !== undefined) { - output.writeFieldBegin("messageText", Thrift.Type.STRING, 8); - output.writeString(this.messageText); - output.writeFieldEnd(); - } - if (this.messageTemplate !== null && this.messageTemplate !== undefined) { - output.writeFieldBegin("messageTemplate", Thrift.Type.I32, 9); - output.writeI32(this.messageTemplate); - output.writeFieldEnd(); - } - if (this.packageId !== null && this.packageId !== undefined) { - output.writeFieldBegin("packageId", Thrift.Type.I64, 10); - output.writeI64(this.packageId); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.PaymentReservationResult = function (args) { - this.orderId = null; - this.confirmUrl = null; - this.extras = null; - if (args) { - if (args.orderId !== undefined && args.orderId !== null) { - this.orderId = args.orderId; - } - if (args.confirmUrl !== undefined && args.confirmUrl !== null) { - this.confirmUrl = args.confirmUrl; - } - if (args.extras !== undefined && args.extras !== null) { - this.extras = Thrift.copyMap(args.extras, [null]); - } - } -}; -ttypes.PaymentReservationResult.prototype = {}; -ttypes.PaymentReservationResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.orderId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.confirmUrl = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.MAP) { - this.extras = {}; - var _rtmp3242 = input.readMapBegin(); - var _size241 = _rtmp3242.size || 0; - for (var _i243 = 0; _i243 < _size241; ++_i243) { - var key244 = null; - var val245 = null; - key244 = input.readString(); - val245 = input.readString(); - this.extras[key244] = val245; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.PaymentReservationResult.prototype.write = function (output) { - output.writeStructBegin("PaymentReservationResult"); - if (this.orderId !== null && this.orderId !== undefined) { - output.writeFieldBegin("orderId", Thrift.Type.STRING, 1); - output.writeString(this.orderId); - output.writeFieldEnd(); - } - if (this.confirmUrl !== null && this.confirmUrl !== undefined) { - output.writeFieldBegin("confirmUrl", Thrift.Type.STRING, 2); - output.writeString(this.confirmUrl); - output.writeFieldEnd(); - } - if (this.extras !== null && this.extras !== undefined) { - output.writeFieldBegin("extras", Thrift.Type.MAP, 3); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.extras)); - for (var kiter246 in this.extras) { - if (this.extras.hasOwnProperty(kiter246)) { - var viter247 = this.extras[kiter246]; - output.writeString(kiter246); - output.writeString(viter247); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.Product = function (args) { - this.productId = null; - this.packageId = null; - this.version = null; - this.authorName = null; - this.onSale = null; - this.validDays = null; - this.saleType = null; - this.copyright = null; - this.title = null; - this.descriptionText = null; - this.shopOrderId = null; - this.fromMid = null; - this.toMid = null; - this.validUntil = null; - this.priceTier = null; - this.price = null; - this.currency = null; - this.currencySymbol = null; - this.paymentType = null; - this.createDate = null; - this.ownFlag = null; - this.eventType = null; - this.urlSchema = null; - this.downloadUrl = null; - this.buddyMid = null; - this.publishSince = null; - this.newFlag = null; - this.missionFlag = null; - this.categories = null; - this.missionButtonText = null; - this.missionShortDescription = null; - this.authorId = null; - this.grantedByDefault = null; - this.displayOrder = null; - this.availableForPresent = null; - this.availableForMyself = null; - this.hasAnimation = null; - this.hasSound = null; - this.recommendationsEnabled = null; - this.stickerResourceType = null; - if (args) { - if (args.productId !== undefined && args.productId !== null) { - this.productId = args.productId; - } - if (args.packageId !== undefined && args.packageId !== null) { - this.packageId = args.packageId; - } - if (args.version !== undefined && args.version !== null) { - this.version = args.version; - } - if (args.authorName !== undefined && args.authorName !== null) { - this.authorName = args.authorName; - } - if (args.onSale !== undefined && args.onSale !== null) { - this.onSale = args.onSale; - } - if (args.validDays !== undefined && args.validDays !== null) { - this.validDays = args.validDays; - } - if (args.saleType !== undefined && args.saleType !== null) { - this.saleType = args.saleType; - } - if (args.copyright !== undefined && args.copyright !== null) { - this.copyright = args.copyright; - } - if (args.title !== undefined && args.title !== null) { - this.title = args.title; - } - if (args.descriptionText !== undefined && args.descriptionText !== null) { - this.descriptionText = args.descriptionText; - } - if (args.shopOrderId !== undefined && args.shopOrderId !== null) { - this.shopOrderId = args.shopOrderId; - } - if (args.fromMid !== undefined && args.fromMid !== null) { - this.fromMid = args.fromMid; - } - if (args.toMid !== undefined && args.toMid !== null) { - this.toMid = args.toMid; - } - if (args.validUntil !== undefined && args.validUntil !== null) { - this.validUntil = args.validUntil; - } - if (args.priceTier !== undefined && args.priceTier !== null) { - this.priceTier = args.priceTier; - } - if (args.price !== undefined && args.price !== null) { - this.price = args.price; - } - if (args.currency !== undefined && args.currency !== null) { - this.currency = args.currency; - } - if (args.currencySymbol !== undefined && args.currencySymbol !== null) { - this.currencySymbol = args.currencySymbol; - } - if (args.paymentType !== undefined && args.paymentType !== null) { - this.paymentType = args.paymentType; - } - if (args.createDate !== undefined && args.createDate !== null) { - this.createDate = args.createDate; - } - if (args.ownFlag !== undefined && args.ownFlag !== null) { - this.ownFlag = args.ownFlag; - } - if (args.eventType !== undefined && args.eventType !== null) { - this.eventType = args.eventType; - } - if (args.urlSchema !== undefined && args.urlSchema !== null) { - this.urlSchema = args.urlSchema; - } - if (args.downloadUrl !== undefined && args.downloadUrl !== null) { - this.downloadUrl = args.downloadUrl; - } - if (args.buddyMid !== undefined && args.buddyMid !== null) { - this.buddyMid = args.buddyMid; - } - if (args.publishSince !== undefined && args.publishSince !== null) { - this.publishSince = args.publishSince; - } - if (args.newFlag !== undefined && args.newFlag !== null) { - this.newFlag = args.newFlag; - } - if (args.missionFlag !== undefined && args.missionFlag !== null) { - this.missionFlag = args.missionFlag; - } - if (args.categories !== undefined && args.categories !== null) { - this.categories = Thrift.copyList(args.categories, [ttypes.ProductCategory]); - } - if (args.missionButtonText !== undefined && args.missionButtonText !== null) { - this.missionButtonText = args.missionButtonText; - } - if (args.missionShortDescription !== undefined && args.missionShortDescription !== null) { - this.missionShortDescription = args.missionShortDescription; - } - if (args.authorId !== undefined && args.authorId !== null) { - this.authorId = args.authorId; - } - if (args.grantedByDefault !== undefined && args.grantedByDefault !== null) { - this.grantedByDefault = args.grantedByDefault; - } - if (args.displayOrder !== undefined && args.displayOrder !== null) { - this.displayOrder = args.displayOrder; - } - if (args.availableForPresent !== undefined && args.availableForPresent !== null) { - this.availableForPresent = args.availableForPresent; - } - if (args.availableForMyself !== undefined && args.availableForMyself !== null) { - this.availableForMyself = args.availableForMyself; - } - if (args.hasAnimation !== undefined && args.hasAnimation !== null) { - this.hasAnimation = args.hasAnimation; - } - if (args.hasSound !== undefined && args.hasSound !== null) { - this.hasSound = args.hasSound; - } - if (args.recommendationsEnabled !== undefined && args.recommendationsEnabled !== null) { - this.recommendationsEnabled = args.recommendationsEnabled; - } - if (args.stickerResourceType !== undefined && args.stickerResourceType !== null) { - this.stickerResourceType = args.stickerResourceType; - } - } -}; -ttypes.Product.prototype = {}; -ttypes.Product.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.productId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.packageId = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.version = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.authorName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.BOOL) { - this.onSale = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.I32) { - this.validDays = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.I32) { - this.saleType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 8: - if (ftype == Thrift.Type.STRING) { - this.copyright = input.readString(); - } else { - input.skip(ftype); - } - break; - case 9: - if (ftype == Thrift.Type.STRING) { - this.title = input.readString(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.STRING) { - this.descriptionText = input.readString(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.I64) { - this.shopOrderId = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.STRING) { - this.fromMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 13: - if (ftype == Thrift.Type.STRING) { - this.toMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 14: - if (ftype == Thrift.Type.I64) { - this.validUntil = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 15: - if (ftype == Thrift.Type.I32) { - this.priceTier = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 16: - if (ftype == Thrift.Type.STRING) { - this.price = input.readString(); - } else { - input.skip(ftype); - } - break; - case 17: - if (ftype == Thrift.Type.STRING) { - this.currency = input.readString(); - } else { - input.skip(ftype); - } - break; - case 18: - if (ftype == Thrift.Type.STRING) { - this.currencySymbol = input.readString(); - } else { - input.skip(ftype); - } - break; - case 19: - if (ftype == Thrift.Type.I32) { - this.paymentType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 20: - if (ftype == Thrift.Type.I64) { - this.createDate = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 21: - if (ftype == Thrift.Type.BOOL) { - this.ownFlag = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 22: - if (ftype == Thrift.Type.I32) { - this.eventType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 23: - if (ftype == Thrift.Type.STRING) { - this.urlSchema = input.readString(); - } else { - input.skip(ftype); - } - break; - case 24: - if (ftype == Thrift.Type.STRING) { - this.downloadUrl = input.readString(); - } else { - input.skip(ftype); - } - break; - case 25: - if (ftype == Thrift.Type.STRING) { - this.buddyMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 26: - if (ftype == Thrift.Type.I64) { - this.publishSince = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 27: - if (ftype == Thrift.Type.BOOL) { - this.newFlag = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 28: - if (ftype == Thrift.Type.BOOL) { - this.missionFlag = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 29: - if (ftype == Thrift.Type.LIST) { - this.categories = []; - var _rtmp3249 = input.readListBegin(); - var _size248 = _rtmp3249.size || 0; - for (var _i250 = 0; _i250 < _size248; ++_i250) { - var elem251 = null; - elem251 = new ttypes.ProductCategory(); - elem251.read(input); - this.categories.push(elem251); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 30: - if (ftype == Thrift.Type.STRING) { - this.missionButtonText = input.readString(); - } else { - input.skip(ftype); - } - break; - case 31: - if (ftype == Thrift.Type.STRING) { - this.missionShortDescription = input.readString(); - } else { - input.skip(ftype); - } - break; - case 32: - if (ftype == Thrift.Type.STRING) { - this.authorId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 41: - if (ftype == Thrift.Type.BOOL) { - this.grantedByDefault = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 42: - if (ftype == Thrift.Type.I32) { - this.displayOrder = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 43: - if (ftype == Thrift.Type.BOOL) { - this.availableForPresent = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 44: - if (ftype == Thrift.Type.BOOL) { - this.availableForMyself = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 51: - if (ftype == Thrift.Type.BOOL) { - this.hasAnimation = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 52: - if (ftype == Thrift.Type.BOOL) { - this.hasSound = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 53: - if (ftype == Thrift.Type.BOOL) { - this.recommendationsEnabled = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 54: - if (ftype == Thrift.Type.I32) { - this.stickerResourceType = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.Product.prototype.write = function (output) { - output.writeStructBegin("Product"); - if (this.productId !== null && this.productId !== undefined) { - output.writeFieldBegin("productId", Thrift.Type.STRING, 1); - output.writeString(this.productId); - output.writeFieldEnd(); - } - if (this.packageId !== null && this.packageId !== undefined) { - output.writeFieldBegin("packageId", Thrift.Type.I64, 2); - output.writeI64(this.packageId); - output.writeFieldEnd(); - } - if (this.version !== null && this.version !== undefined) { - output.writeFieldBegin("version", Thrift.Type.I32, 3); - output.writeI32(this.version); - output.writeFieldEnd(); - } - if (this.authorName !== null && this.authorName !== undefined) { - output.writeFieldBegin("authorName", Thrift.Type.STRING, 4); - output.writeString(this.authorName); - output.writeFieldEnd(); - } - if (this.onSale !== null && this.onSale !== undefined) { - output.writeFieldBegin("onSale", Thrift.Type.BOOL, 5); - output.writeBool(this.onSale); - output.writeFieldEnd(); - } - if (this.validDays !== null && this.validDays !== undefined) { - output.writeFieldBegin("validDays", Thrift.Type.I32, 6); - output.writeI32(this.validDays); - output.writeFieldEnd(); - } - if (this.saleType !== null && this.saleType !== undefined) { - output.writeFieldBegin("saleType", Thrift.Type.I32, 7); - output.writeI32(this.saleType); - output.writeFieldEnd(); - } - if (this.copyright !== null && this.copyright !== undefined) { - output.writeFieldBegin("copyright", Thrift.Type.STRING, 8); - output.writeString(this.copyright); - output.writeFieldEnd(); - } - if (this.title !== null && this.title !== undefined) { - output.writeFieldBegin("title", Thrift.Type.STRING, 9); - output.writeString(this.title); - output.writeFieldEnd(); - } - if (this.descriptionText !== null && this.descriptionText !== undefined) { - output.writeFieldBegin("descriptionText", Thrift.Type.STRING, 10); - output.writeString(this.descriptionText); - output.writeFieldEnd(); - } - if (this.shopOrderId !== null && this.shopOrderId !== undefined) { - output.writeFieldBegin("shopOrderId", Thrift.Type.I64, 11); - output.writeI64(this.shopOrderId); - output.writeFieldEnd(); - } - if (this.fromMid !== null && this.fromMid !== undefined) { - output.writeFieldBegin("fromMid", Thrift.Type.STRING, 12); - output.writeString(this.fromMid); - output.writeFieldEnd(); - } - if (this.toMid !== null && this.toMid !== undefined) { - output.writeFieldBegin("toMid", Thrift.Type.STRING, 13); - output.writeString(this.toMid); - output.writeFieldEnd(); - } - if (this.validUntil !== null && this.validUntil !== undefined) { - output.writeFieldBegin("validUntil", Thrift.Type.I64, 14); - output.writeI64(this.validUntil); - output.writeFieldEnd(); - } - if (this.priceTier !== null && this.priceTier !== undefined) { - output.writeFieldBegin("priceTier", Thrift.Type.I32, 15); - output.writeI32(this.priceTier); - output.writeFieldEnd(); - } - if (this.price !== null && this.price !== undefined) { - output.writeFieldBegin("price", Thrift.Type.STRING, 16); - output.writeString(this.price); - output.writeFieldEnd(); - } - if (this.currency !== null && this.currency !== undefined) { - output.writeFieldBegin("currency", Thrift.Type.STRING, 17); - output.writeString(this.currency); - output.writeFieldEnd(); - } - if (this.currencySymbol !== null && this.currencySymbol !== undefined) { - output.writeFieldBegin("currencySymbol", Thrift.Type.STRING, 18); - output.writeString(this.currencySymbol); - output.writeFieldEnd(); - } - if (this.paymentType !== null && this.paymentType !== undefined) { - output.writeFieldBegin("paymentType", Thrift.Type.I32, 19); - output.writeI32(this.paymentType); - output.writeFieldEnd(); - } - if (this.createDate !== null && this.createDate !== undefined) { - output.writeFieldBegin("createDate", Thrift.Type.I64, 20); - output.writeI64(this.createDate); - output.writeFieldEnd(); - } - if (this.ownFlag !== null && this.ownFlag !== undefined) { - output.writeFieldBegin("ownFlag", Thrift.Type.BOOL, 21); - output.writeBool(this.ownFlag); - output.writeFieldEnd(); - } - if (this.eventType !== null && this.eventType !== undefined) { - output.writeFieldBegin("eventType", Thrift.Type.I32, 22); - output.writeI32(this.eventType); - output.writeFieldEnd(); - } - if (this.urlSchema !== null && this.urlSchema !== undefined) { - output.writeFieldBegin("urlSchema", Thrift.Type.STRING, 23); - output.writeString(this.urlSchema); - output.writeFieldEnd(); - } - if (this.downloadUrl !== null && this.downloadUrl !== undefined) { - output.writeFieldBegin("downloadUrl", Thrift.Type.STRING, 24); - output.writeString(this.downloadUrl); - output.writeFieldEnd(); - } - if (this.buddyMid !== null && this.buddyMid !== undefined) { - output.writeFieldBegin("buddyMid", Thrift.Type.STRING, 25); - output.writeString(this.buddyMid); - output.writeFieldEnd(); - } - if (this.publishSince !== null && this.publishSince !== undefined) { - output.writeFieldBegin("publishSince", Thrift.Type.I64, 26); - output.writeI64(this.publishSince); - output.writeFieldEnd(); - } - if (this.newFlag !== null && this.newFlag !== undefined) { - output.writeFieldBegin("newFlag", Thrift.Type.BOOL, 27); - output.writeBool(this.newFlag); - output.writeFieldEnd(); - } - if (this.missionFlag !== null && this.missionFlag !== undefined) { - output.writeFieldBegin("missionFlag", Thrift.Type.BOOL, 28); - output.writeBool(this.missionFlag); - output.writeFieldEnd(); - } - if (this.categories !== null && this.categories !== undefined) { - output.writeFieldBegin("categories", Thrift.Type.LIST, 29); - output.writeListBegin(Thrift.Type.STRUCT, this.categories.length); - for (var iter252 in this.categories) { - if (this.categories.hasOwnProperty(iter252)) { - iter252 = this.categories[iter252]; - iter252.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.missionButtonText !== null && this.missionButtonText !== undefined) { - output.writeFieldBegin("missionButtonText", Thrift.Type.STRING, 30); - output.writeString(this.missionButtonText); - output.writeFieldEnd(); - } - if (this.missionShortDescription !== null && this.missionShortDescription !== undefined) { - output.writeFieldBegin("missionShortDescription", Thrift.Type.STRING, 31); - output.writeString(this.missionShortDescription); - output.writeFieldEnd(); - } - if (this.authorId !== null && this.authorId !== undefined) { - output.writeFieldBegin("authorId", Thrift.Type.STRING, 32); - output.writeString(this.authorId); - output.writeFieldEnd(); - } - if (this.grantedByDefault !== null && this.grantedByDefault !== undefined) { - output.writeFieldBegin("grantedByDefault", Thrift.Type.BOOL, 41); - output.writeBool(this.grantedByDefault); - output.writeFieldEnd(); - } - if (this.displayOrder !== null && this.displayOrder !== undefined) { - output.writeFieldBegin("displayOrder", Thrift.Type.I32, 42); - output.writeI32(this.displayOrder); - output.writeFieldEnd(); - } - if (this.availableForPresent !== null && this.availableForPresent !== undefined) { - output.writeFieldBegin("availableForPresent", Thrift.Type.BOOL, 43); - output.writeBool(this.availableForPresent); - output.writeFieldEnd(); - } - if (this.availableForMyself !== null && this.availableForMyself !== undefined) { - output.writeFieldBegin("availableForMyself", Thrift.Type.BOOL, 44); - output.writeBool(this.availableForMyself); - output.writeFieldEnd(); - } - if (this.hasAnimation !== null && this.hasAnimation !== undefined) { - output.writeFieldBegin("hasAnimation", Thrift.Type.BOOL, 51); - output.writeBool(this.hasAnimation); - output.writeFieldEnd(); - } - if (this.hasSound !== null && this.hasSound !== undefined) { - output.writeFieldBegin("hasSound", Thrift.Type.BOOL, 52); - output.writeBool(this.hasSound); - output.writeFieldEnd(); - } - if (this.recommendationsEnabled !== null && this.recommendationsEnabled !== undefined) { - output.writeFieldBegin("recommendationsEnabled", Thrift.Type.BOOL, 53); - output.writeBool(this.recommendationsEnabled); - output.writeFieldEnd(); - } - if (this.stickerResourceType !== null && this.stickerResourceType !== undefined) { - output.writeFieldBegin("stickerResourceType", Thrift.Type.I32, 54); - output.writeI32(this.stickerResourceType); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ProductList = function (args) { - this.hasNext = null; - this.bannerSequence = null; - this.bannerTargetType = null; - this.bannerTargetPath = null; - this.productList = null; - this.bannerLang = null; - if (args) { - if (args.hasNext !== undefined && args.hasNext !== null) { - this.hasNext = args.hasNext; - } - if (args.bannerSequence !== undefined && args.bannerSequence !== null) { - this.bannerSequence = args.bannerSequence; - } - if (args.bannerTargetType !== undefined && args.bannerTargetType !== null) { - this.bannerTargetType = args.bannerTargetType; - } - if (args.bannerTargetPath !== undefined && args.bannerTargetPath !== null) { - this.bannerTargetPath = args.bannerTargetPath; - } - if (args.productList !== undefined && args.productList !== null) { - this.productList = Thrift.copyList(args.productList, [ttypes.Product]); - } - if (args.bannerLang !== undefined && args.bannerLang !== null) { - this.bannerLang = args.bannerLang; - } - } -}; -ttypes.ProductList.prototype = {}; -ttypes.ProductList.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.BOOL) { - this.hasNext = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I64) { - this.bannerSequence = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I32) { - this.bannerTargetType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRING) { - this.bannerTargetPath = input.readString(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.LIST) { - this.productList = []; - var _rtmp3254 = input.readListBegin(); - var _size253 = _rtmp3254.size || 0; - for (var _i255 = 0; _i255 < _size253; ++_i255) { - var elem256 = null; - elem256 = new ttypes.Product(); - elem256.read(input); - this.productList.push(elem256); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 8: - if (ftype == Thrift.Type.STRING) { - this.bannerLang = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ProductList.prototype.write = function (output) { - output.writeStructBegin("ProductList"); - if (this.hasNext !== null && this.hasNext !== undefined) { - output.writeFieldBegin("hasNext", Thrift.Type.BOOL, 1); - output.writeBool(this.hasNext); - output.writeFieldEnd(); - } - if (this.bannerSequence !== null && this.bannerSequence !== undefined) { - output.writeFieldBegin("bannerSequence", Thrift.Type.I64, 4); - output.writeI64(this.bannerSequence); - output.writeFieldEnd(); - } - if (this.bannerTargetType !== null && this.bannerTargetType !== undefined) { - output.writeFieldBegin("bannerTargetType", Thrift.Type.I32, 5); - output.writeI32(this.bannerTargetType); - output.writeFieldEnd(); - } - if (this.bannerTargetPath !== null && this.bannerTargetPath !== undefined) { - output.writeFieldBegin("bannerTargetPath", Thrift.Type.STRING, 6); - output.writeString(this.bannerTargetPath); - output.writeFieldEnd(); - } - if (this.productList !== null && this.productList !== undefined) { - output.writeFieldBegin("productList", Thrift.Type.LIST, 7); - output.writeListBegin(Thrift.Type.STRUCT, this.productList.length); - for (var iter257 in this.productList) { - if (this.productList.hasOwnProperty(iter257)) { - iter257 = this.productList[iter257]; - iter257.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.bannerLang !== null && this.bannerLang !== undefined) { - output.writeFieldBegin("bannerLang", Thrift.Type.STRING, 8); - output.writeString(this.bannerLang); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.StickerIdRange = function (args) { - this.start = null; - this.size = null; - if (args) { - if (args.start !== undefined && args.start !== null) { - this.start = args.start; - } - if (args.size !== undefined && args.size !== null) { - this.size = args.size; - } - } -}; -ttypes.StickerIdRange.prototype = {}; -ttypes.StickerIdRange.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.start = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.size = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.StickerIdRange.prototype.write = function (output) { - output.writeStructBegin("StickerIdRange"); - if (this.start !== null && this.start !== undefined) { - output.writeFieldBegin("start", Thrift.Type.I64, 1); - output.writeI64(this.start); - output.writeFieldEnd(); - } - if (this.size !== null && this.size !== undefined) { - output.writeFieldBegin("size", Thrift.Type.I32, 2); - output.writeI32(this.size); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ProductSimple = function (args) { - this.productId = null; - this.packageId = null; - this.version = null; - this.onSale = null; - this.validUntil = null; - this.stickerIdRanges = null; - this.grantedByDefault = null; - this.displayOrder = null; - if (args) { - if (args.productId !== undefined && args.productId !== null) { - this.productId = args.productId; - } - if (args.packageId !== undefined && args.packageId !== null) { - this.packageId = args.packageId; - } - if (args.version !== undefined && args.version !== null) { - this.version = args.version; - } - if (args.onSale !== undefined && args.onSale !== null) { - this.onSale = args.onSale; - } - if (args.validUntil !== undefined && args.validUntil !== null) { - this.validUntil = args.validUntil; - } - if (args.stickerIdRanges !== undefined && args.stickerIdRanges !== null) { - this.stickerIdRanges = Thrift.copyList(args.stickerIdRanges, [ttypes.StickerIdRange]); - } - if (args.grantedByDefault !== undefined && args.grantedByDefault !== null) { - this.grantedByDefault = args.grantedByDefault; - } - if (args.displayOrder !== undefined && args.displayOrder !== null) { - this.displayOrder = args.displayOrder; - } - } -}; -ttypes.ProductSimple.prototype = {}; -ttypes.ProductSimple.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.productId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.packageId = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.version = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.BOOL) { - this.onSale = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I64) { - this.validUntil = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.LIST) { - this.stickerIdRanges = []; - var _rtmp3259 = input.readListBegin(); - var _size258 = _rtmp3259.size || 0; - for (var _i260 = 0; _i260 < _size258; ++_i260) { - var elem261 = null; - elem261 = new ttypes.StickerIdRange(); - elem261.read(input); - this.stickerIdRanges.push(elem261); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 41: - if (ftype == Thrift.Type.BOOL) { - this.grantedByDefault = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 42: - if (ftype == Thrift.Type.I32) { - this.displayOrder = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ProductSimple.prototype.write = function (output) { - output.writeStructBegin("ProductSimple"); - if (this.productId !== null && this.productId !== undefined) { - output.writeFieldBegin("productId", Thrift.Type.STRING, 1); - output.writeString(this.productId); - output.writeFieldEnd(); - } - if (this.packageId !== null && this.packageId !== undefined) { - output.writeFieldBegin("packageId", Thrift.Type.I64, 2); - output.writeI64(this.packageId); - output.writeFieldEnd(); - } - if (this.version !== null && this.version !== undefined) { - output.writeFieldBegin("version", Thrift.Type.I32, 3); - output.writeI32(this.version); - output.writeFieldEnd(); - } - if (this.onSale !== null && this.onSale !== undefined) { - output.writeFieldBegin("onSale", Thrift.Type.BOOL, 4); - output.writeBool(this.onSale); - output.writeFieldEnd(); - } - if (this.validUntil !== null && this.validUntil !== undefined) { - output.writeFieldBegin("validUntil", Thrift.Type.I64, 5); - output.writeI64(this.validUntil); - output.writeFieldEnd(); - } - if (this.stickerIdRanges !== null && this.stickerIdRanges !== undefined) { - output.writeFieldBegin("stickerIdRanges", Thrift.Type.LIST, 10); - output.writeListBegin(Thrift.Type.STRUCT, this.stickerIdRanges.length); - for (var iter262 in this.stickerIdRanges) { - if (this.stickerIdRanges.hasOwnProperty(iter262)) { - iter262 = this.stickerIdRanges[iter262]; - iter262.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.grantedByDefault !== null && this.grantedByDefault !== undefined) { - output.writeFieldBegin("grantedByDefault", Thrift.Type.BOOL, 41); - output.writeBool(this.grantedByDefault); - output.writeFieldEnd(); - } - if (this.displayOrder !== null && this.displayOrder !== undefined) { - output.writeFieldBegin("displayOrder", Thrift.Type.I32, 42); - output.writeI32(this.displayOrder); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ProductSimpleList = function (args) { - this.hasNext = null; - this.reinvokeHour = null; - this.lastVersionSeq = null; - this.productList = null; - this.recentNewReleaseDate = null; - this.recentEventReleaseDate = null; - if (args) { - if (args.hasNext !== undefined && args.hasNext !== null) { - this.hasNext = args.hasNext; - } - if (args.reinvokeHour !== undefined && args.reinvokeHour !== null) { - this.reinvokeHour = args.reinvokeHour; - } - if (args.lastVersionSeq !== undefined && args.lastVersionSeq !== null) { - this.lastVersionSeq = args.lastVersionSeq; - } - if (args.productList !== undefined && args.productList !== null) { - this.productList = Thrift.copyList(args.productList, [ttypes.ProductSimple]); - } - if (args.recentNewReleaseDate !== undefined && args.recentNewReleaseDate !== null) { - this.recentNewReleaseDate = args.recentNewReleaseDate; - } - if (args.recentEventReleaseDate !== undefined && args.recentEventReleaseDate !== null) { - this.recentEventReleaseDate = args.recentEventReleaseDate; - } - } -}; -ttypes.ProductSimpleList.prototype = {}; -ttypes.ProductSimpleList.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.BOOL) { - this.hasNext = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.reinvokeHour = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I64) { - this.lastVersionSeq = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.LIST) { - this.productList = []; - var _rtmp3264 = input.readListBegin(); - var _size263 = _rtmp3264.size || 0; - for (var _i265 = 0; _i265 < _size263; ++_i265) { - var elem266 = null; - elem266 = new ttypes.ProductSimple(); - elem266.read(input); - this.productList.push(elem266); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I64) { - this.recentNewReleaseDate = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.I64) { - this.recentEventReleaseDate = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ProductSimpleList.prototype.write = function (output) { - output.writeStructBegin("ProductSimpleList"); - if (this.hasNext !== null && this.hasNext !== undefined) { - output.writeFieldBegin("hasNext", Thrift.Type.BOOL, 1); - output.writeBool(this.hasNext); - output.writeFieldEnd(); - } - if (this.reinvokeHour !== null && this.reinvokeHour !== undefined) { - output.writeFieldBegin("reinvokeHour", Thrift.Type.I32, 2); - output.writeI32(this.reinvokeHour); - output.writeFieldEnd(); - } - if (this.lastVersionSeq !== null && this.lastVersionSeq !== undefined) { - output.writeFieldBegin("lastVersionSeq", Thrift.Type.I64, 3); - output.writeI64(this.lastVersionSeq); - output.writeFieldEnd(); - } - if (this.productList !== null && this.productList !== undefined) { - output.writeFieldBegin("productList", Thrift.Type.LIST, 4); - output.writeListBegin(Thrift.Type.STRUCT, this.productList.length); - for (var iter267 in this.productList) { - if (this.productList.hasOwnProperty(iter267)) { - iter267 = this.productList[iter267]; - iter267.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.recentNewReleaseDate !== null && this.recentNewReleaseDate !== undefined) { - output.writeFieldBegin("recentNewReleaseDate", Thrift.Type.I64, 5); - output.writeI64(this.recentNewReleaseDate); - output.writeFieldEnd(); - } - if (this.recentEventReleaseDate !== null && this.recentEventReleaseDate !== undefined) { - output.writeFieldBegin("recentEventReleaseDate", Thrift.Type.I64, 6); - output.writeI64(this.recentEventReleaseDate); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.Profile = function (args) { - this.mid = null; - this.userid = null; - this.phone = null; - this.email = null; - this.regionCode = null; - this.displayName = null; - this.phoneticName = null; - this.pictureStatus = null; - this.thumbnailUrl = null; - this.statusMessage = null; - this.allowSearchByUserid = null; - this.allowSearchByEmail = null; - this.picturePath = null; - this.musicProfile = null; - this.videoProfile = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.userid !== undefined && args.userid !== null) { - this.userid = args.userid; - } - if (args.phone !== undefined && args.phone !== null) { - this.phone = args.phone; - } - if (args.email !== undefined && args.email !== null) { - this.email = args.email; - } - if (args.regionCode !== undefined && args.regionCode !== null) { - this.regionCode = args.regionCode; - } - if (args.displayName !== undefined && args.displayName !== null) { - this.displayName = args.displayName; - } - if (args.phoneticName !== undefined && args.phoneticName !== null) { - this.phoneticName = args.phoneticName; - } - if (args.pictureStatus !== undefined && args.pictureStatus !== null) { - this.pictureStatus = args.pictureStatus; - } - if (args.thumbnailUrl !== undefined && args.thumbnailUrl !== null) { - this.thumbnailUrl = args.thumbnailUrl; - } - if (args.statusMessage !== undefined && args.statusMessage !== null) { - this.statusMessage = args.statusMessage; - } - if (args.allowSearchByUserid !== undefined && args.allowSearchByUserid !== null) { - this.allowSearchByUserid = args.allowSearchByUserid; - } - if (args.allowSearchByEmail !== undefined && args.allowSearchByEmail !== null) { - this.allowSearchByEmail = args.allowSearchByEmail; - } - if (args.picturePath !== undefined && args.picturePath !== null) { - this.picturePath = args.picturePath; - } - if (args.musicProfile !== undefined && args.musicProfile !== null) { - this.musicProfile = args.musicProfile; - } - if (args.videoProfile !== undefined && args.videoProfile !== null) { - this.videoProfile = args.videoProfile; - } - } -}; -ttypes.Profile.prototype = {}; -ttypes.Profile.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.mid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.userid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.STRING) { - this.phone = input.readString(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.STRING) { - this.email = input.readString(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.STRING) { - this.regionCode = input.readString(); - } else { - input.skip(ftype); - } - break; - case 20: - if (ftype == Thrift.Type.STRING) { - this.displayName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 21: - if (ftype == Thrift.Type.STRING) { - this.phoneticName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 22: - if (ftype == Thrift.Type.STRING) { - this.pictureStatus = input.readString(); - } else { - input.skip(ftype); - } - break; - case 23: - if (ftype == Thrift.Type.STRING) { - this.thumbnailUrl = input.readString(); - } else { - input.skip(ftype); - } - break; - case 24: - if (ftype == Thrift.Type.STRING) { - this.statusMessage = input.readString(); - } else { - input.skip(ftype); - } - break; - case 31: - if (ftype == Thrift.Type.BOOL) { - this.allowSearchByUserid = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 32: - if (ftype == Thrift.Type.BOOL) { - this.allowSearchByEmail = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 33: - if (ftype == Thrift.Type.STRING) { - this.picturePath = input.readString(); - } else { - input.skip(ftype); - } - break; - case 34: - if (ftype == Thrift.Type.STRING) { - this.musicProfile = input.readString(); - } else { - input.skip(ftype); - } - break; - case 35: - if (ftype == Thrift.Type.STRING) { - this.videoProfile = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.Profile.prototype.write = function (output) { - output.writeStructBegin("Profile"); - if (this.mid !== null && this.mid !== undefined) { - output.writeFieldBegin("mid", Thrift.Type.STRING, 1); - output.writeString(this.mid); - output.writeFieldEnd(); - } - if (this.userid !== null && this.userid !== undefined) { - output.writeFieldBegin("userid", Thrift.Type.STRING, 3); - output.writeString(this.userid); - output.writeFieldEnd(); - } - if (this.phone !== null && this.phone !== undefined) { - output.writeFieldBegin("phone", Thrift.Type.STRING, 10); - output.writeString(this.phone); - output.writeFieldEnd(); - } - if (this.email !== null && this.email !== undefined) { - output.writeFieldBegin("email", Thrift.Type.STRING, 11); - output.writeString(this.email); - output.writeFieldEnd(); - } - if (this.regionCode !== null && this.regionCode !== undefined) { - output.writeFieldBegin("regionCode", Thrift.Type.STRING, 12); - output.writeString(this.regionCode); - output.writeFieldEnd(); - } - if (this.displayName !== null && this.displayName !== undefined) { - output.writeFieldBegin("displayName", Thrift.Type.STRING, 20); - output.writeString(this.displayName); - output.writeFieldEnd(); - } - if (this.phoneticName !== null && this.phoneticName !== undefined) { - output.writeFieldBegin("phoneticName", Thrift.Type.STRING, 21); - output.writeString(this.phoneticName); - output.writeFieldEnd(); - } - if (this.pictureStatus !== null && this.pictureStatus !== undefined) { - output.writeFieldBegin("pictureStatus", Thrift.Type.STRING, 22); - output.writeString(this.pictureStatus); - output.writeFieldEnd(); - } - if (this.thumbnailUrl !== null && this.thumbnailUrl !== undefined) { - output.writeFieldBegin("thumbnailUrl", Thrift.Type.STRING, 23); - output.writeString(this.thumbnailUrl); - output.writeFieldEnd(); - } - if (this.statusMessage !== null && this.statusMessage !== undefined) { - output.writeFieldBegin("statusMessage", Thrift.Type.STRING, 24); - output.writeString(this.statusMessage); - output.writeFieldEnd(); - } - if (this.allowSearchByUserid !== null && this.allowSearchByUserid !== undefined) { - output.writeFieldBegin("allowSearchByUserid", Thrift.Type.BOOL, 31); - output.writeBool(this.allowSearchByUserid); - output.writeFieldEnd(); - } - if (this.allowSearchByEmail !== null && this.allowSearchByEmail !== undefined) { - output.writeFieldBegin("allowSearchByEmail", Thrift.Type.BOOL, 32); - output.writeBool(this.allowSearchByEmail); - output.writeFieldEnd(); - } - if (this.picturePath !== null && this.picturePath !== undefined) { - output.writeFieldBegin("picturePath", Thrift.Type.STRING, 33); - output.writeString(this.picturePath); - output.writeFieldEnd(); - } - if (this.musicProfile !== null && this.musicProfile !== undefined) { - output.writeFieldBegin("musicProfile", Thrift.Type.STRING, 34); - output.writeString(this.musicProfile); - output.writeFieldEnd(); - } - if (this.videoProfile !== null && this.videoProfile !== undefined) { - output.writeFieldBegin("videoProfile", Thrift.Type.STRING, 35); - output.writeString(this.videoProfile); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ProximityMatchCandidateResult = function (args) { - this.users = null; - this.buddies = null; - if (args) { - if (args.users !== undefined && args.users !== null) { - this.users = Thrift.copyList(args.users, [ttypes.Contact]); - } - if (args.buddies !== undefined && args.buddies !== null) { - this.buddies = Thrift.copyList(args.buddies, [ttypes.Contact]); - } - } -}; -ttypes.ProximityMatchCandidateResult.prototype = {}; -ttypes.ProximityMatchCandidateResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.users = []; - var _rtmp3269 = input.readListBegin(); - var _size268 = _rtmp3269.size || 0; - for (var _i270 = 0; _i270 < _size268; ++_i270) { - var elem271 = null; - elem271 = new ttypes.Contact(); - elem271.read(input); - this.users.push(elem271); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.LIST) { - this.buddies = []; - var _rtmp3273 = input.readListBegin(); - var _size272 = _rtmp3273.size || 0; - for (var _i274 = 0; _i274 < _size272; ++_i274) { - var elem275 = null; - elem275 = new ttypes.Contact(); - elem275.read(input); - this.buddies.push(elem275); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ProximityMatchCandidateResult.prototype.write = function (output) { - output.writeStructBegin("ProximityMatchCandidateResult"); - if (this.users !== null && this.users !== undefined) { - output.writeFieldBegin("users", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.users.length); - for (var iter276 in this.users) { - if (this.users.hasOwnProperty(iter276)) { - iter276 = this.users[iter276]; - iter276.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.buddies !== null && this.buddies !== undefined) { - output.writeFieldBegin("buddies", Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.STRUCT, this.buddies.length); - for (var iter277 in this.buddies) { - if (this.buddies.hasOwnProperty(iter277)) { - iter277 = this.buddies[iter277]; - iter277.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.RegisterWithSnsIdResult = function (args) { - this.authToken = null; - this.userCreated = null; - if (args) { - if (args.authToken !== undefined && args.authToken !== null) { - this.authToken = args.authToken; - } - if (args.userCreated !== undefined && args.userCreated !== null) { - this.userCreated = args.userCreated; - } - } -}; -ttypes.RegisterWithSnsIdResult.prototype = {}; -ttypes.RegisterWithSnsIdResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.authToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.BOOL) { - this.userCreated = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.RegisterWithSnsIdResult.prototype.write = function (output) { - output.writeStructBegin("RegisterWithSnsIdResult"); - if (this.authToken !== null && this.authToken !== undefined) { - output.writeFieldBegin("authToken", Thrift.Type.STRING, 1); - output.writeString(this.authToken); - output.writeFieldEnd(); - } - if (this.userCreated !== null && this.userCreated !== undefined) { - output.writeFieldBegin("userCreated", Thrift.Type.BOOL, 2); - output.writeBool(this.userCreated); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.RequestTokenResponse = function (args) { - this.requestToken = null; - this.returnUrl = null; - if (args) { - if (args.requestToken !== undefined && args.requestToken !== null) { - this.requestToken = args.requestToken; - } - if (args.returnUrl !== undefined && args.returnUrl !== null) { - this.returnUrl = args.returnUrl; - } - } -}; -ttypes.RequestTokenResponse.prototype = {}; -ttypes.RequestTokenResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.requestToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.returnUrl = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.RequestTokenResponse.prototype.write = function (output) { - output.writeStructBegin("RequestTokenResponse"); - if (this.requestToken !== null && this.requestToken !== undefined) { - output.writeFieldBegin("requestToken", Thrift.Type.STRING, 1); - output.writeString(this.requestToken); - output.writeFieldEnd(); - } - if (this.returnUrl !== null && this.returnUrl !== undefined) { - output.writeFieldBegin("returnUrl", Thrift.Type.STRING, 2); - output.writeString(this.returnUrl); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.Room = function (args) { - this.mid = null; - this.createdTime = null; - this.contacts = null; - this.notificationDisabled = null; - this.memberMids = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.contacts !== undefined && args.contacts !== null) { - this.contacts = Thrift.copyList(args.contacts, [ttypes.Contact]); - } - if (args.notificationDisabled !== undefined && args.notificationDisabled !== null) { - this.notificationDisabled = args.notificationDisabled; - } - if (args.memberMids !== undefined && args.memberMids !== null) { - this.memberMids = Thrift.copyList(args.memberMids, [null]); - } - } -}; -ttypes.Room.prototype = {}; -ttypes.Room.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.mid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.createdTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.LIST) { - this.contacts = []; - var _rtmp3279 = input.readListBegin(); - var _size278 = _rtmp3279.size || 0; - for (var _i280 = 0; _i280 < _size278; ++_i280) { - var elem281 = null; - elem281 = new ttypes.Contact(); - elem281.read(input); - this.contacts.push(elem281); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 31: - if (ftype == Thrift.Type.BOOL) { - this.notificationDisabled = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 40: - if (ftype == Thrift.Type.LIST) { - this.memberMids = []; - var _rtmp3283 = input.readListBegin(); - var _size282 = _rtmp3283.size || 0; - for (var _i284 = 0; _i284 < _size282; ++_i284) { - var elem285 = null; - elem285 = input.readString(); - this.memberMids.push(elem285); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.Room.prototype.write = function (output) { - output.writeStructBegin("Room"); - if (this.mid !== null && this.mid !== undefined) { - output.writeFieldBegin("mid", Thrift.Type.STRING, 1); - output.writeString(this.mid); - output.writeFieldEnd(); - } - if (this.createdTime !== null && this.createdTime !== undefined) { - output.writeFieldBegin("createdTime", Thrift.Type.I64, 2); - output.writeI64(this.createdTime); - output.writeFieldEnd(); - } - if (this.contacts !== null && this.contacts !== undefined) { - output.writeFieldBegin("contacts", Thrift.Type.LIST, 10); - output.writeListBegin(Thrift.Type.STRUCT, this.contacts.length); - for (var iter286 in this.contacts) { - if (this.contacts.hasOwnProperty(iter286)) { - iter286 = this.contacts[iter286]; - iter286.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.notificationDisabled !== null && this.notificationDisabled !== undefined) { - output.writeFieldBegin("notificationDisabled", Thrift.Type.BOOL, 31); - output.writeBool(this.notificationDisabled); - output.writeFieldEnd(); - } - if (this.memberMids !== null && this.memberMids !== undefined) { - output.writeFieldBegin("memberMids", Thrift.Type.LIST, 40); - output.writeListBegin(Thrift.Type.STRING, this.memberMids.length); - for (var iter287 in this.memberMids) { - if (this.memberMids.hasOwnProperty(iter287)) { - iter287 = this.memberMids[iter287]; - output.writeString(iter287); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SuggestDictionary = function (args) { - this.language = null; - this.name = null; - if (args) { - if (args.language !== undefined && args.language !== null) { - this.language = args.language; - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - } -}; -ttypes.SuggestDictionary.prototype = {}; -ttypes.SuggestDictionary.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.language = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.name = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SuggestDictionary.prototype.write = function (output) { - output.writeStructBegin("SuggestDictionary"); - if (this.language !== null && this.language !== undefined) { - output.writeFieldBegin("language", Thrift.Type.STRING, 1); - output.writeString(this.language); - output.writeFieldEnd(); - } - if (this.name !== null && this.name !== undefined) { - output.writeFieldBegin("name", Thrift.Type.STRING, 2); - output.writeString(this.name); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SuggestItemDictionaryIncrement = function (args) { - this.status = null; - this.revision = null; - this.scheme = null; - this.data = null; - if (args) { - if (args.status !== undefined && args.status !== null) { - this.status = args.status; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.scheme !== undefined && args.scheme !== null) { - this.scheme = args.scheme; - } - if (args.data !== undefined && args.data !== null) { - this.data = args.data; - } - } -}; -ttypes.SuggestItemDictionaryIncrement.prototype = {}; -ttypes.SuggestItemDictionaryIncrement.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.status = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.scheme = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.data = input.readBinary(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SuggestItemDictionaryIncrement.prototype.write = function (output) { - output.writeStructBegin("SuggestItemDictionaryIncrement"); - if (this.status !== null && this.status !== undefined) { - output.writeFieldBegin("status", Thrift.Type.I32, 1); - output.writeI32(this.status); - output.writeFieldEnd(); - } - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 2); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - if (this.scheme !== null && this.scheme !== undefined) { - output.writeFieldBegin("scheme", Thrift.Type.STRING, 3); - output.writeString(this.scheme); - output.writeFieldEnd(); - } - if (this.data !== null && this.data !== undefined) { - output.writeFieldBegin("data", Thrift.Type.STRING, 4); - output.writeBinary(this.data); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SuggestTagDictionaryIncrement = function (args) { - this.status = null; - this.language = null; - this.revision = null; - this.scheme = null; - this.data = null; - if (args) { - if (args.status !== undefined && args.status !== null) { - this.status = args.status; - } - if (args.language !== undefined && args.language !== null) { - this.language = args.language; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.scheme !== undefined && args.scheme !== null) { - this.scheme = args.scheme; - } - if (args.data !== undefined && args.data !== null) { - this.data = args.data; - } - } -}; -ttypes.SuggestTagDictionaryIncrement.prototype = {}; -ttypes.SuggestTagDictionaryIncrement.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.status = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.language = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.scheme = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.data = input.readBinary(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SuggestTagDictionaryIncrement.prototype.write = function (output) { - output.writeStructBegin("SuggestTagDictionaryIncrement"); - if (this.status !== null && this.status !== undefined) { - output.writeFieldBegin("status", Thrift.Type.I32, 1); - output.writeI32(this.status); - output.writeFieldEnd(); - } - if (this.language !== null && this.language !== undefined) { - output.writeFieldBegin("language", Thrift.Type.STRING, 2); - output.writeString(this.language); - output.writeFieldEnd(); - } - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 3); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - if (this.scheme !== null && this.scheme !== undefined) { - output.writeFieldBegin("scheme", Thrift.Type.STRING, 4); - output.writeString(this.scheme); - output.writeFieldEnd(); - } - if (this.data !== null && this.data !== undefined) { - output.writeFieldBegin("data", Thrift.Type.STRING, 5); - output.writeBinary(this.data); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SuggestDictionaryIncrements = function (args) { - this.itemIncrement = null; - this.tagIncrements = null; - if (args) { - if (args.itemIncrement !== undefined && args.itemIncrement !== null) { - this.itemIncrement = new ttypes.SuggestItemDictionaryIncrement(args.itemIncrement); - } - if (args.tagIncrements !== undefined && args.tagIncrements !== null) { - this.tagIncrements = Thrift.copyList(args.tagIncrements, [ttypes.SuggestTagDictionaryIncrement]); - } - } -}; -ttypes.SuggestDictionaryIncrements.prototype = {}; -ttypes.SuggestDictionaryIncrements.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.itemIncrement = new ttypes.SuggestItemDictionaryIncrement(); - this.itemIncrement.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.LIST) { - this.tagIncrements = []; - var _rtmp3289 = input.readListBegin(); - var _size288 = _rtmp3289.size || 0; - for (var _i290 = 0; _i290 < _size288; ++_i290) { - var elem291 = null; - elem291 = new ttypes.SuggestTagDictionaryIncrement(); - elem291.read(input); - this.tagIncrements.push(elem291); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SuggestDictionaryIncrements.prototype.write = function (output) { - output.writeStructBegin("SuggestDictionaryIncrements"); - if (this.itemIncrement !== null && this.itemIncrement !== undefined) { - output.writeFieldBegin("itemIncrement", Thrift.Type.STRUCT, 1); - this.itemIncrement.write(output); - output.writeFieldEnd(); - } - if (this.tagIncrements !== null && this.tagIncrements !== undefined) { - output.writeFieldBegin("tagIncrements", Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.STRUCT, this.tagIncrements.length); - for (var iter292 in this.tagIncrements) { - if (this.tagIncrements.hasOwnProperty(iter292)) { - iter292 = this.tagIncrements[iter292]; - iter292.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SuggestItemDictionaryRevision = function (args) { - this.revision = null; - this.scheme = null; - if (args) { - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.scheme !== undefined && args.scheme !== null) { - this.scheme = args.scheme; - } - } -}; -ttypes.SuggestItemDictionaryRevision.prototype = {}; -ttypes.SuggestItemDictionaryRevision.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.scheme = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SuggestItemDictionaryRevision.prototype.write = function (output) { - output.writeStructBegin("SuggestItemDictionaryRevision"); - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 1); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - if (this.scheme !== null && this.scheme !== undefined) { - output.writeFieldBegin("scheme", Thrift.Type.STRING, 2); - output.writeString(this.scheme); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SuggestTagDictionaryRevision = function (args) { - this.language = null; - this.revision = null; - this.scheme = null; - if (args) { - if (args.language !== undefined && args.language !== null) { - this.language = args.language; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.scheme !== undefined && args.scheme !== null) { - this.scheme = args.scheme; - } - } -}; -ttypes.SuggestTagDictionaryRevision.prototype = {}; -ttypes.SuggestTagDictionaryRevision.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.language = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.scheme = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SuggestTagDictionaryRevision.prototype.write = function (output) { - output.writeStructBegin("SuggestTagDictionaryRevision"); - if (this.language !== null && this.language !== undefined) { - output.writeFieldBegin("language", Thrift.Type.STRING, 1); - output.writeString(this.language); - output.writeFieldEnd(); - } - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 2); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - if (this.scheme !== null && this.scheme !== undefined) { - output.writeFieldBegin("scheme", Thrift.Type.STRING, 3); - output.writeString(this.scheme); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SuggestDictionaryRevisions = function (args) { - this.itemRevision = null; - this.tagRevisions = null; - if (args) { - if (args.itemRevision !== undefined && args.itemRevision !== null) { - this.itemRevision = new ttypes.SuggestItemDictionaryRevision(args.itemRevision); - } - if (args.tagRevisions !== undefined && args.tagRevisions !== null) { - this.tagRevisions = Thrift.copyList(args.tagRevisions, [ttypes.SuggestTagDictionaryRevision]); - } - } -}; -ttypes.SuggestDictionaryRevisions.prototype = {}; -ttypes.SuggestDictionaryRevisions.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.itemRevision = new ttypes.SuggestItemDictionaryRevision(); - this.itemRevision.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.LIST) { - this.tagRevisions = []; - var _rtmp3294 = input.readListBegin(); - var _size293 = _rtmp3294.size || 0; - for (var _i295 = 0; _i295 < _size293; ++_i295) { - var elem296 = null; - elem296 = new ttypes.SuggestTagDictionaryRevision(); - elem296.read(input); - this.tagRevisions.push(elem296); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SuggestDictionaryRevisions.prototype.write = function (output) { - output.writeStructBegin("SuggestDictionaryRevisions"); - if (this.itemRevision !== null && this.itemRevision !== undefined) { - output.writeFieldBegin("itemRevision", Thrift.Type.STRUCT, 1); - this.itemRevision.write(output); - output.writeFieldEnd(); - } - if (this.tagRevisions !== null && this.tagRevisions !== undefined) { - output.writeFieldBegin("tagRevisions", Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.STRUCT, this.tagRevisions.length); - for (var iter297 in this.tagRevisions) { - if (this.tagRevisions.hasOwnProperty(iter297)) { - iter297 = this.tagRevisions[iter297]; - iter297.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SuggestDictionarySettings = function (args) { - this.revision = null; - this.newRevision = null; - this.dictionaries = null; - this.preloadedDictionaries = null; - if (args) { - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.newRevision !== undefined && args.newRevision !== null) { - this.newRevision = args.newRevision; - } - if (args.dictionaries !== undefined && args.dictionaries !== null) { - this.dictionaries = Thrift.copyList(args.dictionaries, [ttypes.SuggestDictionary]); - } - if (args.preloadedDictionaries !== undefined && args.preloadedDictionaries !== null) { - this.preloadedDictionaries = Thrift.copyList(args.preloadedDictionaries, [null]); - } - } -}; -ttypes.SuggestDictionarySettings.prototype = {}; -ttypes.SuggestDictionarySettings.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.newRevision = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.LIST) { - this.dictionaries = []; - var _rtmp3299 = input.readListBegin(); - var _size298 = _rtmp3299.size || 0; - for (var _i300 = 0; _i300 < _size298; ++_i300) { - var elem301 = null; - elem301 = new ttypes.SuggestDictionary(); - elem301.read(input); - this.dictionaries.push(elem301); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.LIST) { - this.preloadedDictionaries = []; - var _rtmp3303 = input.readListBegin(); - var _size302 = _rtmp3303.size || 0; - for (var _i304 = 0; _i304 < _size302; ++_i304) { - var elem305 = null; - elem305 = input.readString(); - this.preloadedDictionaries.push(elem305); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SuggestDictionarySettings.prototype.write = function (output) { - output.writeStructBegin("SuggestDictionarySettings"); - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 1); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - if (this.newRevision !== null && this.newRevision !== undefined) { - output.writeFieldBegin("newRevision", Thrift.Type.I64, 2); - output.writeI64(this.newRevision); - output.writeFieldEnd(); - } - if (this.dictionaries !== null && this.dictionaries !== undefined) { - output.writeFieldBegin("dictionaries", Thrift.Type.LIST, 3); - output.writeListBegin(Thrift.Type.STRUCT, this.dictionaries.length); - for (var iter306 in this.dictionaries) { - if (this.dictionaries.hasOwnProperty(iter306)) { - iter306 = this.dictionaries[iter306]; - iter306.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.preloadedDictionaries !== null && this.preloadedDictionaries !== undefined) { - output.writeFieldBegin("preloadedDictionaries", Thrift.Type.LIST, 4); - output.writeListBegin(Thrift.Type.STRING, this.preloadedDictionaries.length); - for (var iter307 in this.preloadedDictionaries) { - if (this.preloadedDictionaries.hasOwnProperty(iter307)) { - iter307 = this.preloadedDictionaries[iter307]; - output.writeString(iter307); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.PhoneInfoForChannel = function (args) { - this.mid = null; - this.normalizedPhoneNumber = null; - this.allowedToSearchByPhoneNumber = null; - this.allowedToReceiveMessageFromNonFriend = null; - this.region = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.normalizedPhoneNumber !== undefined && args.normalizedPhoneNumber !== null) { - this.normalizedPhoneNumber = args.normalizedPhoneNumber; - } - if (args.allowedToSearchByPhoneNumber !== undefined && args.allowedToSearchByPhoneNumber !== null) { - this.allowedToSearchByPhoneNumber = args.allowedToSearchByPhoneNumber; - } - if ( - args.allowedToReceiveMessageFromNonFriend !== undefined && - args.allowedToReceiveMessageFromNonFriend !== null - ) { - this.allowedToReceiveMessageFromNonFriend = args.allowedToReceiveMessageFromNonFriend; - } - if (args.region !== undefined && args.region !== null) { - this.region = args.region; - } - } -}; -ttypes.PhoneInfoForChannel.prototype = {}; -ttypes.PhoneInfoForChannel.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.mid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.normalizedPhoneNumber = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.BOOL) { - this.allowedToSearchByPhoneNumber = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.BOOL) { - this.allowedToReceiveMessageFromNonFriend = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.region = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.PhoneInfoForChannel.prototype.write = function (output) { - output.writeStructBegin("PhoneInfoForChannel"); - if (this.mid !== null && this.mid !== undefined) { - output.writeFieldBegin("mid", Thrift.Type.STRING, 1); - output.writeString(this.mid); - output.writeFieldEnd(); - } - if (this.normalizedPhoneNumber !== null && this.normalizedPhoneNumber !== undefined) { - output.writeFieldBegin("normalizedPhoneNumber", Thrift.Type.STRING, 2); - output.writeString(this.normalizedPhoneNumber); - output.writeFieldEnd(); - } - if (this.allowedToSearchByPhoneNumber !== null && this.allowedToSearchByPhoneNumber !== undefined) { - output.writeFieldBegin("allowedToSearchByPhoneNumber", Thrift.Type.BOOL, 3); - output.writeBool(this.allowedToSearchByPhoneNumber); - output.writeFieldEnd(); - } - if (this.allowedToReceiveMessageFromNonFriend !== null && this.allowedToReceiveMessageFromNonFriend !== undefined) { - output.writeFieldBegin("allowedToReceiveMessageFromNonFriend", Thrift.Type.BOOL, 4); - output.writeBool(this.allowedToReceiveMessageFromNonFriend); - output.writeFieldEnd(); - } - if (this.region !== null && this.region !== undefined) { - output.writeFieldBegin("region", Thrift.Type.STRING, 5); - output.writeString(this.region); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.PhoneVerificationResult = function (args) { - this.verificationResult = null; - this.accountMigrationCheckType = null; - this.recommendAddFriends = null; - if (args) { - if (args.verificationResult !== undefined && args.verificationResult !== null) { - this.verificationResult = args.verificationResult; - } - if (args.accountMigrationCheckType !== undefined && args.accountMigrationCheckType !== null) { - this.accountMigrationCheckType = args.accountMigrationCheckType; - } - if (args.recommendAddFriends !== undefined && args.recommendAddFriends !== null) { - this.recommendAddFriends = args.recommendAddFriends; - } - } -}; -ttypes.PhoneVerificationResult.prototype = {}; -ttypes.PhoneVerificationResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.verificationResult = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.accountMigrationCheckType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.BOOL) { - this.recommendAddFriends = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.PhoneVerificationResult.prototype.write = function (output) { - output.writeStructBegin("PhoneVerificationResult"); - if (this.verificationResult !== null && this.verificationResult !== undefined) { - output.writeFieldBegin("verificationResult", Thrift.Type.I32, 1); - output.writeI32(this.verificationResult); - output.writeFieldEnd(); - } - if (this.accountMigrationCheckType !== null && this.accountMigrationCheckType !== undefined) { - output.writeFieldBegin("accountMigrationCheckType", Thrift.Type.I32, 2); - output.writeI32(this.accountMigrationCheckType); - output.writeFieldEnd(); - } - if (this.recommendAddFriends !== null && this.recommendAddFriends !== undefined) { - output.writeFieldBegin("recommendAddFriends", Thrift.Type.BOOL, 3); - output.writeBool(this.recommendAddFriends); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.PlaceSearchInfo = function (args) { - this.name = null; - this.address = null; - this.latitude = null; - this.longitude = null; - if (args) { - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - if (args.address !== undefined && args.address !== null) { - this.address = args.address; - } - if (args.latitude !== undefined && args.latitude !== null) { - this.latitude = args.latitude; - } - if (args.longitude !== undefined && args.longitude !== null) { - this.longitude = args.longitude; - } - } -}; -ttypes.PlaceSearchInfo.prototype = {}; -ttypes.PlaceSearchInfo.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.name = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.address = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.DOUBLE) { - this.latitude = input.readDouble(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.DOUBLE) { - this.longitude = input.readDouble(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.PlaceSearchInfo.prototype.write = function (output) { - output.writeStructBegin("PlaceSearchInfo"); - if (this.name !== null && this.name !== undefined) { - output.writeFieldBegin("name", Thrift.Type.STRING, 1); - output.writeString(this.name); - output.writeFieldEnd(); - } - if (this.address !== null && this.address !== undefined) { - output.writeFieldBegin("address", Thrift.Type.STRING, 2); - output.writeString(this.address); - output.writeFieldEnd(); - } - if (this.latitude !== null && this.latitude !== undefined) { - output.writeFieldBegin("latitude", Thrift.Type.DOUBLE, 3); - output.writeDouble(this.latitude); - output.writeFieldEnd(); - } - if (this.longitude !== null && this.longitude !== undefined) { - output.writeFieldBegin("longitude", Thrift.Type.DOUBLE, 4); - output.writeDouble(this.longitude); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.RSAKey = function (args) { - this.keynm = null; - this.nvalue = null; - this.evalue = null; - this.sessionKey = null; - if (args) { - if (args.keynm !== undefined && args.keynm !== null) { - this.keynm = args.keynm; - } - if (args.nvalue !== undefined && args.nvalue !== null) { - this.nvalue = args.nvalue; - } - if (args.evalue !== undefined && args.evalue !== null) { - this.evalue = args.evalue; - } - if (args.sessionKey !== undefined && args.sessionKey !== null) { - this.sessionKey = args.sessionKey; - } - } -}; -ttypes.RSAKey.prototype = {}; -ttypes.RSAKey.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.keynm = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.nvalue = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.evalue = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.sessionKey = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.RSAKey.prototype.write = function (output) { - output.writeStructBegin("RSAKey"); - if (this.keynm !== null && this.keynm !== undefined) { - output.writeFieldBegin("keynm", Thrift.Type.STRING, 1); - output.writeString(this.keynm); - output.writeFieldEnd(); - } - if (this.nvalue !== null && this.nvalue !== undefined) { - output.writeFieldBegin("nvalue", Thrift.Type.STRING, 2); - output.writeString(this.nvalue); - output.writeFieldEnd(); - } - if (this.evalue !== null && this.evalue !== undefined) { - output.writeFieldBegin("evalue", Thrift.Type.STRING, 3); - output.writeString(this.evalue); - output.writeFieldEnd(); - } - if (this.sessionKey !== null && this.sessionKey !== undefined) { - output.writeFieldBegin("sessionKey", Thrift.Type.STRING, 4); - output.writeString(this.sessionKey); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SecurityCenterResult = function (args) { - this.uri = null; - this.token = null; - this.cookiePath = null; - this.skip = null; - if (args) { - if (args.uri !== undefined && args.uri !== null) { - this.uri = args.uri; - } - if (args.token !== undefined && args.token !== null) { - this.token = args.token; - } - if (args.cookiePath !== undefined && args.cookiePath !== null) { - this.cookiePath = args.cookiePath; - } - if (args.skip !== undefined && args.skip !== null) { - this.skip = args.skip; - } - } -}; -ttypes.SecurityCenterResult.prototype = {}; -ttypes.SecurityCenterResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.uri = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.token = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.cookiePath = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.BOOL) { - this.skip = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SecurityCenterResult.prototype.write = function (output) { - output.writeStructBegin("SecurityCenterResult"); - if (this.uri !== null && this.uri !== undefined) { - output.writeFieldBegin("uri", Thrift.Type.STRING, 1); - output.writeString(this.uri); - output.writeFieldEnd(); - } - if (this.token !== null && this.token !== undefined) { - output.writeFieldBegin("token", Thrift.Type.STRING, 2); - output.writeString(this.token); - output.writeFieldEnd(); - } - if (this.cookiePath !== null && this.cookiePath !== undefined) { - output.writeFieldBegin("cookiePath", Thrift.Type.STRING, 3); - output.writeString(this.cookiePath); - output.writeFieldEnd(); - } - if (this.skip !== null && this.skip !== undefined) { - output.writeFieldBegin("skip", Thrift.Type.BOOL, 4); - output.writeBool(this.skip); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SendBuddyMessageResult = function (args) { - this.requestId = null; - this.state = null; - this.messageId = null; - this.eventNo = null; - this.receiverCount = null; - this.successCount = null; - this.failCount = null; - this.cancelCount = null; - this.blockCount = null; - this.unregisterCount = null; - this.timestamp = null; - this.message = null; - if (args) { - if (args.requestId !== undefined && args.requestId !== null) { - this.requestId = args.requestId; - } - if (args.state !== undefined && args.state !== null) { - this.state = args.state; - } - if (args.messageId !== undefined && args.messageId !== null) { - this.messageId = args.messageId; - } - if (args.eventNo !== undefined && args.eventNo !== null) { - this.eventNo = args.eventNo; - } - if (args.receiverCount !== undefined && args.receiverCount !== null) { - this.receiverCount = args.receiverCount; - } - if (args.successCount !== undefined && args.successCount !== null) { - this.successCount = args.successCount; - } - if (args.failCount !== undefined && args.failCount !== null) { - this.failCount = args.failCount; - } - if (args.cancelCount !== undefined && args.cancelCount !== null) { - this.cancelCount = args.cancelCount; - } - if (args.blockCount !== undefined && args.blockCount !== null) { - this.blockCount = args.blockCount; - } - if (args.unregisterCount !== undefined && args.unregisterCount !== null) { - this.unregisterCount = args.unregisterCount; - } - if (args.timestamp !== undefined && args.timestamp !== null) { - this.timestamp = args.timestamp; - } - if (args.message !== undefined && args.message !== null) { - this.message = args.message; - } - } -}; -ttypes.SendBuddyMessageResult.prototype = {}; -ttypes.SendBuddyMessageResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.requestId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.state = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.messageId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.eventNo = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.I64) { - this.receiverCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.I64) { - this.successCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 13: - if (ftype == Thrift.Type.I64) { - this.failCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 14: - if (ftype == Thrift.Type.I64) { - this.cancelCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 15: - if (ftype == Thrift.Type.I64) { - this.blockCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 16: - if (ftype == Thrift.Type.I64) { - this.unregisterCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 21: - if (ftype == Thrift.Type.I64) { - this.timestamp = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 22: - if (ftype == Thrift.Type.STRING) { - this.message = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SendBuddyMessageResult.prototype.write = function (output) { - output.writeStructBegin("SendBuddyMessageResult"); - if (this.requestId !== null && this.requestId !== undefined) { - output.writeFieldBegin("requestId", Thrift.Type.STRING, 1); - output.writeString(this.requestId); - output.writeFieldEnd(); - } - if (this.state !== null && this.state !== undefined) { - output.writeFieldBegin("state", Thrift.Type.I32, 2); - output.writeI32(this.state); - output.writeFieldEnd(); - } - if (this.messageId !== null && this.messageId !== undefined) { - output.writeFieldBegin("messageId", Thrift.Type.STRING, 3); - output.writeString(this.messageId); - output.writeFieldEnd(); - } - if (this.eventNo !== null && this.eventNo !== undefined) { - output.writeFieldBegin("eventNo", Thrift.Type.I32, 4); - output.writeI32(this.eventNo); - output.writeFieldEnd(); - } - if (this.receiverCount !== null && this.receiverCount !== undefined) { - output.writeFieldBegin("receiverCount", Thrift.Type.I64, 11); - output.writeI64(this.receiverCount); - output.writeFieldEnd(); - } - if (this.successCount !== null && this.successCount !== undefined) { - output.writeFieldBegin("successCount", Thrift.Type.I64, 12); - output.writeI64(this.successCount); - output.writeFieldEnd(); - } - if (this.failCount !== null && this.failCount !== undefined) { - output.writeFieldBegin("failCount", Thrift.Type.I64, 13); - output.writeI64(this.failCount); - output.writeFieldEnd(); - } - if (this.cancelCount !== null && this.cancelCount !== undefined) { - output.writeFieldBegin("cancelCount", Thrift.Type.I64, 14); - output.writeI64(this.cancelCount); - output.writeFieldEnd(); - } - if (this.blockCount !== null && this.blockCount !== undefined) { - output.writeFieldBegin("blockCount", Thrift.Type.I64, 15); - output.writeI64(this.blockCount); - output.writeFieldEnd(); - } - if (this.unregisterCount !== null && this.unregisterCount !== undefined) { - output.writeFieldBegin("unregisterCount", Thrift.Type.I64, 16); - output.writeI64(this.unregisterCount); - output.writeFieldEnd(); - } - if (this.timestamp !== null && this.timestamp !== undefined) { - output.writeFieldBegin("timestamp", Thrift.Type.I64, 21); - output.writeI64(this.timestamp); - output.writeFieldEnd(); - } - if (this.message !== null && this.message !== undefined) { - output.writeFieldBegin("message", Thrift.Type.STRING, 22); - output.writeString(this.message); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SetBuddyOnAirResult = function (args) { - this.requestId = null; - this.state = null; - this.eventNo = null; - this.receiverCount = null; - this.successCount = null; - this.failCount = null; - this.cancelCount = null; - this.unregisterCount = null; - this.timestamp = null; - this.message = null; - if (args) { - if (args.requestId !== undefined && args.requestId !== null) { - this.requestId = args.requestId; - } - if (args.state !== undefined && args.state !== null) { - this.state = args.state; - } - if (args.eventNo !== undefined && args.eventNo !== null) { - this.eventNo = args.eventNo; - } - if (args.receiverCount !== undefined && args.receiverCount !== null) { - this.receiverCount = args.receiverCount; - } - if (args.successCount !== undefined && args.successCount !== null) { - this.successCount = args.successCount; - } - if (args.failCount !== undefined && args.failCount !== null) { - this.failCount = args.failCount; - } - if (args.cancelCount !== undefined && args.cancelCount !== null) { - this.cancelCount = args.cancelCount; - } - if (args.unregisterCount !== undefined && args.unregisterCount !== null) { - this.unregisterCount = args.unregisterCount; - } - if (args.timestamp !== undefined && args.timestamp !== null) { - this.timestamp = args.timestamp; - } - if (args.message !== undefined && args.message !== null) { - this.message = args.message; - } - } -}; -ttypes.SetBuddyOnAirResult.prototype = {}; -ttypes.SetBuddyOnAirResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.requestId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.state = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.eventNo = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.I64) { - this.receiverCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.I64) { - this.successCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 13: - if (ftype == Thrift.Type.I64) { - this.failCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 14: - if (ftype == Thrift.Type.I64) { - this.cancelCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 15: - if (ftype == Thrift.Type.I64) { - this.unregisterCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 21: - if (ftype == Thrift.Type.I64) { - this.timestamp = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 22: - if (ftype == Thrift.Type.STRING) { - this.message = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SetBuddyOnAirResult.prototype.write = function (output) { - output.writeStructBegin("SetBuddyOnAirResult"); - if (this.requestId !== null && this.requestId !== undefined) { - output.writeFieldBegin("requestId", Thrift.Type.STRING, 1); - output.writeString(this.requestId); - output.writeFieldEnd(); - } - if (this.state !== null && this.state !== undefined) { - output.writeFieldBegin("state", Thrift.Type.I32, 2); - output.writeI32(this.state); - output.writeFieldEnd(); - } - if (this.eventNo !== null && this.eventNo !== undefined) { - output.writeFieldBegin("eventNo", Thrift.Type.I32, 3); - output.writeI32(this.eventNo); - output.writeFieldEnd(); - } - if (this.receiverCount !== null && this.receiverCount !== undefined) { - output.writeFieldBegin("receiverCount", Thrift.Type.I64, 11); - output.writeI64(this.receiverCount); - output.writeFieldEnd(); - } - if (this.successCount !== null && this.successCount !== undefined) { - output.writeFieldBegin("successCount", Thrift.Type.I64, 12); - output.writeI64(this.successCount); - output.writeFieldEnd(); - } - if (this.failCount !== null && this.failCount !== undefined) { - output.writeFieldBegin("failCount", Thrift.Type.I64, 13); - output.writeI64(this.failCount); - output.writeFieldEnd(); - } - if (this.cancelCount !== null && this.cancelCount !== undefined) { - output.writeFieldBegin("cancelCount", Thrift.Type.I64, 14); - output.writeI64(this.cancelCount); - output.writeFieldEnd(); - } - if (this.unregisterCount !== null && this.unregisterCount !== undefined) { - output.writeFieldBegin("unregisterCount", Thrift.Type.I64, 15); - output.writeI64(this.unregisterCount); - output.writeFieldEnd(); - } - if (this.timestamp !== null && this.timestamp !== undefined) { - output.writeFieldBegin("timestamp", Thrift.Type.I64, 21); - output.writeI64(this.timestamp); - output.writeFieldEnd(); - } - if (this.message !== null && this.message !== undefined) { - output.writeFieldBegin("message", Thrift.Type.STRING, 22); - output.writeString(this.message); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.Settings = function (args) { - this.notificationEnable = null; - this.notificationMuteExpiration = null; - this.notificationNewMessage = null; - this.notificationGroupInvitation = null; - this.notificationShowMessage = null; - this.notificationIncomingCall = null; - this.notificationSoundMessage = null; - this.notificationSoundGroup = null; - this.notificationDisabledWithSub = null; - this.privacySyncContacts = null; - this.privacySearchByPhoneNumber = null; - this.privacySearchByUserid = null; - this.privacySearchByEmail = null; - this.privacyAllowSecondaryDeviceLogin = null; - this.privacyProfileImagePostToMyhome = null; - this.privacyReceiveMessagesFromNotFriend = null; - this.contactMyTicket = null; - this.identityProvider = null; - this.identityIdentifier = null; - this.snsAccounts = null; - this.phoneRegistration = null; - this.emailConfirmationStatus = null; - this.preferenceLocale = null; - this.customModes = null; - this.e2eeEnable = null; - this.hitokotoBackupRequested = null; - this.privacyProfileMusicPostToMyhome = null; - this.privacyAllowNearby = null; - this.agreementNearbyTime = null; - this.agreementSquareTime = null; - this.notificationMention = null; - this.botUseAgreementAcceptedAt = null; - if (args) { - if (args.notificationEnable !== undefined && args.notificationEnable !== null) { - this.notificationEnable = args.notificationEnable; - } - if (args.notificationMuteExpiration !== undefined && args.notificationMuteExpiration !== null) { - this.notificationMuteExpiration = args.notificationMuteExpiration; - } - if (args.notificationNewMessage !== undefined && args.notificationNewMessage !== null) { - this.notificationNewMessage = args.notificationNewMessage; - } - if (args.notificationGroupInvitation !== undefined && args.notificationGroupInvitation !== null) { - this.notificationGroupInvitation = args.notificationGroupInvitation; - } - if (args.notificationShowMessage !== undefined && args.notificationShowMessage !== null) { - this.notificationShowMessage = args.notificationShowMessage; - } - if (args.notificationIncomingCall !== undefined && args.notificationIncomingCall !== null) { - this.notificationIncomingCall = args.notificationIncomingCall; - } - if (args.notificationSoundMessage !== undefined && args.notificationSoundMessage !== null) { - this.notificationSoundMessage = args.notificationSoundMessage; - } - if (args.notificationSoundGroup !== undefined && args.notificationSoundGroup !== null) { - this.notificationSoundGroup = args.notificationSoundGroup; - } - if (args.notificationDisabledWithSub !== undefined && args.notificationDisabledWithSub !== null) { - this.notificationDisabledWithSub = args.notificationDisabledWithSub; - } - if (args.privacySyncContacts !== undefined && args.privacySyncContacts !== null) { - this.privacySyncContacts = args.privacySyncContacts; - } - if (args.privacySearchByPhoneNumber !== undefined && args.privacySearchByPhoneNumber !== null) { - this.privacySearchByPhoneNumber = args.privacySearchByPhoneNumber; - } - if (args.privacySearchByUserid !== undefined && args.privacySearchByUserid !== null) { - this.privacySearchByUserid = args.privacySearchByUserid; - } - if (args.privacySearchByEmail !== undefined && args.privacySearchByEmail !== null) { - this.privacySearchByEmail = args.privacySearchByEmail; - } - if (args.privacyAllowSecondaryDeviceLogin !== undefined && args.privacyAllowSecondaryDeviceLogin !== null) { - this.privacyAllowSecondaryDeviceLogin = args.privacyAllowSecondaryDeviceLogin; - } - if (args.privacyProfileImagePostToMyhome !== undefined && args.privacyProfileImagePostToMyhome !== null) { - this.privacyProfileImagePostToMyhome = args.privacyProfileImagePostToMyhome; - } - if ( - args.privacyReceiveMessagesFromNotFriend !== undefined && args.privacyReceiveMessagesFromNotFriend !== null - ) { - this.privacyReceiveMessagesFromNotFriend = args.privacyReceiveMessagesFromNotFriend; - } - if (args.contactMyTicket !== undefined && args.contactMyTicket !== null) { - this.contactMyTicket = args.contactMyTicket; - } - if (args.identityProvider !== undefined && args.identityProvider !== null) { - this.identityProvider = args.identityProvider; - } - if (args.identityIdentifier !== undefined && args.identityIdentifier !== null) { - this.identityIdentifier = args.identityIdentifier; - } - if (args.snsAccounts !== undefined && args.snsAccounts !== null) { - this.snsAccounts = Thrift.copyMap(args.snsAccounts, [null]); - } - if (args.phoneRegistration !== undefined && args.phoneRegistration !== null) { - this.phoneRegistration = args.phoneRegistration; - } - if (args.emailConfirmationStatus !== undefined && args.emailConfirmationStatus !== null) { - this.emailConfirmationStatus = args.emailConfirmationStatus; - } - if (args.preferenceLocale !== undefined && args.preferenceLocale !== null) { - this.preferenceLocale = args.preferenceLocale; - } - if (args.customModes !== undefined && args.customModes !== null) { - this.customModes = Thrift.copyMap(args.customModes, [null]); - } - if (args.e2eeEnable !== undefined && args.e2eeEnable !== null) { - this.e2eeEnable = args.e2eeEnable; - } - if (args.hitokotoBackupRequested !== undefined && args.hitokotoBackupRequested !== null) { - this.hitokotoBackupRequested = args.hitokotoBackupRequested; - } - if (args.privacyProfileMusicPostToMyhome !== undefined && args.privacyProfileMusicPostToMyhome !== null) { - this.privacyProfileMusicPostToMyhome = args.privacyProfileMusicPostToMyhome; - } - if (args.privacyAllowNearby !== undefined && args.privacyAllowNearby !== null) { - this.privacyAllowNearby = args.privacyAllowNearby; - } - if (args.agreementNearbyTime !== undefined && args.agreementNearbyTime !== null) { - this.agreementNearbyTime = args.agreementNearbyTime; - } - if (args.agreementSquareTime !== undefined && args.agreementSquareTime !== null) { - this.agreementSquareTime = args.agreementSquareTime; - } - if (args.notificationMention !== undefined && args.notificationMention !== null) { - this.notificationMention = args.notificationMention; - } - if (args.botUseAgreementAcceptedAt !== undefined && args.botUseAgreementAcceptedAt !== null) { - this.botUseAgreementAcceptedAt = args.botUseAgreementAcceptedAt; - } - } -}; -ttypes.Settings.prototype = {}; -ttypes.Settings.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 10: - if (ftype == Thrift.Type.BOOL) { - this.notificationEnable = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.I64) { - this.notificationMuteExpiration = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.BOOL) { - this.notificationNewMessage = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 13: - if (ftype == Thrift.Type.BOOL) { - this.notificationGroupInvitation = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 14: - if (ftype == Thrift.Type.BOOL) { - this.notificationShowMessage = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 15: - if (ftype == Thrift.Type.BOOL) { - this.notificationIncomingCall = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 16: - if (ftype == Thrift.Type.STRING) { - this.notificationSoundMessage = input.readString(); - } else { - input.skip(ftype); - } - break; - case 17: - if (ftype == Thrift.Type.STRING) { - this.notificationSoundGroup = input.readString(); - } else { - input.skip(ftype); - } - break; - case 18: - if (ftype == Thrift.Type.BOOL) { - this.notificationDisabledWithSub = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 20: - if (ftype == Thrift.Type.BOOL) { - this.privacySyncContacts = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 21: - if (ftype == Thrift.Type.BOOL) { - this.privacySearchByPhoneNumber = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 22: - if (ftype == Thrift.Type.BOOL) { - this.privacySearchByUserid = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 23: - if (ftype == Thrift.Type.BOOL) { - this.privacySearchByEmail = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 24: - if (ftype == Thrift.Type.BOOL) { - this.privacyAllowSecondaryDeviceLogin = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 25: - if (ftype == Thrift.Type.BOOL) { - this.privacyProfileImagePostToMyhome = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 26: - if (ftype == Thrift.Type.BOOL) { - this.privacyReceiveMessagesFromNotFriend = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 30: - if (ftype == Thrift.Type.STRING) { - this.contactMyTicket = input.readString(); - } else { - input.skip(ftype); - } - break; - case 40: - if (ftype == Thrift.Type.I32) { - this.identityProvider = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 41: - if (ftype == Thrift.Type.STRING) { - this.identityIdentifier = input.readString(); - } else { - input.skip(ftype); - } - break; - case 42: - if (ftype == Thrift.Type.MAP) { - this.snsAccounts = {}; - var _rtmp3309 = input.readMapBegin(); - var _size308 = _rtmp3309.size || 0; - for (var _i310 = 0; _i310 < _size308; ++_i310) { - var key311 = null; - var val312 = null; - key311 = input.readI32(); - val312 = input.readString(); - this.snsAccounts[key311] = val312; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - case 43: - if (ftype == Thrift.Type.BOOL) { - this.phoneRegistration = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 44: - if (ftype == Thrift.Type.I32) { - this.emailConfirmationStatus = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 50: - if (ftype == Thrift.Type.STRING) { - this.preferenceLocale = input.readString(); - } else { - input.skip(ftype); - } - break; - case 60: - if (ftype == Thrift.Type.MAP) { - this.customModes = {}; - var _rtmp3314 = input.readMapBegin(); - var _size313 = _rtmp3314.size || 0; - for (var _i315 = 0; _i315 < _size313; ++_i315) { - var key316 = null; - var val317 = null; - key316 = input.readI32(); - val317 = input.readString(); - this.customModes[key316] = val317; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - case 61: - if (ftype == Thrift.Type.BOOL) { - this.e2eeEnable = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 62: - if (ftype == Thrift.Type.BOOL) { - this.hitokotoBackupRequested = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 63: - if (ftype == Thrift.Type.BOOL) { - this.privacyProfileMusicPostToMyhome = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 65: - if (ftype == Thrift.Type.BOOL) { - this.privacyAllowNearby = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 66: - if (ftype == Thrift.Type.I64) { - this.agreementNearbyTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 67: - if (ftype == Thrift.Type.I64) { - this.agreementSquareTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 68: - if (ftype == Thrift.Type.BOOL) { - this.notificationMention = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 69: - if (ftype == Thrift.Type.I64) { - this.botUseAgreementAcceptedAt = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.Settings.prototype.write = function (output) { - output.writeStructBegin("Settings"); - if (this.notificationEnable !== null && this.notificationEnable !== undefined) { - output.writeFieldBegin("notificationEnable", Thrift.Type.BOOL, 10); - output.writeBool(this.notificationEnable); - output.writeFieldEnd(); - } - if (this.notificationMuteExpiration !== null && this.notificationMuteExpiration !== undefined) { - output.writeFieldBegin("notificationMuteExpiration", Thrift.Type.I64, 11); - output.writeI64(this.notificationMuteExpiration); - output.writeFieldEnd(); - } - if (this.notificationNewMessage !== null && this.notificationNewMessage !== undefined) { - output.writeFieldBegin("notificationNewMessage", Thrift.Type.BOOL, 12); - output.writeBool(this.notificationNewMessage); - output.writeFieldEnd(); - } - if (this.notificationGroupInvitation !== null && this.notificationGroupInvitation !== undefined) { - output.writeFieldBegin("notificationGroupInvitation", Thrift.Type.BOOL, 13); - output.writeBool(this.notificationGroupInvitation); - output.writeFieldEnd(); - } - if (this.notificationShowMessage !== null && this.notificationShowMessage !== undefined) { - output.writeFieldBegin("notificationShowMessage", Thrift.Type.BOOL, 14); - output.writeBool(this.notificationShowMessage); - output.writeFieldEnd(); - } - if (this.notificationIncomingCall !== null && this.notificationIncomingCall !== undefined) { - output.writeFieldBegin("notificationIncomingCall", Thrift.Type.BOOL, 15); - output.writeBool(this.notificationIncomingCall); - output.writeFieldEnd(); - } - if (this.notificationSoundMessage !== null && this.notificationSoundMessage !== undefined) { - output.writeFieldBegin("notificationSoundMessage", Thrift.Type.STRING, 16); - output.writeString(this.notificationSoundMessage); - output.writeFieldEnd(); - } - if (this.notificationSoundGroup !== null && this.notificationSoundGroup !== undefined) { - output.writeFieldBegin("notificationSoundGroup", Thrift.Type.STRING, 17); - output.writeString(this.notificationSoundGroup); - output.writeFieldEnd(); - } - if (this.notificationDisabledWithSub !== null && this.notificationDisabledWithSub !== undefined) { - output.writeFieldBegin("notificationDisabledWithSub", Thrift.Type.BOOL, 18); - output.writeBool(this.notificationDisabledWithSub); - output.writeFieldEnd(); - } - if (this.privacySyncContacts !== null && this.privacySyncContacts !== undefined) { - output.writeFieldBegin("privacySyncContacts", Thrift.Type.BOOL, 20); - output.writeBool(this.privacySyncContacts); - output.writeFieldEnd(); - } - if (this.privacySearchByPhoneNumber !== null && this.privacySearchByPhoneNumber !== undefined) { - output.writeFieldBegin("privacySearchByPhoneNumber", Thrift.Type.BOOL, 21); - output.writeBool(this.privacySearchByPhoneNumber); - output.writeFieldEnd(); - } - if (this.privacySearchByUserid !== null && this.privacySearchByUserid !== undefined) { - output.writeFieldBegin("privacySearchByUserid", Thrift.Type.BOOL, 22); - output.writeBool(this.privacySearchByUserid); - output.writeFieldEnd(); - } - if (this.privacySearchByEmail !== null && this.privacySearchByEmail !== undefined) { - output.writeFieldBegin("privacySearchByEmail", Thrift.Type.BOOL, 23); - output.writeBool(this.privacySearchByEmail); - output.writeFieldEnd(); - } - if (this.privacyAllowSecondaryDeviceLogin !== null && this.privacyAllowSecondaryDeviceLogin !== undefined) { - output.writeFieldBegin("privacyAllowSecondaryDeviceLogin", Thrift.Type.BOOL, 24); - output.writeBool(this.privacyAllowSecondaryDeviceLogin); - output.writeFieldEnd(); - } - if (this.privacyProfileImagePostToMyhome !== null && this.privacyProfileImagePostToMyhome !== undefined) { - output.writeFieldBegin("privacyProfileImagePostToMyhome", Thrift.Type.BOOL, 25); - output.writeBool(this.privacyProfileImagePostToMyhome); - output.writeFieldEnd(); - } - if (this.privacyReceiveMessagesFromNotFriend !== null && this.privacyReceiveMessagesFromNotFriend !== undefined) { - output.writeFieldBegin("privacyReceiveMessagesFromNotFriend", Thrift.Type.BOOL, 26); - output.writeBool(this.privacyReceiveMessagesFromNotFriend); - output.writeFieldEnd(); - } - if (this.contactMyTicket !== null && this.contactMyTicket !== undefined) { - output.writeFieldBegin("contactMyTicket", Thrift.Type.STRING, 30); - output.writeString(this.contactMyTicket); - output.writeFieldEnd(); - } - if (this.identityProvider !== null && this.identityProvider !== undefined) { - output.writeFieldBegin("identityProvider", Thrift.Type.I32, 40); - output.writeI32(this.identityProvider); - output.writeFieldEnd(); - } - if (this.identityIdentifier !== null && this.identityIdentifier !== undefined) { - output.writeFieldBegin("identityIdentifier", Thrift.Type.STRING, 41); - output.writeString(this.identityIdentifier); - output.writeFieldEnd(); - } - if (this.snsAccounts !== null && this.snsAccounts !== undefined) { - output.writeFieldBegin("snsAccounts", Thrift.Type.MAP, 42); - output.writeMapBegin(Thrift.Type.I32, Thrift.Type.STRING, Thrift.objectLength(this.snsAccounts)); - for (var kiter318 in this.snsAccounts) { - if (this.snsAccounts.hasOwnProperty(kiter318)) { - var viter319 = this.snsAccounts[kiter318]; - output.writeI32(kiter318); - output.writeString(viter319); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - if (this.phoneRegistration !== null && this.phoneRegistration !== undefined) { - output.writeFieldBegin("phoneRegistration", Thrift.Type.BOOL, 43); - output.writeBool(this.phoneRegistration); - output.writeFieldEnd(); - } - if (this.emailConfirmationStatus !== null && this.emailConfirmationStatus !== undefined) { - output.writeFieldBegin("emailConfirmationStatus", Thrift.Type.I32, 44); - output.writeI32(this.emailConfirmationStatus); - output.writeFieldEnd(); - } - if (this.preferenceLocale !== null && this.preferenceLocale !== undefined) { - output.writeFieldBegin("preferenceLocale", Thrift.Type.STRING, 50); - output.writeString(this.preferenceLocale); - output.writeFieldEnd(); - } - if (this.customModes !== null && this.customModes !== undefined) { - output.writeFieldBegin("customModes", Thrift.Type.MAP, 60); - output.writeMapBegin(Thrift.Type.I32, Thrift.Type.STRING, Thrift.objectLength(this.customModes)); - for (var kiter320 in this.customModes) { - if (this.customModes.hasOwnProperty(kiter320)) { - var viter321 = this.customModes[kiter320]; - output.writeI32(kiter320); - output.writeString(viter321); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - if (this.e2eeEnable !== null && this.e2eeEnable !== undefined) { - output.writeFieldBegin("e2eeEnable", Thrift.Type.BOOL, 61); - output.writeBool(this.e2eeEnable); - output.writeFieldEnd(); - } - if (this.hitokotoBackupRequested !== null && this.hitokotoBackupRequested !== undefined) { - output.writeFieldBegin("hitokotoBackupRequested", Thrift.Type.BOOL, 62); - output.writeBool(this.hitokotoBackupRequested); - output.writeFieldEnd(); - } - if (this.privacyProfileMusicPostToMyhome !== null && this.privacyProfileMusicPostToMyhome !== undefined) { - output.writeFieldBegin("privacyProfileMusicPostToMyhome", Thrift.Type.BOOL, 63); - output.writeBool(this.privacyProfileMusicPostToMyhome); - output.writeFieldEnd(); - } - if (this.privacyAllowNearby !== null && this.privacyAllowNearby !== undefined) { - output.writeFieldBegin("privacyAllowNearby", Thrift.Type.BOOL, 65); - output.writeBool(this.privacyAllowNearby); - output.writeFieldEnd(); - } - if (this.agreementNearbyTime !== null && this.agreementNearbyTime !== undefined) { - output.writeFieldBegin("agreementNearbyTime", Thrift.Type.I64, 66); - output.writeI64(this.agreementNearbyTime); - output.writeFieldEnd(); - } - if (this.agreementSquareTime !== null && this.agreementSquareTime !== undefined) { - output.writeFieldBegin("agreementSquareTime", Thrift.Type.I64, 67); - output.writeI64(this.agreementSquareTime); - output.writeFieldEnd(); - } - if (this.notificationMention !== null && this.notificationMention !== undefined) { - output.writeFieldBegin("notificationMention", Thrift.Type.BOOL, 68); - output.writeBool(this.notificationMention); - output.writeFieldEnd(); - } - if (this.botUseAgreementAcceptedAt !== null && this.botUseAgreementAcceptedAt !== undefined) { - output.writeFieldBegin("botUseAgreementAcceptedAt", Thrift.Type.I64, 69); - output.writeI64(this.botUseAgreementAcceptedAt); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SimpleChannelClient = function (args) { - this.applicationType = null; - this.applicationVersion = null; - this.locale = null; - if (args) { - if (args.applicationType !== undefined && args.applicationType !== null) { - this.applicationType = args.applicationType; - } - if (args.applicationVersion !== undefined && args.applicationVersion !== null) { - this.applicationVersion = args.applicationVersion; - } - if (args.locale !== undefined && args.locale !== null) { - this.locale = args.locale; - } - } -}; -ttypes.SimpleChannelClient.prototype = {}; -ttypes.SimpleChannelClient.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.applicationType = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.applicationVersion = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.locale = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SimpleChannelClient.prototype.write = function (output) { - output.writeStructBegin("SimpleChannelClient"); - if (this.applicationType !== null && this.applicationType !== undefined) { - output.writeFieldBegin("applicationType", Thrift.Type.STRING, 1); - output.writeString(this.applicationType); - output.writeFieldEnd(); - } - if (this.applicationVersion !== null && this.applicationVersion !== undefined) { - output.writeFieldBegin("applicationVersion", Thrift.Type.STRING, 2); - output.writeString(this.applicationVersion); - output.writeFieldEnd(); - } - if (this.locale !== null && this.locale !== undefined) { - output.writeFieldBegin("locale", Thrift.Type.STRING, 3); - output.writeString(this.locale); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SimpleChannelContact = function (args) { - this.mid = null; - this.displayName = null; - this.pictureStatus = null; - this.picturePath = null; - this.statusMessage = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.displayName !== undefined && args.displayName !== null) { - this.displayName = args.displayName; - } - if (args.pictureStatus !== undefined && args.pictureStatus !== null) { - this.pictureStatus = args.pictureStatus; - } - if (args.picturePath !== undefined && args.picturePath !== null) { - this.picturePath = args.picturePath; - } - if (args.statusMessage !== undefined && args.statusMessage !== null) { - this.statusMessage = args.statusMessage; - } - } -}; -ttypes.SimpleChannelContact.prototype = {}; -ttypes.SimpleChannelContact.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.mid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.displayName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.pictureStatus = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.picturePath = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.statusMessage = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SimpleChannelContact.prototype.write = function (output) { - output.writeStructBegin("SimpleChannelContact"); - if (this.mid !== null && this.mid !== undefined) { - output.writeFieldBegin("mid", Thrift.Type.STRING, 1); - output.writeString(this.mid); - output.writeFieldEnd(); - } - if (this.displayName !== null && this.displayName !== undefined) { - output.writeFieldBegin("displayName", Thrift.Type.STRING, 2); - output.writeString(this.displayName); - output.writeFieldEnd(); - } - if (this.pictureStatus !== null && this.pictureStatus !== undefined) { - output.writeFieldBegin("pictureStatus", Thrift.Type.STRING, 3); - output.writeString(this.pictureStatus); - output.writeFieldEnd(); - } - if (this.picturePath !== null && this.picturePath !== undefined) { - output.writeFieldBegin("picturePath", Thrift.Type.STRING, 4); - output.writeString(this.picturePath); - output.writeFieldEnd(); - } - if (this.statusMessage !== null && this.statusMessage !== undefined) { - output.writeFieldBegin("statusMessage", Thrift.Type.STRING, 5); - output.writeString(this.statusMessage); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SnsFriend = function (args) { - this.snsUserId = null; - this.snsUserName = null; - this.snsIdType = null; - if (args) { - if (args.snsUserId !== undefined && args.snsUserId !== null) { - this.snsUserId = args.snsUserId; - } - if (args.snsUserName !== undefined && args.snsUserName !== null) { - this.snsUserName = args.snsUserName; - } - if (args.snsIdType !== undefined && args.snsIdType !== null) { - this.snsIdType = args.snsIdType; - } - } -}; -ttypes.SnsFriend.prototype = {}; -ttypes.SnsFriend.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.snsUserId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.snsUserName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.snsIdType = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SnsFriend.prototype.write = function (output) { - output.writeStructBegin("SnsFriend"); - if (this.snsUserId !== null && this.snsUserId !== undefined) { - output.writeFieldBegin("snsUserId", Thrift.Type.STRING, 1); - output.writeString(this.snsUserId); - output.writeFieldEnd(); - } - if (this.snsUserName !== null && this.snsUserName !== undefined) { - output.writeFieldBegin("snsUserName", Thrift.Type.STRING, 2); - output.writeString(this.snsUserName); - output.writeFieldEnd(); - } - if (this.snsIdType !== null && this.snsIdType !== undefined) { - output.writeFieldBegin("snsIdType", Thrift.Type.I32, 3); - output.writeI32(this.snsIdType); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SnsFriendContactRegistration = function (args) { - this.contact = null; - this.snsIdType = null; - this.snsUserId = null; - if (args) { - if (args.contact !== undefined && args.contact !== null) { - this.contact = new ttypes.Contact(args.contact); - } - if (args.snsIdType !== undefined && args.snsIdType !== null) { - this.snsIdType = args.snsIdType; - } - if (args.snsUserId !== undefined && args.snsUserId !== null) { - this.snsUserId = args.snsUserId; - } - } -}; -ttypes.SnsFriendContactRegistration.prototype = {}; -ttypes.SnsFriendContactRegistration.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.contact = new ttypes.Contact(); - this.contact.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.snsIdType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.snsUserId = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SnsFriendContactRegistration.prototype.write = function (output) { - output.writeStructBegin("SnsFriendContactRegistration"); - if (this.contact !== null && this.contact !== undefined) { - output.writeFieldBegin("contact", Thrift.Type.STRUCT, 1); - this.contact.write(output); - output.writeFieldEnd(); - } - if (this.snsIdType !== null && this.snsIdType !== undefined) { - output.writeFieldBegin("snsIdType", Thrift.Type.I32, 2); - output.writeI32(this.snsIdType); - output.writeFieldEnd(); - } - if (this.snsUserId !== null && this.snsUserId !== undefined) { - output.writeFieldBegin("snsUserId", Thrift.Type.STRING, 3); - output.writeString(this.snsUserId); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SnsFriendModification = function (args) { - this.type = null; - this.snsFriend = null; - if (args) { - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.snsFriend !== undefined && args.snsFriend !== null) { - this.snsFriend = new ttypes.SnsFriend(args.snsFriend); - } - } -}; -ttypes.SnsFriendModification.prototype = {}; -ttypes.SnsFriendModification.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.type = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.snsFriend = new ttypes.SnsFriend(); - this.snsFriend.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SnsFriendModification.prototype.write = function (output) { - output.writeStructBegin("SnsFriendModification"); - if (this.type !== null && this.type !== undefined) { - output.writeFieldBegin("type", Thrift.Type.I32, 1); - output.writeI32(this.type); - output.writeFieldEnd(); - } - if (this.snsFriend !== null && this.snsFriend !== undefined) { - output.writeFieldBegin("snsFriend", Thrift.Type.STRUCT, 2); - this.snsFriend.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SnsFriends = function (args) { - this.snsFriends = null; - this.hasMore = null; - if (args) { - if (args.snsFriends !== undefined && args.snsFriends !== null) { - this.snsFriends = Thrift.copyList(args.snsFriends, [ttypes.SnsFriend]); - } - if (args.hasMore !== undefined && args.hasMore !== null) { - this.hasMore = args.hasMore; - } - } -}; -ttypes.SnsFriends.prototype = {}; -ttypes.SnsFriends.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.snsFriends = []; - var _rtmp3323 = input.readListBegin(); - var _size322 = _rtmp3323.size || 0; - for (var _i324 = 0; _i324 < _size322; ++_i324) { - var elem325 = null; - elem325 = new ttypes.SnsFriend(); - elem325.read(input); - this.snsFriends.push(elem325); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.BOOL) { - this.hasMore = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SnsFriends.prototype.write = function (output) { - output.writeStructBegin("SnsFriends"); - if (this.snsFriends !== null && this.snsFriends !== undefined) { - output.writeFieldBegin("snsFriends", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.snsFriends.length); - for (var iter326 in this.snsFriends) { - if (this.snsFriends.hasOwnProperty(iter326)) { - iter326 = this.snsFriends[iter326]; - iter326.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.hasMore !== null && this.hasMore !== undefined) { - output.writeFieldBegin("hasMore", Thrift.Type.BOOL, 2); - output.writeBool(this.hasMore); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SnsIdUserStatus = function (args) { - this.userExisting = null; - this.phoneNumberRegistered = null; - this.sameDevice = null; - if (args) { - if (args.userExisting !== undefined && args.userExisting !== null) { - this.userExisting = args.userExisting; - } - if (args.phoneNumberRegistered !== undefined && args.phoneNumberRegistered !== null) { - this.phoneNumberRegistered = args.phoneNumberRegistered; - } - if (args.sameDevice !== undefined && args.sameDevice !== null) { - this.sameDevice = args.sameDevice; - } - } -}; -ttypes.SnsIdUserStatus.prototype = {}; -ttypes.SnsIdUserStatus.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.BOOL) { - this.userExisting = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.BOOL) { - this.phoneNumberRegistered = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.BOOL) { - this.sameDevice = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SnsIdUserStatus.prototype.write = function (output) { - output.writeStructBegin("SnsIdUserStatus"); - if (this.userExisting !== null && this.userExisting !== undefined) { - output.writeFieldBegin("userExisting", Thrift.Type.BOOL, 1); - output.writeBool(this.userExisting); - output.writeFieldEnd(); - } - if (this.phoneNumberRegistered !== null && this.phoneNumberRegistered !== undefined) { - output.writeFieldBegin("phoneNumberRegistered", Thrift.Type.BOOL, 2); - output.writeBool(this.phoneNumberRegistered); - output.writeFieldEnd(); - } - if (this.sameDevice !== null && this.sameDevice !== undefined) { - output.writeFieldBegin("sameDevice", Thrift.Type.BOOL, 3); - output.writeBool(this.sameDevice); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SnsProfile = function (args) { - this.snsUserId = null; - this.snsUserName = null; - this.email = null; - this.thumbnailUrl = null; - if (args) { - if (args.snsUserId !== undefined && args.snsUserId !== null) { - this.snsUserId = args.snsUserId; - } - if (args.snsUserName !== undefined && args.snsUserName !== null) { - this.snsUserName = args.snsUserName; - } - if (args.email !== undefined && args.email !== null) { - this.email = args.email; - } - if (args.thumbnailUrl !== undefined && args.thumbnailUrl !== null) { - this.thumbnailUrl = args.thumbnailUrl; - } - } -}; -ttypes.SnsProfile.prototype = {}; -ttypes.SnsProfile.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.snsUserId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.snsUserName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.email = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.thumbnailUrl = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SnsProfile.prototype.write = function (output) { - output.writeStructBegin("SnsProfile"); - if (this.snsUserId !== null && this.snsUserId !== undefined) { - output.writeFieldBegin("snsUserId", Thrift.Type.STRING, 1); - output.writeString(this.snsUserId); - output.writeFieldEnd(); - } - if (this.snsUserName !== null && this.snsUserName !== undefined) { - output.writeFieldBegin("snsUserName", Thrift.Type.STRING, 2); - output.writeString(this.snsUserName); - output.writeFieldEnd(); - } - if (this.email !== null && this.email !== undefined) { - output.writeFieldBegin("email", Thrift.Type.STRING, 3); - output.writeString(this.email); - output.writeFieldEnd(); - } - if (this.thumbnailUrl !== null && this.thumbnailUrl !== undefined) { - output.writeFieldBegin("thumbnailUrl", Thrift.Type.STRING, 4); - output.writeString(this.thumbnailUrl); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SystemConfiguration = function (args) { - this.endpoint = null; - this.endpointSsl = null; - this.updateUrl = null; - this.c2dmAccount = null; - this.nniServer = null; - if (args) { - if (args.endpoint !== undefined && args.endpoint !== null) { - this.endpoint = args.endpoint; - } - if (args.endpointSsl !== undefined && args.endpointSsl !== null) { - this.endpointSsl = args.endpointSsl; - } - if (args.updateUrl !== undefined && args.updateUrl !== null) { - this.updateUrl = args.updateUrl; - } - if (args.c2dmAccount !== undefined && args.c2dmAccount !== null) { - this.c2dmAccount = args.c2dmAccount; - } - if (args.nniServer !== undefined && args.nniServer !== null) { - this.nniServer = args.nniServer; - } - } -}; -ttypes.SystemConfiguration.prototype = {}; -ttypes.SystemConfiguration.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.endpoint = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.endpointSsl = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.updateUrl = input.readString(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.STRING) { - this.c2dmAccount = input.readString(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.STRING) { - this.nniServer = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SystemConfiguration.prototype.write = function (output) { - output.writeStructBegin("SystemConfiguration"); - if (this.endpoint !== null && this.endpoint !== undefined) { - output.writeFieldBegin("endpoint", Thrift.Type.STRING, 1); - output.writeString(this.endpoint); - output.writeFieldEnd(); - } - if (this.endpointSsl !== null && this.endpointSsl !== undefined) { - output.writeFieldBegin("endpointSsl", Thrift.Type.STRING, 2); - output.writeString(this.endpointSsl); - output.writeFieldEnd(); - } - if (this.updateUrl !== null && this.updateUrl !== undefined) { - output.writeFieldBegin("updateUrl", Thrift.Type.STRING, 3); - output.writeString(this.updateUrl); - output.writeFieldEnd(); - } - if (this.c2dmAccount !== null && this.c2dmAccount !== undefined) { - output.writeFieldBegin("c2dmAccount", Thrift.Type.STRING, 11); - output.writeString(this.c2dmAccount); - output.writeFieldEnd(); - } - if (this.nniServer !== null && this.nniServer !== undefined) { - output.writeFieldBegin("nniServer", Thrift.Type.STRING, 12); - output.writeString(this.nniServer); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.Ticket = function (args) { - this.id = null; - this.expirationTime = null; - this.maxUseCount = null; - if (args) { - if (args.id !== undefined && args.id !== null) { - this.id = args.id; - } - if (args.expirationTime !== undefined && args.expirationTime !== null) { - this.expirationTime = args.expirationTime; - } - if (args.maxUseCount !== undefined && args.maxUseCount !== null) { - this.maxUseCount = args.maxUseCount; - } - } -}; -ttypes.Ticket.prototype = {}; -ttypes.Ticket.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.id = input.readString(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.I64) { - this.expirationTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 21: - if (ftype == Thrift.Type.I32) { - this.maxUseCount = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.Ticket.prototype.write = function (output) { - output.writeStructBegin("Ticket"); - if (this.id !== null && this.id !== undefined) { - output.writeFieldBegin("id", Thrift.Type.STRING, 1); - output.writeString(this.id); - output.writeFieldEnd(); - } - if (this.expirationTime !== null && this.expirationTime !== undefined) { - output.writeFieldBegin("expirationTime", Thrift.Type.I64, 10); - output.writeI64(this.expirationTime); - output.writeFieldEnd(); - } - if (this.maxUseCount !== null && this.maxUseCount !== undefined) { - output.writeFieldBegin("maxUseCount", Thrift.Type.I32, 21); - output.writeI32(this.maxUseCount); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.TMessageBox = function (args) { - this.id = null; - this.channelId = null; - this.lastSeq = null; - this.unreadCount = null; - this.lastModifiedTime = null; - this.status = null; - this.midType = null; - this.lastMessages = null; - if (args) { - if (args.id !== undefined && args.id !== null) { - this.id = args.id; - } - if (args.channelId !== undefined && args.channelId !== null) { - this.channelId = args.channelId; - } - if (args.lastSeq !== undefined && args.lastSeq !== null) { - this.lastSeq = args.lastSeq; - } - if (args.unreadCount !== undefined && args.unreadCount !== null) { - this.unreadCount = args.unreadCount; - } - if (args.lastModifiedTime !== undefined && args.lastModifiedTime !== null) { - this.lastModifiedTime = args.lastModifiedTime; - } - if (args.status !== undefined && args.status !== null) { - this.status = args.status; - } - if (args.midType !== undefined && args.midType !== null) { - this.midType = args.midType; - } - if (args.lastMessages !== undefined && args.lastMessages !== null) { - this.lastMessages = Thrift.copyList(args.lastMessages, [ttypes.Message]); - } - } -}; -ttypes.TMessageBox.prototype = {}; -ttypes.TMessageBox.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.id = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.channelId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I64) { - this.lastSeq = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.I64) { - this.unreadCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.I64) { - this.lastModifiedTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 8: - if (ftype == Thrift.Type.I32) { - this.status = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 9: - if (ftype == Thrift.Type.I32) { - this.midType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.LIST) { - this.lastMessages = []; - var _rtmp3328 = input.readListBegin(); - var _size327 = _rtmp3328.size || 0; - for (var _i329 = 0; _i329 < _size327; ++_i329) { - var elem330 = null; - elem330 = new ttypes.Message(); - elem330.read(input); - this.lastMessages.push(elem330); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.TMessageBox.prototype.write = function (output) { - output.writeStructBegin("TMessageBox"); - if (this.id !== null && this.id !== undefined) { - output.writeFieldBegin("id", Thrift.Type.STRING, 1); - output.writeString(this.id); - output.writeFieldEnd(); - } - if (this.channelId !== null && this.channelId !== undefined) { - output.writeFieldBegin("channelId", Thrift.Type.STRING, 2); - output.writeString(this.channelId); - output.writeFieldEnd(); - } - if (this.lastSeq !== null && this.lastSeq !== undefined) { - output.writeFieldBegin("lastSeq", Thrift.Type.I64, 5); - output.writeI64(this.lastSeq); - output.writeFieldEnd(); - } - if (this.unreadCount !== null && this.unreadCount !== undefined) { - output.writeFieldBegin("unreadCount", Thrift.Type.I64, 6); - output.writeI64(this.unreadCount); - output.writeFieldEnd(); - } - if (this.lastModifiedTime !== null && this.lastModifiedTime !== undefined) { - output.writeFieldBegin("lastModifiedTime", Thrift.Type.I64, 7); - output.writeI64(this.lastModifiedTime); - output.writeFieldEnd(); - } - if (this.status !== null && this.status !== undefined) { - output.writeFieldBegin("status", Thrift.Type.I32, 8); - output.writeI32(this.status); - output.writeFieldEnd(); - } - if (this.midType !== null && this.midType !== undefined) { - output.writeFieldBegin("midType", Thrift.Type.I32, 9); - output.writeI32(this.midType); - output.writeFieldEnd(); - } - if (this.lastMessages !== null && this.lastMessages !== undefined) { - output.writeFieldBegin("lastMessages", Thrift.Type.LIST, 10); - output.writeListBegin(Thrift.Type.STRUCT, this.lastMessages.length); - for (var iter331 in this.lastMessages) { - if (this.lastMessages.hasOwnProperty(iter331)) { - iter331 = this.lastMessages[iter331]; - iter331.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.TMessageBoxWrapUp = function (args) { - this.messageBox = null; - this.name = null; - this.contacts = null; - this.pictureRevision = null; - if (args) { - if (args.messageBox !== undefined && args.messageBox !== null) { - this.messageBox = new ttypes.TMessageBox(args.messageBox); - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - if (args.contacts !== undefined && args.contacts !== null) { - this.contacts = Thrift.copyList(args.contacts, [ttypes.Contact]); - } - if (args.pictureRevision !== undefined && args.pictureRevision !== null) { - this.pictureRevision = args.pictureRevision; - } - } -}; -ttypes.TMessageBoxWrapUp.prototype = {}; -ttypes.TMessageBoxWrapUp.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.messageBox = new ttypes.TMessageBox(); - this.messageBox.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.name = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.LIST) { - this.contacts = []; - var _rtmp3333 = input.readListBegin(); - var _size332 = _rtmp3333.size || 0; - for (var _i334 = 0; _i334 < _size332; ++_i334) { - var elem335 = null; - elem335 = new ttypes.Contact(); - elem335.read(input); - this.contacts.push(elem335); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.pictureRevision = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.TMessageBoxWrapUp.prototype.write = function (output) { - output.writeStructBegin("TMessageBoxWrapUp"); - if (this.messageBox !== null && this.messageBox !== undefined) { - output.writeFieldBegin("messageBox", Thrift.Type.STRUCT, 1); - this.messageBox.write(output); - output.writeFieldEnd(); - } - if (this.name !== null && this.name !== undefined) { - output.writeFieldBegin("name", Thrift.Type.STRING, 2); - output.writeString(this.name); - output.writeFieldEnd(); - } - if (this.contacts !== null && this.contacts !== undefined) { - output.writeFieldBegin("contacts", Thrift.Type.LIST, 3); - output.writeListBegin(Thrift.Type.STRUCT, this.contacts.length); - for (var iter336 in this.contacts) { - if (this.contacts.hasOwnProperty(iter336)) { - iter336 = this.contacts[iter336]; - iter336.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.pictureRevision !== null && this.pictureRevision !== undefined) { - output.writeFieldBegin("pictureRevision", Thrift.Type.STRING, 4); - output.writeString(this.pictureRevision); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.TMessageBoxWrapUpResponse = function (args) { - this.messageBoxWrapUpList = null; - this.totalSize = null; - if (args) { - if (args.messageBoxWrapUpList !== undefined && args.messageBoxWrapUpList !== null) { - this.messageBoxWrapUpList = Thrift.copyList(args.messageBoxWrapUpList, [ttypes.TMessageBoxWrapUp]); - } - if (args.totalSize !== undefined && args.totalSize !== null) { - this.totalSize = args.totalSize; - } - } -}; -ttypes.TMessageBoxWrapUpResponse.prototype = {}; -ttypes.TMessageBoxWrapUpResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.messageBoxWrapUpList = []; - var _rtmp3338 = input.readListBegin(); - var _size337 = _rtmp3338.size || 0; - for (var _i339 = 0; _i339 < _size337; ++_i339) { - var elem340 = null; - elem340 = new ttypes.TMessageBoxWrapUp(); - elem340.read(input); - this.messageBoxWrapUpList.push(elem340); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.totalSize = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.TMessageBoxWrapUpResponse.prototype.write = function (output) { - output.writeStructBegin("TMessageBoxWrapUpResponse"); - if (this.messageBoxWrapUpList !== null && this.messageBoxWrapUpList !== undefined) { - output.writeFieldBegin("messageBoxWrapUpList", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.messageBoxWrapUpList.length); - for (var iter341 in this.messageBoxWrapUpList) { - if (this.messageBoxWrapUpList.hasOwnProperty(iter341)) { - iter341 = this.messageBoxWrapUpList[iter341]; - iter341.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.totalSize !== null && this.totalSize !== undefined) { - output.writeFieldBegin("totalSize", Thrift.Type.I32, 2); - output.writeI32(this.totalSize); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.TMessageReadRangeEntry = function (args) { - this.startMessageId = null; - this.endMessageId = null; - this.startTime = null; - this.endTime = null; - if (args) { - if (args.startMessageId !== undefined && args.startMessageId !== null) { - this.startMessageId = args.startMessageId; - } - if (args.endMessageId !== undefined && args.endMessageId !== null) { - this.endMessageId = args.endMessageId; - } - if (args.startTime !== undefined && args.startTime !== null) { - this.startTime = args.startTime; - } - if (args.endTime !== undefined && args.endTime !== null) { - this.endTime = args.endTime; - } - } -}; -ttypes.TMessageReadRangeEntry.prototype = {}; -ttypes.TMessageReadRangeEntry.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.startMessageId = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.endMessageId = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I64) { - this.startTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I64) { - this.endTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.TMessageReadRangeEntry.prototype.write = function (output) { - output.writeStructBegin("TMessageReadRangeEntry"); - if (this.startMessageId !== null && this.startMessageId !== undefined) { - output.writeFieldBegin("startMessageId", Thrift.Type.I64, 1); - output.writeI64(this.startMessageId); - output.writeFieldEnd(); - } - if (this.endMessageId !== null && this.endMessageId !== undefined) { - output.writeFieldBegin("endMessageId", Thrift.Type.I64, 2); - output.writeI64(this.endMessageId); - output.writeFieldEnd(); - } - if (this.startTime !== null && this.startTime !== undefined) { - output.writeFieldBegin("startTime", Thrift.Type.I64, 3); - output.writeI64(this.startTime); - output.writeFieldEnd(); - } - if (this.endTime !== null && this.endTime !== undefined) { - output.writeFieldBegin("endTime", Thrift.Type.I64, 4); - output.writeI64(this.endTime); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.TMessageReadRange = function (args) { - this.chatId = null; - this.ranges = null; - if (args) { - if (args.chatId !== undefined && args.chatId !== null) { - this.chatId = args.chatId; - } - if (args.ranges !== undefined && args.ranges !== null) { - this.ranges = Thrift.copyMap(args.ranges, [Thrift.copyList, ttypes.TMessageReadRangeEntry]); - } - } -}; -ttypes.TMessageReadRange.prototype = {}; -ttypes.TMessageReadRange.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.chatId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.MAP) { - this.ranges = {}; - var _rtmp3343 = input.readMapBegin(); - var _size342 = _rtmp3343.size || 0; - for (var _i344 = 0; _i344 < _size342; ++_i344) { - var key345 = null; - var val346 = null; - key345 = input.readString(); - val346 = []; - var _rtmp3348 = input.readListBegin(); - var _size347 = _rtmp3348.size || 0; - for (var _i349 = 0; _i349 < _size347; ++_i349) { - var elem350 = null; - elem350 = new ttypes.TMessageReadRangeEntry(); - elem350.read(input); - val346.push(elem350); - } - input.readListEnd(); - this.ranges[key345] = val346; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.TMessageReadRange.prototype.write = function (output) { - output.writeStructBegin("TMessageReadRange"); - if (this.chatId !== null && this.chatId !== undefined) { - output.writeFieldBegin("chatId", Thrift.Type.STRING, 1); - output.writeString(this.chatId); - output.writeFieldEnd(); - } - if (this.ranges !== null && this.ranges !== undefined) { - output.writeFieldBegin("ranges", Thrift.Type.MAP, 2); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.LIST, Thrift.objectLength(this.ranges)); - for (var kiter351 in this.ranges) { - if (this.ranges.hasOwnProperty(kiter351)) { - var viter352 = this.ranges[kiter351]; - output.writeString(kiter351); - output.writeListBegin(Thrift.Type.STRUCT, viter352.length); - for (var iter353 in viter352) { - if (viter352.hasOwnProperty(iter353)) { - iter353 = viter352[iter353]; - iter353.write(output); - } - } - output.writeListEnd(); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ChatRoomAnnouncementContents = function (args) { - this.displayFields = null; - this.text = null; - this.link = null; - this.thumbnail = null; - if (args) { - if (args.displayFields !== undefined && args.displayFields !== null) { - this.displayFields = args.displayFields; - } - if (args.text !== undefined && args.text !== null) { - this.text = args.text; - } - if (args.link !== undefined && args.link !== null) { - this.link = args.link; - } - if (args.thumbnail !== undefined && args.thumbnail !== null) { - this.thumbnail = args.thumbnail; - } - } -}; -ttypes.ChatRoomAnnouncementContents.prototype = {}; -ttypes.ChatRoomAnnouncementContents.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.displayFields = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.text = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.link = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.thumbnail = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ChatRoomAnnouncementContents.prototype.write = function (output) { - output.writeStructBegin("ChatRoomAnnouncementContents"); - if (this.displayFields !== null && this.displayFields !== undefined) { - output.writeFieldBegin("displayFields", Thrift.Type.I32, 1); - output.writeI32(this.displayFields); - output.writeFieldEnd(); - } - if (this.text !== null && this.text !== undefined) { - output.writeFieldBegin("text", Thrift.Type.STRING, 2); - output.writeString(this.text); - output.writeFieldEnd(); - } - if (this.link !== null && this.link !== undefined) { - output.writeFieldBegin("link", Thrift.Type.STRING, 3); - output.writeString(this.link); - output.writeFieldEnd(); - } - if (this.thumbnail !== null && this.thumbnail !== undefined) { - output.writeFieldBegin("thumbnail", Thrift.Type.STRING, 4); - output.writeString(this.thumbnail); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ChatRoomAnnouncement = function (args) { - this.announcementSeq = null; - this.type = null; - this.contents = null; - this.creatorMid = null; - this.createdTime = null; - if (args) { - if (args.announcementSeq !== undefined && args.announcementSeq !== null) { - this.announcementSeq = args.announcementSeq; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.contents !== undefined && args.contents !== null) { - this.contents = new ttypes.ChatRoomAnnouncementContents(args.contents); - } - if (args.creatorMid !== undefined && args.creatorMid !== null) { - this.creatorMid = args.creatorMid; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - } -}; -ttypes.ChatRoomAnnouncement.prototype = {}; -ttypes.ChatRoomAnnouncement.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.announcementSeq = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.type = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.contents = new ttypes.ChatRoomAnnouncementContents(); - this.contents.read(input); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.creatorMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I64) { - this.createdTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ChatRoomAnnouncement.prototype.write = function (output) { - output.writeStructBegin("ChatRoomAnnouncement"); - if (this.announcementSeq !== null && this.announcementSeq !== undefined) { - output.writeFieldBegin("announcementSeq", Thrift.Type.I64, 1); - output.writeI64(this.announcementSeq); - output.writeFieldEnd(); - } - if (this.type !== null && this.type !== undefined) { - output.writeFieldBegin("type", Thrift.Type.I32, 2); - output.writeI32(this.type); - output.writeFieldEnd(); - } - if (this.contents !== null && this.contents !== undefined) { - output.writeFieldBegin("contents", Thrift.Type.STRUCT, 3); - this.contents.write(output); - output.writeFieldEnd(); - } - if (this.creatorMid !== null && this.creatorMid !== undefined) { - output.writeFieldBegin("creatorMid", Thrift.Type.STRING, 4); - output.writeString(this.creatorMid); - output.writeFieldEnd(); - } - if (this.createdTime !== null && this.createdTime !== undefined) { - output.writeFieldBegin("createdTime", Thrift.Type.I64, 5); - output.writeI64(this.createdTime); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ErrorExtraInfo = function (args) { - this.preconditionFailedExtraInfo = null; - if (args) { - if (args.preconditionFailedExtraInfo !== undefined && args.preconditionFailedExtraInfo !== null) { - this.preconditionFailedExtraInfo = args.preconditionFailedExtraInfo; - } - } -}; -ttypes.ErrorExtraInfo.prototype = {}; -ttypes.ErrorExtraInfo.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.preconditionFailedExtraInfo = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ErrorExtraInfo.prototype.write = function (output) { - output.writeStructBegin("ErrorExtraInfo"); - if (this.preconditionFailedExtraInfo !== null && this.preconditionFailedExtraInfo !== undefined) { - output.writeFieldBegin("preconditionFailedExtraInfo", Thrift.Type.I32, 1); - output.writeI32(this.preconditionFailedExtraInfo); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SyncRelations = function (args) { - this.syncAll = null; - this.syncParamContact = null; - this.syncParamMid = null; - if (args) { - if (args.syncAll !== undefined && args.syncAll !== null) { - this.syncAll = args.syncAll; - } - if (args.syncParamContact !== undefined && args.syncParamContact !== null) { - this.syncParamContact = Thrift.copyList(args.syncParamContact, [ttypes.SyncParamContact]); - } - if (args.syncParamMid !== undefined && args.syncParamMid !== null) { - this.syncParamMid = Thrift.copyList(args.syncParamMid, [ttypes.SyncParamMid]); - } - } -}; -ttypes.SyncRelations.prototype = {}; -ttypes.SyncRelations.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.BOOL) { - this.syncAll = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.LIST) { - this.syncParamContact = []; - var _rtmp3355 = input.readListBegin(); - var _size354 = _rtmp3355.size || 0; - for (var _i356 = 0; _i356 < _size354; ++_i356) { - var elem357 = null; - elem357 = new ttypes.SyncParamContact(); - elem357.read(input); - this.syncParamContact.push(elem357); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.LIST) { - this.syncParamMid = []; - var _rtmp3359 = input.readListBegin(); - var _size358 = _rtmp3359.size || 0; - for (var _i360 = 0; _i360 < _size358; ++_i360) { - var elem361 = null; - elem361 = new ttypes.SyncParamMid(); - elem361.read(input); - this.syncParamMid.push(elem361); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SyncRelations.prototype.write = function (output) { - output.writeStructBegin("SyncRelations"); - if (this.syncAll !== null && this.syncAll !== undefined) { - output.writeFieldBegin("syncAll", Thrift.Type.BOOL, 1); - output.writeBool(this.syncAll); - output.writeFieldEnd(); - } - if (this.syncParamContact !== null && this.syncParamContact !== undefined) { - output.writeFieldBegin("syncParamContact", Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.STRUCT, this.syncParamContact.length); - for (var iter362 in this.syncParamContact) { - if (this.syncParamContact.hasOwnProperty(iter362)) { - iter362 = this.syncParamContact[iter362]; - iter362.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.syncParamMid !== null && this.syncParamMid !== undefined) { - output.writeFieldBegin("syncParamMid", Thrift.Type.LIST, 3); - output.writeListBegin(Thrift.Type.STRUCT, this.syncParamMid.length); - for (var iter363 in this.syncParamMid) { - if (this.syncParamMid.hasOwnProperty(iter363)) { - iter363 = this.syncParamMid[iter363]; - iter363.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SyncScope = function (args) { - this.syncProfile = null; - this.syncSettings = null; - this.syncSticker = null; - this.syncThemeShop = null; - this.contact = null; - this.group = null; - this.room = null; - this.chat = null; - if (args) { - if (args.syncProfile !== undefined && args.syncProfile !== null) { - this.syncProfile = args.syncProfile; - } - if (args.syncSettings !== undefined && args.syncSettings !== null) { - this.syncSettings = args.syncSettings; - } - if (args.syncSticker !== undefined && args.syncSticker !== null) { - this.syncSticker = args.syncSticker; - } - if (args.syncThemeShop !== undefined && args.syncThemeShop !== null) { - this.syncThemeShop = args.syncThemeShop; - } - if (args.contact !== undefined && args.contact !== null) { - this.contact = new ttypes.SyncRelations(args.contact); - } - if (args.group !== undefined && args.group !== null) { - this.group = new ttypes.SyncRelations(args.group); - } - if (args.room !== undefined && args.room !== null) { - this.room = new ttypes.SyncRelations(args.room); - } - if (args.chat !== undefined && args.chat !== null) { - this.chat = new ttypes.SyncRelations(args.chat); - } - } -}; -ttypes.SyncScope.prototype = {}; -ttypes.SyncScope.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.BOOL) { - this.syncProfile = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.BOOL) { - this.syncSettings = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.BOOL) { - this.syncSticker = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.BOOL) { - this.syncThemeShop = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.STRUCT) { - this.contact = new ttypes.SyncRelations(); - this.contact.read(input); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.STRUCT) { - this.group = new ttypes.SyncRelations(); - this.group.read(input); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.STRUCT) { - this.room = new ttypes.SyncRelations(); - this.room.read(input); - } else { - input.skip(ftype); - } - break; - case 13: - if (ftype == Thrift.Type.STRUCT) { - this.chat = new ttypes.SyncRelations(); - this.chat.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SyncScope.prototype.write = function (output) { - output.writeStructBegin("SyncScope"); - if (this.syncProfile !== null && this.syncProfile !== undefined) { - output.writeFieldBegin("syncProfile", Thrift.Type.BOOL, 1); - output.writeBool(this.syncProfile); - output.writeFieldEnd(); - } - if (this.syncSettings !== null && this.syncSettings !== undefined) { - output.writeFieldBegin("syncSettings", Thrift.Type.BOOL, 2); - output.writeBool(this.syncSettings); - output.writeFieldEnd(); - } - if (this.syncSticker !== null && this.syncSticker !== undefined) { - output.writeFieldBegin("syncSticker", Thrift.Type.BOOL, 3); - output.writeBool(this.syncSticker); - output.writeFieldEnd(); - } - if (this.syncThemeShop !== null && this.syncThemeShop !== undefined) { - output.writeFieldBegin("syncThemeShop", Thrift.Type.BOOL, 4); - output.writeBool(this.syncThemeShop); - output.writeFieldEnd(); - } - if (this.contact !== null && this.contact !== undefined) { - output.writeFieldBegin("contact", Thrift.Type.STRUCT, 10); - this.contact.write(output); - output.writeFieldEnd(); - } - if (this.group !== null && this.group !== undefined) { - output.writeFieldBegin("group", Thrift.Type.STRUCT, 11); - this.group.write(output); - output.writeFieldEnd(); - } - if (this.room !== null && this.room !== undefined) { - output.writeFieldBegin("room", Thrift.Type.STRUCT, 12); - this.room.write(output); - output.writeFieldEnd(); - } - if (this.chat !== null && this.chat !== undefined) { - output.writeFieldBegin("chat", Thrift.Type.STRUCT, 13); - this.chat.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.JoinSquareResponse = function (args) { - this.square = null; - this.squareAuthority = null; - this.squareStatus = null; - this.squareMember = null; - this.squareFeatureSet = null; - this.noteStatus = null; - if (args) { - if (args.square !== undefined && args.square !== null) { - this.square = new ttypes.Square(args.square); - } - if (args.squareAuthority !== undefined && args.squareAuthority !== null) { - this.squareAuthority = new ttypes.SquareAuthority(args.squareAuthority); - } - if (args.squareStatus !== undefined && args.squareStatus !== null) { - this.squareStatus = new ttypes.SquareStatus(args.squareStatus); - } - if (args.squareMember !== undefined && args.squareMember !== null) { - this.squareMember = new ttypes.SquareMember(args.squareMember); - } - if (args.squareFeatureSet !== undefined && args.squareFeatureSet !== null) { - this.squareFeatureSet = new ttypes.SquareFeatureSet(args.squareFeatureSet); - } - if (args.noteStatus !== undefined && args.noteStatus !== null) { - this.noteStatus = new ttypes.NoteStatus(args.noteStatus); - } - } -}; -ttypes.JoinSquareResponse.prototype = {}; -ttypes.JoinSquareResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.square = new ttypes.Square(); - this.square.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.squareAuthority = new ttypes.SquareAuthority(); - this.squareAuthority.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.squareStatus = new ttypes.SquareStatus(); - this.squareStatus.read(input); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRUCT) { - this.squareMember = new ttypes.SquareMember(); - this.squareMember.read(input); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRUCT) { - this.squareFeatureSet = new ttypes.SquareFeatureSet(); - this.squareFeatureSet.read(input); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRUCT) { - this.noteStatus = new ttypes.NoteStatus(); - this.noteStatus.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.JoinSquareResponse.prototype.write = function (output) { - output.writeStructBegin("JoinSquareResponse"); - if (this.square !== null && this.square !== undefined) { - output.writeFieldBegin("square", Thrift.Type.STRUCT, 1); - this.square.write(output); - output.writeFieldEnd(); - } - if (this.squareAuthority !== null && this.squareAuthority !== undefined) { - output.writeFieldBegin("squareAuthority", Thrift.Type.STRUCT, 2); - this.squareAuthority.write(output); - output.writeFieldEnd(); - } - if (this.squareStatus !== null && this.squareStatus !== undefined) { - output.writeFieldBegin("squareStatus", Thrift.Type.STRUCT, 3); - this.squareStatus.write(output); - output.writeFieldEnd(); - } - if (this.squareMember !== null && this.squareMember !== undefined) { - output.writeFieldBegin("squareMember", Thrift.Type.STRUCT, 4); - this.squareMember.write(output); - output.writeFieldEnd(); - } - if (this.squareFeatureSet !== null && this.squareFeatureSet !== undefined) { - output.writeFieldBegin("squareFeatureSet", Thrift.Type.STRUCT, 5); - this.squareFeatureSet.write(output); - output.writeFieldEnd(); - } - if (this.noteStatus !== null && this.noteStatus !== undefined) { - output.writeFieldBegin("noteStatus", Thrift.Type.STRUCT, 6); - this.noteStatus.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.JoinSquareRequest = function (args) { - this.squareMid = null; - this.member = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.member !== undefined && args.member !== null) { - this.member = new ttypes.SquareMember(args.member); - } - } -}; -ttypes.JoinSquareRequest.prototype = {}; -ttypes.JoinSquareRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.member = new ttypes.SquareMember(); - this.member.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.JoinSquareRequest.prototype.write = function (output) { - output.writeStructBegin("JoinSquareRequest"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 2); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.member !== null && this.member !== undefined) { - output.writeFieldBegin("member", Thrift.Type.STRUCT, 3); - this.member.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.JoinSquareChatResponse = function (args) { - this.squareChat = null; - this.squareChatStatus = null; - this.squareChatMember = null; - if (args) { - if (args.squareChat !== undefined && args.squareChat !== null) { - this.squareChat = new ttypes.SquareChat(args.squareChat); - } - if (args.squareChatStatus !== undefined && args.squareChatStatus !== null) { - this.squareChatStatus = new ttypes.SquareChatStatus(args.squareChatStatus); - } - if (args.squareChatMember !== undefined && args.squareChatMember !== null) { - this.squareChatMember = new ttypes.SquareChatMember(args.squareChatMember); - } - } -}; -ttypes.JoinSquareChatResponse.prototype = {}; -ttypes.JoinSquareChatResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.squareChat = new ttypes.SquareChat(); - this.squareChat.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.squareChatStatus = new ttypes.SquareChatStatus(); - this.squareChatStatus.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.squareChatMember = new ttypes.SquareChatMember(); - this.squareChatMember.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.JoinSquareChatResponse.prototype.write = function (output) { - output.writeStructBegin("JoinSquareChatResponse"); - if (this.squareChat !== null && this.squareChat !== undefined) { - output.writeFieldBegin("squareChat", Thrift.Type.STRUCT, 1); - this.squareChat.write(output); - output.writeFieldEnd(); - } - if (this.squareChatStatus !== null && this.squareChatStatus !== undefined) { - output.writeFieldBegin("squareChatStatus", Thrift.Type.STRUCT, 2); - this.squareChatStatus.write(output); - output.writeFieldEnd(); - } - if (this.squareChatMember !== null && this.squareChatMember !== undefined) { - output.writeFieldBegin("squareChatMember", Thrift.Type.STRUCT, 3); - this.squareChatMember.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.JoinSquareChatRequest = function (args) { - this.squareChatMid = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - } -}; -ttypes.JoinSquareChatRequest.prototype = {}; -ttypes.JoinSquareChatRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.JoinSquareChatRequest.prototype.write = function (output) { - output.writeStructBegin("JoinSquareChatRequest"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 1); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SendMessageResponse = function (args) { - this.createdSquareMessage = null; - if (args) { - if (args.createdSquareMessage !== undefined && args.createdSquareMessage !== null) { - this.createdSquareMessage = new ttypes.SquareMessage(args.createdSquareMessage); - } - } -}; -ttypes.SendMessageResponse.prototype = {}; -ttypes.SendMessageResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.createdSquareMessage = new ttypes.SquareMessage(); - this.createdSquareMessage.read(input); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SendMessageResponse.prototype.write = function (output) { - output.writeStructBegin("SendMessageResponse"); - if (this.createdSquareMessage !== null && this.createdSquareMessage !== undefined) { - output.writeFieldBegin("createdSquareMessage", Thrift.Type.STRUCT, 1); - this.createdSquareMessage.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SendMessageRequest = function (args) { - this.reqSeq = null; - this.squareChatMid = null; - this.squareMessage = null; - if (args) { - if (args.reqSeq !== undefined && args.reqSeq !== null) { - this.reqSeq = args.reqSeq; - } - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareMessage !== undefined && args.squareMessage !== null) { - this.squareMessage = new ttypes.SquareMessage(args.squareMessage); - } - } -}; -ttypes.SendMessageRequest.prototype = {}; -ttypes.SendMessageRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.reqSeq = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.squareMessage = new ttypes.SquareMessage(); - this.squareMessage.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SendMessageRequest.prototype.write = function (output) { - output.writeStructBegin("SendMessageRequest"); - if (this.reqSeq !== null && this.reqSeq !== undefined) { - output.writeFieldBegin("reqSeq", Thrift.Type.I32, 1); - output.writeI32(this.reqSeq); - output.writeFieldEnd(); - } - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 2); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.squareMessage !== null && this.squareMessage !== undefined) { - output.writeFieldBegin("squareMessage", Thrift.Type.STRUCT, 3); - this.squareMessage.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.MarkAsReadRequest = function (args) { - this.squareChatMid = null; - this.messageId = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.messageId !== undefined && args.messageId !== null) { - this.messageId = args.messageId; - } - } -}; -ttypes.MarkAsReadRequest.prototype = {}; -ttypes.MarkAsReadRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.messageId = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.MarkAsReadRequest.prototype.write = function (output) { - output.writeStructBegin("MarkAsReadRequest"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 2); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.messageId !== null && this.messageId !== undefined) { - output.writeFieldBegin("messageId", Thrift.Type.STRING, 4); - output.writeString(this.messageId); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.MarkAsReadResponse = function (args) {}; -ttypes.MarkAsReadResponse.prototype = {}; -ttypes.MarkAsReadResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - if (ftype == Thrift.Type.STOP) { - break; - } - input.skip(ftype); - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.MarkAsReadResponse.prototype.write = function (output) { - output.writeStructBegin("MarkAsReadResponse"); - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SubscriptionState = function (args) { - this.subscriptionId = null; - this.ttlMillis = null; - if (args) { - if (args.subscriptionId !== undefined && args.subscriptionId !== null) { - this.subscriptionId = args.subscriptionId; - } - if (args.ttlMillis !== undefined && args.ttlMillis !== null) { - this.ttlMillis = args.ttlMillis; - } - } -}; -ttypes.SubscriptionState.prototype = {}; -ttypes.SubscriptionState.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.subscriptionId = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.ttlMillis = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SubscriptionState.prototype.write = function (output) { - output.writeStructBegin("SubscriptionState"); - if (this.subscriptionId !== null && this.subscriptionId !== undefined) { - output.writeFieldBegin("subscriptionId", Thrift.Type.I64, 1); - output.writeI64(this.subscriptionId); - output.writeFieldEnd(); - } - if (this.ttlMillis !== null && this.ttlMillis !== undefined) { - output.writeFieldBegin("ttlMillis", Thrift.Type.I64, 2); - output.writeI64(this.ttlMillis); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ApproveSquareMembersResponse = function (args) { - this.approvedMembers = null; - this.status = null; - if (args) { - if (args.approvedMembers !== undefined && args.approvedMembers !== null) { - this.approvedMembers = Thrift.copyList(args.approvedMembers, [ttypes.SquareMember]); - } - if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.SquareStatus(args.status); - } - } -}; -ttypes.ApproveSquareMembersResponse.prototype = {}; -ttypes.ApproveSquareMembersResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.approvedMembers = []; - var _rtmp3365 = input.readListBegin(); - var _size364 = _rtmp3365.size || 0; - for (var _i366 = 0; _i366 < _size364; ++_i366) { - var elem367 = null; - elem367 = new ttypes.SquareMember(); - elem367.read(input); - this.approvedMembers.push(elem367); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.SquareStatus(); - this.status.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ApproveSquareMembersResponse.prototype.write = function (output) { - output.writeStructBegin("ApproveSquareMembersResponse"); - if (this.approvedMembers !== null && this.approvedMembers !== undefined) { - output.writeFieldBegin("approvedMembers", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.approvedMembers.length); - for (var iter368 in this.approvedMembers) { - if (this.approvedMembers.hasOwnProperty(iter368)) { - iter368 = this.approvedMembers[iter368]; - iter368.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.status !== null && this.status !== undefined) { - output.writeFieldBegin("status", Thrift.Type.STRUCT, 2); - this.status.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ApproveSquareMembersRequest = function (args) { - this.squareMid = null; - this.requestedMemberMids = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.requestedMemberMids !== undefined && args.requestedMemberMids !== null) { - this.requestedMemberMids = Thrift.copyList(args.requestedMemberMids, [null]); - } - } -}; -ttypes.ApproveSquareMembersRequest.prototype = {}; -ttypes.ApproveSquareMembersRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.LIST) { - this.requestedMemberMids = []; - var _rtmp3370 = input.readListBegin(); - var _size369 = _rtmp3370.size || 0; - for (var _i371 = 0; _i371 < _size369; ++_i371) { - var elem372 = null; - elem372 = input.readString(); - this.requestedMemberMids.push(elem372); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ApproveSquareMembersRequest.prototype.write = function (output) { - output.writeStructBegin("ApproveSquareMembersRequest"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 2); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.requestedMemberMids !== null && this.requestedMemberMids !== undefined) { - output.writeFieldBegin("requestedMemberMids", Thrift.Type.LIST, 3); - output.writeListBegin(Thrift.Type.STRING, this.requestedMemberMids.length); - for (var iter373 in this.requestedMemberMids) { - if (this.requestedMemberMids.hasOwnProperty(iter373)) { - iter373 = this.requestedMemberMids[iter373]; - output.writeString(iter373); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.CreateSquareChatResponse = function (args) { - this.squareChat = null; - this.squareChatStatus = null; - this.squareChatMember = null; - if (args) { - if (args.squareChat !== undefined && args.squareChat !== null) { - this.squareChat = new ttypes.SquareChat(args.squareChat); - } - if (args.squareChatStatus !== undefined && args.squareChatStatus !== null) { - this.squareChatStatus = new ttypes.SquareChatStatus(args.squareChatStatus); - } - if (args.squareChatMember !== undefined && args.squareChatMember !== null) { - this.squareChatMember = new ttypes.SquareChatMember(args.squareChatMember); - } - } -}; -ttypes.CreateSquareChatResponse.prototype = {}; -ttypes.CreateSquareChatResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.squareChat = new ttypes.SquareChat(); - this.squareChat.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.squareChatStatus = new ttypes.SquareChatStatus(); - this.squareChatStatus.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.squareChatMember = new ttypes.SquareChatMember(); - this.squareChatMember.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.CreateSquareChatResponse.prototype.write = function (output) { - output.writeStructBegin("CreateSquareChatResponse"); - if (this.squareChat !== null && this.squareChat !== undefined) { - output.writeFieldBegin("squareChat", Thrift.Type.STRUCT, 1); - this.squareChat.write(output); - output.writeFieldEnd(); - } - if (this.squareChatStatus !== null && this.squareChatStatus !== undefined) { - output.writeFieldBegin("squareChatStatus", Thrift.Type.STRUCT, 2); - this.squareChatStatus.write(output); - output.writeFieldEnd(); - } - if (this.squareChatMember !== null && this.squareChatMember !== undefined) { - output.writeFieldBegin("squareChatMember", Thrift.Type.STRUCT, 3); - this.squareChatMember.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.CreateSquareChatRequest = function (args) { - this.reqSeq = null; - this.squareChat = null; - this.squareMemberMids = null; - if (args) { - if (args.reqSeq !== undefined && args.reqSeq !== null) { - this.reqSeq = args.reqSeq; - } - if (args.squareChat !== undefined && args.squareChat !== null) { - this.squareChat = new ttypes.SquareChat(args.squareChat); - } - if (args.squareMemberMids !== undefined && args.squareMemberMids !== null) { - this.squareMemberMids = Thrift.copyList(args.squareMemberMids, [null]); - } - } -}; -ttypes.CreateSquareChatRequest.prototype = {}; -ttypes.CreateSquareChatRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.reqSeq = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.squareChat = new ttypes.SquareChat(); - this.squareChat.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.LIST) { - this.squareMemberMids = []; - var _rtmp3375 = input.readListBegin(); - var _size374 = _rtmp3375.size || 0; - for (var _i376 = 0; _i376 < _size374; ++_i376) { - var elem377 = null; - elem377 = input.readString(); - this.squareMemberMids.push(elem377); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.CreateSquareChatRequest.prototype.write = function (output) { - output.writeStructBegin("CreateSquareChatRequest"); - if (this.reqSeq !== null && this.reqSeq !== undefined) { - output.writeFieldBegin("reqSeq", Thrift.Type.I32, 1); - output.writeI32(this.reqSeq); - output.writeFieldEnd(); - } - if (this.squareChat !== null && this.squareChat !== undefined) { - output.writeFieldBegin("squareChat", Thrift.Type.STRUCT, 2); - this.squareChat.write(output); - output.writeFieldEnd(); - } - if (this.squareMemberMids !== null && this.squareMemberMids !== undefined) { - output.writeFieldBegin("squareMemberMids", Thrift.Type.LIST, 3); - output.writeListBegin(Thrift.Type.STRING, this.squareMemberMids.length); - for (var iter378 in this.squareMemberMids) { - if (this.squareMemberMids.hasOwnProperty(iter378)) { - iter378 = this.squareMemberMids[iter378]; - output.writeString(iter378); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.CreateSquareResponse = function (args) { - this.square = null; - this.creator = null; - this.authority = null; - this.status = null; - if (args) { - if (args.square !== undefined && args.square !== null) { - this.square = new ttypes.Square(args.square); - } - if (args.creator !== undefined && args.creator !== null) { - this.creator = new ttypes.SquareMember(args.creator); - } - if (args.authority !== undefined && args.authority !== null) { - this.authority = new ttypes.SquareAuthority(args.authority); - } - if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.SquareStatus(args.status); - } - } -}; -ttypes.CreateSquareResponse.prototype = {}; -ttypes.CreateSquareResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.square = new ttypes.Square(); - this.square.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.creator = new ttypes.SquareMember(); - this.creator.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.authority = new ttypes.SquareAuthority(); - this.authority.read(input); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.SquareStatus(); - this.status.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.CreateSquareResponse.prototype.write = function (output) { - output.writeStructBegin("CreateSquareResponse"); - if (this.square !== null && this.square !== undefined) { - output.writeFieldBegin("square", Thrift.Type.STRUCT, 1); - this.square.write(output); - output.writeFieldEnd(); - } - if (this.creator !== null && this.creator !== undefined) { - output.writeFieldBegin("creator", Thrift.Type.STRUCT, 2); - this.creator.write(output); - output.writeFieldEnd(); - } - if (this.authority !== null && this.authority !== undefined) { - output.writeFieldBegin("authority", Thrift.Type.STRUCT, 3); - this.authority.write(output); - output.writeFieldEnd(); - } - if (this.status !== null && this.status !== undefined) { - output.writeFieldBegin("status", Thrift.Type.STRUCT, 4); - this.status.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.CreateSquareRequest = function (args) { - this.reqSeq = null; - this.square = null; - this.creator = null; - if (args) { - if (args.reqSeq !== undefined && args.reqSeq !== null) { - this.reqSeq = args.reqSeq; - } - if (args.square !== undefined && args.square !== null) { - this.square = new ttypes.Square(args.square); - } - if (args.creator !== undefined && args.creator !== null) { - this.creator = new ttypes.SquareMember(args.creator); - } - } -}; -ttypes.CreateSquareRequest.prototype = {}; -ttypes.CreateSquareRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.reqSeq = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.square = new ttypes.Square(); - this.square.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.creator = new ttypes.SquareMember(); - this.creator.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.CreateSquareRequest.prototype.write = function (output) { - output.writeStructBegin("CreateSquareRequest"); - if (this.reqSeq !== null && this.reqSeq !== undefined) { - output.writeFieldBegin("reqSeq", Thrift.Type.I32, 1); - output.writeI32(this.reqSeq); - output.writeFieldEnd(); - } - if (this.square !== null && this.square !== undefined) { - output.writeFieldBegin("square", Thrift.Type.STRUCT, 2); - this.square.write(output); - output.writeFieldEnd(); - } - if (this.creator !== null && this.creator !== undefined) { - output.writeFieldBegin("creator", Thrift.Type.STRUCT, 3); - this.creator.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.DeleteSquareResponse = function (args) {}; -ttypes.DeleteSquareResponse.prototype = {}; -ttypes.DeleteSquareResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - if (ftype == Thrift.Type.STOP) { - break; - } - input.skip(ftype); - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.DeleteSquareResponse.prototype.write = function (output) { - output.writeStructBegin("DeleteSquareResponse"); - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.DeleteSquareRequest = function (args) { - this.mid = null; - this.revision = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - } -}; -ttypes.DeleteSquareRequest.prototype = {}; -ttypes.DeleteSquareRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.mid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.DeleteSquareRequest.prototype.write = function (output) { - output.writeStructBegin("DeleteSquareRequest"); - if (this.mid !== null && this.mid !== undefined) { - output.writeFieldBegin("mid", Thrift.Type.STRING, 2); - output.writeString(this.mid); - output.writeFieldEnd(); - } - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 3); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.DestroyMessageResponse = function (args) {}; -ttypes.DestroyMessageResponse.prototype = {}; -ttypes.DestroyMessageResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - if (ftype == Thrift.Type.STOP) { - break; - } - input.skip(ftype); - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.DestroyMessageResponse.prototype.write = function (output) { - output.writeStructBegin("DestroyMessageResponse"); - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.DestroyMessageRequest = function (args) { - this.squareChatMid = null; - this.messageId = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.messageId !== undefined && args.messageId !== null) { - this.messageId = args.messageId; - } - } -}; -ttypes.DestroyMessageRequest.prototype = {}; -ttypes.DestroyMessageRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.messageId = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.DestroyMessageRequest.prototype.write = function (output) { - output.writeStructBegin("DestroyMessageRequest"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 2); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.messageId !== null && this.messageId !== undefined) { - output.writeFieldBegin("messageId", Thrift.Type.STRING, 4); - output.writeString(this.messageId); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareChatMembersRequest = function (args) { - this.squareChatMid = null; - this.continuationToken = null; - this.limit = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.limit !== undefined && args.limit !== null) { - this.limit = args.limit; - } - } -}; -ttypes.GetSquareChatMembersRequest.prototype = {}; -ttypes.GetSquareChatMembersRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.continuationToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.limit = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareChatMembersRequest.prototype.write = function (output) { - output.writeStructBegin("GetSquareChatMembersRequest"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 1); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.continuationToken !== null && this.continuationToken !== undefined) { - output.writeFieldBegin("continuationToken", Thrift.Type.STRING, 2); - output.writeString(this.continuationToken); - output.writeFieldEnd(); - } - if (this.limit !== null && this.limit !== undefined) { - output.writeFieldBegin("limit", Thrift.Type.I32, 3); - output.writeI32(this.limit); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareChatMembersResponse = function (args) { - this.squareChatMembers = null; - this.continuationToken = null; - if (args) { - if (args.squareChatMembers !== undefined && args.squareChatMembers !== null) { - this.squareChatMembers = Thrift.copyList(args.squareChatMembers, [ttypes.SquareMember]); - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - } -}; -ttypes.GetSquareChatMembersResponse.prototype = {}; -ttypes.GetSquareChatMembersResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.squareChatMembers = []; - var _rtmp3380 = input.readListBegin(); - var _size379 = _rtmp3380.size || 0; - for (var _i381 = 0; _i381 < _size379; ++_i381) { - var elem382 = null; - elem382 = new ttypes.SquareMember(); - elem382.read(input); - this.squareChatMembers.push(elem382); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.continuationToken = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareChatMembersResponse.prototype.write = function (output) { - output.writeStructBegin("GetSquareChatMembersResponse"); - if (this.squareChatMembers !== null && this.squareChatMembers !== undefined) { - output.writeFieldBegin("squareChatMembers", Thrift.Type.STRUCT, 1); - this.squareChatMembers.write(output); - output.writeFieldEnd(); - } - if (this.continuationToken !== null && this.continuationToken !== undefined) { - output.writeFieldBegin("continuationToken", Thrift.Type.STRING, 2); - output.writeString(this.continuationToken); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareChatStatusRequest = function (args) { - this.squareChatMid = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - } -}; -ttypes.GetSquareChatStatusRequest.prototype = {}; -ttypes.GetSquareChatStatusRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareChatStatusRequest.prototype.write = function (output) { - output.writeStructBegin("GetSquareChatStatusRequest"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 2); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareChatStatusResponse = function (args) { - this.chatStatus = null; - if (args) { - if (args.chatStatus !== undefined && args.chatStatus !== null) { - this.chatStatus = new ttypes.SquareChatStatus(args.chatStatus); - } - } -}; -ttypes.GetSquareChatStatusResponse.prototype = {}; -ttypes.GetSquareChatStatusResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.chatStatus = new ttypes.SquareChatStatus(); - this.chatStatus.read(input); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareChatStatusResponse.prototype.write = function (output) { - output.writeStructBegin("GetSquareChatStatusResponse"); - if (this.chatStatus !== null && this.chatStatus !== undefined) { - output.writeFieldBegin("chatStatus", Thrift.Type.STRUCT, 1); - this.chatStatus.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareChatRequest = function (args) { - this.squareChatMid = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - } -}; -ttypes.GetSquareChatRequest.prototype = {}; -ttypes.GetSquareChatRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareChatRequest.prototype.write = function (output) { - output.writeStructBegin("GetSquareChatRequest"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 1); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareChatResponse = function (args) { - this.squareChat = null; - this.squareChatMember = null; - this.squareChatStatus = null; - if (args) { - if (args.squareChat !== undefined && args.squareChat !== null) { - this.squareChat = new ttypes.SquareChat(args.squareChat); - } - if (args.squareChatMember !== undefined && args.squareChatMember !== null) { - this.squareChatMember = new ttypes.SquareChatMember(args.squareChatMember); - } - if (args.squareChatStatus !== undefined && args.squareChatStatus !== null) { - this.squareChatStatus = new ttypes.SquareChatStatus(args.squareChatStatus); - } - } -}; -ttypes.GetSquareChatResponse.prototype = {}; -ttypes.GetSquareChatResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.squareChat = new ttypes.SquareChat(); - this.squareChat.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.squareChatMember = new ttypes.SquareChatMember(); - this.squareChatMember.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.squareChatStatus = new ttypes.SquareChatStatus(); - this.squareChatStatus.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareChatResponse.prototype.write = function (output) { - output.writeStructBegin("GetSquareChatResponse"); - if (this.squareChat !== null && this.squareChat !== undefined) { - output.writeFieldBegin("squareChat", Thrift.Type.STRUCT, 1); - this.squareChat.write(output); - output.writeFieldEnd(); - } - if (this.squareChatMember !== null && this.squareChatMember !== undefined) { - output.writeFieldBegin("squareChatMember", Thrift.Type.STRUCT, 2); - this.squareChatMember.write(output); - output.writeFieldEnd(); - } - if (this.squareChatStatus !== null && this.squareChatStatus !== undefined) { - output.writeFieldBegin("squareChatStatus", Thrift.Type.STRUCT, 3); - this.squareChatStatus.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareAuthorityRequest = function (args) { - this.squareMid = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - } -}; -ttypes.GetSquareAuthorityRequest.prototype = {}; -ttypes.GetSquareAuthorityRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareAuthorityRequest.prototype.write = function (output) { - output.writeStructBegin("GetSquareAuthorityRequest"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 1); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareAuthorityResponse = function (args) { - this.authority = null; - if (args) { - if (args.authority !== undefined && args.authority !== null) { - this.authority = new ttypes.SquareAuthority(args.authority); - } - } -}; -ttypes.GetSquareAuthorityResponse.prototype = {}; -ttypes.GetSquareAuthorityResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.authority = new ttypes.SquareAuthority(); - this.authority.read(input); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareAuthorityResponse.prototype.write = function (output) { - output.writeStructBegin("GetSquareAuthorityResponse"); - if (this.authority !== null && this.authority !== undefined) { - output.writeFieldBegin("authority", Thrift.Type.STRUCT, 1); - this.authority.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetJoinedSquaresRequest = function (args) { - this.continuationToken = null; - this.limit = null; - if (args) { - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.limit !== undefined && args.limit !== null) { - this.limit = args.limit; - } - } -}; -ttypes.GetJoinedSquaresRequest.prototype = {}; -ttypes.GetJoinedSquaresRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.continuationToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.limit = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetJoinedSquaresRequest.prototype.write = function (output) { - output.writeStructBegin("GetJoinedSquaresRequest"); - if (this.continuationToken !== null && this.continuationToken !== undefined) { - output.writeFieldBegin("continuationToken", Thrift.Type.STRING, 2); - output.writeString(this.continuationToken); - output.writeFieldEnd(); - } - if (this.limit !== null && this.limit !== undefined) { - output.writeFieldBegin("limit", Thrift.Type.I32, 3); - output.writeI32(this.limit); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetJoinedSquaresResponse = function (args) { - this.squares = null; - this.members = null; - this.authorities = null; - this.statuses = null; - this.continuationToken = null; - this.noteStatuses = null; - if (args) { - if (args.squares !== undefined && args.squares !== null) { - this.squares = Thrift.copyList(args.squares, [ttypes.Square]); - } - if (args.members !== undefined && args.members !== null) { - this.members = Thrift.copyMap(args.members, [ttypes.SquareMember]); - } - if (args.authorities !== undefined && args.authorities !== null) { - this.authorities = Thrift.copyMap(args.authorities, [ttypes.SquareAuthority]); - } - if (args.statuses !== undefined && args.statuses !== null) { - this.statuses = Thrift.copyMap(args.statuses, [ttypes.SquareStatus]); - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.noteStatuses !== undefined && args.noteStatuses !== null) { - this.noteStatuses = Thrift.copyMap(args.noteStatuses, [ttypes.NoteStatus]); - } - } -}; -ttypes.GetJoinedSquaresResponse.prototype = {}; -ttypes.GetJoinedSquaresResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.squares = []; - var _rtmp3380 = input.readListBegin(); - var _size379 = _rtmp3380.size || 0; - for (var _i381 = 0; _i381 < _size379; ++_i381) { - var elem382 = null; - elem382 = new ttypes.Square(); - elem382.read(input); - this.squares.push(elem382); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.MAP) { - this.members = {}; - var _rtmp3384 = input.readMapBegin(); - var _size383 = _rtmp3384.size || 0; - for (var _i385 = 0; _i385 < _size383; ++_i385) { - var key386 = null; - var val387 = null; - key386 = input.readString(); - val387 = new ttypes.SquareMember(); - val387.read(input); - this.members[key386] = val387; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.MAP) { - this.authorities = {}; - var _rtmp3389 = input.readMapBegin(); - var _size388 = _rtmp3389.size || 0; - for (var _i390 = 0; _i390 < _size388; ++_i390) { - var key391 = null; - var val392 = null; - key391 = input.readString(); - val392 = new ttypes.SquareAuthority(); - val392.read(input); - this.authorities[key391] = val392; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.MAP) { - this.statuses = {}; - var _rtmp3394 = input.readMapBegin(); - var _size393 = _rtmp3394.size || 0; - for (var _i395 = 0; _i395 < _size393; ++_i395) { - var key396 = null; - var val397 = null; - key396 = input.readString(); - val397 = new ttypes.SquareStatus(); - val397.read(input); - this.statuses[key396] = val397; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.continuationToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.MAP) { - this.noteStatuses = {}; - var _rtmp3399 = input.readMapBegin(); - var _size398 = _rtmp3399.size || 0; - for (var _i400 = 0; _i400 < _size398; ++_i400) { - var key401 = null; - var val402 = null; - key401 = input.readString(); - val402 = new ttypes.NoteStatus(); - val402.read(input); - this.noteStatuses[key401] = val402; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetJoinedSquaresResponse.prototype.write = function (output) { - output.writeStructBegin("GetJoinedSquaresResponse"); - if (this.squares !== null && this.squares !== undefined) { - output.writeFieldBegin("squares", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.squares.length); - for (var iter403 in this.squares) { - if (this.squares.hasOwnProperty(iter403)) { - iter403 = this.squares[iter403]; - iter403.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.members !== null && this.members !== undefined) { - output.writeFieldBegin("members", Thrift.Type.MAP, 2); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.members)); - for (var kiter404 in this.members) { - if (this.members.hasOwnProperty(kiter404)) { - var viter405 = this.members[kiter404]; - output.writeString(kiter404); - viter405.write(output); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - if (this.authorities !== null && this.authorities !== undefined) { - output.writeFieldBegin("authorities", Thrift.Type.MAP, 3); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.authorities)); - for (var kiter406 in this.authorities) { - if (this.authorities.hasOwnProperty(kiter406)) { - var viter407 = this.authorities[kiter406]; - output.writeString(kiter406); - viter407.write(output); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - if (this.statuses !== null && this.statuses !== undefined) { - output.writeFieldBegin("statuses", Thrift.Type.MAP, 4); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.statuses)); - for (var kiter408 in this.statuses) { - if (this.statuses.hasOwnProperty(kiter408)) { - var viter409 = this.statuses[kiter408]; - output.writeString(kiter408); - viter409.write(output); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - if (this.continuationToken !== null && this.continuationToken !== undefined) { - output.writeFieldBegin("continuationToken", Thrift.Type.STRING, 5); - output.writeString(this.continuationToken); - output.writeFieldEnd(); - } - if (this.noteStatuses !== null && this.noteStatuses !== undefined) { - output.writeFieldBegin("noteStatuses", Thrift.Type.MAP, 6); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.noteStatuses)); - for (var kiter410 in this.noteStatuses) { - if (this.noteStatuses.hasOwnProperty(kiter410)) { - var viter411 = this.noteStatuses[kiter410]; - output.writeString(kiter410); - viter411.write(output); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetJoinableSquareChatsRequest = function (args) { - this.squareMid = null; - this.continuationToken = null; - this.limit = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.limit !== undefined && args.limit !== null) { - this.limit = args.limit; - } - } -}; -ttypes.GetJoinableSquareChatsRequest.prototype = {}; -ttypes.GetJoinableSquareChatsRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.STRING) { - this.continuationToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.I32) { - this.limit = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetJoinableSquareChatsRequest.prototype.write = function (output) { - output.writeStructBegin("GetJoinableSquareChatsRequest"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 1); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.continuationToken !== null && this.continuationToken !== undefined) { - output.writeFieldBegin("continuationToken", Thrift.Type.STRING, 10); - output.writeString(this.continuationToken); - output.writeFieldEnd(); - } - if (this.limit !== null && this.limit !== undefined) { - output.writeFieldBegin("limit", Thrift.Type.I32, 11); - output.writeI32(this.limit); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetJoinableSquareChatsResponse = function (args) { - this.squareChats = null; - this.continuationToken = null; - this.totalSquareChatCount = null; - this.squareChatStatuses = null; - if (args) { - if (args.squareChats !== undefined && args.squareChats !== null) { - this.squareChats = Thrift.copyList(args.squareChats, [ttypes.SquareChat]); - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.totalSquareChatCount !== undefined && args.totalSquareChatCount !== null) { - this.totalSquareChatCount = args.totalSquareChatCount; - } - if (args.squareChatStatuses !== undefined && args.squareChatStatuses !== null) { - this.squareChatStatuses = Thrift.copyMap(args.squareChatStatuses, [ttypes.SquareChatStatus]); - } - } -}; -ttypes.GetJoinableSquareChatsResponse.prototype = {}; -ttypes.GetJoinableSquareChatsResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.squareChats = []; - var _rtmp3413 = input.readListBegin(); - var _size412 = _rtmp3413.size || 0; - for (var _i414 = 0; _i414 < _size412; ++_i414) { - var elem415 = null; - elem415 = new ttypes.SquareChat(); - elem415.read(input); - this.squareChats.push(elem415); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.continuationToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.totalSquareChatCount = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.MAP) { - this.squareChatStatuses = {}; - var _rtmp3417 = input.readMapBegin(); - var _size416 = _rtmp3417.size || 0; - for (var _i418 = 0; _i418 < _size416; ++_i418) { - var key419 = null; - var val420 = null; - key419 = input.readString(); - val420 = new ttypes.SquareChatStatus(); - val420.read(input); - this.squareChatStatuses[key419] = val420; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetJoinableSquareChatsResponse.prototype.write = function (output) { - output.writeStructBegin("GetJoinableSquareChatsResponse"); - if (this.squareChats !== null && this.squareChats !== undefined) { - output.writeFieldBegin("squareChats", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.squareChats.length); - for (var iter421 in this.squareChats) { - if (this.squareChats.hasOwnProperty(iter421)) { - iter421 = this.squareChats[iter421]; - iter421.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.continuationToken !== null && this.continuationToken !== undefined) { - output.writeFieldBegin("continuationToken", Thrift.Type.STRING, 2); - output.writeString(this.continuationToken); - output.writeFieldEnd(); - } - if (this.totalSquareChatCount !== null && this.totalSquareChatCount !== undefined) { - output.writeFieldBegin("totalSquareChatCount", Thrift.Type.I32, 3); - output.writeI32(this.totalSquareChatCount); - output.writeFieldEnd(); - } - if (this.squareChatStatuses !== null && this.squareChatStatuses !== undefined) { - output.writeFieldBegin("squareChatStatuses", Thrift.Type.MAP, 4); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.squareChatStatuses)); - for (var kiter422 in this.squareChatStatuses) { - if (this.squareChatStatuses.hasOwnProperty(kiter422)) { - var viter423 = this.squareChatStatuses[kiter422]; - output.writeString(kiter422); - viter423.write(output); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetInvitationTicketUrlRequest = function (args) { - this.mid = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - } -}; -ttypes.GetInvitationTicketUrlRequest.prototype = {}; -ttypes.GetInvitationTicketUrlRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.mid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetInvitationTicketUrlRequest.prototype.write = function (output) { - output.writeStructBegin("GetInvitationTicketUrlRequest"); - if (this.mid !== null && this.mid !== undefined) { - output.writeFieldBegin("mid", Thrift.Type.STRING, 2); - output.writeString(this.mid); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetInvitationTicketUrlResponse = function (args) { - this.invitationURL = null; - if (args) { - if (args.invitationURL !== undefined && args.invitationURL !== null) { - this.invitationURL = args.invitationURL; - } - } -}; -ttypes.GetInvitationTicketUrlResponse.prototype = {}; -ttypes.GetInvitationTicketUrlResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.invitationURL = input.readString(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetInvitationTicketUrlResponse.prototype.write = function (output) { - output.writeStructBegin("GetInvitationTicketUrlResponse"); - if (this.invitationURL !== null && this.invitationURL !== undefined) { - output.writeFieldBegin("invitationURL", Thrift.Type.STRING, 1); - output.writeString(this.invitationURL); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.LeaveSquareRequest = function (args) { - this.squareMid = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - } -}; -ttypes.LeaveSquareRequest.prototype = {}; -ttypes.LeaveSquareRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.LeaveSquareRequest.prototype.write = function (output) { - output.writeStructBegin("LeaveSquareRequest"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 2); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.LeaveSquareResponse = function (args) {}; -ttypes.LeaveSquareResponse.prototype = {}; -ttypes.LeaveSquareResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - if (ftype == Thrift.Type.STOP) { - break; - } - input.skip(ftype); - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.LeaveSquareResponse.prototype.write = function (output) { - output.writeStructBegin("LeaveSquareResponse"); - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.LeaveSquareChatRequest = function (args) { - this.squareChatMid = null; - this.sayGoodbye = null; - this.squareChatMemberRevision = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.sayGoodbye !== undefined && args.sayGoodbye !== null) { - this.sayGoodbye = args.sayGoodbye; - } - if (args.squareChatMemberRevision !== undefined && args.squareChatMemberRevision !== null) { - this.squareChatMemberRevision = args.squareChatMemberRevision; - } - } -}; -ttypes.LeaveSquareChatRequest.prototype = {}; -ttypes.LeaveSquareChatRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.BOOL) { - this.sayGoodbye = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I64) { - this.squareChatMemberRevision = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.LeaveSquareChatRequest.prototype.write = function (output) { - output.writeStructBegin("LeaveSquareChatRequest"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 2); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.sayGoodbye !== null && this.sayGoodbye !== undefined) { - output.writeFieldBegin("sayGoodbye", Thrift.Type.BOOL, 3); - output.writeBool(this.sayGoodbye); - output.writeFieldEnd(); - } - if (this.squareChatMemberRevision !== null && this.squareChatMemberRevision !== undefined) { - output.writeFieldBegin("squareChatMemberRevision", Thrift.Type.I64, 4); - output.writeI64(this.squareChatMemberRevision); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.LeaveSquareChatResponse = function (args) {}; -ttypes.LeaveSquareChatResponse.prototype = {}; -ttypes.LeaveSquareChatResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - if (ftype == Thrift.Type.STOP) { - break; - } - input.skip(ftype); - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.LeaveSquareChatResponse.prototype.write = function (output) { - output.writeStructBegin("LeaveSquareChatResponse"); - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareMemberSearchOption = function (args) { - this.membershipState = null; - this.memberRoles = null; - this.displayName = null; - this.ableToReceiveMessage = null; - this.ableToReceiveFriendRequest = null; - this.chatMidToExcludeMembers = null; - this.includingMe = null; - if (args) { - if (args.membershipState !== undefined && args.membershipState !== null) { - this.membershipState = args.membershipState; - } - if (args.memberRoles !== undefined && args.memberRoles !== null) { - this.memberRoles = Thrift.copyList(args.memberRoles, [null]); - } - if (args.displayName !== undefined && args.displayName !== null) { - this.displayName = args.displayName; - } - if (args.ableToReceiveMessage !== undefined && args.ableToReceiveMessage !== null) { - this.ableToReceiveMessage = args.ableToReceiveMessage; - } - if (args.ableToReceiveFriendRequest !== undefined && args.ableToReceiveFriendRequest !== null) { - this.ableToReceiveFriendRequest = args.ableToReceiveFriendRequest; - } - if (args.chatMidToExcludeMembers !== undefined && args.chatMidToExcludeMembers !== null) { - this.chatMidToExcludeMembers = args.chatMidToExcludeMembers; - } - if (args.includingMe !== undefined && args.includingMe !== null) { - this.includingMe = args.includingMe; - } - } -}; -ttypes.SquareMemberSearchOption.prototype = {}; -ttypes.SquareMemberSearchOption.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.membershipState = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.SET) { - this.memberRoles = []; - var _rtmp3425 = input.readSetBegin(); - var _size424 = _rtmp3425.size || 0; - for (var _i426 = 0; _i426 < _size424; ++_i426) { - var elem427 = null; - elem427 = input.readI32(); - this.memberRoles.push(elem427); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.displayName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.ableToReceiveMessage = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I32) { - this.ableToReceiveFriendRequest = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRING) { - this.chatMidToExcludeMembers = input.readString(); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.BOOL) { - this.includingMe = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareMemberSearchOption.prototype.write = function (output) { - output.writeStructBegin("SquareMemberSearchOption"); - if (this.membershipState !== null && this.membershipState !== undefined) { - output.writeFieldBegin("membershipState", Thrift.Type.I32, 1); - output.writeI32(this.membershipState); - output.writeFieldEnd(); - } - if (this.memberRoles !== null && this.memberRoles !== undefined) { - output.writeFieldBegin("memberRoles", Thrift.Type.SET, 2); - output.writeSetBegin(Thrift.Type.I32, this.memberRoles.length); - for (var iter428 in this.memberRoles) { - if (this.memberRoles.hasOwnProperty(iter428)) { - iter428 = this.memberRoles[iter428]; - output.writeI32(iter428); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - if (this.displayName !== null && this.displayName !== undefined) { - output.writeFieldBegin("displayName", Thrift.Type.STRING, 3); - output.writeString(this.displayName); - output.writeFieldEnd(); - } - if (this.ableToReceiveMessage !== null && this.ableToReceiveMessage !== undefined) { - output.writeFieldBegin("ableToReceiveMessage", Thrift.Type.I32, 4); - output.writeI32(this.ableToReceiveMessage); - output.writeFieldEnd(); - } - if (this.ableToReceiveFriendRequest !== null && this.ableToReceiveFriendRequest !== undefined) { - output.writeFieldBegin("ableToReceiveFriendRequest", Thrift.Type.I32, 5); - output.writeI32(this.ableToReceiveFriendRequest); - output.writeFieldEnd(); - } - if (this.chatMidToExcludeMembers !== null && this.chatMidToExcludeMembers !== undefined) { - output.writeFieldBegin("chatMidToExcludeMembers", Thrift.Type.STRING, 6); - output.writeString(this.chatMidToExcludeMembers); - output.writeFieldEnd(); - } - if (this.includingMe !== null && this.includingMe !== undefined) { - output.writeFieldBegin("includingMe", Thrift.Type.BOOL, 7); - output.writeBool(this.includingMe); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SearchSquareMembersRequest = function (args) { - this.squareMid = null; - this.searchOption = null; - this.continuationToken = null; - this.limit = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.searchOption !== undefined && args.searchOption !== null) { - this.searchOption = new ttypes.SquareMemberSearchOption(args.searchOption); - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.limit !== undefined && args.limit !== null) { - this.limit = args.limit; - } - } -}; -ttypes.SearchSquareMembersRequest.prototype = {}; -ttypes.SearchSquareMembersRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.searchOption = new ttypes.SquareMemberSearchOption(); - this.searchOption.read(input); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.continuationToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I32) { - this.limit = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SearchSquareMembersRequest.prototype.write = function (output) { - output.writeStructBegin("SearchSquareMembersRequest"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 2); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.searchOption !== null && this.searchOption !== undefined) { - output.writeFieldBegin("searchOption", Thrift.Type.STRUCT, 3); - this.searchOption.write(output); - output.writeFieldEnd(); - } - if (this.continuationToken !== null && this.continuationToken !== undefined) { - output.writeFieldBegin("continuationToken", Thrift.Type.STRING, 4); - output.writeString(this.continuationToken); - output.writeFieldEnd(); - } - if (this.limit !== null && this.limit !== undefined) { - output.writeFieldBegin("limit", Thrift.Type.I32, 5); - output.writeI32(this.limit); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SearchSquareMembersResponse = function (args) { - this.members = null; - this.revision = null; - this.continuationToken = null; - this.totalCount = null; - if (args) { - if (args.members !== undefined && args.members !== null) { - this.members = Thrift.copyList(args.members, [ttypes.SquareMember]); - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.totalCount !== undefined && args.totalCount !== null) { - this.totalCount = args.totalCount; - } - } -}; -ttypes.SearchSquareMembersResponse.prototype = {}; -ttypes.SearchSquareMembersResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.members = []; - var _rtmp3430 = input.readListBegin(); - var _size429 = _rtmp3430.size || 0; - for (var _i431 = 0; _i431 < _size429; ++_i431) { - var elem432 = null; - elem432 = new ttypes.SquareMember(); - elem432.read(input); - this.members.push(elem432); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.continuationToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.totalCount = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SearchSquareMembersResponse.prototype.write = function (output) { - output.writeStructBegin("SearchSquareMembersResponse"); - if (this.members !== null && this.members !== undefined) { - output.writeFieldBegin("members", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.members.length); - for (var iter433 in this.members) { - if (this.members.hasOwnProperty(iter433)) { - iter433 = this.members[iter433]; - iter433.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 2); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - if (this.continuationToken !== null && this.continuationToken !== undefined) { - output.writeFieldBegin("continuationToken", Thrift.Type.STRING, 3); - output.writeString(this.continuationToken); - output.writeFieldEnd(); - } - if (this.totalCount !== null && this.totalCount !== undefined) { - output.writeFieldBegin("totalCount", Thrift.Type.I32, 4); - output.writeI32(this.totalCount); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.FindSquareByInvitationTicketRequest = function (args) { - this.invitationTicket = null; - if (args) { - if (args.invitationTicket !== undefined && args.invitationTicket !== null) { - this.invitationTicket = args.invitationTicket; - } - } -}; -ttypes.FindSquareByInvitationTicketRequest.prototype = {}; -ttypes.FindSquareByInvitationTicketRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.invitationTicket = input.readString(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.FindSquareByInvitationTicketRequest.prototype.write = function (output) { - output.writeStructBegin("FindSquareByInvitationTicketRequest"); - if (this.invitationTicket !== null && this.invitationTicket !== undefined) { - output.writeFieldBegin("invitationTicket", Thrift.Type.STRING, 2); - output.writeString(this.invitationTicket); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.FindSquareByInvitationTicketResponse = function (args) { - this.square = null; - this.myMembership = null; - this.squareAuthority = null; - this.squareStatus = null; - if (args) { - if (args.square !== undefined && args.square !== null) { - this.square = new ttypes.Square(args.square); - } - if (args.myMembership !== undefined && args.myMembership !== null) { - this.myMembership = new ttypes.SquareMember(args.myMembership); - } - if (args.squareAuthority !== undefined && args.squareAuthority !== null) { - this.squareAuthority = new ttypes.SquareAuthority(args.squareAuthority); - } - if (args.squareStatus !== undefined && args.squareStatus !== null) { - this.squareStatus = new ttypes.SquareStatus(args.squareStatus); - } - } -}; -ttypes.FindSquareByInvitationTicketResponse.prototype = {}; -ttypes.FindSquareByInvitationTicketResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.square = new ttypes.Square(); - this.square.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.myMembership = new ttypes.SquareMember(); - this.myMembership.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.squareAuthority = new ttypes.SquareAuthority(); - this.squareAuthority.read(input); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRUCT) { - this.squareStatus = new ttypes.SquareStatus(); - this.squareStatus.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.FindSquareByInvitationTicketResponse.prototype.write = function (output) { - output.writeStructBegin("FindSquareByInvitationTicketResponse"); - if (this.square !== null && this.square !== undefined) { - output.writeFieldBegin("square", Thrift.Type.STRUCT, 1); - this.square.write(output); - output.writeFieldEnd(); - } - if (this.myMembership !== null && this.myMembership !== undefined) { - output.writeFieldBegin("myMembership", Thrift.Type.STRUCT, 2); - this.myMembership.write(output); - output.writeFieldEnd(); - } - if (this.squareAuthority !== null && this.squareAuthority !== undefined) { - output.writeFieldBegin("squareAuthority", Thrift.Type.STRUCT, 3); - this.squareAuthority.write(output); - output.writeFieldEnd(); - } - if (this.squareStatus !== null && this.squareStatus !== undefined) { - output.writeFieldBegin("squareStatus", Thrift.Type.STRUCT, 4); - this.squareStatus.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventReceiveMessage = function (args) { - this.squareChatMid = null; - this.squareMessage = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareMessage !== undefined && args.squareMessage !== null) { - this.squareMessage = new ttypes.SquareMessage(args.squareMessage); - } - } -}; -ttypes.SquareEventReceiveMessage.prototype = {}; -ttypes.SquareEventReceiveMessage.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.squareMessage = new ttypes.SquareMessage(); - this.squareMessage.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventReceiveMessage.prototype.write = function (output) { - output.writeStructBegin("SquareEventReceiveMessage"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 1); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.squareMessage !== null && this.squareMessage !== undefined) { - output.writeFieldBegin("squareMessage", Thrift.Type.STRUCT, 2); - this.squareMessage.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventSendMessage = function (args) { - this.squareChatMid = null; - this.squareMessage = null; - this.reqSeq = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareMessage !== undefined && args.squareMessage !== null) { - this.squareMessage = new ttypes.SquareMessage(args.squareMessage); - } - if (args.reqSeq !== undefined && args.reqSeq !== null) { - this.reqSeq = args.reqSeq; - } - } -}; -ttypes.SquareEventSendMessage.prototype = {}; -ttypes.SquareEventSendMessage.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.squareMessage = new ttypes.SquareMessage(); - this.squareMessage.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.reqSeq = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventSendMessage.prototype.write = function (output) { - output.writeStructBegin("SquareEventSendMessage"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 1); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.squareMessage !== null && this.squareMessage !== undefined) { - output.writeFieldBegin("squareMessage", Thrift.Type.STRUCT, 2); - this.squareMessage.write(output); - output.writeFieldEnd(); - } - if (this.reqSeq !== null && this.reqSeq !== undefined) { - output.writeFieldBegin("reqSeq", Thrift.Type.I32, 3); - output.writeI32(this.reqSeq); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedJoinSquareChat = function (args) { - this.squareChatMid = null; - this.joinedMember = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.joinedMember !== undefined && args.joinedMember !== null) { - this.joinedMember = new ttypes.SquareMember(args.joinedMember); - } - } -}; -ttypes.SquareEventNotifiedJoinSquareChat.prototype = {}; -ttypes.SquareEventNotifiedJoinSquareChat.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.joinedMember = new ttypes.SquareMember(); - this.joinedMember.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedJoinSquareChat.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedJoinSquareChat"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 1); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.joinedMember !== null && this.joinedMember !== undefined) { - output.writeFieldBegin("joinedMember", Thrift.Type.STRUCT, 2); - this.joinedMember.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedInviteIntoSquareChat = function (args) { - this.squareChatMid = null; - this.invitees = null; - this.invitor = null; - this.invitorRelation = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.invitees !== undefined && args.invitees !== null) { - this.invitees = Thrift.copyList(args.invitees, [ttypes.SquareMember]); - } - if (args.invitor !== undefined && args.invitor !== null) { - this.invitor = new ttypes.SquareMember(args.invitor); - } - if (args.invitorRelation !== undefined && args.invitorRelation !== null) { - this.invitorRelation = new ttypes.SquareMemberRelation(args.invitorRelation); - } - } -}; -ttypes.SquareEventNotifiedInviteIntoSquareChat.prototype = {}; -ttypes.SquareEventNotifiedInviteIntoSquareChat.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.LIST) { - this.invitees = []; - var _rtmp3435 = input.readListBegin(); - var _size434 = _rtmp3435.size || 0; - for (var _i436 = 0; _i436 < _size434; ++_i436) { - var elem437 = null; - elem437 = new ttypes.SquareMember(); - elem437.read(input); - this.invitees.push(elem437); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.invitor = new ttypes.SquareMember(); - this.invitor.read(input); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRUCT) { - this.invitorRelation = new ttypes.SquareMemberRelation(); - this.invitorRelation.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedInviteIntoSquareChat.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedInviteIntoSquareChat"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 1); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.invitees !== null && this.invitees !== undefined) { - output.writeFieldBegin("invitees", Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.STRUCT, this.invitees.length); - for (var iter438 in this.invitees) { - if (this.invitees.hasOwnProperty(iter438)) { - iter438 = this.invitees[iter438]; - iter438.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.invitor !== null && this.invitor !== undefined) { - output.writeFieldBegin("invitor", Thrift.Type.STRUCT, 3); - this.invitor.write(output); - output.writeFieldEnd(); - } - if (this.invitorRelation !== null && this.invitorRelation !== undefined) { - output.writeFieldBegin("invitorRelation", Thrift.Type.STRUCT, 4); - this.invitorRelation.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedLeaveSquareChat = function (args) { - this.squareChatMid = null; - this.squareMemberMid = null; - this.sayGoodbye = null; - this.squareMember = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareMemberMid !== undefined && args.squareMemberMid !== null) { - this.squareMemberMid = args.squareMemberMid; - } - if (args.sayGoodbye !== undefined && args.sayGoodbye !== null) { - this.sayGoodbye = args.sayGoodbye; - } - if (args.squareMember !== undefined && args.squareMember !== null) { - this.squareMember = new ttypes.SquareMember(args.squareMember); - } - } -}; -ttypes.SquareEventNotifiedLeaveSquareChat.prototype = {}; -ttypes.SquareEventNotifiedLeaveSquareChat.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareMemberMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.BOOL) { - this.sayGoodbye = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRUCT) { - this.squareMember = new ttypes.SquareMember(); - this.squareMember.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedLeaveSquareChat.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedLeaveSquareChat"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 1); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.squareMemberMid !== null && this.squareMemberMid !== undefined) { - output.writeFieldBegin("squareMemberMid", Thrift.Type.STRING, 2); - output.writeString(this.squareMemberMid); - output.writeFieldEnd(); - } - if (this.sayGoodbye !== null && this.sayGoodbye !== undefined) { - output.writeFieldBegin("sayGoodbye", Thrift.Type.BOOL, 3); - output.writeBool(this.sayGoodbye); - output.writeFieldEnd(); - } - if (this.squareMember !== null && this.squareMember !== undefined) { - output.writeFieldBegin("squareMember", Thrift.Type.STRUCT, 4); - this.squareMember.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedDestroyMessage = function (args) { - this.squareChatMid = null; - this.messageId = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.messageId !== undefined && args.messageId !== null) { - this.messageId = args.messageId; - } - } -}; -ttypes.SquareEventNotifiedDestroyMessage.prototype = {}; -ttypes.SquareEventNotifiedDestroyMessage.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.messageId = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedDestroyMessage.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedDestroyMessage"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 1); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.messageId !== null && this.messageId !== undefined) { - output.writeFieldBegin("messageId", Thrift.Type.STRING, 3); - output.writeString(this.messageId); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedMarkAsRead = function (args) { - this.squareChatMid = null; - this.sMemberMid = null; - this.messageId = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.sMemberMid !== undefined && args.sMemberMid !== null) { - this.sMemberMid = args.sMemberMid; - } - if (args.messageId !== undefined && args.messageId !== null) { - this.messageId = args.messageId; - } - } -}; -ttypes.SquareEventNotifiedMarkAsRead.prototype = {}; -ttypes.SquareEventNotifiedMarkAsRead.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.sMemberMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.messageId = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedMarkAsRead.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedMarkAsRead"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 1); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.sMemberMid !== null && this.sMemberMid !== undefined) { - output.writeFieldBegin("sMemberMid", Thrift.Type.STRING, 2); - output.writeString(this.sMemberMid); - output.writeFieldEnd(); - } - if (this.messageId !== null && this.messageId !== undefined) { - output.writeFieldBegin("messageId", Thrift.Type.STRING, 4); - output.writeString(this.messageId); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareMemberProfile = function (args) { - this.squareChatMid = null; - this.squareMember = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareMember !== undefined && args.squareMember !== null) { - this.squareMember = new ttypes.SquareMember(args.squareMember); - } - } -}; -ttypes.SquareEventNotifiedUpdateSquareMemberProfile.prototype = {}; -ttypes.SquareEventNotifiedUpdateSquareMemberProfile.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.squareMember = new ttypes.SquareMember(); - this.squareMember.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareMemberProfile.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedUpdateSquareMemberProfile"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 1); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.squareMember !== null && this.squareMember !== undefined) { - output.writeFieldBegin("squareMember", Thrift.Type.STRUCT, 2); - this.squareMember.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedKickoutFromSquare = function (args) { - this.squareChatMid = null; - this.kickees = null; - this.by = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.kickees !== undefined && args.kickees !== null) { - this.kickees = Thrift.copyList(args.kickees, [ttypes.SquareMember]); - } - if (args.by !== undefined && args.by !== null) { - this.by = new ttypes.SquareMember(args.by); - } - } -}; -ttypes.SquareEventNotifiedKickoutFromSquare.prototype = {}; -ttypes.SquareEventNotifiedKickoutFromSquare.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.LIST) { - this.kickees = []; - var _rtmp3440 = input.readListBegin(); - var _size439 = _rtmp3440.size || 0; - for (var _i441 = 0; _i441 < _size439; ++_i441) { - var elem442 = null; - elem442 = new ttypes.SquareMember(); - elem442.read(input); - this.kickees.push(elem442); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - let struct = new ttypes.SquareMember(); - struct.read(input); - this.by = struct; - } else { - input.skip(ftype); - } - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedKickoutFromSquare.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedKickoutFromSquare"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 1); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.kickees !== null && this.kickees !== undefined) { - output.writeFieldBegin("kickees", Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.STRUCT, this.kickees.length); - for (var iter443 in this.kickees) { - if (this.kickees.hasOwnProperty(iter443)) { - iter443 = this.kickees[iter443]; - iter443.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedShutdownSquare = function (args) { - this.squareChatMid = null; - this.square = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.square !== undefined && args.square !== null) { - this.square = new ttypes.Square(args.square); - } - } -}; -ttypes.SquareEventNotifiedShutdownSquare.prototype = {}; -ttypes.SquareEventNotifiedShutdownSquare.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.square = new ttypes.Square(); - this.square.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedShutdownSquare.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedShutdownSquare"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 1); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.square !== null && this.square !== undefined) { - output.writeFieldBegin("square", Thrift.Type.STRUCT, 2); - this.square.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedDeleteSquareChat = function (args) { - this.squareChat = null; - if (args) { - if (args.squareChat !== undefined && args.squareChat !== null) { - this.squareChat = new ttypes.SquareChat(args.squareChat); - } - } -}; -ttypes.SquareEventNotifiedDeleteSquareChat.prototype = {}; -ttypes.SquareEventNotifiedDeleteSquareChat.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.squareChat = new ttypes.SquareChat(); - this.squareChat.read(input); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedDeleteSquareChat.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedDeleteSquareChat"); - if (this.squareChat !== null && this.squareChat !== undefined) { - output.writeFieldBegin("squareChat", Thrift.Type.STRUCT, 1); - this.squareChat.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareChatProfileName = function (args) { - this.squareChatMid = null; - this.editor = null; - this.updatedChatName = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.editor !== undefined && args.editor !== null) { - this.editor = new ttypes.SquareMember(args.editor); - } - if (args.updatedChatName !== undefined && args.updatedChatName !== null) { - this.updatedChatName = args.updatedChatName; - } - } -}; -ttypes.SquareEventNotifiedUpdateSquareChatProfileName.prototype = {}; -ttypes.SquareEventNotifiedUpdateSquareChatProfileName.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.editor = new ttypes.SquareMember(); - this.editor.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.updatedChatName = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareChatProfileName.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedUpdateSquareChatProfileName"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 1); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.editor !== null && this.editor !== undefined) { - output.writeFieldBegin("editor", Thrift.Type.STRUCT, 2); - this.editor.write(output); - output.writeFieldEnd(); - } - if (this.updatedChatName !== null && this.updatedChatName !== undefined) { - output.writeFieldBegin("updatedChatName", Thrift.Type.STRING, 3); - output.writeString(this.updatedChatName); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareChatProfileImage = function (args) { - this.squareChatMid = null; - this.editor = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.editor !== undefined && args.editor !== null) { - this.editor = new ttypes.SquareMember(args.editor); - } - } -}; -ttypes.SquareEventNotifiedUpdateSquareChatProfileImage.prototype = {}; -ttypes.SquareEventNotifiedUpdateSquareChatProfileImage.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.editor = new ttypes.SquareMember(); - this.editor.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareChatProfileImage.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedUpdateSquareChatProfileImage"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 1); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.editor !== null && this.editor !== undefined) { - output.writeFieldBegin("editor", Thrift.Type.STRUCT, 2); - this.editor.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareChatStatus = function (args) { - this.squareChatMid = null; - this.statusWithoutMessage = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.statusWithoutMessage !== undefined && args.statusWithoutMessage !== null) { - this.statusWithoutMessage = new ttypes.SquareChatStatusWithoutMessage(args.statusWithoutMessage); - } - } -}; -ttypes.SquareEventNotifiedUpdateSquareChatStatus.prototype = {}; -ttypes.SquareEventNotifiedUpdateSquareChatStatus.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.statusWithoutMessage = new ttypes.SquareChatStatusWithoutMessage(); - this.statusWithoutMessage.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareChatStatus.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedUpdateSquareChatStatus"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 1); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.statusWithoutMessage !== null && this.statusWithoutMessage !== undefined) { - output.writeFieldBegin("statusWithoutMessage", Thrift.Type.STRUCT, 2); - this.statusWithoutMessage.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareStatus = function (args) { - this.squareMid = null; - this.squareStatus = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.squareStatus !== undefined && args.squareStatus !== null) { - this.squareStatus = new ttypes.SquareStatus(args.squareStatus); - } - } -}; -ttypes.SquareEventNotifiedUpdateSquareStatus.prototype = {}; -ttypes.SquareEventNotifiedUpdateSquareStatus.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.squareStatus = new ttypes.SquareStatus(); - this.squareStatus.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareStatus.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedUpdateSquareStatus"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 1); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.squareStatus !== null && this.squareStatus !== undefined) { - output.writeFieldBegin("squareStatus", Thrift.Type.STRUCT, 2); - this.squareStatus.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedCreateSquareMember = function (args) { - this.square = null; - this.squareAuthority = null; - this.squareStatus = null; - this.squareMember = null; - this.squareFeatureSet = null; - if (args) { - if (args.square !== undefined && args.square !== null) { - this.square = new ttypes.Square(args.square); - } - if (args.squareAuthority !== undefined && args.squareAuthority !== null) { - this.squareAuthority = new ttypes.SquareAuthority(args.squareAuthority); - } - if (args.squareStatus !== undefined && args.squareStatus !== null) { - this.squareStatus = new ttypes.SquareStatus(args.squareStatus); - } - if (args.squareMember !== undefined && args.squareMember !== null) { - this.squareMember = new ttypes.SquareMember(args.squareMember); - } - if (args.squareFeatureSet !== undefined && args.squareFeatureSet !== null) { - this.squareFeatureSet = new ttypes.SquareFeatureSet(args.squareFeatureSet); - } - } -}; -ttypes.SquareEventNotifiedCreateSquareMember.prototype = {}; -ttypes.SquareEventNotifiedCreateSquareMember.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.square = new ttypes.Square(); - this.square.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.squareAuthority = new ttypes.SquareAuthority(); - this.squareAuthority.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.squareStatus = new ttypes.SquareStatus(); - this.squareStatus.read(input); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRUCT) { - this.squareMember = new ttypes.SquareMember(); - this.squareMember.read(input); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRUCT) { - this.squareFeatureSet = new ttypes.SquareFeatureSet(); - this.squareFeatureSet.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedCreateSquareMember.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedCreateSquareMember"); - if (this.square !== null && this.square !== undefined) { - output.writeFieldBegin("square", Thrift.Type.STRUCT, 1); - this.square.write(output); - output.writeFieldEnd(); - } - if (this.squareAuthority !== null && this.squareAuthority !== undefined) { - output.writeFieldBegin("squareAuthority", Thrift.Type.STRUCT, 2); - this.squareAuthority.write(output); - output.writeFieldEnd(); - } - if (this.squareStatus !== null && this.squareStatus !== undefined) { - output.writeFieldBegin("squareStatus", Thrift.Type.STRUCT, 3); - this.squareStatus.write(output); - output.writeFieldEnd(); - } - if (this.squareMember !== null && this.squareMember !== undefined) { - output.writeFieldBegin("squareMember", Thrift.Type.STRUCT, 4); - this.squareMember.write(output); - output.writeFieldEnd(); - } - if (this.squareFeatureSet !== null && this.squareFeatureSet !== undefined) { - output.writeFieldBegin("squareFeatureSet", Thrift.Type.STRUCT, 5); - this.squareFeatureSet.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedCreateSquareChatMember = function (args) { - this.squareChatMid = null; - this.squareMemberMid = null; - this.squareChatMember = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareMemberMid !== undefined && args.squareMemberMid !== null) { - this.squareMemberMid = args.squareMemberMid; - } - if (args.squareChatMember !== undefined && args.squareChatMember !== null) { - this.squareChatMember = new ttypes.SquareChatMember(args.squareChatMember); - } - } -}; -ttypes.SquareEventNotifiedCreateSquareChatMember.prototype = {}; -ttypes.SquareEventNotifiedCreateSquareChatMember.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareMemberMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.squareChatMember = new ttypes.SquareChatMember(); - this.squareChatMember.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedCreateSquareChatMember.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedCreateSquareChatMember"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 1); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.squareMemberMid !== null && this.squareMemberMid !== undefined) { - output.writeFieldBegin("squareMemberMid", Thrift.Type.STRING, 2); - output.writeString(this.squareMemberMid); - output.writeFieldEnd(); - } - if (this.squareChatMember !== null && this.squareChatMember !== undefined) { - output.writeFieldBegin("squareChatMember", Thrift.Type.STRUCT, 3); - this.squareChatMember.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareMemberRelation = function (args) { - this.squareMid = null; - this.myMemberMid = null; - this.targetSquareMemberMid = null; - this.squareMemberRelation = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.myMemberMid !== undefined && args.myMemberMid !== null) { - this.myMemberMid = args.myMemberMid; - } - if (args.targetSquareMemberMid !== undefined && args.targetSquareMemberMid !== null) { - this.targetSquareMemberMid = args.targetSquareMemberMid; - } - if (args.squareMemberRelation !== undefined && args.squareMemberRelation !== null) { - this.squareMemberRelation = new ttypes.SquareMemberRelation(args.squareMemberRelation); - } - } -}; -ttypes.SquareEventNotifiedUpdateSquareMemberRelation.prototype = {}; -ttypes.SquareEventNotifiedUpdateSquareMemberRelation.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.myMemberMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.targetSquareMemberMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRUCT) { - this.squareMemberRelation = new ttypes.SquareMemberRelation(); - this.squareMemberRelation.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareMemberRelation.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedUpdateSquareMemberRelation"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 1); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.myMemberMid !== null && this.myMemberMid !== undefined) { - output.writeFieldBegin("myMemberMid", Thrift.Type.STRING, 2); - output.writeString(this.myMemberMid); - output.writeFieldEnd(); - } - if (this.targetSquareMemberMid !== null && this.targetSquareMemberMid !== undefined) { - output.writeFieldBegin("targetSquareMemberMid", Thrift.Type.STRING, 3); - output.writeString(this.targetSquareMemberMid); - output.writeFieldEnd(); - } - if (this.squareMemberRelation !== null && this.squareMemberRelation !== undefined) { - output.writeFieldBegin("squareMemberRelation", Thrift.Type.STRUCT, 4); - this.squareMemberRelation.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquare = function (args) { - this.squareMid = null; - this.square = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.square !== undefined && args.square !== null) { - this.square = new ttypes.Square(args.square); - } - } -}; -ttypes.SquareEventNotifiedUpdateSquare.prototype = {}; -ttypes.SquareEventNotifiedUpdateSquare.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.square = new ttypes.Square(); - this.square.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquare.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedUpdateSquare"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 1); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.square !== null && this.square !== undefined) { - output.writeFieldBegin("square", Thrift.Type.STRUCT, 2); - this.square.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareMember = function (args) { - this.squareMid = null; - this.squareMemberMid = null; - this.squareMember = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.squareMemberMid !== undefined && args.squareMemberMid !== null) { - this.squareMemberMid = args.squareMemberMid; - } - if (args.squareMember !== undefined && args.squareMember !== null) { - this.squareMember = new ttypes.SquareMember(args.squareMember); - } - } -}; -ttypes.SquareEventNotifiedUpdateSquareMember.prototype = {}; -ttypes.SquareEventNotifiedUpdateSquareMember.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareMemberMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.squareMember = new ttypes.SquareMember(); - this.squareMember.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareMember.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedUpdateSquareMember"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 1); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.squareMemberMid !== null && this.squareMemberMid !== undefined) { - output.writeFieldBegin("squareMemberMid", Thrift.Type.STRING, 2); - output.writeString(this.squareMemberMid); - output.writeFieldEnd(); - } - if (this.squareMember !== null && this.squareMember !== undefined) { - output.writeFieldBegin("squareMember", Thrift.Type.STRUCT, 3); - this.squareMember.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareChat = function (args) { - this.squareMid = null; - this.squareChatMid = null; - this.squareChat = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareChat !== undefined && args.squareChat !== null) { - this.squareChat = new ttypes.SquareChat(args.squareChat); - } - } -}; -ttypes.SquareEventNotifiedUpdateSquareChat.prototype = {}; -ttypes.SquareEventNotifiedUpdateSquareChat.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.squareChat = new ttypes.SquareChat(); - this.squareChat.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareChat.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedUpdateSquareChat"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 1); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 2); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.squareChat !== null && this.squareChat !== undefined) { - output.writeFieldBegin("squareChat", Thrift.Type.STRUCT, 3); - this.squareChat.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotificationJoinRequest = function (args) { - this.squareMid = null; - this.squareName = null; - this.requestMemberName = null; - this.profileImageObsHash = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.squareName !== undefined && args.squareName !== null) { - this.squareName = args.squareName; - } - if (args.requestMemberName !== undefined && args.requestMemberName !== null) { - this.requestMemberName = args.requestMemberName; - } - if (args.profileImageObsHash !== undefined && args.profileImageObsHash !== null) { - this.profileImageObsHash = args.profileImageObsHash; - } - } -}; -ttypes.SquareEventNotificationJoinRequest.prototype = {}; -ttypes.SquareEventNotificationJoinRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.requestMemberName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.profileImageObsHash = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotificationJoinRequest.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotificationJoinRequest"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 1); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.squareName !== null && this.squareName !== undefined) { - output.writeFieldBegin("squareName", Thrift.Type.STRING, 2); - output.writeString(this.squareName); - output.writeFieldEnd(); - } - if (this.requestMemberName !== null && this.requestMemberName !== undefined) { - output.writeFieldBegin("requestMemberName", Thrift.Type.STRING, 3); - output.writeString(this.requestMemberName); - output.writeFieldEnd(); - } - if (this.profileImageObsHash !== null && this.profileImageObsHash !== undefined) { - output.writeFieldBegin("profileImageObsHash", Thrift.Type.STRING, 4); - output.writeString(this.profileImageObsHash); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotificationMemberUpdate = function (args) { - this.squareMid = null; - this.squareName = null; - this.profileImageObsHash = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.squareName !== undefined && args.squareName !== null) { - this.squareName = args.squareName; - } - if (args.profileImageObsHash !== undefined && args.profileImageObsHash !== null) { - this.profileImageObsHash = args.profileImageObsHash; - } - } -}; -ttypes.SquareEventNotificationMemberUpdate.prototype = {}; -ttypes.SquareEventNotificationMemberUpdate.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.profileImageObsHash = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotificationMemberUpdate.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotificationMemberUpdate"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 1); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.squareName !== null && this.squareName !== undefined) { - output.writeFieldBegin("squareName", Thrift.Type.STRING, 2); - output.writeString(this.squareName); - output.writeFieldEnd(); - } - if (this.profileImageObsHash !== null && this.profileImageObsHash !== undefined) { - output.writeFieldBegin("profileImageObsHash", Thrift.Type.STRING, 3); - output.writeString(this.profileImageObsHash); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotificationSquareDelete = function (args) { - this.squareMid = null; - this.squareName = null; - this.profileImageObsHash = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.squareName !== undefined && args.squareName !== null) { - this.squareName = args.squareName; - } - if (args.profileImageObsHash !== undefined && args.profileImageObsHash !== null) { - this.profileImageObsHash = args.profileImageObsHash; - } - } -}; -ttypes.SquareEventNotificationSquareDelete.prototype = {}; -ttypes.SquareEventNotificationSquareDelete.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.profileImageObsHash = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotificationSquareDelete.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotificationSquareDelete"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 1); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.squareName !== null && this.squareName !== undefined) { - output.writeFieldBegin("squareName", Thrift.Type.STRING, 2); - output.writeString(this.squareName); - output.writeFieldEnd(); - } - if (this.profileImageObsHash !== null && this.profileImageObsHash !== undefined) { - output.writeFieldBegin("profileImageObsHash", Thrift.Type.STRING, 3); - output.writeString(this.profileImageObsHash); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotificationSquareChatDelete = function (args) { - this.squareChatMid = null; - this.squareChatName = null; - this.profileImageObsHash = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareChatName !== undefined && args.squareChatName !== null) { - this.squareChatName = args.squareChatName; - } - if (args.profileImageObsHash !== undefined && args.profileImageObsHash !== null) { - this.profileImageObsHash = args.profileImageObsHash; - } - } -}; -ttypes.SquareEventNotificationSquareChatDelete.prototype = {}; -ttypes.SquareEventNotificationSquareChatDelete.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareChatName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.profileImageObsHash = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotificationSquareChatDelete.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotificationSquareChatDelete"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 1); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.squareChatName !== null && this.squareChatName !== undefined) { - output.writeFieldBegin("squareChatName", Thrift.Type.STRING, 2); - output.writeString(this.squareChatName); - output.writeFieldEnd(); - } - if (this.profileImageObsHash !== null && this.profileImageObsHash !== undefined) { - output.writeFieldBegin("profileImageObsHash", Thrift.Type.STRING, 3); - output.writeString(this.profileImageObsHash); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotificationMessage = function (args) { - this.squareChatMid = null; - this.squareMessage = null; - this.senderDisplayName = null; - this.unreadCount = null; - this.requiredToFetchChatEvents = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareMessage !== undefined && args.squareMessage !== null) { - this.squareMessage = new ttypes.SquareMessage(args.squareMessage); - } - if (args.senderDisplayName !== undefined && args.senderDisplayName !== null) { - this.senderDisplayName = args.senderDisplayName; - } - if (args.unreadCount !== undefined && args.unreadCount !== null) { - this.unreadCount = args.unreadCount; - } - if (args.requiredToFetchChatEvents !== undefined && args.requiredToFetchChatEvents !== null) { - this.requiredToFetchChatEvents = args.requiredToFetchChatEvents; - } - } -}; -ttypes.SquareEventNotificationMessage.prototype = {}; -ttypes.SquareEventNotificationMessage.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.squareMessage = new ttypes.SquareMessage(); - this.squareMessage.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.senderDisplayName = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.unreadCount = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.BOOL) { - this.requiredToFetchChatEvents = input.readBool(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotificationMessage.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotificationMessage"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 1); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.squareMessage !== null && this.squareMessage !== undefined) { - output.writeFieldBegin("squareMessage", Thrift.Type.STRUCT, 2); - this.squareMessage.write(output); - output.writeFieldEnd(); - } - if (this.senderDisplayName !== null && this.senderDisplayName !== undefined) { - output.writeFieldBegin("senderDisplayName", Thrift.Type.STRING, 3); - output.writeString(this.senderDisplayName); - output.writeFieldEnd(); - } - if (this.unreadCount !== null && this.unreadCount !== undefined) { - output.writeFieldBegin("unreadCount", Thrift.Type.I32, 4); - output.writeI32(this.unreadCount); - output.writeFieldEnd(); - } - if (this.requiredToFetchChatEvents !== null && this.requiredToFetchChatEvents !== undefined) { - output.writeFieldBegin("requiredToFetchChatEvents", Thrift.Type.BOOL, 5); - output.writeBool(this.requiredToFetchChatEvents); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareChatMember = function (args) { - this.squareChatMid = null; - this.squareMemberMid = null; - this.squareChatMember = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareMemberMid !== undefined && args.squareMemberMid !== null) { - this.squareMemberMid = args.squareMemberMid; - } - if (args.squareChatMember !== undefined && args.squareChatMember !== null) { - this.squareChatMember = new ttypes.SquareChatMember(args.squareChatMember); - } - } -}; -ttypes.SquareEventNotifiedUpdateSquareChatMember.prototype = {}; -ttypes.SquareEventNotifiedUpdateSquareChatMember.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareMemberMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.squareChatMember = new ttypes.SquareChatMember(); - this.squareChatMember.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareChatMember.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedUpdateSquareChatMember"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 1); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.squareMemberMid !== null && this.squareMemberMid !== undefined) { - output.writeFieldBegin("squareMemberMid", Thrift.Type.STRING, 2); - output.writeString(this.squareMemberMid); - output.writeFieldEnd(); - } - if (this.squareChatMember !== null && this.squareChatMember !== undefined) { - output.writeFieldBegin("squareChatMember", Thrift.Type.STRUCT, 3); - this.squareChatMember.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareAuthority = function (args) { - this.squareMid = null; - this.squareAuthority = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.squareAuthority !== undefined && args.squareAuthority !== null) { - this.squareAuthority = new ttypes.SquareAuthority(args.squareAuthority); - } - } -}; -ttypes.SquareEventNotifiedUpdateSquareAuthority.prototype = {}; -ttypes.SquareEventNotifiedUpdateSquareAuthority.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.squareAuthority = new ttypes.SquareAuthority(); - this.squareAuthority.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareAuthority.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedUpdateSquareAuthority"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 1); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.squareAuthority !== null && this.squareAuthority !== undefined) { - output.writeFieldBegin("squareAuthority", Thrift.Type.STRUCT, 2); - this.squareAuthority.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareFeatureSet = function (args) { - this.squareFeatureSet = null; - if (args) { - if (args.squareFeatureSet !== undefined && args.squareFeatureSet !== null) { - this.squareFeatureSet = new ttypes.SquareFeatureSet(args.squareFeatureSet); - } - } -}; -ttypes.SquareEventNotifiedUpdateSquareFeatureSet.prototype = {}; -ttypes.SquareEventNotifiedUpdateSquareFeatureSet.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.squareFeatureSet = new ttypes.SquareFeatureSet(); - this.squareFeatureSet.read(input); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventNotifiedUpdateSquareFeatureSet.prototype.write = function (output) { - output.writeStructBegin("SquareEventNotifiedUpdateSquareFeatureSet"); - if (this.squareFeatureSet !== null && this.squareFeatureSet !== undefined) { - output.writeFieldBegin("squareFeatureSet", Thrift.Type.STRUCT, 1); - this.squareFeatureSet.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEventPayload = function (args) { - this.receiveMessage = null; - this.sendMessage = null; - this.notifiedJoinSquareChat = null; - this.notifiedInviteIntoSquareChat = null; - this.notifiedLeaveSquareChat = null; - this.notifiedDestroyMessage = null; - this.notifiedMarkAsRead = null; - this.notifiedUpdateSquareMemberProfile = null; - this.notifiedKickoutFromSquare = null; - this.notifiedShutdownSquare = null; - this.notifiedDeleteSquareChat = null; - this.notifiedUpdateSquareChatProfileName = null; - this.notifiedUpdateSquareChatProfileImage = null; - this.notifiedUpdateSquareStatus = null; - this.notifiedUpdateSquareChatStatus = null; - this.notifiedCreateSquareMember = null; - this.notifiedCreateSquareChatMember = null; - this.notifiedUpdateSquareMemberRelation = null; - this.notifiedUpdateSquare = null; - this.notifiedUpdateSquareMember = null; - this.notifiedUpdateSquareChat = null; - this.notificationJoinRequest = null; - this.notificationJoined = null; - this.notificationPromoteCoadmin = null; - this.notificationPromoteAdmin = null; - this.notificationDemoteMember = null; - this.notificationKickedOut = null; - this.notificationSquareDelete = null; - this.notificationSquareChatDelete = null; - this.notificationMessage = null; - this.notifiedUpdateSquareChatMember = null; - this.notifiedUpdateSquareAuthority = null; - this.notifiedUpdateSquareFeatureSet = null; - if (args) { - if (args.receiveMessage !== undefined && args.receiveMessage !== null) { - this.receiveMessage = new ttypes.SquareEventReceiveMessage(args.receiveMessage); - } - if (args.sendMessage !== undefined && args.sendMessage !== null) { - this.sendMessage = new ttypes.SquareEventSendMessage(args.sendMessage); - } - if (args.notifiedJoinSquareChat !== undefined && args.notifiedJoinSquareChat !== null) { - this.notifiedJoinSquareChat = new ttypes.SquareEventNotifiedJoinSquareChat(args.notifiedJoinSquareChat); - } - if (args.notifiedInviteIntoSquareChat !== undefined && args.notifiedInviteIntoSquareChat !== null) { - this.notifiedInviteIntoSquareChat = new ttypes.SquareEventNotifiedInviteIntoSquareChat( - args.notifiedInviteIntoSquareChat, - ); - } - if (args.notifiedLeaveSquareChat !== undefined && args.notifiedLeaveSquareChat !== null) { - this.notifiedLeaveSquareChat = new ttypes.SquareEventNotifiedLeaveSquareChat(args.notifiedLeaveSquareChat); - } - if (args.notifiedDestroyMessage !== undefined && args.notifiedDestroyMessage !== null) { - this.notifiedDestroyMessage = new ttypes.SquareEventNotifiedDestroyMessage(args.notifiedDestroyMessage); - } - if (args.notifiedMarkAsRead !== undefined && args.notifiedMarkAsRead !== null) { - this.notifiedMarkAsRead = new ttypes.SquareEventNotifiedMarkAsRead(args.notifiedMarkAsRead); - } - if (args.notifiedUpdateSquareMemberProfile !== undefined && args.notifiedUpdateSquareMemberProfile !== null) { - this.notifiedUpdateSquareMemberProfile = new ttypes.SquareEventNotifiedUpdateSquareMemberProfile( - args.notifiedUpdateSquareMemberProfile, - ); - } - if (args.notifiedKickoutFromSquare !== undefined && args.notifiedKickoutFromSquare !== null) { - this.notifiedKickoutFromSquare = new ttypes.SquareEventNotifiedKickoutFromSquare( - args.notifiedKickoutFromSquare, - ); - } - if (args.notifiedShutdownSquare !== undefined && args.notifiedShutdownSquare !== null) { - this.notifiedShutdownSquare = new ttypes.SquareEventNotifiedShutdownSquare(args.notifiedShutdownSquare); - } - if (args.notifiedDeleteSquareChat !== undefined && args.notifiedDeleteSquareChat !== null) { - this.notifiedDeleteSquareChat = new ttypes.SquareEventNotifiedDeleteSquareChat( - args.notifiedDeleteSquareChat, - ); - } - if ( - args.notifiedUpdateSquareChatProfileName !== undefined && args.notifiedUpdateSquareChatProfileName !== null - ) { - this.notifiedUpdateSquareChatProfileName = new ttypes.SquareEventNotifiedUpdateSquareChatProfileName( - args.notifiedUpdateSquareChatProfileName, - ); - } - if ( - args.notifiedUpdateSquareChatProfileImage !== undefined && - args.notifiedUpdateSquareChatProfileImage !== null - ) { - this.notifiedUpdateSquareChatProfileImage = new ttypes.SquareEventNotifiedUpdateSquareChatProfileImage( - args.notifiedUpdateSquareChatProfileImage, - ); - } - if (args.notifiedUpdateSquareStatus !== undefined && args.notifiedUpdateSquareStatus !== null) { - this.notifiedUpdateSquareStatus = new ttypes.SquareEventNotifiedUpdateSquareStatus( - args.notifiedUpdateSquareStatus, - ); - } - if (args.notifiedUpdateSquareChatStatus !== undefined && args.notifiedUpdateSquareChatStatus !== null) { - this.notifiedUpdateSquareChatStatus = new ttypes.SquareEventNotifiedUpdateSquareChatStatus( - args.notifiedUpdateSquareChatStatus, - ); - } - if (args.notifiedCreateSquareMember !== undefined && args.notifiedCreateSquareMember !== null) { - this.notifiedCreateSquareMember = new ttypes.SquareEventNotifiedCreateSquareMember( - args.notifiedCreateSquareMember, - ); - } - if (args.notifiedCreateSquareChatMember !== undefined && args.notifiedCreateSquareChatMember !== null) { - this.notifiedCreateSquareChatMember = new ttypes.SquareEventNotifiedCreateSquareChatMember( - args.notifiedCreateSquareChatMember, - ); - } - if (args.notifiedUpdateSquareMemberRelation !== undefined && args.notifiedUpdateSquareMemberRelation !== null) { - this.notifiedUpdateSquareMemberRelation = new ttypes.SquareEventNotifiedUpdateSquareMemberRelation( - args.notifiedUpdateSquareMemberRelation, - ); - } - if (args.notifiedUpdateSquare !== undefined && args.notifiedUpdateSquare !== null) { - this.notifiedUpdateSquare = new ttypes.SquareEventNotifiedUpdateSquare(args.notifiedUpdateSquare); - } - if (args.notifiedUpdateSquareMember !== undefined && args.notifiedUpdateSquareMember !== null) { - this.notifiedUpdateSquareMember = new ttypes.SquareEventNotifiedUpdateSquareMember( - args.notifiedUpdateSquareMember, - ); - } - if (args.notifiedUpdateSquareChat !== undefined && args.notifiedUpdateSquareChat !== null) { - this.notifiedUpdateSquareChat = new ttypes.SquareEventNotifiedUpdateSquareChat( - args.notifiedUpdateSquareChat, - ); - } - if (args.notificationJoinRequest !== undefined && args.notificationJoinRequest !== null) { - this.notificationJoinRequest = new ttypes.SquareEventNotificationJoinRequest(args.notificationJoinRequest); - } - if (args.notificationJoined !== undefined && args.notificationJoined !== null) { - this.notificationJoined = new ttypes.SquareEventNotificationMemberUpdate(args.notificationJoined); - } - if (args.notificationPromoteCoadmin !== undefined && args.notificationPromoteCoadmin !== null) { - this.notificationPromoteCoadmin = new ttypes.SquareEventNotificationMemberUpdate( - args.notificationPromoteCoadmin, - ); - } - if (args.notificationPromoteAdmin !== undefined && args.notificationPromoteAdmin !== null) { - this.notificationPromoteAdmin = new ttypes.SquareEventNotificationMemberUpdate( - args.notificationPromoteAdmin, - ); - } - if (args.notificationDemoteMember !== undefined && args.notificationDemoteMember !== null) { - this.notificationDemoteMember = new ttypes.SquareEventNotificationMemberUpdate( - args.notificationDemoteMember, - ); - } - if (args.notificationKickedOut !== undefined && args.notificationKickedOut !== null) { - this.notificationKickedOut = new ttypes.SquareEventNotificationMemberUpdate(args.notificationKickedOut); - } - if (args.notificationSquareDelete !== undefined && args.notificationSquareDelete !== null) { - this.notificationSquareDelete = new ttypes.SquareEventNotificationSquareDelete( - args.notificationSquareDelete, - ); - } - if (args.notificationSquareChatDelete !== undefined && args.notificationSquareChatDelete !== null) { - this.notificationSquareChatDelete = new ttypes.SquareEventNotificationSquareChatDelete( - args.notificationSquareChatDelete, - ); - } - if (args.notificationMessage !== undefined && args.notificationMessage !== null) { - this.notificationMessage = new ttypes.SquareEventNotificationMessage(args.notificationMessage); - } - if (args.notifiedUpdateSquareChatMember !== undefined && args.notifiedUpdateSquareChatMember !== null) { - this.notifiedUpdateSquareChatMember = new ttypes.SquareEventNotifiedUpdateSquareChatMember( - args.notifiedUpdateSquareChatMember, - ); - } - if (args.notifiedUpdateSquareAuthority !== undefined && args.notifiedUpdateSquareAuthority !== null) { - this.notifiedUpdateSquareAuthority = new ttypes.SquareEventNotifiedUpdateSquareAuthority( - args.notifiedUpdateSquareAuthority, - ); - } - if (args.notifiedUpdateSquareFeatureSet !== undefined && args.notifiedUpdateSquareFeatureSet !== null) { - this.notifiedUpdateSquareFeatureSet = new ttypes.SquareEventNotifiedUpdateSquareFeatureSet( - args.notifiedUpdateSquareFeatureSet, - ); - } - } -}; -ttypes.SquareEventPayload.prototype = {}; -ttypes.SquareEventPayload.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.receiveMessage = new ttypes.SquareEventReceiveMessage(); - this.receiveMessage.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.sendMessage = new ttypes.SquareEventSendMessage(); - this.sendMessage.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedJoinSquareChat = new ttypes.SquareEventNotifiedJoinSquareChat(); - this.notifiedJoinSquareChat.read(input); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedInviteIntoSquareChat = new ttypes.SquareEventNotifiedInviteIntoSquareChat(); - this.notifiedInviteIntoSquareChat.read(input); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedLeaveSquareChat = new ttypes.SquareEventNotifiedLeaveSquareChat(); - this.notifiedLeaveSquareChat.read(input); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedDestroyMessage = new ttypes.SquareEventNotifiedDestroyMessage(); - this.notifiedDestroyMessage.read(input); - } else { - input.skip(ftype); - } - break; - case 7: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedMarkAsRead = new ttypes.SquareEventNotifiedMarkAsRead(); - this.notifiedMarkAsRead.read(input); - } else { - input.skip(ftype); - } - break; - case 8: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedUpdateSquareMemberProfile = new ttypes.SquareEventNotifiedUpdateSquareMemberProfile(); - this.notifiedUpdateSquareMemberProfile.read(input); - } else { - input.skip(ftype); - } - break; - case 20: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedKickoutFromSquare = new ttypes.SquareEventNotifiedKickoutFromSquare(); - this.notifiedKickoutFromSquare.read(input); - } else { - input.skip(ftype); - } - break; - case 19: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedShutdownSquare = new ttypes.SquareEventNotifiedShutdownSquare(); - this.notifiedShutdownSquare.read(input); - } else { - input.skip(ftype); - } - break; - case 21: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedDeleteSquareChat = new ttypes.SquareEventNotifiedDeleteSquareChat(); - this.notifiedDeleteSquareChat.read(input); - } else { - input.skip(ftype); - } - break; - case 31: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedUpdateSquareChatProfileName = new ttypes - .SquareEventNotifiedUpdateSquareChatProfileName(); - this.notifiedUpdateSquareChatProfileName.read(input); - } else { - input.skip(ftype); - } - break; - case 32: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedUpdateSquareChatProfileImage = new ttypes - .SquareEventNotifiedUpdateSquareChatProfileImage(); - this.notifiedUpdateSquareChatProfileImage.read(input); - } else { - input.skip(ftype); - } - break; - case 14: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedUpdateSquareStatus = new ttypes.SquareEventNotifiedUpdateSquareStatus(); - this.notifiedUpdateSquareStatus.read(input); - } else { - input.skip(ftype); - } - break; - case 15: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedUpdateSquareChatStatus = new ttypes.SquareEventNotifiedUpdateSquareChatStatus(); - this.notifiedUpdateSquareChatStatus.read(input); - } else { - input.skip(ftype); - } - break; - case 16: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedCreateSquareMember = new ttypes.SquareEventNotifiedCreateSquareMember(); - this.notifiedCreateSquareMember.read(input); - } else { - input.skip(ftype); - } - break; - case 17: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedCreateSquareChatMember = new ttypes.SquareEventNotifiedCreateSquareChatMember(); - this.notifiedCreateSquareChatMember.read(input); - } else { - input.skip(ftype); - } - break; - case 18: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedUpdateSquareMemberRelation = new ttypes - .SquareEventNotifiedUpdateSquareMemberRelation(); - this.notifiedUpdateSquareMemberRelation.read(input); - } else { - input.skip(ftype); - } - break; - case 9: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedUpdateSquare = new ttypes.SquareEventNotifiedUpdateSquare(); - this.notifiedUpdateSquare.read(input); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedUpdateSquareMember = new ttypes.SquareEventNotifiedUpdateSquareMember(); - this.notifiedUpdateSquareMember.read(input); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedUpdateSquareChat = new ttypes.SquareEventNotifiedUpdateSquareChat(); - this.notifiedUpdateSquareChat.read(input); - } else { - input.skip(ftype); - } - break; - case 22: - if (ftype == Thrift.Type.STRUCT) { - this.notificationJoinRequest = new ttypes.SquareEventNotificationJoinRequest(); - this.notificationJoinRequest.read(input); - } else { - input.skip(ftype); - } - break; - case 23: - if (ftype == Thrift.Type.STRUCT) { - this.notificationJoined = new ttypes.SquareEventNotificationMemberUpdate(); - this.notificationJoined.read(input); - } else { - input.skip(ftype); - } - break; - case 24: - if (ftype == Thrift.Type.STRUCT) { - this.notificationPromoteCoadmin = new ttypes.SquareEventNotificationMemberUpdate(); - this.notificationPromoteCoadmin.read(input); - } else { - input.skip(ftype); - } - break; - case 25: - if (ftype == Thrift.Type.STRUCT) { - this.notificationPromoteAdmin = new ttypes.SquareEventNotificationMemberUpdate(); - this.notificationPromoteAdmin.read(input); - } else { - input.skip(ftype); - } - break; - case 26: - if (ftype == Thrift.Type.STRUCT) { - this.notificationDemoteMember = new ttypes.SquareEventNotificationMemberUpdate(); - this.notificationDemoteMember.read(input); - } else { - input.skip(ftype); - } - break; - case 27: - if (ftype == Thrift.Type.STRUCT) { - this.notificationKickedOut = new ttypes.SquareEventNotificationMemberUpdate(); - this.notificationKickedOut.read(input); - } else { - input.skip(ftype); - } - break; - case 28: - if (ftype == Thrift.Type.STRUCT) { - this.notificationSquareDelete = new ttypes.SquareEventNotificationSquareDelete(); - this.notificationSquareDelete.read(input); - } else { - input.skip(ftype); - } - break; - case 29: - if (ftype == Thrift.Type.STRUCT) { - this.notificationSquareChatDelete = new ttypes.SquareEventNotificationSquareChatDelete(); - this.notificationSquareChatDelete.read(input); - } else { - input.skip(ftype); - } - break; - case 30: - if (ftype == Thrift.Type.STRUCT) { - this.notificationMessage = new ttypes.SquareEventNotificationMessage(); - this.notificationMessage.read(input); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedUpdateSquareChatMember = new ttypes.SquareEventNotifiedUpdateSquareChatMember(); - this.notifiedUpdateSquareChatMember.read(input); - } else { - input.skip(ftype); - } - break; - case 13: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedUpdateSquareAuthority = new ttypes.SquareEventNotifiedUpdateSquareAuthority(); - this.notifiedUpdateSquareAuthority.read(input); - } else { - input.skip(ftype); - } - break; - case 33: - if (ftype == Thrift.Type.STRUCT) { - this.notifiedUpdateSquareFeatureSet = new ttypes.SquareEventNotifiedUpdateSquareFeatureSet(); - this.notifiedUpdateSquareFeatureSet.read(input); - } else { - input.skip(ftype); - } - break; - default: - try { - this[fid] = power(input, ftype); - } catch (e) { - console.log(e, 334); - } - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEventPayload.prototype.write = function (output) { - output.writeStructBegin("SquareEventPayload"); - if (this.receiveMessage !== null && this.receiveMessage !== undefined) { - output.writeFieldBegin("receiveMessage", Thrift.Type.STRUCT, 1); - this.receiveMessage.write(output); - output.writeFieldEnd(); - } - if (this.sendMessage !== null && this.sendMessage !== undefined) { - output.writeFieldBegin("sendMessage", Thrift.Type.STRUCT, 2); - this.sendMessage.write(output); - output.writeFieldEnd(); - } - if (this.notifiedJoinSquareChat !== null && this.notifiedJoinSquareChat !== undefined) { - output.writeFieldBegin("notifiedJoinSquareChat", Thrift.Type.STRUCT, 3); - this.notifiedJoinSquareChat.write(output); - output.writeFieldEnd(); - } - if (this.notifiedInviteIntoSquareChat !== null && this.notifiedInviteIntoSquareChat !== undefined) { - output.writeFieldBegin("notifiedInviteIntoSquareChat", Thrift.Type.STRUCT, 4); - this.notifiedInviteIntoSquareChat.write(output); - output.writeFieldEnd(); - } - if (this.notifiedLeaveSquareChat !== null && this.notifiedLeaveSquareChat !== undefined) { - output.writeFieldBegin("notifiedLeaveSquareChat", Thrift.Type.STRUCT, 5); - this.notifiedLeaveSquareChat.write(output); - output.writeFieldEnd(); - } - if (this.notifiedDestroyMessage !== null && this.notifiedDestroyMessage !== undefined) { - output.writeFieldBegin("notifiedDestroyMessage", Thrift.Type.STRUCT, 6); - this.notifiedDestroyMessage.write(output); - output.writeFieldEnd(); - } - if (this.notifiedMarkAsRead !== null && this.notifiedMarkAsRead !== undefined) { - output.writeFieldBegin("notifiedMarkAsRead", Thrift.Type.STRUCT, 7); - this.notifiedMarkAsRead.write(output); - output.writeFieldEnd(); - } - if (this.notifiedUpdateSquareMemberProfile !== null && this.notifiedUpdateSquareMemberProfile !== undefined) { - output.writeFieldBegin("notifiedUpdateSquareMemberProfile", Thrift.Type.STRUCT, 8); - this.notifiedUpdateSquareMemberProfile.write(output); - output.writeFieldEnd(); - } - if (this.notifiedKickoutFromSquare !== null && this.notifiedKickoutFromSquare !== undefined) { - output.writeFieldBegin("notifiedKickoutFromSquare", Thrift.Type.STRUCT, 20); - this.notifiedKickoutFromSquare.write(output); - output.writeFieldEnd(); - } - if (this.notifiedShutdownSquare !== null && this.notifiedShutdownSquare !== undefined) { - output.writeFieldBegin("notifiedShutdownSquare", Thrift.Type.STRUCT, 19); - this.notifiedShutdownSquare.write(output); - output.writeFieldEnd(); - } - if (this.notifiedDeleteSquareChat !== null && this.notifiedDeleteSquareChat !== undefined) { - output.writeFieldBegin("notifiedDeleteSquareChat", Thrift.Type.STRUCT, 21); - this.notifiedDeleteSquareChat.write(output); - output.writeFieldEnd(); - } - if (this.notifiedUpdateSquareChatProfileName !== null && this.notifiedUpdateSquareChatProfileName !== undefined) { - output.writeFieldBegin("notifiedUpdateSquareChatProfileName", Thrift.Type.STRUCT, 31); - this.notifiedUpdateSquareChatProfileName.write(output); - output.writeFieldEnd(); - } - if (this.notifiedUpdateSquareChatProfileImage !== null && this.notifiedUpdateSquareChatProfileImage !== undefined) { - output.writeFieldBegin("notifiedUpdateSquareChatProfileImage", Thrift.Type.STRUCT, 32); - this.notifiedUpdateSquareChatProfileImage.write(output); - output.writeFieldEnd(); - } - if (this.notifiedUpdateSquareStatus !== null && this.notifiedUpdateSquareStatus !== undefined) { - output.writeFieldBegin("notifiedUpdateSquareStatus", Thrift.Type.STRUCT, 14); - this.notifiedUpdateSquareStatus.write(output); - output.writeFieldEnd(); - } - if (this.notifiedUpdateSquareChatStatus !== null && this.notifiedUpdateSquareChatStatus !== undefined) { - output.writeFieldBegin("notifiedUpdateSquareChatStatus", Thrift.Type.STRUCT, 15); - this.notifiedUpdateSquareChatStatus.write(output); - output.writeFieldEnd(); - } - if (this.notifiedCreateSquareMember !== null && this.notifiedCreateSquareMember !== undefined) { - output.writeFieldBegin("notifiedCreateSquareMember", Thrift.Type.STRUCT, 16); - this.notifiedCreateSquareMember.write(output); - output.writeFieldEnd(); - } - if (this.notifiedCreateSquareChatMember !== null && this.notifiedCreateSquareChatMember !== undefined) { - output.writeFieldBegin("notifiedCreateSquareChatMember", Thrift.Type.STRUCT, 17); - this.notifiedCreateSquareChatMember.write(output); - output.writeFieldEnd(); - } - if (this.notifiedUpdateSquareMemberRelation !== null && this.notifiedUpdateSquareMemberRelation !== undefined) { - output.writeFieldBegin("notifiedUpdateSquareMemberRelation", Thrift.Type.STRUCT, 18); - this.notifiedUpdateSquareMemberRelation.write(output); - output.writeFieldEnd(); - } - if (this.notifiedUpdateSquare !== null && this.notifiedUpdateSquare !== undefined) { - output.writeFieldBegin("notifiedUpdateSquare", Thrift.Type.STRUCT, 9); - this.notifiedUpdateSquare.write(output); - output.writeFieldEnd(); - } - if (this.notifiedUpdateSquareMember !== null && this.notifiedUpdateSquareMember !== undefined) { - output.writeFieldBegin("notifiedUpdateSquareMember", Thrift.Type.STRUCT, 10); - this.notifiedUpdateSquareMember.write(output); - output.writeFieldEnd(); - } - if (this.notifiedUpdateSquareChat !== null && this.notifiedUpdateSquareChat !== undefined) { - output.writeFieldBegin("notifiedUpdateSquareChat", Thrift.Type.STRUCT, 11); - this.notifiedUpdateSquareChat.write(output); - output.writeFieldEnd(); - } - if (this.notificationJoinRequest !== null && this.notificationJoinRequest !== undefined) { - output.writeFieldBegin("notificationJoinRequest", Thrift.Type.STRUCT, 22); - this.notificationJoinRequest.write(output); - output.writeFieldEnd(); - } - if (this.notificationJoined !== null && this.notificationJoined !== undefined) { - output.writeFieldBegin("notificationJoined", Thrift.Type.STRUCT, 23); - this.notificationJoined.write(output); - output.writeFieldEnd(); - } - if (this.notificationPromoteCoadmin !== null && this.notificationPromoteCoadmin !== undefined) { - output.writeFieldBegin("notificationPromoteCoadmin", Thrift.Type.STRUCT, 24); - this.notificationPromoteCoadmin.write(output); - output.writeFieldEnd(); - } - if (this.notificationPromoteAdmin !== null && this.notificationPromoteAdmin !== undefined) { - output.writeFieldBegin("notificationPromoteAdmin", Thrift.Type.STRUCT, 25); - this.notificationPromoteAdmin.write(output); - output.writeFieldEnd(); - } - if (this.notificationDemoteMember !== null && this.notificationDemoteMember !== undefined) { - output.writeFieldBegin("notificationDemoteMember", Thrift.Type.STRUCT, 26); - this.notificationDemoteMember.write(output); - output.writeFieldEnd(); - } - if (this.notificationKickedOut !== null && this.notificationKickedOut !== undefined) { - output.writeFieldBegin("notificationKickedOut", Thrift.Type.STRUCT, 27); - this.notificationKickedOut.write(output); - output.writeFieldEnd(); - } - if (this.notificationSquareDelete !== null && this.notificationSquareDelete !== undefined) { - output.writeFieldBegin("notificationSquareDelete", Thrift.Type.STRUCT, 28); - this.notificationSquareDelete.write(output); - output.writeFieldEnd(); - } - if (this.notificationSquareChatDelete !== null && this.notificationSquareChatDelete !== undefined) { - output.writeFieldBegin("notificationSquareChatDelete", Thrift.Type.STRUCT, 29); - this.notificationSquareChatDelete.write(output); - output.writeFieldEnd(); - } - if (this.notificationMessage !== null && this.notificationMessage !== undefined) { - output.writeFieldBegin("notificationMessage", Thrift.Type.STRUCT, 30); - this.notificationMessage.write(output); - output.writeFieldEnd(); - } - if (this.notifiedUpdateSquareChatMember !== null && this.notifiedUpdateSquareChatMember !== undefined) { - output.writeFieldBegin("notifiedUpdateSquareChatMember", Thrift.Type.STRUCT, 12); - this.notifiedUpdateSquareChatMember.write(output); - output.writeFieldEnd(); - } - if (this.notifiedUpdateSquareAuthority !== null && this.notifiedUpdateSquareAuthority !== undefined) { - output.writeFieldBegin("notifiedUpdateSquareAuthority", Thrift.Type.STRUCT, 13); - this.notifiedUpdateSquareAuthority.write(output); - output.writeFieldEnd(); - } - if (this.notifiedUpdateSquareFeatureSet !== null && this.notifiedUpdateSquareFeatureSet !== undefined) { - output.writeFieldBegin("notifiedUpdateSquareFeatureSet", Thrift.Type.STRUCT, 33); - this.notifiedUpdateSquareFeatureSet.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareEvent = function (args) { - this.createdTime = null; - this.type = null; - this.payload = null; - this.syncToken = null; - this.eventStatus = null; - if (args) { - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.payload !== undefined && args.payload !== null) { - this.payload = new ttypes.SquareEventPayload(args.payload); - } - if (args.syncToken !== undefined && args.syncToken !== null) { - this.syncToken = args.syncToken; - } - if (args.eventStatus !== undefined && args.eventStatus !== null) { - this.eventStatus = args.eventStatus; - } - } -}; -ttypes.SquareEvent.prototype = {}; -ttypes.SquareEvent.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.I64) { - this.createdTime = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.type = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRUCT) { - this.payload = new ttypes.SquareEventPayload(); - this.payload.read(input); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.syncToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.I32) { - this.eventStatus = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareEvent.prototype.write = function (output) { - output.writeStructBegin("SquareEvent"); - if (this.createdTime !== null && this.createdTime !== undefined) { - output.writeFieldBegin("createdTime", Thrift.Type.I64, 2); - output.writeI64(this.createdTime); - output.writeFieldEnd(); - } - if (this.type !== null && this.type !== undefined) { - output.writeFieldBegin("type", Thrift.Type.I32, 3); - output.writeI32(this.type); - output.writeFieldEnd(); - } - if (this.payload !== null && this.payload !== undefined) { - output.writeFieldBegin("payload", Thrift.Type.STRUCT, 4); - this.payload.write(output); - output.writeFieldEnd(); - } - if (this.syncToken !== null && this.syncToken !== undefined) { - output.writeFieldBegin("syncToken", Thrift.Type.STRING, 5); - output.writeString(this.syncToken); - output.writeFieldEnd(); - } - if (this.eventStatus !== null && this.eventStatus !== undefined) { - output.writeFieldBegin("eventStatus", Thrift.Type.I32, 6); - output.writeI32(this.eventStatus); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.FetchMyEventsRequest = function (args) { - this.subscriptionId = null; - this.syncToken = null; - this.limit = null; - this.continuationToken = null; - if (args) { - if (args.subscriptionId !== undefined && args.subscriptionId !== null) { - this.subscriptionId = args.subscriptionId; - } - if (args.syncToken !== undefined && args.syncToken !== null) { - this.syncToken = args.syncToken; - } - if (args.limit !== undefined && args.limit !== null) { - this.limit = args.limit; - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - } -}; -ttypes.FetchMyEventsRequest.prototype = {}; -ttypes.FetchMyEventsRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.subscriptionId = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.syncToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.limit = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.continuationToken = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.FetchMyEventsRequest.prototype.write = function (output) { - output.writeStructBegin("FetchMyEventsRequest"); - if (this.subscriptionId !== null && this.subscriptionId !== undefined) { - output.writeFieldBegin("subscriptionId", Thrift.Type.I64, 1); - output.writeI64(this.subscriptionId); - output.writeFieldEnd(); - } - if (this.syncToken !== null && this.syncToken !== undefined) { - output.writeFieldBegin("syncToken", Thrift.Type.STRING, 2); - output.writeString(this.syncToken); - output.writeFieldEnd(); - } - if (this.limit !== null && this.limit !== undefined) { - output.writeFieldBegin("limit", Thrift.Type.I32, 3); - output.writeI32(this.limit); - output.writeFieldEnd(); - } - if (this.continuationToken !== null && this.continuationToken !== undefined) { - output.writeFieldBegin("continuationToken", Thrift.Type.STRING, 4); - output.writeString(this.continuationToken); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.FetchMyEventsResponse = function (args) { - this.subscription = null; - this.events = null; - this.syncToken = null; - this.continuationToken = null; - if (args) { - if (args.subscription !== undefined && args.subscription !== null) { - this.subscription = new ttypes.SubscriptionState(args.subscription); - } - if (args.events !== undefined && args.events !== null) { - this.events = Thrift.copyList(args.events, [ttypes.SquareEvent]); - } - if (args.syncToken !== undefined && args.syncToken !== null) { - this.syncToken = args.syncToken; - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - } -}; -ttypes.FetchMyEventsResponse.prototype = {}; -ttypes.FetchMyEventsResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.subscription = new ttypes.SubscriptionState(); - this.subscription.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.LIST) { - this.events = []; - var _rtmp3445 = input.readListBegin(); - var _size444 = _rtmp3445.size || 0; - for (var _i446 = 0; _i446 < _size444; ++_i446) { - var elem447 = null; - elem447 = new ttypes.SquareEvent(); - elem447.read(input); - this.events.push(elem447); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.syncToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.continuationToken = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.FetchMyEventsResponse.prototype.write = function (output) { - output.writeStructBegin("FetchMyEventsResponse"); - if (this.subscription !== null && this.subscription !== undefined) { - output.writeFieldBegin("subscription", Thrift.Type.STRUCT, 1); - this.subscription.write(output); - output.writeFieldEnd(); - } - if (this.events !== null && this.events !== undefined) { - output.writeFieldBegin("events", Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.STRUCT, this.events.length); - for (var iter448 in this.events) { - if (this.events.hasOwnProperty(iter448)) { - iter448 = this.events[iter448]; - iter448.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.syncToken !== null && this.syncToken !== undefined) { - output.writeFieldBegin("syncToken", Thrift.Type.STRING, 3); - output.writeString(this.syncToken); - output.writeFieldEnd(); - } - if (this.continuationToken !== null && this.continuationToken !== undefined) { - output.writeFieldBegin("continuationToken", Thrift.Type.STRING, 4); - output.writeString(this.continuationToken); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.FetchSquareChatEventsRequest = function (args) { - this.subscriptionId = null; - this.squareChatMid = null; - this.syncToken = null; - this.limit = null; - this.direction = null; - if (args) { - if (args.subscriptionId !== undefined && args.subscriptionId !== null) { - this.subscriptionId = args.subscriptionId; - } - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.syncToken !== undefined && args.syncToken !== null) { - this.syncToken = args.syncToken; - } - if (args.limit !== undefined && args.limit !== null) { - this.limit = args.limit; - } - if (args.direction !== undefined && args.direction !== null) { - this.direction = args.direction; - } - } -}; -ttypes.FetchSquareChatEventsRequest.prototype = {}; -ttypes.FetchSquareChatEventsRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.subscriptionId = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.syncToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.limit = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I32) { - this.direction = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.FetchSquareChatEventsRequest.prototype.write = function (output) { - output.writeStructBegin("FetchSquareChatEventsRequest"); - if (this.subscriptionId !== null && this.subscriptionId !== undefined) { - output.writeFieldBegin("subscriptionId", Thrift.Type.I64, 1); - output.writeI64(this.subscriptionId); - output.writeFieldEnd(); - } - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 2); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.syncToken !== null && this.syncToken !== undefined) { - output.writeFieldBegin("syncToken", Thrift.Type.STRING, 3); - output.writeString(this.syncToken); - output.writeFieldEnd(); - } - if (this.limit !== null && this.limit !== undefined) { - output.writeFieldBegin("limit", Thrift.Type.I32, 4); - output.writeI32(this.limit); - output.writeFieldEnd(); - } - if (this.direction !== null && this.direction !== undefined) { - output.writeFieldBegin("direction", Thrift.Type.I32, 5); - output.writeI32(this.direction); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.FetchSquareChatEventsResponse = function (args) { - this.subscription = null; - this.events = null; - this.syncToken = null; - this.continuationToken = null; - if (args) { - if (args.subscription !== undefined && args.subscription !== null) { - this.subscription = new ttypes.SubscriptionState(args.subscription); - } - if (args.events !== undefined && args.events !== null) { - this.events = Thrift.copyList(args.events, [ttypes.SquareEvent]); - } - if (args.syncToken !== undefined && args.syncToken !== null) { - this.syncToken = args.syncToken; - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - } -}; -ttypes.FetchSquareChatEventsResponse.prototype = {}; -ttypes.FetchSquareChatEventsResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret; - try { - ret = input.readFieldBegin(); - } catch (e) { - return; - } - - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.subscription = new ttypes.SubscriptionState(); - this.subscription.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.LIST) { - this.events = []; - var _rtmp3450 = input.readListBegin(); - var _size449 = _rtmp3450.size || 0; - for (var _i451 = 0; _i451 < _size449; ++_i451) { - var elem452 = null; - try { - elem452 = new ttypes.SquareEvent(); - elem452.read(input); - this.events.push(elem452); - } catch (error) { - console.log(error); - } - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.syncToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.continuationToken = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.FetchSquareChatEventsResponse.prototype.write = function (output) { - output.writeStructBegin("FetchSquareChatEventsResponse"); - if (this.subscription !== null && this.subscription !== undefined) { - output.writeFieldBegin("subscription", Thrift.Type.STRUCT, 1); - this.subscription.write(output); - output.writeFieldEnd(); - } - if (this.events !== null && this.events !== undefined) { - output.writeFieldBegin("events", Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.STRUCT, this.events.length); - for (var iter453 in this.events) { - if (this.events.hasOwnProperty(iter453)) { - iter453 = this.events[iter453]; - iter453.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.syncToken !== null && this.syncToken !== undefined) { - output.writeFieldBegin("syncToken", Thrift.Type.STRING, 3); - output.writeString(this.syncToken); - output.writeFieldEnd(); - } - if (this.continuationToken !== null && this.continuationToken !== undefined) { - output.writeFieldBegin("continuationToken", Thrift.Type.STRING, 4); - output.writeString(this.continuationToken); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.InviteToSquareRequest = function (args) { - this.squareMid = null; - this.invitees = null; - this.squareChatMid = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.invitees !== undefined && args.invitees !== null) { - this.invitees = Thrift.copyList(args.invitees, [null]); - } - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - } -}; -ttypes.InviteToSquareRequest.prototype = {}; -ttypes.InviteToSquareRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.LIST) { - this.invitees = []; - var _rtmp3455 = input.readListBegin(); - var _size454 = _rtmp3455.size || 0; - for (var _i456 = 0; _i456 < _size454; ++_i456) { - var elem457 = null; - elem457 = input.readString(); - this.invitees.push(elem457); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.InviteToSquareRequest.prototype.write = function (output) { - output.writeStructBegin("InviteToSquareRequest"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 2); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.invitees !== null && this.invitees !== undefined) { - output.writeFieldBegin("invitees", Thrift.Type.LIST, 3); - output.writeListBegin(Thrift.Type.STRING, this.invitees.length); - for (var iter458 in this.invitees) { - if (this.invitees.hasOwnProperty(iter458)) { - iter458 = this.invitees[iter458]; - output.writeString(iter458); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 4); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.InviteToSquareResponse = function (args) {}; -ttypes.InviteToSquareResponse.prototype = {}; -ttypes.InviteToSquareResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - if (ftype == Thrift.Type.STOP) { - break; - } - input.skip(ftype); - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.InviteToSquareResponse.prototype.write = function (output) { - output.writeStructBegin("InviteToSquareResponse"); - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.InviteToSquareChatRequest = function (args) { - this.inviteeMids = null; - this.squareChatMid = null; - if (args) { - if (args.inviteeMids !== undefined && args.inviteeMids !== null) { - this.inviteeMids = Thrift.copyList(args.inviteeMids, [null]); - } - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - } -}; -ttypes.InviteToSquareChatRequest.prototype = {}; -ttypes.InviteToSquareChatRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.inviteeMids = []; - var _rtmp3460 = input.readListBegin(); - var _size459 = _rtmp3460.size || 0; - for (var _i461 = 0; _i461 < _size459; ++_i461) { - var elem462 = null; - elem462 = input.readString(); - this.inviteeMids.push(elem462); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.InviteToSquareChatRequest.prototype.write = function (output) { - output.writeStructBegin("InviteToSquareChatRequest"); - if (this.inviteeMids !== null && this.inviteeMids !== undefined) { - output.writeFieldBegin("inviteeMids", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRING, this.inviteeMids.length); - for (var iter463 in this.inviteeMids) { - if (this.inviteeMids.hasOwnProperty(iter463)) { - iter463 = this.inviteeMids[iter463]; - output.writeString(iter463); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 2); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.InviteToSquareChatResponse = function (args) { - this.inviteeMids = null; - if (args) { - if (args.inviteeMids !== undefined && args.inviteeMids !== null) { - this.inviteeMids = Thrift.copyList(args.inviteeMids, [null]); - } - } -}; -ttypes.InviteToSquareChatResponse.prototype = {}; -ttypes.InviteToSquareChatResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.inviteeMids = []; - var _rtmp3465 = input.readListBegin(); - var _size464 = _rtmp3465.size || 0; - for (var _i466 = 0; _i466 < _size464; ++_i466) { - var elem467 = null; - elem467 = input.readString(); - this.inviteeMids.push(elem467); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.InviteToSquareChatResponse.prototype.write = function (output) { - output.writeStructBegin("InviteToSquareChatResponse"); - if (this.inviteeMids !== null && this.inviteeMids !== undefined) { - output.writeFieldBegin("inviteeMids", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRING, this.inviteeMids.length); - for (var iter468 in this.inviteeMids) { - if (this.inviteeMids.hasOwnProperty(iter468)) { - iter468 = this.inviteeMids[iter468]; - output.writeString(iter468); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareMemberRequest = function (args) { - this.squareMemberMid = null; - if (args) { - if (args.squareMemberMid !== undefined && args.squareMemberMid !== null) { - this.squareMemberMid = args.squareMemberMid; - } - } -}; -ttypes.GetSquareMemberRequest.prototype = {}; -ttypes.GetSquareMemberRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareMemberMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareMemberRequest.prototype.write = function (output) { - output.writeStructBegin("GetSquareMemberRequest"); - if (this.squareMemberMid !== null && this.squareMemberMid !== undefined) { - output.writeFieldBegin("squareMemberMid", Thrift.Type.STRING, 1); - output.writeString(this.squareMemberMid); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareMemberResponse = function (args) { - this.squareMember = null; - this.relation = null; - this.oneOnOneChatMid = null; - if (args) { - if (args.squareMember !== undefined && args.squareMember !== null) { - this.squareMember = new ttypes.SquareMember(args.squareMember); - } - if (args.relation !== undefined && args.relation !== null) { - this.relation = new ttypes.SquareMemberRelation(args.relation); - } - if (args.oneOnOneChatMid !== undefined && args.oneOnOneChatMid !== null) { - this.oneOnOneChatMid = args.oneOnOneChatMid; - } - } -}; -ttypes.GetSquareMemberResponse.prototype = {}; -ttypes.GetSquareMemberResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.squareMember = new ttypes.SquareMember(); - this.squareMember.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.relation = new ttypes.SquareMemberRelation(); - this.relation.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.oneOnOneChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareMemberResponse.prototype.write = function (output) { - output.writeStructBegin("GetSquareMemberResponse"); - if (this.squareMember !== null && this.squareMember !== undefined) { - output.writeFieldBegin("squareMember", Thrift.Type.STRUCT, 1); - this.squareMember.write(output); - output.writeFieldEnd(); - } - if (this.relation !== null && this.relation !== undefined) { - output.writeFieldBegin("relation", Thrift.Type.STRUCT, 2); - this.relation.write(output); - output.writeFieldEnd(); - } - if (this.oneOnOneChatMid !== null && this.oneOnOneChatMid !== undefined) { - output.writeFieldBegin("oneOnOneChatMid", Thrift.Type.STRING, 3); - output.writeString(this.oneOnOneChatMid); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareMembersRequest = function (args) { - this.mids = null; - if (args) { - if (args.mids !== undefined && args.mids !== null) { - this.mids = Thrift.copyList(args.mids, [null]); - } - } -}; -ttypes.GetSquareMembersRequest.prototype = {}; -ttypes.GetSquareMembersRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.SET) { - this.mids = []; - var _rtmp3470 = input.readSetBegin(); - var _size469 = _rtmp3470.size || 0; - for (var _i471 = 0; _i471 < _size469; ++_i471) { - var elem472 = null; - elem472 = input.readString(); - this.mids.push(elem472); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareMembersRequest.prototype.write = function (output) { - output.writeStructBegin("GetSquareMembersRequest"); - if (this.mids !== null && this.mids !== undefined) { - output.writeFieldBegin("mids", Thrift.Type.SET, 2); - output.writeSetBegin(Thrift.Type.STRING, this.mids.length); - for (var iter473 in this.mids) { - if (this.mids.hasOwnProperty(iter473)) { - iter473 = this.mids[iter473]; - output.writeString(iter473); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareMembersResponse = function (args) { - this.members = null; - if (args) { - if (args.members !== undefined && args.members !== null) { - this.members = new ttypes.SquareMember(args.members); - } - } -}; -ttypes.GetSquareMembersResponse.prototype = {}; -ttypes.GetSquareMembersResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.members = []; - var _rtmp3475 = input.readListBegin(); - var _size474 = _rtmp3475.size || 0; - for (var _i476 = 0; _i476 < _size474; ++_i476) { - var elem477 = null; - elem477 = new ttypes.SquareMember(); - elem477.read(input); - this.members.push(elem477); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareMembersResponse.prototype.write = function (output) { - output.writeStructBegin("GetSquareMembersResponse"); - if (this.members !== null && this.members !== undefined) { - output.writeFieldBegin("members", Thrift.Type.STRUCT, 1); - this.members.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareMemberRelationsRequest = function (args) { - this.state = null; - this.continuationToken = null; - this.limit = null; - if (args) { - if (args.state !== undefined && args.state !== null) { - this.state = args.state; - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.limit !== undefined && args.limit !== null) { - this.limit = args.limit; - } - } -}; -ttypes.GetSquareMemberRelationsRequest.prototype = {}; -ttypes.GetSquareMemberRelationsRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.I32) { - this.state = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.continuationToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.limit = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareMemberRelationsRequest.prototype.write = function (output) { - output.writeStructBegin("GetSquareMemberRelationsRequest"); - if (this.state !== null && this.state !== undefined) { - output.writeFieldBegin("state", Thrift.Type.I32, 2); - output.writeI32(this.state); - output.writeFieldEnd(); - } - if (this.continuationToken !== null && this.continuationToken !== undefined) { - output.writeFieldBegin("continuationToken", Thrift.Type.STRING, 3); - output.writeString(this.continuationToken); - output.writeFieldEnd(); - } - if (this.limit !== null && this.limit !== undefined) { - output.writeFieldBegin("limit", Thrift.Type.I32, 4); - output.writeI32(this.limit); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareMemberRelationsResponse = function (args) { - this.squareMembers = null; - this.relations = null; - this.continuationToken = null; - if (args) { - if (args.squareMembers !== undefined && args.squareMembers !== null) { - this.squareMembers = Thrift.copyList(args.squareMembers, [ttypes.SquareMember]); - } - if (args.relations !== undefined && args.relations !== null) { - this.relations = Thrift.copyMap(args.relations, [ttypes.SquareMemberRelation]); - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - } -}; -ttypes.GetSquareMemberRelationsResponse.prototype = {}; -ttypes.GetSquareMemberRelationsResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.squareMembers = []; - var _rtmp3475 = input.readListBegin(); - var _size474 = _rtmp3475.size || 0; - for (var _i476 = 0; _i476 < _size474; ++_i476) { - var elem477 = null; - elem477 = new ttypes.SquareMember(); - elem477.read(input); - this.squareMembers.push(elem477); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.MAP) { - this.relations = {}; - var _rtmp3479 = input.readMapBegin(); - var _size478 = _rtmp3479.size || 0; - for (var _i480 = 0; _i480 < _size478; ++_i480) { - var key481 = null; - var val482 = null; - key481 = input.readString(); - val482 = new ttypes.SquareMemberRelation(); - val482.read(input); - this.relations[key481] = val482; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.continuationToken = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareMemberRelationsResponse.prototype.write = function (output) { - output.writeStructBegin("GetSquareMemberRelationsResponse"); - if (this.squareMembers !== null && this.squareMembers !== undefined) { - output.writeFieldBegin("squareMembers", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.squareMembers.length); - for (var iter483 in this.squareMembers) { - if (this.squareMembers.hasOwnProperty(iter483)) { - iter483 = this.squareMembers[iter483]; - iter483.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.relations !== null && this.relations !== undefined) { - output.writeFieldBegin("relations", Thrift.Type.MAP, 2); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.relations)); - for (var kiter484 in this.relations) { - if (this.relations.hasOwnProperty(kiter484)) { - var viter485 = this.relations[kiter484]; - output.writeString(kiter484); - viter485.write(output); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - if (this.continuationToken !== null && this.continuationToken !== undefined) { - output.writeFieldBegin("continuationToken", Thrift.Type.STRING, 3); - output.writeString(this.continuationToken); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareMemberRelationRequest = function (args) { - this.squareMid = null; - this.targetSquareMemberMid = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.targetSquareMemberMid !== undefined && args.targetSquareMemberMid !== null) { - this.targetSquareMemberMid = args.targetSquareMemberMid; - } - } -}; -ttypes.GetSquareMemberRelationRequest.prototype = {}; -ttypes.GetSquareMemberRelationRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.targetSquareMemberMid = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareMemberRelationRequest.prototype.write = function (output) { - output.writeStructBegin("GetSquareMemberRelationRequest"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 2); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.targetSquareMemberMid !== null && this.targetSquareMemberMid !== undefined) { - output.writeFieldBegin("targetSquareMemberMid", Thrift.Type.STRING, 3); - output.writeString(this.targetSquareMemberMid); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareMemberRelationResponse = function (args) { - this.squareMid = null; - this.targetSquareMemberMid = null; - this.relation = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.targetSquareMemberMid !== undefined && args.targetSquareMemberMid !== null) { - this.targetSquareMemberMid = args.targetSquareMemberMid; - } - if (args.relation !== undefined && args.relation !== null) { - this.relation = new ttypes.SquareMemberRelation(args.relation); - } - } -}; -ttypes.GetSquareMemberRelationResponse.prototype = {}; -ttypes.GetSquareMemberRelationResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.targetSquareMemberMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.relation = new ttypes.SquareMemberRelation(); - this.relation.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareMemberRelationResponse.prototype.write = function (output) { - output.writeStructBegin("GetSquareMemberRelationResponse"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 1); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.targetSquareMemberMid !== null && this.targetSquareMemberMid !== undefined) { - output.writeFieldBegin("targetSquareMemberMid", Thrift.Type.STRING, 2); - output.writeString(this.targetSquareMemberMid); - output.writeFieldEnd(); - } - if (this.relation !== null && this.relation !== undefined) { - output.writeFieldBegin("relation", Thrift.Type.STRUCT, 3); - this.relation.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.Category = function (args) { - this.id = null; - this.name = null; - if (args) { - if (args.id !== undefined && args.id !== null) { - this.id = args.id; - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - } -}; -ttypes.Category.prototype = {}; -ttypes.Category.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.id = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.name = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.Category.prototype.write = function (output) { - output.writeStructBegin("Category"); - if (this.id !== null && this.id !== undefined) { - output.writeFieldBegin("id", Thrift.Type.I32, 1); - output.writeI32(this.id); - output.writeFieldEnd(); - } - if (this.name !== null && this.name !== undefined) { - output.writeFieldBegin("name", Thrift.Type.STRING, 2); - output.writeString(this.name); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareCategoriesRequest = function (args) {}; -ttypes.GetSquareCategoriesRequest.prototype = {}; -ttypes.GetSquareCategoriesRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - if (ftype == Thrift.Type.STOP) { - break; - } - input.skip(ftype); - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareCategoriesRequest.prototype.write = function (output) { - output.writeStructBegin("GetSquareCategoriesRequest"); - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareCategoriesResponse = function (args) { - this.categoryList = null; - if (args) { - if (args.categoryList !== undefined && args.categoryList !== null) { - this.categoryList = Thrift.copyList(args.categoryList, [ttypes.Category]); - } - } -}; -ttypes.GetSquareCategoriesResponse.prototype = {}; -ttypes.GetSquareCategoriesResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.categoryList = []; - var _rtmp3487 = input.readListBegin(); - var _size486 = _rtmp3487.size || 0; - for (var _i488 = 0; _i488 < _size486; ++_i488) { - var elem489 = null; - elem489 = new ttypes.Category(); - elem489.read(input); - this.categoryList.push(elem489); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareCategoriesResponse.prototype.write = function (output) { - output.writeStructBegin("GetSquareCategoriesResponse"); - if (this.categoryList !== null && this.categoryList !== undefined) { - output.writeFieldBegin("categoryList", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.categoryList.length); - for (var iter490 in this.categoryList) { - if (this.categoryList.hasOwnProperty(iter490)) { - iter490 = this.categoryList[iter490]; - iter490.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.UpdateSquareRequest = function (args) { - this.updatedAttrs = null; - this.square = null; - if (args) { - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.square !== undefined && args.square !== null) { - this.square = new ttypes.Square(args.square); - } - } -}; -ttypes.UpdateSquareRequest.prototype = {}; -ttypes.UpdateSquareRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.SET) { - this.updatedAttrs = []; - var _rtmp3492 = input.readSetBegin(); - var _size491 = _rtmp3492.size || 0; - for (var _i493 = 0; _i493 < _size491; ++_i493) { - var elem494 = null; - elem494 = input.readI32(); - this.updatedAttrs.push(elem494); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.square = new ttypes.Square(); - this.square.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.UpdateSquareRequest.prototype.write = function (output) { - output.writeStructBegin("UpdateSquareRequest"); - if (this.updatedAttrs !== null && this.updatedAttrs !== undefined) { - output.writeFieldBegin("updatedAttrs", Thrift.Type.SET, 2); - output.writeSetBegin(Thrift.Type.I32, this.updatedAttrs.length); - for (var iter495 in this.updatedAttrs) { - if (this.updatedAttrs.hasOwnProperty(iter495)) { - iter495 = this.updatedAttrs[iter495]; - output.writeI32(iter495); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - if (this.square !== null && this.square !== undefined) { - output.writeFieldBegin("square", Thrift.Type.STRUCT, 3); - this.square.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.UpdateSquareResponse = function (args) { - this.updatedAttrs = null; - this.square = null; - if (args) { - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.square !== undefined && args.square !== null) { - this.square = new ttypes.Square(args.square); - } - } -}; -ttypes.UpdateSquareResponse.prototype = {}; -ttypes.UpdateSquareResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.SET) { - this.updatedAttrs = []; - var _rtmp3497 = input.readSetBegin(); - var _size496 = _rtmp3497.size || 0; - for (var _i498 = 0; _i498 < _size496; ++_i498) { - var elem499 = null; - elem499 = input.readI32(); - this.updatedAttrs.push(elem499); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.square = new ttypes.Square(); - this.square.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.UpdateSquareResponse.prototype.write = function (output) { - output.writeStructBegin("UpdateSquareResponse"); - if (this.updatedAttrs !== null && this.updatedAttrs !== undefined) { - output.writeFieldBegin("updatedAttrs", Thrift.Type.SET, 1); - output.writeSetBegin(Thrift.Type.I32, this.updatedAttrs.length); - for (var iter500 in this.updatedAttrs) { - if (this.updatedAttrs.hasOwnProperty(iter500)) { - iter500 = this.updatedAttrs[iter500]; - output.writeI32(iter500); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - if (this.square !== null && this.square !== undefined) { - output.writeFieldBegin("square", Thrift.Type.STRUCT, 2); - this.square.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SearchSquaresRequest = function (args) { - this.query = null; - this.continuationToken = null; - this.limit = null; - if (args) { - if (args.query !== undefined && args.query !== null) { - this.query = args.query; - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.limit !== undefined && args.limit !== null) { - this.limit = args.limit; - } - } -}; -ttypes.SearchSquaresRequest.prototype = {}; -ttypes.SearchSquaresRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.query = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.continuationToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.I32) { - this.limit = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SearchSquaresRequest.prototype.write = function (output) { - output.writeStructBegin("SearchSquaresRequest"); - if (this.query !== null && this.query !== undefined) { - output.writeFieldBegin("query", Thrift.Type.STRING, 2); - output.writeString(this.query); - output.writeFieldEnd(); - } - if (this.continuationToken !== null && this.continuationToken !== undefined) { - output.writeFieldBegin("continuationToken", Thrift.Type.STRING, 3); - output.writeString(this.continuationToken); - output.writeFieldEnd(); - } - if (this.limit !== null && this.limit !== undefined) { - output.writeFieldBegin("limit", Thrift.Type.I32, 4); - output.writeI32(this.limit); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SearchSquaresResponse = function (args) { - this.squares = null; - this.squareStatuses = null; - this.myMemberships = null; - this.continuationToken = null; - this.noteStatuses = null; - if (args) { - if (args.squares !== undefined && args.squares !== null) { - this.squares = Thrift.copyList(args.squares, [ttypes.Square]); - } - if (args.squareStatuses !== undefined && args.squareStatuses !== null) { - this.squareStatuses = Thrift.copyMap(args.squareStatuses, [ttypes.SquareStatus]); - } - if (args.myMemberships !== undefined && args.myMemberships !== null) { - this.myMemberships = Thrift.copyMap(args.myMemberships, [ttypes.SquareMember]); - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.noteStatuses !== undefined && args.noteStatuses !== null) { - this.noteStatuses = Thrift.copyMap(args.noteStatuses, [ttypes.NoteStatus]); - } - } -}; -ttypes.SearchSquaresResponse.prototype = {}; -ttypes.SearchSquaresResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.squares = []; - var _rtmp3502 = input.readListBegin(); - var _size501 = _rtmp3502.size || 0; - for (var _i503 = 0; _i503 < _size501; ++_i503) { - var elem504 = null; - elem504 = new ttypes.Square(); - elem504.read(input); - this.squares.push(elem504); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.MAP) { - this.squareStatuses = {}; - var _rtmp3506 = input.readMapBegin(); - var _size505 = _rtmp3506.size || 0; - for (var _i507 = 0; _i507 < _size505; ++_i507) { - var key508 = null; - var val509 = null; - key508 = input.readString(); - val509 = new ttypes.SquareStatus(); - val509.read(input); - this.squareStatuses[key508] = val509; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.MAP) { - this.myMemberships = {}; - var _rtmp3511 = input.readMapBegin(); - var _size510 = _rtmp3511.size || 0; - for (var _i512 = 0; _i512 < _size510; ++_i512) { - var key513 = null; - var val514 = null; - key513 = input.readString(); - val514 = new ttypes.SquareMember(); - val514.read(input); - this.myMemberships[key513] = val514; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.continuationToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.MAP) { - this.noteStatuses = {}; - var _rtmp3516 = input.readMapBegin(); - var _size515 = _rtmp3516.size || 0; - for (var _i517 = 0; _i517 < _size515; ++_i517) { - var key518 = null; - var val519 = null; - key518 = input.readString(); - val519 = new ttypes.NoteStatus(); - val519.read(input); - this.noteStatuses[key518] = val519; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SearchSquaresResponse.prototype.write = function (output) { - output.writeStructBegin("SearchSquaresResponse"); - if (this.squares !== null && this.squares !== undefined) { - output.writeFieldBegin("squares", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.squares.length); - for (var iter520 in this.squares) { - if (this.squares.hasOwnProperty(iter520)) { - iter520 = this.squares[iter520]; - iter520.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.squareStatuses !== null && this.squareStatuses !== undefined) { - output.writeFieldBegin("squareStatuses", Thrift.Type.MAP, 2); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.squareStatuses)); - for (var kiter521 in this.squareStatuses) { - if (this.squareStatuses.hasOwnProperty(kiter521)) { - var viter522 = this.squareStatuses[kiter521]; - output.writeString(kiter521); - viter522.write(output); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - if (this.myMemberships !== null && this.myMemberships !== undefined) { - output.writeFieldBegin("myMemberships", Thrift.Type.MAP, 3); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.myMemberships)); - for (var kiter523 in this.myMemberships) { - if (this.myMemberships.hasOwnProperty(kiter523)) { - var viter524 = this.myMemberships[kiter523]; - output.writeString(kiter523); - viter524.write(output); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - if (this.continuationToken !== null && this.continuationToken !== undefined) { - output.writeFieldBegin("continuationToken", Thrift.Type.STRING, 4); - output.writeString(this.continuationToken); - output.writeFieldEnd(); - } - if (this.noteStatuses !== null && this.noteStatuses !== undefined) { - output.writeFieldBegin("noteStatuses", Thrift.Type.MAP, 5); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.noteStatuses)); - for (var kiter525 in this.noteStatuses) { - if (this.noteStatuses.hasOwnProperty(kiter525)) { - var viter526 = this.noteStatuses[kiter525]; - output.writeString(kiter525); - viter526.write(output); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareFeatureSetRequest = function (args) { - this.squareMid = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - } -}; -ttypes.GetSquareFeatureSetRequest.prototype = {}; -ttypes.GetSquareFeatureSetRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareFeatureSetRequest.prototype.write = function (output) { - output.writeStructBegin("GetSquareFeatureSetRequest"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 2); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareFeatureSetResponse = function (args) { - this.squareFeatureSet = null; - if (args) { - if (args.squareFeatureSet !== undefined && args.squareFeatureSet !== null) { - this.squareFeatureSet = new ttypes.SquareFeatureSet(args.squareFeatureSet); - } - } -}; -ttypes.GetSquareFeatureSetResponse.prototype = {}; -ttypes.GetSquareFeatureSetResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.squareFeatureSet = new ttypes.SquareFeatureSet(); - this.squareFeatureSet.read(input); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareFeatureSetResponse.prototype.write = function (output) { - output.writeStructBegin("GetSquareFeatureSetResponse"); - if (this.squareFeatureSet !== null && this.squareFeatureSet !== undefined) { - output.writeFieldBegin("squareFeatureSet", Thrift.Type.STRUCT, 1); - this.squareFeatureSet.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.UpdateSquareFeatureSetRequest = function (args) { - this.updateAttributes = null; - this.squareFeatureSet = null; - if (args) { - if (args.updateAttributes !== undefined && args.updateAttributes !== null) { - this.updateAttributes = Thrift.copyList(args.updateAttributes, [null]); - } - if (args.squareFeatureSet !== undefined && args.squareFeatureSet !== null) { - this.squareFeatureSet = new ttypes.SquareFeatureSet(args.squareFeatureSet); - } - } -}; -ttypes.UpdateSquareFeatureSetRequest.prototype = {}; -ttypes.UpdateSquareFeatureSetRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.SET) { - this.updateAttributes = []; - var _rtmp3528 = input.readSetBegin(); - var _size527 = _rtmp3528.size || 0; - for (var _i529 = 0; _i529 < _size527; ++_i529) { - var elem530 = null; - elem530 = input.readI32(); - this.updateAttributes.push(elem530); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.squareFeatureSet = new ttypes.SquareFeatureSet(); - this.squareFeatureSet.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.UpdateSquareFeatureSetRequest.prototype.write = function (output) { - output.writeStructBegin("UpdateSquareFeatureSetRequest"); - if (this.updateAttributes !== null && this.updateAttributes !== undefined) { - output.writeFieldBegin("updateAttributes", Thrift.Type.SET, 2); - output.writeSetBegin(Thrift.Type.I32, this.updateAttributes.length); - for (var iter531 in this.updateAttributes) { - if (this.updateAttributes.hasOwnProperty(iter531)) { - iter531 = this.updateAttributes[iter531]; - output.writeI32(iter531); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - if (this.squareFeatureSet !== null && this.squareFeatureSet !== undefined) { - output.writeFieldBegin("squareFeatureSet", Thrift.Type.STRUCT, 3); - this.squareFeatureSet.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.UpdateSquareFeatureSetResponse = function (args) { - this.updateAttributes = null; - this.squareFeatureSet = null; - if (args) { - if (args.updateAttributes !== undefined && args.updateAttributes !== null) { - this.updateAttributes = Thrift.copyList(args.updateAttributes, [null]); - } - if (args.squareFeatureSet !== undefined && args.squareFeatureSet !== null) { - this.squareFeatureSet = new ttypes.SquareFeatureSet(args.squareFeatureSet); - } - } -}; -ttypes.UpdateSquareFeatureSetResponse.prototype = {}; -ttypes.UpdateSquareFeatureSetResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.SET) { - this.updateAttributes = []; - var _rtmp3533 = input.readSetBegin(); - var _size532 = _rtmp3533.size || 0; - for (var _i534 = 0; _i534 < _size532; ++_i534) { - var elem535 = null; - elem535 = input.readI32(); - this.updateAttributes.push(elem535); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.squareFeatureSet = new ttypes.SquareFeatureSet(); - this.squareFeatureSet.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.UpdateSquareFeatureSetResponse.prototype.write = function (output) { - output.writeStructBegin("UpdateSquareFeatureSetResponse"); - if (this.updateAttributes !== null && this.updateAttributes !== undefined) { - output.writeFieldBegin("updateAttributes", Thrift.Type.SET, 1); - output.writeSetBegin(Thrift.Type.I32, this.updateAttributes.length); - for (var iter536 in this.updateAttributes) { - if (this.updateAttributes.hasOwnProperty(iter536)) { - iter536 = this.updateAttributes[iter536]; - output.writeI32(iter536); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - if (this.squareFeatureSet !== null && this.squareFeatureSet !== undefined) { - output.writeFieldBegin("squareFeatureSet", Thrift.Type.STRUCT, 2); - this.squareFeatureSet.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.UpdateSquareMemberRequest = function (args) { - this.updatedAttrs = null; - this.updatedPreferenceAttrs = null; - this.squareMember = null; - if (args) { - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.updatedPreferenceAttrs !== undefined && args.updatedPreferenceAttrs !== null) { - this.updatedPreferenceAttrs = Thrift.copyList(args.updatedPreferenceAttrs, [null]); - } - if (args.squareMember !== undefined && args.squareMember !== null) { - this.squareMember = new ttypes.SquareMember(args.squareMember); - } - } -}; -ttypes.UpdateSquareMemberRequest.prototype = {}; -ttypes.UpdateSquareMemberRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.SET) { - this.updatedAttrs = []; - var _rtmp3538 = input.readSetBegin(); - var _size537 = _rtmp3538.size || 0; - for (var _i539 = 0; _i539 < _size537; ++_i539) { - var elem540 = null; - elem540 = input.readI32(); - this.updatedAttrs.push(elem540); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.SET) { - this.updatedPreferenceAttrs = []; - var _rtmp3542 = input.readSetBegin(); - var _size541 = _rtmp3542.size || 0; - for (var _i543 = 0; _i543 < _size541; ++_i543) { - var elem544 = null; - elem544 = input.readI32(); - this.updatedPreferenceAttrs.push(elem544); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRUCT) { - this.squareMember = new ttypes.SquareMember(); - this.squareMember.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.UpdateSquareMemberRequest.prototype.write = function (output) { - output.writeStructBegin("UpdateSquareMemberRequest"); - if (this.updatedAttrs !== null && this.updatedAttrs !== undefined) { - output.writeFieldBegin("updatedAttrs", Thrift.Type.SET, 2); - output.writeSetBegin(Thrift.Type.I32, this.updatedAttrs.length); - for (var iter545 in this.updatedAttrs) { - if (this.updatedAttrs.hasOwnProperty(iter545)) { - iter545 = this.updatedAttrs[iter545]; - output.writeI32(iter545); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - if (this.updatedPreferenceAttrs !== null && this.updatedPreferenceAttrs !== undefined) { - output.writeFieldBegin("updatedPreferenceAttrs", Thrift.Type.SET, 3); - output.writeSetBegin(Thrift.Type.I32, this.updatedPreferenceAttrs.length); - for (var iter546 in this.updatedPreferenceAttrs) { - if (this.updatedPreferenceAttrs.hasOwnProperty(iter546)) { - iter546 = this.updatedPreferenceAttrs[iter546]; - output.writeI32(iter546); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - if (this.squareMember !== null && this.squareMember !== undefined) { - output.writeFieldBegin("squareMember", Thrift.Type.STRUCT, 4); - this.squareMember.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.UpdateSquareMemberResponse = function (args) { - this.updatedAttrs = null; - this.squareMember = null; - this.updatedPreferenceAttrs = null; - if (args) { - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.squareMember !== undefined && args.squareMember !== null) { - this.squareMember = new ttypes.SquareMember(args.squareMember); - } - if (args.updatedPreferenceAttrs !== undefined && args.updatedPreferenceAttrs !== null) { - this.updatedPreferenceAttrs = Thrift.copyList(args.updatedPreferenceAttrs, [null]); - } - } -}; -ttypes.UpdateSquareMemberResponse.prototype = {}; -ttypes.UpdateSquareMemberResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.SET) { - this.updatedAttrs = []; - var _rtmp3548 = input.readSetBegin(); - var _size547 = _rtmp3548.size || 0; - for (var _i549 = 0; _i549 < _size547; ++_i549) { - var elem550 = null; - elem550 = input.readI32(); - this.updatedAttrs.push(elem550); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.squareMember = new ttypes.SquareMember(); - this.squareMember.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.SET) { - this.updatedPreferenceAttrs = []; - var _rtmp3552 = input.readSetBegin(); - var _size551 = _rtmp3552.size || 0; - for (var _i553 = 0; _i553 < _size551; ++_i553) { - var elem554 = null; - elem554 = input.readI32(); - this.updatedPreferenceAttrs.push(elem554); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.UpdateSquareMemberResponse.prototype.write = function (output) { - output.writeStructBegin("UpdateSquareMemberResponse"); - if (this.updatedAttrs !== null && this.updatedAttrs !== undefined) { - output.writeFieldBegin("updatedAttrs", Thrift.Type.SET, 1); - output.writeSetBegin(Thrift.Type.I32, this.updatedAttrs.length); - for (var iter555 in this.updatedAttrs) { - if (this.updatedAttrs.hasOwnProperty(iter555)) { - iter555 = this.updatedAttrs[iter555]; - output.writeI32(iter555); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - if (this.squareMember !== null && this.squareMember !== undefined) { - output.writeFieldBegin("squareMember", Thrift.Type.STRUCT, 2); - this.squareMember.write(output); - output.writeFieldEnd(); - } - if (this.updatedPreferenceAttrs !== null && this.updatedPreferenceAttrs !== undefined) { - output.writeFieldBegin("updatedPreferenceAttrs", Thrift.Type.SET, 3); - output.writeSetBegin(Thrift.Type.I32, this.updatedPreferenceAttrs.length); - for (var iter556 in this.updatedPreferenceAttrs) { - if (this.updatedPreferenceAttrs.hasOwnProperty(iter556)) { - iter556 = this.updatedPreferenceAttrs[iter556]; - output.writeI32(iter556); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.UpdateSquareMembersRequest = function (args) { - this.updatedAttrs = null; - this.members = null; - if (args) { - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.members !== undefined && args.members !== null) { - this.members = Thrift.copyList(args.members, [ttypes.SquareMember]); - } - } -}; -ttypes.UpdateSquareMembersRequest.prototype = {}; -ttypes.UpdateSquareMembersRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.SET) { - this.updatedAttrs = []; - var _rtmp3558 = input.readSetBegin(); - var _size557 = _rtmp3558.size || 0; - for (var _i559 = 0; _i559 < _size557; ++_i559) { - var elem560 = null; - elem560 = input.readI32(); - this.updatedAttrs.push(elem560); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.LIST) { - this.members = []; - var _rtmp3562 = input.readListBegin(); - var _size561 = _rtmp3562.size || 0; - for (var _i563 = 0; _i563 < _size561; ++_i563) { - var elem564 = null; - elem564 = new ttypes.SquareMember(); - elem564.read(input); - this.members.push(elem564); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.UpdateSquareMembersRequest.prototype.write = function (output) { - output.writeStructBegin("UpdateSquareMembersRequest"); - if (this.updatedAttrs !== null && this.updatedAttrs !== undefined) { - output.writeFieldBegin("updatedAttrs", Thrift.Type.SET, 2); - output.writeSetBegin(Thrift.Type.I32, this.updatedAttrs.length); - for (var iter565 in this.updatedAttrs) { - if (this.updatedAttrs.hasOwnProperty(iter565)) { - iter565 = this.updatedAttrs[iter565]; - output.writeI32(iter565); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - if (this.members !== null && this.members !== undefined) { - output.writeFieldBegin("members", Thrift.Type.LIST, 3); - output.writeListBegin(Thrift.Type.STRUCT, this.members.length); - for (var iter566 in this.members) { - if (this.members.hasOwnProperty(iter566)) { - iter566 = this.members[iter566]; - iter566.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.UpdateSquareMembersResponse = function (args) { - this.updatedAttrs = null; - this.editor = null; - this.members = null; - if (args) { - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.editor !== undefined && args.editor !== null) { - this.editor = new ttypes.SquareMember(args.editor); - } - if (args.members !== undefined && args.members !== null) { - this.members = Thrift.copyMap(args.members, [ttypes.SquareMember]); - } - } -}; -ttypes.UpdateSquareMembersResponse.prototype = {}; -ttypes.UpdateSquareMembersResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.SET) { - this.updatedAttrs = []; - var _rtmp3568 = input.readSetBegin(); - var _size567 = _rtmp3568.size || 0; - for (var _i569 = 0; _i569 < _size567; ++_i569) { - var elem570 = null; - elem570 = input.readI32(); - this.updatedAttrs.push(elem570); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.editor = new ttypes.SquareMember(); - this.editor.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.MAP) { - this.members = {}; - var _rtmp3572 = input.readMapBegin(); - var _size571 = _rtmp3572.size || 0; - for (var _i573 = 0; _i573 < _size571; ++_i573) { - var key574 = null; - var val575 = null; - key574 = input.readString(); - val575 = new ttypes.SquareMember(); - val575.read(input); - this.members[key574] = val575; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.UpdateSquareMembersResponse.prototype.write = function (output) { - output.writeStructBegin("UpdateSquareMembersResponse"); - if (this.updatedAttrs !== null && this.updatedAttrs !== undefined) { - output.writeFieldBegin("updatedAttrs", Thrift.Type.SET, 1); - output.writeSetBegin(Thrift.Type.I32, this.updatedAttrs.length); - for (var iter576 in this.updatedAttrs) { - if (this.updatedAttrs.hasOwnProperty(iter576)) { - iter576 = this.updatedAttrs[iter576]; - output.writeI32(iter576); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - if (this.editor !== null && this.editor !== undefined) { - output.writeFieldBegin("editor", Thrift.Type.STRUCT, 2); - this.editor.write(output); - output.writeFieldEnd(); - } - if (this.members !== null && this.members !== undefined) { - output.writeFieldBegin("members", Thrift.Type.MAP, 3); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.members)); - for (var kiter577 in this.members) { - if (this.members.hasOwnProperty(kiter577)) { - var viter578 = this.members[kiter577]; - output.writeString(kiter577); - viter578.write(output); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.RejectSquareMembersRequest = function (args) { - this.squareMid = null; - this.requestedMemberMids = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.requestedMemberMids !== undefined && args.requestedMemberMids !== null) { - this.requestedMemberMids = Thrift.copyList(args.requestedMemberMids, [null]); - } - } -}; -ttypes.RejectSquareMembersRequest.prototype = {}; -ttypes.RejectSquareMembersRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.LIST) { - this.requestedMemberMids = []; - var _rtmp3580 = input.readListBegin(); - var _size579 = _rtmp3580.size || 0; - for (var _i581 = 0; _i581 < _size579; ++_i581) { - var elem582 = null; - elem582 = input.readString(); - this.requestedMemberMids.push(elem582); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.RejectSquareMembersRequest.prototype.write = function (output) { - output.writeStructBegin("RejectSquareMembersRequest"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 2); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.requestedMemberMids !== null && this.requestedMemberMids !== undefined) { - output.writeFieldBegin("requestedMemberMids", Thrift.Type.LIST, 3); - output.writeListBegin(Thrift.Type.STRING, this.requestedMemberMids.length); - for (var iter583 in this.requestedMemberMids) { - if (this.requestedMemberMids.hasOwnProperty(iter583)) { - iter583 = this.requestedMemberMids[iter583]; - output.writeString(iter583); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.RejectSquareMembersResponse = function (args) { - this.rejectedMembers = null; - this.status = null; - if (args) { - if (args.rejectedMembers !== undefined && args.rejectedMembers !== null) { - this.rejectedMembers = Thrift.copyList(args.rejectedMembers, [ttypes.SquareMember]); - } - if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.SquareStatus(args.status); - } - } -}; -ttypes.RejectSquareMembersResponse.prototype = {}; -ttypes.RejectSquareMembersResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.rejectedMembers = []; - var _rtmp3585 = input.readListBegin(); - var _size584 = _rtmp3585.size || 0; - for (var _i586 = 0; _i586 < _size584; ++_i586) { - var elem587 = null; - elem587 = new ttypes.SquareMember(); - elem587.read(input); - this.rejectedMembers.push(elem587); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.SquareStatus(); - this.status.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.RejectSquareMembersResponse.prototype.write = function (output) { - output.writeStructBegin("RejectSquareMembersResponse"); - if (this.rejectedMembers !== null && this.rejectedMembers !== undefined) { - output.writeFieldBegin("rejectedMembers", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.rejectedMembers.length); - for (var iter588 in this.rejectedMembers) { - if (this.rejectedMembers.hasOwnProperty(iter588)) { - iter588 = this.rejectedMembers[iter588]; - iter588.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.status !== null && this.status !== undefined) { - output.writeFieldBegin("status", Thrift.Type.STRUCT, 2); - this.status.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.RemoveSubscriptionsRequest = function (args) { - this.unsubscriptions = null; - if (args) { - if (args.unsubscriptions !== undefined && args.unsubscriptions !== null) { - this.unsubscriptions = Thrift.copyList(args.unsubscriptions, [null]); - } - } -}; -ttypes.RemoveSubscriptionsRequest.prototype = {}; -ttypes.RemoveSubscriptionsRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.LIST) { - this.unsubscriptions = []; - var _rtmp3590 = input.readListBegin(); - var _size589 = _rtmp3590.size || 0; - for (var _i591 = 0; _i591 < _size589; ++_i591) { - var elem592 = null; - elem592 = input.readI64(); - this.unsubscriptions.push(elem592); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.RemoveSubscriptionsRequest.prototype.write = function (output) { - output.writeStructBegin("RemoveSubscriptionsRequest"); - if (this.unsubscriptions !== null && this.unsubscriptions !== undefined) { - output.writeFieldBegin("unsubscriptions", Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.I64, this.unsubscriptions.length); - for (var iter593 in this.unsubscriptions) { - if (this.unsubscriptions.hasOwnProperty(iter593)) { - iter593 = this.unsubscriptions[iter593]; - output.writeI64(iter593); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.RemoveSubscriptionsResponse = function (args) {}; -ttypes.RemoveSubscriptionsResponse.prototype = {}; -ttypes.RemoveSubscriptionsResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - if (ftype == Thrift.Type.STOP) { - break; - } - input.skip(ftype); - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.RemoveSubscriptionsResponse.prototype.write = function (output) { - output.writeStructBegin("RemoveSubscriptionsResponse"); - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.RefreshSubscriptionsRequest = function (args) { - this.subscriptions = null; - if (args) { - if (args.subscriptions !== undefined && args.subscriptions !== null) { - this.subscriptions = Thrift.copyList(args.subscriptions, [null]); - } - } -}; -ttypes.RefreshSubscriptionsRequest.prototype = {}; -ttypes.RefreshSubscriptionsRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.LIST) { - this.subscriptions = []; - var _rtmp3595 = input.readListBegin(); - var _size594 = _rtmp3595.size || 0; - for (var _i596 = 0; _i596 < _size594; ++_i596) { - var elem597 = null; - elem597 = input.readI64(); - this.subscriptions.push(elem597); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.RefreshSubscriptionsRequest.prototype.write = function (output) { - output.writeStructBegin("RefreshSubscriptionsRequest"); - if (this.subscriptions !== null && this.subscriptions !== undefined) { - output.writeFieldBegin("subscriptions", Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.I64, this.subscriptions.length); - for (var iter598 in this.subscriptions) { - if (this.subscriptions.hasOwnProperty(iter598)) { - iter598 = this.subscriptions[iter598]; - output.writeI64(iter598); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.RefreshSubscriptionsResponse = function (args) { - this.ttlMillis = null; - this.subscriptionStates = null; - if (args) { - if (args.ttlMillis !== undefined && args.ttlMillis !== null) { - this.ttlMillis = args.ttlMillis; - } - if (args.subscriptionStates !== undefined && args.subscriptionStates !== null) { - this.subscriptionStates = Thrift.copyMap(args.subscriptionStates, [ttypes.SubscriptionState]); - } - } -}; -ttypes.RefreshSubscriptionsResponse.prototype = {}; -ttypes.RefreshSubscriptionsResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.ttlMillis = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.MAP) { - this.subscriptionStates = {}; - var _rtmp3600 = input.readMapBegin(); - var _size599 = _rtmp3600.size || 0; - for (var _i601 = 0; _i601 < _size599; ++_i601) { - var key602 = null; - var val603 = null; - key602 = input.readI64(); - val603 = new ttypes.SubscriptionState(); - val603.read(input); - this.subscriptionStates[key602] = val603; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.RefreshSubscriptionsResponse.prototype.write = function (output) { - output.writeStructBegin("RefreshSubscriptionsResponse"); - if (this.ttlMillis !== null && this.ttlMillis !== undefined) { - output.writeFieldBegin("ttlMillis", Thrift.Type.I64, 1); - output.writeI64(this.ttlMillis); - output.writeFieldEnd(); - } - if (this.subscriptionStates !== null && this.subscriptionStates !== undefined) { - output.writeFieldBegin("subscriptionStates", Thrift.Type.MAP, 2); - output.writeMapBegin(Thrift.Type.I64, Thrift.Type.STRUCT, Thrift.objectLength(this.subscriptionStates)); - for (var kiter604 in this.subscriptionStates) { - if (this.subscriptionStates.hasOwnProperty(kiter604)) { - var viter605 = this.subscriptionStates[kiter604]; - output.writeI64(kiter604); - viter605.write(output); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.UpdateSquareChatRequest = function (args) { - this.updatedAttrs = null; - this.squareChat = null; - if (args) { - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.squareChat !== undefined && args.squareChat !== null) { - this.squareChat = new ttypes.SquareChat(args.squareChat); - } - } -}; -ttypes.UpdateSquareChatRequest.prototype = {}; -ttypes.UpdateSquareChatRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.SET) { - this.updatedAttrs = []; - var _rtmp3607 = input.readSetBegin(); - var _size606 = _rtmp3607.size || 0; - for (var _i608 = 0; _i608 < _size606; ++_i608) { - var elem609 = null; - elem609 = input.readI32(); - this.updatedAttrs.push(elem609); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.squareChat = new ttypes.SquareChat(); - this.squareChat.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.UpdateSquareChatRequest.prototype.write = function (output) { - output.writeStructBegin("UpdateSquareChatRequest"); - if (this.updatedAttrs !== null && this.updatedAttrs !== undefined) { - output.writeFieldBegin("updatedAttrs", Thrift.Type.SET, 2); - output.writeSetBegin(Thrift.Type.I32, this.updatedAttrs.length); - for (var iter610 in this.updatedAttrs) { - if (this.updatedAttrs.hasOwnProperty(iter610)) { - iter610 = this.updatedAttrs[iter610]; - output.writeI32(iter610); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - if (this.squareChat !== null && this.squareChat !== undefined) { - output.writeFieldBegin("squareChat", Thrift.Type.STRUCT, 3); - this.squareChat.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.UpdateSquareChatResponse = function (args) { - this.updatedAttrs = null; - this.squareChat = null; - if (args) { - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.squareChat !== undefined && args.squareChat !== null) { - this.squareChat = new ttypes.SquareChat(args.squareChat); - } - } -}; -ttypes.UpdateSquareChatResponse.prototype = {}; -ttypes.UpdateSquareChatResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.SET) { - this.updatedAttrs = []; - var _rtmp3612 = input.readSetBegin(); - var _size611 = _rtmp3612.size || 0; - for (var _i613 = 0; _i613 < _size611; ++_i613) { - var elem614 = null; - elem614 = input.readI32(); - this.updatedAttrs.push(elem614); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.squareChat = new ttypes.SquareChat(); - this.squareChat.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.UpdateSquareChatResponse.prototype.write = function (output) { - output.writeStructBegin("UpdateSquareChatResponse"); - if (this.updatedAttrs !== null && this.updatedAttrs !== undefined) { - output.writeFieldBegin("updatedAttrs", Thrift.Type.SET, 1); - output.writeSetBegin(Thrift.Type.I32, this.updatedAttrs.length); - for (var iter615 in this.updatedAttrs) { - if (this.updatedAttrs.hasOwnProperty(iter615)) { - iter615 = this.updatedAttrs[iter615]; - output.writeI32(iter615); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - if (this.squareChat !== null && this.squareChat !== undefined) { - output.writeFieldBegin("squareChat", Thrift.Type.STRUCT, 2); - this.squareChat.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.DeleteSquareChatRequest = function (args) { - this.squareChatMid = null; - this.revision = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - } -}; -ttypes.DeleteSquareChatRequest.prototype = {}; -ttypes.DeleteSquareChatRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I64) { - this.revision = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.DeleteSquareChatRequest.prototype.write = function (output) { - output.writeStructBegin("DeleteSquareChatRequest"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 2); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.revision !== null && this.revision !== undefined) { - output.writeFieldBegin("revision", Thrift.Type.I64, 3); - output.writeI64(this.revision); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.DeleteSquareChatResponse = function (args) {}; -ttypes.DeleteSquareChatResponse.prototype = {}; -ttypes.DeleteSquareChatResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - if (ftype == Thrift.Type.STOP) { - break; - } - input.skip(ftype); - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.DeleteSquareChatResponse.prototype.write = function (output) { - output.writeStructBegin("DeleteSquareChatResponse"); - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.UpdateSquareChatMemberRequest = function (args) { - this.updatedAttrs = null; - this.chatMember = null; - if (args) { - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.chatMember !== undefined && args.chatMember !== null) { - this.chatMember = new ttypes.SquareChatMember(args.chatMember); - } - } -}; -ttypes.UpdateSquareChatMemberRequest.prototype = {}; -ttypes.UpdateSquareChatMemberRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.SET) { - this.updatedAttrs = []; - var _rtmp3617 = input.readSetBegin(); - var _size616 = _rtmp3617.size || 0; - for (var _i618 = 0; _i618 < _size616; ++_i618) { - var elem619 = null; - elem619 = input.readI32(); - this.updatedAttrs.push(elem619); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.chatMember = new ttypes.SquareChatMember(); - this.chatMember.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.UpdateSquareChatMemberRequest.prototype.write = function (output) { - output.writeStructBegin("UpdateSquareChatMemberRequest"); - if (this.updatedAttrs !== null && this.updatedAttrs !== undefined) { - output.writeFieldBegin("updatedAttrs", Thrift.Type.SET, 2); - output.writeSetBegin(Thrift.Type.I32, this.updatedAttrs.length); - for (var iter620 in this.updatedAttrs) { - if (this.updatedAttrs.hasOwnProperty(iter620)) { - iter620 = this.updatedAttrs[iter620]; - output.writeI32(iter620); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - if (this.chatMember !== null && this.chatMember !== undefined) { - output.writeFieldBegin("chatMember", Thrift.Type.STRUCT, 3); - this.chatMember.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.UpdateSquareChatMemberResponse = function (args) { - this.updatedChatMember = null; - if (args) { - if (args.updatedChatMember !== undefined && args.updatedChatMember !== null) { - this.updatedChatMember = new ttypes.SquareChatMember(args.updatedChatMember); - } - } -}; -ttypes.UpdateSquareChatMemberResponse.prototype = {}; -ttypes.UpdateSquareChatMemberResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.updatedChatMember = new ttypes.SquareChatMember(); - this.updatedChatMember.read(input); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.UpdateSquareChatMemberResponse.prototype.write = function (output) { - output.writeStructBegin("UpdateSquareChatMemberResponse"); - if (this.updatedChatMember !== null && this.updatedChatMember !== undefined) { - output.writeFieldBegin("updatedChatMember", Thrift.Type.STRUCT, 1); - this.updatedChatMember.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.UpdateSquareAuthorityRequest = function (args) { - this.updateAttributes = null; - this.authority = null; - if (args) { - if (args.updateAttributes !== undefined && args.updateAttributes !== null) { - this.updateAttributes = Thrift.copyList(args.updateAttributes, [null]); - } - if (args.authority !== undefined && args.authority !== null) { - this.authority = new ttypes.SquareAuthority(args.authority); - } - } -}; -ttypes.UpdateSquareAuthorityRequest.prototype = {}; -ttypes.UpdateSquareAuthorityRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.SET) { - this.updateAttributes = []; - var _rtmp3622 = input.readSetBegin(); - var _size621 = _rtmp3622.size || 0; - for (var _i623 = 0; _i623 < _size621; ++_i623) { - var elem624 = null; - elem624 = input.readI32(); - this.updateAttributes.push(elem624); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.authority = new ttypes.SquareAuthority(); - this.authority.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.UpdateSquareAuthorityRequest.prototype.write = function (output) { - output.writeStructBegin("UpdateSquareAuthorityRequest"); - if (this.updateAttributes !== null && this.updateAttributes !== undefined) { - output.writeFieldBegin("updateAttributes", Thrift.Type.SET, 2); - output.writeSetBegin(Thrift.Type.I32, this.updateAttributes.length); - for (var iter625 in this.updateAttributes) { - if (this.updateAttributes.hasOwnProperty(iter625)) { - iter625 = this.updateAttributes[iter625]; - output.writeI32(iter625); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - if (this.authority !== null && this.authority !== undefined) { - output.writeFieldBegin("authority", Thrift.Type.STRUCT, 3); - this.authority.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.UpdateSquareAuthorityResponse = function (args) { - this.updatdAttributes = null; - this.authority = null; - if (args) { - if (args.updatdAttributes !== undefined && args.updatdAttributes !== null) { - this.updatdAttributes = Thrift.copyList(args.updatdAttributes, [null]); - } - if (args.authority !== undefined && args.authority !== null) { - this.authority = new ttypes.SquareAuthority(args.authority); - } - } -}; -ttypes.UpdateSquareAuthorityResponse.prototype = {}; -ttypes.UpdateSquareAuthorityResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.SET) { - this.updatdAttributes = []; - var _rtmp3627 = input.readSetBegin(); - var _size626 = _rtmp3627.size || 0; - for (var _i628 = 0; _i628 < _size626; ++_i628) { - var elem629 = null; - elem629 = input.readI32(); - this.updatdAttributes.push(elem629); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.authority = new ttypes.SquareAuthority(); - this.authority.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.UpdateSquareAuthorityResponse.prototype.write = function (output) { - output.writeStructBegin("UpdateSquareAuthorityResponse"); - if (this.updatdAttributes !== null && this.updatdAttributes !== undefined) { - output.writeFieldBegin("updatdAttributes", Thrift.Type.SET, 1); - output.writeSetBegin(Thrift.Type.I32, this.updatdAttributes.length); - for (var iter630 in this.updatdAttributes) { - if (this.updatdAttributes.hasOwnProperty(iter630)) { - iter630 = this.updatdAttributes[iter630]; - output.writeI32(iter630); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - if (this.authority !== null && this.authority !== undefined) { - output.writeFieldBegin("authority", Thrift.Type.STRUCT, 2); - this.authority.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.UpdateSquareMemberRelationRequest = function (args) { - this.squareMid = null; - this.targetSquareMemberMid = null; - this.updatedAttrs = null; - this.relation = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.targetSquareMemberMid !== undefined && args.targetSquareMemberMid !== null) { - this.targetSquareMemberMid = args.targetSquareMemberMid; - } - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.relation !== undefined && args.relation !== null) { - this.relation = new ttypes.SquareMemberRelation(args.relation); - } - } -}; -ttypes.UpdateSquareMemberRelationRequest.prototype = {}; -ttypes.UpdateSquareMemberRelationRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.targetSquareMemberMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.SET) { - this.updatedAttrs = []; - var _rtmp3632 = input.readSetBegin(); - var _size631 = _rtmp3632.size || 0; - for (var _i633 = 0; _i633 < _size631; ++_i633) { - var elem634 = null; - elem634 = input.readI32(); - this.updatedAttrs.push(elem634); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRUCT) { - this.relation = new ttypes.SquareMemberRelation(); - this.relation.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.UpdateSquareMemberRelationRequest.prototype.write = function (output) { - output.writeStructBegin("UpdateSquareMemberRelationRequest"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 2); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.targetSquareMemberMid !== null && this.targetSquareMemberMid !== undefined) { - output.writeFieldBegin("targetSquareMemberMid", Thrift.Type.STRING, 3); - output.writeString(this.targetSquareMemberMid); - output.writeFieldEnd(); - } - if (this.updatedAttrs !== null && this.updatedAttrs !== undefined) { - output.writeFieldBegin("updatedAttrs", Thrift.Type.SET, 4); - output.writeSetBegin(Thrift.Type.I32, this.updatedAttrs.length); - for (var iter635 in this.updatedAttrs) { - if (this.updatedAttrs.hasOwnProperty(iter635)) { - iter635 = this.updatedAttrs[iter635]; - output.writeI32(iter635); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - if (this.relation !== null && this.relation !== undefined) { - output.writeFieldBegin("relation", Thrift.Type.STRUCT, 5); - this.relation.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.UpdateSquareMemberRelationResponse = function (args) { - this.squareMid = null; - this.targetSquareMemberMid = null; - this.updatedAttrs = null; - this.relation = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.targetSquareMemberMid !== undefined && args.targetSquareMemberMid !== null) { - this.targetSquareMemberMid = args.targetSquareMemberMid; - } - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.relation !== undefined && args.relation !== null) { - this.relation = new ttypes.SquareMemberRelation(args.relation); - } - } -}; -ttypes.UpdateSquareMemberRelationResponse.prototype = {}; -ttypes.UpdateSquareMemberRelationResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.targetSquareMemberMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.SET) { - this.updatedAttrs = []; - var _rtmp3637 = input.readSetBegin(); - var _size636 = _rtmp3637.size || 0; - for (var _i638 = 0; _i638 < _size636; ++_i638) { - var elem639 = null; - elem639 = input.readI32(); - this.updatedAttrs.push(elem639); - } - input.readSetEnd(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRUCT) { - this.relation = new ttypes.SquareMemberRelation(); - this.relation.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.UpdateSquareMemberRelationResponse.prototype.write = function (output) { - output.writeStructBegin("UpdateSquareMemberRelationResponse"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 1); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.targetSquareMemberMid !== null && this.targetSquareMemberMid !== undefined) { - output.writeFieldBegin("targetSquareMemberMid", Thrift.Type.STRING, 2); - output.writeString(this.targetSquareMemberMid); - output.writeFieldEnd(); - } - if (this.updatedAttrs !== null && this.updatedAttrs !== undefined) { - output.writeFieldBegin("updatedAttrs", Thrift.Type.SET, 3); - output.writeSetBegin(Thrift.Type.I32, this.updatedAttrs.length); - for (var iter640 in this.updatedAttrs) { - if (this.updatedAttrs.hasOwnProperty(iter640)) { - iter640 = this.updatedAttrs[iter640]; - output.writeI32(iter640); - } - } - output.writeSetEnd(); - output.writeFieldEnd(); - } - if (this.relation !== null && this.relation !== undefined) { - output.writeFieldBegin("relation", Thrift.Type.STRUCT, 4); - this.relation.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ReportSquareRequest = function (args) { - this.squareMid = null; - this.reportType = null; - this.otherReason = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.reportType !== undefined && args.reportType !== null) { - this.reportType = args.reportType; - } - if (args.otherReason !== undefined && args.otherReason !== null) { - this.otherReason = args.otherReason; - } - } -}; -ttypes.ReportSquareRequest.prototype = {}; -ttypes.ReportSquareRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.reportType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.otherReason = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ReportSquareRequest.prototype.write = function (output) { - output.writeStructBegin("ReportSquareRequest"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 2); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.reportType !== null && this.reportType !== undefined) { - output.writeFieldBegin("reportType", Thrift.Type.I32, 3); - output.writeI32(this.reportType); - output.writeFieldEnd(); - } - if (this.otherReason !== null && this.otherReason !== undefined) { - output.writeFieldBegin("otherReason", Thrift.Type.STRING, 4); - output.writeString(this.otherReason); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ReportSquareResponse = function (args) {}; -ttypes.ReportSquareResponse.prototype = {}; -ttypes.ReportSquareResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - if (ftype == Thrift.Type.STOP) { - break; - } - input.skip(ftype); - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ReportSquareResponse.prototype.write = function (output) { - output.writeStructBegin("ReportSquareResponse"); - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ReportSquareChatRequest = function (args) { - this.squareMid = null; - this.squareChatMid = null; - this.reportType = null; - this.otherReason = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.reportType !== undefined && args.reportType !== null) { - this.reportType = args.reportType; - } - if (args.otherReason !== undefined && args.otherReason !== null) { - this.otherReason = args.otherReason; - } - } -}; -ttypes.ReportSquareChatRequest.prototype = {}; -ttypes.ReportSquareChatRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I32) { - this.reportType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRING) { - this.otherReason = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ReportSquareChatRequest.prototype.write = function (output) { - output.writeStructBegin("ReportSquareChatRequest"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 2); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 3); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.reportType !== null && this.reportType !== undefined) { - output.writeFieldBegin("reportType", Thrift.Type.I32, 5); - output.writeI32(this.reportType); - output.writeFieldEnd(); - } - if (this.otherReason !== null && this.otherReason !== undefined) { - output.writeFieldBegin("otherReason", Thrift.Type.STRING, 6); - output.writeString(this.otherReason); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ReportSquareChatResponse = function (args) {}; -ttypes.ReportSquareChatResponse.prototype = {}; -ttypes.ReportSquareChatResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - if (ftype == Thrift.Type.STOP) { - break; - } - input.skip(ftype); - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ReportSquareChatResponse.prototype.write = function (output) { - output.writeStructBegin("ReportSquareChatResponse"); - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ReportSquareMessageRequest = function (args) { - this.squareMid = null; - this.squareChatMid = null; - this.squareMessageId = null; - this.reportType = null; - this.otherReason = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareMessageId !== undefined && args.squareMessageId !== null) { - this.squareMessageId = args.squareMessageId; - } - if (args.reportType !== undefined && args.reportType !== null) { - this.reportType = args.reportType; - } - if (args.otherReason !== undefined && args.otherReason !== null) { - this.otherReason = args.otherReason; - } - } -}; -ttypes.ReportSquareMessageRequest.prototype = {}; -ttypes.ReportSquareMessageRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.squareMessageId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I32) { - this.reportType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRING) { - this.otherReason = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ReportSquareMessageRequest.prototype.write = function (output) { - output.writeStructBegin("ReportSquareMessageRequest"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 2); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 3); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.squareMessageId !== null && this.squareMessageId !== undefined) { - output.writeFieldBegin("squareMessageId", Thrift.Type.STRING, 4); - output.writeString(this.squareMessageId); - output.writeFieldEnd(); - } - if (this.reportType !== null && this.reportType !== undefined) { - output.writeFieldBegin("reportType", Thrift.Type.I32, 5); - output.writeI32(this.reportType); - output.writeFieldEnd(); - } - if (this.otherReason !== null && this.otherReason !== undefined) { - output.writeFieldBegin("otherReason", Thrift.Type.STRING, 6); - output.writeString(this.otherReason); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ReportSquareMessageResponse = function (args) {}; -ttypes.ReportSquareMessageResponse.prototype = {}; -ttypes.ReportSquareMessageResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - if (ftype == Thrift.Type.STOP) { - break; - } - input.skip(ftype); - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ReportSquareMessageResponse.prototype.write = function (output) { - output.writeStructBegin("ReportSquareMessageResponse"); - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ReportSquareMemberRequest = function (args) { - this.squareMemberMid = null; - this.reportType = null; - this.otherReason = null; - this.squareChatMid = null; - if (args) { - if (args.squareMemberMid !== undefined && args.squareMemberMid !== null) { - this.squareMemberMid = args.squareMemberMid; - } - if (args.reportType !== undefined && args.reportType !== null) { - this.reportType = args.reportType; - } - if (args.otherReason !== undefined && args.otherReason !== null) { - this.otherReason = args.otherReason; - } - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - } -}; -ttypes.ReportSquareMemberRequest.prototype = {}; -ttypes.ReportSquareMemberRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareMemberMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.reportType = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.otherReason = input.readString(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ReportSquareMemberRequest.prototype.write = function (output) { - output.writeStructBegin("ReportSquareMemberRequest"); - if (this.squareMemberMid !== null && this.squareMemberMid !== undefined) { - output.writeFieldBegin("squareMemberMid", Thrift.Type.STRING, 2); - output.writeString(this.squareMemberMid); - output.writeFieldEnd(); - } - if (this.reportType !== null && this.reportType !== undefined) { - output.writeFieldBegin("reportType", Thrift.Type.I32, 3); - output.writeI32(this.reportType); - output.writeFieldEnd(); - } - if (this.otherReason !== null && this.otherReason !== undefined) { - output.writeFieldBegin("otherReason", Thrift.Type.STRING, 4); - output.writeString(this.otherReason); - output.writeFieldEnd(); - } - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 5); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ReportSquareMemberResponse = function (args) {}; -ttypes.ReportSquareMemberResponse.prototype = {}; -ttypes.ReportSquareMemberResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - if (ftype == Thrift.Type.STOP) { - break; - } - input.skip(ftype); - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ReportSquareMemberResponse.prototype.write = function (output) { - output.writeStructBegin("ReportSquareMemberResponse"); - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareRequest = function (args) { - this.mid = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - } -}; -ttypes.GetSquareRequest.prototype = {}; -ttypes.GetSquareRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.mid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareRequest.prototype.write = function (output) { - output.writeStructBegin("GetSquareRequest"); - if (this.mid !== null && this.mid !== undefined) { - output.writeFieldBegin("mid", Thrift.Type.STRING, 2); - output.writeString(this.mid); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareResponse = function (args) { - this.square = null; - this.myMembership = null; - this.squareAuthority = null; - this.squareStatus = null; - this.squareFeatureSet = null; - this.noteStatus = null; - if (args) { - if (args.square !== undefined && args.square !== null) { - this.square = new ttypes.Square(args.square); - } - if (args.myMembership !== undefined && args.myMembership !== null) { - this.myMembership = new ttypes.SquareMember(args.myMembership); - } - if (args.squareAuthority !== undefined && args.squareAuthority !== null) { - this.squareAuthority = new ttypes.SquareAuthority(args.squareAuthority); - } - if (args.squareStatus !== undefined && args.squareStatus !== null) { - this.squareStatus = new ttypes.SquareStatus(args.squareStatus); - } - if (args.squareFeatureSet !== undefined && args.squareFeatureSet !== null) { - this.squareFeatureSet = new ttypes.SquareFeatureSet(args.squareFeatureSet); - } - if (args.noteStatus !== undefined && args.noteStatus !== null) { - this.noteStatus = new ttypes.NoteStatus(args.noteStatus); - } - } -}; -ttypes.GetSquareResponse.prototype = {}; -ttypes.GetSquareResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.square = new ttypes.Square(); - this.square.read(input); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.myMembership = new ttypes.SquareMember(); - this.myMembership.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.squareAuthority = new ttypes.SquareAuthority(); - this.squareAuthority.read(input); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRUCT) { - this.squareStatus = new ttypes.SquareStatus(); - this.squareStatus.read(input); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.STRUCT) { - this.squareFeatureSet = new ttypes.SquareFeatureSet(); - this.squareFeatureSet.read(input); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.STRUCT) { - this.noteStatus = new ttypes.NoteStatus(); - this.noteStatus.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareResponse.prototype.write = function (output) { - output.writeStructBegin("GetSquareResponse"); - if (this.square !== null && this.square !== undefined) { - output.writeFieldBegin("square", Thrift.Type.STRUCT, 1); - this.square.write(output); - output.writeFieldEnd(); - } - if (this.myMembership !== null && this.myMembership !== undefined) { - output.writeFieldBegin("myMembership", Thrift.Type.STRUCT, 2); - this.myMembership.write(output); - output.writeFieldEnd(); - } - if (this.squareAuthority !== null && this.squareAuthority !== undefined) { - output.writeFieldBegin("squareAuthority", Thrift.Type.STRUCT, 3); - this.squareAuthority.write(output); - output.writeFieldEnd(); - } - if (this.squareStatus !== null && this.squareStatus !== undefined) { - output.writeFieldBegin("squareStatus", Thrift.Type.STRUCT, 4); - this.squareStatus.write(output); - output.writeFieldEnd(); - } - if (this.squareFeatureSet !== null && this.squareFeatureSet !== undefined) { - output.writeFieldBegin("squareFeatureSet", Thrift.Type.STRUCT, 5); - this.squareFeatureSet.write(output); - output.writeFieldEnd(); - } - if (this.noteStatus !== null && this.noteStatus !== undefined) { - output.writeFieldBegin("noteStatus", Thrift.Type.STRUCT, 6); - this.noteStatus.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareStatusRequest = function (args) { - this.squareMid = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - } -}; -ttypes.GetSquareStatusRequest.prototype = {}; -ttypes.GetSquareStatusRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareStatusRequest.prototype.write = function (output) { - output.writeStructBegin("GetSquareStatusRequest"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 2); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareStatusResponse = function (args) { - this.squareStatus = null; - if (args) { - if (args.squareStatus !== undefined && args.squareStatus !== null) { - this.squareStatus = new ttypes.SquareStatus(args.squareStatus); - } - } -}; -ttypes.GetSquareStatusResponse.prototype = {}; -ttypes.GetSquareStatusResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.squareStatus = new ttypes.SquareStatus(); - this.squareStatus.read(input); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareStatusResponse.prototype.write = function (output) { - output.writeStructBegin("GetSquareStatusResponse"); - if (this.squareStatus !== null && this.squareStatus !== undefined) { - output.writeFieldBegin("squareStatus", Thrift.Type.STRUCT, 1); - this.squareStatus.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetNoteStatusRequest = function (args) { - this.squareMid = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - } -}; -ttypes.GetNoteStatusRequest.prototype = {}; -ttypes.GetNoteStatusRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetNoteStatusRequest.prototype.write = function (output) { - output.writeStructBegin("GetNoteStatusRequest"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 2); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetNoteStatusResponse = function (args) { - this.squareMid = null; - this.status = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.status !== undefined && args.status !== null) { - this.status = new ttypes.NoteStatus(args.status); - } - } -}; -ttypes.GetNoteStatusResponse.prototype = {}; -ttypes.GetNoteStatusResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.squareMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.status = new ttypes.NoteStatus(); - this.status.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetNoteStatusResponse.prototype.write = function (output) { - output.writeStructBegin("GetNoteStatusResponse"); - if (this.squareMid !== null && this.squareMid !== undefined) { - output.writeFieldBegin("squareMid", Thrift.Type.STRING, 1); - output.writeString(this.squareMid); - output.writeFieldEnd(); - } - if (this.status !== null && this.status !== undefined) { - output.writeFieldBegin("status", Thrift.Type.STRUCT, 2); - this.status.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.CreateSquareChatAnnouncementRequest = function (args) { - this.reqSeq = null; - this.squareChatMid = null; - this.squareChatAnnouncement = null; - if (args) { - if (args.reqSeq !== undefined && args.reqSeq !== null) { - this.reqSeq = args.reqSeq; - } - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareChatAnnouncement !== undefined && args.squareChatAnnouncement !== null) { - this.squareChatAnnouncement = new ttypes.SquareChatAnnouncement(args.squareChatAnnouncement); - } - } -}; -ttypes.CreateSquareChatAnnouncementRequest.prototype = {}; -ttypes.CreateSquareChatAnnouncementRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.reqSeq = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.squareChatAnnouncement = new ttypes.SquareChatAnnouncement(); - this.squareChatAnnouncement.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.CreateSquareChatAnnouncementRequest.prototype.write = function (output) { - output.writeStructBegin("CreateSquareChatAnnouncementRequest"); - if (this.reqSeq !== null && this.reqSeq !== undefined) { - output.writeFieldBegin("reqSeq", Thrift.Type.I32, 1); - output.writeI32(this.reqSeq); - output.writeFieldEnd(); - } - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 2); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.squareChatAnnouncement !== null && this.squareChatAnnouncement !== undefined) { - output.writeFieldBegin("squareChatAnnouncement", Thrift.Type.STRUCT, 3); - this.squareChatAnnouncement.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.CreateSquareChatAnnouncementResponse = function (args) { - this.announcement = null; - if (args) { - if (args.announcement !== undefined && args.announcement !== null) { - this.announcement = new ttypes.SquareChatAnnouncement(args.announcement); - } - } -}; -ttypes.CreateSquareChatAnnouncementResponse.prototype = {}; -ttypes.CreateSquareChatAnnouncementResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRUCT) { - this.announcement = new ttypes.SquareChatAnnouncement(); - this.announcement.read(input); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.CreateSquareChatAnnouncementResponse.prototype.write = function (output) { - output.writeStructBegin("CreateSquareChatAnnouncementResponse"); - if (this.announcement !== null && this.announcement !== undefined) { - output.writeFieldBegin("announcement", Thrift.Type.STRUCT, 1); - this.announcement.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.DeleteSquareChatAnnouncementRequest = function (args) { - this.squareChatMid = null; - this.announcementSeq = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.announcementSeq !== undefined && args.announcementSeq !== null) { - this.announcementSeq = args.announcementSeq; - } - } -}; -ttypes.DeleteSquareChatAnnouncementRequest.prototype = {}; -ttypes.DeleteSquareChatAnnouncementRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I64) { - this.announcementSeq = input.readI64(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.DeleteSquareChatAnnouncementRequest.prototype.write = function (output) { - output.writeStructBegin("DeleteSquareChatAnnouncementRequest"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 2); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - if (this.announcementSeq !== null && this.announcementSeq !== undefined) { - output.writeFieldBegin("announcementSeq", Thrift.Type.I64, 3); - output.writeI64(this.announcementSeq); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.DeleteSquareChatAnnouncementResponse = function (args) {}; -ttypes.DeleteSquareChatAnnouncementResponse.prototype = {}; -ttypes.DeleteSquareChatAnnouncementResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - if (ftype == Thrift.Type.STOP) { - break; - } - input.skip(ftype); - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.DeleteSquareChatAnnouncementResponse.prototype.write = function (output) { - output.writeStructBegin("DeleteSquareChatAnnouncementResponse"); - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareChatAnnouncementsRequest = function (args) { - this.squareChatMid = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - } -}; -ttypes.GetSquareChatAnnouncementsRequest.prototype = {}; -ttypes.GetSquareChatAnnouncementsRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.squareChatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareChatAnnouncementsRequest.prototype.write = function (output) { - output.writeStructBegin("GetSquareChatAnnouncementsRequest"); - if (this.squareChatMid !== null && this.squareChatMid !== undefined) { - output.writeFieldBegin("squareChatMid", Thrift.Type.STRING, 2); - output.writeString(this.squareChatMid); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetSquareChatAnnouncementsResponse = function (args) { - this.announcements = null; - if (args) { - if (args.announcements !== undefined && args.announcements !== null) { - this.announcements = Thrift.copyList(args.announcements, [ttypes.SquareChatAnnouncement]); - } - } -}; -ttypes.GetSquareChatAnnouncementsResponse.prototype = {}; -ttypes.GetSquareChatAnnouncementsResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.announcements = []; - var _rtmp3642 = input.readListBegin(); - var _size641 = _rtmp3642.size || 0; - for (var _i643 = 0; _i643 < _size641; ++_i643) { - var elem644 = null; - elem644 = new ttypes.SquareChatAnnouncement(); - elem644.read(input); - this.announcements.push(elem644); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 0: - input.skip(ftype); - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetSquareChatAnnouncementsResponse.prototype.write = function (output) { - output.writeStructBegin("GetSquareChatAnnouncementsResponse"); - if (this.announcements !== null && this.announcements !== undefined) { - output.writeFieldBegin("announcements", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.announcements.length); - for (var iter645 in this.announcements) { - if (this.announcements.hasOwnProperty(iter645)) { - iter645 = this.announcements[iter645]; - iter645.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetJoinedSquareChatsRequest = function (args) { - this.continuationToken = null; - this.limit = null; - if (args) { - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.limit !== undefined && args.limit !== null) { - this.limit = args.limit; - } - } -}; -ttypes.GetJoinedSquareChatsRequest.prototype = {}; -ttypes.GetJoinedSquareChatsRequest.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 2: - if (ftype == Thrift.Type.STRING) { - this.continuationToken = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.limit = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetJoinedSquareChatsRequest.prototype.write = function (output) { - output.writeStructBegin("GetJoinedSquareChatsRequest"); - if (this.continuationToken !== null && this.continuationToken !== undefined) { - output.writeFieldBegin("continuationToken", Thrift.Type.STRING, 2); - output.writeString(this.continuationToken); - output.writeFieldEnd(); - } - if (this.limit !== null && this.limit !== undefined) { - output.writeFieldBegin("limit", Thrift.Type.I32, 3); - output.writeI32(this.limit); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GetJoinedSquareChatsResponse = function (args) { - this.chats = null; - this.chatMembers = null; - this.statuses = null; - this.continuationToken = null; - if (args) { - if (args.chats !== undefined && args.chats !== null) { - this.chats = Thrift.copyList(args.chats, [ttypes.SquareChat]); - } - if (args.chatMembers !== undefined && args.chatMembers !== null) { - this.chatMembers = Thrift.copyMap(args.chatMembers, [ttypes.SquareChatMember]); - } - if (args.statuses !== undefined && args.statuses !== null) { - this.statuses = Thrift.copyMap(args.statuses, [ttypes.SquareChatStatus]); - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - } -}; -ttypes.GetJoinedSquareChatsResponse.prototype = {}; -ttypes.GetJoinedSquareChatsResponse.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.LIST) { - this.chats = []; - var _rtmp3647 = input.readListBegin(); - var _size646 = _rtmp3647.size || 0; - for (var _i648 = 0; _i648 < _size646; ++_i648) { - var elem649 = null; - elem649 = new ttypes.SquareChat(); - elem649.read(input); - this.chats.push(elem649); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.MAP) { - this.chatMembers = {}; - var _rtmp3651 = input.readMapBegin(); - var _size650 = _rtmp3651.size || 0; - for (var _i652 = 0; _i652 < _size650; ++_i652) { - var key653 = null; - var val654 = null; - key653 = input.readString(); - val654 = new ttypes.SquareChatMember(); - val654.read(input); - this.chatMembers[key653] = val654; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.MAP) { - this.statuses = {}; - var _rtmp3656 = input.readMapBegin(); - var _size655 = _rtmp3656.size || 0; - for (var _i657 = 0; _i657 < _size655; ++_i657) { - var key658 = null; - var val659 = null; - key658 = input.readString(); - val659 = new ttypes.SquareChatStatus(); - val659.read(input); - this.statuses[key658] = val659; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.continuationToken = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GetJoinedSquareChatsResponse.prototype.write = function (output) { - output.writeStructBegin("GetJoinedSquareChatsResponse"); - if (this.chats !== null && this.chats !== undefined) { - output.writeFieldBegin("chats", Thrift.Type.LIST, 1); - output.writeListBegin(Thrift.Type.STRUCT, this.chats.length); - for (var iter660 in this.chats) { - if (this.chats.hasOwnProperty(iter660)) { - iter660 = this.chats[iter660]; - iter660.write(output); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.chatMembers !== null && this.chatMembers !== undefined) { - output.writeFieldBegin("chatMembers", Thrift.Type.MAP, 2); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.chatMembers)); - for (var kiter661 in this.chatMembers) { - if (this.chatMembers.hasOwnProperty(kiter661)) { - var viter662 = this.chatMembers[kiter661]; - output.writeString(kiter661); - viter662.write(output); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - if (this.statuses !== null && this.statuses !== undefined) { - output.writeFieldBegin("statuses", Thrift.Type.MAP, 3); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRUCT, Thrift.objectLength(this.statuses)); - for (var kiter663 in this.statuses) { - if (this.statuses.hasOwnProperty(kiter663)) { - var viter664 = this.statuses[kiter663]; - output.writeString(kiter663); - viter664.write(output); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - if (this.continuationToken !== null && this.continuationToken !== undefined) { - output.writeFieldBegin("continuationToken", Thrift.Type.STRING, 4); - output.writeString(this.continuationToken); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.TalkException = function (args) { - Thrift.TException.call(this, "TalkException"); - this.name = "TalkException"; - this.code = null; - this.reason = null; - this.parameterMap = null; - if (args) { - if (args.code !== undefined && args.code !== null) { - this.code = args.code; - } - if (args.reason !== undefined && args.reason !== null) { - this.reason = args.reason; - } - if (args.parameterMap !== undefined && args.parameterMap !== null) { - this.parameterMap = Thrift.copyMap(args.parameterMap, [null]); - } - } -}; -Thrift.inherits(ttypes.TalkException, Thrift.TException); -ttypes.TalkException.prototype.name = "TalkException"; -ttypes.TalkException.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.code = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.reason = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.MAP) { - this.parameterMap = {}; - var _rtmp3666 = input.readMapBegin(); - var _size665 = _rtmp3666.size || 0; - for (var _i667 = 0; _i667 < _size665; ++_i667) { - var key668 = null; - var val669 = null; - key668 = input.readString(); - val669 = input.readString(); - this.parameterMap[key668] = val669; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.TalkException.prototype.write = function (output) { - output.writeStructBegin("TalkException"); - if (this.code !== null && this.code !== undefined) { - output.writeFieldBegin("code", Thrift.Type.I32, 1); - output.writeI32(this.code); - output.writeFieldEnd(); - } - if (this.reason !== null && this.reason !== undefined) { - output.writeFieldBegin("reason", Thrift.Type.STRING, 2); - output.writeString(this.reason); - output.writeFieldEnd(); - } - if (this.parameterMap !== null && this.parameterMap !== undefined) { - output.writeFieldBegin("parameterMap", Thrift.Type.MAP, 3); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.parameterMap)); - for (var kiter670 in this.parameterMap) { - if (this.parameterMap.hasOwnProperty(kiter670)) { - var viter671 = this.parameterMap[kiter670]; - output.writeString(kiter670); - output.writeString(viter671); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ShouldSyncException = function (args) { - Thrift.TException.call(this, "ShouldSyncException"); - this.name = "ShouldSyncException"; - this.syncOpRevision = null; - this.syncScope = null; - this.syncReason = null; - this.message = null; - if (args) { - if (args.syncOpRevision !== undefined && args.syncOpRevision !== null) { - this.syncOpRevision = args.syncOpRevision; - } - if (args.syncScope !== undefined && args.syncScope !== null) { - this.syncScope = new ttypes.SyncScope(args.syncScope); - } - if (args.syncReason !== undefined && args.syncReason !== null) { - this.syncReason = args.syncReason; - } - if (args.message !== undefined && args.message !== null) { - this.message = args.message; - } - } -}; -Thrift.inherits(ttypes.ShouldSyncException, Thrift.TException); -ttypes.ShouldSyncException.prototype.name = "ShouldSyncException"; -ttypes.ShouldSyncException.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I64) { - this.syncOpRevision = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.syncScope = new ttypes.SyncScope(); - this.syncScope.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.syncReason = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.STRING) { - this.message = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ShouldSyncException.prototype.write = function (output) { - output.writeStructBegin("ShouldSyncException"); - if (this.syncOpRevision !== null && this.syncOpRevision !== undefined) { - output.writeFieldBegin("syncOpRevision", Thrift.Type.I64, 1); - output.writeI64(this.syncOpRevision); - output.writeFieldEnd(); - } - if (this.syncScope !== null && this.syncScope !== undefined) { - output.writeFieldBegin("syncScope", Thrift.Type.STRUCT, 2); - this.syncScope.write(output); - output.writeFieldEnd(); - } - if (this.syncReason !== null && this.syncReason !== undefined) { - output.writeFieldBegin("syncReason", Thrift.Type.I32, 3); - output.writeI32(this.syncReason); - output.writeFieldEnd(); - } - if (this.message !== null && this.message !== undefined) { - output.writeFieldBegin("message", Thrift.Type.STRING, 4); - output.writeString(this.message); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.PointException = function (args) { - Thrift.TException.call(this, "PointException"); - this.name = "PointException"; - this.code = null; - this.reason = null; - this.extra = null; - if (args) { - if (args.code !== undefined && args.code !== null) { - this.code = args.code; - } - if (args.reason !== undefined && args.reason !== null) { - this.reason = args.reason; - } - if (args.extra !== undefined && args.extra !== null) { - this.extra = Thrift.copyMap(args.extra, [null]); - } - } -}; -Thrift.inherits(ttypes.PointException, Thrift.TException); -ttypes.PointException.prototype.name = "PointException"; -ttypes.PointException.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.code = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.reason = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.MAP) { - this.extra = {}; - var _rtmp3673 = input.readMapBegin(); - var _size672 = _rtmp3673.size || 0; - for (var _i674 = 0; _i674 < _size672; ++_i674) { - var key675 = null; - var val676 = null; - key675 = input.readString(); - val676 = input.readString(); - this.extra[key675] = val676; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.PointException.prototype.write = function (output) { - output.writeStructBegin("PointException"); - if (this.code !== null && this.code !== undefined) { - output.writeFieldBegin("code", Thrift.Type.I32, 1); - output.writeI32(this.code); - output.writeFieldEnd(); - } - if (this.reason !== null && this.reason !== undefined) { - output.writeFieldBegin("reason", Thrift.Type.STRING, 2); - output.writeString(this.reason); - output.writeFieldEnd(); - } - if (this.extra !== null && this.extra !== undefined) { - output.writeFieldBegin("extra", Thrift.Type.MAP, 3); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.extra)); - for (var kiter677 in this.extra) { - if (this.extra.hasOwnProperty(kiter677)) { - var viter678 = this.extra[kiter677]; - output.writeString(kiter677); - output.writeString(viter678); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.ChannelException = function (args) { - Thrift.TException.call(this, "ChannelException"); - this.name = "ChannelException"; - this.code = null; - this.reason = null; - this.parameterMap = null; - if (args) { - if (args.code !== undefined && args.code !== null) { - this.code = args.code; - } - if (args.reason !== undefined && args.reason !== null) { - this.reason = args.reason; - } - if (args.parameterMap !== undefined && args.parameterMap !== null) { - this.parameterMap = Thrift.copyMap(args.parameterMap, [null]); - } - } -}; -Thrift.inherits(ttypes.ChannelException, Thrift.TException); -ttypes.ChannelException.prototype.name = "ChannelException"; -ttypes.ChannelException.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.code = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.reason = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.MAP) { - this.parameterMap = {}; - var _rtmp3680 = input.readMapBegin(); - var _size679 = _rtmp3680.size || 0; - for (var _i681 = 0; _i681 < _size679; ++_i681) { - var key682 = null; - var val683 = null; - key682 = input.readString(); - val683 = input.readString(); - this.parameterMap[key682] = val683; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.ChannelException.prototype.write = function (output) { - output.writeStructBegin("ChannelException"); - if (this.code !== null && this.code !== undefined) { - output.writeFieldBegin("code", Thrift.Type.I32, 1); - output.writeI32(this.code); - output.writeFieldEnd(); - } - if (this.reason !== null && this.reason !== undefined) { - output.writeFieldBegin("reason", Thrift.Type.STRING, 2); - output.writeString(this.reason); - output.writeFieldEnd(); - } - if (this.parameterMap !== null && this.parameterMap !== undefined) { - output.writeFieldBegin("parameterMap", Thrift.Type.MAP, 3); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.parameterMap)); - for (var kiter684 in this.parameterMap) { - if (this.parameterMap.hasOwnProperty(kiter684)) { - var viter685 = this.parameterMap[kiter684]; - output.writeString(kiter684); - output.writeString(viter685); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.SquareException = function (args) { - Thrift.TException.call(this, "SquareException"); - this.name = "SquareException"; - this.errorCode = null; - this.errorExtraInfo = null; - this.reason = null; - if (args) { - if (args.errorCode !== undefined && args.errorCode !== null) { - this.errorCode = args.errorCode; - } - if (args.errorExtraInfo !== undefined && args.errorExtraInfo !== null) { - this.errorExtraInfo = new ttypes.ErrorExtraInfo(args.errorExtraInfo); - } - if (args.reason !== undefined && args.reason !== null) { - this.reason = args.reason; - } - } -}; -Thrift.inherits(ttypes.SquareException, Thrift.TException); -ttypes.SquareException.prototype.name = "SquareException"; -ttypes.SquareException.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.errorCode = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.errorExtraInfo = new ttypes.ErrorExtraInfo(); - this.errorExtraInfo.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.reason = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.SquareException.prototype.write = function (output) { - output.writeStructBegin("SquareException"); - if (this.errorCode !== null && this.errorCode !== undefined) { - output.writeFieldBegin("errorCode", Thrift.Type.I32, 1); - output.writeI32(this.errorCode); - output.writeFieldEnd(); - } - if (this.errorExtraInfo !== null && this.errorExtraInfo !== undefined) { - output.writeFieldBegin("errorExtraInfo", Thrift.Type.STRUCT, 2); - this.errorExtraInfo.write(output); - output.writeFieldEnd(); - } - if (this.reason !== null && this.reason !== undefined) { - output.writeFieldBegin("reason", Thrift.Type.STRING, 3); - output.writeString(this.reason); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.UniversalNotificationServiceException = function (args) { - Thrift.TException.call(this, "UniversalNotificationServiceException"); - this.name = "UniversalNotificationServiceException"; - this.code = null; - this.reason = null; - this.parameterMap = null; - if (args) { - if (args.code !== undefined && args.code !== null) { - this.code = args.code; - } - if (args.reason !== undefined && args.reason !== null) { - this.reason = args.reason; - } - if (args.parameterMap !== undefined && args.parameterMap !== null) { - this.parameterMap = Thrift.copyMap(args.parameterMap, [null]); - } - } -}; -Thrift.inherits(ttypes.UniversalNotificationServiceException, Thrift.TException); -ttypes.UniversalNotificationServiceException.prototype.name = "UniversalNotificationServiceException"; -ttypes.UniversalNotificationServiceException.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.code = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.reason = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.MAP) { - this.parameterMap = {}; - var _rtmp3687 = input.readMapBegin(); - var _size686 = _rtmp3687.size || 0; - for (var _i688 = 0; _i688 < _size686; ++_i688) { - var key689 = null; - var val690 = null; - key689 = input.readString(); - val690 = input.readString(); - this.parameterMap[key689] = val690; - } - input.readMapEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.UniversalNotificationServiceException.prototype.write = function (output) { - output.writeStructBegin("UniversalNotificationServiceException"); - if (this.code !== null && this.code !== undefined) { - output.writeFieldBegin("code", Thrift.Type.I32, 1); - output.writeI32(this.code); - output.writeFieldEnd(); - } - if (this.reason !== null && this.reason !== undefined) { - output.writeFieldBegin("reason", Thrift.Type.STRING, 2); - output.writeString(this.reason); - output.writeFieldEnd(); - } - if (this.parameterMap !== null && this.parameterMap !== undefined) { - output.writeFieldBegin("parameterMap", Thrift.Type.MAP, 3); - output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.parameterMap)); - for (var kiter691 in this.parameterMap) { - if (this.parameterMap.hasOwnProperty(kiter691)) { - var viter692 = this.parameterMap[kiter691]; - output.writeString(kiter691); - output.writeString(viter692); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.UpdateBuddyProfileResult = function (args) { - this.requestId = null; - this.state = null; - this.eventNo = null; - this.receiverCount = null; - this.successCount = null; - this.failCount = null; - this.cancelCount = null; - this.unregisterCount = null; - this.timestamp = null; - this.message = null; - if (args) { - if (args.requestId !== undefined && args.requestId !== null) { - this.requestId = args.requestId; - } - if (args.state !== undefined && args.state !== null) { - this.state = args.state; - } - if (args.eventNo !== undefined && args.eventNo !== null) { - this.eventNo = args.eventNo; - } - if (args.receiverCount !== undefined && args.receiverCount !== null) { - this.receiverCount = args.receiverCount; - } - if (args.successCount !== undefined && args.successCount !== null) { - this.successCount = args.successCount; - } - if (args.failCount !== undefined && args.failCount !== null) { - this.failCount = args.failCount; - } - if (args.cancelCount !== undefined && args.cancelCount !== null) { - this.cancelCount = args.cancelCount; - } - if (args.unregisterCount !== undefined && args.unregisterCount !== null) { - this.unregisterCount = args.unregisterCount; - } - if (args.timestamp !== undefined && args.timestamp !== null) { - this.timestamp = args.timestamp; - } - if (args.message !== undefined && args.message !== null) { - this.message = args.message; - } - } -}; -ttypes.UpdateBuddyProfileResult.prototype = {}; -ttypes.UpdateBuddyProfileResult.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.requestId = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.I32) { - this.state = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.I32) { - this.eventNo = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.I64) { - this.receiverCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.I64) { - this.successCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 13: - if (ftype == Thrift.Type.I64) { - this.failCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 14: - if (ftype == Thrift.Type.I64) { - this.cancelCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 15: - if (ftype == Thrift.Type.I64) { - this.unregisterCount = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 21: - if (ftype == Thrift.Type.I64) { - this.timestamp = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 22: - if (ftype == Thrift.Type.STRING) { - this.message = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.UpdateBuddyProfileResult.prototype.write = function (output) { - output.writeStructBegin("UpdateBuddyProfileResult"); - if (this.requestId !== null && this.requestId !== undefined) { - output.writeFieldBegin("requestId", Thrift.Type.STRING, 1); - output.writeString(this.requestId); - output.writeFieldEnd(); - } - if (this.state !== null && this.state !== undefined) { - output.writeFieldBegin("state", Thrift.Type.I32, 2); - output.writeI32(this.state); - output.writeFieldEnd(); - } - if (this.eventNo !== null && this.eventNo !== undefined) { - output.writeFieldBegin("eventNo", Thrift.Type.I32, 3); - output.writeI32(this.eventNo); - output.writeFieldEnd(); - } - if (this.receiverCount !== null && this.receiverCount !== undefined) { - output.writeFieldBegin("receiverCount", Thrift.Type.I64, 11); - output.writeI64(this.receiverCount); - output.writeFieldEnd(); - } - if (this.successCount !== null && this.successCount !== undefined) { - output.writeFieldBegin("successCount", Thrift.Type.I64, 12); - output.writeI64(this.successCount); - output.writeFieldEnd(); - } - if (this.failCount !== null && this.failCount !== undefined) { - output.writeFieldBegin("failCount", Thrift.Type.I64, 13); - output.writeI64(this.failCount); - output.writeFieldEnd(); - } - if (this.cancelCount !== null && this.cancelCount !== undefined) { - output.writeFieldBegin("cancelCount", Thrift.Type.I64, 14); - output.writeI64(this.cancelCount); - output.writeFieldEnd(); - } - if (this.unregisterCount !== null && this.unregisterCount !== undefined) { - output.writeFieldBegin("unregisterCount", Thrift.Type.I64, 15); - output.writeI64(this.unregisterCount); - output.writeFieldEnd(); - } - if (this.timestamp !== null && this.timestamp !== undefined) { - output.writeFieldBegin("timestamp", Thrift.Type.I64, 21); - output.writeI64(this.timestamp); - output.writeFieldEnd(); - } - if (this.message !== null && this.message !== undefined) { - output.writeFieldBegin("message", Thrift.Type.STRING, 22); - output.writeString(this.message); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.UserAuthStatus = function (args) { - this.phoneNumberRegistered = null; - this.registeredSnsIdTypes = null; - if (args) { - if (args.phoneNumberRegistered !== undefined && args.phoneNumberRegistered !== null) { - this.phoneNumberRegistered = args.phoneNumberRegistered; - } - if (args.registeredSnsIdTypes !== undefined && args.registeredSnsIdTypes !== null) { - this.registeredSnsIdTypes = Thrift.copyList(args.registeredSnsIdTypes, [null]); - } - } -}; -ttypes.UserAuthStatus.prototype = {}; -ttypes.UserAuthStatus.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.BOOL) { - this.phoneNumberRegistered = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.LIST) { - this.registeredSnsIdTypes = []; - var _rtmp3694 = input.readListBegin(); - var _size693 = _rtmp3694.size || 0; - for (var _i695 = 0; _i695 < _size693; ++_i695) { - var elem696 = null; - elem696 = input.readI32(); - this.registeredSnsIdTypes.push(elem696); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.UserAuthStatus.prototype.write = function (output) { - output.writeStructBegin("UserAuthStatus"); - if (this.phoneNumberRegistered !== null && this.phoneNumberRegistered !== undefined) { - output.writeFieldBegin("phoneNumberRegistered", Thrift.Type.BOOL, 1); - output.writeBool(this.phoneNumberRegistered); - output.writeFieldEnd(); - } - if (this.registeredSnsIdTypes !== null && this.registeredSnsIdTypes !== undefined) { - output.writeFieldBegin("registeredSnsIdTypes", Thrift.Type.LIST, 2); - output.writeListBegin(Thrift.Type.I32, this.registeredSnsIdTypes.length); - for (var iter697 in this.registeredSnsIdTypes) { - if (this.registeredSnsIdTypes.hasOwnProperty(iter697)) { - iter697 = this.registeredSnsIdTypes[iter697]; - output.writeI32(iter697); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.WapInvitation = function (args) { - this.type = null; - this.inviteeEmail = null; - this.inviterMid = null; - this.roomMid = null; - if (args) { - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.inviteeEmail !== undefined && args.inviteeEmail !== null) { - this.inviteeEmail = args.inviteeEmail; - } - if (args.inviterMid !== undefined && args.inviterMid !== null) { - this.inviterMid = args.inviterMid; - } - if (args.roomMid !== undefined && args.roomMid !== null) { - this.roomMid = args.roomMid; - } - } -}; -ttypes.WapInvitation.prototype = {}; -ttypes.WapInvitation.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.I32) { - this.type = input.readI32(); - } else { - input.skip(ftype); - } - break; - case 10: - if (ftype == Thrift.Type.STRING) { - this.inviteeEmail = input.readString(); - } else { - input.skip(ftype); - } - break; - case 11: - if (ftype == Thrift.Type.STRING) { - this.inviterMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 12: - if (ftype == Thrift.Type.STRING) { - this.roomMid = input.readString(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.WapInvitation.prototype.write = function (output) { - output.writeStructBegin("WapInvitation"); - if (this.type !== null && this.type !== undefined) { - output.writeFieldBegin("type", Thrift.Type.I32, 1); - output.writeI32(this.type); - output.writeFieldEnd(); - } - if (this.inviteeEmail !== null && this.inviteeEmail !== undefined) { - output.writeFieldBegin("inviteeEmail", Thrift.Type.STRING, 10); - output.writeString(this.inviteeEmail); - output.writeFieldEnd(); - } - if (this.inviterMid !== null && this.inviterMid !== undefined) { - output.writeFieldBegin("inviterMid", Thrift.Type.STRING, 11); - output.writeString(this.inviterMid); - output.writeFieldEnd(); - } - if (this.roomMid !== null && this.roomMid !== undefined) { - output.writeFieldBegin("roomMid", Thrift.Type.STRING, 12); - output.writeString(this.roomMid); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GroupCall = function (args) { - this.online = null; - this.chatMid = null; - this.hostMids = null; - this.memberMids = null; - this.started = null; - this.mediaType = null; - if (args) { - if (args.online !== undefined && args.online !== null) { - this.online = args.online; - } - if (args.chatMid !== undefined && args.chatMid !== null) { - this.chatMid = args.chatMid; - } - if (args.hostMids !== undefined && args.hostMids !== null) { - this.hostMids = args.hostMids; - } - if (args.memberMids !== undefined && args.memberMids !== null) { - this.memberMids = Thrift.copyList(args.memberMids, [null]); - } - if (args.started !== undefined && args.started !== null) { - this.started = args.started; - } - if (args.mediaType !== undefined && args.mediaType !== null) { - this.mediaType = args.mediaType; - } - } -}; -ttypes.GroupCall.prototype = {}; -ttypes.GroupCall.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.BOOL) { - this.online = input.readBool(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRING) { - this.chatMid = input.readString(); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRING) { - this.hostMids = input.readString(); - } else { - input.skip(ftype); - } - break; - case 4: - if (ftype == Thrift.Type.LIST) { - this.memberMids = []; - var _rtmp3699 = input.readListBegin(); - var _size698 = _rtmp3699.size || 0; - for (var _i700 = 0; _i700 < _size698; ++_i700) { - var elem701 = null; - elem701 = input.readString(); - this.memberMids.push(elem701); - } - input.readListEnd(); - } else { - input.skip(ftype); - } - break; - case 5: - if (ftype == Thrift.Type.I64) { - this.started = input.readI64(); - } else { - input.skip(ftype); - } - break; - case 6: - if (ftype == Thrift.Type.I32) { - this.mediaType = input.readI32(); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GroupCall.prototype.write = function (output) { - output.writeStructBegin("GroupCall"); - if (this.online !== null && this.online !== undefined) { - output.writeFieldBegin("online", Thrift.Type.BOOL, 1); - output.writeBool(this.online); - output.writeFieldEnd(); - } - if (this.chatMid !== null && this.chatMid !== undefined) { - output.writeFieldBegin("chatMid", Thrift.Type.STRING, 2); - output.writeString(this.chatMid); - output.writeFieldEnd(); - } - if (this.hostMids !== null && this.hostMids !== undefined) { - output.writeFieldBegin("hostMids", Thrift.Type.STRING, 3); - output.writeString(this.hostMids); - output.writeFieldEnd(); - } - if (this.memberMids !== null && this.memberMids !== undefined) { - output.writeFieldBegin("memberMids", Thrift.Type.LIST, 4); - output.writeListBegin(Thrift.Type.STRING, this.memberMids.length); - for (var iter702 in this.memberMids) { - if (this.memberMids.hasOwnProperty(iter702)) { - iter702 = this.memberMids[iter702]; - output.writeString(iter702); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - } - if (this.started !== null && this.started !== undefined) { - output.writeFieldBegin("started", Thrift.Type.I64, 5); - output.writeI64(this.started); - output.writeFieldEnd(); - } - if (this.mediaType !== null && this.mediaType !== undefined) { - output.writeFieldBegin("mediaType", Thrift.Type.I32, 6); - output.writeI32(this.mediaType); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; -ttypes.GroupCallRoute = function (args) { - this.token = null; - this.cscf = null; - this.mix = null; - if (args) { - if (args.token !== undefined && args.token !== null) { - this.token = args.token; - } - if (args.cscf !== undefined && args.cscf !== null) { - this.cscf = new ttypes.CallHost(args.cscf); - } - if (args.mix !== undefined && args.mix !== null) { - this.mix = new ttypes.CallHost(args.mix); - } - } -}; -ttypes.GroupCallRoute.prototype = {}; -ttypes.GroupCallRoute.prototype.read = function (input) { - input.readStructBegin(); - while (true) { - var ret = input.readFieldBegin(); - var ftype = ret.ftype; - var fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - switch (fid) { - case 1: - if (ftype == Thrift.Type.STRING) { - this.token = input.readString(); - } else { - input.skip(ftype); - } - break; - case 2: - if (ftype == Thrift.Type.STRUCT) { - this.cscf = new ttypes.CallHost(); - this.cscf.read(input); - } else { - input.skip(ftype); - } - break; - case 3: - if (ftype == Thrift.Type.STRUCT) { - this.mix = new ttypes.CallHost(); - this.mix.read(input); - } else { - input.skip(ftype); - } - break; - default: - input.skip(ftype); - } - input.readFieldEnd(); - } - input.readStructEnd(); - return; -}; -ttypes.GroupCallRoute.prototype.write = function (output) { - output.writeStructBegin("GroupCallRoute"); - if (this.token !== null && this.token !== undefined) { - output.writeFieldBegin("token", Thrift.Type.STRING, 1); - output.writeString(this.token); - output.writeFieldEnd(); - } - if (this.cscf !== null && this.cscf !== undefined) { - output.writeFieldBegin("cscf", Thrift.Type.STRUCT, 2); - this.cscf.write(output); - output.writeFieldEnd(); - } - if (this.mix !== null && this.mix !== undefined) { - output.writeFieldBegin("mix", Thrift.Type.STRUCT, 3); - this.mix.write(output); - output.writeFieldEnd(); - } - output.writeFieldStop(); - output.writeStructEnd(); - return; -}; diff --git a/server/login.js b/server/login.js new file mode 100644 index 0000000..997ce30 --- /dev/null +++ b/server/login.js @@ -0,0 +1,357 @@ +import write from "./write_deno.js"; +import read from "./read_deno.js"; +import { TBinaryProtocol, TCompactProtocol } from "npm:thrift@0.20.0"; +import { Buffer } from "node:buffer"; +import PinVerifier from "./pinVerifier.js"; +TBinaryProtocol.genHeader = (name) => { + return Buffer.from([ + 0x80, + 1, + 0, + 1, + 0, + 0, + 0, + name.length, + ...Buffer.from(name), + 0, + 0, + 0, + 0, + ]); +}; +TCompactProtocol.genHeader = (name) => { + return Buffer.from([ + 0x82, + 0x21, + 0, + name.length, + ...Buffer.from(name), + ]); +}; + +const Protocols = { + 4: TCompactProtocol, + 3: TBinaryProtocol, + 0: Buffer, +}; + +class LoginAPI { + certs = {}; + async requestEmailLogin( + email, + pw, + cert, + pin = (p) => console.log(`Enter Pincode:`, p), + e2ee = false, + ) { + const rsaKey = await this.getRSAKeyInfo(); + const keynm = rsaKey[1]; + const nvalue = rsaKey[2]; + const evalue = rsaKey[3]; + const sessionKey = rsaKey[4]; + const message = String.fromCharCode(sessionKey.length) + + sessionKey + + String.fromCharCode(email.length) + + email + + String.fromCharCode(pw.length) + + pw; + const crypto = + new PinVerifier(message).getRSACrypto(rsaKey).credentials; + let secret; + if (e2ee) { //ß + secret = + "0\x8aEH\x96\xa7\x8d#5<\xfb\x91c\x12\x15\xbd\x13H\xfa\x04d\xcf\x96\xee1e\xa0]v,\x9f\xf2"; + throw new Error("e2ee Login Beta"); + } + const res = await this.loginV2( + keynm, + crypto, + secret, + this.device, + cert, //this.certs[email], + null, + "loginZ", + ); + if (res[1]) { + return res; + } else { + pin(res[4]); + const headers = { + "Host": "gw.line.naver.jp", + "accept": "application/x-thrift", + "user-agent": this.ua, + "x-line-application": this.type, + "x-line-access": res[3], + "x-lal": "ja_JP", + //'x-le': '18', 'x-lap': '5', + "x-lpv": "1", + "x-lhm": "GET", + //"x-lcs":'0005svgBAiJMiGMJdzBkKqR/78GAZEMOQ6E0p3FJkMBZA/NXe10zfYnVQDufzNaRMEW1nvYJYsLWZaWb4ww7EsebLNXGbuhmyAT2V4Fr3tA23xzvvbOaLjCahQK/4qrha2gC54XuPRbtSFNzALjs3rAyfWyczSnlenV/KFv06iqMmt1v+l3KBQdBkN9uLqGRTXzII0Y/rXtkw1wTYvMZZB7b6KunfzHf9AbFOMCqyveInGhYAetFN9Ly9x3kf2uC2czTSlynvelkYn4qn2VeGmAWOLqZrbQelyh/rRIFPttCILbOrWNEwv71Y7Pa1C0MTGFGlWWQQKlBHj0lcK+kJL13Ww==', + "accept-encoding": "gzip", + }; + const verifier = await fetch("https://gw.line.naver.jp/Q", { + headers: headers, + }).then((res) => res.json()); + const login_res = await this.loginV2( + keynm, + crypto, + secret, + this.device, + null, + verifier.result.verifier, + "loginZ", + ); + return login_res; + } + } + async loginV2( + keynm, + encData, + secret, + deviceName = this.device, + cert, + verifier, + calledName = "loginV2", + ) { + let loginType = 2; + if (!secret) loginType = 0; + if (verifier) { + loginType = 1; + } + return await this.direct_request( + [ + [ + 12, + 2, + [ + [8, 1, loginType], + [8, 2, 1], + [11, 3, keynm], + [11, 4, encData], + [2, 5, 0], + [11, 6, ""], + [11, 7, deviceName], + [11, 8, cert], + [11, 9, verifier], + [11, 10, secret], + [8, 11, 1], + [11, 12, "System Product Name"], + ], + ], + ], + calledName, + 3, + true, + "/api/v3p/rs", + ); + } + async getRSAKeyInfo(provider = 0) { + return await this.request( + [ + [8, 2, provider], + ], + "getRSAKeyInfo", + 3, + true, + "/api/v3/TalkService.do", + ); + } +} + +class lineClient extends LoginAPI { + constructor(device, authToken) { + super(); + let appVer, sysName, sysVer; + sysVer = "12.1.4"; + switch (device) { + case "DESKTOPWIN": + appVer = "7.16.1.3000"; + sysName = "WINDOWS"; + sysVer = "10.0.0-NT-x64"; + break; + case "DESKTOPMAC": + appVer = "7.16.1.3000"; + sysName = "MAC"; + break; + case "CHROMEOS": + appVer = "3.0.3"; + sysName = "Chrome_OS"; + sysVer = "1"; + break; + case "ANDROID": + appVer = "13.4.1"; + sysName = "Android OS"; + break; + case "IOS": + appVer = "13.3.0"; + sysName = "iOS"; + break; + case "IOSIPAD": + appVer = "13.3.0"; + sysName = "iOS"; + break; + case "WATCHOS": + appVer = "13.3.0"; + sysName = "Watch OS"; + break; + case "WEAROS": + appVer = "13.4.1"; + sysName = "Wear OS"; + break; + default: + throw new Error("deviceName is wrong"); + break; + } + this.type = device + "\t" + appVer + "\t" + sysName + "\t" + sysVer; + this.ua = "Line/" + appVer; + this.authToken = authToken; + this.device = device; + } + async _request(path, value, name, ptype, add_headers = {}, parse = true) { + const Protocol = Protocols[ptype]; + let headers = { + "Host": "gw.line.naver.jp", + "accept": "application/x-thrift", + "user-agent": this.ua, + "x-line-application": this.type, + "x-line-access": this.authToken, + "content-type": "application/x-thrift", + "x-lal": "ja_JP", + //'x-le': '18', 'x-lap': '5', + "x-lpv": "1", + "x-lhm": "POST", + //"x-lcs":'0005svgBAiJMiGMJdzBkKqR/78GAZEMOQ6E0p3FJkMBZA/NXe10zfYnVQDufzNaRMEW1nvYJYsLWZaWb4ww7EsebLNXGbuhmyAT2V4Fr3tA23xzvvbOaLjCahQK/4qrha2gC54XuPRbtSFNzALjs3rAyfWyczSnlenV/KFv06iqMmt1v+l3KBQdBkN9uLqGRTXzII0Y/rXtkw1wTYvMZZB7b6KunfzHf9AbFOMCqyveInGhYAetFN9Ly9x3kf2uC2czTSlynvelkYn4qn2VeGmAWOLqZrbQelyh/rRIFPttCILbOrWNEwv71Y7Pa1C0MTGFGlWWQQKlBHj0lcK+kJL13Ww==', + "accept-encoding": "gzip", + }; + + headers = { ...headers, ...add_headers }; + let res; + if (Protocol !== Buffer) { + try { + res = {}; + const Trequest = write(value, name, Protocol); + //await Deno.writeFile("./tmpReq.bin", Trequest); ///////////////////////// + const fet = await fetch("https://gw.line.naver.jp" + path, { + method: "POST", + headers: headers, + body: Trequest, + }); + res = await fet.arrayBuffer(); + res = new Uint8Array(res); + //Deno.writeFile("./tmpRes.bin", res); ///////////////////////////// + res = read(res, Protocol); + } catch (error) { + console.log(error, "/", res); + } + return res; + } else { + try { + res = {}; + const Trequest = value; + //await Deno.writeFile("./tmpReq.bin", Trequest); ///////////////////////// + const fet = await fetch("https://gw.line.naver.jp" + path, { + method: "POST", + headers: headers, + body: Trequest, + }); + res = await fet.arrayBuffer(); + res = new Uint8Array(res); + //Deno.writeFile("./tmpRes.bin", res); ///////////////////////////// + } catch (error) { + console.log(error, "/", res); + } + return res; + } + } + async request( + CHRdata, + methodName, + protocol_type = 3, + parse = true, + path = "/S3", + headers = {}, + ) { + const res = await this._request( + path, + [ + [ + 12, + 1, + CHRdata, + ], + ], + methodName, + protocol_type, + headers, + parse, + ); + if (res.e) { + throw new Error(JSON.stringify(res.e), { cause: res.e }); + } + return res.value; + } + async direct_request( + CHRdata, + methodName, + protocol_type = 3, + parse = true, + path = "/S3", + headers = {}, + ) { + const res = await this._request( + path, + CHRdata, + methodName, + protocol_type, + headers, + parse, + ); + if (res.e) { + throw new Error(JSON.stringify(res.e), { cause: res.e }); + } + return res.value; + } +} + +const encoder = new TextEncoder(); + +export default function loginMP(request) { + const url = new URL(request.url); + const { device, email, pw, cert } = JSON.parse( + atob(url.searchParams.get("a")), + ); + const LC = new lineClient(device); + const stream = new ReadableStream({ + async start(controller) { + try { + const login = await LC.requestEmailLogin( + email, + pw, + cert, + (pin) => { + controller.enqueue( + encoder.encode(`event: pincode\ndata: ${pin}\n\n`), + ); + }, + ); + controller.enqueue( + encoder.encode( + `event: login\ndata: ${JSON.stringify(login)}\n\n`, + ), + ); + } catch (e) { + controller.enqueue( + encoder.encode( + `event: loginErr\ndata: ${JSON.stringify(e.stack)}\n\n`, + ), + ); + } + }, + cancel() { + }, + }); + return new Response(stream, { + headers: { "Content-Type": "text/event-stream; charset=utf-8" }, + }); +} diff --git a/server/main.js b/server/main.js index a8e5a72..9b85977 100644 --- a/server/main.js +++ b/server/main.js @@ -1,43 +1,54 @@ +import loginMP from "./login.js"; import ws from "./denows.js"; import proxy from "./proxy.js"; export async function handler(request) { - const url = new URL(request.url); + const url = new URL(request.url); - switch (url.pathname.split("/")[1]) { - case "post": - return await ws(request); - case "proxy": - return await proxy(request); - default: - break; - } - try { - let mimeType = "text/html"; - switch (url.pathname.split(".")[url.pathname.split(".").length - 1]) { - case "html": - mimeType = "text/html"; - break; - case "js": - mimeType = "application/javascript"; - break; - case "svg": - mimeType = "image/svg+xml"; - break; - case "css": - mimeType = "text/css"; - break; - default: - break; - } - return new Response(await Deno.readTextFile("./site" + url.pathname), { - headers: { "content-type": mimeType }, - }); - } catch (error) { - } - return new Response(await Deno.readTextFile("./site/index.html"), { - headers: { "content-type": "text/html", "deno-status": "error" }, - }); + switch (url.pathname.split("/")[1]) { + case "": + return new Response(await Deno.readTextFile("./site/index.html"), { + headers: { "content-type": "text/html" }, + }); + case "post": + return ws(request); + case "proxy": + return await proxy(request); + case "login_mp": + return loginMP(request); + default: + break; + } + try { + let mimeType = "text/html"; + switch (url.pathname.split(".")[url.pathname.split(".").length - 1]) { + case "html": + mimeType = "text/html"; + break; + case "js": + mimeType = "application/javascript"; + break; + case "json": + mimeType = "application/json"; + break; + case "svg": + mimeType = "image/svg+xml"; + break; + case "css": + mimeType = "text/css"; + break; + default: + break; + } + return new Response(await Deno.readFile("./site" + url.pathname), { + headers: { "content-type": mimeType }, + }); + } catch (error) { + return new Response("404", { + status: 404, + headers: { "deno-status": "error" }, + }); + } } -Deno.serve(handler); +Deno.serve({ port: 7070 }, handler); diff --git a/server/pinVerifier.js b/server/pinVerifier.js new file mode 100644 index 0000000..e36a902 --- /dev/null +++ b/server/pinVerifier.js @@ -0,0 +1,19 @@ +import { Key } from 'npm:node-bignumber'; + +class PinVerifier { + constructor(message) { + this.message = message + } + + getRSACrypto(json) { + const message = this.message + const rsa = new Key(); + rsa.setPublic(json[2], json[3]); + const credentials = rsa.encrypt(message).toString('hex'); + const keyname = json[1]; + return { keyname, credentials, message }; + } +} + + +export default PinVerifier; \ No newline at end of file diff --git a/server/proxy.js b/server/proxy.js index 8a2f547..62deff8 100644 --- a/server/proxy.js +++ b/server/proxy.js @@ -1,13 +1,13 @@ export default async function proxy(request) { - const url = new URL(request.url); - const domain = atob(url.pathname.split("/")[2]); - const path = url.pathname.substring(url.pathname.indexOf("/path") + 5); - let proxyRequest = new Request(domain + path + url.search, { - body: request.body, - method: request.method, - headers: request.headers, - }); - delete proxyRequest.headers.referer; - delete proxyRequest.headers.origin; - return await fetch(proxyRequest); + const url = new URL(request.url) + const domain = atob(url.pathname.split("/")[2]) + const path = url.pathname.substring(url.pathname.indexOf("/path")+5) + const proxyRequest = new Request(domain+path+url.search,{ + body:request.body, + method:request.method, + headers:request.headers + }) + delete proxyRequest.headers.referer + delete proxyRequest.headers.origin + return await fetch(proxyRequest) } diff --git a/server/read_deno.js b/server/read_deno.js index 03b1216..d2cddf0 100644 --- a/server/read_deno.js +++ b/server/read_deno.js @@ -1,176 +1,95 @@ -import * as thrift from "npm:thrift@0.19.0"; -import { ttypes } from "./line_types_deno.js"; +import * as thrift from "npm:thrift@0.20.0"; import { Buffer } from "node:buffer"; -/* -const path = "f2.bin"//prompt("file:/// path? ") -console.log(`<${path}>`) -let data = await Deno.readFile(path) -data = [...data]*/ -function XreadX(input) { - var Thrift = thrift.Thrift; - var returnData = {}; - input.readStructBegin(); - var ret, ftype, fid; - try { - while (true) { - ret = input.readFieldBegin(); - ftype = ret.ftype; - fid = ret.fid; - if (ftype == Thrift.Type.STOP) { - break; - } - returnData[fid] = POWERRRRR(input, ftype); - input.readFieldEnd(); - } - input.readStructEnd(); - } catch (error) { - } - return returnData; +function readStruct(input) { + var Thrift = thrift.Thrift; + var returnData = {}; + input.readStructBegin(); + var ret, ftype, fid; + while (true) { + ret = input.readFieldBegin(); + ftype = ret.ftype; + fid = ret.fid; + if (ftype == Thrift.Type.STOP) { + break; + } + returnData[fid] = readValue(input, ftype); + input.readFieldEnd(); + } + input.readStructEnd(); + return returnData; } -function POWERRRRR(input, ftype) { - var Thrift = thrift.Thrift; - if (ftype == Thrift.Type.STRUCT) { - return XreadX(input); - } else if (ftype == Thrift.Type.I32) { - return input.readI32(); - } else if (ftype == Thrift.Type.I64) { - return input.readI64(); - } else if (ftype == Thrift.Type.STRING) { - return input.readString(); - } else if (ftype == Thrift.Type.LIST) { - let returnData = []; - var _rtmp = input.readListBegin(); - var _size = _rtmp.size || 0; - for (var _i = 0; _i < _size; ++_i) { - var elem = null; - elem = POWERRRRR(input, _rtmp.etype); - returnData.push(elem); - } - input.readListEnd(); - return returnData; - } else if (ftype == Thrift.Type.MAP) { - let returnData = {}; - var _rtmp3384 = input.readMapBegin(); - var _size383 = _rtmp3384.size || 0; - for (var _i385 = 0; _i385 < _size383; ++_i385) { - var key386 = null; - var val387 = null; - key386 = POWERRRRR(input, _rtmp3384.ktype); - val387 = POWERRRRR(input, _rtmp3384.vtype); - returnData[key386] = val387; - } - input.readMapEnd(); - return returnData; - } else if (ftype == Thrift.Type.BOOL) { - return input.readBool(); - } else if (ftype == Thrift.Type.DOUBLE) { - return input.readDouble(); - } else { - console.log(fid, ftype, val, "unknown"); - input.skip(ftype); - return; - } - input.skip(ftype); +function readValue(input, ftype) { + var Thrift = thrift.Thrift; + if (ftype == Thrift.Type.STRUCT) { + return readStruct(input); + } else if (ftype == Thrift.Type.I32) { + return input.readI32(); + } else if (ftype == Thrift.Type.I64) { + return input.readI64(); + } else if (ftype == Thrift.Type.STRING) { + return input.readString(); + } else if (ftype == Thrift.Type.LIST) { + let returnData = []; + var _rtmp = input.readListBegin(); + var _size = _rtmp.size || 0; + for (var _i = 0; _i < _size; ++_i) { + var elem = null; + elem = readValue(input, _rtmp.etype); + returnData.push(elem); + } + input.readListEnd(); + return returnData; + } else if (ftype == Thrift.Type.MAP) { + let returnData = {}; + var _rtmp3384 = input.readMapBegin(); + var _size383 = _rtmp3384.size || 0; + for (var _i385 = 0; _i385 < _size383; ++_i385) { + var key386 = null; + var val387 = null; + key386 = readValue(input, _rtmp3384.ktype); + val387 = readValue(input, _rtmp3384.vtype); + returnData[key386] = val387; + } + input.readMapEnd(); + return returnData; + } else if (ftype == Thrift.Type.BOOL) { + return input.readBool(); + } else if (ftype == Thrift.Type.DOUBLE) { + return input.readDouble(); + } else { + input.skip(ftype); + return; + } + input.skip(ftype); } -function readThrift(data) { - let opt = 0; - let type, r; - let outType = -1; - //console.log(new TextDecoder().decode(new Uint8Array(data))) - if (data[opt] != 0x82) { - console.log("LINE Thriftではありません:0x82", data); - - return; - } - if (data[1 + opt] == 0x41) { - type = "Response"; - outType = 0; - r = 6 + opt; - } else if (data[1 + opt] == 0x21) { - type = "Request"; - outType = 1; - r = 4 + opt; - } else { - console.log("LINE Thriftではありません:0x41or0x21"); - console.log(new TextDecoder().decode(data)); - return; - } - let len = data[3 + opt]; - let Ltype = new TextDecoder().decode(new Uint8Array(data.slice(4 + opt, 4 + opt + len))); - let Lname = Ltype; - Ltype = Ltype.substr(0, 1).toUpperCase() + Ltype.substr(1) + type; - data = data.slice(len + r); - let tdata, myprot, bufTrans; - try { - // Use frame transport to read - const Transport = thrift.TFramedTransport; - const Protocol = thrift.TCompactProtocol; - let b = Buffer.from(data); - bufTrans = new Transport(b); - myprot = new Protocol(bufTrans); - tdata = new ttypes[Ltype](); - - tdata.read(myprot); - } catch (e) { - console.log(e); - const Transport = thrift.TFramedTransport; - const Protocol = thrift.TCompactProtocol; - let b = Buffer.from(data); - bufTrans = new Transport(b); - myprot = new Protocol(bufTrans); - try { - tdata = XreadX(myprot); - } catch (e) { - return { name: Lname, err: e.stack }; - } - outType = outType + 2; - } - return { value: tdata, name: Lname, type: outType.toString() }; +function readThrift(data, Protocol = thrift.TCompactProtocol) { + const bufTrans = new thrift.TFramedTransport(Buffer.from(data)); + const proto = new Protocol(bufTrans); + const msg_info = proto.readMessageBegin() + const tdata = readStruct(proto); + proto.readMessageEnd() + return { value: tdata[0] ,e: tdata[1], _info: msg_info}; } -export function object2json(data) { - const keys = Object.keys(data); - let returnJson = {}; - if (data.forEach) { - returnJson = []; - } - keys.forEach((e) => { - if (!(data[e])) { - } else if (data[e].buffer) { - returnJson[e] = parseInt(data[e].buffer.toString("hex"), 16); - } else if (typeof (data[e]) == "object") { - returnJson[e] = object2json(data[e]); - } else { - returnJson[e] = data[e]; - } - }); - return returnJson; +function object2json(data) { + const keys = Object.keys(data); + let returnJson = {}; + if (data.forEach) { + returnJson = []; + } + keys.forEach((e) => { + if ((data[e]) === undefined) { + } else if (data[e].buffer) { + returnJson[e] = parseInt(data[e].buffer.toString("hex"), 16); + } else if (typeof (data[e]) == "object") { + returnJson[e] = object2json(data[e]); + } else { + returnJson[e] = data[e]; + } + }); + return returnJson; } -// Use the decoded data -//Deno.writeTextFile("./result.json",JSON.stringify(json,null,2)) - -export default function read(data, type) { - if (type == 1) { - return object2json(readThrift(data)); - } else if (type == 3) { - let len = data[3]; - let Lname = new TextDecoder().decode(new Uint8Array(data.slice(4, 4 + len))); - data = data.slice(len + 6); - console.log("chrRes"); - const Transport = thrift.TFramedTransport; - const Protocol = thrift.TCompactProtocol; - let b = Buffer.from(data); - let tdata; - let bufTrans = new Transport(b); - let myprot = new Protocol(bufTrans); - try { - tdata = XreadX(myprot); - } catch (e) { - } - type = type + 2; - return object2json({ value: tdata, name: Lname, type: type.toString() }); - } else if (type == 5) { - return data; - } +export default function read(data, Protocol = thrift.TCompactProtocol) { + return object2json(readThrift(data, Protocol)); } diff --git a/server/runLocal.js b/server/runLocal.js deleted file mode 100644 index 7a21ff2..0000000 --- a/server/runLocal.js +++ /dev/null @@ -1,40 +0,0 @@ -import ws from "./dnowork.js"; - -export async function handler(request) { - const url = new URL(request.url); - - switch (url.pathname.split("/")[1]) { - case "post": - return await ws(request); - default: - break; - } - try { - let mimeType = "text/html"; - switch (url.pathname.split(".")[url.pathname.split(".").length - 1]) { - case "html": - mimeType = "text/html"; - break; - case "js": - mimeType = "application/javascript"; - break; - case "svg": - mimeType = "image/svg+xml"; - break; - case "css": - mimeType = "text/css"; - break; - default: - break; - } - return new Response(await Deno.readTextFile("../site" + url.pathname), { - headers: { "content-type": mimeType }, - }); - } catch (error) { - } - return new Response(await Deno.readTextFile("../site/index.html"), { - headers: { "content-type": "text/html", "deno-status": "error" }, - }); -} - -Deno.serve(handler); diff --git a/server/server.md b/server/server.md index f3c01ca..c03110e 100644 --- a/server/server.md +++ b/server/server.md @@ -1 +1 @@ -Deno Server +#### Deno Server diff --git a/server/thriftJson.js b/server/thriftJson.js new file mode 100644 index 0000000..98bd207 --- /dev/null +++ b/server/thriftJson.js @@ -0,0 +1,14958 @@ +export default { + "ApplicationType": { + "16": "IOS", + "17": "IOS_RC", + "18": "IOS_BETA", + "19": "IOS_ALPHA", + "32": "ANDROID", + "33": "ANDROID_RC", + "34": "ANDROID_BETA", + "35": "ANDROID_ALPHA", + "48": "WAP", + "49": "WAP_RC", + "50": "WAP_BETA", + "51": "WAP_ALPHA", + "64": "BOT", + "65": "BOT_RC", + "66": "BOT_BETA", + "67": "BOT_ALPHA", + "80": "WEB", + "81": "WEB_RC", + "82": "WEB_BETA", + "83": "WEB_ALPHA", + "96": "DESKTOPWIN", + "97": "DESKTOPWIN_RC", + "98": "DESKTOPWIN_BETA", + "99": "DESKTOPWIN_ALPHA", + "112": "DESKTOPMAC", + "113": "DESKTOPMAC_RC", + "114": "DESKTOPMAC_BETA", + "115": "DESKTOPMAC_ALPHA", + "128": "CHANNELGW", + "129": "CHANNELGW_RC", + "130": "CHANNELGW_BETA", + "131": "CHANNELGW_ALPHA", + "144": "CHANNELCP", + "145": "CHANNELCP_RC", + "146": "CHANNELCP_BETA", + "147": "CHANNELCP_ALPHA", + "160": "WINPHONE", + "161": "WINPHONE_RC", + "162": "WINPHONE_BETA", + "163": "WINPHONE_ALPHA", + "176": "BLACKBERRY", + "177": "BLACKBERRY_RC", + "178": "BLACKBERRY_BETA", + "179": "BLACKBERRY_ALPHA", + "192": "WINMETRO", + "193": "WINMETRO_RC", + "194": "WINMETRO_BETA", + "195": "WINMETRO_ALPHA", + "208": "S40", + "209": "S40_RC", + "210": "S40_BETA", + "211": "S40_ALPHA", + "224": "CHRONO", + "225": "CHRONO_RC", + "226": "CHRONO_BETA", + "227": "CHRONO_ALPHA", + "256": "TIZEN", + "257": "TIZEN_RC", + "258": "TIZEN_BETA", + "259": "TIZEN_ALPHA", + "272": "VIRTUAL", + "288": "FIREFOXOS", + "289": "FIREFOXOS_RC", + "290": "FIREFOXOS_BETA", + "291": "FIREFOXOS_ALPHA", + "304": "IOSIPAD", + "305": "IOSIPAD_RC", + "306": "IOSIPAD_BETA", + "307": "IOSIPAD_ALPHA", + "320": "BIZIOS", + "321": "BIZIOS_RC", + "322": "BIZIOS_BETA", + "323": "BIZIOS_ALPHA", + "336": "BIZANDROID", + "337": "BIZANDROID_RC", + "338": "BIZANDROID_BETA", + "339": "BIZANDROID_ALPHA", + "352": "BIZBOT", + "353": "BIZBOT_RC", + "354": "BIZBOT_BETA", + "355": "BIZBOT_ALPHA", + "368": "CHROMEOS", + "369": "CHROMEOS_RC", + "370": "CHROMEOS_BETA", + "371": "CHROMEOS_ALPHA", + "384": "ANDROIDLITE", + "385": "ANDROIDLITE_RC", + "386": "ANDROIDLITE_BETA", + "387": "ANDROIDLITE_ALPHA", + "400": "WIN10", + "401": "WIN10_RC", + "402": "WIN10_BETA", + "403": "WIN10_ALPHA", + "416": "BIZWEB", + "417": "BIZWEB_RC", + "418": "BIZWEB_BETA", + "419": "BIZWEB_ALPHA", + "432": "DUMMYPRIMARY", + "433": "DUMMYPRIMARY_RC", + "434": "DUMMYPRIMARY_BETA", + "435": "DUMMYPRIMARY_ALPHA", + "448": "SQUARE", + "449": "SQUARE_RC", + "450": "SQUARE_BETA", + "451": "SQUARE_ALPHA", + "464": "INTERNAL", + "465": "INTERNAL_RC", + "466": "INTERNAL_BETA", + "467": "INTERNAL_ALPHA", + "480": "CLOVAFRIENDS", + "481": "CLOVAFRIENDS_RC", + "482": "CLOVAFRIENDS_BETA", + "483": "CLOVAFRIENDS_ALPHA", + "496": "WATCHOS", + "497": "WATCHOS_RC", + "498": "WATCHOS_BETA", + "499": "WATCHOS_ALPHA", + "512": "OPENCHAT_PLUG", + "513": "OPENCHAT_PLUG_RC", + "514": "OPENCHAT_PLUG_BETA", + "515": "OPENCHAT_PLUG_ALPHA", + "528": "ANDROIDSECONDARY", + "529": "ANDROIDSECONDARY_RC", + "530": "ANDROIDSECONDARY_BETA", + "531": "ANDROIDSECONDARY_ALPHA", + "544": "WEAROS", + "545": "WEAROS_RC", + "546": "WEAROS_BETA", + "547": "WEAROS_ALPHA" + }, + "ExtendedProfileAttribute": {}, + "PrivacyLevelType": { + "0": "PUBLIC", + "1": "PRIVATE" + }, + "PaidCallerIdStatus": { + "0": "NOT_SPECIFIED", + "1": "VALID", + "2": "VERIFICATION_REQUIRED", + "3": "NOT_PERMITTED", + "4": "LIMIT_EXCEEDED", + "5": "LIMIT_EXCEEDED_AND_VERIFICATION_REQUIRED" + }, + "PaidCallProductType": { + "0": "COIN", + "1": "CREDIT", + "2": "MONTHLY" + }, + "PaidCallType": { + "0": "OUT", + "1": "IN", + "2": "TOLLFREE", + "3": "RECORD", + "4": "AD", + "5": "CS" + }, + "BotType": { + "0": "RESERVED", + "1": "OFFICIAL", + "2": "LINE_AT_0", + "3": "LINE_AT" + }, + "BuddyOnAirLabel": { + "0": "ON_AIR", + "1": "LIVE", + "2": "GLP" + }, + "BuddyBannerLinkType": { + "0": "BUDDY_BANNER_LINK_HIDDEN", + "1": "BUDDY_BANNER_LINK_MID", + "2": "BUDDY_BANNER_LINK_URL" + }, + "BuddyOnAirType": { + "0": "NORMAL", + "1": "LIVE", + "2": "VOIP" + }, + "Diff": { + "0": "ADDED", + "1": "UPDATED", + "2": "REMOVED" + }, + "ReportType": { + "1": "ADVERTISING", + "2": "GENDER_HARASSMENT", + "3": "HARASSMENT", + "4": "OTHER" + }, + "SyncTriggerReason": { + "0": "UNKNOWN", + "1": "REVISION_GAP_TOO_LARGE_CLIENT", + "2": "REVISION_GAP_TOO_LARGE_SERVER", + "3": "OPERATION_EXPIRED", + "4": "REVISION_HOLE", + "5": "FORCE_TRIGGERED" + }, + "ReportCategory": { + "0": "PUSH_NORMAL_PLAIN", + "1": "PUSH_NORMAL_E2EE", + "2": "PUSH_VOIP_PLAIN", + "3": "PUSH_VOIP_E2EE" + }, + "BuddyResultState": { + "1": "ACCEPTED", + "2": "SUCCEEDED", + "3": "FAILED", + "4": "CANCELLED", + "5": "NOTIFY_FAILED", + "11": "STORING", + "21": "UPLOADING", + "31": "NOTIFYING", + "41": "REMOVING_SUBSCRIPTION", + "42": "UNREGISTERING_ACCOUNT", + "43": "NOTIFYING_LEAVE_CHAT" + }, + "BuddySearchRequestSource": { + "0": "NA", + "1": "FRIEND_VIEW", + "2": "OFFICIAL_ACCOUNT_VIEW" + }, + "CarrierCode": { + "0": "NOT_SPECIFIED", + "1": "JP_DOCOMO", + "2": "JP_AU", + "3": "JP_SOFTBANK", + "4": "JP_DOCOMO_LINE", + "17": "KR_SKT", + "18": "KR_KT", + "19": "KR_LGT" + }, + "ChannelConfiguration": { + "0": "MESSAGE", + "1": "MESSAGE_NOTIFICATION", + "2": "NOTIFICATION_CENTER" + }, + "ChannelPermission": { + "0": "PROFILE", + "1": "FRIENDS", + "2": "GROUP" + }, + "ChannelFeatureLicense": { + "26": "BLE_LCS_API_USABLE", + "27": "PROHIBIT_MINIMIZE_CHANNEL_BROWSER", + "28": "ALLOW_IOS_WEBKIT" + }, + "ChannelErrorCode": { + "0": "ILLEGAL_ARGUMENT", + "1": "INTERNAL_ERROR", + "2": "CONNECTION_ERROR", + "3": "AUTHENTICATIONI_FAILED", + "4": "NEED_PERMISSION_APPROVAL", + "5": "COIN_NOT_USABLE", + "6": "WEBVIEW_NOT_ALLOWED" + }, + "ChannelSyncType": { + "0": "SYNC", + "1": "REMOVE", + "2": "REMOVE_ALL" + }, + "LoginType": { + "0": "ID_CREDENTIAL", + "1": "QRCODE", + "2": "ID_CREDENTIAL_WITH_E2EE" + }, + "ContactAttribute": { + "1": "CONTACT_ATTRIBUTE_CAPABLE_VOICE_CALL", + "2": "CONTACT_ATTRIBUTE_CAPABLE_VIDEO_CALL", + "16": "CONTACT_ATTRIBUTE_CAPABLE_MY_HOME", + "32": "CONTACT_ATTRIBUTE_CAPABLE_BUDDY" + }, + "ContactCategory": { + "0": "NORMAL", + "1": "RECOMMEND" + }, + "ContactRelation": { + "0": "ONEWAY", + "1": "BOTH", + "2": "NOT_REGISTERED" + }, + "AsymmetricKeyAlgorithm": { + "1": "ASYMMETRIC_KEY_ALGORITHM_RSA", + "2": "ASYMMETRIC_KEY_ALGORITHM_ECDH" + }, + "ContactSetting": { + "1": "CONTACT_SETTING_NOTIFICATION_DISABLE", + "2": "CONTACT_SETTING_DISPLAY_NAME_OVERRIDE", + "4": "CONTACT_SETTING_CONTACT_HIDE", + "8": "CONTACT_SETTING_FAVORITE", + "16": "CONTACT_SETTING_DELETE" + }, + "ContactStatus": { + "0": "UNSPECIFIED", + "1": "FRIEND", + "2": "FRIEND_BLOCKED", + "3": "RECOMMEND", + "4": "RECOMMEND_BLOCKED", + "5": "DELETED", + "6": "DELETED_BLOCKED" + }, + "ContactType": { + "0": "MID", + "1": "PHONE", + "2": "EMAIL", + "3": "USERID", + "4": "PROXIMITY", + "5": "GROUP", + "6": "USER", + "7": "QRCODE", + "8": "PROMOTION_BOT", + "9": "CONTACT_MESSAGE", + "10": "FRIEND_REQUEST", + "11": "BEACON", + "128": "REPAIR", + "2305": "FACEBOOK", + "2306": "SINA", + "2307": "RENREN", + "2308": "FEIXIN", + "2309": "BBM" + }, + "GroupPreferenceAttribute": { + "1": "INVITATION_TICKET", + "2": "FAVORITE_TIMESTAMP" + }, + "ContentType": { + "0": "NONE", + "1": "IMAGE", + "2": "VIDEO", + "3": "AUDIO", + "4": "HTML", + "5": "PDF", + "6": "CALL", + "7": "STICKER", + "8": "PRESENCE", + "9": "GIFT", + "10": "GROUPBOARD", + "11": "APPLINK", + "12": "LINK", + "13": "CONTACT", + "14": "FILE", + "15": "LOCATION", + "16": "POSTNOTIFICATION", + "17": "RICH", + "18": "CHATEVENT", + "19": "MUSIC", + "20": "PAYMENT", + "21": "EXTIMAGE", + "22": "FLEX" + }, + "MessageRelationType": { + "0": "FORWARD", + "1": "AUTO_REPLY", + "2": "SUBORDINATE", + "3": "REPLY" + }, + "CustomMode": { + "1": "PROMOTION_FRIENDS_INVITE", + "2": "CAPABILITY_SERVER_SIDE_SMS", + "3": "LINE_CLIENT_ANALYTICS_CONFIGURATION" + }, + "RoomAttribute": { + "1": "NOTIFICATION_SETTING", + "255": "ALL" + }, + "UserStatus": { + "0": "NORMAL", + "1": "UNBOUND", + "2": "UNREGISTERED", + "3": "UNKNOWN" + }, + "EmailConfirmationStatus": { + "0": "NOT_SPECIFIED", + "1": "NOT_YET", + "3": "DONE", + "4": "NEED_ENFORCED_INPUT" + }, + "AccountMigrationPincodeType": { + "0": "NOT_APPLICABLE", + "1": "NOT_SET", + "2": "SET", + "3": "NEED_ENFORCED_INPUT" + }, + "AccountMigrationCheckType": { + "0": "SKIP", + "1": "PINCODE", + "2": "SECURITY_CENTER" + }, + "SecurityCenterSettingsType": { + "0": "NOT_APPLICABLE", + "1": "NOT_SET", + "2": "SET", + "3": "NEED_ENFORCED_INPUT" + }, + "EmailConfirmationType": { + "0": "SERVER_SIDE_EMAIL", + "1": "CLIENT_SIDE_EMAIL" + }, + "SquareChatAnnouncementType": {}, + "SquareChatAttribute": { + "2": "NAME", + "3": "SQUARE_CHAT_IMAGE", + "4": "STATE" + }, + "SquareMemberAttribute": { + "1": "DISPLAY_NAME", + "2": "PROFILE_IMAGE", + "3": "ABLE_TO_RECEIVE_MESSAGE", + "5": "MEMBERSHIP_STATE", + "6": "ROLE", + "7": "PREFERENCE" + }, + "SquareMemberRelationAttribute": { + "1": "BLOCKED" + }, + "SquarePreferenceAttribute": { + "1": "FAVORITE", + "2": "NOTI_FOR_NEW_JOIN_REQUEST" + }, + "SquareState": { + "0": "ALIVE", + "1": "DELETED", + "2": "SUSPENDED" + }, + "CommitMessageResultCode": { + "0": "DELIVERED", + "1": "DELIVERY_SKIPPED", + "2": "DELIVERY_RESTRICTED" + }, + "ErrorCode": { + "0": "ILLEGAL_ARGUMENT", + "1": "AUTHENTICATION_FAILED", + "2": "DB_FAILED", + "3": "INVALID_STATE", + "4": "EXCESSIVE_ACCESS", + "5": "NOT_FOUND", + "6": "INVALID_LENGTH", + "7": "NOT_AVAILABLE_USER", + "8": "NOT_AUTHORIZED_DEVICE", + "9": "INVALID_MID", + "10": "NOT_A_MEMBER", + "11": "INCOMPATIBLE_APP_VERSION", + "12": "NOT_READY", + "13": "NOT_AVAILABLE_SESSION", + "14": "NOT_AUTHORIZED_SESSION", + "15": "SYSTEM_ERROR", + "16": "NO_AVAILABLE_VERIFICATION_METHOD", + "17": "NOT_AUTHENTICATED", + "18": "INVALID_IDENTITY_CREDENTIAL", + "19": "NOT_AVAILABLE_IDENTITY_IDENTIFIER", + "20": "INTERNAL_ERROR", + "21": "NO_SUCH_IDENTITY_IDENFIER", + "22": "DEACTIVATED_ACCOUNT_BOUND_TO_THIS_IDENTITY", + "23": "ILLEGAL_IDENTITY_CREDENTIAL", + "24": "UNKNOWN_CHANNEL", + "25": "NO_SUCH_MESSAGE_BOX", + "26": "NOT_AVAILABLE_MESSAGE_BOX", + "27": "CHANNEL_DOES_NOT_MATCH", + "28": "NOT_YOUR_MESSAGE", + "29": "MESSAGE_DEFINED_ERROR", + "30": "USER_CANNOT_ACCEPT_PRESENTS", + "32": "USER_NOT_STICKER_OWNER", + "33": "MAINTENANCE_ERROR", + "34": "ACCOUNT_NOT_MATCHED", + "35": "ABUSE_BLOCK", + "36": "NOT_FRIEND", + "37": "NOT_ALLOWED_CALL", + "38": "BLOCK_FRIEND", + "39": "INCOMPATIBLE_VOIP_VERSION", + "40": "INVALID_SNS_ACCESS_TOKEN", + "41": "EXTERNAL_SERVICE_NOT_AVAILABLE", + "42": "NOT_ALLOWED_ADD_CONTACT", + "43": "NOT_CERTIFICATED", + "44": "NOT_ALLOWED_SECONDARY_DEVICE", + "45": "INVALID_PIN_CODE", + "46": "NOT_FOUND_IDENTITY_CREDENTIAL", + "47": "EXCEED_FILE_MAX_SIZE", + "48": "EXCEED_DAILY_QUOTA", + "49": "NOT_SUPPORT_SEND_FILE", + "50": "MUST_UPGRADE", + "51": "NOT_AVAILABLE_PIN_CODE_SESSION", + "52": "EXPIRED_REVISION", + "54": "NOT_YET_PHONE_NUMBER", + "55": "BAD_CALL_NUMBER", + "56": "UNAVAILABLE_CALL_NUMBER", + "57": "NOT_SUPPORT_CALL_SERVICE", + "58": "CONGESTION_CONTROL", + "59": "NO_BALANCE", + "60": "NOT_PERMITTED_CALLER_ID", + "61": "NO_CALLER_ID_LIMIT_EXCEEDED", + "62": "CALLER_ID_VERIFICATION_REQUIRED", + "63": "NO_CALLER_ID_LIMIT_EXCEEDED_AND_VERIFICATION_REQUIRED", + "64": "MESSAGE_NOT_FOUND", + "65": "INVALID_ACCOUNT_MIGRATION_PINCODE_FORMAT", + "66": "ACCOUNT_MIGRATION_PINCODE_NOT_MATCHED", + "67": "ACCOUNT_MIGRATION_PINCODE_BLOCKED", + "69": "INVALID_PASSWORD_FORMAT", + "70": "FEATURE_RESTRICTED", + "71": "MESSAGE_NOT_DESTRUCTIBLE", + "72": "PAID_CALL_REDEEM_FAILED", + "73": "PREVENTED_JOIN_BY_TICKET", + "75": "SEND_MESSAGE_NOT_PERMITTED_FROM_LINE_AT", + "76": "SEND_MESSAGE_NOT_PERMITTED_WHILE_AUTO_REPLY", + "77": "SECURITY_CENTER_NOT_VERIFIED", + "78": "SECURITY_CENTER_BLOCKED_BY_SETTING", + "79": "SECURITY_CENTER_BLOCKED", + "80": "TALK_PROXY_EXCEPTION", + "81": "E2EE_INVALID_PROTOCOL", + "82": "E2EE_RETRY_ENCRYPT", + "83": "E2EE_UPDATE_SENDER_KEY", + "84": "E2EE_UPDATE_RECEIVER_KEY", + "85": "E2EE_INVALID_ARGUMENT", + "86": "E2EE_INVALID_VERSION", + "87": "E2EE_SENDER_DISABLED", + "88": "E2EE_RECEIVER_DISABLED", + "89": "E2EE_SENDER_NOT_ALLOWED", + "90": "E2EE_RECEIVER_NOT_ALLOWED", + "91": "E2EE_RESEND_FAIL", + "92": "E2EE_RESEND_OK", + "93": "HITOKOTO_BACKUP_NO_AVAILABLE_DATA", + "94": "E2EE_UPDATE_PRIMARY_DEVICE", + "95": "SUCCESS", + "96": "CANCEL", + "97": "E2EE_PRIMARY_NOT_SUPPORT", + "98": "E2EE_RETRY_PLAIN", + "99": "E2EE_RECREATE_GROUP_KEY", + "100": "E2EE_GROUP_TOO_MANY_MEMBERS", + "101": "SERVER_BUSY", + "102": "NOT_ALLOWED_ADD_FOLLOW", + "103": "INCOMING_FRIEND_REQUEST_LIMIT", + "104": "OUTGOING_FRIEND_REQUEST_LIMIT", + "105": "OUTGOING_FRIEND_REQUEST_QUOTA", + "106": "DUPLICATED", + "107": "BANNED", + "108": "NOT_AN_INVITEE", + "109": "NOT_AN_OUTSIDER", + "111": "EMPTY_GROUP", + "112": "EXCEED_FOLLOW_LIMIT", + "113": "UNSUPPORTED_ACCOUNT_TYPE", + "114": "AGREEMENT_REQUIRED", + "115": "SHOULD_RETRY", + "116": "OVER_MAX_CHATS_PER_USER", + "117": "NOT_AVAILABLE_API", + "118": "INVALID_OTP", + "119": "MUST_REFRESH_V3_TOKEN", + "120": "ALREADY_EXPIRED", + "121": "USER_NOT_STICON_OWNER", + "122": "REFRESH_MEDIA_FLOW", + "123": "EXCEED_FOLLOWER_LIMIT" + }, + "FeatureType": { + "1": "OBS_VIDEO", + "2": "OBS_GENERAL", + "3": "OBS_RINGBACK_TONE" + }, + "GroupAttribute": { + "1": "NAME", + "2": "PICTURE_STATUS", + "4": "PREVENTED_JOIN_BY_TICKET", + "8": "NOTIFICATION_SETTING", + "255": "ALL" + }, + "IdentityProvider": { + "0": "UNKNOWN", + "1": "LINE", + "2": "NAVER_KR", + "3": "LINE_PHONE" + }, + "LoginResultType": { + "1": "SUCCESS", + "2": "REQUIRE_QRCODE", + "3": "REQUIRE_DEVICE_CONFIRM", + "4": "REQUIRE_SMS_CONFIRM" + }, + "MessageOperationType": { + "1": "SEND_MESSAGE", + "2": "RECEIVE_MESSAGE", + "3": "READ_MESSAGE", + "4": "NOTIFIED_READ_MESSAGE", + "5": "NOTIFIED_JOIN_CHAT", + "6": "FAILED_SEND_MESSAGE", + "7": "SEND_CONTENT", + "8": "SEND_CONTENT_RECEIPT", + "9": "SEND_CHAT_REMOVED", + "10": "REMOVE_ALL_MESSAGES" + }, + "MIDType": { + "0": "USER", + "1": "ROOM", + "2": "GROUP", + "3": "SQUARE", + "4": "SQUARE_CHAT", + "5": "SQUARE_MEMBER", + "6": "BOT" + }, + "ServiceCode": { + "0": "UNKNOWN", + "1": "TALK", + "2": "SQUARE" + }, + "FriendRequestDirection": { + "1": "INCOMING", + "2": "OUTGOING" + }, + "FriendRequestMethod": { + "1": "TIMELINE", + "2": "NEARBY", + "3": "SQUARE" + }, + "FriendRequestStatus": { + "0": "NONE", + "1": "AVAILABLE", + "2": "ALREADY_REQUESTED", + "3": "UNAVAILABLE" + }, + "ModificationType": { + "0": "ADD", + "1": "REMOVE", + "2": "MODIFY" + }, + "NotificationItemFetchMode": { + "0": "ALL", + "1": "APPEND" + }, + "NotificationQueueType": { + "1": "GLOBAL", + "2": "MESSAGE", + "3": "PRIMARY" + }, + "GroupCallMediaType": { + "1": "AUDIO", + "2": "VIDEO", + "3": "LIVE" + }, + "PersonalInfo": { + "0": "EMAIL", + "1": "PHONE", + "2": "BIRTHDAY", + "3": "RAW_BIRTHDAY" + }, + "NotificationStatus": { + "1": "NOTIFICATION_ITEM_EXIST", + "2": "TIMELINE_ITEM_EXIST", + "4": "NOTE_GROUP_NEW_ITEM_EXIST", + "8": "TIMELINE_BUDDYGROUP_CHANGED", + "16": "NOTE_ONE_TO_ONE_NEW_ITEM_EXIST", + "32": "ALBUM_ITEM_EXIST", + "64": "TIMELINE_ITEM_DELETED", + "128": "OTOGROUP_ITEM_EXIST", + "256": "GROUPHOME_NEW_ITEM_EXIST", + "512": "GROUPHOME_HIDDEN_ITEM_CHANGED", + "1024": "NOTIFICATION_ITEM_CHANGED", + "2048": "BEAD_ITEM_HIDE", + "4096": "BEAD_ITEM_SHOW", + "8192": "LINE_TICKET_UPDATED", + "16384": "TIMELINE_STORY_UPDATED", + "32768": "SMARTCH_UPDATED", + "65536": "AVATAR_UPDATED", + "131072": "HOME_NOTIFICATION_ITEM_EXIST", + "262144": "TIMELINE_REBOOT_COMPLETED", + "524288": "TIMELINE_GUIDE_STORY_UPDATED" + }, + "NotificationType": { + "1": "APPLE_APNS", + "2": "GOOGLE_C2DM", + "3": "NHN_NNI", + "4": "SKT_AOM", + "5": "MS_MPNS", + "6": "RIM_BIS", + "7": "GOOGLE_GCM", + "8": "NOKIA_NNAPI", + "9": "TIZEN", + "10": "MOZILLA_SIMPLE", + "17": "LINE_BOT", + "18": "LINE_WAP", + "19": "APPLE_APNS_VOIP", + "20": "MS_WNS", + "21": "GOOGLE_FCM", + "22": "CLOVA", + "23": "CLOVA_VOIP", + "24": "HUAWEI_HCM" + }, + "OpStatus": { + "0": "NORMAL", + "1": "ALERT_DISABLED", + "2": "ALWAYS" + }, + "OpType": { + "0": "END_OF_OPERATION", + "1": "UPDATE_PROFILE", + "2": "NOTIFIED_UPDATE_PROFILE", + "3": "REGISTER_USERID", + "4": "ADD_CONTACT", + "5": "NOTIFIED_ADD_CONTACT", + "6": "BLOCK_CONTACT", + "7": "UNBLOCK_CONTACT", + "8": "NOTIFIED_RECOMMEND_CONTACT", + "9": "CREATE_GROUP", + "10": "UPDATE_GROUP", + "11": "NOTIFIED_UPDATE_GROUP", + "12": "INVITE_INTO_GROUP", + "13": "NOTIFIED_INVITE_INTO_GROUP", + "14": "LEAVE_GROUP", + "15": "NOTIFIED_LEAVE_GROUP", + "16": "ACCEPT_GROUP_INVITATION", + "17": "NOTIFIED_ACCEPT_GROUP_INVITATION", + "18": "KICKOUT_FROM_GROUP", + "19": "NOTIFIED_KICKOUT_FROM_GROUP", + "20": "CREATE_ROOM", + "21": "INVITE_INTO_ROOM", + "22": "NOTIFIED_INVITE_INTO_ROOM", + "23": "LEAVE_ROOM", + "24": "NOTIFIED_LEAVE_ROOM", + "25": "SEND_MESSAGE", + "26": "RECEIVE_MESSAGE", + "27": "SEND_MESSAGE_RECEIPT", + "28": "RECEIVE_MESSAGE_RECEIPT", + "29": "SEND_CONTENT_RECEIPT", + "30": "RECEIVE_ANNOUNCEMENT", + "31": "CANCEL_INVITATION_GROUP", + "32": "NOTIFIED_CANCEL_INVITATION_GROUP", + "33": "NOTIFIED_UNREGISTER_USER", + "34": "REJECT_GROUP_INVITATION", + "35": "NOTIFIED_REJECT_GROUP_INVITATION", + "36": "UPDATE_SETTINGS", + "37": "NOTIFIED_REGISTER_USER", + "38": "INVITE_VIA_EMAIL", + "39": "NOTIFIED_REQUEST_RECOVERY", + "40": "SEND_CHAT_CHECKED", + "41": "SEND_CHAT_REMOVED", + "42": "NOTIFIED_FORCE_SYNC", + "43": "SEND_CONTENT", + "44": "SEND_MESSAGE_MYHOME", + "45": "NOTIFIED_UPDATE_CONTENT_PREVIEW", + "46": "REMOVE_ALL_MESSAGES", + "47": "NOTIFIED_UPDATE_PURCHASES", + "48": "DUMMY", + "49": "UPDATE_CONTACT", + "50": "NOTIFIED_RECEIVED_CALL", + "51": "CANCEL_CALL", + "52": "NOTIFIED_REDIRECT", + "53": "NOTIFIED_CHANNEL_SYNC", + "54": "FAILED_SEND_MESSAGE", + "55": "NOTIFIED_READ_MESSAGE", + "56": "FAILED_EMAIL_CONFIRMATION", + "58": "NOTIFIED_CHAT_CONTENT", + "59": "NOTIFIED_PUSH_NOTICENTER_ITEM", + "60": "NOTIFIED_JOIN_CHAT", + "61": "NOTIFIED_LEAVE_CHAT", + "62": "NOTIFIED_TYPING", + "63": "FRIEND_REQUEST_ACCEPTED", + "64": "DESTROY_MESSAGE", + "65": "NOTIFIED_DESTROY_MESSAGE", + "66": "UPDATE_PUBLICKEYCHAIN", + "67": "NOTIFIED_UPDATE_PUBLICKEYCHAIN", + "68": "NOTIFIED_BLOCK_CONTACT", + "69": "NOTIFIED_UNBLOCK_CONTACT", + "70": "UPDATE_GROUPPREFERENCE", + "71": "NOTIFIED_PAYMENT_EVENT", + "72": "REGISTER_E2EE_PUBLICKEY", + "73": "NOTIFIED_E2EE_KEY_EXCHANGE_REQ", + "74": "NOTIFIED_E2EE_KEY_EXCHANGE_RESP", + "75": "NOTIFIED_E2EE_MESSAGE_RESEND_REQ", + "76": "NOTIFIED_E2EE_MESSAGE_RESEND_RESP", + "77": "NOTIFIED_E2EE_KEY_UPDATE", + "78": "NOTIFIED_BUDDY_UPDATE_PROFILE", + "79": "NOTIFIED_UPDATE_LINEAT_TABS", + "80": "UPDATE_ROOM", + "81": "NOTIFIED_BEACON_DETECTED", + "82": "UPDATE_EXTENDED_PROFILE", + "83": "ADD_FOLLOW", + "84": "NOTIFIED_ADD_FOLLOW", + "85": "DELETE_FOLLOW", + "86": "NOTIFIED_DELETE_FOLLOW", + "87": "UPDATE_TIMELINE_SETTINGS", + "88": "NOTIFIED_FRIEND_REQUEST", + "89": "UPDATE_RINGBACK_TONE", + "90": "NOTIFIED_POSTBACK", + "91": "RECEIVE_READ_WATERMARK", + "92": "NOTIFIED_MESSAGE_DELIVERED", + "93": "NOTIFIED_UPDATE_CHAT_BAR", + "94": "NOTIFIED_CHATAPP_INSTALLED", + "95": "NOTIFIED_CHATAPP_UPDATED", + "96": "NOTIFIED_CHATAPP_NEW_MARK", + "97": "NOTIFIED_CHATAPP_DELETED", + "98": "NOTIFIED_CHATAPP_SYNC", + "99": "NOTIFIED_UPDATE_MESSAGE", + "100": "UPDATE_CHATROOMBGM", + "101": "NOTIFIED_UPDATE_CHATROOMBGM", + "102": "UPDATE_RINGTONE", + "118": "UPDATE_USER_SETTINGS", + "119": "NOTIFIED_UPDATE_STATUS_BAR", + "120": "CREATE_CHAT", + "121": "UPDATE_CHAT", + "122": "NOTIFIED_UPDATE_CHAT", + "123": "INVITE_INTO_CHAT", + "124": "NOTIFIED_INVITE_INTO_CHAT", + "125": "CANCEL_CHAT_INVITATION", + "126": "NOTIFIED_CANCEL_CHAT_INVITATION", + "127": "DELETE_SELF_FROM_CHAT", + "128": "NOTIFIED_DELETE_SELF_FROM_CHAT", + "129": "ACCEPT_CHAT_INVITATION", + "130": "NOTIFIED_ACCEPT_CHAT_INVITATION", + "131": "REJECT_CHAT_INVITATION", + "132": "DELETE_OTHER_FROM_CHAT", + "133": "NOTIFIED_DELETE_OTHER_FROM_CHAT", + "134": "NOTIFIED_CONTACT_CALENDAR_EVENT", + "135": "NOTIFIED_CONTACT_CALENDAR_EVENT_ALL", + "136": "UPDATE_THINGS_OPERATIONS", + "137": "SEND_CHAT_HIDDEN", + "138": "CHAT_META_SYNC_ALL", + "139": "SEND_REACTION", + "140": "NOTIFIED_SEND_REACTION", + "141": "NOTIFIED_UPDATE_PROFILE_CONTENT", + "142": "FAILED_DELIVERY_MESSAGE" + }, + "PayloadType": { + "101": "PAYLOAD_BUY", + "111": "PAYLOAD_CS", + "121": "PAYLOAD_BONUS", + "131": "PAYLOAD_EVENT" + }, + "PaymentPgType": { + "0": "PAYMENT_PG_NONE", + "1": "PAYMENT_PG_AU", + "2": "PAYMENT_PG_AL" + }, + "PaymentType": { + "1": "PAYMENT_APPLE", + "2": "PAYMENT_GOOGLE" + }, + "ProductBannerLinkType": { + "0": "BANNER_LINK_NONE", + "1": "BANNER_LINK_ITEM", + "2": "BANNER_LINK_URL", + "3": "BANNER_LINK_CATEGORY" + }, + "ProductEventType": { + "0": "NO_EVENT", + "65537": "CARRIER_ANY", + "131073": "BUDDY_ANY", + "196609": "INSTALL_IOS", + "196610": "INSTALL_ANDROID", + "262145": "MISSION_ANY", + "327681": "MUSTBUY_ANY" + }, + "StickerResourceType": { + "1": "STATIC", + "2": "ANIMATION", + "3": "SOUND", + "4": "ANIMATION_SOUND", + "5": "POPUP", + "6": "POPUP_SOUND", + "7": "NAME_TEXT", + "8": "PER_STICKER_TEXT" + }, + "PlaceSearchProvider": { + "0": "GOOGLE", + "1": "BAIDU", + "2": "FOURSQUARE" + }, + "PointErrorCode": { + "3001": "REQUEST_DUPLICATION", + "3002": "INVALID_PARAMETER", + "3003": "NOT_ENOUGH_BALANCE", + "3004": "AUTHENTICATION_FAIL", + "3005": "API_ACCESS_FORBIDDEN", + "3006": "MEMBER_ACCOUNT_NOT_FOUND", + "3007": "SERVICE_ACCOUNT_NOT_FOUND", + "3008": "TRANSACTION_NOT_FOUND", + "3009": "ALREADY_REVERSED_TRANSACTION", + "3010": "MESSAGE_NOT_READABLE", + "3011": "HTTP_REQUEST_METHOD_NOT_SUPPORTED", + "3012": "HTTP_MEDIA_TYPE_NOT_SUPPORTED", + "3013": "NOT_ALLOWED_TO_DEPOSIT", + "3014": "NOT_ALLOWED_TO_PAY", + "3015": "TRANSACTION_ACCESS_FORBIDDEN", + "4001": "INVALID_SERVICE_CONFIGURATION", + "5004": "DCS_COMMUNICATION_FAIL", + "5007": "UPDATE_BALANCE_FAIL", + "5888": "SYSTEM_MAINTENANCE", + "5999": "SYSTEM_ERROR" + }, + "ProfileAttribute": { + "1": "EMAIL", + "2": "DISPLAY_NAME", + "4": "PHONETIC_NAME", + "8": "PICTURE", + "16": "STATUS_MESSAGE", + "32": "ALLOW_SEARCH_BY_USERID", + "64": "ALLOW_SEARCH_BY_EMAIL", + "128": "BUDDY_STATUS", + "256": "MUSIC_PROFILE", + "511": "ALL" + }, + "PublicType": { + "0": "HIDDEN", + "1000": "PUBLIC" + }, + "RedirectType": { + "0": "NONE", + "1": "EXPIRE_SECOND" + }, + "RegistrationType": { + "0": "PHONE", + "1": "EMAIL_WAP", + "2305": "FACEBOOK", + "2306": "SINA", + "2307": "RENREN", + "2308": "FEIXIN" + }, + "ChatRoomAnnouncementType": { + "0": "MESSAGE", + "1": "NOTE" + }, + "SettingsAttribute": { + "1": "NOTIFICATION_ENABLE", + "2": "NOTIFICATION_MUTE_EXPIRATION", + "4": "NOTIFICATION_NEW_MESSAGE", + "8": "NOTIFICATION_GROUP_INVITATION", + "16": "NOTIFICATION_SHOW_MESSAGE", + "32": "NOTIFICATION_INCOMING_CALL", + "64": "PRIVACY_SYNC_CONTACTS", + "128": "PRIVACY_SEARCH_BY_PHONE_NUMBER", + "256": "NOTIFICATION_SOUND_MESSAGE", + "512": "NOTIFICATION_SOUND_GROUP", + "1024": "CONTACT_MY_TICKET", + "2048": "IDENTITY_PROVIDER", + "4096": "IDENTITY_IDENTIFIER", + "8192": "PRIVACY_SEARCH_BY_USERID", + "16384": "PRIVACY_SEARCH_BY_EMAIL", + "32768": "PREFERENCE_LOCALE", + "65536": "NOTIFICATION_DISABLED_WITH_SUB", + "131072": "NOTIFICATION_PAYMENT", + "262144": "SECURITY_CENTER_SETTINGS", + "524288": "SNS_ACCOUNT", + "1048576": "PHONE_REGISTRATION", + "2097152": "PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN", + "4194304": "CUSTOM_MODE", + "8388608": "PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME", + "16777216": "EMAIL_CONFIRMATION_STATUS", + "33554432": "PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND", + "67108864": "PRIVACY_AGREE_USE_LINECOIN_TO_PAIDCALL", + "134217728": "PRIVACY_AGREE_USE_PAIDCALL", + "268435456": "ACCOUNT_MIGRATION_PINCODE", + "536870912": "ENFORCED_INPUT_ACCOUNT_MIGRATION_PINCODE", + "1073741824": "PRIVACY_ALLOW_FRIEND_REQUEST", + "2147483647": "ALL" + }, + "SettingsAttributeEx": { + "0": "NOTIFICATION_ENABLE", + "1": "NOTIFICATION_MUTE_EXPIRATION", + "2": "NOTIFICATION_NEW_MESSAGE", + "3": "NOTIFICATION_GROUP_INVITATION", + "4": "NOTIFICATION_SHOW_MESSAGE", + "5": "NOTIFICATION_INCOMING_CALL", + "6": "PRIVACY_SYNC_CONTACTS", + "7": "PRIVACY_SEARCH_BY_PHONE_NUMBER", + "8": "NOTIFICATION_SOUND_MESSAGE", + "9": "NOTIFICATION_SOUND_GROUP", + "10": "CONTACT_MY_TICKET", + "11": "IDENTITY_PROVIDER", + "12": "IDENTITY_IDENTIFIER", + "13": "PRIVACY_SEARCH_BY_USERID", + "14": "PRIVACY_SEARCH_BY_EMAIL", + "15": "PREFERENCE_LOCALE", + "16": "NOTIFICATION_DISABLED_WITH_SUB", + "17": "NOTIFICATION_PAYMENT", + "18": "SECURITY_CENTER_SETTINGS", + "19": "SNS_ACCOUNT", + "20": "PHONE_REGISTRATION", + "21": "PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN", + "22": "CUSTOM_MODE", + "23": "PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME", + "24": "EMAIL_CONFIRMATION_STATUS", + "25": "PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND", + "26": "PRIVACY_AGREE_USE_LINECOIN_TO_PAIDCALL", + "27": "PRIVACY_AGREE_USE_PAIDCALL", + "28": "ACCOUNT_MIGRATION_PINCODE", + "29": "ENFORCED_INPUT_ACCOUNT_MIGRATION_PINCODE", + "30": "PRIVACY_ALLOW_FRIEND_REQUEST", + "33": "E2EE_ENABLE", + "34": "HITOKOTO_BACKUP_REQUESTED", + "35": "PRIVACY_PROFILE_MUSIC_POST_TO_MYHOME", + "36": "CONTACT_ALLOW_FOLLOWING", + "37": "PRIVACY_ALLOW_NEARBY", + "38": "AGREEMENT_NEARBY", + "39": "AGREEMENT_SQUARE", + "40": "NOTIFICATION_MENTION", + "41": "ALLOW_UNREGISTRATION_SECONDARY_DEVICE", + "42": "AGREEMENT_BOT_USE", + "43": "AGREEMENT_SHAKE_FUNCTION", + "44": "AGREEMENT_MOBILE_CONTACT_NAME", + "45": "NOTIFICATION_THUMBNAIL", + "46": "AGREEMENT_SOUND_TO_TEXT", + "47": "ENABLE_SOUND_TO_TEXT" + }, + "SnsIdType": { + "1": "FACEBOOK", + "2": "SINA", + "3": "RENREN", + "4": "FEIXIN", + "5": "BBM", + "6": "APPLE", + "7": "YAHOOJAPAN" + }, + "SpammerReason": { + "0": "OTHER", + "1": "ADVERTISING", + "2": "GENDER_HARASSMENT", + "3": "HARASSMENT" + }, + "SyncActionType": { + "0": "SYNC", + "1": "REPORT" + }, + "SpotCategory": { + "0": "UNKNOWN", + "1": "GOURMET", + "2": "BEAUTY", + "3": "TRAVEL", + "4": "SHOPPING", + "5": "ENTERTAINMENT", + "6": "SPORTS", + "7": "TRANSPORT", + "8": "LIFE", + "9": "HOSPITAL", + "10": "FINANCE", + "11": "EDUCATION", + "12": "OTHER", + "10000": "ALL" + }, + "SyncCategory": { + "0": "PROFILE", + "1": "SETTINGS", + "2": "OPS", + "3": "CONTACT", + "4": "RECOMMEND", + "5": "BLOCK", + "6": "GROUP", + "7": "ROOM", + "8": "NOTIFICATION", + "9": "ADDRESS_BOOK" + }, + "TMessageBoxStatus": { + "1": "ACTIVATED", + "2": "UNREAD" + }, + "UniversalNotificationServiceErrorCode": { + "0": "INTERNAL_ERROR", + "1": "INVALID_KEY", + "2": "ILLEGAL_ARGUMENT", + "3": "TOO_MANY_REQUEST", + "4": "AUTHENTICATION_FAILED", + "5": "NO_WRITE_PERMISSION" + }, + "UnregistrationReason": { + "1": "UNREGISTRATION_REASON_UNREGISTER_USER", + "2": "UNREGISTRATION_REASON_UNBIND_DEVICE" + }, + "UserAgeType": { + "1": "OVER", + "2": "UNDER", + "3": "UNDEFINED" + }, + "VerificationMethod": { + "0": "NO_AVAILABLE", + "1": "PIN_VIA_SMS", + "2": "CALLERID_INDIGO", + "4": "PIN_VIA_TTS", + "10": "SKIP" + }, + "VerificationResult": { + "0": "FAILED", + "1": "OK_NOT_REGISTERED_YET", + "2": "OK_REGISTERED_WITH_SAME_DEVICE", + "3": "OK_REGISTERED_WITH_ANOTHER_DEVICE" + }, + "WapInvitationType": { + "1": "REGISTRATION", + "2": "CHAT" + }, + "MediaType": { + "1": "AUDIO", + "2": "VIDEO" + }, + "SQErrorCode": { + "0": "UNKNOWN", + "400": "ILLEGAL_ARGUMENT", + "401": "AUTHENTICATION_FAILURE", + "403": "FORBIDDEN", + "404": "NOT_FOUND", + "409": "REVISION_MISMATCH", + "410": "PRECONDITION_FAILED", + "500": "INTERNAL_ERROR", + "501": "NOT_IMPLEMENTED", + "505": "TRY_AGAIN_LATER" + }, + "SquareEventType": { + "0": "RECEIVE_MESSAGE", + "1": "SEND_MESSAGE", + "2": "NOTIFIED_JOIN_SQUARE_CHAT", + "3": "NOTIFIED_INVITE_INTO_SQUARE_CHAT", + "4": "NOTIFIED_LEAVE_SQUARE_CHAT", + "5": "NOTIFIED_DESTROY_MESSAGE", + "6": "NOTIFIED_MARK_AS_READ", + "7": "NOTIFIED_UPDATE_SQUARE_MEMBER_PROFILE", + "8": "NOTIFIED_UPDATE_SQUARE", + "9": "NOTIFIED_UPDATE_SQUARE_STATUS", + "10": "NOTIFIED_UPDATE_SQUARE_AUTHORITY", + "11": "NOTIFIED_UPDATE_SQUARE_MEMBER", + "12": "NOTIFIED_UPDATE_SQUARE_CHAT", + "13": "NOTIFIED_UPDATE_SQUARE_CHAT_STATUS", + "14": "NOTIFIED_UPDATE_SQUARE_CHAT_MEMBER", + "15": "NOTIFIED_CREATE_SQUARE_MEMBER", + "16": "NOTIFIED_CREATE_SQUARE_CHAT_MEMBER", + "17": "NOTIFIED_UPDATE_SQUARE_MEMBER_RELATION", + "18": "NOTIFIED_SHUTDOWN_SQUARE", + "19": "NOTIFIED_KICKOUT_FROM_SQUARE", + "20": "NOTIFIED_DELETE_SQUARE_CHAT", + "21": "NOTIFICATION_JOIN_REQUEST", + "22": "NOTIFICATION_JOINED", + "23": "NOTIFICATION_PROMOTED_COADMIN", + "24": "NOTIFICATION_PROMOTED_ADMIN", + "25": "NOTIFICATION_DEMOTED_MEMBER", + "26": "NOTIFICATION_KICKED_OUT", + "27": "NOTIFICATION_SQUARE_DELETE", + "28": "NOTIFICATION_SQUARE_CHAT_DELETE", + "29": "NOTIFICATION_MESSAGE", + "30": "NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_NAME", + "31": "NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_IMAGE", + "32": "NOTIFIED_UPDATE_SQUARE_FEATURE_SET", + "33": "NOTIFIED_ADD_BOT", + "34": "NOTIFIED_REMOVE_BOT", + "36": "NOTIFIED_UPDATE_SQUARE_NOTE_STATUS", + "37": "NOTIFIED_UPDATE_SQUARE_CHAT_ANNOUNCEMENT", + "38": "NOTIFIED_UPDATE_SQUARE_CHAT_MAX_MEMBER_COUNT", + "39": "NOTIFICATION_POST_ANNOUNCEMENT", + "40": "NOTIFICATION_POST", + "41": "MUTATE_MESSAGE", + "42": "NOTIFICATION_NEW_CHAT_MEMBER", + "43": "NOTIFIED_UPDATE_READONLY_CHAT", + "46": "NOTIFIED_UPDATE_MESSAGE_STATUS", + "47": "NOTIFICATION_MESSAGE_REACTION", + "48": "NOTIFIED_CHAT_POPUP", + "49": "NOTIFIED_SYSTEM_MESSAGE", + "50": "NOTIFIED_UPDATE_SQUARE_CHAT_FEATURE_SET" + }, + "SquareMemberRelationState": { + "1": "NONE", + "2": "BLOCKED" + }, + "SquareFeatureControlState": { + "1": "DISABLED", + "2": "ENABLED" + }, + "BooleanState": { + "0": "NONE", + "1": "OFF", + "2": "ON" + }, + "SquareType": { + "0": "CLOSED", + "1": "OPEN" + }, + "SquareChatType": { + "1": "OPEN", + "2": "SECRET", + "3": "ONE_ON_ONE", + "4": "SQUARE_DEFAULT" + }, + "SquareErrorCode": { + "0": "UNKNOWN", + "400": "ILLEGAL_ARGUMENT", + "401": "AUTHENTICATION_FAILURE", + "403": "FORBIDDEN", + "404": "NOT_FOUND", + "409": "REVISION_MISMATCH", + "410": "PRECONDITION_FAILED", + "500": "INTERNAL_ERROR", + "501": "NOT_IMPLEMENTED", + "503": "TRY_AGAIN_LATER", + "505": "MAINTENANCE", + "506": "NO_PRESENCE_EXISTS" + }, + "SquareChatState": { + "0": "ALIVE", + "1": "DELETED", + "2": "SUSPENDED" + }, + "SquareFeatureSetAttribute": { + "1": "CREATING_SECRET_SQUARE_CHAT", + "2": "INVITING_INTO_OPEN_SQUARE_CHAT" + }, + "SquareMembershipState": { + "1": "JOIN_REQUESTED", + "2": "JOINED", + "3": "REJECTED", + "4": "LEFT", + "5": "KICK_OUT", + "6": "BANNED", + "7": "DELETED" + }, + "SquareChatMemberAttribute": { + "4": "MEMBERSHIP_STATE", + "6": "NOTIFICATION_MESSAGE" + }, + "SquareMemberRole": { + "1": "ADMIN", + "2": "CO_ADMIN", + "10": "MEMBER" + }, + "PreconditionFailedExtraInfo": { + "0": "DUPLICATED_DISPLAY_NAME" + }, + "SquareChatMembershipState": { + "1": "JOINED", + "2": "LEFT" + }, + "FetchDirection": { + "1": "FORWARD", + "2": "BACKWARD" + }, + "SquareAttribute": { + "1": "NAME", + "2": "WELCOME_MESSAGE", + "3": "PROFILE_IMAGE", + "4": "DESCRIPTION", + "6": "SEARCHABLE", + "7": "CATEGORY", + "8": "INVITATION_URL", + "9": "ABLE_TO_USE_INVITATION_URL", + "10": "STATE" + }, + "SquareAuthorityAttribute": { + "1": "UPDATE_SQUARE_PROFILE", + "2": "INVITE_NEW_MEMBER", + "3": "APPROVE_JOIN_REQUEST", + "4": "CREATE_POST", + "5": "CREATE_OPEN_SQUARE_CHAT", + "6": "DELETE_SQUARE_CHAT_OR_POST", + "7": "REMOVE_SQUARE_MEMBER", + "8": "GRANT_ROLE", + "9": "ENABLE_INVITATION_TICKET", + "10": "CREATE_CHAT_ANNOUNCEMENT" + }, + "SquareEventStatus": { + "1": "NORMAL", + "2": "ALERT_DISABLED" + }, + "Location": [ + { + "fid": 1, + "name": "title", + "type": 11 + }, + { + "fid": 2, + "name": "address", + "type": 11 + }, + { + "fid": 3, + "name": "latitude", + "type": 4 + }, + { + "fid": 4, + "name": "longitude", + "type": 4 + }, + { + "fid": 5, + "name": "phone", + "type": 11 + }, + { + "fid": 6, + "name": "categoryId", + "type": 11 + }, + { + "fid": 7, + "name": "provider", + "struct": "PlaceSearchProvider" + }, + { + "fid": 8, + "name": "accuracy", + "struct": "GeolocationAccuracy" + }, + { + "fid": 9, + "name": "altitudeMeters", + "type": 4 + } + ], + "MessageBoxV2MessageId": [ + { + "fid": 1, + "name": "deliveredTime", + "type": 10 + }, + { + "fid": 2, + "name": "messageId", + "type": 10 + } + ], + "MessageCommitResult": [ + { + "fid": 1, + "name": "requestId", + "type": 11 + }, + { + "fid": 2, + "name": "state", + "struct": "BuddyResultState" + }, + { + "fid": 3, + "name": "messageStoreRequestId", + "type": 11 + }, + { + "fid": 4, + "name": "messageIds", + "list": 11 + }, + { + "fid": 11, + "name": "receiverCount", + "type": 10 + }, + { + "fid": 12, + "name": "successCount", + "type": 10 + }, + { + "fid": 13, + "name": "failCount", + "type": 10 + }, + { + "fid": 14, + "name": "blockCount", + "type": 10 + }, + { + "fid": 15, + "name": "unregisteredCount", + "type": 10 + }, + { + "fid": 16, + "name": "unrelatedCount", + "type": 10 + }, + { + "fid": 21, + "name": "errorDescription", + "type": 11 + } + ], + "CallHost": [ + { + "fid": 1, + "name": "host", + "type": 11 + }, + { + "fid": 2, + "name": "port", + "type": 8 + }, + { + "fid": 3, + "name": "zone", + "type": 11 + } + ], + "AgeCheckDocomoResult": [ + { + "fid": 1, + "name": "authUrl", + "type": 11 + }, + { + "fid": 2, + "name": "userAgeType", + "struct": "UserAgeType" + } + ], + "AgeCheckRequestResult": [ + { + "fid": 1, + "name": "authUrl", + "type": 11 + }, + { + "fid": 2, + "name": "sessionId", + "type": 11 + } + ], + "TextMessageAnnouncementContents": [ + { + "fid": 1, + "name": "messageId", + "type": 11 + }, + { + "fid": 2, + "name": "text", + "type": 11 + }, + { + "fid": 3, + "name": "senderSquareMemberMid", + "type": 11 + }, + { + "fid": 4, + "name": "createdAt", + "type": 10 + }, + { + "fid": 5, + "name": "senderMid", + "type": 11 + } + ], + "SquareChatAnnouncementContents": [ + { + "fid": 1, + "name": "textMessageAnnouncementContents", + "struct": "TextMessageAnnouncementContents" + } + ], + "SquareChatAnnouncement": [ + { + "fid": 1, + "name": "announcementSeq", + "type": 10 + }, + { + "fid": 2, + "name": "type", + "struct": "SquareChatAnnouncementType" + }, + { + "fid": 3, + "name": "contents", + "struct": "SquareChatAnnouncementContents" + }, + { + "fid": 4, + "name": "createdAt", + "type": 10 + }, + { + "fid": 5, + "name": "creator", + "type": 11 + } + ], + "Announcement": [ + { + "fid": 1, + "name": "index", + "type": 8 + }, + { + "fid": 10, + "name": "forceUpdate", + "type": 2 + }, + { + "fid": 11, + "name": "title", + "type": 11 + }, + { + "fid": 12, + "name": "text", + "type": 11 + }, + { + "fid": 13, + "name": "createdTime", + "type": 10 + }, + { + "fid": 14, + "name": "pictureUrl", + "type": 11 + }, + { + "fid": 15, + "name": "thumbnailUrl", + "type": 11 + } + ], + "ChannelProvider": [ + { + "fid": 1, + "name": "name", + "type": 11 + } + ], + "E2EEPublicKey": [ + { + "fid": 1, + "name": "version", + "type": 8 + }, + { + "fid": 2, + "name": "keyId", + "type": 8 + }, + { + "fid": 4, + "name": "keyData" + }, + { + "fid": 5, + "name": "createdTime", + "type": 10 + } + ], + "ChannelDomain": [ + { + "fid": 1, + "name": "host", + "type": 11 + }, + { + "fid": 2, + "name": "removed", + "type": 2 + } + ], + "E2EENegotiationResult": [ + { + "fid": 1, + "name": "allowedTypes", + "set": "ContentType" + }, + { + "fid": 2, + "name": "publicKey", + "struct": "E2EEPublicKey" + }, + { + "fid": 3, + "name": "specVersion", + "type": 8 + } + ], + "OTPResult": [ + { + "fid": 1, + "name": "otpId", + "type": 11 + }, + { + "fid": 2, + "name": "otp", + "type": 11 + } + ], + "Square": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "name", + "type": 11 + }, + { + "fid": 3, + "name": "welcomeMessage", + "type": 11 + }, + { + "fid": 4, + "name": "profileImageObsHash", + "type": 11 + }, + { + "fid": 5, + "name": "desc", + "type": 11 + }, + { + "fid": 6, + "name": "searchable", + "type": 2 + }, + { + "fid": 7, + "name": "type", + "struct": "SquareType" + }, + { + "fid": 8, + "name": "categoryId", + "type": 8 + }, + { + "fid": 9, + "name": "invitationURL", + "type": 11 + }, + { + "fid": 10, + "name": "revision", + "type": 10 + }, + { + "fid": 11, + "name": "ableToUseInvitationTicket", + "type": 2 + }, + { + "fid": 12, + "name": "state", + "struct": "SquareState" + }, + { + "fid": 13, + "name": "emblems", + "list": "SquareEmblem" + }, + { + "fid": 14, + "name": "joinMethod", + "struct": "SquareJoinMethod" + }, + { + "fid": 15, + "name": "adultOnly", + "struct": "BooleanState" + }, + { + "fid": 16, + "name": "svcTags", + "list": 11 + }, + { + "fid": 17, + "name": "createdAt", + "type": 10 + } + ], + "SquareAuthority": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "updateSquareProfile", + "struct": "SquareMemberRole" + }, + { + "fid": 3, + "name": "inviteNewMember", + "struct": "SquareMemberRole" + }, + { + "fid": 4, + "name": "approveJoinRequest", + "struct": "SquareMemberRole" + }, + { + "fid": 5, + "name": "createPost", + "struct": "SquareMemberRole" + }, + { + "fid": 6, + "name": "createOpenSquareChat", + "struct": "SquareMemberRole" + }, + { + "fid": 7, + "name": "deleteSquareChatOrPost", + "struct": "SquareMemberRole" + }, + { + "fid": 8, + "name": "removeSquareMember", + "struct": "SquareMemberRole" + }, + { + "fid": 9, + "name": "grantRole", + "struct": "SquareMemberRole" + }, + { + "fid": 10, + "name": "enableInvitationTicket", + "struct": "SquareMemberRole" + }, + { + "fid": 11, + "name": "revision", + "type": 10 + }, + { + "fid": 12, + "name": "createSquareChatAnnouncement", + "struct": "SquareMemberRole" + }, + { + "fid": 13, + "name": "updateMaxChatMemberCount", + "struct": "SquareMemberRole" + }, + { + "fid": 14, + "name": "useReadonlyDefaultChat", + "struct": "SquareMemberRole" + } + ], + "SquarePreference": [ + { + "fid": 1, + "name": "favoriteTimestamp", + "type": 10 + }, + { + "fid": 2, + "name": "notiForNewJoinRequest", + "type": 2 + } + ], + "SquareMember": [ + { + "fid": 1, + "name": "squareMemberMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "displayName", + "type": 11 + }, + { + "fid": 4, + "name": "profileImageObsHash", + "type": 11 + }, + { + "fid": 5, + "name": "ableToReceiveMessage", + "type": 2 + }, + { + "fid": 7, + "name": "membershipState", + "struct": "SquareMembershipState" + }, + { + "fid": 8, + "name": "role", + "struct": "SquareMemberRole" + }, + { + "fid": 9, + "name": "revision", + "type": 10 + }, + { + "fid": 10, + "name": "preference", + "struct": "SquarePreference" + }, + { + "fid": 11, + "name": "joinMessage", + "type": 11 + } + ], + "SquareMemberRelation": [ + { + "fid": 1, + "name": "state", + "struct": "SquareMemberRelationState" + }, + { + "fid": 2, + "name": "revision", + "type": 10 + } + ], + "SquareFeature": [ + { + "fid": 1, + "name": "controlState", + "struct": "SquareFeatureControlState" + }, + { + "fid": 2, + "name": "booleanValue", + "struct": "BooleanState" + } + ], + "SquareFeatureSet": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "revision", + "type": 10 + }, + { + "fid": 11, + "name": "creatingSecretSquareChat", + "struct": "SquareFeature" + }, + { + "fid": 12, + "name": "invitingIntoOpenSquareChat", + "struct": "SquareFeature" + }, + { + "fid": 13, + "name": "creatingSquareChat", + "struct": "SquareFeature" + }, + { + "fid": 14, + "name": "readonlyDefaultChat", + "struct": "SquareFeature" + }, + { + "fid": 15, + "name": "showingAdvertisement", + "struct": "SquareFeature" + }, + { + "fid": 16, + "name": "delegateJoinToPlug", + "struct": "SquareFeature" + }, + { + "fid": 17, + "name": "delegateKickOutToPlug", + "struct": "SquareFeature" + }, + { + "fid": 18, + "name": "disableUpdateJoinMethod", + "struct": "SquareFeature" + }, + { + "fid": 19, + "name": "disableTransferAdmin", + "struct": "SquareFeature" + }, + { + "fid": 20, + "name": "creatingLiveTalk", + "struct": "SquareFeature" + }, + { + "fid": 21, + "name": "disableUpdateSearchable", + "struct": "SquareFeature" + } + ], + "SquareStatus": [ + { + "fid": 1, + "name": "memberCount", + "type": 8 + }, + { + "fid": 2, + "name": "joinRequestCount", + "type": 8 + }, + { + "fid": 3, + "name": "lastJoinRequestAt", + "type": 10 + }, + { + "fid": 4, + "name": "openChatCount", + "type": 8 + } + ], + "SquareChat": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "type", + "struct": "SquareChatType" + }, + { + "fid": 4, + "name": "name", + "type": 11 + }, + { + "fid": 5, + "name": "chatImageObsHash", + "type": 11 + }, + { + "fid": 6, + "name": "squareChatRevision", + "type": 10 + }, + { + "fid": 7, + "name": "maxMemberCount", + "type": 8 + }, + { + "fid": 8, + "name": "state", + "struct": "SquareChatState" + }, + { + "fid": 9, + "name": "invitationUrl", + "type": 11 + }, + { + "fid": 10, + "name": "messageVisibility", + "struct": "MessageVisibility" + }, + { + "fid": 11, + "name": "ableToSearchMessage", + "struct": "BooleanState" + } + ], + "NoteStatus": [ + { + "fid": 1, + "name": "noteCount", + "type": 8 + }, + { + "fid": 2, + "name": "latestCreatedAt", + "type": 10 + } + ], + "SquareInfo": [ + { + "fid": 1, + "name": "square", + "struct": "Square" + }, + { + "fid": 2, + "name": "squareStatus", + "struct": "SquareStatus" + }, + { + "fid": 3, + "name": "squareNoteStatus", + "struct": "NoteStatus" + } + ], + "BotUseInfo": [ + { + "fid": 1, + "name": "botUseAgreementAccepted", + "type": 2 + }, + { + "fid": 2, + "name": "botInFriends", + "type": 2 + }, + { + "fid": 3, + "name": "primaryApplication", + "type": 11 + }, + { + "fid": 4, + "name": "locale", + "type": 11 + } + ], + "PaidCallAdCountry": [ + { + "fid": 1, + "name": "countryCode", + "type": 11 + }, + { + "fid": 2, + "name": "rateDivision", + "type": 11 + } + ], + "PaidCallAdResult": [ + { + "fid": 1, + "name": "adRemains", + "type": 8 + } + ], + "PaidCallBalance": [ + { + "fid": 1, + "name": "productType", + "struct": "PaidCallProductType" + }, + { + "fid": 2, + "name": "productName", + "type": 11 + }, + { + "fid": 3, + "name": "unit", + "type": 11 + }, + { + "fid": 4, + "name": "limitedPaidBalance", + "type": 8 + }, + { + "fid": 5, + "name": "limitedFreeBalance", + "type": 8 + }, + { + "fid": 6, + "name": "unlimitedPaidBalance", + "type": 8 + }, + { + "fid": 7, + "name": "unlimitedFreeBalance", + "type": 8 + }, + { + "fid": 8, + "name": "startTime", + "type": 10 + }, + { + "fid": 9, + "name": "endTime", + "type": 10 + }, + { + "fid": 10, + "name": "autopayEnabled", + "type": 2 + } + ], + "PaidCallCurrencyExchangeRate": [ + { + "fid": 1, + "name": "currencyCode", + "type": 11 + }, + { + "fid": 2, + "name": "currencyName", + "type": 11 + }, + { + "fid": 3, + "name": "currencySign", + "type": 11 + }, + { + "fid": 4, + "name": "preferred", + "type": 2 + }, + { + "fid": 5, + "name": "coinRate", + "type": 11 + }, + { + "fid": 6, + "name": "creditRate", + "type": 11 + } + ], + "ExtendedProfileBirthday": [ + { + "fid": 1, + "name": "year", + "type": 11 + }, + { + "fid": 2, + "name": "yearPrivacyLevelType", + "struct": "PrivacyLevelType" + }, + { + "fid": 3, + "name": "yearEnabled", + "type": 2 + }, + { + "fid": 5, + "name": "day", + "type": 11 + }, + { + "fid": 6, + "name": "dayPrivacyLevelType", + "struct": "PrivacyLevelType" + }, + { + "fid": 7, + "name": "dayEnabled", + "type": 2 + } + ], + "ExtendedProfile": [ + { + "fid": 1, + "name": "birthday", + "struct": "ExtendedProfileBirthday" + } + ], + "PaidCallDialing": [ + { + "fid": 1, + "name": "type", + "struct": "PaidCallType" + }, + { + "fid": 2, + "name": "dialedNumber", + "type": 11 + }, + { + "fid": 3, + "name": "serviceDomain", + "type": 11 + }, + { + "fid": 4, + "name": "productType", + "struct": "PaidCallProductType" + }, + { + "fid": 5, + "name": "productName", + "type": 11 + }, + { + "fid": 6, + "name": "multipleProduct", + "type": 2 + }, + { + "fid": 7, + "name": "callerIdStatus", + "struct": "PaidCallerIdStatus" + }, + { + "fid": 10, + "name": "balance", + "type": 8 + }, + { + "fid": 11, + "name": "unit", + "type": 11 + }, + { + "fid": 12, + "name": "rate", + "type": 8 + }, + { + "fid": 13, + "name": "displayCode", + "type": 11 + }, + { + "fid": 14, + "name": "calledNumber", + "type": 11 + }, + { + "fid": 15, + "name": "calleeNationalNumber", + "type": 11 + }, + { + "fid": 16, + "name": "calleeCallingCode", + "type": 11 + }, + { + "fid": 17, + "name": "rateDivision", + "type": 11 + }, + { + "fid": 20, + "name": "adMaxMin", + "type": 8 + }, + { + "fid": 21, + "name": "adRemains", + "type": 8 + }, + { + "fid": 22, + "name": "adSessionId", + "type": 11 + } + ], + "SpotItem": [ + { + "fid": 2, + "name": "name", + "type": 11 + }, + { + "fid": 3, + "name": "phone", + "type": 11 + }, + { + "fid": 4, + "name": "category", + "struct": "SpotCategory" + }, + { + "fid": 5, + "name": "mid", + "type": 11 + }, + { + "fid": 6, + "name": "countryAreaCode", + "type": 11 + }, + { + "fid": 10, + "name": "freePhoneCallable", + "type": 2 + } + ], + "SpotNearbyItem": [ + { + "fid": 2, + "name": "spotItem", + "struct": "SpotItem" + }, + { + "fid": 11, + "name": "location", + "struct": "Location" + } + ], + "SpotNearbyResponse": [ + { + "fid": 1, + "name": "spotNearbyItems", + "list": "SpotNearbyItem" + } + ], + "SpotPhoneNumberResponse": [ + { + "fid": 1, + "name": "spotItems", + "list": "SpotItem" + } + ], + "PaidCallHistory": [ + { + "fid": 1, + "name": "seq", + "type": 10 + }, + { + "fid": 2, + "name": "type", + "struct": "PaidCallType" + }, + { + "fid": 3, + "name": "dialedNumber", + "type": 11 + }, + { + "fid": 4, + "name": "calledNumber", + "type": 11 + }, + { + "fid": 5, + "name": "toMid", + "type": 11 + }, + { + "fid": 6, + "name": "toName", + "type": 11 + }, + { + "fid": 7, + "name": "setupTime", + "type": 10 + }, + { + "fid": 8, + "name": "startTime", + "type": 10 + }, + { + "fid": 9, + "name": "endTime", + "type": 10 + }, + { + "fid": 10, + "name": "duration", + "type": 10 + }, + { + "fid": 11, + "name": "terminate", + "type": 8 + }, + { + "fid": 12, + "name": "productType", + "struct": "PaidCallProductType" + }, + { + "fid": 13, + "name": "charge", + "type": 8 + }, + { + "fid": 14, + "name": "unit", + "type": 11 + }, + { + "fid": 15, + "name": "result", + "type": 11 + } + ], + "PaidCallHistoryResult": [ + { + "fid": 1, + "name": "historys", + "list": "PaidCallHistory" + }, + { + "fid": 2, + "name": "hasNext", + "type": 2 + } + ], + "PaidCallMetadataResult": [ + { + "fid": 1, + "name": "currencyExchangeRates", + "list": "PaidCallCurrencyExchangeRate" + }, + { + "fid": 2, + "name": "recommendedCountryCodes", + "list": 11 + }, + { + "fid": 3, + "name": "adCountries", + "list": "PaidCallAdCountry" + } + ], + "PaidCallRedeemResult": [ + { + "fid": 1, + "name": "eventName", + "type": 11 + }, + { + "fid": 2, + "name": "eventAmount", + "type": 8 + } + ], + "PaidCallResponse": [ + { + "fid": 1, + "name": "host", + "struct": "CallHost" + }, + { + "fid": 2, + "name": "dialing", + "struct": "PaidCallDialing" + }, + { + "fid": 3, + "name": "token", + "type": 11 + }, + { + "fid": 4, + "name": "spotItems", + "list": "SpotItem" + } + ], + "PaidCallUserRate": [ + { + "fid": 1, + "name": "countryCode", + "type": 11 + }, + { + "fid": 2, + "name": "rate", + "type": 8 + }, + { + "fid": 3, + "name": "rateDivision", + "type": 11 + }, + { + "fid": 4, + "name": "rateName", + "type": 11 + } + ], + "ChannelInfo": [ + { + "fid": 1, + "name": "channelId", + "type": 11 + }, + { + "fid": 3, + "name": "name", + "type": 11 + }, + { + "fid": 4, + "name": "entryPageUrl", + "type": 11 + }, + { + "fid": 5, + "name": "descriptionText", + "type": 11 + }, + { + "fid": 6, + "name": "provider", + "struct": "ChannelProvider" + }, + { + "fid": 7, + "name": "publicType", + "struct": "PublicType" + }, + { + "fid": 8, + "name": "iconImage", + "type": 11 + }, + { + "fid": 9, + "name": "permissions", + "list": 11 + }, + { + "fid": 11, + "name": "iconThumbnailImage", + "type": 11 + }, + { + "fid": 12, + "name": "channelConfigurations", + "list": "ChannelConfiguration" + }, + { + "fid": 13, + "name": "lcsAllApiUsable", + "type": 2 + }, + { + "fid": 14, + "name": "allowedPermissions", + "set": "ChannelPermission" + }, + { + "fid": 15, + "name": "channelDomains", + "list": "ChannelDomain" + }, + { + "fid": 16, + "name": "updatedTimestamp", + "type": 10 + } + ], + "ApprovedChannelInfo": [ + { + "fid": 1, + "name": "channelInfo", + "struct": "ChannelInfo" + }, + { + "fid": 2, + "name": "approvedAt", + "type": 10 + } + ], + "ApprovedChannelInfos": [ + { + "fid": 1, + "name": "approvedChannelInfos", + "list": "ApprovedChannelInfo" + }, + { + "fid": 2, + "name": "revision", + "type": 10 + } + ], + "AuthQrcode": [ + { + "fid": 1, + "name": "qrcode", + "type": 11 + }, + { + "fid": 2, + "name": "verifier", + "type": 11 + }, + { + "fid": 3, + "name": "callbackUrl", + "type": 11 + } + ], + "AnalyticsInfo": [ + { + "fid": 1, + "name": "gaSamplingRate", + "type": 4 + }, + { + "fid": 2, + "name": "tmid", + "type": 11 + } + ], + "ContactTransition": [ + { + "fid": 1, + "name": "ownerMid", + "type": 11 + }, + { + "fid": 2, + "name": "targetMid", + "type": 11 + }, + { + "fid": 3, + "name": "previousStatus", + "struct": "ContactStatus" + }, + { + "fid": 4, + "name": "resultStatus", + "struct": "ContactStatus" + } + ], + "UserTicketResponse": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "userTicket", + "type": 11 + } + ], + "BuddyBanner": [ + { + "fid": 1, + "name": "buddyBannerLinkType", + "struct": "BuddyBannerLinkType" + }, + { + "fid": 2, + "name": "buddyBannerLink", + "type": 11 + }, + { + "fid": 3, + "name": "buddyBannerImageUrl", + "type": 11 + } + ], + "BuddyDetail": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "memberCount", + "type": 10 + }, + { + "fid": 3, + "name": "onAir", + "type": 2 + }, + { + "fid": 4, + "name": "businessAccount", + "type": 2 + }, + { + "fid": 5, + "name": "addable", + "type": 2 + }, + { + "fid": 6, + "name": "acceptableContentTypes", + "set": "ContentType" + }, + { + "fid": 7, + "name": "capableMyhome", + "type": 2 + }, + { + "fid": 8, + "name": "freePhoneCallable", + "type": 2 + }, + { + "fid": 9, + "name": "phoneNumberToDial", + "type": 11 + }, + { + "fid": 10, + "name": "needPermissionApproval", + "type": 2 + }, + { + "fid": 11, + "name": "channelId", + "type": 11 + }, + { + "fid": 12, + "name": "channelProviderName", + "type": 11 + }, + { + "fid": 13, + "name": "iconType", + "type": 8 + }, + { + "fid": 14, + "name": "botType", + "struct": "BotType" + }, + { + "fid": 15, + "name": "showRichMenu", + "type": 2 + }, + { + "fid": 16, + "name": "richMenuRevision", + "type": 10 + }, + { + "fid": 17, + "name": "onAirLabel", + "struct": "BuddyOnAirLabel" + }, + { + "fid": 18, + "name": "useTheme", + "type": 2 + }, + { + "fid": 19, + "name": "themeId", + "type": 11 + }, + { + "fid": 20, + "name": "useBar", + "type": 2 + }, + { + "fid": 21, + "name": "barRevision", + "type": 10 + }, + { + "fid": 22, + "name": "useBackground", + "type": 2 + }, + { + "fid": 23, + "name": "backgroundId", + "type": 11 + }, + { + "fid": 24, + "name": "statusBarEnabled", + "type": 2 + }, + { + "fid": 25, + "name": "statusBarRevision", + "type": 10 + }, + { + "fid": 26, + "name": "searchId", + "type": 11 + }, + { + "fid": 27, + "name": "onAirVersion", + "type": 8 + }, + { + "fid": 28, + "name": "blockable", + "type": 2 + }, + { + "fid": 29, + "name": "botActiveStatus", + "struct": "BuddyBotActiveStatus" + }, + { + "fid": 30, + "name": "membershipEnabled", + "type": 2 + } + ], + "Contact": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "createdTime", + "type": 10 + }, + { + "fid": 10, + "name": "type", + "struct": "ContactType" + }, + { + "fid": 11, + "name": "status", + "struct": "ContactStatus" + }, + { + "fid": 21, + "name": "relation", + "struct": "ContactRelation" + }, + { + "fid": 22, + "name": "displayName", + "type": 11 + }, + { + "fid": 23, + "name": "phoneticName", + "type": 11 + }, + { + "fid": 24, + "name": "pictureStatus", + "type": 11 + }, + { + "fid": 25, + "name": "thumbnailUrl", + "type": 11 + }, + { + "fid": 26, + "name": "statusMessage", + "type": 11 + }, + { + "fid": 27, + "name": "displayNameOverridden", + "type": 11 + }, + { + "fid": 28, + "name": "favoriteTime", + "type": 10 + }, + { + "fid": 31, + "name": "capableVoiceCall", + "type": 2 + }, + { + "fid": 32, + "name": "capableVideoCall", + "type": 2 + }, + { + "fid": 33, + "name": "capableMyhome", + "type": 2 + }, + { + "fid": 34, + "name": "capableBuddy", + "type": 2 + }, + { + "fid": 35, + "name": "attributes", + "type": 8 + }, + { + "fid": 36, + "name": "settings", + "type": 10 + }, + { + "fid": 37, + "name": "picturePath", + "type": 11 + }, + { + "fid": 38, + "name": "recommendParams", + "type": 11 + }, + { + "fid": 39, + "name": "friendRequestStatus", + "struct": "FriendRequestStatus" + }, + { + "fid": 40, + "name": "musicProfile", + "type": 11 + }, + { + "fid": 42, + "name": "videoProfile", + "type": 11 + }, + { + "fid": 43, + "name": "statusMessageContentMetadata", + "map": 11 + }, + { + "fid": 44, + "name": "avatarProfile", + "struct": "AvatarProfile" + }, + { + "fid": 45, + "name": "friendRingtone", + "type": 11 + }, + { + "fid": 46, + "name": "friendRingbackTone", + "type": 11 + }, + { + "fid": 47, + "name": "nftProfile", + "type": 2 + }, + { + "fid": 48, + "name": "pictureSource", + "struct": "PictureSource" + } + ], + "BuddyList": [ + { + "fid": 1, + "name": "classification", + "type": 11 + }, + { + "fid": 2, + "name": "displayName", + "type": 11 + }, + { + "fid": 3, + "name": "totalBuddyCount", + "type": 8 + }, + { + "fid": 4, + "name": "popularContacts", + "list": "Contact" + } + ], + "RegisterWithPhoneNumberResult": [ + { + "fid": 1, + "name": "authToken", + "type": 11 + }, + { + "fid": 2, + "name": "recommendEmailRegistration", + "type": 2 + }, + { + "fid": 3, + "name": "certificate", + "type": 11 + } + ], + "BuddyMessageRequest": [ + { + "fid": 1, + "name": "contentType", + "struct": "ContentType" + }, + { + "fid": 2, + "name": "text", + "type": 11 + }, + { + "fid": 3, + "name": "location", + "struct": "Location" + }, + { + "fid": 4, + "name": "content" + }, + { + "fid": 5, + "name": "contentMetadata", + "map": 11 + } + ], + "BuddyOnAirUrls": [ + { + "fid": 1, + "name": "hls", + "map": 11 + }, + { + "fid": 2, + "name": "smoothStreaming", + "map": 11 + } + ], + "BuddyOnAir": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 3, + "name": "freshnessLifetime", + "type": 10 + }, + { + "fid": 4, + "name": "onAirId", + "type": 11 + }, + { + "fid": 5, + "name": "onAir", + "type": 2 + }, + { + "fid": 11, + "name": "text", + "type": 11 + }, + { + "fid": 12, + "name": "viewerCount", + "type": 10 + }, + { + "fid": 13, + "name": "targetCount", + "type": 10 + }, + { + "fid": 31, + "name": "onAirType", + "struct": "BuddyOnAirType" + }, + { + "fid": 32, + "name": "onAirUrls", + "struct": "BuddyOnAirUrls" + } + ], + "BuddyProfile": [ + { + "fid": 1, + "name": "buddyId", + "type": 11 + }, + { + "fid": 2, + "name": "mid", + "type": 11 + }, + { + "fid": 3, + "name": "searchId", + "type": 11 + }, + { + "fid": 4, + "name": "displayName", + "type": 11 + }, + { + "fid": 5, + "name": "statusMessage", + "type": 11 + }, + { + "fid": 11, + "name": "contactCount", + "type": 10 + } + ], + "CommitMessageResult": [ + { + "fid": 1, + "name": "message", + "struct": "Message" + }, + { + "fid": 2, + "name": "code", + "struct": "CommitMessageResultCode" + }, + { + "fid": 3, + "name": "reason", + "type": 11 + }, + { + "fid": 4, + "name": "successCount", + "type": 10 + }, + { + "fid": 5, + "name": "failCount", + "type": 10 + }, + { + "fid": 6, + "name": "unregisterCount", + "type": 10 + }, + { + "fid": 7, + "name": "blockCount", + "type": 10 + } + ], + "BuddySearchResult": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "displayName", + "type": 11 + }, + { + "fid": 3, + "name": "pictureStatus", + "type": 11 + }, + { + "fid": 4, + "name": "picturePath", + "type": 11 + }, + { + "fid": 5, + "name": "statusMessage", + "type": 11 + }, + { + "fid": 6, + "name": "businessAccount", + "type": 2 + } + ], + "SyncParamMid": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "diff", + "struct": "Diff" + }, + { + "fid": 3, + "name": "revision", + "type": 10 + } + ], + "SIMInfo": [ + { + "fid": 1, + "name": "phoneNumber", + "type": 11 + }, + { + "fid": 2, + "name": "countryCode", + "type": 11 + } + ], + "SyncParamContact": [ + { + "fid": 1, + "name": "syncParamMid", + "struct": "SyncParamMid" + }, + { + "fid": 2, + "name": "contactStatus", + "struct": "ContactStatus" + } + ], + "ChannelDomains": [ + { + "fid": 1, + "name": "channelDomains", + "list": "ChannelDomain" + }, + { + "fid": 2, + "name": "revision", + "type": 10 + } + ], + "ProductCategory": [ + { + "fid": 1, + "name": "productCategoryId", + "type": 10 + }, + { + "fid": 2, + "name": "title", + "type": 11 + }, + { + "fid": 3, + "name": "productCount", + "type": 8 + }, + { + "fid": 4, + "name": "newFlag", + "type": 2 + } + ], + "ChannelInfos": [ + { + "fid": 1, + "name": "channelInfos", + "list": "ChannelInfo" + }, + { + "fid": 2, + "name": "revision", + "type": 10 + } + ], + "ChannelNotificationSetting": [ + { + "fid": 1, + "name": "channelId", + "type": 11 + }, + { + "fid": 2, + "name": "name", + "type": 11 + }, + { + "fid": 3, + "name": "notificationReceivable", + "type": 2 + }, + { + "fid": 4, + "name": "messageReceivable", + "type": 2 + }, + { + "fid": 5, + "name": "showDefault", + "type": 2 + } + ], + "ChannelSyncDatas": [ + { + "fid": 1, + "name": "channelInfos", + "list": "ChannelInfo" + }, + { + "fid": 2, + "name": "channelDomains", + "list": "ChannelDomain" + }, + { + "fid": 3, + "name": "revision", + "type": 10 + }, + { + "fid": 4, + "name": "expires", + "type": 10 + } + ], + "NotiCenterEventData": [ + { + "fid": 1, + "name": "id", + "type": 11 + }, + { + "fid": 2, + "name": "to", + "type": 11 + }, + { + "fid": 3, + "name": "from_", + "type": 11 + }, + { + "fid": 4, + "name": "toChannel", + "type": 11 + }, + { + "fid": 5, + "name": "fromChannel", + "type": 11 + }, + { + "fid": 6, + "name": "eventType", + "type": 11 + }, + { + "fid": 7, + "name": "createdTime", + "type": 10 + }, + { + "fid": 8, + "name": "operationRevision", + "type": 10 + }, + { + "fid": 9, + "name": "content", + "map": 11 + }, + { + "fid": 10, + "name": "push", + "map": 11 + } + ], + "ChannelToken": [ + { + "fid": 1, + "name": "token", + "type": 11 + }, + { + "fid": 2, + "name": "obsToken", + "type": 11 + }, + { + "fid": 3, + "name": "expiration", + "type": 10 + }, + { + "fid": 4, + "name": "refreshToken", + "type": 11 + }, + { + "fid": 5, + "name": "channelAccessToken", + "type": 11 + } + ], + "ChannelSettings": [ + { + "fid": 1, + "name": "unapprovedMessageReceivable", + "type": 2 + } + ], + "ChannelIdWithLastUpdated": [ + { + "fid": 1, + "name": "channelId", + "type": 11 + }, + { + "fid": 2, + "name": "lastUpdated", + "type": 10 + } + ], + "Coin": [ + { + "fid": 1, + "name": "freeCoinBalance", + "type": 8 + }, + { + "fid": 2, + "name": "payedCoinBalance", + "type": 8 + }, + { + "fid": 3, + "name": "totalCoinBalance", + "type": 8 + }, + { + "fid": 4, + "name": "rewardCoinBalance", + "type": 8 + } + ], + "CoinPayLoad": [ + { + "fid": 1, + "name": "payCoin", + "type": 8 + }, + { + "fid": 2, + "name": "freeCoin", + "type": 8 + }, + { + "fid": 3, + "name": "type", + "struct": "PayloadType" + }, + { + "fid": 4, + "name": "rewardCoin", + "type": 8 + } + ], + "CoinHistory": [ + { + "fid": 1, + "name": "payDate", + "type": 10 + }, + { + "fid": 2, + "name": "coinBalance", + "type": 8 + }, + { + "fid": 3, + "name": "coin", + "type": 8 + }, + { + "fid": 4, + "name": "price", + "type": 11 + }, + { + "fid": 5, + "name": "title", + "type": 11 + }, + { + "fid": 6, + "name": "refund", + "type": 2 + }, + { + "fid": 7, + "name": "paySeq", + "type": 11 + }, + { + "fid": 8, + "name": "currency", + "type": 11 + }, + { + "fid": 9, + "name": "currencySign", + "type": 11 + }, + { + "fid": 10, + "name": "displayPrice", + "type": 11 + }, + { + "fid": 11, + "name": "payload", + "struct": "CoinPayLoad" + }, + { + "fid": 12, + "name": "channelId", + "type": 11 + } + ], + "CoinHistoryCondition": [ + { + "fid": 1, + "name": "start", + "type": 10 + }, + { + "fid": 2, + "name": "size", + "type": 8 + }, + { + "fid": 3, + "name": "language", + "type": 11 + }, + { + "fid": 4, + "name": "eddt", + "type": 11 + }, + { + "fid": 5, + "name": "appStoreCode", + "struct": "PaymentType" + } + ], + "CoinHistoryResult": [ + { + "fid": 1, + "name": "historys", + "list": "CoinHistory" + }, + { + "fid": 2, + "name": "balance", + "struct": "Coin" + }, + { + "fid": 3, + "name": "hasNext", + "type": 2 + } + ], + "CoinProductItem": [ + { + "fid": 1, + "name": "itemId", + "type": 11 + }, + { + "fid": 2, + "name": "coin", + "type": 8 + }, + { + "fid": 3, + "name": "freeCoin", + "type": 8 + }, + { + "fid": 5, + "name": "currency", + "type": 11 + }, + { + "fid": 6, + "name": "price", + "type": 11 + }, + { + "fid": 7, + "name": "displayPrice", + "type": 11 + }, + { + "fid": 8, + "name": "name", + "type": 11 + }, + { + "fid": 9, + "name": "desc", + "type": 11 + } + ], + "CoinPurchaseConfirm": [ + { + "fid": 1, + "name": "orderId", + "type": 11 + }, + { + "fid": 2, + "name": "appStoreCode", + "struct": "PaymentType" + }, + { + "fid": 3, + "name": "receipt", + "type": 11 + }, + { + "fid": 4, + "name": "signature", + "type": 11 + }, + { + "fid": 5, + "name": "seller", + "type": 11 + }, + { + "fid": 6, + "name": "requestType", + "type": 11 + }, + { + "fid": 7, + "name": "ignoreReceipt", + "type": 2 + } + ], + "CoinPurchaseReservation": [ + { + "fid": 1, + "name": "productId", + "type": 11 + }, + { + "fid": 2, + "name": "country", + "type": 11 + }, + { + "fid": 3, + "name": "currency", + "type": 11 + }, + { + "fid": 4, + "name": "price", + "type": 11 + }, + { + "fid": 5, + "name": "appStoreCode", + "struct": "PaymentType" + }, + { + "fid": 6, + "name": "language", + "type": 11 + }, + { + "fid": 7, + "name": "pgCode", + "struct": "PaymentPgType" + }, + { + "fid": 8, + "name": "redirectUrl", + "type": 11 + } + ], + "CoinUseReservationItem": [ + { + "fid": 1, + "name": "itemId", + "type": 11 + }, + { + "fid": 2, + "name": "itemName", + "type": 11 + }, + { + "fid": 3, + "name": "amount", + "type": 8 + } + ], + "CoinUseReservation": [ + { + "fid": 1, + "name": "channelId", + "type": 11 + }, + { + "fid": 2, + "name": "shopOrderId", + "type": 11 + }, + { + "fid": 3, + "name": "appStoreCode", + "struct": "PaymentType" + }, + { + "fid": 4, + "name": "items", + "list": "CoinUseReservationItem" + }, + { + "fid": 5, + "name": "country", + "type": 11 + } + ], + "CompactContact": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "createdTime", + "type": 10 + }, + { + "fid": 3, + "name": "modifiedTime", + "type": 10 + }, + { + "fid": 4, + "name": "status", + "struct": "ContactStatus" + }, + { + "fid": 5, + "name": "settings", + "type": 10 + }, + { + "fid": 6, + "name": "displayNameOverridden", + "type": 11 + } + ], + "ContactModification": [ + { + "fid": 1, + "name": "type", + "struct": "ModificationType" + }, + { + "fid": 2, + "name": "luid", + "type": 11 + }, + { + "fid": 11, + "name": "phones", + "list": 11 + }, + { + "fid": 12, + "name": "emails", + "list": 11 + }, + { + "fid": 13, + "name": "userids", + "list": 11 + } + ], + "ContactRegistration": [ + { + "fid": 1, + "name": "contact", + "struct": "Contact" + }, + { + "fid": 10, + "name": "luid", + "type": 11 + }, + { + "fid": 11, + "name": "contactType", + "struct": "ContactType" + }, + { + "fid": 12, + "name": "contactKey", + "type": 11 + } + ], + "ContactReport": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "exists", + "type": 2 + }, + { + "fid": 3, + "name": "contact", + "struct": "Contact" + } + ], + "ContactReportResult": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "exists", + "type": 2 + } + ], + "DeviceInfo": [ + { + "fid": 1, + "name": "deviceName", + "type": 11 + }, + { + "fid": 2, + "name": "systemName", + "type": 11 + }, + { + "fid": 3, + "name": "systemVersion", + "type": 11 + }, + { + "fid": 4, + "name": "model", + "type": 11 + }, + { + "fid": 10, + "name": "carrierCode", + "struct": "CarrierCode" + }, + { + "fid": 11, + "name": "carrierName", + "type": 11 + }, + { + "fid": 20, + "name": "applicationType", + "struct": "ApplicationType" + } + ], + "EmailConfirmation": [ + { + "fid": 1, + "name": "usePasswordSet", + "type": 2 + }, + { + "fid": 2, + "name": "email", + "type": 11 + }, + { + "fid": 3, + "name": "password", + "type": 11 + }, + { + "fid": 4, + "name": "ignoreDuplication", + "type": 2 + } + ], + "EmailConfirmationSession": [ + { + "fid": 1, + "name": "emailConfirmationType", + "struct": "EmailConfirmationType" + }, + { + "fid": 2, + "name": "verifier", + "type": 11 + }, + { + "fid": 3, + "name": "targetEmail", + "type": 11 + } + ], + "FriendChannelMatrix": [ + { + "fid": 1, + "name": "channelId", + "type": 11 + }, + { + "fid": 2, + "name": "representMid", + "type": 11 + }, + { + "fid": 3, + "name": "count", + "type": 8 + }, + { + "fid": 4, + "name": "point", + "type": 8 + } + ], + "FriendChannelMatricesResponse": [ + { + "fid": 1, + "name": "expires", + "type": 10 + }, + { + "fid": 2, + "name": "matrices", + "list": "FriendChannelMatrix" + } + ], + "FriendRequest": [ + { + "fid": 1, + "name": "eMid", + "type": 11 + }, + { + "fid": 2, + "name": "mid", + "type": 11 + }, + { + "fid": 3, + "name": "direction", + "struct": "FriendRequestDirection" + }, + { + "fid": 4, + "name": "method", + "struct": "FriendRequestMethod" + }, + { + "fid": 5, + "name": "param", + "type": 11 + }, + { + "fid": 6, + "name": "timestamp", + "type": 10 + }, + { + "fid": 7, + "name": "seqId", + "type": 10 + }, + { + "fid": 10, + "name": "displayName", + "type": 11 + }, + { + "fid": 11, + "name": "picturePath", + "type": 11 + }, + { + "fid": 12, + "name": "pictureStatus", + "type": 11 + } + ], + "FriendRequestsInfo": [ + { + "fid": 1, + "name": "totalIncomingCount", + "type": 8 + }, + { + "fid": 2, + "name": "totalOutgoingCount", + "type": 8 + }, + { + "fid": 3, + "name": "recentIncomings", + "list": "FriendRequest" + }, + { + "fid": 4, + "name": "recentOutgoings", + "list": "FriendRequest" + }, + { + "fid": 5, + "name": "totalIncomingLimit", + "type": 8 + }, + { + "fid": 6, + "name": "totalOutgoingLimit", + "type": 8 + } + ], + "Geolocation": [ + { + "fid": 1, + "name": "longitude", + "type": 4 + }, + { + "fid": 2, + "name": "latitude", + "type": 4 + } + ], + "NotificationTarget": [ + { + "fid": 1, + "name": "applicationType", + "type": 11 + }, + { + "fid": 2, + "name": "applicationVersion", + "type": 11 + }, + { + "fid": 3, + "name": "region", + "type": 11 + } + ], + "GlobalEvent": [ + { + "fid": 1, + "name": "type", + "struct": "GlobalEventType" + }, + { + "fid": 2, + "name": "minDelayInMinutes", + "type": 8 + }, + { + "fid": 3, + "name": "maxDelayInMinutes", + "type": 8 + }, + { + "fid": 4, + "name": "createTimeMillis", + "type": 10 + }, + { + "fid": 5, + "name": "maxDelayHardLimit", + "type": 2 + } + ], + "GroupPreference": [ + { + "fid": 1, + "name": "invitationTicket", + "type": 11 + }, + { + "fid": 2, + "name": "favoriteTimestamp", + "type": 10 + } + ], + "Group": [ + { + "fid": 1, + "name": "id", + "type": 11 + }, + { + "fid": 2, + "name": "createdTime", + "type": 10 + }, + { + "fid": 10, + "name": "name", + "type": 11 + }, + { + "fid": 11, + "name": "pictureStatus", + "type": 11 + }, + { + "fid": 12, + "name": "preventedJoinByTicket", + "type": 2 + }, + { + "fid": 13, + "name": "groupPreference", + "struct": "GroupPreference" + }, + { + "fid": 20, + "name": "members", + "list": "Contact" + }, + { + "fid": 21, + "name": "creator", + "struct": "Contact" + }, + { + "fid": 22, + "name": "invitee", + "list": "Contact" + }, + { + "fid": 31, + "name": "notificationDisabled", + "type": 2 + } + ], + "IdentityCredential": [ + { + "fid": 1, + "name": "provider", + "struct": "IdentityProvider" + }, + { + "fid": 2, + "name": "identifier", + "type": 11 + }, + { + "fid": 3, + "name": "password", + "type": 11 + } + ], + "LastReadMessageId": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "lastReadMessageId", + "type": 11 + } + ], + "LastReadMessageIds": [ + { + "fid": 1, + "name": "chatId", + "type": 11 + }, + { + "fid": 2, + "name": "lastReadMessageIds", + "list": "LastReadMessageId" + } + ], + "VerificationSessionData": [ + { + "fid": 1, + "name": "sessionId", + "type": 11 + }, + { + "fid": 2, + "name": "method", + "struct": "VerificationMethod" + }, + { + "fid": 3, + "name": "callback", + "type": 11 + }, + { + "fid": 4, + "name": "normalizedPhone", + "type": 11 + }, + { + "fid": 5, + "name": "countryCode", + "type": 11 + }, + { + "fid": 6, + "name": "nationalSignificantNumber", + "type": 11 + }, + { + "fid": 7, + "name": "availableVerificationMethods", + "list": "VerificationMethod" + }, + { + "fid": 8, + "name": "callerIdMask", + "type": 11 + } + ], + "LoginResult": [ + { + "fid": 1, + "name": "authToken", + "type": 11 + }, + { + "fid": 2, + "name": "certificate", + "type": 11 + }, + { + "fid": 3, + "name": "verifier", + "type": 11 + }, + { + "fid": 4, + "name": "pinCode", + "type": 11 + }, + { + "fid": 5, + "name": "type", + "struct": "LoginResultType" + }, + { + "fid": 6, + "name": "lastPrimaryBindTime", + "type": 10 + }, + { + "fid": 7, + "name": "displayMessage", + "type": 11 + }, + { + "fid": 8, + "name": "sessionForSMSConfirm", + "struct": "VerificationSessionData" + } + ], + "LoginRequest": [ + { + "fid": 1, + "name": "type", + "type": 8 + }, + { + "fid": 2, + "name": "identityProvider", + "type": 8 + }, + { + "fid": 3, + "name": "identifier", + "type": 11 + }, + { + "fid": 4, + "name": "password", + "type": 11 + }, + { + "fid": 5, + "name": "keepLoggedIn", + "type": 2 + }, + { + "fid": 6, + "name": "accessLocation", + "type": 11 + }, + { + "fid": 7, + "name": "systemName", + "type": 11 + }, + { + "fid": 8, + "name": "certificate", + "type": 11 + }, + { + "fid": 9, + "name": "verifier", + "type": 11 + }, + { + "fid": 10, + "name": "secret", + "type": 11 + }, + { + "fid": 11, + "name": "e2eeVersion", + "type": 8 + } + ], + "LoginSession": [ + { + "fid": 1, + "name": "tokenKey", + "type": 11 + }, + { + "fid": 3, + "name": "expirationTime", + "type": 10 + }, + { + "fid": 11, + "name": "applicationType", + "struct": "ApplicationType" + }, + { + "fid": 12, + "name": "systemName", + "type": 11 + }, + { + "fid": 22, + "name": "accessLocation", + "type": 11 + } + ], + "Message": [ + { + "fid": 1, + "name": "_from", + "type": 11 + }, + { + "fid": 2, + "name": "to", + "type": 11 + }, + { + "fid": 3, + "name": "toType", + "struct": "MIDType" + }, + { + "fid": 4, + "name": "id", + "type": 11 + }, + { + "fid": 5, + "name": "createdTime", + "type": 10 + }, + { + "fid": 6, + "name": "deliveredTime", + "type": 10 + }, + { + "fid": 10, + "name": "text", + "type": 11 + }, + { + "fid": 11, + "name": "location", + "struct": "Location" + }, + { + "fid": 14, + "name": "hasContent", + "type": 2 + }, + { + "fid": 15, + "name": "contentType", + "struct": "ContentType" + }, + { + "fid": 17, + "name": "contentPreview" + }, + { + "fid": 18, + "name": "contentMetadata", + "map": 11 + }, + { + "fid": 19, + "name": "sessionId" + }, + { + "fid": 20, + "name": "chunks" + }, + { + "fid": 21, + "name": "relatedMessageId", + "type": 11 + }, + { + "fid": 22, + "name": "messageRelationType", + "struct": "MessageRelationType" + }, + { + "fid": 23, + "name": "readCount", + "type": 10 + }, + { + "fid": 24, + "name": "relatedMessageServiceCode", + "struct": "ServiceCode" + }, + { + "fid": 25, + "name": "appExtensionType", + "struct": "AppExtensionType" + }, + { + "fid": 27, + "name": "reactions", + "list": "Reaction" + } + ], + "SquareMessage": [ + { + "fid": 1, + "name": "message", + "struct": "Message" + }, + { + "fid": 3, + "name": "fromType", + "struct": "MIDType" + }, + { + "fid": 4, + "name": "squareMessageRevision", + "type": 10 + }, + { + "fid": 5, + "name": "state", + "struct": "SquareMessageState" + } + ], + "SquareChatStatusWithoutMessage": [ + { + "fid": 1, + "name": "memberCount", + "type": 8 + }, + { + "fid": 2, + "name": "unreadMessageCount", + "type": 8 + }, + { + "fid": 3, + "name": "markedAsReadMessageId", + "type": 11 + }, + { + "fid": 4, + "name": "mentionedMessageId", + "type": 11 + }, + { + "fid": 5, + "name": "notifiedMessageType", + "struct": "NotifiedMessageType" + } + ], + "SquareChatStatus": [ + { + "fid": 3, + "name": "lastMessage", + "struct": "SquareMessage" + }, + { + "fid": 4, + "name": "senderDisplayName", + "type": 11 + }, + { + "fid": 5, + "name": "otherStatus", + "struct": "SquareChatStatusWithoutMessage" + } + ], + "SquareChatMember": [ + { + "fid": 1, + "name": "squareMemberMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 3, + "name": "revision", + "type": 10 + }, + { + "fid": 4, + "name": "membershipState", + "struct": "SquareChatMembershipState" + }, + { + "fid": 5, + "name": "notificationForMessage", + "type": 2 + }, + { + "fid": 6, + "name": "notificationForNewMember", + "type": 2 + } + ], + "MessageOperation": [ + { + "fid": 1, + "name": "revision", + "type": 10 + }, + { + "fid": 2, + "name": "createdTime", + "type": 10 + }, + { + "fid": 3, + "name": "type", + "struct": "MessageOperationType" + }, + { + "fid": 4, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 5, + "name": "status", + "struct": "OpStatus" + }, + { + "fid": 10, + "name": "param1", + "type": 11 + }, + { + "fid": 11, + "name": "param2", + "type": 11 + }, + { + "fid": 12, + "name": "param3", + "type": 11 + }, + { + "fid": 20, + "name": "message", + "struct": "Message" + } + ], + "MessageOperations": [ + { + "fid": 1, + "name": "operations", + "list": "MessageOperation" + }, + { + "fid": 2, + "name": "endFlag", + "type": 2 + } + ], + "MessageStoreResult": [ + { + "fid": 1, + "name": "requestId", + "type": 11 + }, + { + "fid": 2, + "name": "messageIds", + "list": 11 + } + ], + "MetaProfile": [ + { + "fid": 1, + "name": "createTime", + "type": 10 + }, + { + "fid": 2, + "name": "regionCode", + "type": 11 + }, + { + "fid": 3, + "name": "identities", + "map": 11 + } + ], + "NotificationItem": [ + { + "fid": 1, + "name": "id", + "type": 11 + }, + { + "fid": 2, + "name": "_from", + "type": 11 + }, + { + "fid": 3, + "name": "to", + "type": 11 + }, + { + "fid": 4, + "name": "fromChannel", + "type": 11 + }, + { + "fid": 5, + "name": "toChannel", + "type": 11 + }, + { + "fid": 7, + "name": "revision", + "type": 10 + }, + { + "fid": 8, + "name": "createdTime", + "type": 10 + }, + { + "fid": 9, + "name": "content", + "map": 11 + } + ], + "NotificationFetchResult": [ + { + "fid": 1, + "name": "fetchMode", + "struct": "NotificationItemFetchMode" + }, + { + "fid": 2, + "name": "itemList", + "list": "NotificationItem" + } + ], + "Operation": [ + { + "fid": 1, + "name": "revision", + "type": 10 + }, + { + "fid": 2, + "name": "createdTime", + "type": 10 + }, + { + "fid": 3, + "name": "type", + "struct": "OpType" + }, + { + "fid": 4, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 5, + "name": "checksum", + "type": 11 + }, + { + "fid": 7, + "name": "status", + "struct": "OpStatus" + }, + { + "fid": 10, + "name": "param1", + "type": 11 + }, + { + "fid": 11, + "name": "param2", + "type": 11 + }, + { + "fid": 12, + "name": "param3", + "type": 11 + }, + { + "fid": 20, + "name": "message", + "struct": "Message" + } + ], + "PaymentReservation": [ + { + "fid": 1, + "name": "receiverMid", + "type": 11 + }, + { + "fid": 2, + "name": "productId", + "type": 11 + }, + { + "fid": 3, + "name": "language", + "type": 11 + }, + { + "fid": 4, + "name": "location", + "type": 11 + }, + { + "fid": 5, + "name": "currency", + "type": 11 + }, + { + "fid": 6, + "name": "price", + "type": 11 + }, + { + "fid": 7, + "name": "appStoreCode", + "struct": "PaymentType" + }, + { + "fid": 8, + "name": "messageText", + "type": 11 + }, + { + "fid": 9, + "name": "messageTemplate", + "type": 8 + }, + { + "fid": 10, + "name": "packageId", + "type": 10 + } + ], + "PaymentReservationResult": [ + { + "fid": 1, + "name": "orderId", + "type": 11 + }, + { + "fid": 2, + "name": "confirmUrl", + "type": 11 + }, + { + "fid": 3, + "name": "extras", + "map": 11 + } + ], + "Product": [ + { + "fid": 1, + "name": "productId", + "type": 11 + }, + { + "fid": 2, + "name": "packageId", + "type": 10 + }, + { + "fid": 3, + "name": "version", + "type": 8 + }, + { + "fid": 4, + "name": "authorName", + "type": 11 + }, + { + "fid": 5, + "name": "onSale", + "type": 2 + }, + { + "fid": 6, + "name": "validDays", + "type": 8 + }, + { + "fid": 7, + "name": "saleType", + "type": 8 + }, + { + "fid": 8, + "name": "copyright", + "type": 11 + }, + { + "fid": 9, + "name": "title", + "type": 11 + }, + { + "fid": 10, + "name": "descriptionText", + "type": 11 + }, + { + "fid": 11, + "name": "shopOrderId", + "type": 10 + }, + { + "fid": 12, + "name": "fromMid", + "type": 11 + }, + { + "fid": 13, + "name": "toMid", + "type": 11 + }, + { + "fid": 14, + "name": "validUntil", + "type": 10 + }, + { + "fid": 15, + "name": "priceTier", + "type": 8 + }, + { + "fid": 16, + "name": "price", + "type": 11 + }, + { + "fid": 17, + "name": "currency", + "type": 11 + }, + { + "fid": 18, + "name": "currencySymbol", + "type": 11 + }, + { + "fid": 19, + "name": "paymentType", + "struct": "PaymentType" + }, + { + "fid": 20, + "name": "createDate", + "type": 10 + }, + { + "fid": 21, + "name": "ownFlag", + "type": 2 + }, + { + "fid": 22, + "name": "eventType", + "struct": "ProductEventType" + }, + { + "fid": 23, + "name": "urlSchema", + "type": 11 + }, + { + "fid": 24, + "name": "downloadUrl", + "type": 11 + }, + { + "fid": 25, + "name": "buddyMid", + "type": 11 + }, + { + "fid": 26, + "name": "publishSince", + "type": 10 + }, + { + "fid": 27, + "name": "newFlag", + "type": 2 + }, + { + "fid": 28, + "name": "missionFlag", + "type": 2 + }, + { + "fid": 29, + "name": "categories", + "list": "ProductCategory" + }, + { + "fid": 30, + "name": "missionButtonText", + "type": 11 + }, + { + "fid": 31, + "name": "missionShortDescription", + "type": 11 + }, + { + "fid": 32, + "name": "authorId", + "type": 11 + }, + { + "fid": 41, + "name": "grantedByDefault", + "type": 2 + }, + { + "fid": 42, + "name": "displayOrder", + "type": 8 + }, + { + "fid": 43, + "name": "availableForPresent", + "type": 2 + }, + { + "fid": 44, + "name": "availableForMyself", + "type": 2 + }, + { + "fid": 51, + "name": "hasAnimation", + "type": 2 + }, + { + "fid": 52, + "name": "hasSound", + "type": 2 + }, + { + "fid": 53, + "name": "recommendationsEnabled", + "type": 2 + }, + { + "fid": 54, + "name": "stickerResourceType", + "struct": "StickerResourceType" + } + ], + "ProductList": [ + { + "fid": 1, + "name": "productList", + "list": "ProductDetail" + }, + { + "fid": 2, + "name": "offset", + "type": 8 + }, + { + "fid": 3, + "name": "totalSize", + "type": 8 + }, + { + "fid": 11, + "name": "title", + "type": 11 + } + ], + "StickerIdRange": [ + { + "fid": 1, + "name": "start", + "type": 10 + }, + { + "fid": 2, + "name": "size", + "type": 8 + } + ], + "ProductSimple": [ + { + "fid": 1, + "name": "productId", + "type": 11 + }, + { + "fid": 2, + "name": "packageId", + "type": 10 + }, + { + "fid": 3, + "name": "version", + "type": 8 + }, + { + "fid": 4, + "name": "onSale", + "type": 2 + }, + { + "fid": 5, + "name": "validUntil", + "type": 10 + }, + { + "fid": 10, + "name": "stickerIdRanges", + "list": "StickerIdRange" + }, + { + "fid": 41, + "name": "grantedByDefault", + "type": 2 + }, + { + "fid": 42, + "name": "displayOrder", + "type": 8 + } + ], + "ProductSimpleList": [ + { + "fid": 1, + "name": "hasNext", + "type": 2 + }, + { + "fid": 2, + "name": "reinvokeHour", + "type": 8 + }, + { + "fid": 3, + "name": "lastVersionSeq", + "type": 10 + }, + { + "fid": 4, + "name": "productList", + "list": "ProductSimple" + }, + { + "fid": 5, + "name": "recentNewReleaseDate", + "type": 10 + }, + { + "fid": 6, + "name": "recentEventReleaseDate", + "type": 10 + } + ], + "Profile": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 3, + "name": "userid", + "type": 11 + }, + { + "fid": 10, + "name": "phone", + "type": 11 + }, + { + "fid": 11, + "name": "email", + "type": 11 + }, + { + "fid": 12, + "name": "regionCode", + "type": 11 + }, + { + "fid": 20, + "name": "displayName", + "type": 11 + }, + { + "fid": 21, + "name": "phoneticName", + "type": 11 + }, + { + "fid": 22, + "name": "pictureStatus", + "type": 11 + }, + { + "fid": 23, + "name": "thumbnailUrl", + "type": 11 + }, + { + "fid": 24, + "name": "statusMessage", + "type": 11 + }, + { + "fid": 31, + "name": "allowSearchByUserid", + "type": 2 + }, + { + "fid": 32, + "name": "allowSearchByEmail", + "type": 2 + }, + { + "fid": 33, + "name": "picturePath", + "type": 11 + }, + { + "fid": 34, + "name": "musicProfile", + "type": 11 + }, + { + "fid": 35, + "name": "videoProfile", + "type": 11 + }, + { + "fid": 36, + "name": "statusMessageContentMetadata", + "map": 11 + }, + { + "fid": 37, + "name": "avatarProfile", + "struct": "AvatarProfile" + }, + { + "fid": 38, + "name": "nftProfile", + "type": 2 + }, + { + "fid": 39, + "name": "pictureSource", + "struct": "PictureSource" + } + ], + "ProximityMatchCandidateResult": [ + { + "fid": 1, + "name": "users", + "list": "Contact" + }, + { + "fid": 2, + "name": "buddies", + "list": "Contact" + } + ], + "RegisterWithSnsIdResult": [ + { + "fid": 1, + "name": "authToken", + "type": 11 + }, + { + "fid": 2, + "name": "userCreated", + "type": 2 + } + ], + "RequestTokenResponse": [ + { + "fid": 1, + "name": "requestToken", + "type": 11 + }, + { + "fid": 2, + "name": "returnUrl", + "type": 11 + } + ], + "Room": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "createdTime", + "type": 10 + }, + { + "fid": 10, + "name": "contacts", + "list": "Contact" + }, + { + "fid": 31, + "name": "notificationDisabled", + "type": 2 + }, + { + "fid": 40, + "name": "memberMids", + "list": 11 + } + ], + "SuggestDictionary": [ + { + "fid": 1, + "name": "language", + "type": 11 + }, + { + "fid": 2, + "name": "name", + "type": 11 + } + ], + "SuggestItemDictionaryIncrement": [ + { + "fid": 1, + "name": "status", + "struct": "SuggestDictionaryIncrementStatus" + }, + { + "fid": 2, + "name": "revision", + "type": 10 + }, + { + "fid": 3, + "name": "scheme", + "type": 11 + }, + { + "fid": 4, + "name": "data" + } + ], + "SuggestTagDictionaryIncrement": [ + { + "fid": 1, + "name": "status", + "struct": "SuggestDictionaryIncrementStatus" + }, + { + "fid": 2, + "name": "language", + "type": 11 + }, + { + "fid": 3, + "name": "revision", + "type": 10 + }, + { + "fid": 4, + "name": "scheme", + "type": 11 + }, + { + "fid": 5, + "name": "data" + } + ], + "SuggestDictionaryIncrements": [ + { + "fid": 1, + "name": "itemIncrement", + "struct": "SuggestItemDictionaryIncrement" + }, + { + "fid": 2, + "name": "tagIncrements", + "list": "SuggestTagDictionaryIncrement" + } + ], + "SuggestDictionaryIncrementStatus": { + "0": "SUCCESS", + "1": "INVALID_REVISION", + "2": "TOO_LARGE_DATA", + "3": "SCHEME_CHANGED", + "4": "RETRY", + "5": "FAIL", + "6": "TOO_OLD_DATA" + }, + "SuggestItemDictionaryRevision": [ + { + "fid": 1, + "name": "revision", + "type": 10 + }, + { + "fid": 2, + "name": "scheme", + "type": 11 + } + ], + "SuggestTagDictionaryRevision": [ + { + "fid": 1, + "name": "language", + "type": 11 + }, + { + "fid": 2, + "name": "revision", + "type": 10 + }, + { + "fid": 3, + "name": "scheme", + "type": 11 + } + ], + "SuggestDictionaryRevisions": [ + { + "fid": 1, + "name": "itemRevision", + "struct": "SuggestItemDictionaryRevision" + }, + { + "fid": 2, + "name": "tagRevisions", + "list": "SuggestTagDictionaryRevision" + } + ], + "SuggestDictionarySettings": [ + { + "fid": 1, + "name": "revision", + "type": 10 + }, + { + "fid": 2, + "name": "newRevision", + "type": 10 + }, + { + "fid": 3, + "name": "dictionaries", + "list": "SuggestDictionary" + }, + { + "fid": 4, + "name": "preloadedDictionaries", + "list": 11 + } + ], + "PhoneInfoForChannel": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "normalizedPhoneNumber", + "type": 11 + }, + { + "fid": 3, + "name": "allowedToSearchByPhoneNumber", + "type": 2 + }, + { + "fid": 4, + "name": "allowedToReceiveMessageFromNonFriend", + "type": 2 + }, + { + "fid": 5, + "name": "region", + "type": 11 + } + ], + "PhoneVerificationResult": [ + { + "fid": 1, + "name": "verificationResult", + "struct": "VerificationResult" + }, + { + "fid": 2, + "name": "accountMigrationCheckType", + "struct": "AccountMigrationCheckType" + }, + { + "fid": 3, + "name": "recommendAddFriends", + "type": 2 + } + ], + "PlaceSearchInfo": [ + { + "fid": 1, + "name": "name", + "type": 11 + }, + { + "fid": 2, + "name": "address", + "type": 11 + }, + { + "fid": 3, + "name": "latitude", + "type": 4 + }, + { + "fid": 4, + "name": "longitude", + "type": 4 + } + ], + "RSAKey": [ + { + "fid": 1, + "name": "keynm", + "type": 11 + }, + { + "fid": 2, + "name": "nvalue", + "type": 11 + }, + { + "fid": 3, + "name": "evalue", + "type": 11 + }, + { + "fid": 4, + "name": "sessionKey", + "type": 11 + } + ], + "SecurityCenterResult": [ + { + "fid": 1, + "name": "uri", + "type": 11 + }, + { + "fid": 2, + "name": "token", + "type": 11 + }, + { + "fid": 3, + "name": "cookiePath", + "type": 11 + }, + { + "fid": 4, + "name": "skip", + "type": 2 + } + ], + "SendBuddyMessageResult": [ + { + "fid": 1, + "name": "requestId", + "type": 11 + }, + { + "fid": 2, + "name": "state", + "struct": "BuddyResultState" + }, + { + "fid": 3, + "name": "messageId", + "type": 11 + }, + { + "fid": 4, + "name": "eventNo", + "type": 8 + }, + { + "fid": 11, + "name": "receiverCount", + "type": 10 + }, + { + "fid": 12, + "name": "successCount", + "type": 10 + }, + { + "fid": 13, + "name": "failCount", + "type": 10 + }, + { + "fid": 14, + "name": "cancelCount", + "type": 10 + }, + { + "fid": 15, + "name": "blockCount", + "type": 10 + }, + { + "fid": 16, + "name": "unregisterCount", + "type": 10 + }, + { + "fid": 21, + "name": "timestamp", + "type": 10 + }, + { + "fid": 22, + "name": "message", + "type": 11 + } + ], + "SetBuddyOnAirResult": [ + { + "fid": 1, + "name": "requestId", + "type": 11 + }, + { + "fid": 2, + "name": "state", + "struct": "BuddyResultState" + }, + { + "fid": 3, + "name": "eventNo", + "type": 8 + }, + { + "fid": 11, + "name": "receiverCount", + "type": 10 + }, + { + "fid": 12, + "name": "successCount", + "type": 10 + }, + { + "fid": 13, + "name": "failCount", + "type": 10 + }, + { + "fid": 14, + "name": "cancelCount", + "type": 10 + }, + { + "fid": 15, + "name": "unregisterCount", + "type": 10 + }, + { + "fid": 21, + "name": "timestamp", + "type": 10 + }, + { + "fid": 22, + "name": "message", + "type": 11 + } + ], + "Settings": [ + { + "fid": 10, + "name": "notificationEnable", + "type": 2 + }, + { + "fid": 11, + "name": "notificationMuteExpiration", + "type": 10 + }, + { + "fid": 12, + "name": "notificationNewMessage", + "type": 2 + }, + { + "fid": 13, + "name": "notificationGroupInvitation", + "type": 2 + }, + { + "fid": 14, + "name": "notificationShowMessage", + "type": 2 + }, + { + "fid": 15, + "name": "notificationIncomingCall", + "type": 2 + }, + { + "fid": 16, + "name": "notificationSoundMessage", + "type": 11 + }, + { + "fid": 17, + "name": "notificationSoundGroup", + "type": 11 + }, + { + "fid": 18, + "name": "notificationDisabledWithSub", + "type": 2 + }, + { + "fid": 19, + "name": "notificationPayment", + "type": 2 + }, + { + "fid": 20, + "name": "privacySyncContacts", + "type": 2 + }, + { + "fid": 21, + "name": "privacySearchByPhoneNumber", + "type": 2 + }, + { + "fid": 22, + "name": "privacySearchByUserid", + "type": 2 + }, + { + "fid": 23, + "name": "privacySearchByEmail", + "type": 2 + }, + { + "fid": 24, + "name": "privacyAllowSecondaryDeviceLogin", + "type": 2 + }, + { + "fid": 25, + "name": "privacyProfileImagePostToMyhome", + "type": 2 + }, + { + "fid": 26, + "name": "privacyReceiveMessagesFromNotFriend", + "type": 2 + }, + { + "fid": 27, + "name": "privacyAgreeUseLineCoinToPaidCall", + "type": 2 + }, + { + "fid": 28, + "name": "privacyAgreeUsePaidCall", + "type": 2 + }, + { + "fid": 29, + "name": "privacyAllowFriendRequest", + "type": 2 + }, + { + "fid": 30, + "name": "contactMyTicket", + "type": 11 + }, + { + "fid": 40, + "name": "identityProvider", + "struct": "IdentityProvider" + }, + { + "fid": 41, + "name": "identityIdentifier", + "type": 11 + }, + { + "fid": 42, + "name": "snsAccounts", + "map": 11 + }, + { + "fid": 43, + "name": "phoneRegistration", + "type": 2 + }, + { + "fid": 44, + "name": "emailConfirmationStatus", + "struct": "EmailConfirmationStatus" + }, + { + "fid": 45, + "name": "accountMigrationPincodeType", + "struct": "AccountMigrationPincodeType" + }, + { + "fid": 46, + "name": "enforcedInputAccountMigrationPincode", + "type": 2 + }, + { + "fid": 47, + "name": "securityCenterSettingsType", + "struct": "SecurityCenterSettingsType" + }, + { + "fid": 48, + "name": "allowUnregistrationSecondaryDevice", + "type": 2 + }, + { + "fid": 49, + "name": "pwlessPrimaryCredentialRegistration", + "type": 2 + }, + { + "fid": 50, + "name": "preferenceLocale", + "type": 11 + }, + { + "fid": 60, + "name": "customModes", + "map": 11 + }, + { + "fid": 61, + "name": "e2eeEnable", + "type": 2 + }, + { + "fid": 62, + "name": "hitokotoBackupRequested", + "type": 2 + }, + { + "fid": 63, + "name": "privacyProfileMusicPostToMyhome", + "type": 2 + }, + { + "fid": 65, + "name": "privacyAllowNearby", + "type": 2 + }, + { + "fid": 66, + "name": "agreementNearbyTime", + "type": 10 + }, + { + "fid": 67, + "name": "agreementSquareTime", + "type": 10 + }, + { + "fid": 68, + "name": "notificationMention", + "type": 2 + }, + { + "fid": 69, + "name": "botUseAgreementAcceptedAt", + "type": 10 + }, + { + "fid": 70, + "name": "agreementShakeFunction", + "type": 10 + }, + { + "fid": 71, + "name": "agreementMobileContactName", + "type": 10 + }, + { + "fid": 73, + "name": "agreementSoundToText", + "type": 10 + }, + { + "fid": 74, + "name": "privacyPolicyVersion", + "type": 11 + }, + { + "fid": 75, + "name": "agreementAdByWebAccess", + "type": 10 + }, + { + "fid": 76, + "name": "agreementPhoneNumberMatching", + "type": 10 + }, + { + "fid": 77, + "name": "agreementCommunicationInfo", + "type": 10 + }, + { + "fid": 78, + "name": "privacySharePersonalInfoToFriends", + "struct": "UserSharePersonalInfoToFriendsType" + }, + { + "fid": 79, + "name": "agreementThingsWirelessCommunication", + "type": 10 + }, + { + "fid": 80, + "name": "agreementGdpr", + "type": 10 + }, + { + "fid": 81, + "name": "privacyStatusMessageHistory", + "struct": "UserStatusMessageHistoryType" + }, + { + "fid": 82, + "name": "agreementProvideLocation", + "type": 10 + }, + { + "fid": 83, + "name": "agreementBeacon", + "type": 10 + }, + { + "fid": 85, + "name": "privacyAllowProfileHistory", + "struct": "UserAllowProfileHistoryType" + }, + { + "fid": 86, + "name": "agreementContentsSuggest", + "type": 10 + }, + { + "fid": 87, + "name": "agreementContentsSuggestDataCollection", + "type": 10 + }, + { + "fid": 88, + "name": "privacyAgeResult", + "struct": "UserAgeType" + }, + { + "fid": 89, + "name": "privacyAgeResultReceived", + "type": 2 + }, + { + "fid": 72, + "name": "notificationThumbnail", + "type": 2 + }, + { + "fid": 90, + "name": "agreementOcrImageCollection", + "type": 10 + }, + { + "fid": 91, + "name": "privacyAllowFollow", + "type": 2 + }, + { + "fid": 92, + "name": "privacyShowFollowList", + "type": 2 + }, + { + "fid": 93, + "name": "notificationBadgeTalkOnly", + "type": 2 + }, + { + "fid": 94, + "name": "agreementIcna", + "type": 10 + }, + { + "fid": 95, + "name": "notificationReaction", + "type": 2 + }, + { + "fid": 96, + "name": "agreementMid", + "type": 10 + }, + { + "fid": 97, + "name": "homeNotificationNewFriend", + "type": 2 + }, + { + "fid": 98, + "name": "homeNotificationFavoriteFriendUpdate", + "type": 2 + }, + { + "fid": 99, + "name": "homeNotificationGroupMemberUpdate", + "type": 2 + }, + { + "fid": 100, + "name": "homeNotificationBirthday", + "type": 2 + }, + { + "fid": 101, + "name": "eapAllowedToConnect", + "map": 2 + }, + { + "fid": 102, + "name": "agreementLineOutUse", + "type": 10 + }, + { + "fid": 103, + "name": "agreementLineOutProvideInfo", + "type": 10 + }, + { + "fid": 104, + "name": "notificationShowProfileImage", + "type": 2 + }, + { + "fid": 105, + "name": "agreementPdpa", + "type": 10 + }, + { + "fid": 106, + "name": "agreementLocationVersion", + "type": 11 + }, + { + "fid": 107, + "name": "zhdPageAllowedToShow", + "type": 2 + } + ], + "SimpleChannelClient": [ + { + "fid": 1, + "name": "applicationType", + "type": 11 + }, + { + "fid": 2, + "name": "applicationVersion", + "type": 11 + }, + { + "fid": 3, + "name": "locale", + "type": 11 + } + ], + "SimpleChannelContact": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "displayName", + "type": 11 + }, + { + "fid": 3, + "name": "pictureStatus", + "type": 11 + }, + { + "fid": 4, + "name": "picturePath", + "type": 11 + }, + { + "fid": 5, + "name": "statusMessage", + "type": 11 + } + ], + "SnsFriend": [ + { + "fid": 1, + "name": "snsUserId", + "type": 11 + }, + { + "fid": 2, + "name": "snsUserName", + "type": 11 + }, + { + "fid": 3, + "name": "snsIdType", + "struct": "SnsIdType" + } + ], + "SnsFriendContactRegistration": [ + { + "fid": 1, + "name": "contact", + "struct": "Contact" + }, + { + "fid": 2, + "name": "snsIdType", + "struct": "SnsIdType" + }, + { + "fid": 3, + "name": "snsUserId", + "type": 11 + } + ], + "SnsFriendModification": [ + { + "fid": 1, + "name": "type", + "struct": "ModificationType" + }, + { + "fid": 2, + "name": "snsFriend", + "struct": "SnsFriend" + } + ], + "SnsFriends": [ + { + "fid": 1, + "name": "snsFriends", + "list": "SnsFriend" + }, + { + "fid": 2, + "name": "hasMore", + "type": 2 + } + ], + "SnsIdUserStatus": [ + { + "fid": 1, + "name": "userExisting", + "type": 2 + }, + { + "fid": 2, + "name": "phoneNumberRegistered", + "type": 2 + }, + { + "fid": 3, + "name": "sameDevice", + "type": 2 + } + ], + "SnsProfile": [ + { + "fid": 1, + "name": "snsUserId", + "type": 11 + }, + { + "fid": 2, + "name": "snsUserName", + "type": 11 + }, + { + "fid": 3, + "name": "email", + "type": 11 + }, + { + "fid": 4, + "name": "thumbnailUrl", + "type": 11 + } + ], + "SystemConfiguration": [ + { + "fid": 1, + "name": "endpoint", + "type": 11 + }, + { + "fid": 2, + "name": "endpointSsl", + "type": 11 + }, + { + "fid": 3, + "name": "updateUrl", + "type": 11 + }, + { + "fid": 11, + "name": "c2dmAccount", + "type": 11 + }, + { + "fid": 12, + "name": "nniServer", + "type": 11 + } + ], + "Ticket": [ + { + "fid": 1, + "name": "id", + "type": 11 + }, + { + "fid": 10, + "name": "expirationTime", + "type": 10 + }, + { + "fid": 21, + "name": "maxUseCount", + "type": 8 + } + ], + "TMessageBox": [ + { + "fid": 1, + "name": "id", + "type": 11 + }, + { + "fid": 2, + "name": "channelId", + "type": 11 + }, + { + "fid": 5, + "name": "lastSeq", + "type": 10 + }, + { + "fid": 6, + "name": "unreadCount", + "type": 10 + }, + { + "fid": 7, + "name": "lastModifiedTime", + "type": 10 + }, + { + "fid": 8, + "name": "status", + "type": 8 + }, + { + "fid": 9, + "name": "midType", + "struct": "MIDType" + }, + { + "fid": 10, + "name": "lastMessages", + "list": "Message" + } + ], + "TMessageBoxWrapUp": [ + { + "fid": 1, + "name": "messageBox", + "struct": "TMessageBox" + }, + { + "fid": 2, + "name": "name", + "type": 11 + }, + { + "fid": 3, + "name": "contacts", + "list": "Contact" + }, + { + "fid": 4, + "name": "pictureRevision", + "type": 11 + } + ], + "TMessageBoxWrapUpResponse": [ + { + "fid": 1, + "name": "messageBoxWrapUpList", + "list": "TMessageBoxWrapUp" + }, + { + "fid": 2, + "name": "totalSize", + "type": 8 + } + ], + "TMessageReadRangeEntry": [ + { + "fid": 1, + "name": "startMessageId", + "type": 10 + }, + { + "fid": 2, + "name": "endMessageId", + "type": 10 + }, + { + "fid": 3, + "name": "startTime", + "type": 10 + }, + { + "fid": 4, + "name": "endTime", + "type": 10 + } + ], + "TMessageReadRange": [ + { + "fid": 1, + "name": "chatId", + "type": 11 + }, + { + "fid": 2, + "name": "ranges" + } + ], + "ChatRoomAnnouncementContents": [ + { + "fid": 1, + "name": "displayFields", + "type": 8 + }, + { + "fid": 2, + "name": "text", + "type": 11 + }, + { + "fid": 3, + "name": "link", + "type": 11 + }, + { + "fid": 4, + "name": "thumbnail", + "type": 11 + }, + { + "fid": 5, + "name": "contentMetadata", + "struct": "ChatRoomAnnouncementContentMetadata" + } + ], + "ChatRoomAnnouncement": [ + { + "fid": 1, + "name": "announcementSeq", + "type": 10 + }, + { + "fid": 2, + "name": "type", + "type": 8 + }, + { + "fid": 3, + "name": "contents", + "struct": "ChatRoomAnnouncementContents" + }, + { + "fid": 4, + "name": "creatorMid", + "type": 11 + }, + { + "fid": 5, + "name": "createdTime", + "type": 10 + }, + { + "fid": 6, + "name": "deletePermission", + "type": 8 + } + ], + "ErrorExtraInfo": [ + { + "fid": 1, + "name": "preconditionFailedExtraInfo", + "struct": "PreconditionFailedExtraInfo" + }, + { + "fid": 2, + "name": "userRestrictionInfo", + "struct": "UserRestrictionExtraInfo" + } + ], + "SyncRelations": [ + { + "fid": 1, + "name": "syncAll", + "type": 2 + }, + { + "fid": 2, + "name": "syncParamContact", + "list": "SyncParamContact" + }, + { + "fid": 3, + "name": "syncParamMid", + "list": "SyncParamMid" + } + ], + "SyncScope": [ + { + "fid": 1, + "name": "syncProfile", + "type": 2 + }, + { + "fid": 2, + "name": "syncSettings", + "type": 2 + }, + { + "fid": 3, + "name": "syncSticker", + "type": 2 + }, + { + "fid": 4, + "name": "syncThemeShop", + "type": 2 + }, + { + "fid": 10, + "name": "contact", + "struct": "SyncRelations" + }, + { + "fid": 11, + "name": "group", + "struct": "SyncRelations" + }, + { + "fid": 12, + "name": "room", + "struct": "SyncRelations" + }, + { + "fid": 13, + "name": "chat", + "struct": "SyncRelations" + } + ], + "JoinSquareResponse": [ + { + "fid": 1, + "name": "square", + "struct": "Square" + }, + { + "fid": 2, + "name": "squareAuthority", + "struct": "SquareAuthority" + }, + { + "fid": 3, + "name": "squareStatus", + "struct": "SquareStatus" + }, + { + "fid": 4, + "name": "squareMember", + "struct": "SquareMember" + }, + { + "fid": 5, + "name": "squareFeatureSet", + "struct": "SquareFeatureSet" + }, + { + "fid": 6, + "name": "noteStatus", + "struct": "NoteStatus" + } + ], + "JoinSquareRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "member", + "struct": "SquareMember" + } + ], + "JoinSquareChatResponse": [ + { + "fid": 1, + "name": "squareChat", + "struct": "SquareChat" + }, + { + "fid": 2, + "name": "squareChatStatus", + "struct": "SquareChatStatus" + }, + { + "fid": 3, + "name": "squareChatMember", + "struct": "SquareChatMember" + } + ], + "JoinSquareChatRequest": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + } + ], + "SendMessageResponse": [ + { + "fid": 1, + "name": "createdSquareMessage", + "struct": "SquareMessage" + } + ], + "SendMessageRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 3, + "name": "squareMessage", + "struct": "SquareMessage" + } + ], + "MarkAsReadRequest": [ + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 4, + "name": "messageId", + "type": 11 + } + ], + "MarkAsReadResponse": [], + "SubscriptionState": [ + { + "fid": 1, + "name": "subscriptionId", + "type": 10 + }, + { + "fid": 2, + "name": "ttlMillis", + "type": 10 + } + ], + "ApproveSquareMembersResponse": [ + { + "fid": 1, + "name": "approvedMembers", + "list": "SquareMember" + }, + { + "fid": 2, + "name": "status", + "struct": "SquareStatus" + } + ], + "ApproveSquareMembersRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "requestedMemberMids", + "list": 11 + } + ], + "CreateSquareChatResponse": [ + { + "fid": 1, + "name": "squareChat", + "struct": "SquareChat" + }, + { + "fid": 2, + "name": "squareChatStatus", + "struct": "SquareChatStatus" + }, + { + "fid": 3, + "name": "squareChatMember", + "struct": "SquareChatMember" + } + ], + "CreateSquareChatRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "squareChat", + "struct": "SquareChat" + }, + { + "fid": 3, + "name": "squareMemberMids", + "list": 11 + } + ], + "CreateSquareResponse": [ + { + "fid": 1, + "name": "square", + "struct": "Square" + }, + { + "fid": 2, + "name": "creator", + "struct": "SquareMember" + }, + { + "fid": 3, + "name": "authority", + "struct": "SquareAuthority" + }, + { + "fid": 4, + "name": "status", + "struct": "SquareStatus" + }, + { + "fid": 5, + "name": "featureSet", + "struct": "SquareFeatureSet" + }, + { + "fid": 6, + "name": "noteStatus", + "struct": "NoteStatus" + }, + { + "fid": 7, + "name": "squareChat", + "struct": "SquareChat" + }, + { + "fid": 8, + "name": "squareChatStatus", + "struct": "SquareChatStatus" + }, + { + "fid": 9, + "name": "squareChatMember", + "struct": "SquareChatMember" + }, + { + "fid": 10, + "name": "squareChatFeatureSet", + "struct": "SquareChatFeatureSet" + } + ], + "CreateSquareRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "square", + "struct": "Square" + }, + { + "fid": 3, + "name": "creator", + "struct": "SquareMember" + } + ], + "DeleteSquareResponse": [], + "DeleteSquareRequest": [ + { + "fid": 2, + "name": "mid", + "type": 11 + }, + { + "fid": 3, + "name": "revision", + "type": 10 + } + ], + "DestroyMessageResponse": [], + "DestroyMessageRequest": [ + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 4, + "name": "messageId", + "type": 11 + } + ], + "GetSquareChatMembersRequest": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "limit", + "type": 8 + } + ], + "GetSquareChatMembersResponse": [ + { + "fid": 1, + "name": "squareChatMembers", + "struct": "SquareMember" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + } + ], + "GetSquareChatStatusRequest": [ + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + } + ], + "GetSquareChatStatusResponse": [ + { + "fid": 1, + "name": "chatStatus", + "struct": "SquareChatStatus" + } + ], + "GetSquareChatRequest": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + } + ], + "GetSquareChatResponse": [ + { + "fid": 1, + "name": "squareChat", + "struct": "SquareChat" + }, + { + "fid": 2, + "name": "squareChatMember", + "struct": "SquareChatMember" + }, + { + "fid": 3, + "name": "squareChatStatus", + "struct": "SquareChatStatus" + } + ], + "GetSquareAuthorityRequest": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + } + ], + "GetSquareAuthorityResponse": [ + { + "fid": 1, + "name": "authority", + "struct": "SquareAuthority" + } + ], + "GetJoinedSquaresRequest": [ + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "limit", + "type": 8 + } + ], + "GetJoinedSquaresResponse": [ + { + "fid": 1, + "name": "squares", + "list": "Square" + }, + { + "fid": 2, + "name": "members", + "map": "SquareMember" + }, + { + "fid": 3, + "name": "authorities", + "map": "SquareAuthority" + }, + { + "fid": 4, + "name": "statuses", + "map": "SquareStatus" + }, + { + "fid": 5, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 6, + "name": "noteStatuses", + "map": "NoteStatus" + } + ], + "GetJoinableSquareChatsRequest": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 10, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 11, + "name": "limit", + "type": 8 + } + ], + "GetJoinableSquareChatsResponse": [ + { + "fid": 1, + "name": "squareChats", + "list": "SquareChat" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "totalSquareChatCount", + "type": 8 + }, + { + "fid": 4, + "name": "squareChatStatuses", + "map": "SquareChatStatus" + } + ], + "GetInvitationTicketUrlRequest": [ + { + "fid": 2, + "name": "mid", + "type": 11 + } + ], + "GetInvitationTicketUrlResponse": [ + { + "fid": 1, + "name": "invitationURL", + "type": 11 + } + ], + "LeaveSquareRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + } + ], + "LeaveSquareResponse": [], + "LeaveSquareChatRequest": [ + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 3, + "name": "sayGoodbye", + "type": 2 + }, + { + "fid": 4, + "name": "squareChatMemberRevision", + "type": 10 + } + ], + "LeaveSquareChatResponse": [], + "SquareMemberSearchOption": [ + { + "fid": 1, + "name": "membershipState", + "struct": "SquareMembershipState" + }, + { + "fid": 2, + "name": "memberRoles", + "set": "SquareMemberRole" + }, + { + "fid": 3, + "name": "displayName", + "type": 11 + }, + { + "fid": 4, + "name": "ableToReceiveMessage", + "struct": "BooleanState" + }, + { + "fid": 5, + "name": "ableToReceiveFriendRequest", + "struct": "BooleanState" + }, + { + "fid": 6, + "name": "chatMidToExcludeMembers", + "type": 11 + }, + { + "fid": 7, + "name": "includingMe", + "type": 2 + } + ], + "SearchSquareMembersRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "searchOption", + "struct": "SquareMemberSearchOption" + }, + { + "fid": 4, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 5, + "name": "limit", + "type": 8 + } + ], + "SearchSquareMembersResponse": [ + { + "fid": 1, + "name": "members", + "list": "SquareMember" + }, + { + "fid": 2, + "name": "revision", + "type": 10 + }, + { + "fid": 3, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 4, + "name": "totalCount", + "type": 8 + } + ], + "FindSquareByInvitationTicketRequest": [ + { + "fid": 2, + "name": "invitationTicket", + "type": 11 + } + ], + "FindSquareByInvitationTicketResponse": [ + { + "fid": 1, + "name": "square", + "struct": "Square" + }, + { + "fid": 2, + "name": "myMembership", + "struct": "SquareMember" + }, + { + "fid": 3, + "name": "squareAuthority", + "struct": "SquareAuthority" + }, + { + "fid": 4, + "name": "squareStatus", + "struct": "SquareStatus" + }, + { + "fid": 5, + "name": "squareFeatureSet", + "struct": "SquareFeatureSet" + }, + { + "fid": 6, + "name": "noteStatus", + "struct": "NoteStatus" + }, + { + "fid": 7, + "name": "chat", + "struct": "SquareChat" + }, + { + "fid": 8, + "name": "chatStatus", + "struct": "SquareChatStatus" + } + ], + "SquareEventReceiveMessage": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMessage", + "struct": "SquareMessage" + }, + { + "fid": 3, + "name": "senderDisplayName", + "type": 11 + }, + { + "fid": 4, + "name": "messageReactionStatus", + "struct": "SquareMessageReactionStatus" + }, + { + "fid": 5, + "name": "senderRevision", + "type": 10 + }, + { + "fid": 6, + "name": "squareMid", + "type": 11 + } + ], + "SquareEventSendMessage": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMessage", + "struct": "SquareMessage" + }, + { + "fid": 3, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 4, + "name": "senderDisplayName", + "type": 11 + }, + { + "fid": 5, + "name": "messageReactionStatus", + "struct": "SquareMessageReactionStatus" + } + ], + "SquareEventNotifiedJoinSquareChat": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "joinedMember", + "struct": "SquareMember" + } + ], + "SquareEventNotifiedInviteIntoSquareChat": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "invitees", + "list": "SquareMember" + }, + { + "fid": 3, + "name": "invitor", + "struct": "SquareMember" + }, + { + "fid": 4, + "name": "invitorRelation", + "struct": "SquareMemberRelation" + } + ], + "SquareEventNotifiedLeaveSquareChat": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMemberMid", + "type": 11 + }, + { + "fid": 3, + "name": "sayGoodbye", + "type": 2 + }, + { + "fid": 4, + "name": "squareMember", + "struct": "SquareMember" + } + ], + "SquareEventNotifiedDestroyMessage": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 3, + "name": "messageId", + "type": 11 + } + ], + "SquareEventNotifiedMarkAsRead": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "sMemberMid", + "type": 11 + }, + { + "fid": 4, + "name": "messageId", + "type": 11 + } + ], + "SquareEventNotifiedUpdateSquareMemberProfile": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMember", + "struct": "SquareMember" + } + ], + "SquareEventNotifiedKickoutFromSquare": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "kickees", + "list": "SquareMember" + }, + { + "fid": 4, + "name": "kicker", + "struct": "SquareMember" + } + ], + "SquareEventNotifiedShutdownSquare": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "square", + "struct": "Square" + } + ], + "SquareEventNotifiedDeleteSquareChat": [ + { + "fid": 1, + "name": "squareChat", + "struct": "SquareChat" + } + ], + "SquareEventNotifiedUpdateSquareChatProfileName": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "editor", + "struct": "SquareMember" + }, + { + "fid": 3, + "name": "updatedChatName", + "type": 11 + } + ], + "SquareEventNotifiedUpdateSquareChatProfileImage": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "editor", + "struct": "SquareMember" + } + ], + "SquareEventNotifiedUpdateSquareChatStatus": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "statusWithoutMessage", + "struct": "SquareChatStatusWithoutMessage" + } + ], + "SquareEventNotifiedUpdateSquareStatus": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareStatus", + "struct": "SquareStatus" + } + ], + "SquareEventNotifiedCreateSquareMember": [ + { + "fid": 1, + "name": "square", + "struct": "Square" + }, + { + "fid": 2, + "name": "squareAuthority", + "struct": "SquareAuthority" + }, + { + "fid": 3, + "name": "squareStatus", + "struct": "SquareStatus" + }, + { + "fid": 4, + "name": "squareMember", + "struct": "SquareMember" + }, + { + "fid": 5, + "name": "squareFeatureSet", + "struct": "SquareFeatureSet" + }, + { + "fid": 6, + "name": "noteStatus", + "struct": "NoteStatus" + } + ], + "SquareEventNotifiedCreateSquareChatMember": [ + { + "fid": 1, + "name": "chat", + "struct": "SquareChat" + }, + { + "fid": 2, + "name": "chatStatus", + "struct": "SquareChatStatus" + }, + { + "fid": 3, + "name": "chatMember", + "struct": "SquareChatMember" + }, + { + "fid": 4, + "name": "joinedAt", + "type": 10 + }, + { + "fid": 5, + "name": "peerSquareMember", + "struct": "SquareMember" + }, + { + "fid": 6, + "name": "squareChatFeatureSet", + "struct": "SquareChatFeatureSet" + } + ], + "SquareEventNotifiedUpdateSquareMemberRelation": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "myMemberMid", + "type": 11 + }, + { + "fid": 3, + "name": "targetSquareMemberMid", + "type": 11 + }, + { + "fid": 4, + "name": "squareMemberRelation", + "struct": "SquareMemberRelation" + } + ], + "SquareEventNotifiedUpdateSquare": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "square", + "struct": "Square" + } + ], + "SquareEventNotifiedUpdateSquareMember": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMemberMid", + "type": 11 + }, + { + "fid": 3, + "name": "squareMember", + "struct": "SquareMember" + } + ], + "SquareEventNotifiedUpdateSquareChat": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 3, + "name": "squareChat", + "struct": "SquareChat" + } + ], + "SquareEventNotificationJoinRequest": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareName", + "type": 11 + }, + { + "fid": 3, + "name": "requestMemberName", + "type": 11 + }, + { + "fid": 4, + "name": "profileImageObsHash", + "type": 11 + } + ], + "SquareEventNotificationMemberUpdate": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareName", + "type": 11 + }, + { + "fid": 3, + "name": "profileImageObsHash", + "type": 11 + } + ], + "SquareEventNotificationSquareDelete": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareName", + "type": 11 + }, + { + "fid": 3, + "name": "profileImageObsHash", + "type": 11 + } + ], + "SquareEventNotificationSquareChatDelete": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareChatName", + "type": 11 + }, + { + "fid": 3, + "name": "profileImageObsHash", + "type": 11 + } + ], + "SquareEventNotificationMessage": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMessage", + "struct": "SquareMessage" + }, + { + "fid": 3, + "name": "senderDisplayName", + "type": 11 + }, + { + "fid": 4, + "name": "unreadCount", + "type": 8 + }, + { + "fid": 5, + "name": "requiredToFetchChatEvents", + "type": 2 + }, + { + "fid": 6, + "name": "mentionedMessageId", + "type": 11 + }, + { + "fid": 7, + "name": "notifiedMessageType", + "struct": "NotifiedMessageType" + }, + { + "fid": 8, + "name": "reqSeq", + "type": 8 + } + ], + "SquareEventNotifiedUpdateSquareChatMember": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareChatMember", + "struct": "SquareChatMember" + } + ], + "SquareEventNotifiedUpdateSquareAuthority": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareAuthority", + "struct": "SquareAuthority" + } + ], + "SquareEventNotifiedUpdateSquareFeatureSet": [ + { + "fid": 1, + "name": "squareFeatureSet", + "struct": "SquareFeatureSet" + } + ], + "SquareEventPayload": [ + { + "fid": 1, + "name": "receiveMessage", + "struct": "SquareEventReceiveMessage" + }, + { + "fid": 2, + "name": "sendMessage", + "struct": "SquareEventSendMessage" + }, + { + "fid": 3, + "name": "notifiedJoinSquareChat", + "struct": "SquareEventNotifiedJoinSquareChat" + }, + { + "fid": 4, + "name": "notifiedInviteIntoSquareChat", + "struct": "SquareEventNotifiedInviteIntoSquareChat" + }, + { + "fid": 5, + "name": "notifiedLeaveSquareChat", + "struct": "SquareEventNotifiedLeaveSquareChat" + }, + { + "fid": 6, + "name": "notifiedDestroyMessage", + "struct": "SquareEventNotifiedDestroyMessage" + }, + { + "fid": 7, + "name": "notifiedMarkAsRead", + "struct": "SquareEventNotifiedMarkAsRead" + }, + { + "fid": 8, + "name": "notifiedUpdateSquareMemberProfile", + "struct": "SquareEventNotifiedUpdateSquareMemberProfile" + }, + { + "fid": 9, + "name": "notifiedUpdateSquare", + "struct": "SquareEventNotifiedUpdateSquare" + }, + { + "fid": 10, + "name": "notifiedUpdateSquareMember", + "struct": "SquareEventNotifiedUpdateSquareMember" + }, + { + "fid": 11, + "name": "notifiedUpdateSquareChat", + "struct": "SquareEventNotifiedUpdateSquareChat" + }, + { + "fid": 12, + "name": "notifiedUpdateSquareChatMember", + "struct": "SquareEventNotifiedUpdateSquareChatMember" + }, + { + "fid": 13, + "name": "notifiedUpdateSquareAuthority", + "struct": "SquareEventNotifiedUpdateSquareAuthority" + }, + { + "fid": 14, + "name": "notifiedUpdateSquareStatus", + "struct": "SquareEventNotifiedUpdateSquareStatus" + }, + { + "fid": 15, + "name": "notifiedUpdateSquareChatStatus", + "struct": "SquareEventNotifiedUpdateSquareChatStatus" + }, + { + "fid": 16, + "name": "notifiedCreateSquareMember", + "struct": "SquareEventNotifiedCreateSquareMember" + }, + { + "fid": 17, + "name": "notifiedCreateSquareChatMember", + "struct": "SquareEventNotifiedCreateSquareChatMember" + }, + { + "fid": 18, + "name": "notifiedUpdateSquareMemberRelation", + "struct": "SquareEventNotifiedUpdateSquareMemberRelation" + }, + { + "fid": 19, + "name": "notifiedShutdownSquare", + "struct": "SquareEventNotifiedShutdownSquare" + }, + { + "fid": 20, + "name": "notifiedKickoutFromSquare", + "struct": "SquareEventNotifiedKickoutFromSquare" + }, + { + "fid": 21, + "name": "notifiedDeleteSquareChat", + "struct": "SquareEventNotifiedDeleteSquareChat" + }, + { + "fid": 22, + "name": "notificationJoinRequest", + "struct": "SquareEventNotificationJoinRequest" + }, + { + "fid": 23, + "name": "notificationJoined", + "struct": "SquareEventNotificationMemberUpdate" + }, + { + "fid": 24, + "name": "notificationPromoteCoadmin", + "struct": "SquareEventNotificationMemberUpdate" + }, + { + "fid": 25, + "name": "notificationPromoteAdmin", + "struct": "SquareEventNotificationMemberUpdate" + }, + { + "fid": 26, + "name": "notificationDemoteMember", + "struct": "SquareEventNotificationMemberUpdate" + }, + { + "fid": 27, + "name": "notificationKickedOut", + "struct": "SquareEventNotificationMemberUpdate" + }, + { + "fid": 28, + "name": "notificationSquareDelete", + "struct": "SquareEventNotificationSquareDelete" + }, + { + "fid": 29, + "name": "notificationSquareChatDelete", + "struct": "SquareEventNotificationSquareChatDelete" + }, + { + "fid": 30, + "name": "notificationMessage", + "struct": "SquareEventNotificationMessage" + }, + { + "fid": 31, + "name": "notifiedUpdateSquareChatProfileName", + "struct": "SquareEventNotifiedUpdateSquareChatProfileName" + }, + { + "fid": 32, + "name": "notifiedUpdateSquareChatProfileImage", + "struct": "SquareEventNotifiedUpdateSquareChatProfileImage" + }, + { + "fid": 33, + "name": "notifiedUpdateSquareFeatureSet", + "struct": "SquareEventNotifiedUpdateSquareFeatureSet" + }, + { + "fid": 34, + "name": "notifiedAddBot", + "struct": "SquareEventNotifiedAddBot" + }, + { + "fid": 35, + "name": "notifiedRemoveBot", + "struct": "SquareEventNotifiedRemoveBot" + }, + { + "fid": 36, + "name": "notifiedUpdateSquareNoteStatus", + "struct": "SquareEventNotifiedUpdateSquareNoteStatus" + }, + { + "fid": 37, + "name": "notifiedUpdateSquareChatAnnouncement", + "struct": "SquareEventNotifiedUpdateSquareChatAnnouncement" + }, + { + "fid": 38, + "name": "notifiedUpdateSquareChatMaxMemberCount", + "struct": "SquareEventNotifiedUpdateSquareChatMaxMemberCount" + }, + { + "fid": 39, + "name": "notificationPostAnnouncement", + "struct": "SquareEventNotificationPostAnnouncement" + }, + { + "fid": 40, + "name": "notificationPost", + "struct": "SquareEventNotificationPost" + }, + { + "fid": 41, + "name": "mutateMessage", + "struct": "SquareEventMutateMessage" + }, + { + "fid": 42, + "name": "notificationNewChatMember", + "struct": "SquareEventNotificationNewChatMember" + }, + { + "fid": 43, + "name": "notifiedUpdateReadonlyChat", + "struct": "SquareEventNotifiedUpdateReadonlyChat" + }, + { + "fid": 44, + "name": "notifiedUpdateMessageStatus", + "struct": "SquareEventNotifiedUpdateMessageStatus" + }, + { + "fid": 45, + "name": "notificationMessageReaction", + "struct": "SquareEventNotificationMessageReaction" + }, + { + "fid": 46, + "name": "chatPopup", + "struct": "SquareEventChatPopup" + }, + { + "fid": 47, + "name": "notifiedSystemMessage", + "struct": "SquareEventNotifiedSystemMessage" + }, + { + "fid": 48, + "name": "notifiedUpdateSquareChatFeatureSet", + "struct": "SquareEventNotifiedUpdateSquareChatFeatureSet" + } + ], + "SquareEvent": [ + { + "fid": 2, + "name": "createdTime", + "type": 10 + }, + { + "fid": 3, + "name": "type", + "struct": "SquareEventType" + }, + { + "fid": 4, + "name": "payload", + "struct": "SquareEventPayload" + }, + { + "fid": 5, + "name": "syncToken", + "type": 11 + }, + { + "fid": 6, + "name": "eventStatus", + "struct": "SquareEventStatus" + } + ], + "FetchMyEventsRequest": [ + { + "fid": 1, + "name": "subscriptionId", + "type": 10 + }, + { + "fid": 2, + "name": "syncToken", + "type": 11 + }, + { + "fid": 3, + "name": "limit", + "type": 8 + }, + { + "fid": 4, + "name": "continuationToken", + "type": 11 + } + ], + "FetchMyEventsResponse": [ + { + "fid": 1, + "name": "subscription", + "struct": "SubscriptionState" + }, + { + "fid": 2, + "name": "events", + "list": "SquareEvent" + }, + { + "fid": 3, + "name": "syncToken", + "type": 11 + }, + { + "fid": 4, + "name": "continuationToken", + "type": 11 + } + ], + "FetchSquareChatEventsRequest": [ + { + "fid": 1, + "name": "subscriptionId", + "type": 10 + }, + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 3, + "name": "syncToken", + "type": 11 + }, + { + "fid": 4, + "name": "limit", + "type": 8 + }, + { + "fid": 5, + "name": "direction", + "struct": "FetchDirection" + } + ], + "FetchSquareChatEventsResponse": [ + { + "fid": 1, + "name": "subscription", + "struct": "SubscriptionState" + }, + { + "fid": 2, + "name": "events", + "list": "SquareEvent" + }, + { + "fid": 3, + "name": "syncToken", + "type": 11 + }, + { + "fid": 4, + "name": "continuationToken", + "type": 11 + } + ], + "InviteToSquareRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "invitees", + "list": 11 + }, + { + "fid": 4, + "name": "squareChatMid", + "type": 11 + } + ], + "InviteToSquareResponse": [], + "InviteToSquareChatRequest": [ + { + "fid": 1, + "name": "inviteeMids", + "list": 11 + }, + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + } + ], + "InviteToSquareChatResponse": [ + { + "fid": 1, + "name": "inviteeMids", + "list": 11 + } + ], + "GetSquareMemberRequest": [ + { + "fid": 1, + "name": "squareMemberMid", + "type": 11 + } + ], + "GetSquareMemberResponse": [ + { + "fid": 1, + "name": "squareMember", + "struct": "SquareMember" + }, + { + "fid": 2, + "name": "relation", + "struct": "SquareMemberRelation" + }, + { + "fid": 3, + "name": "oneOnOneChatMid", + "type": 11 + } + ], + "GetSquareMembersRequest": [ + { + "fid": 2, + "name": "mids", + "set": 11 + } + ], + "GetSquareMembersResponse": [ + { + "fid": 1, + "name": "members", + "struct": "SquareMember" + } + ], + "GetSquareMemberRelationsRequest": [ + { + "fid": 2, + "name": "state", + "struct": "SquareMemberRelationState" + }, + { + "fid": 3, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 4, + "name": "limit", + "type": 8 + } + ], + "GetSquareMemberRelationsResponse": [ + { + "fid": 1, + "name": "squareMembers", + "list": "SquareMember" + }, + { + "fid": 2, + "name": "relations", + "map": "SquareMemberRelation" + }, + { + "fid": 3, + "name": "continuationToken", + "type": 11 + } + ], + "GetSquareMemberRelationRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "targetSquareMemberMid", + "type": 11 + } + ], + "GetSquareMemberRelationResponse": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "targetSquareMemberMid", + "type": 11 + }, + { + "fid": 3, + "name": "relation", + "struct": "SquareMemberRelation" + } + ], + "Category": [ + { + "fid": 1, + "name": "id", + "type": 10 + }, + { + "fid": 11, + "name": "name", + "type": 11 + }, + { + "fid": 12, + "name": "newFlag", + "type": 2 + }, + { + "fid": 13, + "name": "productCount", + "type": 8 + }, + { + "fid": 14, + "name": "thumbnailUrl", + "type": 11 + } + ], + "GetSquareCategoriesRequest": [], + "GetSquareCategoriesResponse": [ + { + "fid": 1, + "name": "categoryList", + "list": "Category" + } + ], + "UpdateSquareRequest": [ + { + "fid": 2, + "name": "updatedAttrs", + "set": "SquareAttribute" + }, + { + "fid": 3, + "name": "square", + "struct": "Square" + } + ], + "UpdateSquareResponse": [ + { + "fid": 1, + "name": "updatedAttrs", + "set": "SquareAttribute" + }, + { + "fid": 2, + "name": "square", + "struct": "Square" + } + ], + "SearchSquaresRequest": [ + { + "fid": 2, + "name": "query", + "type": 11 + }, + { + "fid": 3, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 4, + "name": "limit", + "type": 8 + } + ], + "SearchSquaresResponse": [ + { + "fid": 1, + "name": "squares", + "list": "Square" + }, + { + "fid": 2, + "name": "squareStatuses", + "map": "SquareStatus" + }, + { + "fid": 3, + "name": "myMemberships", + "map": "SquareMember" + }, + { + "fid": 4, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 5, + "name": "noteStatuses", + "map": "NoteStatus" + } + ], + "GetSquareFeatureSetRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + } + ], + "GetSquareFeatureSetResponse": [ + { + "fid": 1, + "name": "squareFeatureSet", + "struct": "SquareFeatureSet" + } + ], + "UpdateSquareFeatureSetRequest": [ + { + "fid": 2, + "name": "updateAttributes", + "set": "SquareFeatureSetAttribute" + }, + { + "fid": 3, + "name": "squareFeatureSet", + "struct": "SquareFeatureSet" + } + ], + "UpdateSquareFeatureSetResponse": [ + { + "fid": 1, + "name": "updateAttributes", + "set": "SquareFeatureSetAttribute" + }, + { + "fid": 2, + "name": "squareFeatureSet", + "struct": "SquareFeatureSet" + } + ], + "UpdateSquareMemberRequest": [ + { + "fid": 2, + "name": "updatedAttrs", + "set": "SquareMemberAttribute" + }, + { + "fid": 3, + "name": "updatedPreferenceAttrs", + "set": "SquarePreferenceAttribute" + }, + { + "fid": 4, + "name": "squareMember", + "struct": "SquareMember" + } + ], + "UpdateSquareMemberResponse": [ + { + "fid": 1, + "name": "updatedAttrs", + "set": "SquareMemberAttribute" + }, + { + "fid": 2, + "name": "squareMember", + "struct": "SquareMember" + }, + { + "fid": 3, + "name": "updatedPreferenceAttrs", + "set": "SquarePreferenceAttribute" + } + ], + "UpdateSquareMembersRequest": [ + { + "fid": 2, + "name": "updatedAttrs", + "set": "SquareMemberAttribute" + }, + { + "fid": 3, + "name": "members", + "list": "SquareMember" + } + ], + "UpdateSquareMembersResponse": [ + { + "fid": 1, + "name": "updatedAttrs", + "set": "SquareMemberAttribute" + }, + { + "fid": 2, + "name": "editor", + "struct": "SquareMember" + }, + { + "fid": 3, + "name": "members", + "map": "SquareMember" + } + ], + "RejectSquareMembersRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "requestedMemberMids", + "list": 11 + } + ], + "RejectSquareMembersResponse": [ + { + "fid": 1, + "name": "rejectedMembers", + "list": "SquareMember" + }, + { + "fid": 2, + "name": "status", + "struct": "SquareStatus" + } + ], + "RemoveSubscriptionsRequest": [ + { + "fid": 2, + "name": "unsubscriptions", + "list": 10 + } + ], + "RemoveSubscriptionsResponse": [], + "RefreshSubscriptionsRequest": [ + { + "fid": 2, + "name": "subscriptions", + "list": 10 + } + ], + "RefreshSubscriptionsResponse": [ + { + "fid": 1, + "name": "ttlMillis", + "type": 10 + }, + { + "fid": 2, + "name": "subscriptionStates", + "map": "SubscriptionState" + } + ], + "UpdateSquareChatRequest": [ + { + "fid": 2, + "name": "updatedAttrs", + "set": "SquareChatAttribute" + }, + { + "fid": 3, + "name": "squareChat", + "struct": "SquareChat" + } + ], + "UpdateSquareChatResponse": [ + { + "fid": 1, + "name": "updatedAttrs", + "set": "SquareChatAttribute" + }, + { + "fid": 2, + "name": "squareChat", + "struct": "SquareChat" + } + ], + "DeleteSquareChatRequest": [ + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 3, + "name": "revision", + "type": 10 + } + ], + "DeleteSquareChatResponse": [], + "UpdateSquareChatMemberRequest": [ + { + "fid": 2, + "name": "updatedAttrs", + "set": "SquareChatMemberAttribute" + }, + { + "fid": 3, + "name": "chatMember", + "struct": "SquareChatMember" + } + ], + "UpdateSquareChatMemberResponse": [ + { + "fid": 1, + "name": "updatedChatMember", + "struct": "SquareChatMember" + } + ], + "UpdateSquareAuthorityRequest": [ + { + "fid": 2, + "name": "updateAttributes", + "set": "SquareAuthorityAttribute" + }, + { + "fid": 3, + "name": "authority", + "struct": "SquareAuthority" + } + ], + "UpdateSquareAuthorityResponse": [ + { + "fid": 1, + "name": "updatdAttributes", + "set": "SquareAuthorityAttribute" + }, + { + "fid": 2, + "name": "authority", + "struct": "SquareAuthority" + } + ], + "UpdateSquareMemberRelationRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "targetSquareMemberMid", + "type": 11 + }, + { + "fid": 4, + "name": "updatedAttrs", + "set": "SquareMemberRelationAttribute" + }, + { + "fid": 5, + "name": "relation", + "struct": "SquareMemberRelation" + } + ], + "UpdateSquareMemberRelationResponse": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "targetSquareMemberMid", + "type": 11 + }, + { + "fid": 3, + "name": "updatedAttrs", + "set": "SquareMemberRelationAttribute" + }, + { + "fid": 4, + "name": "relation", + "struct": "SquareMemberRelation" + } + ], + "ReportSquareRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "reportType", + "struct": "ReportType" + }, + { + "fid": 4, + "name": "otherReason", + "type": 11 + } + ], + "ReportSquareResponse": [], + "ReportSquareChatRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 5, + "name": "reportType", + "struct": "ReportType" + }, + { + "fid": 6, + "name": "otherReason", + "type": 11 + } + ], + "ReportSquareChatResponse": [], + "ReportSquareMessageRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 4, + "name": "squareMessageId", + "type": 11 + }, + { + "fid": 5, + "name": "reportType", + "struct": "ReportType" + }, + { + "fid": 6, + "name": "otherReason", + "type": 11 + } + ], + "ReportSquareMessageResponse": [], + "ReportSquareMemberRequest": [ + { + "fid": 2, + "name": "squareMemberMid", + "type": 11 + }, + { + "fid": 3, + "name": "reportType", + "struct": "ReportType" + }, + { + "fid": 4, + "name": "otherReason", + "type": 11 + }, + { + "fid": 5, + "name": "squareChatMid", + "type": 11 + } + ], + "ReportSquareMemberResponse": [], + "GetSquareRequest": [ + { + "fid": 2, + "name": "mid", + "type": 11 + } + ], + "GetSquareResponse": [ + { + "fid": 1, + "name": "square", + "struct": "Square" + }, + { + "fid": 2, + "name": "myMembership", + "struct": "SquareMember" + }, + { + "fid": 3, + "name": "squareAuthority", + "struct": "SquareAuthority" + }, + { + "fid": 4, + "name": "squareStatus", + "struct": "SquareStatus" + }, + { + "fid": 5, + "name": "squareFeatureSet", + "struct": "SquareFeatureSet" + }, + { + "fid": 6, + "name": "noteStatus", + "struct": "NoteStatus" + } + ], + "GetSquareStatusRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + } + ], + "GetSquareStatusResponse": [ + { + "fid": 1, + "name": "squareStatus", + "struct": "SquareStatus" + } + ], + "GetNoteStatusRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + } + ], + "GetNoteStatusResponse": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "status", + "struct": "NoteStatus" + } + ], + "CreateSquareChatAnnouncementRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 3, + "name": "squareChatAnnouncement", + "struct": "SquareChatAnnouncement" + } + ], + "CreateSquareChatAnnouncementResponse": [ + { + "fid": 1, + "name": "announcement", + "struct": "SquareChatAnnouncement" + } + ], + "DeleteSquareChatAnnouncementRequest": [ + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 3, + "name": "announcementSeq", + "type": 10 + } + ], + "DeleteSquareChatAnnouncementResponse": [], + "GetSquareChatAnnouncementsRequest": [ + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + } + ], + "GetSquareChatAnnouncementsResponse": [ + { + "fid": 1, + "name": "announcements", + "list": "SquareChatAnnouncement" + } + ], + "GetJoinedSquareChatsRequest": [ + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "limit", + "type": 8 + } + ], + "GetJoinedSquareChatsResponse": [ + { + "fid": 1, + "name": "chats", + "list": "SquareChat" + }, + { + "fid": 2, + "name": "chatMembers", + "map": "SquareChatMember" + }, + { + "fid": 3, + "name": "statuses", + "map": "SquareChatStatus" + }, + { + "fid": 4, + "name": "continuationToken", + "type": 11 + } + ], + "UpdateBuddyProfileResult": [ + { + "fid": 1, + "name": "requestId", + "type": 11 + }, + { + "fid": 2, + "name": "state", + "struct": "BuddyResultState" + }, + { + "fid": 3, + "name": "eventNo", + "type": 8 + }, + { + "fid": 11, + "name": "receiverCount", + "type": 10 + }, + { + "fid": 12, + "name": "successCount", + "type": 10 + }, + { + "fid": 13, + "name": "failCount", + "type": 10 + }, + { + "fid": 14, + "name": "cancelCount", + "type": 10 + }, + { + "fid": 15, + "name": "unregisterCount", + "type": 10 + }, + { + "fid": 21, + "name": "timestamp", + "type": 10 + }, + { + "fid": 22, + "name": "message", + "type": 11 + } + ], + "UserAuthStatus": [ + { + "fid": 1, + "name": "phoneNumberRegistered", + "type": 2 + }, + { + "fid": 2, + "name": "registeredSnsIdTypes", + "list": "SnsIdType" + } + ], + "WapInvitation": [ + { + "fid": 1, + "name": "type", + "struct": "WapInvitationType" + }, + { + "fid": 10, + "name": "inviteeEmail", + "type": 11 + }, + { + "fid": 11, + "name": "inviterMid", + "type": 11 + }, + { + "fid": 12, + "name": "roomMid", + "type": 11 + } + ], + "GroupCall": [ + { + "fid": 1, + "name": "online", + "type": 2 + }, + { + "fid": 2, + "name": "chatMid", + "type": 11 + }, + { + "fid": 3, + "name": "hostMids", + "type": 11 + }, + { + "fid": 4, + "name": "memberMids", + "list": 11 + }, + { + "fid": 5, + "name": "started", + "type": 10 + }, + { + "fid": 6, + "name": "mediaType", + "struct": "GroupCallMediaType" + }, + { + "fid": 7, + "name": "protocol", + "struct": "GroupCallProtocol" + } + ], + "GroupCallRoute": [ + { + "fid": 1, + "name": "token", + "type": 11 + }, + { + "fid": 2, + "name": "cscf", + "struct": "CallHost" + }, + { + "fid": 3, + "name": "mix", + "struct": "CallHost" + } + ], + "LiffErrorCode": { + "1": "INVALID_REQUEST", + "2": "UNAUTHORIZED", + "3": "CONSENT_REQUIRED", + "4": "VERSION_UPDATE_REQUIRED", + "5": "COMPREHENSIVE_AGREEMENT_REQUIRED", + "6": "SPLASH_SCREEN_REQUIRED", + "100": "SERVER_ERROR" + }, + "HomeExceptionCode": { + "0": "INTERNAL_ERROR", + "1": "ILLEGAL_ARGUMENT", + "2": "VERIFICATION_FAILED", + "3": "NOT_FOUND", + "4": "RETRY_LATER", + "5": "HUMAN_VERIFICATION_REQUIRED", + "100": "INVALID_CONTEXT", + "101": "APP_UPGRADE_REQUIRED", + "102": "NO_CONTENT" + }, + "ChatappErrorCode": { + "1": "INVALID_REQUEST", + "2": "UNAUTHORIZED", + "100": "SERVER_ERROR" + }, + "MembershipErrorCode": { + "0": "ILLEGAL_ARGUMENT", + "1": "AUTHENTICATION_FAILED", + "5": "NOT_FOUND", + "20": "INTERNAL_ERROR", + "33": "MAINTENANCE_ERROR" + }, + "BotErrorCode": { + "0": "UNKNOWN", + "1": "BOT_NOT_FOUND", + "2": "BOT_NOT_AVAILABLE", + "3": "NOT_A_MEMBER", + "400": "ILLEGAL_ARGUMENT", + "401": "AUTHENTICATION_FAILED", + "500": "INTERNAL_ERROR" + }, + "BotExternalErrorCode": { + "0": "ILLEGAL_ARGUMENT", + "1": "INTERNAL_ERROR" + }, + "AccessTokenRefreshErrorCode": { + "1000": "INVALID_REQUEST", + "1001": "RETRY_REQUIRED" + }, + "AccountEapConnectErrorCode": { + "0": "INTERNAL_ERROR", + "1": "ILLEGAL_ARGUMENT", + "2": "VERIFICATION_FAILED", + "4": "RETRY_LATER", + "5": "HUMAN_VERIFICATION_REQUIRED", + "101": "APP_UPGRADE_REQUIRED" + }, + "PwlessCredentialErrorCode": { + "0": "INTERNAL_ERROR", + "1": "ILLEGAL_ARGUMENT", + "2": "VERIFICATION_FAILED", + "3": "EXTERNAL_SERVICE_UNAVAILABLE", + "4": "RETRY_LATER", + "100": "INVALID_CONTEXT", + "101": "NOT_SUPPORTED", + "102": "FORBIDDEN", + "201": "FIDO_RETRY_WITH_ANOTHER_AUTHENTICATOR" + }, + "SecondAuthFactorPinCodeErrorCode": { + "0": "INTERNAL_ERROR", + "1": "ILLEGAL_ARGUMENT", + "2": "VERIFICATION_FAILED", + "3": "RETRY_LATER", + "100": "INVALID_CONTEXT", + "101": "APP_UPGRADE_REQUIRED" + }, + "AuthErrorCode": { + "0": "INTERNAL_ERROR", + "1": "ILLEGAL_ARGUMENT", + "2": "VERIFICATION_FAILED", + "3": "NOT_FOUND", + "4": "RETRY_LATER", + "5": "HUMAN_VERIFICATION_REQUIRED", + "100": "INVALID_CONTEXT", + "101": "APP_UPGRADE_REQUIRED" + }, + "SecondaryPwlessLoginErrorCode": { + "0": "INTERNAL_ERROR", + "1": "VERIFICATION_FAILED", + "2": "LOGIN_NOT_ALLOWED", + "3": "EXTERNAL_SERVICE_UNAVAILABLE", + "4": "RETRY_LATER", + "100": "NOT_SUPPORTED", + "101": "ILLEGAL_ARGUMENT", + "102": "INVALID_CONTEXT", + "103": "FORBIDDEN", + "200": "FIDO_UNKNOWN_CREDENTIAL_ID", + "201": "FIDO_RETRY_WITH_ANOTHER_AUTHENTICATOR", + "202": "FIDO_UNACCEPTABLE_CONTENT" + }, + "SecondaryQrCodeErrorCode": { + "0": "INTERNAL_ERROR", + "1": "ILLEGAL_ARGUMENT", + "2": "VERIFICATION_FAILED", + "3": "NOT_ALLOWED_QR_CODE_LOGIN", + "4": "VERIFICATION_NOTICE_FAILED", + "5": "RETRY_LATER", + "100": "INVALID_CONTEXT", + "101": "APP_UPGRADE_REQUIRED" + }, + "PaymentErrorCode": { + "0": "SUCCESS", + "1000": "GENERAL_USER_ERROR", + "1101": "ACCOUNT_NOT_EXISTS", + "1102": "ACCOUNT_INVALID_STATUS", + "1103": "ACCOUNT_ALREADY_EXISTS", + "1104": "MERCHANT_NOT_EXISTS", + "1105": "MERCHANT_INVALID_STATUS", + "1107": "AGREEMENT_REQUIRED", + "1108": "BLACKLISTED", + "1109": "WRONG_PASSWORD", + "1110": "INVALID_CREDIT_CARD", + "1111": "LIMIT_EXCEEDED", + "1115": "CANNOT_PROCEED", + "1120": "TOO_WEAK_PASSWORD", + "1125": "CANNOT_CREATE_ACCOUNT", + "1130": "TEMPORARY_PASSWORD_ERROR", + "1140": "MISSING_PARAMETERS", + "1141": "NO_VALID_MYCODE_ACCOUNT", + "1142": "INSUFFICIENT_BALANCE", + "1150": "TRANSACTION_NOT_FOUND", + "1152": "TRANSACTION_FINISHED", + "1153": "PAYMENT_AMOUNT_WRONG", + "1157": "BALANCE_ACCOUNT_NOT_EXISTS", + "1158": "DUPLICATED_CITIZEN_ID", + "1159": "PAYMENT_REQUEST_NOT_FOUND", + "1169": "AUTH_FAILED", + "1171": "PASSWORD_SETTING_REQUIRED", + "1172": "TRANSACTION_ALREADY_PROCESSED", + "1178": "CURRENCY_NOT_SUPPORTED", + "1180": "PAYMENT_NOT_AVAILABLE", + "1181": "TRANSFER_REQUEST_NOT_FOUND", + "1183": "INVALID_PAYMENT_AMOUNT", + "1184": "INSUFFICIENT_PAYMENT_AMOUNT", + "1185": "EXTERNAL_SYSTEM_MAINTENANCE", + "1186": "EXTERNAL_SYSTEM_INOPERATIONAL", + "1192": "SESSION_EXPIRED", + "1195": "UPGRADE_REQUIRED", + "1196": "REQUEST_TOKEN_EXPIRED", + "1198": "OPERATION_FINISHED", + "1199": "EXTERNAL_SYSTEM_ERROR", + "1299": "PARTIAL_AMOUNT_APPROVED", + "1600": "PINCODE_AUTH_REQUIRED", + "1601": "ADDITIONAL_AUTH_REQUIRED", + "1603": "NOT_BOUND", + "1610": "OTP_USER_REGISTRATION_ERROR", + "1611": "OTP_CARD_REGISTRATION_ERROR", + "1612": "NO_AUTH_METHOD", + "1696": "GENERAL_USER_ERROR_RESTART", + "1697": "GENERAL_USER_ERROR_REFRESH", + "1698": "GENERAL_USER_ERROR_CLOSE", + "9000": "INTERNAL_SERVER_ERROR", + "9999": "INTERNAL_SYSTEM_MAINTENANCE", + "10000": "UNKNOWN_ERROR" + }, + "SettingsErrorCode": { + "0": "UNKNOWN", + "1": "NONE", + "16641": "ILLEGAL_ARGUMENT", + "16642": "NOT_FOUND", + "16643": "NOT_AVAILABLE", + "16644": "TOO_LARGE_VALUE", + "16645": "CLOCK_DRIFT_DETECTED", + "16646": "UNSUPPORTED_APPLICATION_TYPE", + "16647": "DUPLICATED_ENTRY", + "16897": "AUTHENTICATION_FAILED", + "20737": "INTERNAL_SERVER_ERROR", + "20738": "SERVICE_IN_MAINTENANCE_MODE", + "20739": "SERVICE_UNAVAILABLE" + }, + "ThingsErrorCode": { + "0": "INTERNAL_SERVER_ERROR", + "1": "UNAUTHORIZED", + "2": "INVALID_REQUEST", + "3": "INVALID_STATE", + "4096": "DEVICE_LIMIT_EXCEEDED", + "4097": "UNSUPPORTED_REGION" + }, + "SuggestTrialErrorCode": { + "0": "UNKNOWN", + "1": "NONE", + "16641": "ILLEGAL_ARGUMENT", + "16642": "NOT_FOUND", + "16643": "NOT_AVAILABLE", + "16897": "AUTHENTICATION_FAILED", + "20737": "INTERNAL_SERVER_ERROR", + "20739": "SERVICE_UNAVAILABLE" + }, + "LFLPremiumErrorCode": { + "16641": "ILLEGAL_ARGUMENT", + "16642": "MAJOR_VERSION_NOT_SUPPORTED", + "16897": "AUTHENTICATION_FAILED", + "20737": "INTERNAL_SERVER_ERROR" + }, + "WalletErrorCode": { + "400": "INVALID_PARAMETER", + "401": "AUTHENTICATION_FAILED", + "500": "INTERNAL_SERVER_ERROR", + "503": "SERVICE_IN_MAINTENANCE_MODE" + }, + "ShopErrorCode": { + "0": "UNKNOWN", + "1": "NONE", + "16641": "ILLEGAL_ARGUMENT", + "16642": "NOT_FOUND", + "16643": "NOT_AVAILABLE", + "16644": "NOT_PAID_PRODUCT", + "16645": "NOT_FREE_PRODUCT", + "16646": "ALREADY_OWNED", + "16647": "ERROR_WITH_CUSTOM_MESSAGE", + "16648": "NOT_AVAILABLE_TO_RECIPIENT", + "16649": "NOT_AVAILABLE_FOR_CHANNEL_ID", + "16650": "NOT_SALE_FOR_COUNTRY", + "16651": "NOT_SALES_PERIOD", + "16652": "NOT_SALE_FOR_DEVICE", + "16653": "NOT_SALE_FOR_VERSION", + "16654": "ALREADY_EXPIRED", + "16655": "LIMIT_EXCEEDED", + "16656": "MISSING_CAPABILITY", + "16897": "AUTHENTICATION_FAILED", + "17153": "BALANCE_SHORTAGE", + "20737": "INTERNAL_SERVER_ERROR", + "20738": "SERVICE_IN_MAINTENANCE_MODE", + "20739": "SERVICE_UNAVAILABLE" + }, + "E2EEKeyBackupErrorCode": { + "0": "ILLEGAL_ARGUMENT", + "1": "AUTHENTICATION_FAILED", + "2": "INTERNAL_ERROR", + "3": "RESTORE_KEY_FIRST", + "4": "NO_BACKUP", + "5": "LOCKOUT", + "6": "INVALID_PIN" + }, + "TalkSyncReason": { + "0": "UNSPECIFIED", + "1": "UNKNOWN", + "2": "INITIALIZATION", + "3": "OPERATION", + "4": "FULL_SYNC", + "5": "AUTO_REPAIR", + "6": "MANUAL_REPAIR", + "7": "INTERNAL", + "8": "USER_INITIATED" + }, + "AppExtensionType": { + "1": "SIRI", + "2": "GOOGLE_ASSISTANT", + "3": "OS_SHARE" + }, + "PredefinedReactionType": { + "2": "NICE", + "3": "LOVE", + "4": "FUN", + "5": "AMAZING", + "6": "SAD", + "7": "OMG" + }, + "GeolocationAccuracyMode": { + "0": "UNKNOWN", + "1": "IOS_REDUCED_ACCURACY", + "2": "IOS_FULL_ACCURACY", + "3": "AOS_PRECISE_LOCATION", + "4": "AOS_APPROXIMATE_LOCATION" + }, + "ContactCalendarEventType": { + "0": "BIRTHDAY" + }, + "ContactCalendarEventState": { + "0": "SHOW", + "1": "HIDE" + }, + "UserAllowProfileHistoryType": { + "0": "OWNER", + "1": "FRIEND" + }, + "UserStatusMessageHistoryType": { + "1": "NONE", + "2": "ALL" + }, + "UserSharePersonalInfoToFriendsType": { + "0": "NEVER_SHOW", + "1": "ONE_WAY", + "2": "MUTUAL" + }, + "CharType": { + "0": "GROUP", + "1": "ROOM", + "2": "PEER" + }, + "ChatAttribute": { + "1": "NAME", + "2": "PICTURE_STATUS", + "4": "PREVENTED_JOIN_BY_TICKET", + "8": "NOTIFICATION_SETTING", + "16": "INVITATION_TICKET", + "32": "FAVORITE_TIMESTAMP", + "64": "CHAT_TYPE" + }, + "BuddyBotActiveStatus": { + "0": "UNSPECIFIED", + "1": "INACTIVE", + "2": "ACTIVE", + "3": "DELETED" + }, + "GroupCallProtocol": { + "1": "STANDARD", + "2": "CONSTELLA" + }, + "GlobalEventType": { + "0": "DUMMY", + "1": "NOTICE", + "2": "MORETAB", + "3": "STICKERSHOP", + "4": "CHANNEL", + "5": "DENY_KEYWORD", + "6": "CONNECTIONINFO", + "7": "BUDDY", + "8": "TIMELINEINFO", + "9": "THEMESHOP", + "10": "CALLRATE", + "11": "CONFIGURATION", + "12": "STICONSHOP", + "13": "SUGGESTDICTIONARY", + "14": "SUGGESTSETTINGS", + "15": "USERSETTINGS", + "16": "ANALYTICSINFO", + "17": "SEARCHPOPULARKEYWORD", + "18": "SEARCHNOTICE", + "19": "TIMELINE", + "20": "SEARCHPOPULARCATEGORY", + "21": "EXTENDEDPROFILE", + "22": "SEASONALMARKETING", + "23": "NEWSTAB", + "24": "SUGGESTDICTIONARYV2", + "25": "CHATAPPSYNC", + "26": "AGREEMENTS", + "27": "INSTANTNEWS", + "28": "EMOJI_MAPPING", + "29": "SEARCHBARKEYWORDS", + "30": "SHOPPING", + "31": "CHAT_EFFECT_BACKGROUND", + "32": "CHAT_EFFECT_KEYWORD", + "33": "SEARCHINDEX", + "34": "HUBTAB", + "35": "PAY_RULE_UPDATED", + "36": "SMARTCH", + "37": "HOME_SERVICE_LIST", + "38": "TIMELINESTORY", + "39": "WALLET_TAB", + "40": "POD_TAB", + "41": "HOME_SAFETY_CHECK" + }, + "SyncCategories": { + "0": "ALL", + "1": "PROFILE", + "2": "SETTINGS", + "3": "CONFIGURATIONS", + "4": "CONTACT", + "5": "GROUP", + "6": "E2EE", + "7": "MESSAGE" + }, + "MediaMessageFlow": { + "1": "V1", + "2": "V2" + }, + "MessageReactionType": { + "0": "ALL", + "1": "UNDO", + "2": "NICE", + "3": "LOVE", + "4": "FUN", + "5": "AMAZING", + "6": "SAD", + "7": "OMG" + }, + "PictureSource": { + "1": "NFT", + "2": "AVATAR", + "3": "SNOW", + "4": "ARCZ" + }, + "RejectionReason": { + "0": "UNKNOWN", + "1": "INVALID_TARGET_USER", + "2": "AGE_VALIDATION", + "3": "TOO_MANY_FRIENDS", + "4": "TOO_MANY_REQUESTS", + "5": "MALFORMED_REQUEST" + }, + "UpdateChatRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "chat", + "struct": "Chat" + }, + { + "fid": 3, + "name": "updatedAttribute", + "type": 8 + } + ], + "UpdateChatResponse": [], + "AcceptChatInvitationByTicketRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "chatMid", + "type": 11 + }, + { + "fid": 3, + "name": "ticketId", + "type": 11 + } + ], + "AcceptChatInvitationByTicketResponse": [], + "AcceptChatInvitationRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "chatMid", + "type": 11 + } + ], + "ReissueChatTicketRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "groupMid", + "type": 11 + } + ], + "AcceptChatInvitationResponse": [], + "ReissueChatTicketResponse": [ + { + "fid": 1, + "name": "ticketId", + "type": 11 + } + ], + "RejectChatInvitationRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "chatMid", + "type": 11 + } + ], + "GetAllChatMidsRequest": [ + { + "fid": 1, + "name": "withMemberChats", + "type": 2 + }, + { + "fid": 2, + "name": "withInvitedChats", + "type": 2 + } + ], + "RejectChatInvitationResponse": [], + "GetAllChatMidsResponse": [ + { + "fid": 1, + "name": "memberChatMids", + "set": 11 + }, + { + "fid": 2, + "name": "invitedChatMids", + "set": 11 + } + ], + "CreateChatRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "type", + "type": 8 + }, + { + "fid": 3, + "name": "name", + "type": 11 + }, + { + "fid": 4, + "name": "targetUserMids", + "set": 11 + }, + { + "fid": 5, + "name": "picturePath", + "type": 11 + } + ], + "CreateChatResponse": [ + { + "fid": 1, + "name": "chat", + "struct": "Chat" + } + ], + "BeaconCondition": [ + { + "fid": 1, + "name": "inFriends", + "type": 11 + }, + { + "fid": 2, + "name": "notInFriends", + "type": 11 + }, + { + "fid": 3, + "name": "termsAgreed", + "type": 2 + } + ], + "BeaconBackgroundNotification": [ + { + "fid": 1, + "name": "actionInterval", + "type": 10 + }, + { + "fid": 2, + "name": "actionAndConditions", + "list": "BeaconCondition" + }, + { + "fid": 3, + "name": "actionDelay", + "type": 10 + }, + { + "fid": 4, + "name": "actionConditions", + "list": "BeaconCondition" + } + ], + "LiffErrorPayload": [ + { + "fid": 3, + "name": "consentRequired", + "struct": "LiffErrorConsentRequired" + } + ], + "LiffErrorConsentRequired": [ + { + "fid": 1, + "name": "channelId", + "type": 11 + }, + { + "fid": 2, + "name": "consentUrl", + "type": 11 + } + ], + "UserRestrictionExtraInfo": [ + { + "fid": 1, + "name": "linkUrl", + "type": 11 + } + ], + "WebAuthDetails": [ + { + "fid": 1, + "name": "baseUrl", + "type": 11 + }, + { + "fid": 2, + "name": "token", + "type": 11 + } + ], + "AvatarProfile": [ + { + "fid": 1, + "name": "version", + "type": 11 + }, + { + "fid": 2, + "name": "updatedMillis", + "type": 10 + }, + { + "fid": 3, + "name": "thumbnail", + "type": 11 + }, + { + "fid": 4, + "name": "usablePublicly", + "type": 2 + } + ], + "Reaction": [ + { + "fid": 1, + "name": "fromUserMid", + "type": 11 + }, + { + "fid": 2, + "name": "atMillis", + "type": 10 + }, + { + "fid": 3, + "name": "reactionType", + "struct": "ReactionType" + } + ], + "ReactionType": [ + { + "fid": 1, + "name": "predefinedReactionType", + "struct": "PredefinedReactionType" + } + ], + "ReactRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "messageId", + "type": 10 + }, + { + "fid": 3, + "name": "reactionType", + "struct": "ReactionType" + } + ], + "GeolocationAccuracy": [ + { + "fid": 1, + "name": "radiusMeters", + "type": 4 + }, + { + "fid": 2, + "name": "radiusConfidence", + "type": 4 + }, + { + "fid": 3, + "name": "altitudeAccuracy", + "type": 4 + }, + { + "fid": 4, + "name": "velocityAccuracy", + "type": 4 + }, + { + "fid": 5, + "name": "bearingAccuracy", + "type": 4 + }, + { + "fid": 6, + "name": "accuracyMode", + "struct": "GeolocationAccuracyMode" + } + ], + "GetContactsV2Request": [ + { + "fid": 1, + "name": "targetUserMids", + "list": 11 + }, + { + "fid": 2, + "name": "neededContactCalendarEvents", + "set": "ContactCalendarEventType" + }, + { + "fid": 3, + "name": "withUserStatus", + "type": 2 + } + ], + "GetContactsV2Response": [ + { + "fid": 1, + "name": "contacts", + "map": "ContactEntry" + } + ], + "ContactEntry": [ + { + "fid": 1, + "name": "userStatus", + "struct": "UserStatus" + }, + { + "fid": 2, + "name": "snapshotTimeMillis", + "type": 10 + }, + { + "fid": 3, + "name": "contact", + "struct": "Contact" + }, + { + "fid": 4, + "name": "calendarEvents", + "struct": "ContactCalendarEvents" + } + ], + "ContactCalendarEvents": [ + { + "fid": 1, + "name": "events", + "map": "ContactCalendarEvent" + } + ], + "ContactCalendarEvent": [ + { + "fid": 1, + "name": "id", + "type": 11 + }, + { + "fid": 2, + "name": "state", + "struct": "ContactCalendarEventState" + }, + { + "fid": 3, + "name": "year", + "type": 8 + }, + { + "fid": 4, + "name": "month", + "type": 8 + }, + { + "fid": 5, + "name": "day", + "type": 8 + } + ], + "Configurations": [ + { + "fid": 1, + "name": "revision", + "type": 10 + }, + { + "fid": 2, + "name": "configMap", + "map": 11 + } + ], + "E2EEGroupSharedKey": [ + { + "fid": 1, + "name": "keyVersion", + "type": 8 + }, + { + "fid": 2, + "name": "groupKeyId", + "type": 8 + }, + { + "fid": 3, + "name": "creator", + "type": 11 + }, + { + "fid": 4, + "name": "creatorKeyId", + "type": 8 + }, + { + "fid": 5, + "name": "receiver", + "type": 11 + }, + { + "fid": 6, + "name": "receiverKeyId", + "type": 8 + }, + { + "fid": 7, + "name": "encryptedSharedKey" + }, + { + "fid": 8, + "name": "allowedTypes", + "set": "ContentType" + }, + { + "fid": 9, + "name": "specVersion", + "type": 8 + } + ], + "FollowRequest": [ + { + "fid": 1, + "name": "followMid", + "struct": "FollowMid" + } + ], + "FollowMid": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "eMid", + "type": 11 + } + ], + "UnfollowRequest": [ + { + "fid": 1, + "name": "followMid", + "struct": "FollowMid" + } + ], + "GetChatsRequest": [ + { + "fid": 1, + "name": "chatMids", + "list": 11 + }, + { + "fid": 2, + "name": "withMembers", + "type": 2 + }, + { + "fid": 3, + "name": "withInvitees", + "type": 2 + } + ], + "GetChatsResponse": [ + { + "fid": 1, + "name": "chats", + "list": "Chat" + } + ], + "Chat": [ + { + "fid": 1, + "name": "type", + "struct": "CharType" + }, + { + "fid": 2, + "name": "chatMid", + "type": 11 + }, + { + "fid": 3, + "name": "createdTime", + "type": 10 + }, + { + "fid": 4, + "name": "notificationDisabled", + "type": 2 + }, + { + "fid": 5, + "name": "favoriteTimestamp", + "type": 10 + }, + { + "fid": 6, + "name": "chatName", + "type": 11 + }, + { + "fid": 7, + "name": "picturePath", + "type": 11 + }, + { + "fid": 8, + "name": "extra", + "struct": "Extra" + } + ], + "Extra": [ + { + "fid": 1, + "name": "groupExtra", + "struct": "GroupExtra" + }, + { + "fid": 2, + "name": "peerExtra", + "struct": "PeerExtra" + } + ], + "GroupExtra": [ + { + "fid": 1, + "name": "creator", + "type": 11 + }, + { + "fid": 2, + "name": "preventedJoinByTicket", + "type": 2 + }, + { + "fid": 3, + "name": "invitationTicket", + "type": 11 + }, + { + "fid": 4, + "name": "memberMids", + "map": 10 + }, + { + "fid": 5, + "name": "inviteeMids", + "map": 10 + }, + { + "fid": 6, + "name": "addFriendDisabled", + "type": 2 + }, + { + "fid": 7, + "name": "ticketDisabled", + "type": 2 + } + ], + "PeerExtra": [], + "GetFollowersRequest": [ + { + "fid": 1, + "name": "followMid", + "struct": "FollowMid" + }, + { + "fid": 2, + "name": "cursor", + "type": 11 + } + ], + "GetFollowersResponse": [ + { + "fid": 1, + "name": "profiles", + "list": "FollowProfile" + }, + { + "fid": 2, + "name": "cursor", + "type": 11 + }, + { + "fid": 3, + "name": "followingCount", + "type": 10 + }, + { + "fid": 4, + "name": "followerCount", + "type": 10 + } + ], + "FollowProfile": [ + { + "fid": 1, + "name": "followMid", + "struct": "FollowMid" + }, + { + "fid": 2, + "name": "displayName", + "type": 11 + }, + { + "fid": 3, + "name": "picturePath", + "type": 11 + }, + { + "fid": 4, + "name": "following", + "type": 2 + }, + { + "fid": 5, + "name": "allowFollow", + "type": 2 + }, + { + "fid": 6, + "name": "followBuddyDetail", + "struct": "FollowBuddyDetail" + } + ], + "FollowBuddyDetail": [ + { + "fid": 1, + "name": "iconType", + "type": 8 + } + ], + "GetFollowingsRequest": [ + { + "fid": 1, + "name": "followMid", + "struct": "FollowMid" + }, + { + "fid": 2, + "name": "cursor", + "type": 11 + } + ], + "GetFollowingsResponse": [ + { + "fid": 1, + "name": "profiles", + "list": "FollowProfile" + }, + { + "fid": 2, + "name": "cursor", + "type": 11 + }, + { + "fid": 3, + "name": "followingCount", + "type": 10 + }, + { + "fid": 4, + "name": "followerCount", + "type": 10 + } + ], + "GetE2EEKeyBackupCertificatesRequest": [], + "GetE2EEKeyBackupCertificatesResponse": [ + { + "fid": 1, + "name": "urlHashList", + "list": 11 + } + ], + "DeleteOtherFromChatRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "chatMid", + "type": 11 + }, + { + "fid": 3, + "name": "targetUserMids", + "set": 11 + } + ], + "DeleteOtherFromChatResponse": [], + "InviteIntoChatRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "chatMid", + "type": 11 + }, + { + "fid": 3, + "name": "targetUserMids", + "set": 11 + } + ], + "InviteIntoChatResponse": [], + "CancelChatInvitationRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "chatMid", + "type": 11 + }, + { + "fid": 3, + "name": "targetUserMids", + "set": 11 + } + ], + "CancelChatInvitationResponse": [], + "DeleteSelfFromChatRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "chatMid", + "type": 11 + }, + { + "fid": 3, + "name": "lastSeenMessageDeliveredTime", + "type": 10 + }, + { + "fid": 4, + "name": "lastSeenMessageId", + "type": 11 + }, + { + "fid": 5, + "name": "lastMessageDeliveredTime", + "type": 10 + }, + { + "fid": 6, + "name": "lastMessageId", + "type": 11 + } + ], + "DeleteSelfFromChatResponse": [], + "FindChatByTicketRequest": [ + { + "fid": 1, + "name": "ticketId", + "type": 11 + } + ], + "FindChatByTicketResponse": [ + { + "fid": 1, + "name": "chat", + "struct": "Chat" + } + ], + "RefreshAccessTokenRequest": [ + { + "fid": 1, + "name": "refreshToken", + "type": 11 + } + ], + "RefreshAccessTokenResponse": [ + { + "fid": 1, + "name": "accessToken", + "type": 11 + }, + { + "fid": 2, + "name": "durationUntilRefreshInSec", + "type": 10 + }, + { + "fid": 3, + "name": "retryPolicy", + "struct": "RetryPolicy" + }, + { + "fid": 4, + "name": "tokenIssueTimeEpochSec", + "type": 10 + }, + { + "fid": 5, + "name": "refreshToken", + "type": 11 + } + ], + "RetryPolicy": [ + { + "fid": 1, + "name": "initialDelayInMillis", + "type": 10 + }, + { + "fid": 2, + "name": "maxDelayInMillis", + "type": 10 + }, + { + "fid": 3, + "name": "multiplier", + "type": 4 + }, + { + "fid": 4, + "name": "jitterRate", + "type": 4 + } + ], + "GetPreviousMessagesV2Request": [ + { + "fid": 1, + "name": "messageBoxId", + "type": 11 + }, + { + "fid": 2, + "name": "endMessageId", + "struct": "MessageBoxV2MessageId" + }, + { + "fid": 3, + "name": "messagesCount", + "type": 8 + }, + { + "fid": 4, + "name": "withReadCount", + "type": 2 + }, + { + "fid": 5, + "name": "receivedOnly", + "type": 2 + } + ], + "SyncResponse": [ + { + "fid": 1, + "name": "operationResponse", + "struct": "OperationResponse" + }, + { + "fid": 2, + "name": "fullSyncResponse", + "struct": "FullSyncResponse" + }, + { + "fid": 3, + "name": "partialFullSyncResponse", + "struct": "PartialFullSyncResponse" + } + ], + "OperationResponse": [ + { + "fid": 1, + "name": "operations", + "list": "Operation" + }, + { + "fid": 2, + "name": "hasMoreOps", + "type": 2 + }, + { + "fid": 3, + "name": "globalEvents", + "struct": "TGlobalEvents" + }, + { + "fid": 4, + "name": "individualEvents", + "struct": "TIndividualEvents" + } + ], + "FullSyncResponse": [ + { + "fid": 1, + "name": "reasons", + "set": "SyncTriggerReason" + }, + { + "fid": 2, + "name": "nextRevision", + "type": 10 + } + ], + "PartialFullSyncResponse": [ + { + "fid": 1, + "name": "targetCategories", + "map": 10 + } + ], + "TGlobalEvents": [ + { + "fid": 1, + "name": "events", + "map": "GlobalEvent" + }, + { + "fid": 2, + "name": "lastRevision", + "type": 10 + } + ], + "TIndividualEvents": [ + { + "fid": 1, + "name": "events", + "set": "NotificationStatus" + }, + { + "fid": 2, + "name": "lastRevision", + "type": 10 + } + ], + "DetermineMediaMessageFlowResponse": [ + { + "fid": 1, + "name": "flowMap", + "map": "MediaMessageFlow" + }, + { + "fid": 2, + "name": "cacheTtlMillis", + "type": 10 + } + ], + "ChatRoomAnnouncementContentMetadata": [ + { + "fid": 1, + "name": "replace", + "type": 11 + }, + { + "fid": 2, + "name": "sticonOwnership", + "type": 11 + }, + { + "fid": 3, + "name": "postNotificationMetadata", + "type": 11 + } + ], + "DisasterInfo": [ + { + "fid": 1, + "name": "disasterId", + "type": 11 + }, + { + "fid": 2, + "name": "title", + "type": 11 + }, + { + "fid": 3, + "name": "region", + "type": 11 + }, + { + "fid": 4, + "name": "disasterDescription", + "type": 11 + }, + { + "fid": 5, + "name": "seeMoreUrl", + "type": 11 + }, + { + "fid": 7, + "name": "status", + "type": 8 + } + ], + "GetDisasterCasesRequest": [], + "GetDisasterCasesResponse": [ + { + "fid": 1, + "name": "disasters", + "list": "DisasterInfo" + }, + { + "fid": 2, + "name": "messageTemplate", + "list": 11 + }, + { + "fid": 3, + "name": "ttlInMillis", + "type": 10 + } + ], + "SquareMessageState": { + "1": "SENT", + "2": "DELETED", + "3": "FORBIDDEN", + "4": "UNSENT" + }, + "SquareMessageReaction": [ + { + "fid": 1, + "name": "type", + "struct": "MessageReactionType" + }, + { + "fid": 2, + "name": "reactor", + "struct": "SquareMember" + }, + { + "fid": 3, + "name": "createdAt", + "type": 10 + }, + { + "fid": 4, + "name": "updatedAt", + "type": 10 + } + ], + "SquareMessageReactionStatus": [ + { + "fid": 1, + "name": "totalCount", + "type": 8 + }, + { + "fid": 2, + "name": "countByReactionType", + "map": 8 + }, + { + "fid": 3, + "name": "myReaction", + "struct": "SquareMessageReaction" + } + ], + "SquareEventMutateMessage": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMessage", + "struct": "SquareMessage" + }, + { + "fid": 3, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 4, + "name": "senderDisplayName", + "type": 11 + } + ], + "SquareEmblem": { + "1": "SUPER", + "2": "OFFICIAL" + }, + "SquareJoinMethodType": { + "0": "NONE", + "1": "APPROVAL", + "2": "CODE" + }, + "ApprovalValue": [ + { + "fid": 1, + "name": "message", + "type": 11 + } + ], + "CodeValue": [ + { + "fid": 1, + "name": "code", + "type": 11 + } + ], + "SquareJoinMethodValue": [ + { + "fid": 1, + "name": "approvalValue", + "struct": "ApprovalValue" + }, + { + "fid": 2, + "name": "codeValue", + "struct": "CodeValue" + } + ], + "SquareJoinMethod": [ + { + "fid": 1, + "name": "type", + "struct": "SquareJoinMethodType" + }, + { + "fid": 2, + "name": "value", + "struct": "SquareJoinMethodValue" + } + ], + "MessageVisibility": [ + { + "fid": 1, + "name": "showJoinMessage", + "type": 2 + }, + { + "fid": 2, + "name": "showLeaveMessage", + "type": 2 + }, + { + "fid": 3, + "name": "showKickoutMessage", + "type": 2 + } + ], + "SquareEventNotifiedUpdateSquareChatMaxMemberCount": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "maxMemberCount", + "type": 8 + }, + { + "fid": 3, + "name": "editor", + "struct": "SquareMember" + } + ], + "SquareEventNotifiedAddBot": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMember", + "struct": "SquareMember" + }, + { + "fid": 3, + "name": "botMid", + "type": 11 + }, + { + "fid": 4, + "name": "botDisplayName", + "type": 11 + } + ], + "SquareEventNotifiedRemoveBot": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMember", + "struct": "SquareMember" + }, + { + "fid": 3, + "name": "botMid", + "type": 11 + }, + { + "fid": 4, + "name": "botDisplayName", + "type": 11 + } + ], + "SquareEventNotifiedUpdateReadonlyChat": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "readonly", + "type": 2 + } + ], + "MessageStatusType": {}, + "MessageStatusContents": [ + { + "fid": 1, + "name": "messageReactionStatus", + "struct": "SquareMessageReactionStatus" + } + ], + "SquareMessageStatus": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "globalMessageId", + "type": 11 + }, + { + "fid": 3, + "name": "type", + "struct": "MessageStatusType" + }, + { + "fid": 4, + "name": "contents", + "struct": "MessageStatusContents" + }, + { + "fid": 5, + "name": "publishedAt", + "type": 10 + } + ], + "SquareEventNotifiedUpdateMessageStatus": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "messageId", + "type": 11 + }, + { + "fid": 3, + "name": "messageStatus", + "struct": "SquareMessageStatus" + } + ], + "UrlButton": [ + { + "fid": 1, + "name": "text", + "type": 11 + }, + { + "fid": 2, + "name": "url", + "type": 11 + } + ], + "TextButton": [ + { + "fid": 1, + "name": "text", + "type": 11 + } + ], + "OkButton": [ + { + "fid": 1, + "name": "text", + "type": 11 + } + ], + "ButtonContent": [ + { + "fid": 1, + "name": "urlButton", + "struct": "UrlButton" + }, + { + "fid": 2, + "name": "textButton", + "struct": "TextButton" + }, + { + "fid": 3, + "name": "okButton", + "struct": "OkButton" + } + ], + "SquareEventChatPopup": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "popupId", + "type": 10 + }, + { + "fid": 3, + "name": "flexJson", + "type": 11 + }, + { + "fid": 4, + "name": "button", + "struct": "ButtonContent" + } + ], + "SquareEventNotifiedSystemMessage": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "text", + "type": 11 + } + ], + "NotifiedMessageType": { + "1": "MENTION", + "2": "REPLY" + }, + "SquareChatFeatureControlState": { + "1": "DISABLED", + "2": "ENABLED" + }, + "SquareChatFeature": [ + { + "fid": 1, + "name": "controlState", + "struct": "SquareChatFeatureControlState" + }, + { + "fid": 2, + "name": "booleanValue", + "struct": "BooleanState" + } + ], + "SquareChatFeatureSet": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "revision", + "type": 10 + }, + { + "fid": 11, + "name": "disableUpdateMaxChatMemberCount", + "struct": "SquareChatFeature" + }, + { + "fid": 12, + "name": "disableMarkAsReadEvent", + "struct": "SquareChatFeature" + } + ], + "SquareEventNotifiedUpdateSquareChatFeatureSet": [ + { + "fid": 1, + "name": "squareChatFeatureSet", + "struct": "SquareChatFeatureSet" + } + ], + "SquareEventNotifiedUpdateSquareNoteStatus": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "noteStatus", + "struct": "NoteStatus" + } + ], + "SquareEventNotifiedUpdateSquareChatAnnouncement": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "announcementSeq", + "type": 10 + } + ], + "SquareEventNotificationPostAnnouncement": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareName", + "type": 11 + }, + { + "fid": 3, + "name": "squareProfileImageObsHash", + "type": 11 + }, + { + "fid": 4, + "name": "actionUri", + "type": 11 + } + ], + "NotificationPostType": { + "2": "POST_MENTION", + "3": "POST_LIKE", + "4": "POST_COMMENT", + "5": "POST_COMMENT_MENTION", + "6": "POST_COMMENT_LIKE", + "7": "POST_RELAY_JOIN" + }, + "SquareEventNotificationPost": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "notificationPostType", + "struct": "NotificationPostType" + }, + { + "fid": 3, + "name": "thumbnailObsHash", + "type": 11 + }, + { + "fid": 4, + "name": "text", + "type": 11 + }, + { + "fid": 5, + "name": "actionUri", + "type": 11 + } + ], + "SquareEventNotificationNewChatMember": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareChatName", + "type": 11 + } + ], + "SquareEventNotificationMessageReaction": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "messageId", + "type": 11 + }, + { + "fid": 3, + "name": "squareChatName", + "type": 11 + }, + { + "fid": 4, + "name": "reactorName", + "type": 11 + }, + { + "fid": 5, + "name": "thumbnailObsHash", + "type": 11 + }, + { + "fid": 6, + "name": "messageText", + "type": 11 + }, + { + "fid": 7, + "name": "type", + "struct": "MessageReactionType" + } + ], + "UnsendMessageResponse": [ + { + "fid": 1, + "name": "unsentMessage", + "struct": "SquareMessage" + } + ], + "GetSquareEmidResponse": [ + { + "fid": 1, + "name": "squareEmid", + "type": 11 + } + ], + "GetSquareMembersBySquareResponse": [ + { + "fid": 1, + "name": "members", + "list": "SquareMember" + } + ], + "ManualRepairResponse": [ + { + "fid": 1, + "name": "events", + "list": "SquareEvent" + }, + { + "fid": 2, + "name": "syncToken", + "type": 11 + }, + { + "fid": 3, + "name": "continuationToken", + "type": 11 + } + ], + "InviteIntoSquareChatResponse": [ + { + "fid": 1, + "name": "inviteeMids", + "list": 11 + } + ], + "ReactToMessageResponse": [ + { + "fid": 1, + "name": "reaction", + "struct": "SquareMessageReaction" + }, + { + "fid": 2, + "name": "status", + "struct": "SquareMessageReactionStatus" + } + ], + "GetSquareChatFeatureSetResponse": [ + { + "fid": 1, + "name": "squareChatFeatureSet", + "struct": "SquareChatFeatureSet" + } + ], + "SyncSquareMembersResponse": [ + { + "fid": 1, + "name": "updatedSquareMembers", + "list": "SquareMember" + } + ], + "SquareChatThreadState": { + "1": "ACTIVE", + "2": "INACTIVE" + }, + "SquareChatThread": [ + { + "fid": 1, + "name": "squareChatThreadMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 3, + "name": "squareMid", + "type": 11 + }, + { + "fid": 4, + "name": "messageId", + "type": 11 + }, + { + "fid": 5, + "name": "state", + "struct": "SquareChatThreadState" + } + ], + "GetJoinedSquareChatThreadsResponse": [ + { + "fid": 1, + "name": "squareChatThreads", + "list": "SquareChatThread" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + } + ], + "CreateSquareChatThreadResponse": [ + { + "fid": 1, + "name": "squareChatThread", + "struct": "SquareChatThread" + } + ], + "SquareChatThreadeMembershipState": { + "1": "ACTIVATED", + "2": "DEACTIVATED" + }, + "SquareChatThreadMember": [ + { + "fid": 1, + "name": "squareMemberMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareChatThreadMid", + "type": 11 + }, + { + "fid": 3, + "name": "revision", + "type": 10 + }, + { + "fid": 4, + "name": "membershipState", + "struct": "SquareChatThreadeMembershipState" + } + ], + "GetSquareChatThreadResponse": [ + { + "fid": 1, + "name": "squareChatThread", + "struct": "SquareChatThread" + }, + { + "fid": 2, + "name": "mySquareChatThreadMember", + "struct": "SquareChatThreadMember" + } + ], + "JoinSquareChatThreadResponse": [ + { + "fid": 1, + "name": "squareChatThread", + "struct": "SquareChatThread" + } + ], + "AcceptSpeakersResponse": [], + "AcceptToChangeRoleResponse": [], + "AcceptToListenResponse": [], + "AcceptToSpeakResponse": [], + "CancelToSpeakResponse": [], + "EndLiveTalkResponse": [], + "LiveTalkEventType": { + "1": "NOTIFIED_UPDATE_LIVE_TALK_TITLE", + "2": "NOTIFIED_UPDATE_LIVE_TALK_SPEAKER_SETTING", + "3": "NOTIFIED_UPDATE_LIVE_TALK_ANNOUNCEMENT", + "4": "NOTIFIED_UPDATE_SQUARE_MEMBER_ROLE", + "5": "NOTIFIED_UPDATE_LIVE_TALK_ALLOW_REQUEST_TO_SPEAK" + }, + "LiveTalkEventNotifiedUpdateLiveTalkTitle": [ + { + "fid": 1, + "name": "title", + "type": 11 + } + ], + "LiveTalkSpeakerSetting": { + "1": "LIMITED_SPEAKERS", + "2": "ALL_AS_SPEAKERS" + }, + "LiveTalkEventNotifiedUpdateLiveTalkSpeakerSetting": [ + { + "fid": 1, + "name": "speakerSetting", + "struct": "LiveTalkSpeakerSetting" + } + ], + "LiveTalkEventNotifiedUpdateLiveTalkAnnouncement": [ + { + "fid": 1, + "name": "announcement", + "type": 11 + } + ], + "LiveTalkEventNotifiedUpdateSquareMemberRole": [ + { + "fid": 1, + "name": "squareMemberMid", + "type": 11 + }, + { + "fid": 2, + "name": "role", + "struct": "SquareMemberRole" + } + ], + "LiveTalkEventNotifiedUpdateLiveTalkAllowRequestToSpeak": [ + { + "fid": 1, + "name": "allowRequestToSpeak", + "type": 2 + } + ], + "LiveTalkEventPayload": [ + { + "fid": 1, + "name": "notifiedUpdateLiveTalkTitle", + "struct": "LiveTalkEventNotifiedUpdateLiveTalkTitle" + }, + { + "fid": 2, + "name": "notifiedUpdateLiveTalkSpeakerSetting", + "struct": "LiveTalkEventNotifiedUpdateLiveTalkSpeakerSetting" + }, + { + "fid": 3, + "name": "notifiedUpdateLiveTalkAnnouncement", + "struct": "LiveTalkEventNotifiedUpdateLiveTalkAnnouncement" + }, + { + "fid": 4, + "name": "notifiedUpdateSquareMemberRole", + "struct": "LiveTalkEventNotifiedUpdateSquareMemberRole" + }, + { + "fid": 5, + "name": "notifiedUpdateLiveTalkAllowRequestToSpeak", + "struct": "LiveTalkEventNotifiedUpdateLiveTalkAllowRequestToSpeak" + } + ], + "LiveTalkEvent": [ + { + "fid": 1, + "name": "type", + "struct": "LiveTalkEventType" + }, + { + "fid": 2, + "name": "payload", + "struct": "LiveTalkEventPayload" + }, + { + "fid": 3, + "name": "syncToken", + "type": 11 + } + ], + "FetchLiveTalkEventsResponse": [ + { + "fid": 1, + "name": "events", + "list": "LiveTalkEvent" + }, + { + "fid": 2, + "name": "syncToken", + "type": 11 + }, + { + "fid": 3, + "name": "hasMore", + "type": 2 + } + ], + "LiveTalkType": { + "1": "PUBLIC", + "2": "PRIVATE" + }, + "LiveTalk": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "sessionId", + "type": 11 + }, + { + "fid": 3, + "name": "title", + "type": 11 + }, + { + "fid": 4, + "name": "type", + "struct": "LiveTalkType" + }, + { + "fid": 5, + "name": "speakerSetting", + "struct": "LiveTalkSpeakerSetting" + }, + { + "fid": 6, + "name": "allowRequestToSpeak", + "type": 2 + }, + { + "fid": 7, + "name": "announcement", + "type": 11 + }, + { + "fid": 8, + "name": "participantCount", + "type": 8 + }, + { + "fid": 9, + "name": "revision", + "type": 10 + }, + { + "fid": 10, + "name": "startedAt", + "type": 10 + } + ], + "FindLiveTalkByInvitationTicketResponse": [ + { + "fid": 1, + "name": "chatInvitationTicket", + "type": 11 + }, + { + "fid": 2, + "name": "liveTalk", + "struct": "LiveTalk" + }, + { + "fid": 3, + "name": "chat", + "struct": "SquareChat" + }, + { + "fid": 4, + "name": "squareMember", + "struct": "SquareMember" + }, + { + "fid": 5, + "name": "chatMembershipState", + "struct": "SquareChatMembershipState" + } + ], + "ForceEndLiveTalkResponse": [], + "LiveTalkSpeaker": [ + { + "fid": 1, + "name": "displayName", + "type": 11 + }, + { + "fid": 2, + "name": "profileImageObsHash", + "type": 11 + }, + { + "fid": 3, + "name": "role", + "struct": "SquareMemberRole" + } + ], + "GetLiveTalkInfoForNonMemberResponse": [ + { + "fid": 1, + "name": "chatName", + "type": 11 + }, + { + "fid": 2, + "name": "liveTalk", + "struct": "LiveTalk" + }, + { + "fid": 3, + "name": "speakers", + "list": "LiveTalkSpeaker" + }, + { + "fid": 4, + "name": "chatInvitationUrl", + "type": 11 + } + ], + "GetLiveTalkInvitationUrlResponse": [ + { + "fid": 1, + "name": "invitationUrl", + "type": 11 + } + ], + "GetLiveTalkSpeakersForNonMemberResponse": [ + { + "fid": 1, + "name": "speakers", + "list": "LiveTalkSpeaker" + } + ], + "GetSquareInfoByChatMidResponse": [ + { + "fid": 1, + "name": "defaultChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareName", + "type": 11 + }, + { + "fid": 3, + "name": "squareDesc", + "type": 11 + } + ], + "InviteToChangeRoleResponse": [], + "InviteToListenResponse": [], + "InviteToLiveTalkResponse": [], + "InviteToSpeakResponse": [ + { + "fid": 1, + "name": "inviteRequestId", + "type": 11 + } + ], + "JoinLiveTalkResponse": [ + { + "fid": 1, + "name": "hostMemberMid", + "type": 11 + }, + { + "fid": 2, + "name": "memberSessionId", + "type": 11 + }, + { + "fid": 3, + "name": "token", + "type": 11 + }, + { + "fid": 4, + "name": "proto", + "type": 11 + }, + { + "fid": 5, + "name": "voipAddress", + "type": 11 + }, + { + "fid": 6, + "name": "voipAddress6", + "type": 11 + }, + { + "fid": 7, + "name": "voipUdpPort", + "type": 8 + }, + { + "fid": 8, + "name": "voipTcpPort", + "type": 8 + }, + { + "fid": 9, + "name": "fromZone", + "type": 11 + }, + { + "fid": 10, + "name": "commParam", + "type": 11 + }, + { + "fid": 11, + "name": "orionAddress", + "type": 11 + }, + { + "fid": 12, + "name": "polarisAddress", + "type": 11 + }, + { + "fid": 13, + "name": "polarisZone", + "type": 11 + }, + { + "fid": 14, + "name": "polarisUdpPort", + "type": 8 + } + ], + "KickOutLiveTalkParticipantsResponse": [], + "RejectSpeakersResponse": [], + "RejectToSpeakResponse": [], + "ReportLiveTalkResponse": [], + "ReportLiveTalkSpeakerResponse": [], + "RequestToListenResponse": [], + "RequestToSpeakResponse": [], + "StartLiveTalkResponse": [ + { + "fid": 1, + "name": "liveTalk", + "struct": "LiveTalk" + } + ], + "UpdateLiveTalkAttrsResponse": [], + "AcquireLiveTalkResponse": [ + { + "fid": 1, + "name": "liveTalk", + "struct": "LiveTalk" + } + ], + "CreateQrCodeForSecureResponse": [ + { + "fid": 1, + "name": "callbackUrl", + "type": 11 + }, + { + "fid": 2, + "name": "longPollingMaxCount", + "type": 8 + }, + { + "fid": 3, + "name": "longPollingIntervalSec", + "type": 8 + }, + { + "fid": 4, + "name": "nonce", + "type": 11 + } + ], + "RefreshApiRetryPolicy": [ + { + "fid": 1, + "name": "initialDelayInMillis", + "type": 10 + }, + { + "fid": 2, + "name": "maxDelayInMillis", + "type": 10 + }, + { + "fid": 3, + "name": "multiplier", + "type": 4 + }, + { + "fid": 4, + "name": "jitterRate", + "type": 4 + } + ], + "TokenV3IssueResult": [ + { + "fid": 1, + "name": "accessToken", + "type": 11 + }, + { + "fid": 2, + "name": "refreshToken", + "type": 11 + }, + { + "fid": 3, + "name": "durationUntilRefreshInSec", + "type": 10 + }, + { + "fid": 4, + "name": "refreshApiRetryPolicy", + "struct": "RefreshApiRetryPolicy" + }, + { + "fid": 5, + "name": "loginSessionId", + "type": 11 + }, + { + "fid": 6, + "name": "tokenIssueTimeEpochSec", + "type": 10 + } + ], + "QrCodeLoginV2Response": [ + { + "fid": 1, + "name": "certificate", + "type": 11 + }, + { + "fid": 2, + "name": "accessTokenV2", + "type": 11 + }, + { + "fid": 3, + "name": "tokenV3IssueResult", + "struct": "TokenV3IssueResult" + }, + { + "fid": 4, + "name": "mid", + "type": 11 + }, + { + "fid": 9, + "name": "lastBindTimestamp", + "type": 10 + }, + { + "fid": 10, + "name": "metaData", + "map": 11 + } + ], + "UserType": { + "1": "USER", + "2": "BOT" + }, + "RichString": [ + { + "fid": 1, + "name": "content", + "type": 11 + }, + { + "fid": 2, + "name": "meta", + "map": 11 + } + ], + "TargetProfileDetail": [ + { + "fid": 1, + "name": "snapshotTimeMillis", + "type": 10 + }, + { + "fid": 2, + "name": "profileName", + "type": 11 + }, + { + "fid": 3, + "name": "picturePath", + "type": 11 + }, + { + "fid": 4, + "name": "statusMessage", + "struct": "RichString" + }, + { + "fid": 5, + "name": "musicProfile", + "type": 11 + }, + { + "fid": 6, + "name": "videoProfile", + "type": 11 + }, + { + "fid": 7, + "name": "avatarProfile", + "struct": "AvatarProfile" + }, + { + "fid": 8, + "name": "pictureSource", + "struct": "PictureSource" + }, + { + "fid": 9, + "name": "pictureStatus", + "type": 11 + } + ], + "UserFriendDetail": [ + { + "fid": 1, + "name": "createdTime", + "type": 10 + }, + { + "fid": 3, + "name": "overriddenName", + "type": 11 + }, + { + "fid": 4, + "name": "favoriteTime", + "type": 10 + }, + { + "fid": 6, + "name": "hidden", + "type": 2 + }, + { + "fid": 7, + "name": "ringtone", + "type": 11 + }, + { + "fid": 8, + "name": "ringbackTone", + "type": 11 + } + ], + "BotFriendDetail": [ + { + "fid": 1, + "name": "createdTime", + "type": 10 + }, + { + "fid": 4, + "name": "favoriteTime", + "type": 10 + }, + { + "fid": 6, + "name": "hidden", + "type": 2 + } + ], + "NotFriend": [], + "FriendDetail": [ + { + "fid": 1, + "name": "user", + "struct": "UserFriendDetail" + }, + { + "fid": 2, + "name": "bot", + "struct": "BotFriendDetail" + }, + { + "fid": 3, + "name": "notFriend", + "struct": "NotFriend" + } + ], + "UserBlockDetail": [ + { + "fid": 3, + "name": "deletedFromBlockList", + "type": 2 + } + ], + "BotBlockDetail": [ + { + "fid": 3, + "name": "deletedFromBlockList", + "type": 2 + } + ], + "NotBlocked": [], + "BlockDetail": [ + { + "fid": 1, + "name": "user", + "struct": "UserBlockDetail" + }, + { + "fid": 2, + "name": "bot", + "struct": "BotBlockDetail" + }, + { + "fid": 3, + "name": "notBlocked", + "struct": "NotBlocked" + } + ], + "RecommendationReasonSharedChat": [ + { + "fid": 1, + "name": "chatMid", + "type": 11 + } + ], + "RecommendationReasonReverseFriendByUserId": [], + "RecommendationReasonReverseFriendByQRCode": [], + "RecommendationReasonReverseFriendByPhone": [], + "RecommendationReason": [ + { + "fid": 1, + "name": "sharedChat", + "struct": "RecommendationReasonSharedChat" + }, + { + "fid": 2, + "name": "reverseFriendByUserId", + "struct": "RecommendationReasonReverseFriendByUserId" + }, + { + "fid": 3, + "name": "reverseFriendByQrCode", + "struct": "RecommendationReasonReverseFriendByQRCode" + }, + { + "fid": 4, + "name": "reverseFriendByPhone", + "struct": "RecommendationReasonReverseFriendByPhone" + } + ], + "Recommended": [ + { + "fid": 1, + "name": "createdTime", + "type": 10 + }, + { + "fid": 2, + "name": "reasons", + "list": "RecommendationReason" + }, + { + "fid": 4, + "name": "hidden", + "type": 2 + } + ], + "NotRecommended": [], + "RecommendationDetail": [ + { + "fid": 1, + "name": "recommendationDetail", + "struct": "Recommended" + }, + { + "fid": 2, + "name": "notRecommended", + "struct": "NotRecommended" + } + ], + "NotificationSetting": [ + { + "fid": 1, + "name": "mute", + "type": 2 + } + ], + "NotificationSettingEntry": [ + { + "fid": 1, + "name": "notificationSetting", + "struct": "NotificationSetting" + } + ], + "GetContactV3Response": [ + { + "fid": 1, + "name": "targetUserMid", + "type": 11 + }, + { + "fid": 2, + "name": "userType", + "struct": "UserType" + }, + { + "fid": 3, + "name": "targetProfileDetail", + "struct": "TargetProfileDetail" + }, + { + "fid": 4, + "name": "friendDetail", + "struct": "FriendDetail" + }, + { + "fid": 5, + "name": "blockDetail", + "struct": "BlockDetail" + }, + { + "fid": 6, + "name": "recommendationDetail", + "struct": "RecommendationDetail" + }, + { + "fid": 7, + "name": "notificationSettingEntry", + "struct": "NotificationSettingEntry" + } + ], + "GetContactsV3Response": [ + { + "fid": 1, + "name": "responses", + "list": "GetContactV3Response" + } + ], + "AddFriendByMidResponse": [], + "GetContactCalendarEventResponse": [ + { + "fid": 1, + "name": "targetUserMid", + "type": 11 + }, + { + "fid": 2, + "name": "userType", + "struct": "UserType" + }, + { + "fid": 3, + "name": "contactCalendarEvents", + "struct": "ContactCalendarEvents" + }, + { + "fid": 4, + "name": "snapshotTimeMillis", + "type": 10 + } + ], + "GetContactCalendarEventsResponse": [ + { + "fid": 1, + "name": "responses", + "list": "GetContactCalendarEventResponse" + } + ], + "ProductType": { + "1": "STICKER", + "2": "THEME", + "3": "STICON" + }, + "ThemeResourceType": { + "1": "STATIC", + "2": "ANIMATION" + }, + "SticonResourceType": { + "1": "STATIC", + "2": "ANIMATION" + }, + "ImageTextStatus": { + "0": "OK", + "1": "PRODUCT_UNSUPPORTED", + "2": "TEXT_NOT_SPECIFIED", + "3": "TEXT_STYLE_UNAVAILABLE", + "4": "CHARACTER_COUNT_LIMIT_EXCEEDED", + "5": "CONTAINS_INVALID_WORD" + }, + "SubType": { + "0": "GENERAL", + "1": "CREATORS", + "2": "STICON" + }, + "StickerSize": { + "0": "NORMAL", + "1": "BIG" + }, + "PopupLayer": { + "0": "FOREGROUND", + "1": "BACKGROUND" + }, + "ProductSalesState": { + "0": "ON_SALE", + "1": "OUTDATED_VERSION", + "2": "NOT_ON_SALE" + }, + "PromotionType": { + "0": "NONE", + "1": "CARRIER", + "2": "BUDDY", + "3": "INSTALL", + "4": "MISSION", + "5": "MUSTBUY" + }, + "PromotionMissionType": { + "1": "DEFAULT", + "2": "VIEW_VIDEO" + }, + "BrandType": { + "1": "PREMIUM", + "2": "VERIFIED", + "3": "UNVERIFIED" + }, + "EditorsPickShowcaseType": { + "0": "STATIC", + "1": "POPULAR", + "2": "NEW_RELEASE" + }, + "Locale": [ + { + "fid": 1, + "name": "language", + "type": 11 + }, + { + "fid": 2, + "name": "country", + "type": 11 + } + ], + "GetProductRequest": [ + { + "fid": 1, + "name": "productType", + "struct": "ProductType" + }, + { + "fid": 2, + "name": "productId", + "type": 11 + }, + { + "fid": 3, + "name": "carrierCode", + "type": 11 + }, + { + "fid": 4, + "name": "saveBrowsingHistory", + "type": 2 + } + ], + "GetProductResponse": [ + { + "fid": 1, + "name": "productDetail", + "struct": "ProductDetail" + } + ], + "ProductDetail": [ + { + "fid": 1, + "name": "id", + "type": 11 + }, + { + "fid": 2, + "name": "billingItemId", + "type": 11 + }, + { + "fid": 3, + "name": "type", + "type": 11 + }, + { + "fid": 4, + "name": "subtype", + "struct": "SubType" + }, + { + "fid": 5, + "name": "billingCpId", + "type": 11 + }, + { + "fid": 11, + "name": "name", + "type": 11 + }, + { + "fid": 12, + "name": "author", + "type": 11 + }, + { + "fid": 13, + "name": "details", + "type": 11 + }, + { + "fid": 14, + "name": "copyright", + "type": 11 + }, + { + "fid": 15, + "name": "notice", + "type": 11 + }, + { + "fid": 16, + "name": "promotionInfo", + "struct": "PromotionInfo" + }, + { + "fid": 21, + "name": "latestVersion", + "type": 10 + }, + { + "fid": 22, + "name": "latestVersionString", + "type": 11 + }, + { + "fid": 23, + "name": "version", + "type": 10 + }, + { + "fid": 24, + "name": "versionString", + "type": 11 + }, + { + "fid": 25, + "name": "applicationVersionRange", + "struct": "ApplicationVersionRange" + }, + { + "fid": 31, + "name": "owned", + "type": 2 + }, + { + "fid": 32, + "name": "grantedByDefault", + "type": 2 + }, + { + "fid": 41, + "name": "validFor", + "type": 8 + }, + { + "fid": 42, + "name": "validUntil", + "type": 10 + }, + { + "fid": 51, + "name": "onSale", + "type": 2 + }, + { + "fid": 52, + "name": "salesFlag", + "set": 11 + }, + { + "fid": 53, + "name": "availableForPresent", + "type": 2 + }, + { + "fid": 54, + "name": "availableForMyself", + "type": 2 + }, + { + "fid": 61, + "name": "priceTier", + "type": 8 + }, + { + "fid": 62, + "name": "price", + "struct": "Price" + }, + { + "fid": 63, + "name": "priceInLineCoin", + "type": 11 + }, + { + "fid": 64, + "name": "localizedPrice", + "struct": "Price" + }, + { + "fid": 91, + "name": "images" + }, + { + "fid": 92, + "name": "attributes", + "map": 11 + }, + { + "fid": 93, + "name": "authorId", + "type": 11 + }, + { + "fid": 94, + "name": "stickerResourceType", + "struct": "StickerResourceType" + }, + { + "fid": 95, + "name": "productProperty", + "struct": "ProductProperty" + }, + { + "fid": 96, + "name": "productSalesState", + "struct": "ProductSalesState" + }, + { + "fid": 97, + "name": "installedTime", + "type": 10 + }, + { + "fid": 101, + "name": "wishProperty", + "struct": "ProductWishProperty" + }, + { + "fid": 102, + "name": "subscriptionProperty", + "struct": "ProductSubscriptionProperty" + }, + { + "fid": 103, + "name": "productPromotionProperty", + "struct": "ProductPromotionProperty" + }, + { + "fid": 104, + "name": "availableInCountry", + "type": 2 + }, + { + "fid": 105, + "name": "editorsPickBanners", + "list": "EditorsPickBannerForClient" + }, + { + "fid": 106, + "name": "ableToBeGivenAsPresent", + "type": 2 + }, + { + "fid": 107, + "name": "madeWithStickerMaker", + "type": 2 + }, + { + "fid": 108, + "name": "customDownloadButtonLabel", + "type": 11 + } + ], + "ApplicationVersionRange": [ + { + "fid": 1, + "name": "lowerBound", + "type": 11 + }, + { + "fid": 2, + "name": "lowerBoundInclusive", + "type": 2 + }, + { + "fid": 3, + "name": "upperBound", + "type": 11 + }, + { + "fid": 4, + "name": "upperBoundInclusive", + "type": 2 + } + ], + "EditorsPickBannerForClient": [ + { + "fid": 1, + "name": "id", + "type": 10 + }, + { + "fid": 2, + "name": "endPageBannerImageUrl", + "type": 11 + }, + { + "fid": 3, + "name": "defaulteditorsPickShowcaseType", + "struct": "EditorsPickShowcaseType" + }, + { + "fid": 4, + "name": "showNewBadge", + "type": 2 + }, + { + "fid": 5, + "name": "name", + "type": 11 + }, + { + "fid": 6, + "name": "description", + "type": 11 + } + ], + "Price": [ + { + "fid": 1, + "name": "currency", + "type": 11 + }, + { + "fid": 2, + "name": "amount", + "type": 11 + }, + { + "fid": 3, + "name": "priceString", + "type": 11 + } + ], + "ProductProperty": [ + { + "fid": 1, + "name": "stickerProperty", + "struct": "StickerProperty" + }, + { + "fid": 2, + "name": "themeProperty", + "struct": "ThemeProperty" + }, + { + "fid": 3, + "name": "sticonProperty", + "struct": "SticonProperty" + } + ], + "StickerProperty": [ + { + "fid": 1, + "name": "hasAnimation", + "type": 2 + }, + { + "fid": 2, + "name": "hasSound", + "type": 2 + }, + { + "fid": 3, + "name": "hasPopup", + "type": 2 + }, + { + "fid": 4, + "name": "stickerResourceType", + "struct": "StickerResourceType" + }, + { + "fid": 5, + "name": "stickerOptions", + "type": 11 + }, + { + "fid": 6, + "name": "compactStickerOptions", + "type": 8 + }, + { + "fid": 7, + "name": "stickerHash", + "type": 11 + }, + { + "fid": 9, + "name": "stickerIds", + "list": 11 + }, + { + "fid": 10, + "name": "nameTextProperty", + "struct": "ImageTextProperty" + }, + { + "fid": 11, + "name": "availableForPhotoEdit", + "type": 2 + }, + { + "fid": 12, + "name": "stickerDefaultTexts", + "map": 11 + }, + { + "fid": 13, + "name": "stickerSize", + "struct": "StickerSize" + }, + { + "fid": 14, + "name": "popupLayer", + "struct": "PopupLayer" + }, + { + "fid": 15, + "name": "cpdProduct", + "type": 2 + }, + { + "fid": 16, + "name": "availableForCombinationSticker", + "type": 2 + } + ], + "ThemeProperty": [ + { + "fid": 1, + "name": "thumbnail", + "type": 11 + }, + { + "fid": 2, + "name": "themeResourceType", + "struct": "ThemeResourceType" + } + ], + "SticonProperty": [ + { + "fid": 2, + "name": "sticonIds", + "list": 11 + }, + { + "fid": 3, + "name": "availableForPhotoEdit", + "type": 2 + }, + { + "fid": 4, + "name": "sticonResourceType", + "struct": "SticonResourceType" + }, + { + "fid": 5, + "name": "endPageMainImages" + } + ], + "ImageTextProperty": [ + { + "fid": 1, + "name": "status", + "struct": "ImageTextStatus" + }, + { + "fid": 2, + "name": "plaintext", + "type": 11 + }, + { + "fid": 3, + "name": "nameTextMaxCharacterCount", + "type": 8 + }, + { + "fid": 4, + "name": "encryptedText", + "type": 11 + } + ], + "LpPromotionProperty": [ + { + "fid": 1, + "name": "landingPageUrl", + "type": 11 + }, + { + "fid": 2, + "name": "label", + "type": 11 + }, + { + "fid": 3, + "name": "buttonLabel", + "type": 11 + } + ], + "ProductWishProperty": [ + { + "fid": 1, + "name": "totalCount", + "type": 10 + } + ], + "ProductSubscriptionProperty": [ + { + "fid": 1, + "name": "availableForSubscribe", + "type": 2 + }, + { + "fid": 2, + "name": "subscriptionAvailability", + "type": 8 + } + ], + "ProductPromotionProperty": [ + { + "fid": 1, + "name": "lpPromotionProperty", + "struct": "LpPromotionProperty" + } + ], + "PromotionDetail": [ + { + "fid": 1, + "name": "promotionBuddyInfo", + "struct": "PromotionBuddyInfo" + }, + { + "fid": 2, + "name": "promotionInstallInfo", + "struct": "PromotionInstallInfo" + }, + { + "fid": 3, + "name": "promotionMissionInfo", + "struct": "PromotionMissionInfo" + } + ], + "PromotionInfo": [ + { + "fid": 1, + "name": "promotionType", + "struct": "PromotionType" + }, + { + "fid": 2, + "name": "promotionDetail", + "struct": "PromotionDetail" + }, + { + "fid": 51, + "name": "buddyInfo", + "struct": "PromotionBuddyInfo" + } + ], + "PromotionBuddyInfo": [ + { + "fid": 1, + "name": "buddyMid", + "type": 11 + }, + { + "fid": 2, + "name": "promotionBuddyDetail", + "struct": "PromotionBuddyDetail" + }, + { + "fid": 3, + "name": "showBanner", + "type": 2 + } + ], + "PromotionInstallInfo": [ + { + "fid": 1, + "name": "downloadUrl", + "type": 11 + }, + { + "fid": 2, + "name": "customUrlSchema", + "type": 11 + } + ], + "PromotionMissionInfo": [ + { + "fid": 1, + "name": "promotionMissionType", + "struct": "PromotionMissionType" + }, + { + "fid": 2, + "name": "missionCompleted", + "type": 2 + }, + { + "fid": 3, + "name": "downloadUrl", + "type": 11 + }, + { + "fid": 4, + "name": "customUrlSchema", + "type": 11 + }, + { + "fid": 5, + "name": "oaMid", + "type": 11 + } + ], + "PromotionBuddyDetail": [ + { + "fid": 1, + "name": "searchId", + "type": 11 + }, + { + "fid": 2, + "name": "contactStatus", + "struct": "ContactStatus" + }, + { + "fid": 3, + "name": "name", + "type": 11 + }, + { + "fid": 4, + "name": "pictureUrl", + "type": 11 + }, + { + "fid": 5, + "name": "statusMessage", + "type": 11 + }, + { + "fid": 6, + "name": "brandType", + "struct": "BrandType" + } + ], + "PurchaseOrder": [ + { + "fid": 1, + "name": "shopId", + "type": 11 + }, + { + "fid": 2, + "name": "productId", + "type": 11 + }, + { + "fid": 5, + "name": "recipientMid", + "type": 11 + }, + { + "fid": 11, + "name": "price", + "struct": "Price" + }, + { + "fid": 12, + "name": "enableLinePointAutoExchange", + "type": 2 + }, + { + "fid": 21, + "name": "locale", + "struct": "Locale" + }, + { + "fid": 31, + "name": "presentAttributes", + "map": 11 + } + ], + "PurchaseOrderResponse": [ + { + "fid": 1, + "name": "orderId", + "type": 11 + }, + { + "fid": 11, + "name": "attributes", + "map": 11 + }, + { + "fid": 12, + "name": "billingConfirmUrl", + "type": 11 + } + ], + "PurchaseRecordList": [ + { + "fid": 1, + "name": "purchaseRecords", + "list": "PurchaseRecord" + }, + { + "fid": 2, + "name": "offset", + "type": 8 + }, + { + "fid": 3, + "name": "totalSize", + "type": 8 + } + ], + "PurchaseRecord": [ + { + "fid": 1, + "name": "productDetail", + "struct": "ProductDetail" + }, + { + "fid": 11, + "name": "purchasedTime", + "type": 10 + }, + { + "fid": 21, + "name": "giver", + "type": 11 + }, + { + "fid": 22, + "name": "recipient", + "type": 11 + }, + { + "fid": 31, + "name": "purchasedPrice", + "struct": "Price" + } + ], + "DetailedProductList": [ + { + "fid": 1, + "name": "productList", + "list": "ProductDetail" + }, + { + "fid": 2, + "name": "offset", + "type": 8 + }, + { + "fid": 3, + "name": "totalSize", + "type": 8 + } + ], + "CreateCombinationStickerResponse": [ + { + "fid": 1, + "name": "id", + "type": 11 + } + ], + "ProductAvailability": { + "0": "PURCHASE_ONLY", + "1": "PURCHASE_OR_SUBSCRIPTION", + "2": "SUBSCRIPTION_ONLY" + }, + "ProductSearchSummary": [ + { + "fid": 1, + "name": "id", + "type": 11 + }, + { + "fid": 2, + "name": "type", + "struct": "ProductType" + }, + { + "fid": 3, + "name": "name", + "type": 11 + }, + { + "fid": 4, + "name": "author", + "type": 11 + }, + { + "fid": 5, + "name": "promotionInfo", + "struct": "PromotionInfo" + }, + { + "fid": 6, + "name": "version", + "type": 10 + }, + { + "fid": 7, + "name": "newFlag", + "type": 2 + }, + { + "fid": 8, + "name": "priceTier", + "type": 8 + }, + { + "fid": 9, + "name": "priceInLineCoin", + "type": 11 + }, + { + "fid": 10, + "name": "property", + "struct": "ProductProperty" + }, + { + "fid": 11, + "name": "subType", + "struct": "SubType" + }, + { + "fid": 12, + "name": "onSale", + "type": 2 + }, + { + "fid": 13, + "name": "availableForPresent", + "type": 2 + }, + { + "fid": 14, + "name": "availableForPurchase", + "type": 2 + }, + { + "fid": 15, + "name": "validDays", + "type": 8 + }, + { + "fid": 16, + "name": "authorId", + "type": 11 + }, + { + "fid": 17, + "name": "bargainFlag", + "type": 2 + }, + { + "fid": 18, + "name": "copyright", + "type": 11 + }, + { + "fid": 19, + "name": "availability", + "struct": "ProductAvailability" + }, + { + "fid": 20, + "name": "interactionEventParameter", + "type": 11 + }, + { + "fid": 21, + "name": "editorsPickIds", + "set": 10 + } + ], + "DemographicGenderType": { + "0": "ALL", + "1": "MALE", + "2": "FEMALE" + }, + "DemographicAgeType": { + "0": "ALL", + "1": "AGE_0_19", + "2": "AGE_20_29", + "3": "AGE_30_39", + "4": "AGE_40_INF", + "5": "AGE_40_49", + "6": "AGE_50_INF" + }, + "ShowcaseType": { + "0": "POPULAR", + "1": "NEW_RELEASE", + "2": "EVENT", + "3": "RECOMMENDED", + "4": "POPULAR_WEEKLY", + "5": "POPULAR_MONTHLY", + "6": "POPULAR_RECENTLY_PUBLISHED", + "7": "BUDDY", + "8": "EXTRA_EVENT", + "9": "BROWSING_HISTORY", + "10": "POPULAR_TOTAL_SALES", + "11": "NEW_SUBSCRIPTION", + "12": "POPULAR_SUBSCRIPTION_30D", + "13": "CPD_STICKER", + "14": "POPULAR_WITH_FREE" + }, + "DemographicType": [ + { + "fid": 1, + "name": "demographicGenderType", + "struct": "DemographicGenderType" + }, + { + "fid": 2, + "name": "demographicAgeType", + "struct": "DemographicAgeType" + }, + { + "fid": 3, + "name": "defaultOrder", + "type": 2 + } + ], + "ShowcaseV3": [ + { + "fid": 1, + "name": "productList", + "list": "ProductSearchSummary" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "totalSize", + "type": 10 + }, + { + "fid": 4, + "name": "showcaseType", + "struct": "ShowcaseType" + }, + { + "fid": 5, + "name": "productType", + "struct": "ProductType" + }, + { + "fid": 6, + "name": "subType", + "struct": "SubType" + }, + { + "fid": 7, + "name": "demographicType", + "struct": "DemographicType" + } + ], + "StickerSummary": [ + { + "fid": 1, + "name": "stickerIdRanges", + "list": "StickerIdRange" + }, + { + "fid": 2, + "name": "suggestVersion", + "type": 10 + }, + { + "fid": 3, + "name": "stickerHash", + "type": 11 + }, + { + "fid": 4, + "name": "defaultDisplayOnKeyboard", + "type": 2 + }, + { + "fid": 5, + "name": "stickerResourceType", + "struct": "StickerResourceType" + }, + { + "fid": 6, + "name": "nameTextProperty", + "struct": "ImageTextProperty" + }, + { + "fid": 7, + "name": "availableForPhotoEdit", + "type": 2 + }, + { + "fid": 8, + "name": "popupLayer", + "struct": "PopupLayer" + }, + { + "fid": 9, + "name": "stickerSize", + "struct": "StickerSize" + }, + { + "fid": 10, + "name": "availableForCombinationSticker", + "type": 2 + } + ], + "ThemeSummary": [ + { + "fid": 1, + "name": "imagePath", + "type": 11 + }, + { + "fid": 2, + "name": "version", + "type": 10 + }, + { + "fid": 3, + "name": "versionString", + "type": 11 + } + ], + "SticonSummary": [ + { + "fid": 1, + "name": "suggestVersion", + "type": 10 + }, + { + "fid": 2, + "name": "availableForPhotoEdit", + "type": 2 + }, + { + "fid": 3, + "name": "sticonResourceType", + "struct": "SticonResourceType" + } + ], + "ProductTypeSummary": [ + { + "fid": 1, + "name": "stickerSummary", + "struct": "StickerSummary" + }, + { + "fid": 2, + "name": "themeSummary", + "struct": "ThemeSummary" + }, + { + "fid": 3, + "name": "sticonSummary", + "struct": "SticonSummary" + } + ], + "ProductSummary": [ + { + "fid": 1, + "name": "id", + "type": 11 + }, + { + "fid": 11, + "name": "name", + "type": 11 + }, + { + "fid": 21, + "name": "latestVersion", + "type": 10 + }, + { + "fid": 25, + "name": "applicationVersionRange", + "struct": "ApplicationVersionRange" + }, + { + "fid": 32, + "name": "grantedByDefault", + "type": 2 + }, + { + "fid": 92, + "name": "attributes", + "map": 11 + }, + { + "fid": 93, + "name": "productTypeSummary", + "struct": "ProductTypeSummary" + }, + { + "fid": 94, + "name": "validUntil", + "type": 10 + }, + { + "fid": 95, + "name": "validFor", + "type": 8 + }, + { + "fid": 96, + "name": "installedTime", + "type": 10 + }, + { + "fid": 97, + "name": "availability", + "struct": "ProductAvailability" + }, + { + "fid": 98, + "name": "authorId", + "type": 11 + }, + { + "fid": 99, + "name": "canAutoDownload", + "type": 2 + }, + { + "fid": 100, + "name": "promotionInfo", + "struct": "PromotionInfo" + } + ], + "ProductSummaryList": [ + { + "fid": 1, + "name": "productList", + "list": "ProductSummary" + }, + { + "fid": 2, + "name": "offset", + "type": 8 + }, + { + "fid": 3, + "name": "totalSize", + "type": 8 + } + ], + "ProductValidationScheme": [ + { + "fid": 10, + "name": "key", + "type": 11 + }, + { + "fid": 11, + "name": "offset", + "type": 10 + }, + { + "fid": 12, + "name": "size", + "type": 10 + } + ], + "ProductValidationResult": [ + { + "fid": 1, + "name": "validated", + "type": 2 + } + ], + "ShopUpdates": [ + { + "fid": 1, + "name": "shopId", + "type": 11 + }, + { + "fid": 11, + "name": "latestUpdateTime", + "type": 10 + } + ], + "SearchProductsV2Response": [ + { + "fid": 1, + "name": "results", + "list": "ProductSearchSummary" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "totalSize", + "type": 10 + } + ], + "EditorsPickBanner": [ + { + "fid": 1, + "name": "id", + "type": 10 + }, + { + "fid": 2, + "name": "imageUrl", + "type": 11 + }, + { + "fid": 3, + "name": "homeBannerImageUrl", + "type": 11 + }, + { + "fid": 4, + "name": "showcaseBannerImageUrl", + "type": 11 + }, + { + "fid": 5, + "name": "enableEditorsPickShowcaseTypes", + "list": "EditorsPickShowcaseType" + }, + { + "fid": 6, + "name": "defaulteditorsPickShowcaseType", + "struct": "EditorsPickShowcaseType" + }, + { + "fid": 7, + "name": "homeBannerV2ImageUrl", + "type": 11 + }, + { + "fid": 8, + "name": "name", + "type": 11 + }, + { + "fid": 9, + "name": "containsProducts", + "type": 2 + }, + { + "fid": 10, + "name": "displayPeriodBegin", + "type": 10 + }, + { + "fid": 11, + "name": "description", + "type": 11 + }, + { + "fid": 12, + "name": "showNewBadge", + "type": 2 + } + ], + "AuthorForShowcase": [ + { + "fid": 1, + "name": "authorId", + "type": 10 + }, + { + "fid": 2, + "name": "productList", + "list": "ProductSearchSummary" + }, + { + "fid": 3, + "name": "productTotalSize", + "type": 10 + } + ], + "ImageSearchSummary": [ + { + "fid": 1, + "name": "imageId", + "type": 11 + }, + { + "fid": 2, + "name": "product", + "struct": "ProductSearchSummary" + } + ], + "KeywordImageList": [ + { + "fid": 1, + "name": "tagId", + "type": 11 + }, + { + "fid": 2, + "name": "keyword", + "type": 11 + }, + { + "fid": 3, + "name": "imageList", + "list": "ImageSearchSummary" + } + ], + "URLItem": [ + { + "fid": 1, + "name": "title", + "type": 11 + }, + { + "fid": 2, + "name": "imageUrl", + "type": 11 + }, + { + "fid": 3, + "name": "url", + "type": 11 + } + ], + "EditorsPickContent": [ + { + "fid": 1, + "name": "urlItem", + "struct": "URLItem" + }, + { + "fid": 2, + "name": "productDetail", + "struct": "ProductDetail" + } + ], + "EditorsPickContentType": { + "1": "STICKER", + "2": "URL", + "3": "THEME", + "4": "EMOJI" + }, + "EditorsPick": [ + { + "fid": 1, + "name": "contentType", + "struct": "EditorsPickContentType" + }, + { + "fid": 2, + "name": "editorsPickContent", + "struct": "EditorsPickContent" + } + ], + "EditorsPickTab": [ + { + "fid": 1, + "name": "editorsPickId", + "type": 10 + }, + { + "fid": 2, + "name": "name", + "type": 11 + }, + { + "fid": 3, + "name": "showcaseType", + "struct": "ShowcaseType" + } + ], + "EditorsPickShowcase": [ + { + "fid": 1, + "name": "id", + "type": 10 + }, + { + "fid": 2, + "name": "name", + "type": 11 + }, + { + "fid": 3, + "name": "banner", + "struct": "EditorsPickBanner" + }, + { + "fid": 4, + "name": "editorsPicks", + "list": "EditorsPick" + }, + { + "fid": 5, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 6, + "name": "totalSize", + "type": 8 + }, + { + "fid": 7, + "name": "description", + "type": 11 + }, + { + "fid": 8, + "name": "type", + "struct": "EditorsPickShowcaseType" + }, + { + "fid": 9, + "name": "tabs", + "list": "EditorsPickTab" + } + ], + "TagType": { + "0": "UNKNOWN", + "1": "CHARACTER", + "2": "TASTE" + }, + "Tag": [ + { + "fid": 1, + "name": "id", + "type": 10 + }, + { + "fid": 11, + "name": "name", + "type": 11 + }, + { + "fid": 12, + "name": "tagType", + "struct": "TagType" + }, + { + "fid": 13, + "name": "productCount", + "type": 8 + }, + { + "fid": 14, + "name": "thumbnailUrl", + "type": 11 + } + ], + "CategoryProductList": [ + { + "fid": 1, + "name": "category", + "struct": "Category" + }, + { + "fid": 2, + "name": "productList", + "struct": "ProductList" + } + ], + "AggregatedHomeV2Response": [ + { + "fid": 1, + "name": "showcases", + "list": "ShowcaseV3" + }, + { + "fid": 2, + "name": "editorsPickBanners", + "list": "EditorsPickBanner" + }, + { + "fid": 3, + "name": "authorList", + "list": "AuthorForShowcase" + }, + { + "fid": 4, + "name": "keywordStickerList", + "list": "KeywordImageList" + }, + { + "fid": 5, + "name": "detailedEditorsPick", + "struct": "EditorsPickShowcase" + }, + { + "fid": 6, + "name": "detailedCategoryList", + "list": "CategoryProductList" + }, + { + "fid": 7, + "name": "categoryList", + "list": "Category" + }, + { + "fid": 8, + "name": "tagList", + "list": "Tag" + } + ], + "CategoryType": { + "1": "GENERAL_CATEGORY", + "2": "CREATORS_TAG" + }, + "AggregatedCategory": [ + { + "fid": 1, + "name": "id", + "type": 10 + }, + { + "fid": 2, + "name": "categoryType", + "struct": "CategoryType" + }, + { + "fid": 3, + "name": "name", + "type": 11 + }, + { + "fid": 4, + "name": "productCount", + "type": 8 + }, + { + "fid": 5, + "name": "thumbnailUrl", + "type": 11 + } + ], + "ListContentData": [ + { + "fid": 1, + "name": "showcase", + "struct": "ShowcaseV3" + }, + { + "fid": 2, + "name": "editorsPickBanners", + "list": "EditorsPickBanner" + }, + { + "fid": 3, + "name": "categories", + "list": "AggregatedCategory" + } + ], + "ListContent": [ + { + "fid": 1, + "name": "contentData", + "struct": "ListContentData" + }, + { + "fid": 2, + "name": "localizedTitle", + "type": 11 + }, + { + "fid": 3, + "name": "tsKey", + "type": 11 + }, + { + "fid": 4, + "name": "moreLinkFragment", + "type": 11 + } + ], + "AggregatedHomeNativeResponse": [ + { + "fid": 1, + "name": "listContents", + "list": "ListContent" + } + ], + "DynamicHomeNativeResponse": [ + { + "fid": 1, + "name": "listContents", + "list": "ListContent" + } + ], + "TagsProductList": [ + { + "fid": 1, + "name": "tasteTag", + "struct": "Tag" + }, + { + "fid": 2, + "name": "characterTag", + "struct": "Tag" + }, + { + "fid": 3, + "name": "products", + "list": "ProductSearchSummary" + } + ], + "AggregatedPremiumHomeResponse": [ + { + "fid": 1, + "name": "showcases", + "list": "ShowcaseV3" + }, + { + "fid": 2, + "name": "editorsPickBanners", + "list": "EditorsPickBanner" + }, + { + "fid": 3, + "name": "popularCreator", + "struct": "AuthorForShowcase" + }, + { + "fid": 4, + "name": "featuredCategory", + "struct": "TagsProductList" + }, + { + "fid": 5, + "name": "categoryList", + "list": "TagsProductList" + }, + { + "fid": 6, + "name": "browsingHistory", + "struct": "ShowcaseV3" + }, + { + "fid": 7, + "name": "subscriptionSlotHistory", + "struct": "ShowcaseV3" + } + ], + "AggregatedShowcaseV4": [ + { + "fid": 1, + "name": "showcases", + "list": "ShowcaseV3" + } + ], + "GetRecommendationResponse": [ + { + "fid": 1, + "name": "results", + "list": "ProductSearchSummary" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "totalSize", + "type": 10 + } + ], + "AuthorListResponse": [ + { + "fid": 1, + "name": "authorList", + "list": "AuthorForShowcase" + }, + { + "fid": 2, + "name": "totalSize", + "type": 10 + }, + { + "fid": 3, + "name": "continuationToken", + "type": 11 + } + ], + "ProductResourceType": [ + { + "fid": 1, + "name": "stickerResourceType", + "struct": "StickerResourceType" + }, + { + "fid": 2, + "name": "themeResourceType", + "struct": "ThemeResourceType" + }, + { + "fid": 3, + "name": "sticonResourceType", + "struct": "SticonResourceType" + } + ], + "LatestProductByAuthorItem": [ + { + "fid": 1, + "name": "productId", + "type": 11 + }, + { + "fid": 2, + "name": "displayName", + "type": 11 + }, + { + "fid": 3, + "name": "version", + "type": 10 + }, + { + "fid": 4, + "name": "newFlag", + "type": 2 + }, + { + "fid": 5, + "name": "productResourceType", + "struct": "ProductResourceType" + }, + { + "fid": 6, + "name": "popupLayer", + "struct": "PopupLayer" + } + ], + "LatestProductsByAuthorResponse": [ + { + "fid": 1, + "name": "authorId", + "type": 10 + }, + { + "fid": 2, + "name": "author", + "type": 11 + }, + { + "fid": 3, + "name": "items", + "list": "LatestProductByAuthorItem" + } + ], + "GetExperimentsResponse": [ + { + "fid": 1, + "name": "variables", + "map": 11 + } + ], + "ProductSummaryForAutoSuggest": [ + { + "fid": 1, + "name": "id", + "type": 11 + }, + { + "fid": 2, + "name": "version", + "type": 10 + }, + { + "fid": 3, + "name": "name", + "type": 11 + }, + { + "fid": 4, + "name": "stickerResourceType", + "struct": "StickerResourceType" + }, + { + "fid": 5, + "name": "suggestVersion", + "type": 10 + }, + { + "fid": 6, + "name": "popupLayer", + "struct": "PopupLayer" + }, + { + "fid": 7, + "name": "type", + "struct": "ProductType" + }, + { + "fid": 8, + "name": "resourceType", + "struct": "ProductResourceType" + }, + { + "fid": 9, + "name": "stickerSize", + "struct": "StickerSize" + } + ], + "AutoSuggestionShowcaseResponse": [ + { + "fid": 1, + "name": "productList", + "list": "ProductSummaryForAutoSuggest" + }, + { + "fid": 2, + "name": "totalSize", + "type": 10 + } + ], + "SuggestResource": [ + { + "fid": 1, + "name": "dataUrl", + "type": 11 + }, + { + "fid": 2, + "name": "version", + "type": 10 + }, + { + "fid": 3, + "name": "updatedTime", + "type": 10 + } + ], + "SuggestDictionarySetting": [ + { + "fid": 1, + "name": "language", + "type": 11 + }, + { + "fid": 2, + "name": "name", + "type": 11 + }, + { + "fid": 3, + "name": "preload", + "type": 2 + }, + { + "fid": 4, + "name": "suggestResource", + "struct": "SuggestResource" + }, + { + "fid": 5, + "name": "patch", + "map": 11 + }, + { + "fid": 6, + "name": "suggestTagResource", + "struct": "SuggestResource" + }, + { + "fid": 7, + "name": "tagPatch", + "map": 11 + }, + { + "fid": 8, + "name": "corpusResource", + "struct": "SuggestResource" + } + ], + "GetSuggestDictionarySettingResponse": [ + { + "fid": 1, + "name": "results", + "list": "SuggestDictionarySetting" + } + ], + "GetRecommendOaResponse": [ + { + "fid": 1, + "name": "buddyMids", + "list": 11 + } + ], + "GetSuggestResourcesResponse": [ + { + "fid": 1, + "name": "suggestResources", + "map": "SuggestResource" + } + ], + "GetSuggestResourcesV2Response": [ + { + "fid": 1, + "name": "suggestResources", + "map": "SuggestResource" + } + ], + "GetTagClusterFileResponse": [ + { + "fid": 1, + "name": "path", + "type": 11 + }, + { + "fid": 2, + "name": "updatedTimeMillis", + "type": 10 + } + ], + "GetResourceFileReponse": [ + { + "fid": 1, + "name": "tagClusterFileResponse", + "struct": "GetTagClusterFileResponse" + } + ], + "BrowsingHistory": [ + { + "fid": 1, + "name": "productSearchSummary", + "struct": "ProductSearchSummary" + }, + { + "fid": 2, + "name": "browsingTime", + "type": 10 + } + ], + "GetBrowsingHistoryResponse": [ + { + "fid": 1, + "name": "browsingHistory", + "list": "BrowsingHistory" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "totalSize", + "type": 8 + } + ], + "DeleteAllBrowsingHistoryResponse": [], + "SticonProductMapping": [ + { + "fid": 1, + "name": "productId", + "type": 11 + }, + { + "fid": 2, + "name": "oldProductId", + "type": 11 + }, + { + "fid": 3, + "name": "newToOldSticonIdMapping", + "map": 11 + }, + { + "fid": 4, + "name": "oldPackageVersion", + "type": 8 + }, + { + "fid": 5, + "name": "oldMetaVersion", + "type": 8 + }, + { + "fid": 6, + "name": "stickerPackageId", + "type": 10 + }, + { + "fid": 7, + "name": "stickerPackageVersion", + "type": 8 + }, + { + "fid": 8, + "name": "stickerIds", + "map": 11 + } + ], + "GetOldSticonMappingResponse": [ + { + "fid": 1, + "name": "sticonProductMappings", + "list": "SticonProductMapping" + }, + { + "fid": 2, + "name": "updatedTimeMillis", + "type": 10 + }, + { + "fid": 3, + "name": "updated", + "type": 2 + } + ], + "SimilarImageShowcase": [ + { + "fid": 1, + "name": "chosenImage", + "struct": "ImageSearchSummary" + }, + { + "fid": 2, + "name": "similarImageList", + "list": "ImageSearchSummary" + }, + { + "fid": 3, + "name": "continuationToken", + "type": 11 + } + ], + "CustomizeImageTextResponse": [ + { + "fid": 1, + "name": "nameTextProperty", + "struct": "ImageTextProperty" + } + ], + "SubscriptionPlanAvailability": { + "0": "AVAILABLE", + "1": "DIFFERENT_STORE", + "2": "NOT_STUDENT", + "3": "ALREADY_PURCHASED" + }, + "SubscriptionServiceType": { + "1": "STICKERS_PREMIUM" + }, + "SubscriptionPlanTarget": { + "1": "GENERAL", + "2": "STUDENT" + }, + "SubscriptionPlanType": { + "1": "MONTHLY", + "2": "YEARLY" + }, + "SubscriptionPlanTier": { + "1": "BASIC", + "2": "DELUXE" + }, + "SubscriptionSlotModificationResult": { + "0": "OK", + "1": "UNKNOWN", + "2": "NO_SUBSCRIPTION", + "3": "EXISTS", + "4": "NOT_FOUND", + "5": "EXCEEDS_LIMIT", + "6": "NOT_AVAILABLE" + }, + "SubscriptionBillingResult": { + "0": "OK", + "1": "UNKNOWN", + "2": "NOT_SUPPORTED", + "3": "NO_SUBSCRIPTION", + "4": "SUBSCRIPTION_EXISTS", + "5": "NOT_AVAILABLE", + "6": "CONFLICT", + "7": "OUTDATED_VERSION", + "8": "NO_STUDENT_INFORMATION", + "9": "ACCOUNT_HOLD", + "10": "RETRY_STATE" + }, + "SubscriptionCampaignType": { + "1": "MISSION", + "2": "FREE_TRIAL" + }, + "SubscriptionSortType": { + "1": "DATE_ASC", + "2": "DATE_DESC" + }, + "StartBundleSubscriptionResult": { + "0": "OK", + "1": "UNKNOWN", + "2": "INVALID_PARAMETER", + "3": "NOT_ELIGIBLE", + "4": "CONFLICT", + "5": "ACCOUNT_HOLD", + "6": "RETRY_STATE" + }, + "StopBundleSubscriptionResult": { + "0": "OK", + "1": "INVALID_PARAMETER", + "2": "NOT_FOUND", + "3": "NOT_SUPPORTED", + "4": "CONFLICT", + "5": "NOT_ELIGIBLE" + }, + "GetSubscriptionCouponCodeResult": { + "0": "OK", + "1": "UNKNOWN", + "2": "NOT_SUPPORTED", + "3": "NOT_AVAILABLE", + "4": "NOT_APPLICABLE" + }, + "GetFriendStatusWithPremiumOaResult": { + "0": "FRIEND", + "1": "BLOCKED", + "2": "NOT_FRIEND", + "3": "ERROR" + }, + "SubscriptionCouponCampaignStatus": { + "0": "OK", + "1": "UNKNOWN", + "2": "NOT_SUPPORTED", + "3": "NOT_ACTIVE", + "4": "NOT_APPLICABLE" + }, + "AcceptSubscriptionAgreementResult": { + "0": "OK", + "1": "UNKNOWN", + "2": "NOT_SUPPORTED", + "3": "NO_SUBSCRIPTION" + }, + "StoreCode": { + "0": "GOOGLE", + "1": "APPLE", + "2": "WEBSTORE", + "3": "LINEMO", + "4": "LINE_MUSIC", + "5": "LYP", + "6": "TW_CHT", + "7": "FREEMIUM" + }, + "SubscriptionPlan": [ + { + "fid": 1, + "name": "billingItemId", + "type": 11 + }, + { + "fid": 2, + "name": "subscriptionService", + "struct": "SubscriptionServiceType" + }, + { + "fid": 3, + "name": "target", + "struct": "SubscriptionPlanTarget" + }, + { + "fid": 4, + "name": "type", + "struct": "SubscriptionPlanType" + }, + { + "fid": 5, + "name": "period", + "type": 11 + }, + { + "fid": 6, + "name": "freeTrial", + "type": 11 + }, + { + "fid": 7, + "name": "localizedName", + "type": 11 + }, + { + "fid": 8, + "name": "price", + "struct": "Price" + }, + { + "fid": 9, + "name": "availability", + "struct": "SubscriptionPlanAvailability" + }, + { + "fid": 10, + "name": "cpId", + "type": 11 + }, + { + "fid": 11, + "name": "nameKey", + "type": 11 + }, + { + "fid": 12, + "name": "tier", + "struct": "SubscriptionPlanTier" + } + ], + "GetSubscriptionPlansResponse": [ + { + "fid": 1, + "name": "plans", + "list": "SubscriptionPlan" + } + ], + "SubscriptionStatus": [ + { + "fid": 1, + "name": "billingItemId", + "type": 11 + }, + { + "fid": 2, + "name": "subscriptionService", + "struct": "SubscriptionServiceType" + }, + { + "fid": 3, + "name": "period", + "type": 11 + }, + { + "fid": 4, + "name": "localizedName", + "type": 11 + }, + { + "fid": 5, + "name": "freeTrial", + "type": 2 + }, + { + "fid": 6, + "name": "expired", + "type": 2 + }, + { + "fid": 7, + "name": "validUntil", + "type": 10 + }, + { + "fid": 8, + "name": "maxSlotCount", + "type": 8 + }, + { + "fid": 9, + "name": "target", + "struct": "SubscriptionPlanTarget" + }, + { + "fid": 10, + "name": "type", + "struct": "SubscriptionPlanType" + }, + { + "fid": 11, + "name": "storeCode", + "struct": "StoreCode" + }, + { + "fid": 12, + "name": "nameKey", + "type": 11 + }, + { + "fid": 13, + "name": "tier", + "struct": "SubscriptionPlanTier" + }, + { + "fid": 14, + "name": "accountHold", + "type": 2 + }, + { + "fid": 15, + "name": "maxSlotCountsByProductType", + "map": 8 + }, + { + "fid": 16, + "name": "agreementAccepted", + "type": 2 + } + ], + "GetSubscriptionStatusResponse": [ + { + "fid": 1, + "name": "subscriptions", + "map": "SubscriptionStatus" + }, + { + "fid": 2, + "name": "hasValidStudentInformation", + "type": 2 + }, + { + "fid": 3, + "name": "otherOwnedSubscriptions" + } + ], + "GetProductSummariesInSubscriptionSlotsResponse": [ + { + "fid": 1, + "name": "products", + "list": "ProductSummary" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "totalSize", + "type": 10 + }, + { + "fid": 4, + "name": "maxSlotCount", + "type": 8 + } + ], + "AddProductToSubscriptionSlotResponse": [ + { + "fid": 1, + "name": "result", + "struct": "SubscriptionSlotModificationResult" + } + ], + "AddThemeToSubscriptionSlotResponse": [ + { + "fid": 1, + "name": "result", + "struct": "SubscriptionSlotModificationResult" + } + ], + "RemoveProductFromSubscriptionSlotResponse": [ + { + "fid": 1, + "name": "result", + "struct": "SubscriptionSlotModificationResult" + } + ], + "PurchaseSubscriptionResponse": [ + { + "fid": 1, + "name": "result", + "struct": "SubscriptionBillingResult" + }, + { + "fid": 2, + "name": "orderId", + "type": 11 + }, + { + "fid": 3, + "name": "confirmUrl", + "type": 11 + } + ], + "ChangeSubscriptionResponse": [ + { + "fid": 1, + "name": "result", + "struct": "SubscriptionBillingResult" + }, + { + "fid": 2, + "name": "orderId", + "type": 11 + }, + { + "fid": 3, + "name": "confirmUrl", + "type": 11 + } + ], + "RestoreSubscriptionResponse": [ + { + "fid": 1, + "name": "result", + "struct": "SubscriptionBillingResult" + }, + { + "fid": 2, + "name": "orderId", + "type": 11 + }, + { + "fid": 3, + "name": "confirmUrl", + "type": 11 + } + ], + "GetProductsByTagsV2Response": [ + { + "fid": 1, + "name": "results", + "list": "ProductSearchSummary" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "totalSize", + "type": 10 + } + ], + "StudentInformation": [ + { + "fid": 1, + "name": "schoolName", + "type": 11 + }, + { + "fid": 2, + "name": "graduationDate", + "type": 11 + } + ], + "GetStudentInformationResponse": [ + { + "fid": 1, + "name": "studentInformation", + "struct": "StudentInformation" + }, + { + "fid": 2, + "name": "isValid", + "type": 2 + } + ], + "SaveStudentInformationResponse": [], + "PurchasedSubscription": [ + { + "fid": 1, + "name": "orderId", + "type": 11 + }, + { + "fid": 2, + "name": "subscriptionService", + "struct": "SubscriptionServiceType" + }, + { + "fid": 3, + "name": "billingItemId", + "type": 11 + }, + { + "fid": 4, + "name": "type", + "struct": "SubscriptionPlanType" + }, + { + "fid": 5, + "name": "localizedName", + "type": 11 + }, + { + "fid": 6, + "name": "purchasedTime", + "type": 10 + }, + { + "fid": 7, + "name": "validUntil", + "type": 10 + }, + { + "fid": 8, + "name": "price", + "struct": "Price" + }, + { + "fid": 9, + "name": "nameKey", + "type": 11 + }, + { + "fid": 10, + "name": "tier", + "struct": "SubscriptionPlanTier" + } + ], + "GetPurchasedSubscriptionsResponse": [ + { + "fid": 1, + "name": "subscriptions", + "list": "PurchasedSubscription" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "totalSize", + "type": 10 + } + ], + "FindRestorablePlanResponse": [ + { + "fid": 1, + "name": "result", + "struct": "SubscriptionBillingResult" + }, + { + "fid": 2, + "name": "billingItemId", + "type": 11 + }, + { + "fid": 3, + "name": "storeOrderId", + "type": 11 + }, + { + "fid": 4, + "name": "originalStoreOrderId", + "type": 11 + }, + { + "fid": 5, + "name": "orderId", + "type": 11 + }, + { + "fid": 6, + "name": "mid", + "type": 11 + } + ], + "SubscriptionMissionCampaign": [ + { + "fid": 1, + "name": "productType", + "struct": "ProductType" + }, + { + "fid": 2, + "name": "productId", + "type": 11 + } + ], + "SubscriptionCampaignPayload": [ + { + "fid": 1, + "name": "mission", + "struct": "SubscriptionMissionCampaign" + } + ], + "SubscriptionCampaign": [ + { + "fid": 1, + "name": "campaignId", + "type": 11 + }, + { + "fid": 2, + "name": "fromInclusive", + "type": 10 + }, + { + "fid": 3, + "name": "toExclusive", + "type": 10 + }, + { + "fid": 4, + "name": "type", + "struct": "SubscriptionCampaignType" + }, + { + "fid": 5, + "name": "payload", + "struct": "SubscriptionCampaignPayload" + } + ], + "GetSubscriptionCampaignsResponse": [ + { + "fid": 1, + "name": "campaigns", + "list": "SubscriptionCampaign" + } + ], + "GetSubscriptionRecommendationsResponse": [ + { + "fid": 1, + "name": "products", + "list": "ProductSearchSummary" + } + ], + "InteractionEventResponse": [ + { + "fid": 1, + "name": "responseStatus", + "type": 8 + } + ], + "LibraExperiment": [ + { + "fid": 1, + "name": "experimentId", + "type": 11 + }, + { + "fid": 2, + "name": "groupId", + "type": 11 + } + ], + "GetExperimentsV2Response": [ + { + "fid": 1, + "name": "experiments", + "map": "LibraExperiment" + } + ], + "BirthdayGiftAssociationVerifyTokenStatus": { + "0": "VALID", + "1": "INVALID" + }, + "BirthdayGiftAssociationVerifyResponse": [ + { + "fid": 1, + "name": "tokenStatus", + "struct": "BirthdayGiftAssociationVerifyTokenStatus" + }, + { + "fid": 2, + "name": "recipientUserMid", + "type": 11 + } + ], + "SubscriptionSlotHistory": [ + { + "fid": 1, + "name": "product", + "struct": "ProductSearchSummary" + }, + { + "fid": 2, + "name": "addedTime", + "type": 10 + }, + { + "fid": 3, + "name": "removedTime", + "type": 10 + } + ], + "GetSubscriptionSlotHistoryResponse": [ + { + "fid": 1, + "name": "history", + "list": "SubscriptionSlotHistory" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "totalSize", + "type": 10 + } + ], + "PopupDisplaySettings": [ + { + "fid": 1, + "name": "pages", + "set": 8 + }, + { + "fid": 2, + "name": "editorsPickIds", + "set": 11 + } + ], + "PopupPage": [ + { + "fid": 1, + "name": "imageUrl", + "type": 11 + }, + { + "fid": 2, + "name": "title", + "type": 11 + }, + { + "fid": 3, + "name": "body", + "type": 11 + } + ], + "PopupActionButton": [ + { + "fid": 1, + "name": "label", + "type": 11 + }, + { + "fid": 2, + "name": "actionUrl", + "type": 11 + }, + { + "fid": 3, + "name": "textColorCode", + "type": 11 + }, + { + "fid": 4, + "name": "backgroundColorCode", + "type": 11 + } + ], + "PopupDismissButton": [ + { + "fid": 1, + "name": "label", + "type": 11 + }, + { + "fid": 2, + "name": "textColorCode", + "type": 11 + }, + { + "fid": 3, + "name": "backgroundColorCode", + "type": 11 + } + ], + "PopupContent": [ + { + "fid": 1, + "name": "pages", + "list": "PopupPage" + }, + { + "fid": 2, + "name": "actionButton", + "struct": "PopupActionButton" + }, + { + "fid": 3, + "name": "dismissButton", + "struct": "PopupDismissButton" + } + ], + "PopupDesignTemplate": { + "0": "FIXED" + }, + "PopupDisplayCount": { + "0": "ONCE" + }, + "PopupVisualType": { + "0": "BASIC", + "1": "FULLSCREEN" + }, + "ShopPopup": [ + { + "fid": 1, + "name": "popupId", + "type": 11 + }, + { + "fid": 2, + "name": "displaySettings", + "struct": "PopupDisplaySettings" + }, + { + "fid": 3, + "name": "displayCount", + "struct": "PopupDisplayCount" + }, + { + "fid": 4, + "name": "content", + "struct": "PopupContent" + }, + { + "fid": 5, + "name": "displayPriority", + "type": 8 + }, + { + "fid": 6, + "name": "visualType", + "struct": "PopupVisualType" + }, + { + "fid": 7, + "name": "displayIntervalInDays", + "type": 8 + } + ], + "GetPopupsResponse": [ + { + "fid": 1, + "name": "popups", + "list": "ShopPopup" + } + ], + "GetSubscriptionSlotStatusResponse": [ + { + "fid": 1, + "name": "productIdsInSlots", + "set": 11 + }, + { + "fid": 2, + "name": "usedSlotCount", + "type": 8 + }, + { + "fid": 3, + "name": "maxSlotCount", + "type": 8 + } + ], + "GetProductKeyboardListResponse": [ + { + "fid": 1, + "name": "productType", + "struct": "ProductType" + }, + { + "fid": 2, + "name": "keyboardProductIds", + "list": 11 + } + ], + "GetMusicSubscriptionStatusResponse": [ + { + "fid": 1, + "name": "validUntil", + "type": 10 + }, + { + "fid": 2, + "name": "expired", + "type": 2 + }, + { + "fid": 3, + "name": "isStickersPremiumEnabled", + "type": 2 + } + ], + "StartBundleSubscriptionResponse": [ + { + "fid": 1, + "name": "result", + "struct": "StartBundleSubscriptionResult" + } + ], + "StopBundleSubscriptionResponse": [ + { + "fid": 1, + "name": "result", + "struct": "StopBundleSubscriptionResult" + } + ], + "GetSubscriptionCouponCodeResponse": [ + { + "fid": 1, + "name": "result", + "struct": "GetSubscriptionCouponCodeResult" + }, + { + "fid": 2, + "name": "couponCode", + "type": 11 + } + ], + "GetSubscriptionCouponCampaignResponse": [ + { + "fid": 1, + "name": "status", + "struct": "SubscriptionCouponCampaignStatus" + } + ], + "PopupModel": [ + { + "fid": 1, + "name": "popupId", + "type": 11 + }, + { + "fid": 2, + "name": "active", + "type": 2 + } + ], + "GetPopupDisplayStatusResponse": [ + { + "fid": 1, + "name": "popups", + "map": "PopupModel" + } + ], + "GetFilteredProductsResponse": [ + { + "fid": 1, + "name": "results", + "list": "ProductSearchSummary" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "totalSize", + "type": 10 + } + ], + "GetProductLatestVersionForUserResponse": [ + { + "fid": 1, + "name": "latestVersion", + "type": 10 + }, + { + "fid": 2, + "name": "latestVersionString", + "type": 11 + } + ], + "GetSubscriptionAgreementStatusResponse": [ + { + "fid": 1, + "name": "accepted", + "type": 2 + } + ], + "AcceptSubscriptionAgreementResponse": [ + { + "fid": 1, + "name": "result", + "struct": "AcceptSubscriptionAgreementResult" + } + ], + "ShouldShowWelcomeStickerBannerResponse": [ + { + "fid": 1, + "name": "shouldShowBanner", + "type": 2 + } + ], + "StickerDisplayData": [ + { + "fid": 1, + "name": "stickerHash", + "type": 11 + }, + { + "fid": 2, + "name": "stickerResourceType", + "struct": "StickerResourceType" + }, + { + "fid": 3, + "name": "nameTextProperty", + "struct": "ImageTextProperty" + }, + { + "fid": 4, + "name": "popupLayer", + "struct": "PopupLayer" + }, + { + "fid": 5, + "name": "stickerSize", + "struct": "StickerSize" + }, + { + "fid": 6, + "name": "productAvailability", + "struct": "ProductAvailability" + }, + { + "fid": 7, + "name": "height", + "type": 8 + }, + { + "fid": 8, + "name": "width", + "type": 8 + }, + { + "fid": 9, + "name": "version", + "type": 10 + }, + { + "fid": 10, + "name": "availableForCombinationSticker", + "type": 2 + } + ], + "DisplayData": [ + { + "fid": 1, + "name": "stickerSummary", + "struct": "StickerDisplayData" + } + ], + "CollectionItem": [ + { + "fid": 1, + "name": "itemId", + "type": 11 + }, + { + "fid": 2, + "name": "productId", + "type": 11 + }, + { + "fid": 3, + "name": "displayData", + "struct": "DisplayData" + }, + { + "fid": 4, + "name": "sortId", + "type": 8 + } + ], + "Collection": [ + { + "fid": 1, + "name": "collectionId", + "type": 11 + }, + { + "fid": 2, + "name": "items", + "list": "CollectionItem" + }, + { + "fid": 3, + "name": "productType", + "struct": "ProductType" + }, + { + "fid": 4, + "name": "createdTimeMillis", + "type": 10 + }, + { + "fid": 5, + "name": "updatedTimeMillis", + "type": 10 + } + ], + "GetUserCollectionsResponse": [ + { + "fid": 1, + "name": "collections", + "list": "Collection" + }, + { + "fid": 2, + "name": "updated", + "type": 2 + } + ], + "CreateCollectionForUserResponse": [ + { + "fid": 1, + "name": "collection", + "struct": "Collection" + } + ], + "AddItemToCollectionResponse": [], + "RemoveItemFromCollectionResponse": [], + "IsProductForCollectionsResponse": [ + { + "fid": 1, + "name": "isAvailable", + "type": 2 + } + ] +} \ No newline at end of file diff --git a/server/write_deno.js b/server/write_deno.js index 1d9ffbd..f2c5396 100644 --- a/server/write_deno.js +++ b/server/write_deno.js @@ -1,192 +1,141 @@ -import * as thrift from "npm:thrift@0.19.0"; -import { ttypes } from "./line_types_deno.js"; +import * as thrift from "npm:thrift@0.20.0"; import { Buffer } from "node:buffer"; -var Thrift = thrift.Thrift; - -export default function write(data) { - let type, b, writedBinary; - if (data.type == 0 || data.type == 1) { - if (data.type == 0) { - type = "Response"; - } else if (data.type == 1) { - type = "Request"; - } - let Ltype = data.name; - - Ltype = Ltype.substr(0, 1).toUpperCase() + Ltype.substr(1) + type; - //data = data.slice(len + r) - const Transport = thrift.TBufferedTransport; - const Protocol = thrift.TCompactProtocol; - var myBuf = new Buffer([]); - var buftra = new Transport(myBuf, function (outBuf) { - myBuf = Buffer.concat([myBuf, outBuf]); - }); - var myprot = new Protocol(buftra); - var tdata = new ttypes[Ltype](data.value); - - tdata.write(myprot); - myprot.flush(); - buftra.flush(); - myBuf = Buffer.concat([ - new Uint8Array([0x82, 0x21, 1, data.name.length]), - Buffer.from(data.name), - new Uint8Array([0x1c]), - myBuf, - new Uint8Array([0]), - ]); - writedBinary = new Uint8Array([...myBuf]); - } else { - if (data.type == 3) { - type = "CHRLINE_REQ"; - const Transport = thrift.TBufferedTransport; - const Protocol = thrift.TCompactProtocol; - var myBuf = new Buffer([]); - var buftra = new Transport(myBuf, function (outBuf) { - myBuf = Buffer.concat([myBuf, outBuf]); - }); - var myprot = new Protocol(buftra); - XwriteX(myprot, data.value); - myprot.flush(); - buftra.flush(); - myBuf = Buffer.concat([ - new Uint8Array([0x82, 0x21, 1, data.name.length]), - Buffer.from(data.name), - new Uint8Array([0x1c]), - myBuf, - new Uint8Array([0]), - ]); - writedBinary = new Uint8Array([...myBuf]); - } else { - if (data.type == 5) { - type = "RAW_REQ"; - let data; - if (data.name == "b64") { - data = new Uint8Array([...atob(data.value)].map((s) => s.charCodeAt(0))); - } else { - data = new TextEncoder().encode(data.value); - } - writedBinary = data; - } - } - } - - try { - //Deno.writeFile("./request.bin",writedBinary) - } catch (error) { - } - return writedBinary; +const Thrift = thrift.Thrift; + +export default function write(value, name, Protocol) { + const Transport = thrift.TBufferedTransport; + let myBuf = Buffer.from([]); + const buftra = new Transport(myBuf, function (outBuf) { + myBuf = Buffer.concat([myBuf, outBuf]); + }); + const myprot = new Protocol(buftra); + writeStruct(myprot, value); + myprot.flush(); + buftra.flush(); + if (myBuf.length === 1 && myBuf[0] === 0) { + myBuf = []; + } + const writedBinary = new Uint8Array([ + ...Protocol.genHeader(name), + ...myBuf, + 0, + ]); + return writedBinary; } // Thrift encoded buffer is ready to use, save or transport -function XwriteX(output, inCHRLINE = []) { - output.writeStructBegin(""); +function writeStruct(output, clValue = []) { + output.writeStructBegin(""); - inCHRLINE.forEach((e) => { - POWERRRR(output, e[0], e[1], e[2]); - }); + clValue.forEach((e) => { + writeValue(output, e[0], e[1], e[2]); + }); - output.writeFieldStop(); - output.writeStructEnd(); - return; + output.writeFieldStop(); + output.writeStructEnd(); + return; } -function POWERRRR(output, ftype, fid, val) { - switch (ftype) { - case Thrift.Type.STRING: - output.writeFieldBegin("", Thrift.Type.STRING, fid); - output.writeString(val); - output.writeFieldEnd(); - break; - - case Thrift.Type.DOUBLE: - output.writeFieldBegin("", Thrift.Type.DOUBLE, fid); - output.writeDouble(val); - output.writeFieldEnd(); - break; - - case Thrift.Type.I64: - output.writeFieldBegin("", Thrift.Type.I64, fid); - output.writeI64(val); - output.writeFieldEnd(); - break; - - case Thrift.Type.I32: - output.writeFieldBegin("", Thrift.Type.I32, fid); - output.writeI32(val); - output.writeFieldEnd(); - break; - - case Thrift.Type.BOOL: - output.writeFieldBegin("", Thrift.Type.BOOL, fid); - output.writeBool(val); - output.writeFieldEnd(); - break; - - case Thrift.Type.STRUCT: - output.writeFieldBegin("", Thrift.Type.STRUCT, fid); - XwriteX(output, val); - output.writeFieldEnd(); - break; - - case Thrift.Type.MAP: - output.writeFieldBegin("", Thrift.Type.MAP, fid); - output.writeMapBegin(val[0], val[1], Thrift.objectLength(val[2])); - for (var kiter85 in val[2]) { - if (val[2].hasOwnProperty(kiter85)) { - var viter86 = val[2][kiter85]; - POWER(output, val[0], kiter85); - POWER(output, val[1], viter86); - } - } - output.writeMapEnd(); - output.writeFieldEnd(); - break; - - case Thrift.Type.LIST: - output.writeFieldBegin("", Thrift.Type.LIST, fit); - output.writeListBegin(val[0], val[1].length); - for (var iter483 in val[1]) { - if (val[1].hasOwnProperty(iter483)) { - iter483 = val[1][iter483]; - POWER(output, val[0], iter483); - } - } - output.writeListEnd(); - output.writeFieldEnd(); - break; - default: - console.log(fid, ftype, val, "unknown"); - break; - } +function writeValue(output, ftype, fid, val) { + if (val === undefined || val === null) { + return; + } + switch (ftype) { + case Thrift.Type.STRING: + output.writeFieldBegin("", Thrift.Type.STRING, fid); + output.writeString(val); + output.writeFieldEnd(); + break; + + case Thrift.Type.DOUBLE: + output.writeFieldBegin("", Thrift.Type.DOUBLE, fid); + output.writeDouble(val); + output.writeFieldEnd(); + break; + + case Thrift.Type.I64: + output.writeFieldBegin("", Thrift.Type.I64, fid); + output.writeI64(val); + output.writeFieldEnd(); + break; + + case Thrift.Type.I32: + output.writeFieldBegin("", Thrift.Type.I32, fid); + output.writeI32(val); + output.writeFieldEnd(); + break; + + case Thrift.Type.BOOL: + output.writeFieldBegin("", Thrift.Type.BOOL, fid); + output.writeBool(val); + output.writeFieldEnd(); + break; + + case Thrift.Type.STRUCT: + output.writeFieldBegin("", Thrift.Type.STRUCT, fid); + writeStruct(output, val); + output.writeFieldEnd(); + break; + + case Thrift.Type.MAP: + output.writeFieldBegin("", Thrift.Type.MAP, fid); + output.writeMapBegin(val[0], val[1], Thrift.objectLength(val[2])); + for (const kiter85 in val[2]) { + if (val[2].hasOwnProperty(kiter85)) { + const viter86 = val[2][kiter85]; + writeValue_(output, val[0], kiter85); + writeValue_(output, val[1], viter86); + } + } + output.writeMapEnd(); + output.writeFieldEnd(); + break; + + case Thrift.Type.LIST: + output.writeFieldBegin("", Thrift.Type.LIST, fid); + output.writeListBegin(val[0], val[1].length); + for (const iter483 in val[1]) { + if (val[1].hasOwnProperty(iter483)) { + iter483 = val[1][iter483]; + writeValue_(output, val[0], iter483); + } + } + output.writeListEnd(); + output.writeFieldEnd(); + break; + default: + console.log(fid, ftype, val, "unknown"); + break; + } } -function POWER(output, ftype, val) { - switch (ftype) { - case Thrift.Type.STRING: - output.writeString(val); - break; +function writeValue_(output, ftype, val) { + switch (ftype) { + case Thrift.Type.STRING: + output.writeString(val); + break; - case Thrift.Type.DOUBLE: - output.writeDouble(val); - break; + case Thrift.Type.DOUBLE: + output.writeDouble(val); + break; - case Thrift.Type.I64: - output.writeI64(val); - break; + case Thrift.Type.I64: + output.writeI64(val); + break; - case Thrift.Type.I32: - output.writeI32(val); - break; + case Thrift.Type.I32: + output.writeI32(val); + break; - case Thrift.Type.BOOL: - output.writeBool(val); - break; + case Thrift.Type.BOOL: + output.writeBool(val); + break; - case Thrift.Type.STRUCT: - XwriteX(output, val); - break; + case Thrift.Type.STRUCT: + writeStruct(output, val); + break; - default: - console.log(fid, ftype, val, "unknown"); - break; - } + default: + console.log(fid, ftype, val, "unknown"); + break; + } } diff --git a/site/.DS_Store b/site/.DS_Store new file mode 100644 index 0000000..99c7040 Binary files /dev/null and b/site/.DS_Store differ diff --git a/site/api.html b/site/api.html deleted file mode 100644 index deb9bcf..0000000 --- a/site/api.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - LINE-Deno-Client ・ API Test - - - - -

Account

-

authToken

- -

device-name

- -

PATH

- -

create socket

- -

<-

-

Request

-

METHOD_NAME

- -

params

- - -

->

-

Response

- - - - - - \ No newline at end of file diff --git a/site/import.html b/site/import.html deleted file mode 100644 index 5640fc4..0000000 --- a/site/import.html +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - - - - LINE-Deno-Client ・ API Test - - - - - -

Account

-

authToken

- -

device-name

- -

Login

- -

ツール

-
ticket→squareMid
-

ticket:

- -

response

- - -
参加オプ一覧
- -

response

- - -
再参加禁止リスト取得
-

sid:

- -

response

- - -
メンバー一覧取得
-

chatMid:

- -

response

- - -
トーク取得
-

chatMid:

- -

response

- - - - - - - \ No newline at end of file diff --git a/site/index.html b/site/index.html index a8e3d91..1eb1052 100644 --- a/site/index.html +++ b/site/index.html @@ -1,306 +1,150 @@ - - + - - - - - LINE-Deno-Client ・ API Test + + + + + + LINE + + + - - - -

Account

-

authToken

- -

device-name

- -

Login

- -

ツール

-
ticket→squareMid
-

ticket:

- -

response

- - -
参加オプ一覧
- -

response

- - -
再参加禁止リスト取得
-

sid:

- -

response

- - -
メンバー一覧取得
-

chatMid:

- -

response

- - -
トーク取得
-

chatMid:

- -

response

- - - + +
+
+
+
+
+
+
+
+ +
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/site/js/.DS_Store b/site/js/.DS_Store new file mode 100644 index 0000000..2683559 Binary files /dev/null and b/site/js/.DS_Store differ diff --git a/site/js/Xquery.js b/site/js/Xquery.js new file mode 100644 index 0000000..e25aca7 --- /dev/null +++ b/site/js/Xquery.js @@ -0,0 +1,129 @@ +/** + * @Copyright @amex2189 | @EdamAme-x / Free + * https://github.com/EdamAme-x/XueryJS + */ +"use strict"; + +const Tags = ["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "label", "legend", "li", "link", "main", "map", "mark", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "u", "ul", "var", "video", "wbr", "applet", "basefont", "big", "blink", "center", "command", "content", "dir", "element", "font", "frame", "frameset", "image", "isindex", "keygen", "listing", "marquee", "menu", "menuitem", "multicol", "nextid", "nobr", "noembed", "noframes", "plaintext", "shadow", "spacer", "strike", "tt", "xmp", "acronym", "bgsound", "dir", "frameset", "noframes", "tt", "video", "audio", "button", "details", "dialog", "summary", "template", "figcaption", "mark", "wbr", "svg", "g", "path","defs","clipPath", "circle"]; +//globalThis.X = {}; + +for (let e = 0; + e < Tags.length; + e++)globalThis[Tags[e]] = (t, ...i) => { + let r = document.createElement(Tags[e]); + if (Tags[e]=="g"||Tags[e]=="path"||Tags[e]=="svg"||Tags[e]=="defs"||Tags[e]=="clipPath"||Tags[e]=="circle") { + r = document.createElementNS("http://www.w3.org/2000/svg", Tags[e]); + } + if (t) for (let n in t) { + if ("raw" === n) { + r.innerHTML = t[n]; + continue + } if ("style" === n && "object" == typeof t[n]) for (let o in t[n]) r.style[o] = t[n][o]; + if ("$" === n.slice("")[0]) { + let x=(...arg)=>{t[n](r,...arg)} + r.addEventListener(n.slice(1), x); + continue + } r.setAttribute(n, t[n]) + } for (let a = 0; + a < i.length; + a++)"string" == typeof i[a] || "number" == typeof i[a] || "boolean" == typeof i[a] || void 0 === i[a] || null === i[a] ? r.appendChild(document.createTextNode(i[a])) : r.appendChild(i[a]); + return r + }; +globalThis.$ = t => { + let i = document.querySelectorAll(t); + if (0 === i.length) return { in() { throw Error("Element not found") } }; + let r = {}; + for (let n = 0; + n < i.length; + n++)r[n] = { + in(...t) { + for (; + i[n].firstChild; + )i[n].removeChild(i[n].firstChild); + if (!t) { + i[n].innerHTML = ""; + return + } t.forEach((e)=>{ + i[n].appendChild(e) + }) + }, out: i[n], + outX(){ + return genX(i[n]) + } + }, r.in = r[0].in, r.out = r[0].out, r.length = i.length; + return r +}; + +function genX(elm) { +function ToStr(str = "") { + return str.replaceAll("\n", "\\n").replaceAll("\t", "\\t").replaceAll("\"", "\\\"") +} + if (!elm.localName) { + if (!elm.data) { + return + } + let txt = elm.data.replaceAll(" ", "").replaceAll("\n", "") + if (txt == "") { + return + } + return "\"" + ToStr(elm.data) + "\"" + } + if (elm.localName.indexOf("-")!=-1) { + let prms="" + elm.shadowRoot.childNodes.forEach((e) => { + let g = genX(e) + if (g) { + prms+=(g+",") + } + + }) + return prms + } + let ops = {} + let prms = [] + let innerText + let nochild = false + try { + let opsN = elm.getAttributeNames() + for (const i in opsN) { + let tmp = elm.getAttribute(opsN[i]) + if ("string" == typeof tmp || "number" == typeof tmp || "boolean" == typeof tmp) { + ops[opsN[i]] = tmp + } + } + } catch (error) { + console.log(elm) + } + + + if (elm.childNodes.length == 0) { + innerText = elm.innerText + } else if (elm.innerHTML.indexOf("<") == -1) { + innerText = elm.innerText + nochild = true + } + + if (innerText) { + prms.push("\"" + ToStr(innerText) + "\"") + } + if (!nochild) { + let child = [...elm.childNodes] + child.forEach((e) => { + let g = genX(e) + if (g) { + prms.push(g) + } + + }) + } + + let prmsTxt = "" + prms.forEach((e) => { + prmsTxt += `${e}, +` + }) + return `${elm.localName}( +${JSON.stringify(ops, null, 1)}, +${prms} +)` +} \ No newline at end of file diff --git a/site/js/app.js b/site/js/app.js new file mode 100644 index 0000000..090af76 --- /dev/null +++ b/site/js/app.js @@ -0,0 +1,24 @@ +class LINEAPP { + constructor() { + } + initByToken(authToken, device) { + this.LINE = new LineClient({ authToken, device }); + this.initHTML(); + this.start(); + } + initByMPLogin(email, pw, device) { + this.LINE = new LineClient({ + device, + email, + pw, + pincall: (pin) => this.enterPinCode(pin), + }); + this.initHTML(); + this.start(); + } + start(){ + //this.LINE.squareEvent() + } + +} +LINEAPP.prototype.initHTML = INIT_HTML; diff --git a/site/js/eruda.min.js b/site/js/eruda.min.js new file mode 100644 index 0000000..8ce1322 --- /dev/null +++ b/site/js/eruda.min.js @@ -0,0 +1,26461 @@ +/*! eruda v1.4.3 http://eruda.liriliri.io/ */ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["eruda"] = factory(); + else + root["eruda"] = factory(); +})(typeof self !== 'undefined' ? self : this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = "/assets/"; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 79); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process, global) {// Built by eustia. + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.wrap = exports.viewportScale = exports.unique = exports.uniqId = exports.stripHtmlTag = exports.LocalStore = exports.stringify = exports.type = exports.ajax = exports.Url = exports.query = exports.getFileName = exports.trim = exports.rtrim = exports.detectBrowser = exports.toInt = exports.pxToNum = exports.toNum = exports.perfNow = exports.root = exports.orientation = exports.Store = exports.Logger = exports.Emitter = exports.once = exports.partial = exports.restArgs = undefined; +exports.now = exports.nextTick = exports.meta = exports.safeStorage = exports.memStorage = exports.$ = exports.$class = exports.some = exports.concat = exports.$event = exports.delegate = exports.$show = exports.$remove = exports.$property = exports.$offset = exports.$insert = exports.$css = exports.$data = exports.$attr = exports.$safeEls = exports.Select = exports.Enum = exports.Class = exports.toArr = exports.map = exports.evalCss = exports.filter = exports.safeCb = exports.matcher = exports.ltrim = exports.dateFormat = exports.lpad = exports.repeat = exports.loadJs = exports.isRegExp = exports.isNull = exports.isNative = exports.toSrc = exports.isNil = exports.isNaN = exports.isMobile = exports.memoize = exports.isMatch = exports.isErudaEl = exports.isErr = exports.isEl = exports.isCrossOrig = exports.isBool = exports.isEmpty = exports.isStr = exports.contain = exports.values = exports.extendOwn = exports.clone = exports.extend = exports.cookie = exports.defaults = exports.createAssigner = exports.each = exports.isArrLike = exports.isNum = exports.isFn = exports.isDate = exports.safeGet = exports.castPath = exports.isArr = exports.isArgs = exports.objToStr = exports.identity = exports.getObjType = exports.upperFirst = exports.fullUrl = exports.fileSize = exports.escapeRegExp = exports.escapeJsonStr = exports.escape = exports.endWith = exports.optimizeCb = exports.detectOs = exports.isBrowser = exports.toStr = exports.idxOf = exports.clamp = exports.chunk = exports.kebabCase = exports.camelCase = exports.splitCase = exports.before = exports.allKeys = exports.noop = exports.SafeMutationObserver = exports.freeze = exports.keys = exports.slice = exports.has = exports.inherits = exports.startWith = exports.isObj = exports.isUndef = exports.last = undefined; + +var _stringify = __webpack_require__(33); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _setImmediate2 = __webpack_require__(122); + +var _setImmediate3 = _interopRequireDefault(_setImmediate2); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _defineProperty = __webpack_require__(64); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +var _getOwnPropertyDescriptor = __webpack_require__(34); + +var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor); + +var _freeze = __webpack_require__(129); + +var _freeze2 = _interopRequireDefault(_freeze); + +var _keys2 = __webpack_require__(35); + +var _keys3 = _interopRequireDefault(_keys2); + +var _create = __webpack_require__(71); + +var _create2 = _interopRequireDefault(_create); + +var _typeof2 = __webpack_require__(25); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _ = {}; + +/* ------------------------------ last ------------------------------ */ + +var _last = _.last = function () { + /* Get the last element of array. + * + * |Name |Type |Desc | + * |------|-----|-------------------------| + * |arr |array|The array to query | + * |return|* |The last element of array| + * + * ```javascript + * last([1, 2]); // -> 2 + * ``` + */ + + /* module + * env: all + * test: all + */ + + function exports(arr) { + var len = arr ? arr.length : 0; + + if (len) return arr[len - 1]; + } + + return exports; +}(); + +/* ------------------------------ isUndef ------------------------------ */ + +exports.last = _last; +var isUndef = exports.isUndef = _.isUndef = function () { + /* Check if value is undefined. + * + * |Name |Type |Desc | + * |------|-------|--------------------------| + * |val |* |Value to check | + * |return|boolean|True if value is undefined| + * + * ```javascript + * isUndef(void 0); // -> true + * isUndef(null); // -> false + * ``` + */ + + /* module + * env: all + * test: all + */ + + function exports(val) { + return val === void 0; + } + + return exports; +}(); + +/* ------------------------------ isObj ------------------------------ */ + +var isObj = exports.isObj = _.isObj = function () { + /* Check if value is the language type of Object. + * + * |Name |Type |Desc | + * |------|-------|--------------------------| + * |val |* |Value to check | + * |return|boolean|True if value is an object| + * + * [Language Spec](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types) + * + * ```javascript + * isObj({}); // -> true + * isObj([]); // -> true + * ``` + */ + + /* module + * env: all + * test: all + */ + + function exports(val) { + var type = typeof val === 'undefined' ? 'undefined' : (0, _typeof3.default)(val); + + return !!val && (type === 'function' || type === 'object'); + } + + return exports; +}(); + +/* ------------------------------ startWith ------------------------------ */ + +var startWith = exports.startWith = _.startWith = function () { + /* Check if string starts with the given target string. + * + * |Name |Type |Desc | + * |------|-------|---------------------------------| + * |str |string |String to search | + * |prefix|string |String prefix | + * |return|boolean|True if string starts with prefix| + * + * ```javascript + * startWith('ab', 'a'); // -> true + * ``` + */ + + /* module + * env: all + * test: all + */ + + function exports(str, prefix) { + return str.indexOf(prefix) === 0; + } + + return exports; +}(); + +/* ------------------------------ inherits ------------------------------ */ + +var inherits = exports.inherits = _.inherits = function () { + /* Inherit the prototype methods from one constructor into another. + * + * |Name |Type |Desc | + * |----------|--------|-----------| + * |Class |function|Child Class| + * |SuperClass|function|Super Class| + * + * ```javascript + * function People(name) + * { + * this._name = name; + * } + * People.prototype = { + * getName: function () + * { + * return this._name; + * } + * }; + * function Student(name) + * { + * this._name = name; + * } + * inherits(Student, People); + * var s = new Student('RedHood'); + * s.getName(); // -> 'RedHood' + * ``` + */ + + /* module + * env: all + * test: all + */ + + function exports(Class, SuperClass) { + if (objCreate) return Class.prototype = objCreate(SuperClass.prototype); + + noop.prototype = SuperClass.prototype; + Class.prototype = new noop(); + } + + var objCreate = _create2.default; + + function noop() {} + + return exports; +}(); + +/* ------------------------------ has ------------------------------ */ + +var has = exports.has = _.has = function () { + /* Checks if key is a direct property. + * + * |Name |Type |Desc | + * |------|-------|--------------------------------| + * |obj |object |Object to query | + * |key |string |Path to check | + * |return|boolean|True if key is a direct property| + * + * ```javascript + * has({one: 1}, 'one'); // -> true + * ``` + */ + + /* module + * env: all + * test: all + */ + + var hasOwnProp = Object.prototype.hasOwnProperty; + + function exports(obj, key) { + return hasOwnProp.call(obj, key); + } + + return exports; +}(); + +/* ------------------------------ slice ------------------------------ */ + +var slice = exports.slice = _.slice = function () { + /* Create slice of source array or array-like object. + * + * |Name |Type |Desc | + * |------------------|------|--------------------------| + * |array |array |Array to slice | + * |[start=0] |number|Start position | + * |[end=array.length]|number|End position, not included| + * + * ```javascript + * slice([1, 2, 3, 4], 1, 2); // -> [2] + * ``` + */ + + /* module + * env: all + * test: all + */ + + function exports(arr, start, end) { + var len = arr.length; + + if (start == null) { + start = 0; + } else if (start < 0) { + start = Math.max(len + start, 0); + } else { + start = Math.min(start, len); + } + + if (end == null) { + end = len; + } else if (end < 0) { + end = Math.max(len + end, 0); + } else { + end = Math.min(end, len); + } + + var ret = []; + while (start < end) { + ret.push(arr[start++]); + }return ret; + } + + return exports; +}(); + +/* ------------------------------ keys ------------------------------ */ + +var keys = exports.keys = _.keys = function (exports) { + /* Create an array of the own enumerable property names of object. + * + * |Name |Type |Desc | + * |------|------|-----------------------| + * |obj |object|Object to query | + * |return|array |Array of property names| + * + * ```javascript + * keys({a: 1}); // -> ['a'] + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * has + */ + + exports = _keys3.default || function (obj) { + var ret = [], + key; + + for (key in obj) { + if (has(obj, key)) ret.push(key); + } + + return ret; + }; + + return exports; +}({}); + +/* ------------------------------ freeze ------------------------------ */ + +var freeze = exports.freeze = _.freeze = function () { + /* Shortcut for Object.freeze. + * + * Use Object.defineProperties if Object.freeze is not supported. + * + * |Name |Type |Desc | + * |------|------|----------------| + * |obj |object|Object to freeze| + * |return|object|Object passed in| + * + * ```javascript + * var a = {b: 1}; + * freeze(a); + * a.b = 2; + * console.log(a); // -> {b: 1} + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * keys + */ + + function exports(obj) { + if (_freeze2.default) return (0, _freeze2.default)(obj); + + keys(obj).forEach(function (prop) { + if (!(0, _getOwnPropertyDescriptor2.default)(obj, prop).configurable) return; + + (0, _defineProperty2.default)(obj, prop, { + writable: false, + configurable: false + }); + }); + + return obj; + } + + return exports; +}(); + +/* ------------------------------ SafeMutationObserver ------------------------------ */ + +var SafeMutationObserver = exports.SafeMutationObserver = _.SafeMutationObserver = function (exports) { + /* Safe MutationObserver, does nothing if MutationObserver is not supported. + * + * ```javascript + * var observer = new DomObserver(function (mutations) + * { + * // Do something. + * }); + * observer.observe(document.htmlElement); + * observer.disconnect(); + * ``` + */ + + exports = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; + + if (!exports) { + exports = function () { + function MutationObserver() { + (0, _classCallCheck3.default)(this, MutationObserver); + } + + (0, _createClass3.default)(MutationObserver, [{ + key: 'observe', + value: function observe() {} + }, { + key: 'disconnect', + value: function disconnect() {} + }, { + key: 'takeRecords', + value: function takeRecords() {} + }]); + return MutationObserver; + }(); + } + + return exports; +}({}); + +/* ------------------------------ noop ------------------------------ */ + +var noop = exports.noop = _.noop = function () { + /* A no-operation function. + * + * ```javascript + * noop(); // Does nothing + * ``` + */ + + /* module + * env: all + * test: all + */ + + function exports() {} + + return exports; +}(); + +/* ------------------------------ allKeys ------------------------------ */ + +var allKeys = exports.allKeys = _.allKeys = function () { + /* Retrieve all the names of object's own and inherited properties. + * + * |Name |Type |Desc | + * |------|------|---------------------------| + * |obj |object|Object to query | + * |return|array |Array of all property names| + * + * > Members of Object's prototype won't be retrieved. + * + * ```javascript + * var obj = Object.create({zero: 0}); + * obj.one = 1; + * allKeys(obj) // -> ['zero', 'one'] + * ``` + */ + + /* module + * env: all + * test: all + */ + + function exports(obj) { + var ret = [], + key; + + for (key in obj) { + ret.push(key); + }return ret; + } + + return exports; +}(); + +/* ------------------------------ before ------------------------------ */ + +var before = exports.before = _.before = function () { + /* Create a function that invokes less than n times. + * + * |Name |Type |Desc | + * |------|--------|------------------------------------------------| + * |n |number |Number of calls at which fn is no longer invoked| + * |fn |function|Function to restrict | + * |return|function|New restricted function | + * + * Subsequent calls to the created function return the result of the last fn invocation. + * + * ```javascript + * $(element).on('click', before(5, function() {})); + * // -> allow function to be call 4 times at last. + * ``` + */ + + /* module + * env: all + * test: all + */ + + function exports(n, fn) { + var memo; + + return function () { + if (--n > 0) memo = fn.apply(this, arguments); + if (n <= 1) fn = null; + + return memo; + }; + } + + return exports; +}(); + +/* ------------------------------ splitCase ------------------------------ */ + +var splitCase = exports.splitCase = _.splitCase = function () { + /* Split different string case to an array. + * + * |Name |Type |Desc | + * |------|------|---------------| + * |str |string|String to split| + * |return|array |Result array | + * + * ```javascript + * splitCase('foo-bar'); // -> ['foo', 'bar'] + * splitCase('foo bar'); // -> ['foo', 'bar'] + * splitCase('foo_bar'); // -> ['foo', 'bar'] + * splitCase('foo.bar'); // -> ['foo', 'bar'] + * splitCase('fooBar'); // -> ['foo', 'bar'] + * splitCase('foo-Bar'); // -> ['foo', 'bar'] + * ``` + */ + + /* module + * env: all + * test: all + */ + + var regUpperCase = /([A-Z])/g, + regSeparator = /[_.\- ]+/g, + regTrim = /(^-)|(-$)/g; + + function exports(str) { + str = str.replace(regUpperCase, '-$1').toLowerCase().replace(regSeparator, '-').replace(regTrim, ''); + + return str.split('-'); + } + + return exports; +}(); + +/* ------------------------------ camelCase ------------------------------ */ + +var camelCase = exports.camelCase = _.camelCase = function () { + /* Convert string to "camelCase". + * + * |Name |Type |Desc | + * |------|------|------------------| + * |str |string|String to convert | + * |return|string|Camel cased string| + * + * ```javascript + * camelCase('foo-bar'); // -> fooBar + * camelCase('foo bar'); // -> fooBar + * camelCase('foo_bar'); // -> fooBar + * camelCase('foo.bar'); // -> fooBar + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * splitCase + */ + + function exports(str) { + var arr = splitCase(str); + + var ret = arr[0]; + arr.shift(); + + arr.forEach(capitalize, arr); + ret += arr.join(''); + + return ret; + } + + function capitalize(val, idx) { + this[idx] = val.replace(/\w/, function (match) { + return match.toUpperCase(); + }); + } + + return exports; +}(); + +/* ------------------------------ kebabCase ------------------------------ */ + +var kebabCase = exports.kebabCase = _.kebabCase = function () { + /* Convert string to "kebabCase". + * + * |Name |Type |Desc | + * |------|------|------------------| + * |str |string|String to convert | + * |return|string|Kebab cased string| + * + * ```javascript + * kebabCase('fooBar'); // -> foo-bar + * kebabCase('foo bar'); // -> foo-bar + * kebabCase('foo_bar'); // -> foo-bar + * kebabCase('foo.bar'); // -> foo-bar + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * splitCase + */ + + function exports(str) { + return splitCase(str).join('-'); + } + + return exports; +}(); + +/* ------------------------------ chunk ------------------------------ */ + +var chunk = exports.chunk = _.chunk = function () { + /* Split array into groups the length of given size. + * + * |Name |Type |Desc | + * |--------|------|--------------------| + * |arr |array |Array to process | + * |[size=1]|number|Length of each chunk| + * + * ```javascript + * chunk([1, 2, 3, 4], 2); // -> [[1, 2], [3, 4]] + * chunk([1, 2, 3, 4], 3); // -> [[1, 2, 3], [4]] + * chunk([1, 2, 3, 4]); // -> [[1], [2], [3], [4]] + * ``` + */ + + /* module + * env: all + * test: all + */ + + function exports(arr, size) { + var ret = []; + + size = size || 1; + + for (var i = 0, len = Math.ceil(arr.length / size); i < len; i++) { + var start = i * size, + end = start + size; + + ret.push(arr.slice(start, end)); + } + + return ret; + } + + return exports; +}(); + +/* ------------------------------ clamp ------------------------------ */ + +var clamp = exports.clamp = _.clamp = function () { + /* Clamp number within the inclusive lower and upper bounds. + * + * |Name |Type |Desc | + * |-------|------|---------------| + * |n |number|Number to clamp| + * |[lower]|number|Lower bound | + * |upper |number|Upper bound | + * |return |number|Clamped number | + * + * ```javascript + * clamp(-10, -5, 5); // -> -5 + * clamp(10, -5, 5); // -> 5 + * clamp(2, -5, 5); // -> 2 + * clamp(10, 5); // -> 5 + * clamp(2, 5); // -> 2 + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * isUndef + */ + + function exports(n, lower, upper) { + if (isUndef(upper)) { + upper = lower; + lower = undefined; + } + + if (!isUndef(lower) && n < lower) return lower; + + if (n > upper) return upper; + + return n; + } + + return exports; +}(); + +/* ------------------------------ idxOf ------------------------------ */ + +var idxOf = exports.idxOf = _.idxOf = function () { + /* Get the index at which the first occurrence of value. + * + * |Name |Type |Desc | + * |-----------|------|--------------------| + * |arr |array |Array to search | + * |val |* |Value to search for | + * |[fromIdx=0]|number|Index to search from| + * + * ```javascript + * idxOf([1, 2, 1, 2], 2, 2); // -> 3 + * ``` + */ + + /* module + * env: all + * test: all + */ + + function exports(arr, val, fromIdx) { + return Array.prototype.indexOf.call(arr, val, fromIdx); + } + + return exports; +}(); + +/* ------------------------------ toStr ------------------------------ */ + +var toStr = exports.toStr = _.toStr = function () { + /* Convert value to a string. + * + * |Name |Type |Desc | + * |------|------|----------------| + * |val |* |Value to convert| + * |return|string|Resulted string | + * + * ```javascript + * toStr(null); // -> '' + * toStr(1); // -> '1' + * toStr(false); // -> 'false' + * toStr([1, 2, 3]); // -> '1,2,3' + * ``` + */ + + /* module + * env: all + * test: all + */ + + function exports(val) { + return val == null ? '' : val.toString(); + } + + return exports; +}(); + +/* ------------------------------ isBrowser ------------------------------ */ + +var isBrowser = exports.isBrowser = _.isBrowser = function (exports) { + /* Check if running in a browser. + * + * ```javascript + * console.log(isBrowser); // -> true if running in a browser + * ``` + */ + + /* module + * env: all + * test: all + */ + + exports = (typeof window === 'undefined' ? 'undefined' : (0, _typeof3.default)(window)) === 'object' && (typeof document === 'undefined' ? 'undefined' : (0, _typeof3.default)(document)) === 'object' && document.nodeType === 9; + + return exports; +}({}); + +/* ------------------------------ detectOs ------------------------------ */ + +var detectOs = exports.detectOs = _.detectOs = function () { + /* Detect operating system using ua. + * + * |Name |Type |Desc | + * |------------------------|------|---------------------| + * |[ua=navigator.userAgent]|string|Browser userAgent | + * |return |string|Operating system name| + * + * Supported os: windows, os x, linux, ios, android, windows phone + * + * ```javascript + * if (detectOs() === 'ios') + * { + * // Do something about ios... + * } + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * isBrowser + */ + + function exports(ua) { + ua = ua || (isBrowser ? navigator.userAgent : ''); + + ua = ua.toLowerCase(); + + if (detect('windows phone')) return 'windows phone'; + if (detect('win')) return 'windows'; + if (detect('android')) return 'android'; + if (detect('ipad') || detect('iphone') || detect('ipod')) return 'ios'; + if (detect('mac')) return 'os x'; + if (detect('linux')) return 'linux'; + + function detect(keyword) { + return ua.indexOf(keyword) > -1; + } + + return 'unknown'; + } + + return exports; +}(); + +/* ------------------------------ optimizeCb ------------------------------ */ + +var optimizeCb = exports.optimizeCb = _.optimizeCb = function () { + /* Used for function context binding. + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * isUndef + */ + + function exports(fn, ctx, argCount) { + if (isUndef(ctx)) return fn; + + switch (argCount == null ? 3 : argCount) { + case 1: + return function (val) { + return fn.call(ctx, val); + }; + case 3: + return function (val, idx, collection) { + return fn.call(ctx, val, idx, collection); + }; + case 4: + return function (accumulator, val, idx, collection) { + return fn.call(ctx, accumulator, val, idx, collection); + }; + } + + return function () { + return fn.apply(ctx, arguments); + }; + } + + return exports; +}(); + +/* ------------------------------ endWith ------------------------------ */ + +var endWith = exports.endWith = _.endWith = function () { + /* Check if string ends with the given target string. + * + * |Name |Type |Desc | + * |------|-------|-------------------------------| + * |str |string |The string to search | + * |suffix|string |String suffix | + * |return|boolean|True if string ends with target| + * + * ```javascript + * endWith('ab', 'b'); // -> true + * ``` + */ + + /* module + * env: all + * test: all + */ + + function exports(str, suffix) { + var idx = str.length - suffix.length; + + return idx >= 0 && str.indexOf(suffix, idx) === idx; + } + + return exports; +}(); + +/* ------------------------------ escape ------------------------------ */ + +var escape = exports.escape = _.escape = function () { + /* Escapes a string for insertion into HTML, replacing &, <, >, ", `, and ' characters. + * + * |Name |Type |Desc | + * |------|------|----------------| + * |str |string|String to escape| + * |return|string|Escaped string | + * + * ```javascript + * escape('You & Me'); -> // -> 'You & Me' + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * keys + */ + + function exports(str) { + return regTest.test(str) ? str.replace(regReplace, replaceFn) : str; + } + + var map = exports.map = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + '\'': ''', + '`': '`' + }; + + var regSrc = '(?:' + keys(map).join('|') + ')', + regTest = new RegExp(regSrc), + regReplace = new RegExp(regSrc, 'g'); + + function replaceFn(match) { + return map[match]; + } + + return exports; +}(); + +/* ------------------------------ escapeJsonStr ------------------------------ */ + +var escapeJsonStr = exports.escapeJsonStr = _.escapeJsonStr = function () { + /* Escape json string. + */ + + function exports(str) { + return str.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\f|\n|\r|\t/g, ''); + } + + return exports; +}(); + +/* ------------------------------ escapeRegExp ------------------------------ */ + +var escapeRegExp = exports.escapeRegExp = _.escapeRegExp = function () { + /* Escape special chars to be used as literals in RegExp constructors. + * + * |Name |Type |Desc | + * |------|------|----------------| + * |str |string|String to escape| + * |return|string|Escaped string | + * + * ```javascript + * escapeRegExp('[eris]'); // -> '\\[eris\\]' + * ``` + */ + + /* module + * env: all + * test: all + */ + + function exports(str) { + return str.replace(/\W/g, '\\$&'); + } + + return exports; +}(); + +/* ------------------------------ fileSize ------------------------------ */ + +var fileSize = exports.fileSize = _.fileSize = function () { + /* Turn bytes into human readable file size. + * + * |Name |Type |Desc | + * |------|------|------------------| + * |bytes |number|File bytes | + * |return|string|Readable file size| + * + * ```javascript + * fileSize(5); // -> '5' + * fileSize(1500); // -> '1.46K' + * fileSize(1500000); // -> '1.43M' + * fileSize(1500000000); // -> '1.4G' + * fileSize(1500000000000); // -> '1.36T' + * ``` + */ + + /* module + * env: all + * test: all + */ + + function exports(bytes) { + if (bytes <= 0) return '0'; + + var suffixIdx = Math.floor(Math.log(bytes) / Math.log(1024)), + val = bytes / Math.pow(2, suffixIdx * 10); + + return +val.toFixed(2) + suffixList[suffixIdx]; + } + + var suffixList = ['', 'K', 'M', 'G', 'T']; + + return exports; +}(); + +/* ------------------------------ fullUrl ------------------------------ */ + +var fullUrl = exports.fullUrl = _.fullUrl = function () { + /* Add origin to url if needed. + */ + + /* dependencies + * startWith + */ + + var origin = window.location.origin; + + function exports(url) { + if (startWith(url, 'http')) return url; + + if (!startWith(url, '/')) url = '/' + url; + + return origin + url; + } + + return exports; +}(); + +/* ------------------------------ upperFirst ------------------------------ */ + +var upperFirst = exports.upperFirst = _.upperFirst = function () { + /* Convert the first character of string to upper case. + * + * |Name |Type |Desc | + * |------|------|-----------------| + * |str |string|String to convert| + * |return|string|Converted string | + * + * ```javascript + * upperFirst('red'); // -> Red + * ``` + */ + + /* module + * env: all + * test: all + */ + + function exports(str) { + if (str.length < 1) return str; + + return str[0].toUpperCase() + str.slice(1); + } + + return exports; +}(); + +/* ------------------------------ getObjType ------------------------------ */ + +var getObjType = exports.getObjType = _.getObjType = function () { + /* Get object type. + */ + + /* dependencies + * upperFirst + */ + + function exports(obj) { + if (obj.constructor && obj.constructor.name) return obj.constructor.name; + + return upperFirst({}.toString.call(obj).replace(/(\[object )|]/g, '')); + } + + return exports; +}(); + +/* ------------------------------ identity ------------------------------ */ + +var identity = exports.identity = _.identity = function () { + /* Return the first argument given. + * + * |Name |Type|Desc | + * |------|----|-----------| + * |val |* |Any value | + * |return|* |Given value| + * + * ```javascript + * identity('a'); // -> 'a' + * ``` + */ + + /* module + * env: all + * test: all + */ + + function exports(val) { + return val; + } + + return exports; +}(); + +/* ------------------------------ objToStr ------------------------------ */ + +var objToStr = exports.objToStr = _.objToStr = function () { + /* Alias of Object.prototype.toString. + * + * |Name |Type |Desc | + * |------|------|------------------------------------| + * |value |* |Source value | + * |return|string|String representation of given value| + * + * ```javascript + * objToStr(5); // -> '[object Number]' + * ``` + */ + + /* module + * env: all + * test: all + */ + + var ObjToStr = Object.prototype.toString; + + function exports(val) { + return ObjToStr.call(val); + } + + return exports; +}(); + +/* ------------------------------ isArgs ------------------------------ */ + +var isArgs = exports.isArgs = _.isArgs = function () { + /* Check if value is classified as an arguments object. + * + * |Name |Type |Desc | + * |------|-------|------------------------------------| + * |val |* |Value to check | + * |return|boolean|True if value is an arguments object| + * + * ```javascript + * (function () { + * isArgs(arguments); // -> true + * })(); + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * objToStr + */ + + function exports(val) { + return objToStr(val) === '[object Arguments]'; + } + + return exports; +}(); + +/* ------------------------------ isArr ------------------------------ */ + +var isArr = exports.isArr = _.isArr = function (exports) { + /* Check if value is an `Array` object. + * + * |Name |Type |Desc | + * |------|-------|----------------------------------| + * |val |* |Value to check | + * |return|boolean|True if value is an `Array` object| + * + * ```javascript + * isArr([]); // -> true + * isArr({}); // -> false + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * objToStr + */ + + exports = Array.isArray || function (val) { + return objToStr(val) === '[object Array]'; + }; + + return exports; +}({}); + +/* ------------------------------ castPath ------------------------------ */ + +var castPath = exports.castPath = _.castPath = function () { + /* Cast value into a property path array. + * + * |Name |Type |Desc | + * |------|------|-------------------| + * |str |* |Value to inspect | + * |[obj] |object|Object to query | + * |return|array |Property path array| + * + * ```javascript + * castPath('a.b.c'); // -> ['a', 'b', 'c'] + * castPath(['a']); // -> ['a'] + * castPath('a[0].b'); // -> ['a', '0', 'b'] + * castPath('a.b.c', {'a.b.c': true}); // -> ['a.b.c'] + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * has isArr + */ + + function exports(str, obj) { + if (isArr(str)) return str; + if (obj && has(obj, str)) return [str]; + + var ret = []; + + str.replace(regPropName, function (match, number, quote, str) { + ret.push(quote ? str.replace(regEscapeChar, '$1') : number || match); + }); + + return ret; + } + + // Lodash _stringToPath + var regPropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, + regEscapeChar = /\\(\\)?/g; + + return exports; +}(); + +/* ------------------------------ safeGet ------------------------------ */ + +var safeGet = exports.safeGet = _.safeGet = function () { + /* Get object property, don't throw undefined error. + * + * |Name |Type |Desc | + * |------|------------|-------------------------| + * |obj |object |Object to query | + * |path |array string|Path of property to get | + * |return|* |Target value or undefined| + * + * ```javascript + * var obj = {a: {aa: {aaa: 1}}}; + * safeGet(obj, 'a.aa.aaa'); // -> 1 + * safeGet(obj, ['a', 'aa']); // -> {aaa: 1} + * safeGet(obj, 'a.b'); // -> undefined + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * isUndef castPath + */ + + function exports(obj, path) { + path = castPath(path, obj); + + var prop; + + /* eslint-disable no-cond-assign */ + while (prop = path.shift()) { + obj = obj[prop]; + if (isUndef(obj)) return; + } + + return obj; + } + + return exports; +}(); + +/* ------------------------------ isDate ------------------------------ */ + +var isDate = exports.isDate = _.isDate = function () { + /* Check if value is classified as a Date object. + * + * |Name |Type |Desc | + * |------|-------|------------------------------| + * |val |* |value to check | + * |return|boolean|True if value is a Date object| + * + * ```javascript + * isDate(new Date()); // -> true + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * objToStr + */ + + function exports(val) { + return objToStr(val) === '[object Date]'; + } + + return exports; +}(); + +/* ------------------------------ isFn ------------------------------ */ + +var isFn = exports.isFn = _.isFn = function () { + /* Check if value is a function. + * + * |Name |Type |Desc | + * |------|-------|---------------------------| + * |val |* |Value to check | + * |return|boolean|True if value is a function| + * + * Generator function is also classified as true. + * + * ```javascript + * isFn(function() {}); // -> true + * isFn(function*() {}); // -> true + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * objToStr + */ + + function exports(val) { + var objStr = objToStr(val); + + return objStr === '[object Function]' || objStr === '[object GeneratorFunction]'; + } + + return exports; +}(); + +/* ------------------------------ isNum ------------------------------ */ + +var isNum = exports.isNum = _.isNum = function () { + /* Check if value is classified as a Number primitive or object. + * + * |Name |Type |Desc | + * |------|-------|-------------------------------------| + * |val |* |Value to check | + * |return|boolean|True if value is correctly classified| + * + * ```javascript + * isNum(5); // -> true + * isNum(5.1); // -> true + * isNum({}); // -> false + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * objToStr + */ + + function exports(val) { + return objToStr(val) === '[object Number]'; + } + + return exports; +}(); + +/* ------------------------------ isArrLike ------------------------------ */ + +var isArrLike = exports.isArrLike = _.isArrLike = function () { + /* Check if value is array-like. + * + * |Name |Type |Desc | + * |------|-------|---------------------------| + * |val |* |Value to check | + * |return|boolean|True if value is array like| + * + * > Function returns false. + * + * ```javascript + * isArrLike('test'); // -> true + * isArrLike(document.body.children); // -> true; + * isArrLike([1, 2, 3]); // -> true + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * isNum isFn + */ + + var MAX_ARR_IDX = Math.pow(2, 53) - 1; + + function exports(val) { + if (!val) return false; + + var len = val.length; + + return isNum(len) && len >= 0 && len <= MAX_ARR_IDX && !isFn(val); + } + + return exports; +}(); + +/* ------------------------------ each ------------------------------ */ + +var _each = _.each = function () { + /* Iterate over elements of collection and invokes iteratee for each element. + * + * |Name |Type |Desc | + * |--------|------------|------------------------------| + * |obj |object array|Collection to iterate over | + * |iteratee|function |Function invoked per iteration| + * |[ctx] |* |Function context | + * + * ```javascript + * each({'a': 1, 'b': 2}, function (val, key) {}); + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * isArrLike keys optimizeCb + */ + + function exports(obj, iteratee, ctx) { + iteratee = optimizeCb(iteratee, ctx); + + var i, len; + + if (isArrLike(obj)) { + for (i = 0, len = obj.length; i < len; i++) { + iteratee(obj[i], i, obj); + } + } else { + var _keys = keys(obj); + for (i = 0, len = _keys.length; i < len; i++) { + iteratee(obj[_keys[i]], _keys[i], obj); + } + } + + return obj; + } + + return exports; +}(); + +/* ------------------------------ createAssigner ------------------------------ */ + +exports.each = _each; +var createAssigner = exports.createAssigner = _.createAssigner = function () { + /* Used to create extend, extendOwn and defaults. + * + * |Name |Type |Desc | + * |--------|--------|------------------------------| + * |keysFn |function|Function to get object keys | + * |defaults|boolean |No override when set to true | + * |return |function|Result function, extend... | + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * isUndef each + */ + + function exports(keysFn, defaults) { + return function (obj) { + _each(arguments, function (src, idx) { + if (idx === 0) return; + + var keys = keysFn(src); + + _each(keys, function (key) { + if (!defaults || isUndef(obj[key])) obj[key] = src[key]; + }); + }); + + return obj; + }; + } + + return exports; +}(); + +/* ------------------------------ defaults ------------------------------ */ + +var defaults = exports.defaults = _.defaults = function (exports) { + /* Fill in undefined properties in object with the first value present in the following list of defaults objects. + * + * |Name |Type |Desc | + * |------|------|------------------| + * |obj |object|Destination object| + * |*src |object|Sources objects | + * |return|object|Destination object| + * + * ```javascript + * defaults({name: 'RedHood'}, {name: 'Unknown', age: 24}); // -> {name: 'RedHood', age: 24} + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * createAssigner allKeys + */ + + exports = createAssigner(allKeys, true); + + return exports; +}({}); + +/* ------------------------------ cookie ------------------------------ */ + +var cookie = exports.cookie = _.cookie = function (exports) { + /* Simple api for handling browser cookies. + * + * ### get + * + * Get cookie value. + * + * |Name |Type |Desc | + * |------|------|--------------------------| + * |key |string|Cookie key | + * |return|string|Corresponding cookie value| + * + * ### set + * + * Set cookie value. + * + * |Name |Type |Desc | + * |---------|-------|--------------| + * |key |string |Cookie key | + * |val |string |Cookie value | + * |[options]|object |Cookie options| + * |return |exports|Module cookie | + * + * ### remove + * + * Remove cookie value. + * + * |Name |Type |Desc | + * |---------|-------|--------------| + * |key |string |Cookie key | + * |[options]|object |Cookie options| + * |return |exports|Module cookie | + * + * ```javascript + * cookie.set('a', '1', {path: '/'}); + * cookie.get('a'); // -> '1' + * cookie.remove('a'); + * ``` + */ + + /* module + * env: browser + * test: browser + */ + + /* dependencies + * defaults isNum isUndef + */ + + var defOpts = { path: '/' }; + + function setCookie(key, val, options) { + if (!isUndef(val)) { + options = options || {}; + options = defaults(options, defOpts); + + if (isNum(options.expires)) { + var expires = new Date(); + expires.setMilliseconds(expires.getMilliseconds() + options.expires * 864e+5); + options.expires = expires; + } + + val = encodeURIComponent(val); + key = encodeURIComponent(key); + + document.cookie = [key, '=', val, options.expires && '; expires=' + options.expires.toUTCString(), options.path && '; path=' + options.path, options.domain && '; domain=' + options.domain, options.secure ? '; secure' : ''].join(''); + + return exports; + } + + var cookies = document.cookie ? document.cookie.split('; ') : [], + result = key ? undefined : {}; + + for (var i = 0, len = cookies.length; i < len; i++) { + var c = cookies[i], + parts = c.split('='), + name = decodeURIComponent(parts.shift()); + + c = parts.join('='); + c = decodeURIComponent(c); + + if (key === name) { + result = c; + break; + } + + if (!key) result[name] = c; + } + + return result; + } + + exports = { + get: setCookie, + set: setCookie, + remove: function remove(key, options) { + options = options || {}; + options.expires = -1; + + return setCookie(key, '', options); + } + }; + + return exports; +}({}); + +/* ------------------------------ extend ------------------------------ */ + +var extend = exports.extend = _.extend = function (exports) { + /* Copy all of the properties in the source objects over to the destination object. + * + * |Name |Type |Desc | + * |------|------|------------------| + * |obj |object|Destination object| + * |...src|object|Sources objects | + * |return|object|Destination object| + * + * ```javascript + * extend({name: 'RedHood'}, {age: 24}); // -> {name: 'RedHood', age: 24} + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * createAssigner allKeys + */ + + exports = createAssigner(allKeys); + + return exports; +}({}); + +/* ------------------------------ clone ------------------------------ */ + +var clone = exports.clone = _.clone = function () { + /* Create a shallow-copied clone of the provided plain object. + * + * Any nested objects or arrays will be copied by reference, not duplicated. + * + * |Name |Type|Desc | + * |------|----|--------------| + * |val |* |Value to clone| + * |return|* |Cloned value | + * + * ```javascript + * clone({name: 'eustia'}); // -> {name: 'eustia'} + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * isObj isArr extend + */ + + function exports(obj) { + if (!isObj(obj)) return obj; + + return isArr(obj) ? obj.slice() : extend({}, obj); + } + + return exports; +}(); + +/* ------------------------------ extendOwn ------------------------------ */ + +var extendOwn = exports.extendOwn = _.extendOwn = function (exports) { + /* Like extend, but only copies own properties over to the destination object. + * + * |Name |Type |Desc | + * |------|------|------------------| + * |obj |object|Destination object| + * |*src |object|Sources objects | + * |return|object|Destination object| + * + * ```javascript + * extendOwn({name: 'RedHood'}, {age: 24}); // -> {name: 'RedHood', age: 24} + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * keys createAssigner + */ + + exports = createAssigner(keys); + + return exports; +}({}); + +/* ------------------------------ values ------------------------------ */ + +var values = exports.values = _.values = function () { + /* Create an array of the own enumerable property values of object. + * + * |Name |Type |Desc | + * |------|------|------------------------| + * |obj |object|Object to query | + * |return|array |Array of property values| + * + * ```javascript + * values({one: 1, two: 2}); // -> [1, 2] + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * each + */ + + function exports(obj) { + var ret = []; + + _each(obj, function (val) { + ret.push(val); + }); + + return ret; + } + + return exports; +}(); + +/* ------------------------------ contain ------------------------------ */ + +var contain = exports.contain = _.contain = function () { + /* Check if the value is present in the list. + * + * |Name |Type |Desc | + * |------|------------|------------------------------------| + * |array |array object|Target list | + * |value |* |Value to check | + * |return|boolean |True if value is present in the list| + * + * ```javascript + * contain([1, 2, 3], 1); // -> true + * contain({a: 1, b: 2}, 1); // -> true + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * idxOf isArrLike values + */ + + function exports(arr, val) { + if (!isArrLike(arr)) arr = values(arr); + + return idxOf(arr, val) >= 0; + } + + return exports; +}(); + +/* ------------------------------ isStr ------------------------------ */ + +var isStr = exports.isStr = _.isStr = function () { + /* Check if value is a string primitive. + * + * |Name |Type |Desc | + * |------|-------|-----------------------------------| + * |val |* |Value to check | + * |return|boolean|True if value is a string primitive| + * + * ```javascript + * isStr('eris'); // -> true + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * objToStr + */ + + function exports(val) { + return objToStr(val) === '[object String]'; + } + + return exports; +}(); + +/* ------------------------------ isEmpty ------------------------------ */ + +var isEmpty = exports.isEmpty = _.isEmpty = function () { + /* Check if value is an empty object or array. + * + * |Name |Type |Desc | + * |------|-------|----------------------| + * |val |* |Value to check | + * |return|boolean|True if value is empty| + * + * ```javascript + * isEmpty([]); // -> true + * isEmpty({}); // -> true + * isEmpty(''); // -> true + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * isArrLike isArr isStr isArgs keys + */ + + function exports(val) { + if (val == null) return true; + + if (isArrLike(val) && (isArr(val) || isStr(val) || isArgs(val))) { + return val.length === 0; + } + + return keys(val).length === 0; + } + + return exports; +}(); + +/* ------------------------------ isBool ------------------------------ */ + +var isBool = exports.isBool = _.isBool = function () { + /* Check if value is a boolean primitive. + * + * |Name |Type |Desc | + * |------|-------|--------------------------| + * |val |* |Value to check | + * |return|boolean|True if value is a boolean| + * + * ```javascript + * isBool(true); // -> true + * isBool(false); // -> true + * isBool(1); // -> false + * ``` + */ + + /* module + * env: all + * test: all + */ + + function exports(val) { + return val === true || val === false; + } + + return exports; +}(); + +/* ------------------------------ isCrossOrig ------------------------------ */ + +var isCrossOrig = exports.isCrossOrig = _.isCrossOrig = function () { + /* Check if a url is cross origin. + */ + + /* dependencies + * startWith + */ + + var origin = window.location.origin; + + function exports(url) { + return !startWith(url, origin); + } + + return exports; +}(); + +/* ------------------------------ isEl ------------------------------ */ + +var isEl = exports.isEl = _.isEl = function () { + /* Check if value is a DOM element. + * + * |Name |Type |Desc | + * |------|-------|------------------------------| + * |val |* |Value to check | + * |return|boolean|True if value is a DOM element| + * + * ```javascript + * isEl(document.body); // -> true + * ``` + */ + + /* module + * env: browser + * test: browser + */ + + function exports(val) { + return !!(val && val.nodeType === 1); + } + + return exports; +}(); + +/* ------------------------------ isErr ------------------------------ */ + +var isErr = exports.isErr = _.isErr = function () { + /* Check if value is an error. + * + * |Name |Type |Desc | + * |------|-------|-------------------------| + * |val |* |Value to check | + * |return|boolean|True if value is an error| + * + * ```javascript + * isErr(new Error()); // -> true + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * objToStr + */ + + function exports(val) { + return objToStr(val) === '[object Error]'; + } + + return exports; +}(); + +/* ------------------------------ isErudaEl ------------------------------ */ + +var isErudaEl = exports.isErudaEl = _.isErudaEl = function () { + /* See if an element is within eruda. + */ + + function exports(el) { + var parentNode = el.parentNode; + + if (!parentNode) return false; + + while (parentNode) { + parentNode = parentNode.parentNode; + if (parentNode && parentNode.id === 'eruda') return true; + } + + return false; + } + + return exports; +}(); + +/* ------------------------------ isMatch ------------------------------ */ + +var isMatch = exports.isMatch = _.isMatch = function () { + /* Check if keys and values in src are contained in obj. + * + * |Name |Type |Desc | + * |------|-------|----------------------------------| + * |obj |object |Object to inspect | + * |src |object |Object of property values to match| + * |return|boolean|True if object is match | + * + * ```javascript + * isMatch({a: 1, b: 2}, {a: 1}); // -> true + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * keys + */ + + function exports(obj, src) { + var _keys = keys(src), + len = _keys.length; + + if (obj == null) return !len; + + obj = Object(obj); + + for (var i = 0; i < len; i++) { + var key = _keys[i]; + if (src[key] !== obj[key] || !(key in obj)) return false; + } + + return true; + } + + return exports; +}(); + +/* ------------------------------ memoize ------------------------------ */ + +var memoize = exports.memoize = _.memoize = function () { + /* Memoize a given function by caching the computed result. + * + * |Name |Type |Desc | + * |--------|--------|------------------------------------| + * |fn |function|Function to have its output memoized| + * |[hashFn]|function|Function to create cache key | + * |return |function|New memoized function | + * + * ```javascript + * var fibonacci = memoize(function(n) + * { + * return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2); + * }); + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * has + */ + + function exports(fn, hashFn) { + var memoize = function memoize(key) { + var cache = memoize.cache, + address = '' + (hashFn ? hashFn.apply(this, arguments) : key); + + if (!has(cache, address)) cache[address] = fn.apply(this, arguments); + + return cache[address]; + }; + + memoize.cache = {}; + + return memoize; + } + + return exports; +}(); + +/* ------------------------------ isMobile ------------------------------ */ + +var isMobile = exports.isMobile = _.isMobile = function (exports) { + /* Check whether client is using a mobile browser using ua. + * + * |Name |Type |Desc | + * |------------------------|-------|-------------------------------------| + * |[ua=navigator.userAgent]|string |User agent | + * |return |boolean|True if ua belongs to mobile browsers| + * + * ```javascript + * isMobile(navigator.userAgent); + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * isBrowser memoize + */ + + var regMobileAll = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i, + regMobileFour = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i; + + exports = memoize(function (ua) { + ua = ua || (isBrowser ? navigator.userAgent : ''); + + return regMobileAll.test(ua) || regMobileFour.test(ua.substr(0, 4)); + }); + + return exports; +}({}); + +/* ------------------------------ isNaN ------------------------------ */ + +var isNaN = exports.isNaN = _.isNaN = function () { + /* Check if value is an NaN. + * + * |Name |Type |Desc | + * |------|-------|-----------------------| + * |val |* |Value to check | + * |return|boolean|True if value is an NaN| + * + * Undefined is not an NaN, different from global isNaN function. + * + * ```javascript + * isNaN(0); // -> false + * isNaN(NaN); // -> true + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * isNum + */ + + function exports(val) { + return isNum(val) && val !== +val; + } + + return exports; +}(); + +/* ------------------------------ isNil ------------------------------ */ + +var isNil = exports.isNil = _.isNil = function () { + /* Check if value is null or undefined, the same as value == null. + * + * |Name |Type |Desc | + * |------|-------|----------------------------------| + * |val |* |Value to check | + * |return|boolean|True if value is null or undefined| + * + * ```javascript + * isNil(null); // -> true + * isNil(void 0); // -> true + * isNil(undefined); // -> true + * isNil(false); // -> false + * isNil(0); // -> false + * isNil([]); // -> false + * ``` + */ + + /* module + * env: all + * test: all + */ + + function exports(val) { + return val == null; + } + + return exports; +}(); + +/* ------------------------------ toSrc ------------------------------ */ + +var toSrc = exports.toSrc = _.toSrc = function () { + /* Convert function to its source code. + * + * |Name |Type |Desc | + * |------|--------|-------------------| + * |fn |function|Function to convert| + * |return|string |Source code | + * + * ```javascript + * toSrc(Math.min); // -> 'function min() { [native code] }' + * toSrc(function () {}) // -> 'function () { }' + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * isNil + */ + + function exports(fn) { + if (isNil(fn)) return ''; + + try { + return fnToStr.call(fn); + /* eslint-disable no-empty */ + } catch (e) {} + + try { + return fn + ''; + /* eslint-disable no-empty */ + } catch (e) {} + + return ''; + } + + var fnToStr = Function.prototype.toString; + + return exports; +}(); + +/* ------------------------------ isNative ------------------------------ */ + +var isNative = exports.isNative = _.isNative = function () { + /* Check if value is a native function. + * + * |Name |Type |Desc | + * |------|-------|----------------------------------| + * |val |* |Value to check | + * |return|boolean|True if value is a native function| + * + * ```javascript + * isNative(function () {}); // -> false + * isNative(Math.min); // -> true + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * isObj isFn has toSrc + */ + + function exports(val) { + if (!isObj(val)) return false; + + if (isFn(val)) return regIsNative.test(toSrc(val)); + + // Detect host constructors (Safari > 4; really typed array specific) + return regIsHostCtor.test(toSrc(val)); + } + + var hasOwnProperty = Object.prototype.hasOwnProperty; + + var regIsNative = new RegExp('^' + toSrc(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); + + var regIsHostCtor = /^\[object .+?Constructor\]$/; + + return exports; +}(); + +/* ------------------------------ isNull ------------------------------ */ + +var isNull = exports.isNull = _.isNull = function () { + /* Check if value is an Null. + * + * |Name |Type |Desc | + * |------|-------|------------------------| + * |val |* |Value to check | + * |return|boolean|True if value is an Null| + * + * ```javascript + * isNull(null); // -> true + * ``` + */ + + /* module + * env: all + * test: all + */ + + function exports(val) { + return val === null; + } + + return exports; +}(); + +/* ------------------------------ isRegExp ------------------------------ */ + +var isRegExp = exports.isRegExp = _.isRegExp = function () { + /* Check if value is a regular expression. + * + * |Name |Type |Desc | + * |------|-------|-------------------------------------| + * |val |* |Value to check | + * |return|boolean|True if value is a regular expression| + * + * ```javascript + * isRegExp(/a/); // -> true + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * objToStr + */ + + function exports(val) { + return objToStr(val) === '[object RegExp]'; + } + + return exports; +}(); + +/* ------------------------------ loadJs ------------------------------ */ + +var loadJs = exports.loadJs = _.loadJs = function () { + /* Inject script tag into page with given src value. + * + * |Name|Type |Desc | + * |----|--------|---------------| + * |src |string |Script source | + * |cb |function|Onload callback| + * + * ```javascript + * loadJs('main.js', function () + * { + * // Do something... + * }); + * ``` + */ + + /* module + * env: browser + * test: browser + */ + + function exports(src, cb) { + var script = document.createElement('script'); + script.src = src; + script.onload = function () { + var isNotLoaded = script.readyState && script.readyState != 'complete' && script.readyState != 'loaded'; + + cb && cb(!isNotLoaded); + }; + document.body.appendChild(script); + } + + return exports; +}(); + +/* ------------------------------ repeat ------------------------------ */ + +var repeat = exports.repeat = _.repeat = function (exports) { + /* Repeat string n-times. + * + * |Name |Type |Desc | + * |------|------|----------------| + * |str |string|String to repeat| + * |n |number|Repeat times | + * |return|string|Repeated string | + * + * ```javascript + * repeat('a', 3); // -> 'aaa' + * repeat('ab', 2); // -> 'abab' + * repeat('*', 0); // -> '' + * ``` + */ + + /* module + * env: all + * test: all + */ + + exports = function exports(str, n) { + var ret = ''; + + if (n < 1) return ''; + + while (n > 0) { + if (n & 1) ret += str; + n >>= 1; + str += str; + } + + return ret; + }; + + return exports; +}({}); + +/* ------------------------------ lpad ------------------------------ */ + +var lpad = exports.lpad = _.lpad = function () { + /* Pad string on the left side if it's shorter than length. + * + * |Name |Type |Desc | + * |-------|------|----------------------| + * |str |string|String to pad | + * |len |number|Padding length | + * |[chars]|string|String used as padding| + * |return |string|Resulted string | + * + * ```javascript + * lpad('a', 5); // -> ' a' + * lpad('a', 5, '-'); // -> '----a' + * lpad('abc', 3, '-'); // -> 'abc' + * lpad('abc', 5, 'ab'); // -> 'ababc' + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * repeat toStr + */ + + function exports(str, len, chars) { + str = toStr(str); + + var strLen = str.length; + + chars = chars || ' '; + + if (strLen < len) str = (repeat(chars, len - strLen) + str).slice(-len); + + return str; + } + + return exports; +}(); + +/* ------------------------------ dateFormat ------------------------------ */ + +var dateFormat = exports.dateFormat = _.dateFormat = function () { + /* Simple but extremely useful date format function. + * + * |Name |Type |Desc | + * |---------------|-------|---------------------| + * |[date=new Date]|Date |Date object to format| + * |mask |string |Format mask | + * |[utc=false] |boolean|UTC or not | + * |[gmt=false] |boolean|GMT or not | + * + * |Mask|Description | + * |----|-----------------------------------------------------------------| + * |d |Day of the month as digits; no leading zero for single-digit days| + * |dd |Day of the month as digits; leading zero for single-digit days | + * |ddd |Day of the week as a three-letter abbreviation | + * |dddd|Day of the week as its full name | + * |m |Month as digits; no leading zero for single-digit months | + * |mm |Month as digits; leading zero for single-digit months | + * |mmm |Month as a three-letter abbreviation | + * |mmmm|Month as its full name | + * |yy |Year as last two digits; leading zero for years less than 10 | + * |yyyy|Year represented by four digits | + * |h |Hours; no leading zero for single-digit hours (12-hour clock) | + * |hh |Hours; leading zero for single-digit hours (12-hour clock) | + * |H |Hours; no leading zero for single-digit hours (24-hour clock) | + * |HH |Hours; leading zero for single-digit hours (24-hour clock) | + * |M |Minutes; no leading zero for single-digit minutes | + * |MM |Minutes; leading zero for single-digit minutes | + * |s |Seconds; no leading zero for single-digit seconds | + * |ss |Seconds; leading zero for single-digit seconds | + * |l L |Milliseconds. l gives 3 digits. L gives 2 digits | + * |t |Lowercase, single-character time marker string: a or p | + * |tt |Lowercase, two-character time marker string: am or pm | + * |T |Uppercase, single-character time marker string: A or P | + * |TT |Uppercase, two-character time marker string: AM or PM | + * |Z |US timezone abbreviation, e.g. EST or MDT | + * |o |GMT/UTC timezone offset, e.g. -0500 or +0230 | + * |S |The date's ordinal suffix (st, nd, rd, or th) | + * |UTC:|Must be the first four characters of the mask | + * + * ```javascript + * dateFormat('isoDate'); // -> 2016-11-19 + * dateFormat('yyyy-mm-dd HH:MM:ss'); // -> 2016-11-19 19:00:04 + * dateFormat(new Date(), 'yyyy-mm-dd'); // -> 2016-11-19 + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * isStr isDate toStr lpad + */ + + function exports(date, mask, utc, gmt) { + if (arguments.length === 1 && isStr(date) && !regNum.test(date)) { + mask = date; + date = undefined; + } + + date = date || new Date(); + + if (!isDate(date)) date = new Date(date); + + mask = toStr(exports.masks[mask] || mask || exports.masks['default']); + + var maskSlice = mask.slice(0, 4); + + if (maskSlice === 'UTC:' || maskSlice === 'GMT:') { + mask = mask.slice(4); + utc = true; + if (maskSlice === 'GMT:') gmt = true; + } + + var prefix = utc ? 'getUTC' : 'get', + d = date[prefix + 'Date'](), + D = date[prefix + 'Day'](), + m = date[prefix + 'Month'](), + y = date[prefix + 'FullYear'](), + H = date[prefix + 'Hours'](), + M = date[prefix + 'Minutes'](), + s = date[prefix + 'Seconds'](), + L = date[prefix + 'Milliseconds'](), + o = utc ? 0 : date.getTimezoneOffset(), + flags = { + d: d, + dd: padZero(d), + ddd: exports.i18n.dayNames[D], + dddd: exports.i18n.dayNames[D + 7], + m: m + 1, + mm: padZero(m + 1), + mmm: exports.i18n.monthNames[m], + mmmm: exports.i18n.monthNames[m + 12], + yy: toStr(y).slice(2), + yyyy: y, + h: H % 12 || 12, + hh: padZero(H % 12 || 12), + H: H, + HH: padZero(H), + M: M, + MM: padZero(M), + s: s, + ss: padZero(s), + l: padZero(L, 3), + L: padZero(Math.round(L / 10)), + t: H < 12 ? 'a' : 'p', + tt: H < 12 ? 'am' : 'pm', + T: H < 12 ? 'A' : 'P', + TT: H < 12 ? 'AM' : 'PM', + Z: gmt ? 'GMT' : utc ? 'UTC' : (toStr(date).match(regTimezone) || ['']).pop().replace(regTimezoneClip, ''), + o: (o > 0 ? '-' : '+') + padZero(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4), + S: ['th', 'st', 'nd', 'rd'][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10] + }; + + return mask.replace(regToken, function (match) { + if (match in flags) return flags[match]; + + return match.slice(1, match.length - 1); + }); + } + + function padZero(str, len) { + return lpad(toStr(str), len || 2, '0'); + } + + var regToken = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g, + regTimezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g, + regNum = /\d/, + regTimezoneClip = /[^-+\dA-Z]/g; + + exports.masks = { + 'default': 'ddd mmm dd yyyy HH:MM:ss', + 'shortDate': 'm/d/yy', + 'mediumDate': 'mmm d, yyyy', + 'longDate': 'mmmm d, yyyy', + 'fullDate': 'dddd, mmmm d, yyyy', + 'shortTime': 'h:MM TT', + 'mediumTime': 'h:MM:ss TT', + 'longTime': 'h:MM:ss TT Z', + 'isoDate': 'yyyy-mm-dd', + 'isoTime': 'HH:MM:ss', + 'isoDateTime': 'yyyy-mm-dd\'T\'HH:MM:sso', + 'isoUtcDateTime': 'UTC:yyyy-mm-dd\'T\'HH:MM:ss\'Z\'', + 'expiresHeaderFormat': 'ddd, dd mmm yyyy HH:MM:ss Z' + }; + + exports.i18n = { + dayNames: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], + monthNames: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] + }; + + return exports; +}(); + +/* ------------------------------ ltrim ------------------------------ */ + +var ltrim = exports.ltrim = _.ltrim = function () { + /* Remove chars or white-spaces from beginning of string. + * + * |Name |Type |Desc | + * |------|------------|------------------| + * |str |string |String to trim | + * |chars |string array|Characters to trim| + * |return|string |Trimmed string | + * + * ```javascript + * ltrim(' abc '); // -> 'abc ' + * ltrim('_abc_', '_'); // -> 'abc_' + * ltrim('_abc_', ['a', '_']); // -> 'bc_' + * ``` + */ + + /* module + * env: all + * test: all + */ + + var regSpace = /^\s+/; + + function exports(str, chars) { + if (chars == null) return str.replace(regSpace, ''); + + var start = 0, + len = str.length, + charLen = chars.length, + found = true, + i, + c; + + while (found && start < len) { + found = false; + i = -1; + c = str.charAt(start); + + while (++i < charLen) { + if (c === chars[i]) { + found = true; + start++; + break; + } + } + } + + return start >= len ? '' : str.substr(start, len); + } + + return exports; +}(); + +/* ------------------------------ matcher ------------------------------ */ + +var matcher = exports.matcher = _.matcher = function () { + /* Return a predicate function that checks if attrs are contained in an object. + * + * |Name |Type |Desc | + * |------|--------|----------------------------------| + * |attrs |object |Object of property values to match| + * |return|function|New predicate function | + * + * ```javascript + * var objects = [ + * {a: 1, b: 2, c: 3 }, + * {a: 4, b: 5, c: 6 } + * ]; + * filter(objects, matcher({a: 4, c: 6 })); // -> [{a: 4, b: 5, c: 6 }] + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * extendOwn isMatch + */ + + function exports(attrs) { + attrs = extendOwn({}, attrs); + + return function (obj) { + return isMatch(obj, attrs); + }; + } + + return exports; +}(); + +/* ------------------------------ safeCb ------------------------------ */ + +var safeCb = exports.safeCb = _.safeCb = function (exports) { + /* Create callback based on input value. + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * isFn isObj optimizeCb matcher identity + */ + + exports = function exports(val, ctx, argCount) { + if (val == null) return identity; + + if (isFn(val)) return optimizeCb(val, ctx, argCount); + + if (isObj(val)) return matcher(val); + + return function (key) { + return function (obj) { + return obj == null ? undefined : obj[key]; + }; + }; + }; + + return exports; +}({}); + +/* ------------------------------ filter ------------------------------ */ + +var filter = exports.filter = _.filter = function () { + /* Iterates over elements of collection, returning an array of all the values that pass a truth test. + * + * |Name |Type |Desc | + * |---------|--------|---------------------------------------| + * |obj |array |Collection to iterate over | + * |predicate|function|Function invoked per iteration | + * |[ctx] |* |Predicate context | + * |return |array |Array of all values that pass predicate| + * + * ```javascript + * filter([1, 2, 3, 4, 5], function (val) + * { + * return val % 2 === 0; + * }); // -> [2, 4] + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * safeCb each + */ + + function exports(obj, predicate, ctx) { + var ret = []; + + predicate = safeCb(predicate, ctx); + + _each(obj, function (val, idx, list) { + if (predicate(val, idx, list)) ret.push(val); + }); + + return ret; + } + + return exports; +}(); + +/* ------------------------------ evalCss ------------------------------ */ + +var evalCss = exports.evalCss = _.evalCss = function () { + /* Eval css. + */ + + /* dependencies + * toStr each filter + */ + + var styleList = [], + scale = 1; + + function exports(css) { + css = toStr(css); + + for (var i = 0, len = styleList.length; i < len; i++) { + if (styleList[i].css === css) return; + } + + var container = exports.container || document.head, + el = document.createElement('style'); + + el.type = 'text/css'; + container.appendChild(el); + + var style = { css: css, el: el, container: container }; + resetStyle(style); + styleList.push(style); + + return style; + } + + exports.setScale = function (s) { + scale = s; + _each(styleList, function (style) { + return resetStyle(style); + }); + }; + + exports.clear = function () { + _each(styleList, function (_ref) { + var container = _ref.container, + el = _ref.el; + return container.removeChild(el); + }); + styleList = []; + }; + + exports.remove = function (style) { + styleList = filter(styleList, function (s) { + return s !== style; + }); + + style.container.removeChild(style.el); + }; + + function resetStyle(_ref2) { + var css = _ref2.css, + el = _ref2.el; + + el.innerText = css.replace(/(\d+)px/g, function ($0, $1) { + return +$1 * scale + 'px'; + }); + } + + return exports; +}(); + +/* ------------------------------ map ------------------------------ */ + +var map = exports.map = _.map = function () { + /* Create an array of values by running each element in collection through iteratee. + * + * |Name |Type |Desc | + * |--------|------------|------------------------------| + * |obj |array object|Collection to iterate over | + * |iteratee|function |Function invoked per iteration| + * |[ctx] |* |Function context | + * |return |array |New mapped array | + * + * ```javascript + * map([4, 8], function (n) { return n * n; }); // -> [16, 64] + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * safeCb keys isArrLike + */ + + function exports(obj, iteratee, ctx) { + iteratee = safeCb(iteratee, ctx); + + var _keys = !isArrLike(obj) && keys(obj), + len = (_keys || obj).length, + results = Array(len); + + for (var i = 0; i < len; i++) { + var curKey = _keys ? _keys[i] : i; + results[i] = iteratee(obj[curKey], curKey, obj); + } + + return results; + } + + return exports; +}(); + +/* ------------------------------ toArr ------------------------------ */ + +var toArr = exports.toArr = _.toArr = function () { + /* Convert value to an array. + * + * |Name |Type |Desc | + * |------|-----|----------------| + * |val |* |Value to convert| + * |return|array|Converted array | + * + * ```javascript + * toArr({a: 1, b: 2}); // -> [{a: 1, b: 2}] + * toArr('abc'); // -> ['abc'] + * toArr(1); // -> [1] + * toArr(null); // -> [] + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * isArrLike map isArr isStr + */ + + function exports(val) { + if (!val) return []; + + if (isArr(val)) return val; + + if (isArrLike(val) && !isStr(val)) return map(val); + + return [val]; + } + + return exports; +}(); + +/* ------------------------------ Class ------------------------------ */ + +var Class = exports.Class = _.Class = function () { + /* Create JavaScript class. + * + * |Name |Type |Desc | + * |---------|--------|---------------------------------| + * |methods |object |Public methods | + * |[statics]|object |Static methods | + * |return |function|Function used to create instances| + * + * ```javascript + * var People = Class({ + * initialize: function People(name, age) + * { + * this.name = name; + * this.age = age; + * }, + * introduce: function () + * { + * return 'I am ' + this.name + ', ' + this.age + ' years old.'; + * } + * }); + * + * var Student = People.extend({ + * initialize: function Student(name, age, school) + * { + * this.callSuper(People, 'initialize', arguments); + * + * this.school = school; + * }, + * introduce: function () + * { + * return this.callSuper(People, 'introduce') + '\n I study at ' + this.school + '.'; + * } + * }, { + * is: function (obj) + * { + * return obj instanceof Student; + * } + * }); + * + * var a = new Student('allen', 17, 'Hogwarts'); + * a.introduce(); // -> 'I am allen, 17 years old. \n I study at Hogwarts.' + * Student.is(a); // -> true + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * extend toArr inherits has safeGet + */ + + function exports(methods, statics) { + return Base.extend(methods, statics); + } + + function makeClass(parent, methods, statics) { + statics = statics || {}; + var className = methods.className || safeGet(methods, 'initialize.name') || ''; + delete methods.className; + + var ctor = new Function('toArr', 'return function ' + className + '()' + '{' + 'var args = toArr(arguments);' + 'return this.initialize ? this.initialize.apply(this, args) || this : this;' + '};')(toArr); + + inherits(ctor, parent); + ctor.prototype.constructor = ctor; + + ctor.extend = function (methods, statics) { + return makeClass(ctor, methods, statics); + }; + ctor.inherits = function (Class) { + inherits(ctor, Class); + }; + ctor.methods = function (methods) { + extend(ctor.prototype, methods); + return ctor; + }; + ctor.statics = function (statics) { + extend(ctor, statics); + return ctor; + }; + + ctor.methods(methods).statics(statics); + + return ctor; + } + + var Base = exports.Base = makeClass(Object, { + className: 'Base', + callSuper: function callSuper(parent, name, args) { + var superMethod = parent.prototype[name]; + + return superMethod.apply(this, args); + }, + toString: function toString() { + return this.constructor.name; + } + }); + + return exports; +}(); + +/* ------------------------------ Enum ------------------------------ */ + +var Enum = exports.Enum = _.Enum = function (exports) { + /* Enum type implementation. + * + * ### constructor + * + * |Name|Type |Desc | + * |----|-----|----------------| + * |arr |array|Array of strings| + * + * |Name|Type |Desc | + * |----|------|----------------------| + * |obj |object|Pairs of key and value| + * + * ```javascript + * var importance = new Enum([ + * 'NONE', 'TRIVIAL', 'REGULAR', 'IMPORTANT', 'CRITICAL' + * ]); + * + * if (val === importance.CRITICAL) + * { + * // Do something. + * } + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * Class freeze isArr each keys + */ + + exports = Class({ + initialize: function Enum(map) { + if (isArr(map)) { + this.size = map.length; + _each(map, function (member, val) { + this[member] = val; + }, this); + } else { + this.size = keys(map).length; + _each(map, function (val, member) { + this[member] = val; + }, this); + } + + freeze(this); + } + }); + + return exports; +}({}); + +/* ------------------------------ Select ------------------------------ */ + +var Select = exports.Select = _.Select = function (exports) { + /* Simple wrapper of querySelectorAll to make dom selection easier. + * + * ### constructor + * + * |Name |Type |Desc | + * |--------|------|-------------------| + * |selector|string|Dom selector string| + * + * ### find + * + * Get desdendants of current matched elements. + * + * |Name |Type |Desc | + * |--------|------|-------------------| + * |selector|string|Dom selector string| + * + * ### each + * + * Iterate over matched elements. + * + * |Name|Type |Desc | + * |----|--------|------------------------------------| + * |fn |function|Function to execute for each element| + * + * ```javascript + * var $test = new Select('#test'); + * $test.find('.test').each(function (idx, element) + * { + * // Manipulate dom nodes + * }); + * ``` + */ + + /* module + * env: browser + * test: browser + */ + + /* dependencies + * Class isStr each + */ + + exports = Class({ + className: 'Select', + initialize: function initialize(selector) { + this.length = 0; + + if (!selector) return this; + + if (isStr(selector)) return rootSelect.find(selector); + + if (selector.nodeType) { + this[0] = selector; + this.length = 1; + } + }, + find: function find(selector) { + var ret = new Select(); + + this.each(function () { + mergeArr(ret, this.querySelectorAll(selector)); + }); + + return ret; + }, + each: function each(fn) { + _each(this, function (element, idx) { + fn.call(element, idx, element); + }); + + return this; + } + }); + + var rootSelect = new exports(document); + + function mergeArr(first, second) { + var len = second.length, + i = first.length; + + for (var j = 0; j < len; j++) { + first[i++] = second[j]; + }first.length = i; + + return first; + } + + return exports; +}({}); + +/* ------------------------------ $safeEls ------------------------------ */ + +var $safeEls = exports.$safeEls = _.$safeEls = function () { + /* Convert value into an array, if it's a string, do querySelector. + * + * |Name |Type |Desc | + * |------|--------------------|-----------------| + * |value |element array string|Value to convert | + * |return|array |Array of elements| + * + * ```javascript + * $safeEls('.test'); // -> Array of elements with test class + * ``` + */ + + /* module + * env: browser + * test: browser + */ + + /* dependencies + * isStr toArr Select + */ + + function exports(val) { + return toArr(isStr(val) ? new Select(val) : val); + } + + return exports; +}(); + +/* ------------------------------ $attr ------------------------------ */ + +var $attr = exports.$attr = _.$attr = function () { + /* Element attribute manipulation. + * + * Get the value of an attribute for the first element in the set of matched elements. + * + * |Name |Type |Desc | + * |-------|--------------------|--------------------------------| + * |element|string array element|Elements to manipulate | + * |name |string |Attribute name | + * |return |string |Attribute value of first element| + * + * Set one or more attributes for the set of matched elements. + * + * |Name |Type |Desc | + * |-------|--------------------|----------------------| + * |element|string array element|Elements to manipulate| + * |name |string |Attribute name | + * |value |string |Attribute value | + * + * |Name |Type |Desc | + * |----------|--------------------|--------------------------------------| + * |element |string array element|Elements to manipulate | + * |attributes|object |Object of attribute-value pairs to set| + * + * ### remove + * + * Remove an attribute from each element in the set of matched elements. + * + * |Name |Type |Desc | + * |-------|--------------------|----------------------| + * |element|string array element|Elements to manipulate| + * |name |string |Attribute name | + * + * ```javascript + * $attr('#test', 'attr1', 'test'); + * $attr('#test', 'attr1'); // -> test + * $attr.remove('#test', 'attr1'); + * $attr('#test', { + * 'attr1': 'test', + * 'attr2': 'test' + * }); + * ``` + */ + + /* module + * env: browser + * test: browser + */ + + /* dependencies + * toArr isObj isStr each isUndef $safeEls + */ + + function exports(els, name, val) { + els = $safeEls(els); + + var isGetter = isUndef(val) && isStr(name); + if (isGetter) return getAttr(els[0], name); + + var attrs = name; + if (!isObj(attrs)) { + attrs = {}; + attrs[name] = val; + } + + setAttr(els, attrs); + } + + exports.remove = function (els, names) { + els = $safeEls(els); + names = toArr(names); + + _each(els, function (node) { + _each(names, function (name) { + node.removeAttribute(name); + }); + }); + }; + + function getAttr(el, name) { + return el.getAttribute(name); + } + + function setAttr(els, attrs) { + _each(els, function (el) { + _each(attrs, function (val, name) { + el.setAttribute(name, val); + }); + }); + } + + return exports; +}(); + +/* ------------------------------ $data ------------------------------ */ + +var $data = exports.$data = _.$data = function () { + /* Wrapper of $attr, adds data- prefix to keys. + * + * ```javascript + * $data('#test', 'attr1', 'eustia'); + * ``` + */ + + /* module + * env: browser + * test: browser + */ + + /* dependencies + * $attr isStr isObj each + */ + + function exports(nodes, name, val) { + var dataName = name; + + if (isStr(name)) dataName = 'data-' + name; + if (isObj(name)) { + dataName = {}; + _each(name, function (val, key) { + dataName['data-' + key] = val; + }); + } + + return $attr(nodes, dataName, val); + } + + return exports; +}(); + +/* ------------------------------ $css ------------------------------ */ + +var $css = exports.$css = _.$css = function () { + /* Element css manipulation. + * + * Get the computed style properties for the first element in the set of matched elements. + * + * |Name |Type |Desc | + * |-------|--------------------|--------------------------| + * |element|string array element|Elements to manipulate | + * |name |string |Property name | + * |return |string |Css value of first element| + * + * Set one or more CSS properties for the set of matched elements. + * + * |Name |Type |Desc | + * |-------|--------------------|----------------------| + * |element|string array element|Elements to manipulate| + * |name |string |Property name | + * |value |string |Css value | + * + * |Name |Type |Desc | + * |----------|--------------------|--------------------------------| + * |element |string array element|Elements to manipulate | + * |properties|object |Object of css-value pairs to set| + * + * ```javascript + * $css('#test', { + * 'color': '#fff', + * 'background': 'black' + * }); + * $css('#test', 'display', 'block'); + * $css('#test', 'color'); // -> #fff + * ``` + */ + + /* module + * env: browser + * test: browser + */ + + /* dependencies + * isStr isObj camelCase kebabCase isUndef contain isNum $safeEls startWith + */ + + function exports(nodes, name, val) { + nodes = $safeEls(nodes); + + var isGetter = isUndef(val) && isStr(name); + if (isGetter) return getCss(nodes[0], name); + + var css = name; + if (!isObj(css)) { + css = {}; + css[name] = val; + } + + setCss(nodes, css); + } + + function getCss(node, name) { + return node.style[camelCase(name)] || getComputedStyle(node, '').getPropertyValue(name); + } + + function setCss(nodes, css) { + _each(nodes, function (node) { + var cssText = ';'; + _each(css, function (val, key) { + key = dasherize(key); + cssText += key + ':' + addPx(key, val) + ';'; + }); + node.style.cssText += cssText; + }); + } + + var cssNumProps = ['column-count', 'columns', 'font-weight', 'line-weight', 'opacity', 'z-index', 'zoom']; + + function addPx(key, val) { + var needPx = isNum(val) && !contain(cssNumProps, kebabCase(key)); + + return needPx ? val + 'px' : val; + } + + function dasherize(str) { + // -webkit- -o- + if (startWith(str, '-')) return str; + + return kebabCase(str); + } + + return exports; +}(); + +/* ------------------------------ $insert ------------------------------ */ + +var $insert = exports.$insert = _.$insert = function (exports) { + /* Insert html on different position. + * + * ### before + * + * Insert content before elements. + * + * ### after + * + * Insert content after elements. + * + * ### prepend + * + * Insert content to the beginning of elements. + * + * ### append + * + * Insert content to the end of elements. + * + * |Name |Type |Desc | + * |-------|--------------------|----------------------| + * |element|string array element|Elements to manipulate| + * |content|string |Html strings | + * + * ```javascript + * //
+ * $insert.before('#test', '
eris
'); + * // ->
eris
+ * $insert.after('#test', '
eris
'); + * // ->
eris
+ * $insert.prepend('#test', '
eris
'); + * // ->
eris
+ * $insert.append('#test', '
eris
'); + * // ->
eris
+ * ``` + */ + + /* module + * env: browser + * test: browser + */ + + /* dependencies + * each $safeEls + */ + + exports = { + before: insertFactory('beforebegin'), + after: insertFactory('afterend'), + append: insertFactory('beforeend'), + prepend: insertFactory('afterbegin') + }; + + function insertFactory(type) { + return function (nodes, val) { + nodes = $safeEls(nodes); + + _each(nodes, function (node) { + node.insertAdjacentHTML(type, val); + }); + }; + } + + return exports; +}({}); + +/* ------------------------------ $offset ------------------------------ */ + +var $offset = exports.$offset = _.$offset = function () { + /* Get the position of the element in document. + * + * |Name |Type |Desc | + * |-------|--------------------|----------------------| + * |element|string array element|Elements to get offset| + * + * ```javascript + * $offset('#test'); // -> {left: 0, top: 0, width: 0, height: 0} + * ``` + */ + + /* module + * env: browser + * test: browser + */ + + /* dependencies + * $safeEls + */ + + function exports(els) { + els = $safeEls(els); + + var el = els[0]; + + var clientRect = el.getBoundingClientRect(); + + return { + left: clientRect.left + window.pageXOffset, + top: clientRect.top + window.pageYOffset, + width: Math.round(clientRect.width), + height: Math.round(clientRect.height) + }; + } + + return exports; +}(); + +/* ------------------------------ $property ------------------------------ */ + +var $property = exports.$property = _.$property = function (exports) { + /* Element property html, text, val getter and setter. + * + * ### html + * + * Get the HTML contents of the first element in the set of matched elements or + * set the HTML contents of every matched element. + * + * ### text + * + * Get the combined text contents of each element in the set of matched + * elements, including their descendants, or set the text contents of the + * matched elements. + * + * ### val + * + * Get the current value of the first element in the set of matched elements or + * set the value of every matched element. + * + * ```javascript + * $property.html('#test', 'eris'); + * $property.html('#test'); // -> eris + * ``` + */ + + /* module + * env: browser + * test: browser + */ + + /* dependencies + * isUndef each $safeEls + */ + + exports = { + html: propFactory('innerHTML'), + text: propFactory('textContent'), + val: propFactory('value') + }; + + function propFactory(name) { + return function (nodes, val) { + nodes = $safeEls(nodes); + + if (isUndef(val)) return nodes[0][name]; + + _each(nodes, function (node) { + node[name] = val; + }); + }; + } + + return exports; +}({}); + +/* ------------------------------ $remove ------------------------------ */ + +var $remove = exports.$remove = _.$remove = function () { + /* Remove the set of matched elements from the DOM. + * + * |Name |Type |Desc | + * |-------|--------------------|------------------| + * |element|string array element|Elements to delete| + * + * ```javascript + * $remove('#test'); + * ``` + */ + + /* module + * env: browser + * test: browser + */ + + /* dependencies + * each $safeEls + */ + + function exports(els) { + els = $safeEls(els); + + _each(els, function (el) { + var parent = el.parentNode; + + if (parent) parent.removeChild(el); + }); + } + + return exports; +}(); + +/* ------------------------------ $show ------------------------------ */ + +var $show = exports.$show = _.$show = function () { + /* Show elements. + * + * |Name |Type |Desc | + * |-------|--------------------|----------------| + * |element|string array element|Elements to show| + * + * ```javascript + * $show('#test'); + * ``` + */ + + /* module + * env: browser + * test: browser + */ + + /* dependencies + * each $safeEls + */ + + function exports(els) { + els = $safeEls(els); + + _each(els, function (el) { + if (isHidden(el)) { + el.style.display = getDefDisplay(el.nodeName); + } + }); + } + + function isHidden(el) { + return getComputedStyle(el, '').getPropertyValue('display') == 'none'; + } + + var elDisplay = {}; + + function getDefDisplay(elName) { + var el, display; + + if (!elDisplay[elName]) { + el = document.createElement(elName); + document.documentElement.appendChild(el); + display = getComputedStyle(el, '').getPropertyValue('display'); + el.parentNode.removeChild(el); + display == 'none' && (display = 'block'); + elDisplay[elName] = display; + } + + return elDisplay[elName]; + } + + return exports; +}(); + +/* ------------------------------ delegate ------------------------------ */ + +var delegate = exports.delegate = _.delegate = function (exports) { + /* Event delegation. + * + * ### add + * + * Add event delegation. + * + * |Name |Type |Desc | + * |--------|--------|--------------| + * |el |element |Parent element| + * |type |string |Event type | + * |selector|string |Match selector| + * |cb |function|Event callback| + * + * ### remove + * + * Remove event delegation. + * + * ```javascript + * var container = document.getElementById('container'); + * function clickHandler() + * { + * // Do something... + * } + * delegate.add(container, 'click', '.children', clickHandler); + * delegate.remove(container, 'click', '.children', clickHandler); + * ``` + */ + + /* module + * env: browser + * test: browser + */ + + /* dependencies + * Class contain + */ + + function retTrue() { + return true; + } + function retFalse() { + return false; + } + + function trigger(e) { + var handlers = this.events[e.type], + handler, + handlerQueue = formatHandlers.call(this, e, handlers); + + e = new exports.Event(e); + + var i = 0, + j, + matched, + ret; + + while ((matched = handlerQueue[i++]) && !e.isPropagationStopped()) { + e.curTarget = matched.el; + j = 0; + while ((handler = matched.handlers[j++]) && !e.isImmediatePropagationStopped()) { + ret = handler.handler.apply(matched.el, [e]); + + if (ret === false) { + e.preventDefault(); + e.stopPropagation(); + } + } + } + } + + function formatHandlers(e, handlers) { + var current = e.target, + ret = [], + delegateCount = handlers.delegateCount, + selector, + matches, + handler, + i; + + if (current.nodeType) { + for (; current !== this; current = current.parentNode || this) { + matches = []; + for (i = 0; i < delegateCount; i++) { + handler = handlers[i]; + selector = handler.selector + ' '; + if (matches[selector] === undefined) { + matches[selector] = contain(this.querySelectorAll(selector), current); + } + if (matches[selector]) matches.push(handler); + } + if (matches.length) ret.push({ el: current, handlers: matches }); + } + } + + if (delegateCount < handlers.length) { + ret.push({ + el: this, + handlers: handlers.slice(delegateCount) + }); + } + + return ret; + } + + exports = { + add: function add(el, type, selector, fn) { + var handler = { + selector: selector, + handler: fn + }, + handlers; + + if (!el.events) el.events = {}; + + if (!(handlers = el.events[type])) { + handlers = el.events[type] = []; + handlers.delegateCount = 0; + el.addEventListener(type, function (e) { + trigger.apply(el, arguments); + }, false); + } + + selector ? handlers.splice(handlers.delegateCount++, 0, handler) : handlers.push(handler); + }, + remove: function remove(el, type, selector, fn) { + var events = el.events; + + if (!events || !events[type]) return; + + var handlers = events[type], + i = handlers.length, + handler; + + while (i--) { + handler = handlers[i]; + + if ((!selector || handler.selector == selector) && handler.handler == fn) { + handlers.splice(i, 1); + if (handler.selector) { + handlers.delegateCount--; + } + } + } + }, + Event: Class({ + className: 'Event', + initialize: function Event(e) { + this.origEvent = e; + }, + isDefaultPrevented: retFalse, + isPropagationStopped: retFalse, + isImmediatePropagationStopped: retFalse, + preventDefault: function preventDefault() { + var e = this.origEvent; + + this.isDefaultPrevented = retTrue; + if (e && e.preventDefault) e.preventDefault(); + }, + stopPropagation: function stopPropagation() { + var e = this.origEvent; + + this.isPropagationStopped = retTrue; + if (e && e.stopPropagation) e.stopPropagation(); + }, + stopImmediatePropagation: function stopImmediatePropagation() { + var e = this.origEvent; + + this.isImmediatePropagationStopped = retTrue; + if (e && e.stopImmediatePropagation) e.stopImmediatePropagation(); + this.stopPropagation(); + } + }) + }; + + return exports; +}({}); + +/* ------------------------------ $event ------------------------------ */ + +var $event = exports.$event = _.$event = function (exports) { + /* bind events to certain dom elements. + * + * ```javascript + * function clickHandler() + * { + * // Do something... + * } + * $event.on('#test', 'click', clickHandler); + * $event.off('#test', 'click', clickHandler); + * ``` + */ + + /* module + * env: browser + * test: browser + */ + + /* dependencies + * delegate isUndef $safeEls + */ + + exports = { + on: eventFactory('add'), + off: eventFactory('remove') + }; + + function eventFactory(type) { + return function (nodes, event, selector, handler) { + nodes = $safeEls(nodes); + + if (isUndef(handler)) { + handler = selector; + selector = undefined; + } + + _each(nodes, function (node) { + delegate[type](node, event, selector, handler); + }); + }; + } + + return exports; +}({}); + +/* ------------------------------ concat ------------------------------ */ + +var concat = exports.concat = _.concat = function () { + /* Concat multiple arrays into a single array. + * + * |Name |Type |Desc | + * |------|-----|------------------| + * |...arr|array|Arrays to concat | + * |return|array|Concatenated array| + * + * ```javascript + * concat([1, 2], [3], [4, 5]); // -> [1, 2, 3, 4, 5] + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * toArr + */ + + function exports() { + var args = toArr(arguments), + ret = []; + + for (var i = 0, len = args.length; i < len; i++) { + ret = ret.concat(toArr(args[i])); + } + + return ret; + } + + return exports; +}(); + +/* ------------------------------ some ------------------------------ */ + +var some = exports.some = _.some = function () { + /* Check if predicate return truthy for any element. + * + * |Name |Type |Desc | + * |---------|------------|----------------------------------------------| + * |obj |array object|Collection to iterate over | + * |predicate|function |Function to invoked per iteration | + * |ctx |* |Predicate context | + * |return |boolean |True if any element passes the predicate check| + * + * ```javascript + * some([2, 5], function (val) + * { + * return val % 2 === 0; + * }); // -> true + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * safeCb isArrLike keys + */ + + function exports(obj, predicate, ctx) { + predicate = safeCb(predicate, ctx); + + var _keys = !isArrLike(obj) && keys(obj), + len = (_keys || obj).length; + + for (var i = 0; i < len; i++) { + var key = _keys ? _keys[i] : i; + if (predicate(obj[key], key, obj)) return true; + } + + return false; + } + + return exports; +}(); + +/* ------------------------------ $class ------------------------------ */ + +var $class = exports.$class = _.$class = function (exports) { + /* Element class manipulations. + * + * ### add + * + * Add the specified class(es) to each element in the set of matched elements. + * + * |Name |Type |Desc | + * |-------|--------------------|----------------------| + * |element|string array element|Elements to manipulate| + * |names |string array |Classes to add | + * + * ### has + * + * Determine whether any of the matched elements are assigned the given class. + * + * |Name |Type |Desc | + * |-------|--------------------|-------------------------------------| + * |element|string array element|Elements to manipulate | + * |name |string |Class name | + * |return |boolean |True if elements has given class name| + * + * ### toggle + * + * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the state argument. + * + * |Name |Type |Desc | + * |-------|--------------------|----------------------| + * |element|string array element|Elements to manipulate| + * |name |string |Class name to toggle | + * + * ### remove + * + * Remove a single class, multiple classes, or all classes from each element in the set of matched elements. + * + * |Name |Type |Desc | + * |-------|--------------------|----------------------| + * |element|string array element|Elements to manipulate| + * |names |string |Class names to remove | + * + * ```javascript + * $class.add('#test', 'class1'); + * $class.add('#test', ['class1', 'class2']); + * $class.has('#test', 'class1'); // -> true + * $class.remove('#test', 'class1'); + * $class.has('#test', 'class1'); // -> false + * $class.toggle('#test', 'class1'); + * $class.has('#test', 'class1'); // -> true + * ``` + */ + + /* module + * env: browser + * test: browser + */ + + /* dependencies + * toArr some $safeEls isStr + */ + + exports = { + add: function add(els, name) { + els = $safeEls(els); + var names = safeName(name); + + _each(els, function (el) { + var classList = []; + + _each(names, function (name) { + if (!exports.has(el, name)) classList.push(name); + }); + + if (classList.length !== 0) el.className += ' ' + classList.join(' '); + }); + }, + has: function has(els, name) { + els = $safeEls(els); + + var regName = new RegExp('(^|\\s)' + name + '(\\s|$)'); + + return some(els, function (el) { + return regName.test(el.className); + }); + }, + toggle: function toggle(els, name) { + els = $safeEls(els); + + _each(els, function (el) { + if (!exports.has(el, name)) return exports.add(el, name); + + exports.remove(el, name); + }); + }, + remove: function remove(els, name) { + els = $safeEls(els); + var names = safeName(name); + + _each(els, function (el) { + _each(names, function (name) { + el.classList.remove(name); + }); + }); + } + }; + + function safeName(name) { + return isStr(name) ? name.split(/\s+/) : toArr(name); + } + + return exports; +}({}); + +/* ------------------------------ $ ------------------------------ */ + +var $ = exports.$ = _.$ = function () { + /* jQuery like style dom manipulator. + * + * ### Available methods + * + * offset, hide, show, first, last, get, eq, on, off, html, text, val, css, attr, + * data, rmAttr, remove, addClass, rmClass, toggleClass, hasClass, append, prepend, + * before, after + * + * ```javascript + * var $btn = $('#btn'); + * $btn.html('eustia'); + * $btn.addClass('btn'); + * $btn.show(); + * $btn.on('click', function () + * { + * // Do something... + * }); + * ``` + */ + + /* module + * env: browser + * test: browser + */ + + /* dependencies + * Select $offset $show $css $attr $property last $remove $data $event $class $insert isUndef isStr + */ + + function exports(selector) { + return new Select(selector); + } + + Select.methods({ + offset: function offset() { + return $offset(this); + }, + hide: function hide() { + return this.css('display', 'none'); + }, + show: function show() { + $show(this); + + return this; + }, + first: function first() { + return exports(this[0]); + }, + last: function last() { + return exports(_last(this)); + }, + get: function get(idx) { + return this[idx]; + }, + eq: function eq(idx) { + return exports(this[idx]); + }, + on: function on(event, selector, handler) { + $event.on(this, event, selector, handler); + + return this; + }, + off: function off(event, selector, handler) { + $event.off(this, event, selector, handler); + + return this; + }, + html: function html(val) { + var result = $property.html(this, val); + + if (isUndef(val)) return result; + + return this; + }, + text: function text(val) { + var result = $property.text(this, val); + + if (isUndef(val)) return result; + + return this; + }, + val: function val(_val) { + var result = $property.val(this, _val); + + if (isUndef(_val)) return result; + + return this; + }, + css: function css(name, val) { + var result = $css(this, name, val); + + if (isGetter(name, val)) return result; + + return this; + }, + attr: function attr(name, val) { + var result = $attr(this, name, val); + + if (isGetter(name, val)) return result; + + return this; + }, + data: function data(name, val) { + var result = $data(this, name, val); + + if (isGetter(name, val)) return result; + + return this; + }, + rmAttr: function rmAttr(name) { + $attr.remove(this, name); + + return this; + }, + remove: function remove() { + $remove(this); + + return this; + }, + addClass: function addClass(name) { + $class.add(this, name); + + return this; + }, + rmClass: function rmClass(name) { + $class.remove(this, name); + + return this; + }, + toggleClass: function toggleClass(name) { + $class.toggle(this, name); + + return this; + }, + hasClass: function hasClass(name) { + return $class.has(this, name); + }, + parent: function parent() { + return exports(this[0].parentNode); + }, + append: function append(val) { + $insert.append(this, val); + + return this; + }, + prepend: function prepend(val) { + $insert.prepend(this, val); + + return this; + }, + before: function before(val) { + $insert.before(this, val); + + return this; + }, + after: function after(val) { + $insert.after(this, val); + + return this; + } + }); + + function isGetter(name, val) { + return isUndef(val) && isStr(name); + } + + return exports; +}(); + +/* ------------------------------ memStorage ------------------------------ */ + +var memStorage = exports.memStorage = _.memStorage = function (exports) { + /* Memory-backed implementation of the Web Storage API. + * + * A replacement for environments where localStorage or sessionStorage is not available. + * + * ```javascript + * var localStorage = window.localStorage || memStorage; + * localStorage.setItem('test', 'eris'); + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * keys + */ + + exports = { + getItem: function getItem(key) { + return (API_KEYS[key] ? cloak[key] : this[key]) || null; + }, + setItem: function setItem(key, val) { + API_KEYS[key] ? cloak[key] = val : this[key] = val; + }, + removeItem: function removeItem(key) { + API_KEYS[key] ? delete cloak[key] : delete this[key]; + }, + key: function key(i) { + var keys = enumerableKeys(); + + return i >= 0 && i < keys.length ? keys[i] : null; + }, + clear: function clear() { + var keys = uncloakedKeys(); + + /* eslint-disable no-cond-assign */ + for (var i = 0, key; key = keys[i]; i++) { + delete this[key]; + }keys = cloakedKeys(); + + /* eslint-disable no-cond-assign */ + for (i = 0; key = keys[i]; i++) { + delete cloak[key]; + } + } + }; + + Object.defineProperty(exports, 'length', { + enumerable: false, + configurable: true, + get: function get() { + return enumerableKeys().length; + } + }); + + var cloak = {}; + + var API_KEYS = { + getItem: 1, + setItem: 1, + removeItem: 1, + key: 1, + clear: 1, + length: 1 + }; + + function enumerableKeys() { + return uncloakedKeys().concat(cloakedKeys()); + } + + function uncloakedKeys() { + return keys(exports).filter(function (key) { + return !API_KEYS[key]; + }); + } + + function cloakedKeys() { + return keys(cloak); + } + + return exports; +}({}); + +/* ------------------------------ safeStorage ------------------------------ */ + +var safeStorage = exports.safeStorage = _.safeStorage = function () { + /* Safe localStorage and sessionStorage. + */ + + /* dependencies + * isUndef memStorage + */ + + function exports(type, memReplacement) { + if (isUndef(memReplacement)) memReplacement = true; + + var ret; + + switch (type) { + case 'local': + ret = window.localStorage;break; + case 'session': + ret = window.sessionStorage;break; + } + + try { + // Safari private browsing + var x = 'test-localStorage-' + Date.now(); + ret.setItem(x, x); + var y = ret.getItem(x); + ret.removeItem(x); + if (y !== x) throw new Error(); + } catch (e) { + if (memReplacement) return memStorage; + return; + } + + return ret; + } + + return exports; +}(); + +/* ------------------------------ meta ------------------------------ */ + +var meta = exports.meta = _.meta = function () { + /* Document meta manipulation, turn name and content into key value pairs. + * + * Get meta content with given name. If name is omitted, all pairs will be return. + * + * |Name |Type |Desc | + * |------|------------|------------| + * |[name]|string array|Meta name | + * |return|string |Meta content| + * + * Set meta content. + * + * |Name |Type |Desc | + * |-------|------|------------| + * |name |string|Meta name | + * |content|string|Meta content| + * + * |Name |Type |Desc | + * |-----|------|----------------------------| + * |metas|object|Object of name content pairs| + * + * ### remove + * + * Remove metas. + * + * |Name|Type |Desc | + * |----|------------|---------| + * |name|string array|Meta name| + * + * ```javascript + * // + * meta(); // -> {a: '1', b: '2', c: '3'} + * meta('a'); // -> '1' + * meta(['a', 'c']); // -> {a: '1', c: '3'} + * meta('d', '4'); + * meta({ + * d: '5', + * e: '6', + * f: '7' + * }); + * meta.remove('d'); + * meta.remove(['e', 'f']); + * ``` + */ + + /* module + * env: browser + * test: browser + */ + + /* dependencies + * each isStr isUndef contain isArr isObj toArr + */ + + function exports(name, content) { + if (isUndef(name)) return getAllMeta(); + + var isGetter = isStr(name) && isUndef(content) || isArr(name); + if (isGetter) return getMeta(name); + + var metas = name; + if (!isObj(metas)) { + metas = {}; + metas[name] = content; + } + setMeta(metas); + } + + exports.remove = function (nameList) { + nameList = toArr(nameList); + + _each(nameList, function (name) { + var meta = selectMeta(name); + if (meta) doc.head.removeChild(meta); + }); + }; + + var doc = document; + + function getAllMeta() { + var ret = {}; + + metaEach(function (name, content) { + ret[name] = content; + }); + + return ret; + } + + function getMeta(name) { + if (isStr(name)) { + var meta = selectMeta(name); + + if (meta) return meta.getAttribute('content'); + } else { + var ret = {}; + + metaEach(function (key, val) { + if (contain(name, key)) ret[key] = val; + }); + + return ret; + } + } + + function setMeta(metas) { + _each(metas, function (content, name) { + var meta = selectMeta(name); + if (meta) return meta.setAttribute('content', content); + + meta = doc.createElement('meta'); + meta.setAttribute('name', name); + meta.setAttribute('content', content); + doc.head.appendChild(meta); + }); + } + + function metaEach(fn) { + var metaList = doc.querySelectorAll('meta'); + + _each(metaList, function (meta) { + var name = meta.getAttribute('name'), + content = meta.getAttribute('content'); + + if (!name || !content) return; + + fn(name, content); + }); + } + + function selectMeta(name) { + return doc.querySelector('meta[name="' + name + '"]'); + } + + return exports; +}(); + +/* ------------------------------ nextTick ------------------------------ */ + +var nextTick = exports.nextTick = _.nextTick = function (exports) { + /* Next tick for both node and browser. + * + * |Name|Type |Desc | + * |----|--------|----------------| + * |cb |function|Function to call| + * + * Use process.nextTick if available. + * + * Otherwise setImmediate or setTimeout is used as fallback. + * + * ```javascript + * nextTick(function () + * { + * // Do something... + * }); + * ``` + */ + + /* module + * env: all + * test: all + */ + + if ((typeof process === 'undefined' ? 'undefined' : (0, _typeof3.default)(process)) === 'object' && process.nextTick) { + exports = process.nextTick; + } else if (typeof _setImmediate3.default === 'function') { + exports = function exports(cb) { + (0, _setImmediate3.default)(ensureCallable(cb)); + }; + } else { + exports = function exports(cb) { + setTimeout(ensureCallable(cb), 0); + }; + } + + function ensureCallable(fn) { + if (typeof fn !== 'function') throw new TypeError(fn + ' is not a function'); + + return fn; + } + + return exports; +}({}); + +/* ------------------------------ now ------------------------------ */ + +var now = exports.now = _.now = function (exports) { + /* Gets the number of milliseconds that have elapsed since the Unix epoch. + * + * ```javascript + * now(); // -> 1468826678701 + * ``` + */ + + /* module + * env: all + * test: all + */ + + exports = Date.now || function () { + return new Date().getTime(); + }; + + return exports; +}({}); + +/* ------------------------------ restArgs ------------------------------ */ + +var restArgs = exports.restArgs = _.restArgs = function () { + /* This accumulates the arguments passed into an array, after a given index. + * + * |Name |Type |Desc | + * |----------|--------|---------------------------------------| + * |function |function|Function that needs rest parameters | + * |startIndex|number |The start index to accumulates | + * |return |function|Generated function with rest parameters| + * + * ```javascript + * var paramArr = _.restArgs(function (rest) { return rest }); + * paramArr(1, 2, 3, 4); // -> [1, 2, 3, 4] + * ``` + */ + + /* module + * env: all + * test: all + */ + + function exports(fn, startIdx) { + startIdx = startIdx == null ? fn.length - 1 : +startIdx; + + return function () { + var len = Math.max(arguments.length - startIdx, 0), + rest = new Array(len), + i; + + for (i = 0; i < len; i++) { + rest[i] = arguments[i + startIdx]; + } // Call runs faster than apply. + switch (startIdx) { + case 0: + return fn.call(this, rest); + case 1: + return fn.call(this, arguments[0], rest); + case 2: + return fn.call(this, arguments[0], arguments[1], rest); + } + + var args = new Array(startIdx + 1); + + for (i = 0; i < startIdx; i++) { + args[i] = arguments[i]; + }args[startIdx] = rest; + + return fn.apply(this, args); + }; + } + + return exports; +}(); + +/* ------------------------------ partial ------------------------------ */ + +var partial = exports.partial = _.partial = function (exports) { + /* Partially apply a function by filling in given arguments. + * + * |Name |Type |Desc | + * |-----------|--------|----------------------------------------| + * |fn |function|Function to partially apply arguments to| + * |...partials|* |Arguments to be partially applied | + * |return |function|New partially applied function | + * + * ```javascript + * var sub5 = partial(function (a, b) { return b - a }, 5); + * sub(20); // -> 15 + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * restArgs toArr + */ + + exports = restArgs(function (fn, partials) { + return function () { + var args = []; + + args = args.concat(partials); + args = args.concat(toArr(arguments)); + + return fn.apply(this, args); + }; + }); + + return exports; +}({}); + +/* ------------------------------ once ------------------------------ */ + +var _once = _.once = function (exports) { + /* Create a function that invokes once. + * + * |Name |Type |Desc | + * |------|--------|-----------------------| + * |fn |function|Function to restrict | + * |return|function|New restricted function| + * + * ```javascript + * function init() {}; + * var initOnce = once(init); + * initOnce(); + * initOnce(); // -> init is invoked once + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * partial before + */ + + exports = partial(before, 2); + + return exports; +}({}); + +/* ------------------------------ Emitter ------------------------------ */ + +exports.once = _once; +var Emitter = exports.Emitter = _.Emitter = function (exports) { + /* Event emitter class which provides observer pattern. + * + * ### on + * + * Bind event. + * + * ### off + * + * Unbind event. + * + * ### once + * + * Bind event that trigger once. + * + * |Name |Type |Desc | + * |--------|--------|--------------| + * |event |string |Event name | + * |listener|function|Event listener| + * + * ### emit + * + * Emit event. + * + * |Name |Type |Desc | + * |-------|------|----------------------------| + * |event |string|Event name | + * |...args|* |Arguments passed to listener| + * + * ### mixin + * + * [static] Mixin object class methods. + * + * |Name|Type |Desc | + * |----|------|---------------| + * |obj |object|Object to mixin| + * + * ```javascript + * var event = new Emitter(); + * event.on('test', function () { console.log('test') }); + * event.emit('test'); // Logs out 'test'. + * Emitter.mixin({}); + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * Class has each slice once + */ + + exports = Class({ + initialize: function Emitter() { + this._events = this._events || {}; + }, + on: function on(event, listener) { + this._events[event] = this._events[event] || []; + this._events[event].push(listener); + + return this; + }, + off: function off(event, listener) { + if (!has(this._events, event)) return; + + this._events[event].splice(this._events[event].indexOf(listener), 1); + + return this; + }, + once: function once(event, listener) { + this.on(event, _once(listener)); + + return this; + }, + emit: function emit(event) { + if (!has(this._events, event)) return; + + var args = slice(arguments, 1); + + _each(this._events[event], function (val) { + val.apply(this, args); + }, this); + + return this; + } + }, { + mixin: function mixin(obj) { + _each(['on', 'off', 'once', 'emit'], function (val) { + obj[val] = exports.prototype[val]; + }); + + obj._events = obj._events || {}; + } + }); + + return exports; +}({}); + +/* ------------------------------ Logger ------------------------------ */ + +var Logger = exports.Logger = _.Logger = function (exports) { + /* Simple logger with level filter. + * + * ### constructor + * + * |Name |Type |Desc | + * |-------------|------|------------| + * |name |string|Logger name | + * |[level=DEBUG]|number|Logger level| + * + * ### setLevel + * + * |Name |Type |Desc | + * |-----|-------------|------------| + * |level|number string|Logger level| + * + * ### getLevel + * + * Get current level. + * + * ### trace, debug, info, warn, error + * + * Logging methods. + * + * ### Log Levels + * + * TRACE, DEBUG, INFO, WARN, ERROR and SILENT. + * + * ```javascript + * var logger = new Logger('eris', logger.level.ERROR); + * logger.trace('test'); + * + * // Format output. + * logger.formatter = function (type, argList) + * { + * argList.push(new Date().getTime()); + * + * return argList; + * }; + * + * logger.on('all', function (type, argList) + * { + * // It's not affected by log level. + * }); + * + * logger.on('debug', function (argList) + * { + * // Affected by log level. + * }); + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * Emitter Enum toArr isUndef clone isStr isNum + */ + + exports = Emitter.extend({ + initialize: function Logger(name, level) { + this.name = name; + + this.setLevel(isUndef(level) ? exports.level.DEBUG : level); + this.callSuper(Emitter, 'initialize', arguments); + }, + setLevel: function setLevel(level) { + if (isStr(level)) { + level = exports.level[level.toUpperCase()]; + if (level) this._level = level; + return this; + } + if (isNum(level)) this._level = level; + + return this; + }, + getLevel: function getLevel() { + return this._level; + }, + formatter: function formatter(type, argList) { + return argList; + }, + trace: function trace() { + return this._log('trace', arguments); + }, + debug: function debug() { + return this._log('debug', arguments); + }, + info: function info() { + return this._log('info', arguments); + }, + warn: function warn() { + return this._log('warn', arguments); + }, + error: function error() { + return this._log('error', arguments); + }, + _log: function _log(type, argList) { + argList = toArr(argList); + if (argList.length === 0) return this; + + this.emit('all', type, clone(argList)); + + if (exports.level[type.toUpperCase()] < this._level) return this; + this.emit(type, clone(argList)); + /* eslint-disable no-console */ + var consoleMethod = type === 'debug' ? console.log : console[type]; + consoleMethod.apply(console, this.formatter(type, argList)); + + return this; + } + }, { + level: new Enum({ + TRACE: 0, + DEBUG: 1, + INFO: 2, + WARN: 3, + ERROR: 4, + SILENT: 5 + }) + }); + + return exports; +}({}); + +/* ------------------------------ Store ------------------------------ */ + +var Store = exports.Store = _.Store = function (exports) { + /* Memory storage. + * + * Extend from Emitter. + * + * ### constructor + * + * |Name|Type |Desc | + * |----|------|------------| + * |data|object|Initial data| + * + * ### set + * + * Set value. + * + * |Name|Type |Desc | + * |----|------|------------| + * |key |string|Value key | + * |val |* |Value to set| + * + * Set values. + * + * |Name|Type |Desc | + * |----|------|---------------| + * |vals|object|Key value pairs| + * + * This emit a change event whenever is called. + * + * ### get + * + * Get value. + * + * |Name |Type |Desc | + * |------|------|------------------| + * |key |string|Value key | + * |return|* |Value of given key| + * + * Get values. + * + * |Name |Type |Desc | + * |------|------|---------------| + * |keys |array |Array of keys | + * |return|object|Key value pairs| + * + * ### remove + * + * Remove value. + * + * |Name|Type |Desc | + * |----|------------|-------------| + * |key |string array|Key to remove| + * + * ### clear + * + * Clear all data. + * + * ### each + * + * Iterate over values. + * + * |Name|Type |Desc | + * |----|--------|-------------------------------| + * |fn |function|Function invoked per interation| + * + * ```javascript + * var store = new Store('test'); + * store.set('user', {name: 'eris'}); + * store.get('user').name; // -> 'eris' + * store.clear(); + * store.each(function (val, key) + * { + * // Do something. + * }); + * store.on('change', function (key, newVal, oldVal) + * { + * // It triggers whenever set is called. + * }); + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * Emitter isStr isObj each toArr + */ + + exports = Emitter.extend({ + initialize: function Store(data) { + this.callSuper(Emitter, 'initialize', arguments); + this._data = data || {}; + this.save(this._data); + }, + set: function set(key, val) { + var data; + + if (isStr(key)) { + data = {}; + data[key] = val; + } else if (isObj(key)) { + data = key; + } + + var self = this; + + _each(data, function (val, key) { + var oldVal = self._data[key]; + self._data[key] = val; + self.emit('change', key, val, oldVal); + }); + + this.save(this._data); + }, + get: function get(key) { + var data = this._data; + + if (isStr(key)) return data[key]; + + var ret = {}; + _each(key, function (val) { + ret[val] = data[val]; + }); + + return ret; + }, + remove: function remove(key) { + key = toArr(key); + + var data = this._data; + + _each(key, function (val) { + delete data[val]; + }); + + this.save(data); + }, + clear: function clear() { + this._data = {}; + + this.save(this._data); + }, + each: function each(fn) { + _each(this._data, fn); + }, + // This methods exists to be overwritten. + save: function save(data) { + this._data = data; + } + }); + + return exports; +}({}); + +/* ------------------------------ orientation ------------------------------ */ + +var orientation = exports.orientation = _.orientation = function (exports) { + /* Screen orientation helper. + * + * ### on + * + * Bind change event. + * + * ### off + * + * Unbind change event. + * + * ### get + * + * Get current orientation(landscape or portrait). + * + * ```javascript + * orientation.on('change', function (direction) + * { + * console.log(direction); // -> 'portrait' + * }); + * orientation.get(); // -> 'landscape' + * ``` + */ + + /* module + * env: browser + * test: browser + */ + + /* dependencies + * Emitter safeGet + */ + + var screen = window.screen; + + exports = { + get: function get() { + if (screen) { + var orientation = safeGet(screen, 'orientation.type'); + if (orientation) return orientation.split('-').shift(); + } + + return window.innerWidth > window.innerHeight ? 'landscape' : 'portrait'; + } + }; + + Emitter.mixin(exports); + + window.addEventListener('orientationchange', function () { + setTimeout(function () { + exports.emit('change', exports.get()); + }, 200); + }, false); + + return exports; +}({}); + +/* ------------------------------ root ------------------------------ */ + +var root = exports.root = _.root = function (exports) { + /* Root object reference, `global` in nodeJs, `window` in browser. */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * isBrowser + */ + + exports = isBrowser ? window : global; + + return exports; +}({}); + +/* ------------------------------ perfNow ------------------------------ */ + +var perfNow = exports.perfNow = _.perfNow = function (exports) { + /* High resolution time up to microsecond precision. + * + * ```javascript + * var start = perfNow(); + * + * // Do something. + * + * console.log(perfNow() - start); + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * now root + */ + + var performance = root.performance, + process = root.process, + loadTime; + + if (performance && performance.now) { + exports = function exports() { + return performance.now(); + }; + } else if (process && process.hrtime) { + var getNanoSeconds = function getNanoSeconds() { + var hr = process.hrtime(); + return hr[0] * 1e9 + hr[1]; + }; + loadTime = getNanoSeconds() - process.uptime() * 1e9; + exports = function exports() { + return (getNanoSeconds() - loadTime) / 1e6; + }; + } else { + loadTime = now(); + exports = function exports() { + return now() - loadTime; + }; + } + + return exports; +}({}); + +/* ------------------------------ toNum ------------------------------ */ + +var toNum = exports.toNum = _.toNum = function (exports) { + /* Convert value to a number. + * + * |Name |Type |Desc | + * |------|------|----------------| + * |val |* |Value to process| + * |return|number|Resulted number | + * + * ```javascript + * toNum('5'); // -> 5 + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * isNum isObj isFn isStr + */ + + exports = function exports(val) { + if (isNum(val)) return val; + + if (isObj(val)) { + var temp = isFn(val.valueOf) ? val.valueOf() : val; + val = isObj(temp) ? temp + '' : temp; + } + + if (!isStr(val)) return val === 0 ? val : +val; + + return +val; + }; + + return exports; +}({}); + +/* ------------------------------ pxToNum ------------------------------ */ + +var pxToNum = exports.pxToNum = _.pxToNum = function () { + /* Turn string like '0px' to number. + */ + + /* dependencies + * toNum + */ + + function exports(str) { + return toNum(str.replace('px', '')); + } + + return exports; +}(); + +/* ------------------------------ toInt ------------------------------ */ + +var toInt = exports.toInt = _.toInt = function () { + /* Convert value to an integer. + * + * |Name |Type |Desc | + * |------|------|-----------------| + * |val |* |Value to convert | + * |return|number|Converted integer| + * + * ```javascript + * toInt(1.1); // -> 1 + * toInt(undefined); // -> 0 + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * toNum + */ + + function exports(val) { + if (!val) return val === 0 ? val : 0; + + val = toNum(val); + + return val - val % 1; + } + + return exports; +}(); + +/* ------------------------------ detectBrowser ------------------------------ */ + +var detectBrowser = exports.detectBrowser = _.detectBrowser = function () { + /* Detect browser info using ua. + * + * |Name |Type |Desc | + * |------------------------|------|----------------------------------| + * |[ua=navigator.userAgent]|string|Browser userAgent | + * |return |object|Object containing name and version| + * + * Browsers supported: ie, chrome, edge, firefox, opera, safari, ios(mobile safari), android(android browser) + * + * ```javascript + * var browser = detectBrowser(); + * if (browser.name === 'ie' && browser.version < 9) + * { + * // Do something about old IE... + * } + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * isBrowser toInt keys + */ + + function exports(ua) { + ua = ua || (isBrowser ? navigator.userAgent : ''); + ua = ua.toLowerCase(); + + var ieVer = getVer(ua, 'msie '); + + if (ieVer) return { + version: ieVer, + name: 'ie' + }; + + if (regIe11.test(ua)) return { + version: 11, + name: 'ie' + }; + + for (var i = 0, len = browsers.length; i < len; i++) { + var name = browsers[i], + match = ua.match(regBrowsers[name]); + + if (match == null) continue; + + var version = toInt(match[1].split('.')[0]); + + if (name === 'opera') version = getVer(ua, 'version/') || version; + + return { + name: name, + version: version + }; + } + + return { + name: 'unknown', + version: -1 + }; + } + + var regBrowsers = { + 'edge': /edge\/([0-9._]+)/, + 'firefox': /firefox\/([0-9.]+)(?:\s|$)/, + 'opera': /opera\/([0-9.]+)(?:\s|$)/, + 'android': /android\s([0-9.]+)/, + 'ios': /version\/([0-9._]+).*mobile.*safari.*/, + 'safari': /version\/([0-9._]+).*safari/, + 'chrome': /(?!chrom.*opr)chrom(?:e|ium)\/([0-9.]+)(:?\s|$)/ + }; + + var regIe11 = /trident\/7\./, + browsers = keys(regBrowsers); + + function getVer(ua, mark) { + var idx = ua.indexOf(mark); + + if (idx > -1) return toInt(ua.substring(idx + mark.length, ua.indexOf('.', idx))); + } + + return exports; +}(); + +/* ------------------------------ rtrim ------------------------------ */ + +var rtrim = exports.rtrim = _.rtrim = function () { + /* Remove chars or white-spaces from end of string. + * + * |Name |Type |Desc | + * |------|------------|------------------| + * |str |string |String to trim | + * |chars |string array|Characters to trim| + * |return|string |Trimmed string | + * + * ```javascript + * rtrim(' abc '); // -> ' abc' + * rtrim('_abc_', '_'); // -> '_abc' + * rtrim('_abc_', ['c', '_']); // -> '_ab' + * ``` + */ + + /* module + * env: all + * test: all + */ + + var regSpace = /\s+$/; + + function exports(str, chars) { + if (chars == null) return str.replace(regSpace, ''); + + var end = str.length - 1, + charLen = chars.length, + found = true, + i, + c; + + while (found && end >= 0) { + found = false; + i = -1; + c = str.charAt(end); + + while (++i < charLen) { + if (c === chars[i]) { + found = true; + end--; + break; + } + } + } + + return end >= 0 ? str.substring(0, end + 1) : ''; + } + + return exports; +}(); + +/* ------------------------------ trim ------------------------------ */ + +var trim = exports.trim = _.trim = function () { + /* Remove chars or white-spaces from beginning end of string. + * + * |Name |Type |Desc | + * |------|------------|------------------| + * |str |string |String to trim | + * |chars |string array|Characters to trim| + * |return|string |Trimmed string | + * + * ```javascript + * trim(' abc '); // -> 'abc' + * trim('_abc_', '_'); // -> 'abc' + * trim('_abc_', ['a', 'c', '_']); // -> 'b' + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * ltrim rtrim + */ + + var regSpace = /^\s+|\s+$/g; + + function exports(str, chars) { + if (chars == null) return str.replace(regSpace, ''); + + return ltrim(rtrim(str, chars), chars); + } + + return exports; +}(); + +/* ------------------------------ getFileName ------------------------------ */ + +var getFileName = exports.getFileName = _.getFileName = function () { + /* Extract file name from url. + */ + + /* dependencies + * last trim + */ + + function exports(url) { + var ret = _last(url.split('/')); + + if (ret.indexOf('?') > -1) ret = trim(ret.split('?')[0]); + + return ret === '' ? 'unknown' : ret; + } + + return exports; +}(); + +/* ------------------------------ query ------------------------------ */ + +var query = exports.query = _.query = function (exports) { + /* Parse and stringify url query strings. + * + * ### parse + * + * Parse a query string into an object. + * + * |Name |Type |Desc | + * |------|------|------------| + * |str |string|Query string| + * |return|object|Query object| + * + * ### stringify + * + * Stringify an object into a query string. + * + * |Name |Type |Desc | + * |------|------|------------| + * |obj |object|Query object| + * |return|string|Query string| + * + * ```javascript + * query.parse('foo=bar&eruda=true'); // -> {foo: 'bar', eruda: 'true'} + * query.stringify({foo: 'bar', eruda: 'true'}); // -> 'foo=bar&eruda=true' + * query.parse('name=eruda&name=eustia'); // -> {name: ['eruda', 'eustia']} + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * trim each isUndef isArr map isEmpty filter isObj + */ + + exports = { + parse: function parse(str) { + var ret = {}; + + str = trim(str).replace(regIllegalChars, ''); + + _each(str.split('&'), function (param) { + var parts = param.split('='); + + var key = parts.shift(), + val = parts.length > 0 ? parts.join('=') : null; + + key = decodeURIComponent(key); + val = decodeURIComponent(val); + + if (isUndef(ret[key])) { + ret[key] = val; + } else if (isArr(ret[key])) { + ret[key].push(val); + } else { + ret[key] = [ret[key], val]; + } + }); + + return ret; + }, + stringify: function stringify(obj, arrKey) { + return filter(map(obj, function (val, key) { + if (isObj(val) && isEmpty(val)) return ''; + if (isArr(val)) return exports.stringify(val, key); + + return (arrKey ? encodeURIComponent(arrKey) : encodeURIComponent(key)) + '=' + encodeURIComponent(val); + }), function (str) { + return str.length > 0; + }).join('&'); + } + }; + + var regIllegalChars = /^(\?|#|&)/g; + + return exports; +}({}); + +/* ------------------------------ Url ------------------------------ */ + +var Url = exports.Url = _.Url = function (exports) { + /* Simple url manipulator. + * + * ### constructor + * + * |Name |Type |Desc | + * |---------------------|------|----------| + * |[url=window.location]|string|Url string| + * + * ### setQuery + * + * Set query value. + * + * |Name |Type |Desc | + * |------|------|-----------| + * |name |string|Query name | + * |value |string|Query value| + * |return|Url |this | + * + * |Name |Type |Desc | + * |------|------|------------| + * |names |object|query object| + * |return|Url |this | + * + * ### rmQuery + * + * Remove query value. + * + * |Name |Type |Desc | + * |------|------------|----------| + * |name |string array|Query name| + * |return|Url |this | + * + * ### parse + * + * [static] Parse url into an object. + * + * |Name |Type |Desc | + * |------|------|----------| + * |url |string|Url string| + * |return|object|Url object| + * + * ### stringify + * + * [static] Stringify url object into a string. + * + * |Name |Type |Desc | + * |------|------|----------| + * |url |object|Url object| + * |return|string|Url string| + * + * An url object contains the following properties: + * + * |Name |Desc | + * |--------|--------------------------------------------------------------------------------------| + * |protocol|The protocol scheme of the URL (e.g. http:) | + * |slashes |A boolean which indicates whether the protocol is followed by two forward slashes (//)| + * |auth |Authentication information portion (e.g. username:password) | + * |hostname|Host name without port number | + * |port |Optional port number | + * |pathname|URL path | + * |query |Parsed object containing query string | + * |hash |The "fragment" portion of the URL including the pound-sign (#) | + * + * ```javascript + * var url = new Url('http://example.com:8080?eruda=true'); + * console.log(url.port); // -> '8080' + * url.query.foo = 'bar'; + * url.rmQuery('eruda'); + * utl.toString(); // -> 'http://example.com:8080/?foo=bar' + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * Class extend trim query isEmpty each isArr toArr + */ + + exports = Class({ + className: 'Url', + initialize: function initialize(url) { + extend(this, exports.parse(url || window.location.href)); + }, + setQuery: function setQuery(name, val) { + var query = this.query; + + if (isObj(name)) { + _each(name, function (val, key) { + query[key] = val; + }); + } else { + query[name] = val; + } + + return this; + }, + rmQuery: function rmQuery(name) { + var query = this.query; + + if (!isArr(name)) name = toArr(name); + _each(name, function (key) { + delete query[key]; + }); + + return this; + }, + toString: function toString() { + return exports.stringify(this); + } + }, { + parse: function parse(url) { + var ret = { + protocol: '', + auth: '', + hostname: '', + hash: '', + query: {}, + port: '', + pathname: '', + slashes: false + }, + rest = trim(url); + + var proto = rest.match(regProto); + if (proto) { + proto = proto[0]; + ret.protocol = proto.toLowerCase(); + rest = rest.substr(proto.length); + } + + if (proto) { + var slashes = rest.substr(0, 2) === '//'; + if (slashes) { + rest = rest.slice(2); + ret.slashes = true; + } + } + + if (slashes) { + var hostEnd = -1; + for (var i = 0, len = hostEndingChars.length; i < len; i++) { + var pos = rest.indexOf(hostEndingChars[i]); + if (pos !== -1 && (hostEnd === -1 || pos < hostEnd)) hostEnd = pos; + } + + var host = rest.slice(0, hostEnd); + rest = rest.slice(hostEnd); + + var atSign = host.lastIndexOf('@'); + + if (atSign !== -1) { + ret.auth = decodeURIComponent(host.slice(0, atSign)); + host = host.slice(atSign + 1); + } + + ret.hostname = host; + var port = host.match(regPort); + if (port) { + port = port[0]; + if (port !== ':') ret.port = port.substr(1); + ret.hostname = host.substr(0, host.length - port.length); + } + } + + var hash = rest.indexOf('#'); + + if (hash !== -1) { + ret.hash = rest.substr(hash); + rest = rest.slice(0, hash); + } + + var queryMark = rest.indexOf('?'); + + if (queryMark !== -1) { + ret.query = query.parse(rest.substr(queryMark + 1)); + rest = rest.slice(0, queryMark); + } + + ret.pathname = rest || '/'; + + return ret; + }, + stringify: function stringify(obj) { + var ret = obj.protocol + (obj.slashes ? '//' : '') + (obj.auth ? encodeURIComponent(obj.auth) + '@' : '') + obj.hostname + (obj.port ? ':' + obj.port : '') + obj.pathname; + + if (!isEmpty(obj.query)) ret += '?' + query.stringify(obj.query); + if (obj.hash) ret += obj.hash; + + return ret; + } + }); + + var regProto = /^([a-z0-9.+-]+:)/i, + regPort = /:[0-9]*$/, + hostEndingChars = ['/', '?', '#']; + + return exports; +}({}); + +/* ------------------------------ ajax ------------------------------ */ + +var ajax = exports.ajax = _.ajax = function () { + /* Perform an asynchronous HTTP request. + * + * |Name |Type |Desc | + * |-------|------|------------| + * |options|object|Ajax options| + * + * Available options: + * + * |Name |Type |Desc | + * |-------------|-------------|------------------------| + * |url |string |Request url | + * |data |string object|Request data | + * |dataType=json|string |Response type(json, xml)| + * |success |function |Success callback | + * |error |function |Error callback | + * |complete |function |Callback after request | + * |timeout |number |Request timeout | + * + * ### get + * + * Shortcut for type = GET; + * + * ### post + * + * Shortcut for type = POST; + * + * |Name |Type |Desc | + * |--------|-------------|----------------| + * |url |string |Request url | + * |[data] |string object|Request data | + * |success |function |Success callback| + * |dataType|function |Response type | + * + * ```javascript + * ajax({ + * url: 'http://example.com', + * data: {test: 'true'}, + * error: function () {}, + * success: function (data) + * { + * // ... + * }, + * dataType: 'json' + * }); + * + * ajax.get('http://example.com', {}, function (data) + * { + * // ... + * }); + * ``` + */ + + /* module + * env: browser + * test: manual + */ + + /* dependencies + * isFn noop defaults isObj query + */ + + function exports(options) { + defaults(options, exports.setting); + + var type = options.type, + url = options.url, + data = options.data, + dataType = options.dataType, + success = options.success, + error = options.error, + timeout = options.timeout, + complete = options.complete, + xhr = options.xhr(), + abortTimeout; + + xhr.onreadystatechange = function () { + if (xhr.readyState !== 4) return; + + clearTimeout(abortTimeout); + + var result; + + var status = xhr.status; + if (status >= 200 && status < 300 || status === 304) { + result = xhr.responseText; + if (dataType === 'xml') result = xhr.responseXML; + try { + if (dataType === 'json') result = JSON.parse(result); + /* eslint-disable no-empty */ + } catch (e) {} + success(result, xhr); + } else { + error(xhr); + } + + complete(xhr); + }; + + if (type === 'GET') { + data = query.stringify(data); + url += url.indexOf('?') > -1 ? '&' + data : '?' + data; + } else { + if (isObj(data)) data = query.stringify(data); + } + + xhr.open(type, url, true); + xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); + + if (timeout > 0) { + abortTimeout = setTimeout(function () { + xhr.onreadystatechange = noop; + xhr.abort(); + error(xhr, 'timeout'); + complete(xhr); + }, timeout); + } + xhr.send(type === 'GET' ? null : data); + + return xhr; + } + + exports.setting = { + type: 'GET', + success: noop, + error: noop, + complete: noop, + dataType: 'json', + data: {}, + xhr: function xhr() { + return new XMLHttpRequest(); + }, + timeout: 0 + }; + + exports.get = function () { + return exports(parseArgs.apply(null, arguments)); + }; + + exports.post = function () { + var options = parseArgs.apply(null, arguments); + options.type = 'POST'; + + return exports(options); + }; + + function parseArgs(url, data, success, dataType) { + if (isFn(data)) { + dataType = success; + success = data; + data = {}; + } + + return { + url: url, + data: data, + success: success, + dataType: dataType + }; + } + + return exports; +}(); + +/* ------------------------------ type ------------------------------ */ + +var type = exports.type = _.type = function () { + /* Determine the internal JavaScript [[Class]] of an object. + * + * |Name |Type |Desc | + * |------|------|--------------------------| + * |val |* |Value to get type | + * |return|string|Type of object, lowercased| + * + * ```javascript + * type(5); // -> 'number' + * type({}); // -> 'object' + * type(function () {}); // -> 'function' + * type([]); // -> 'array' + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * objToStr isNaN + */ + + function exports(val) { + if (val === null) return 'null'; + if (val === undefined) return 'undefined'; + if (isNaN(val)) return 'nan'; + + var ret = objToStr(val).match(regObj); + + if (!ret) return ''; + + return ret[1].toLowerCase(); + } + + var regObj = /^\[object\s+(.*?)]$/; + + return exports; +}(); + +/* ------------------------------ stringify ------------------------------ */ + +var stringify = exports.stringify = _.stringify = function () { + /* JSON stringify with support for circular object, function etc. + * + * Undefined is treated as null value. + * + * |Name |Type |Desc | + * |------|------|-------------------| + * |obj |object|Object to stringify| + * |spaces|number|Indent spaces | + * |return|string|Stringified object | + * + * ```javascript + * stringify({a: function () {}}); // -> '{"a":"[Function function () {}]"}' + * var obj = {a: 1}; + * obj.b = obj; + * stringify(obj); // -> '{"a":1,"b":"[Circular ~]"}' + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * type upperFirst toStr isUndef isFn isRegExp + */ + + function exports(obj, spaces) { + return (0, _stringify2.default)(obj, serializer(), spaces); + } + + function serializer() { + var stack = [], + keys = []; + + return function (key, val) { + if (stack.length > 0) { + var pos = stack.indexOf(this); + if (pos > -1) { + stack.splice(pos + 1); + keys.splice(pos, Infinity, key); + } else { + stack.push(this); + keys.push(key); + } + + var valPos = stack.indexOf(val); + if (valPos > -1) { + if (stack[0] === val) { + val = '[Circular ~]'; + } else { + val = '[Circular ~.' + keys.slice(0, valPos).join('.') + ']'; + } + } + } else { + stack.push(val); + } + + if (isRegExp(val) || isFn(val)) { + val = '[' + upperFirst(type(val)) + ' ' + toStr(val) + ']'; + } else if (isUndef(val)) { + val = null; + } + + return val; + }; + } + + return exports; +}(); + +/* ------------------------------ LocalStore ------------------------------ */ + +var LocalStore = exports.LocalStore = _.LocalStore = function (exports) { + /* LocalStorage wrapper. + * + * Extend from Store. + * + * ### constructor + * + * |Name|Type |Desc | + * |----|------|----------------------| + * |name|string|LocalStorage item name| + * |data|object|Default data | + * + * ```javascript + * var store = new LocalStore('eris'); + * store.set('name', 'eris'); + * ``` + */ + + /* module + * env: browser + * test: browser + */ + + /* dependencies + * Store safeStorage isEmpty stringify defaults isObj + */ + + var localStorage = safeStorage('local'); + + exports = Store.extend({ + initialize: function LocalStore(name, data) { + this._name = name; + + var localData = localStorage.getItem(name); + try { + localData = JSON.parse(localData); + } catch (e) { + localData = {}; + } + if (!isObj(localData)) localData = {}; + data = defaults(localData, data); + this.callSuper(Store, 'initialize', [data]); + }, + save: function save(data) { + if (isEmpty(data)) return localStorage.removeItem(this._name); + localStorage.setItem(this._name, stringify(data)); + } + }); + + return exports; +}({}); + +/* ------------------------------ stripHtmlTag ------------------------------ */ + +var stripHtmlTag = exports.stripHtmlTag = _.stripHtmlTag = function () { + /* Strip html tags from a string. + * + * |Name |Type |Desc | + * |------|------|---------------| + * |str |string|String to strip| + * |return|string|Resulted string| + * + * ```javascript + * stripHtmlTag('

Hello

'); // -> 'Hello' + * ``` + */ + + /* module + * env: all + * test: all + */ + + var regHtmlTag = /<[^>]*>/g; + + function exports(str) { + return str.replace(regHtmlTag, ''); + } + + return exports; +}(); + +/* ------------------------------ uniqId ------------------------------ */ + +var uniqId = exports.uniqId = _.uniqId = function () { + /* Generate a globally-unique id. + * + * |Name |Type |Desc | + * |------|------|------------------| + * |prefix|string|Id prefix | + * |return|string|Globally-unique id| + * + * ```javascript + * uniqId('eusita_'); // -> 'eustia_xxx' + * ``` + */ + + /* module + * env: all + * test: all + */ + + var idCounter = 0; + + function exports(prefix) { + var id = ++idCounter + ''; + + return prefix ? prefix + id : id; + } + + return exports; +}(); + +/* ------------------------------ unique ------------------------------ */ + +var unique = exports.unique = _.unique = function () { + /* Create duplicate-free version of an array. + * + * |Name |Type |Desc | + * |---------|--------|-----------------------------| + * |arr |array |Array to inspect | + * |[compare]|function|Function for comparing values| + * |return |array |New duplicate free array | + * + * ```javascript + * unique([1, 2, 3, 1]); // -> [1, 2, 3] + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * filter + */ + + function exports(arr, compare) { + compare = compare || isEqual; + + return filter(arr, function (item, idx, arr) { + var len = arr.length; + + while (++idx < len) { + if (compare(item, arr[idx])) return false; + } + + return true; + }); + } + + function isEqual(a, b) { + return a === b; + } + + return exports; +}(); + +/* ------------------------------ viewportScale ------------------------------ */ + +var viewportScale = exports.viewportScale = _.viewportScale = function () { + /* Get viewport scale. + * + * ```javascript + * viewportScale(); // -> 3 + * ``` + */ + + /* module + * env: browser + * test: browser + */ + + /* dependencies + * meta clamp trim each map isNaN + */ + + function exports() { + var viewport = meta('viewport'); + + if (!viewport) return 1; + + viewport = map(viewport.split(','), function (val) { + return trim(val); + }); + + var minScale = 0.25, + maxScale = 5, + initialScale = 1; + + _each(viewport, function (val) { + val = val.split('='); + + var key = val[0]; + val = val[1]; + + if (key === 'initial-scale') initialScale = +val; + if (key === 'maximum-scale') maxScale = +val; + if (key === 'minimum-scale') minScale = +val; + }); + + var ret = clamp(initialScale, minScale, maxScale); + + // Some will use ';' to be the separator, need to avoid the wrong result. + if (isNaN(ret)) return 1; + + return ret; + } + + return exports; +}(); + +/* ------------------------------ wrap ------------------------------ */ + +var wrap = exports.wrap = _.wrap = function () { + /* Wrap the function inside a wrapper function, passing it as the first argument. + * + * |Name |Type |Desc | + * |-------|--------|----------------| + * |fn |* |Function to wrap| + * |wrapper|function|Wrapper function| + * |return |function|New function | + * + * ```javascript + * var p = wrap(escape, function(fn, text) + * { + * return '

' + fn(text) + '

'; + * }); + * p('You & Me'); // -> '

You & Me

' + * ``` + */ + + /* module + * env: all + * test: all + */ + + /* dependencies + * partial + */ + + function exports(fn, wrapper) { + return partial(wrapper, fn); + } + + return exports; +}(); + +exports.default = _; +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(119), __webpack_require__(120))) + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +exports.default = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +}; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _defineProperty = __webpack_require__(64); + +var _defineProperty2 = _interopRequireDefault(_defineProperty); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + (0, _defineProperty2.default)(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +/**! + + @license + handlebars v4.0.11 + +Copyright (C) 2011-2017 by Yehuda Katz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +*/ +(function webpackUniversalModuleDefinition(root, factory) { + if(true) + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["Handlebars"] = factory(); + else + root["Handlebars"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireWildcard = __webpack_require__(1)['default']; + + var _interopRequireDefault = __webpack_require__(2)['default']; + + exports.__esModule = true; + + var _handlebarsBase = __webpack_require__(3); + + var base = _interopRequireWildcard(_handlebarsBase); + + // Each of these augment the Handlebars object. No need to setup here. + // (This is done to easily share code between commonjs and browse envs) + + var _handlebarsSafeString = __webpack_require__(20); + + var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString); + + var _handlebarsException = __webpack_require__(5); + + var _handlebarsException2 = _interopRequireDefault(_handlebarsException); + + var _handlebarsUtils = __webpack_require__(4); + + var Utils = _interopRequireWildcard(_handlebarsUtils); + + var _handlebarsRuntime = __webpack_require__(21); + + var runtime = _interopRequireWildcard(_handlebarsRuntime); + + var _handlebarsNoConflict = __webpack_require__(33); + + var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); + + // For compatibility and usage outside of module systems, make the Handlebars object a namespace + function create() { + var hb = new base.HandlebarsEnvironment(); + + Utils.extend(hb, base); + hb.SafeString = _handlebarsSafeString2['default']; + hb.Exception = _handlebarsException2['default']; + hb.Utils = Utils; + hb.escapeExpression = Utils.escapeExpression; + + hb.VM = runtime; + hb.template = function (spec) { + return runtime.template(spec, hb); + }; + + return hb; + } + + var inst = create(); + inst.create = create; + + _handlebarsNoConflict2['default'](inst); + + inst['default'] = inst; + + exports['default'] = inst; + module.exports = exports['default']; + +/***/ }), +/* 1 */ +/***/ (function(module, exports) { + + "use strict"; + + exports["default"] = function (obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + + newObj["default"] = obj; + return newObj; + } + }; + + exports.__esModule = true; + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + + "use strict"; + + exports["default"] = function (obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + }; + + exports.__esModule = true; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(2)['default']; + + exports.__esModule = true; + exports.HandlebarsEnvironment = HandlebarsEnvironment; + + var _utils = __webpack_require__(4); + + var _exception = __webpack_require__(5); + + var _exception2 = _interopRequireDefault(_exception); + + var _helpers = __webpack_require__(9); + + var _decorators = __webpack_require__(17); + + var _logger = __webpack_require__(19); + + var _logger2 = _interopRequireDefault(_logger); + + var VERSION = '4.0.11'; + exports.VERSION = VERSION; + var COMPILER_REVISION = 7; + + exports.COMPILER_REVISION = COMPILER_REVISION; + var REVISION_CHANGES = { + 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it + 2: '== 1.0.0-rc.3', + 3: '== 1.0.0-rc.4', + 4: '== 1.x.x', + 5: '== 2.0.0-alpha.x', + 6: '>= 2.0.0-beta.1', + 7: '>= 4.0.0' + }; + + exports.REVISION_CHANGES = REVISION_CHANGES; + var objectType = '[object Object]'; + + function HandlebarsEnvironment(helpers, partials, decorators) { + this.helpers = helpers || {}; + this.partials = partials || {}; + this.decorators = decorators || {}; + + _helpers.registerDefaultHelpers(this); + _decorators.registerDefaultDecorators(this); + } + + HandlebarsEnvironment.prototype = { + constructor: HandlebarsEnvironment, + + logger: _logger2['default'], + log: _logger2['default'].log, + + registerHelper: function registerHelper(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _exception2['default']('Arg not supported with multiple helpers'); + } + _utils.extend(this.helpers, name); + } else { + this.helpers[name] = fn; + } + }, + unregisterHelper: function unregisterHelper(name) { + delete this.helpers[name]; + }, + + registerPartial: function registerPartial(name, partial) { + if (_utils.toString.call(name) === objectType) { + _utils.extend(this.partials, name); + } else { + if (typeof partial === 'undefined') { + throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined'); + } + this.partials[name] = partial; + } + }, + unregisterPartial: function unregisterPartial(name) { + delete this.partials[name]; + }, + + registerDecorator: function registerDecorator(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _exception2['default']('Arg not supported with multiple decorators'); + } + _utils.extend(this.decorators, name); + } else { + this.decorators[name] = fn; + } + }, + unregisterDecorator: function unregisterDecorator(name) { + delete this.decorators[name]; + } + }; + + var log = _logger2['default'].log; + + exports.log = log; + exports.createFrame = _utils.createFrame; + exports.logger = _logger2['default']; + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + exports.extend = extend; + exports.indexOf = indexOf; + exports.escapeExpression = escapeExpression; + exports.isEmpty = isEmpty; + exports.createFrame = createFrame; + exports.blockParams = blockParams; + exports.appendContextPath = appendContextPath; + var escape = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`', + '=': '=' + }; + + var badChars = /[&<>"'`=]/g, + possible = /[&<>"'`=]/; + + function escapeChar(chr) { + return escape[chr]; + } + + function extend(obj /* , ...source */) { + for (var i = 1; i < arguments.length; i++) { + for (var key in arguments[i]) { + if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { + obj[key] = arguments[i][key]; + } + } + } + + return obj; + } + + var toString = Object.prototype.toString; + + exports.toString = toString; + // Sourced from lodash + // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt + /* eslint-disable func-style */ + var isFunction = function isFunction(value) { + return typeof value === 'function'; + }; + // fallback for older versions of Chrome and Safari + /* istanbul ignore next */ + if (isFunction(/x/)) { + exports.isFunction = isFunction = function (value) { + return typeof value === 'function' && toString.call(value) === '[object Function]'; + }; + } + exports.isFunction = isFunction; + + /* eslint-enable func-style */ + + /* istanbul ignore next */ + var isArray = Array.isArray || function (value) { + return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; + }; + + exports.isArray = isArray; + // Older IE versions do not directly support indexOf so we must implement our own, sadly. + + function indexOf(array, value) { + for (var i = 0, len = array.length; i < len; i++) { + if (array[i] === value) { + return i; + } + } + return -1; + } + + function escapeExpression(string) { + if (typeof string !== 'string') { + // don't escape SafeStrings, since they're already safe + if (string && string.toHTML) { + return string.toHTML(); + } else if (string == null) { + return ''; + } else if (!string) { + return string + ''; + } + + // Force a string conversion as this will be done by the append regardless and + // the regex test will do this transparently behind the scenes, causing issues if + // an object's to string has escaped characters in it. + string = '' + string; + } + + if (!possible.test(string)) { + return string; + } + return string.replace(badChars, escapeChar); + } + + function isEmpty(value) { + if (!value && value !== 0) { + return true; + } else if (isArray(value) && value.length === 0) { + return true; + } else { + return false; + } + } + + function createFrame(object) { + var frame = extend({}, object); + frame._parent = object; + return frame; + } + + function blockParams(params, ids) { + params.path = ids; + return params; + } + + function appendContextPath(contextPath, id) { + return (contextPath ? contextPath + '.' : '') + id; + } + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _Object$defineProperty = __webpack_require__(6)['default']; + + exports.__esModule = true; + + var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; + + function Exception(message, node) { + var loc = node && node.loc, + line = undefined, + column = undefined; + if (loc) { + line = loc.start.line; + column = loc.start.column; + + message += ' - ' + line + ':' + column; + } + + var tmp = Error.prototype.constructor.call(this, message); + + // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. + for (var idx = 0; idx < errorProps.length; idx++) { + this[errorProps[idx]] = tmp[errorProps[idx]]; + } + + /* istanbul ignore else */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, Exception); + } + + try { + if (loc) { + this.lineNumber = line; + + // Work around issue under safari where we can't directly set the column value + /* istanbul ignore next */ + if (_Object$defineProperty) { + Object.defineProperty(this, 'column', { + value: column, + enumerable: true + }); + } else { + this.column = column; + } + } + } catch (nop) { + /* Ignore if the browser is very particular */ + } + } + + Exception.prototype = new Error(); + + exports['default'] = Exception; + module.exports = exports['default']; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(7), __esModule: true }; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + + var $ = __webpack_require__(8); + module.exports = function defineProperty(it, key, desc){ + return $.setDesc(it, key, desc); + }; + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + + var $Object = Object; + module.exports = { + create: $Object.create, + getProto: $Object.getPrototypeOf, + isEnum: {}.propertyIsEnumerable, + getDesc: $Object.getOwnPropertyDescriptor, + setDesc: $Object.defineProperty, + setDescs: $Object.defineProperties, + getKeys: $Object.keys, + getNames: $Object.getOwnPropertyNames, + getSymbols: $Object.getOwnPropertySymbols, + each: [].forEach + }; + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(2)['default']; + + exports.__esModule = true; + exports.registerDefaultHelpers = registerDefaultHelpers; + + var _helpersBlockHelperMissing = __webpack_require__(10); + + var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); + + var _helpersEach = __webpack_require__(11); + + var _helpersEach2 = _interopRequireDefault(_helpersEach); + + var _helpersHelperMissing = __webpack_require__(12); + + var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); + + var _helpersIf = __webpack_require__(13); + + var _helpersIf2 = _interopRequireDefault(_helpersIf); + + var _helpersLog = __webpack_require__(14); + + var _helpersLog2 = _interopRequireDefault(_helpersLog); + + var _helpersLookup = __webpack_require__(15); + + var _helpersLookup2 = _interopRequireDefault(_helpersLookup); + + var _helpersWith = __webpack_require__(16); + + var _helpersWith2 = _interopRequireDefault(_helpersWith); + + function registerDefaultHelpers(instance) { + _helpersBlockHelperMissing2['default'](instance); + _helpersEach2['default'](instance); + _helpersHelperMissing2['default'](instance); + _helpersIf2['default'](instance); + _helpersLog2['default'](instance); + _helpersLookup2['default'](instance); + _helpersWith2['default'](instance); + } + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(4); + + exports['default'] = function (instance) { + instance.registerHelper('blockHelperMissing', function (context, options) { + var inverse = options.inverse, + fn = options.fn; + + if (context === true) { + return fn(this); + } else if (context === false || context == null) { + return inverse(this); + } else if (_utils.isArray(context)) { + if (context.length > 0) { + if (options.ids) { + options.ids = [options.name]; + } + + return instance.helpers.each(context, options); + } else { + return inverse(this); + } + } else { + if (options.data && options.ids) { + var data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); + options = { data: data }; + } + + return fn(context, options); + } + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(2)['default']; + + exports.__esModule = true; + + var _utils = __webpack_require__(4); + + var _exception = __webpack_require__(5); + + var _exception2 = _interopRequireDefault(_exception); + + exports['default'] = function (instance) { + instance.registerHelper('each', function (context, options) { + if (!options) { + throw new _exception2['default']('Must pass iterator to #each'); + } + + var fn = options.fn, + inverse = options.inverse, + i = 0, + ret = '', + data = undefined, + contextPath = undefined; + + if (options.data && options.ids) { + contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; + } + + if (_utils.isFunction(context)) { + context = context.call(this); + } + + if (options.data) { + data = _utils.createFrame(options.data); + } + + function execIteration(field, index, last) { + if (data) { + data.key = field; + data.index = index; + data.first = index === 0; + data.last = !!last; + + if (contextPath) { + data.contextPath = contextPath + field; + } + } + + ret = ret + fn(context[field], { + data: data, + blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) + }); + } + + if (context && typeof context === 'object') { + if (_utils.isArray(context)) { + for (var j = context.length; i < j; i++) { + if (i in context) { + execIteration(i, i, i === context.length - 1); + } + } + } else { + var priorKey = undefined; + + for (var key in context) { + if (context.hasOwnProperty(key)) { + // We're running the iterations one step out of sync so we can detect + // the last iteration without have to scan the object twice and create + // an itermediate keys array. + if (priorKey !== undefined) { + execIteration(priorKey, i - 1); + } + priorKey = key; + i++; + } + } + if (priorKey !== undefined) { + execIteration(priorKey, i - 1, true); + } + } + } + + if (i === 0) { + ret = inverse(this); + } + + return ret; + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(2)['default']; + + exports.__esModule = true; + + var _exception = __webpack_require__(5); + + var _exception2 = _interopRequireDefault(_exception); + + exports['default'] = function (instance) { + instance.registerHelper('helperMissing', function () /* [args, ]options */{ + if (arguments.length === 1) { + // A missing field in a {{foo}} construct. + return undefined; + } else { + // Someone is actually trying to call something, blow up. + throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); + } + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(4); + + exports['default'] = function (instance) { + instance.registerHelper('if', function (conditional, options) { + if (_utils.isFunction(conditional)) { + conditional = conditional.call(this); + } + + // Default behavior is to render the positive path if the value is truthy and not empty. + // The `includeZero` option may be set to treat the condtional as purely not empty based on the + // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. + if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { + return options.inverse(this); + } else { + return options.fn(this); + } + }); + + instance.registerHelper('unless', function (conditional, options) { + return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash }); + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 14 */ +/***/ (function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + + exports['default'] = function (instance) { + instance.registerHelper('log', function () /* message, options */{ + var args = [undefined], + options = arguments[arguments.length - 1]; + for (var i = 0; i < arguments.length - 1; i++) { + args.push(arguments[i]); + } + + var level = 1; + if (options.hash.level != null) { + level = options.hash.level; + } else if (options.data && options.data.level != null) { + level = options.data.level; + } + args[0] = level; + + instance.log.apply(instance, args); + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 15 */ +/***/ (function(module, exports) { + + 'use strict'; + + exports.__esModule = true; + + exports['default'] = function (instance) { + instance.registerHelper('lookup', function (obj, field) { + return obj && obj[field]; + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(4); + + exports['default'] = function (instance) { + instance.registerHelper('with', function (context, options) { + if (_utils.isFunction(context)) { + context = context.call(this); + } + + var fn = options.fn; + + if (!_utils.isEmpty(context)) { + var data = options.data; + if (options.data && options.ids) { + data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); + } + + return fn(context, { + data: data, + blockParams: _utils.blockParams([context], [data && data.contextPath]) + }); + } else { + return options.inverse(this); + } + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _interopRequireDefault = __webpack_require__(2)['default']; + + exports.__esModule = true; + exports.registerDefaultDecorators = registerDefaultDecorators; + + var _decoratorsInline = __webpack_require__(18); + + var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); + + function registerDefaultDecorators(instance) { + _decoratorsInline2['default'](instance); + } + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(4); + + exports['default'] = function (instance) { + instance.registerDecorator('inline', function (fn, props, container, options) { + var ret = fn; + if (!props.partials) { + props.partials = {}; + ret = function (context, options) { + // Create a new partials stack frame prior to exec. + var original = container.partials; + container.partials = _utils.extend({}, original, props.partials); + var ret = fn(context, options); + container.partials = original; + return ret; + }; + } + + props.partials[options.args[0]] = options.fn; + + return ret; + }); + }; + + module.exports = exports['default']; + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + exports.__esModule = true; + + var _utils = __webpack_require__(4); + + var logger = { + methodMap: ['debug', 'info', 'warn', 'error'], + level: 'info', + + // Maps a given level value to the `methodMap` indexes above. + lookupLevel: function lookupLevel(level) { + if (typeof level === 'string') { + var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); + if (levelMap >= 0) { + level = levelMap; + } else { + level = parseInt(level, 10); + } + } + + return level; + }, + + // Can be overridden in the host environment + log: function log(level) { + level = logger.lookupLevel(level); + + if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { + var method = logger.methodMap[level]; + if (!console[method]) { + // eslint-disable-line no-console + method = 'log'; + } + + for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + message[_key - 1] = arguments[_key]; + } + + console[method].apply(console, message); // eslint-disable-line no-console + } + } + }; + + exports['default'] = logger; + module.exports = exports['default']; + +/***/ }), +/* 20 */ +/***/ (function(module, exports) { + + // Build out our basic SafeString type + 'use strict'; + + exports.__esModule = true; + function SafeString(string) { + this.string = string; + } + + SafeString.prototype.toString = SafeString.prototype.toHTML = function () { + return '' + this.string; + }; + + exports['default'] = SafeString; + module.exports = exports['default']; + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + var _Object$seal = __webpack_require__(22)['default']; + + var _interopRequireWildcard = __webpack_require__(1)['default']; + + var _interopRequireDefault = __webpack_require__(2)['default']; + + exports.__esModule = true; + exports.checkRevision = checkRevision; + exports.template = template; + exports.wrapProgram = wrapProgram; + exports.resolvePartial = resolvePartial; + exports.invokePartial = invokePartial; + exports.noop = noop; + + var _utils = __webpack_require__(4); + + var Utils = _interopRequireWildcard(_utils); + + var _exception = __webpack_require__(5); + + var _exception2 = _interopRequireDefault(_exception); + + var _base = __webpack_require__(3); + + function checkRevision(compilerInfo) { + var compilerRevision = compilerInfo && compilerInfo[0] || 1, + currentRevision = _base.COMPILER_REVISION; + + if (compilerRevision !== currentRevision) { + if (compilerRevision < currentRevision) { + var runtimeVersions = _base.REVISION_CHANGES[currentRevision], + compilerVersions = _base.REVISION_CHANGES[compilerRevision]; + throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); + } else { + // Use the embedded version info since the runtime doesn't know about this revision yet + throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); + } + } + } + + function template(templateSpec, env) { + /* istanbul ignore next */ + if (!env) { + throw new _exception2['default']('No environment passed to template'); + } + if (!templateSpec || !templateSpec.main) { + throw new _exception2['default']('Unknown template object: ' + typeof templateSpec); + } + + templateSpec.main.decorator = templateSpec.main_d; + + // Note: Using env.VM references rather than local var references throughout this section to allow + // for external users to override these as psuedo-supported APIs. + env.VM.checkRevision(templateSpec.compiler); + + function invokePartialWrapper(partial, context, options) { + if (options.hash) { + context = Utils.extend({}, context, options.hash); + if (options.ids) { + options.ids[0] = true; + } + } + + partial = env.VM.resolvePartial.call(this, partial, context, options); + var result = env.VM.invokePartial.call(this, partial, context, options); + + if (result == null && env.compile) { + options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); + result = options.partials[options.name](context, options); + } + if (result != null) { + if (options.indent) { + var lines = result.split('\n'); + for (var i = 0, l = lines.length; i < l; i++) { + if (!lines[i] && i + 1 === l) { + break; + } + + lines[i] = options.indent + lines[i]; + } + result = lines.join('\n'); + } + return result; + } else { + throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); + } + } + + // Just add water + var container = { + strict: function strict(obj, name) { + if (!(name in obj)) { + throw new _exception2['default']('"' + name + '" not defined in ' + obj); + } + return obj[name]; + }, + lookup: function lookup(depths, name) { + var len = depths.length; + for (var i = 0; i < len; i++) { + if (depths[i] && depths[i][name] != null) { + return depths[i][name]; + } + } + }, + lambda: function lambda(current, context) { + return typeof current === 'function' ? current.call(context) : current; + }, + + escapeExpression: Utils.escapeExpression, + invokePartial: invokePartialWrapper, + + fn: function fn(i) { + var ret = templateSpec[i]; + ret.decorator = templateSpec[i + '_d']; + return ret; + }, + + programs: [], + program: function program(i, data, declaredBlockParams, blockParams, depths) { + var programWrapper = this.programs[i], + fn = this.fn(i); + if (data || depths || blockParams || declaredBlockParams) { + programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); + } else if (!programWrapper) { + programWrapper = this.programs[i] = wrapProgram(this, i, fn); + } + return programWrapper; + }, + + data: function data(value, depth) { + while (value && depth--) { + value = value._parent; + } + return value; + }, + merge: function merge(param, common) { + var obj = param || common; + + if (param && common && param !== common) { + obj = Utils.extend({}, common, param); + } + + return obj; + }, + // An empty object to use as replacement for null-contexts + nullContext: _Object$seal({}), + + noop: env.VM.noop, + compilerInfo: templateSpec.compiler + }; + + function ret(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var data = options.data; + + ret._setup(options); + if (!options.partial && templateSpec.useData) { + data = initData(context, data); + } + var depths = undefined, + blockParams = templateSpec.useBlockParams ? [] : undefined; + if (templateSpec.useDepths) { + if (options.depths) { + depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths; + } else { + depths = [context]; + } + } + + function main(context /*, options*/) { + return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); + } + main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); + return main(context, options); + } + ret.isTop = true; + + ret._setup = function (options) { + if (!options.partial) { + container.helpers = container.merge(options.helpers, env.helpers); + + if (templateSpec.usePartial) { + container.partials = container.merge(options.partials, env.partials); + } + if (templateSpec.usePartial || templateSpec.useDecorators) { + container.decorators = container.merge(options.decorators, env.decorators); + } + } else { + container.helpers = options.helpers; + container.partials = options.partials; + container.decorators = options.decorators; + } + }; + + ret._child = function (i, data, blockParams, depths) { + if (templateSpec.useBlockParams && !blockParams) { + throw new _exception2['default']('must pass block params'); + } + if (templateSpec.useDepths && !depths) { + throw new _exception2['default']('must pass parent depths'); + } + + return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); + }; + return ret; + } + + function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { + function prog(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var currentDepths = depths; + if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) { + currentDepths = [context].concat(depths); + } + + return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); + } + + prog = executeDecorators(fn, prog, container, depths, data, blockParams); + + prog.program = i; + prog.depth = depths ? depths.length : 0; + prog.blockParams = declaredBlockParams || 0; + return prog; + } + + function resolvePartial(partial, context, options) { + if (!partial) { + if (options.name === '@partial-block') { + partial = options.data['partial-block']; + } else { + partial = options.partials[options.name]; + } + } else if (!partial.call && !options.name) { + // This is a dynamic partial that returned a string + options.name = partial; + partial = options.partials[partial]; + } + return partial; + } + + function invokePartial(partial, context, options) { + // Use the current closure context to save the partial-block if this partial + var currentPartialBlock = options.data && options.data['partial-block']; + options.partial = true; + if (options.ids) { + options.data.contextPath = options.ids[0] || options.data.contextPath; + } + + var partialBlock = undefined; + if (options.fn && options.fn !== noop) { + (function () { + options.data = _base.createFrame(options.data); + // Wrapper function to get access to currentPartialBlock from the closure + var fn = options.fn; + partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + // Restore the partial-block from the closure for the execution of the block + // i.e. the part inside the block of the partial call. + options.data = _base.createFrame(options.data); + options.data['partial-block'] = currentPartialBlock; + return fn(context, options); + }; + if (fn.partials) { + options.partials = Utils.extend({}, options.partials, fn.partials); + } + })(); + } + + if (partial === undefined && partialBlock) { + partial = partialBlock; + } + + if (partial === undefined) { + throw new _exception2['default']('The partial ' + options.name + ' could not be found'); + } else if (partial instanceof Function) { + return partial(context, options); + } + } + + function noop() { + return ''; + } + + function initData(context, data) { + if (!data || !('root' in data)) { + data = data ? _base.createFrame(data) : {}; + data.root = context; + } + return data; + } + + function executeDecorators(fn, prog, container, depths, data, blockParams) { + if (fn.decorator) { + var props = {}; + prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); + Utils.extend(prog, props); + } + return prog; + } + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + + module.exports = { "default": __webpack_require__(23), __esModule: true }; + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + + __webpack_require__(24); + module.exports = __webpack_require__(29).Object.seal; + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + + // 19.1.2.17 Object.seal(O) + var isObject = __webpack_require__(25); + + __webpack_require__(26)('seal', function($seal){ + return function seal(it){ + return $seal && isObject(it) ? $seal(it) : it; + }; + }); + +/***/ }), +/* 25 */ +/***/ (function(module, exports) { + + module.exports = function(it){ + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(27) + , core = __webpack_require__(29) + , fails = __webpack_require__(32); + module.exports = function(KEY, exec){ + var fn = (core.Object || {})[KEY] || Object[KEY] + , exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); + }; + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + + var global = __webpack_require__(28) + , core = __webpack_require__(29) + , ctx = __webpack_require__(30) + , PROTOTYPE = 'prototype'; + + var $export = function(type, name, source){ + var IS_FORCED = type & $export.F + , IS_GLOBAL = type & $export.G + , IS_STATIC = type & $export.S + , IS_PROTO = type & $export.P + , IS_BIND = type & $export.B + , IS_WRAP = type & $export.W + , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) + , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] + , key, own, out; + if(IS_GLOBAL)source = name; + for(key in source){ + // contains in native + own = !IS_FORCED && target && key in target; + if(own && key in exports)continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function(C){ + var F = function(param){ + return this instanceof C ? new C(param) : C(param); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out; + } + }; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + module.exports = $export; + +/***/ }), +/* 28 */ +/***/ (function(module, exports) { + + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); + if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef + +/***/ }), +/* 29 */ +/***/ (function(module, exports) { + + var core = module.exports = {version: '1.2.6'}; + if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + + // optional / simple context binding + var aFunction = __webpack_require__(31); + module.exports = function(fn, that, length){ + aFunction(fn); + if(that === undefined)return fn; + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + case 2: return function(a, b){ + return fn.call(that, a, b); + }; + case 3: return function(a, b, c){ + return fn.call(that, a, b, c); + }; + } + return function(/* ...args */){ + return fn.apply(that, arguments); + }; + }; + +/***/ }), +/* 31 */ +/***/ (function(module, exports) { + + module.exports = function(it){ + if(typeof it != 'function')throw TypeError(it + ' is not a function!'); + return it; + }; + +/***/ }), +/* 32 */ +/***/ (function(module, exports) { + + module.exports = function(exec){ + try { + return !!exec(); + } catch(e){ + return true; + } + }; + +/***/ }), +/* 33 */ +/***/ (function(module, exports) { + + /* WEBPACK VAR INJECTION */(function(global) {/* global window */ + 'use strict'; + + exports.__esModule = true; + + exports['default'] = function (Handlebars) { + /* istanbul ignore next */ + var root = typeof global !== 'undefined' ? global : window, + $Handlebars = root.Handlebars; + /* istanbul ignore next */ + Handlebars.noConflict = function () { + if (root.Handlebars === Handlebars) { + root.Handlebars = $Handlebars; + } + return Handlebars; + }; + }; + + module.exports = exports['default']; + /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + +/***/ }) +/******/ ]) +}); +; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(88), __esModule: true }; + +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + +var core = module.exports = { version: '2.5.3' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + + +/***/ }), +/* 6 */ +/***/ (function(module, exports) { + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +// css base code, injected by the css-loader +module.exports = function(useSourceMap) { + var list = []; + + // return the list of modules as css string + list.toString = function toString() { + return this.map(function (item) { + var content = cssWithMappingToString(item, useSourceMap); + if(item[2]) { + return "@media " + item[2] + "{" + content + "}"; + } else { + return content; + } + }).join(""); + }; + + // import a list of modules into the list + list.i = function(modules, mediaQuery) { + if(typeof modules === "string") + modules = [[null, modules, ""]]; + var alreadyImportedModules = {}; + for(var i = 0; i < this.length; i++) { + var id = this[i][0]; + if(typeof id === "number") + alreadyImportedModules[id] = true; + } + for(i = 0; i < modules.length; i++) { + var item = modules[i]; + // skip already imported module + // this implementation is not 100% perfect for weird media query combinations + // when a module is imported multiple times with different media queries. + // I hope this will never occur (Hey this way we have smaller bundles) + if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { + if(mediaQuery && !item[2]) { + item[2] = mediaQuery; + } else if(mediaQuery) { + item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; + } + list.push(item); + } + } + }; + return list; +}; + +function cssWithMappingToString(item, useSourceMap) { + var content = item[1] || ''; + var cssMapping = item[3]; + if (!cssMapping) { + return content; + } + + if (useSourceMap && typeof btoa === 'function') { + var sourceMapping = toComment(cssMapping); + var sourceURLs = cssMapping.sources.map(function (source) { + return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */' + }); + + return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); + } + + return [content].join('\n'); +} + +// Adapted from convert-source-map (MIT) +function toComment(sourceMap) { + // eslint-disable-next-line no-undef + var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); + var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; + + return '/*# ' + data + ' */'; +} + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _typeof2 = __webpack_require__(25); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; +}; + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _setPrototypeOf = __webpack_require__(108); + +var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); + +var _create = __webpack_require__(71); + +var _create2 = _interopRequireDefault(_create); + +var _typeof2 = __webpack_require__(25); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); + } + + subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; +}; + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _util = __webpack_require__(0); + +exports.default = (0, _util.Class)({ + init: function init($el) { + this._$el = $el; + }, + show: function show() { + this._$el.show(); + + return this; + }, + hide: function hide() { + this._$el.hide(); + + return this; + }, + destroy: function destroy() { + this._$el.remove(); + } +}); + +/***/ }), +/* 10 */ +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(44)('wks'); +var uid = __webpack_require__(30); +var Symbol = __webpack_require__(10).Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(10); +var core = __webpack_require__(5); +var ctx = __webpack_require__(38); +var hide = __webpack_require__(20); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && key in exports) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; + + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(7); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _get2 = __webpack_require__(14); + +var _get3 = _interopRequireDefault(_get2); + +var _inherits2 = __webpack_require__(8); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _Tool2 = __webpack_require__(9); + +var _Tool3 = _interopRequireDefault(_Tool2); + +var _util = __webpack_require__(0); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Settings = function (_Tool) { + (0, _inherits3.default)(Settings, _Tool); + + function Settings() { + (0, _classCallCheck3.default)(this, Settings); + + var _this = (0, _possibleConstructorReturn3.default)(this, (Settings.__proto__ || (0, _getPrototypeOf2.default)(Settings)).call(this)); + + _this._style = (0, _util.evalCss)(__webpack_require__(134)); + + _this.name = 'settings'; + _this._switchTpl = __webpack_require__(135); + _this._selectTpl = __webpack_require__(136); + _this._rangeTpl = __webpack_require__(137); + _this._colorTpl = __webpack_require__(138); + _this._settings = []; + return _this; + } + + (0, _createClass3.default)(Settings, [{ + key: 'init', + value: function init($el) { + (0, _get3.default)(Settings.prototype.__proto__ || (0, _getPrototypeOf2.default)(Settings.prototype), 'init', this).call(this, $el); + + this._bindEvent(); + } + }, { + key: 'destroy', + value: function destroy() { + (0, _get3.default)(Settings.prototype.__proto__ || (0, _getPrototypeOf2.default)(Settings.prototype), 'destroy', this).call(this); + + _util.evalCss.remove(this._style); + } + }, { + key: 'clear', + value: function clear() { + this._settings = []; + this._$el.html(''); + } + }, { + key: 'switch', + value: function _switch(config, key, desc) { + this._settings.push({ config: config, key: key }); + + this._$el.append(this._switchTpl({ + desc: desc, key: key, + idx: this._settings.length - 1, + val: config.get(key) + })); + + return this; + } + }, { + key: 'color', + value: function color(config, key, desc) { + var colors = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ['#2196f3', '#707d8b', '#f44336', '#009688', '#ffc107']; + + this._settings.push({ config: config, key: key }); + + this._$el.append(this._colorTpl({ + desc: desc, colors: colors, + idx: this._settings.length - 1, + val: config.get(key) + })); + + return this; + } + }, { + key: 'select', + value: function select(config, key, desc, selections) { + this._settings.push({ config: config, key: key }); + + this._$el.append(this._selectTpl({ + desc: desc, selections: selections, + idx: this._settings.length - 1, + val: config.get(key) + })); + + return this; + } + }, { + key: 'range', + value: function range(config, key, desc, _ref) { + var _ref$min = _ref.min, + min = _ref$min === undefined ? 0 : _ref$min, + _ref$max = _ref.max, + max = _ref$max === undefined ? 1 : _ref$max, + _ref$step = _ref.step, + step = _ref$step === undefined ? 0.1 : _ref$step; + + this._settings.push({ config: config, key: key, min: min, max: max, step: step }); + + var val = config.get(key); + + this._$el.append(this._rangeTpl({ + desc: desc, min: min, max: max, step: step, val: val, + progress: progress(val, min, max), + idx: this._settings.length - 1 + })); + + return this; + } + }, { + key: 'separator', + value: function separator() { + this._$el.append('
'); + + return this; + } + }, { + key: 'text', + value: function text(_text) { + this._$el.append('
' + _text + '
'); + + return this; + } + }, { + key: '_closeAll', + value: function _closeAll() { + this._$el.find('.eruda-open').rmClass('eruda-open'); + } + }, { + key: '_bindEvent', + value: function _bindEvent() { + var self = this; + + this._$el.on('click', '.eruda-checkbox', function () { + var $input = (0, _util.$)(this).find('input'), + idx = $input.data('idx'), + val = $input.get(0).checked; + + var setting = self._settings[idx]; + setting.config.set(setting.key, val); + }).on('click', '.eruda-select .eruda-head', function () { + var $el = (0, _util.$)(this).parent().find('ul'), + isOpen = $el.hasClass('eruda-open'); + + self._closeAll(); + isOpen ? $el.rmClass('eruda-open') : $el.addClass('eruda-open'); + }).on('click', '.eruda-select li', function () { + var $this = (0, _util.$)(this), + $ul = $this.parent(), + val = $this.text(), + idx = $ul.data('idx'), + setting = self._settings[idx]; + + $ul.rmClass('eruda-open'); + $ul.parent().find('.eruda-head span').text(val); + + setting.config.set(setting.key, val); + }).on('click', '.eruda-range .eruda-head', function () { + var $el = (0, _util.$)(this).parent().find('.eruda-input-container'), + isOpen = $el.hasClass('eruda-open'); + + self._closeAll(); + isOpen ? $el.rmClass('eruda-open') : $el.addClass('eruda-open'); + }).on('change', '.eruda-range input', function () { + var $this = (0, _util.$)(this), + $container = $this.parent(), + idx = $container.data('idx'), + val = +$this.val(), + setting = self._settings[idx]; + + setting.config.set(setting.key, val); + }).on('input', '.eruda-range input', function () { + var $this = (0, _util.$)(this), + $container = $this.parent(), + idx = $container.data('idx'), + val = +$this.val(), + setting = self._settings[idx], + min = setting.min, + max = setting.max; + + + $container.parent().find('.eruda-head span').text(val); + $container.find('.eruda-range-track-progress').css('width', progress(val, min, max) + '%'); + }).on('click', '.eruda-color .eruda-head', function () { + var $el = (0, _util.$)(this).parent().find('ul'), + isOpen = $el.hasClass('eruda-open'); + + self._closeAll(); + isOpen ? $el.rmClass('eruda-open') : $el.addClass('eruda-open'); + }).on('click', '.eruda-color li', function () { + var $this = (0, _util.$)(this), + $ul = $this.parent(), + val = $this.css('background-color'), + idx = $ul.data('idx'), + setting = self._settings[idx]; + + $ul.rmClass('eruda-open'); + $ul.parent().find('.eruda-head span').css('background-color', val); + + setting.config.set(setting.key, val); + }); + } + }], [{ + key: 'createCfg', + value: function createCfg(name, data) { + return new _util.LocalStore('eruda-' + name, data); + } + }]); + return Settings; +}(_Tool3.default); + +exports.default = Settings; + + +var progress = function progress(val, min, max) { + return ((val - min) / (max - min) * 100).toFixed(2); +}; + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _getOwnPropertyDescriptor = __webpack_require__(34); + +var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function get(object, property, receiver) { + if (object === null) object = Function.prototype; + var desc = (0, _getOwnPropertyDescriptor2.default)(object, property); + + if (desc === undefined) { + var parent = (0, _getPrototypeOf2.default)(object); + + if (parent === null) { + return undefined; + } else { + return get(parent, property, receiver); + } + } else if ("value" in desc) { + return desc.value; + } else { + var getter = desc.get; + + if (getter === undefined) { + return undefined; + } + + return getter.call(receiver); + } +}; + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(21); +var IE8_DOM_DEFINE = __webpack_require__(60); +var toPrimitive = __webpack_require__(40); +var dP = Object.defineProperty; + +exports.f = __webpack_require__(17) ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + + +/***/ }), +/* 16 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(22)(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 18 */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(62); +var defined = __webpack_require__(41); +module.exports = function (it) { + return IObject(defined(it)); +}; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(15); +var createDesc = __webpack_require__(28); +module.exports = __webpack_require__(17) ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(16); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(61); +var enumBugKeys = __webpack_require__(45); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +// most Object methods by ES6 should accept primitives +var $export = __webpack_require__(12); +var core = __webpack_require__(5); +var fails = __webpack_require__(22); +module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); +}; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _iterator = __webpack_require__(92); + +var _iterator2 = _interopRequireDefault(_iterator); + +var _symbol = __webpack_require__(100); + +var _symbol2 = _interopRequireDefault(_symbol); + +var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { + return typeof obj === "undefined" ? "undefined" : _typeof(obj); +} : function (obj) { + return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); +}; + +/***/ }), +/* 26 */ +/***/ (function(module, exports) { + +module.exports = {}; + + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _util = __webpack_require__(0); + +var emitter = new _util.Emitter(); +emitter.ADD = 'ADD'; +emitter.SHOW = 'SHOW'; +emitter.SCALE = 'SCALE'; + +module.exports = emitter; + +/***/ }), +/* 28 */ +/***/ (function(module, exports) { + +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + + +/***/ }), +/* 29 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + + +/***/ }), +/* 30 */ +/***/ (function(module, exports) { + +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + + +/***/ }), +/* 31 */ +/***/ (function(module, exports) { + +exports.f = {}.propertyIsEnumerable; + + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(41); +module.exports = function (it) { + return Object(defined(it)); +}; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(121), __esModule: true }; + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(127), __esModule: true }; + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(132), __esModule: true }; + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _util = __webpack_require__(0); + +var logger = void 0; + +exports.default = logger = new _util.Logger('[Eruda]', false ? 'warn' : 'debug'); + + +logger.formatter = function (type, argList) { + argList.unshift(this.name); + + return argList; +}; + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(80), __esModule: true }; + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +// optional / simple context binding +var aFunction = __webpack_require__(82); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + + +/***/ }), +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(16); +var document = __webpack_require__(10).document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; + + +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(16); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + + +/***/ }), +/* 41 */ +/***/ (function(module, exports) { + +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + + +/***/ }), +/* 42 */ +/***/ (function(module, exports) { + +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +var shared = __webpack_require__(44)('keys'); +var uid = __webpack_require__(30); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(10); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); +module.exports = function (key) { + return store[key] || (store[key] = {}); +}; + + +/***/ }), +/* 45 */ +/***/ (function(module, exports) { + +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + + +/***/ }), +/* 46 */ +/***/ (function(module, exports) { + +exports.f = Object.getOwnPropertySymbols; + + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $at = __webpack_require__(94)(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(65)(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); + + +/***/ }), +/* 48 */ +/***/ (function(module, exports) { + +module.exports = true; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__(21); +var dPs = __webpack_require__(96); +var enumBugKeys = __webpack_require__(45); +var IE_PROTO = __webpack_require__(43)('IE_PROTO'); +var Empty = function () { /* empty */ }; +var PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(39)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(67).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__(15).f; +var has = __webpack_require__(18); +var TAG = __webpack_require__(11)('toStringTag'); + +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; + + +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(97); +var global = __webpack_require__(10); +var hide = __webpack_require__(20); +var Iterators = __webpack_require__(26); +var TO_STRING_TAG = __webpack_require__(11)('toStringTag'); + +var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); + +for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} + + +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { + +exports.f = __webpack_require__(11); + + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(10); +var core = __webpack_require__(5); +var LIBRARY = __webpack_require__(48); +var wksExt = __webpack_require__(52); +var defineProperty = __webpack_require__(15).f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +}; + + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +var pIE = __webpack_require__(31); +var createDesc = __webpack_require__(28); +var toIObject = __webpack_require__(19); +var toPrimitive = __webpack_require__(40); +var has = __webpack_require__(18); +var IE8_DOM_DEFINE = __webpack_require__(60); +var gOPD = Object.getOwnPropertyDescriptor; + +exports.f = __webpack_require__(17) ? gOPD : function getOwnPropertyDescriptor(O, P) { + O = toIObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) try { + return gOPD(O, P); + } catch (e) { /* empty */ } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); +}; + + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(149), __esModule: true }; + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = highlight; + +var _util = __webpack_require__(0); + +// https://github.com/trentrichardson/jQuery-Litelighter +function highlight(str, lang) { + lang = lang || 'js'; + + str = str.replace(//g, '>'); + + lang = language[lang]; + + var subLangSi = 0, + subLangs = []; + + (0, _util.each)(lang, function (val) { + if (!val.language) return; + + str = str.replace(val.re, function ($1, $2) { + subLangs[subLangSi++] = highlight($2, val.language); + return $1.replace($2, '___subtmpl' + (subLangSi - 1) + '___'); + }); + }); + + (0, _util.each)(lang, function (val, key) { + if (language[val.language]) return; + + str = str.replace(val.re, '___' + key + '___$1___end' + key + '___'); + }); + + var levels = []; + + str = str.replace(/___(?!subtmpl)\w+?___/g, function ($0) { + var end = $0.substr(3, 3) === 'end', + tag = (!end ? $0.substr(3) : $0.substr(6)).replace(/_/g, ''), + lastTag = levels.length > 0 ? levels[levels.length - 1] : null; + + if (!end && (lastTag == null || tag == lastTag || lastTag != null && lang[lastTag] && lang[lastTag].embed != undefined && lang[lastTag].embed.indexOf(tag) > -1)) { + levels.push(tag); + + return $0; + } else if (end && tag == lastTag) { + levels.pop(); + + return $0; + } + + return ''; + }); + + (0, _util.each)(lang, function (val, key) { + str = str.replace(new RegExp('___end' + key + '___', 'g'), '').replace(new RegExp('___' + key + '___', 'g'), ''); + }); + + (0, _util.each)(lang, function (val) { + if (!val.language) return; + + str = str.replace(/___subtmpl\d+___/g, function ($tmpl) { + var i = parseInt($tmpl.replace(/___subtmpl(\d+)___/, '$1'), 10); + + return subLangs[i]; + }); + }); + + return str; +} + +var style = { + comment: 'color:#63a35c;', + string: 'color:#183691;', + number: 'color:#0086b3;', + keyword: 'color:#a71d5d;', + operators: 'color:#a71d5d;' +}; + +var language = {}; + +language.js = { + comment: { re: /(\/\/.*|\/\*([\s\S]*?)\*\/)/g, style: 'comment' }, + string: { re: /(('.*?')|(".*?"))/g, style: 'string' }, + numbers: { re: /(-?(\d+|\d+\.\d+|\.\d+))/g, style: 'number' }, + keywords: { re: /(?:\b)(function|for|foreach|while|if|else|elseif|switch|break|as|return|this|class|self|default|var|false|true|null|undefined)(?:\b)/gi, style: 'keyword' }, + operators: { re: /(\+|-|\/|\*|%|=|<|>|\||\?|\.)/g, style: 'operators' } +}; + +language.html = { + comment: { re: /(<!--([\s\S]*?)-->)/g, style: 'comment' }, + tag: { re: /(<\/?\w(.|\n)*?\/?>)/g, style: 'keyword', embed: ['string'] }, + string: language.js.string, + css: { re: /(?:<style.*?>)([\s\S]*)?(?:<\/style>)/gi, language: 'css' }, + script: { re: /(?:<script.*?>)([\s\S]*?)(?:<\/script>)/gi, language: 'js' } +}; + +language.css = { + comment: language.js.comment, + string: language.js.string, + numbers: { re: /((-?(\d+|\d+\.\d+|\.\d+)(%|px|em|pt|in)?)|#[0-9a-fA-F]{3}[0-9a-fA-F]{3})/g, style: 'number' }, + keywords: { re: /(@\w+|:?:\w+|[a-z-]+:)/g, style: 'keyword' } +}; + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +*/ + +/** +The following batches are equivalent: + +var beautify_js = require('js-beautify'); +var beautify_js = require('js-beautify').js; +var beautify_js = require('js-beautify').js_beautify; + +var beautify_css = require('js-beautify').css; +var beautify_css = require('js-beautify').css_beautify; + +var beautify_html = require('js-beautify').html; +var beautify_html = require('js-beautify').html_beautify; + +All methods returned accept two arguments, the source string and an options object. +**/ + +function get_beautify(js_beautify, css_beautify, html_beautify) { + // the default is js + var beautify = function(src, config) { + return js_beautify.js_beautify(src, config); + }; + + // short aliases + beautify.js = js_beautify.js_beautify; + beautify.css = css_beautify.css_beautify; + beautify.html = html_beautify.html_beautify; + + // legacy aliases + beautify.js_beautify = js_beautify.js_beautify; + beautify.css_beautify = css_beautify.css_beautify; + beautify.html_beautify = html_beautify.html_beautify; + + return beautify; +} + +if (true) { + // Add support for AMD ( https://github.com/amdjs/amdjs-api/wiki/AMD#defineamd-property- ) + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ + __webpack_require__(58), + __webpack_require__(59), + __webpack_require__(161) + ], __WEBPACK_AMD_DEFINE_RESULT__ = (function(js_beautify, css_beautify, html_beautify) { + return get_beautify(js_beautify, css_beautify, html_beautify); + }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +} else { + (function(mod) { + var js_beautify = require('./lib/beautify'); + var css_beautify = require('./lib/beautify-css'); + var html_beautify = require('./lib/beautify-html'); + + mod.exports = get_beautify(js_beautify, css_beautify, html_beautify); + + })(module); +} + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*jshint curly:false, eqeqeq:true, laxbreak:true, noempty:false */ +/* AUTO-GENERATED. DO NOT MODIFY. */ +/* see js/src/javascript/index.js */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + JS Beautifier +--------------- + + + Written by Einar Lielmanis, + http://jsbeautifier.org/ + + Originally converted to javascript by Vital, + "End braces on own line" added by Chris J. Shull, + Parsing improvements for brace-less statements by Liam Newman + + + Usage: + js_beautify(js_source_text); + js_beautify(js_source_text, options); + + The options are: + indent_size (default 4) - indentation size, + indent_char (default space) - character to indent with, + preserve_newlines (default true) - whether existing line breaks should be preserved, + max_preserve_newlines (default unlimited) - maximum number of line breaks to be preserved in one chunk, + + jslint_happy (default false) - if true, then jslint-stricter mode is enforced. + + jslint_happy !jslint_happy + --------------------------------- + function () function() + + switch () { switch() { + case 1: case 1: + break; break; + } } + + space_after_anon_function (default false) - should the space before an anonymous function's parens be added, "function()" vs "function ()", + NOTE: This option is overriden by jslint_happy (i.e. if jslint_happy is true, space_after_anon_function is true by design) + + brace_style (default "collapse") - "collapse" | "expand" | "end-expand" | "none" | any of the former + ",preserve-inline" + put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line, or attempt to keep them where they are. + preserve-inline will try to preserve inline blocks of curly braces + + space_before_conditional (default true) - should the space before conditional statement be added, "if(true)" vs "if (true)", + + unescape_strings (default false) - should printable characters in strings encoded in \xNN notation be unescaped, "example" vs "\x65\x78\x61\x6d\x70\x6c\x65" + + wrap_line_length (default unlimited) - lines should wrap at next opportunity after this number of characters. + NOTE: This is not a hard limit. Lines will continue until a point where a newline would + be preserved if it were present. + + end_with_newline (default false) - end output with a newline + + + e.g + + js_beautify(js_source_text, { + 'indent_size': 1, + 'indent_char': '\t' + }); + +*/ + +(function() { +var legacy_beautify_js = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 6); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +/* jshint curly: false */ +// This section of code is taken from acorn. +// +// Acorn was written by Marijn Haverbeke and released under an MIT +// license. The Unicode regexps (for identifiers and whitespace) were +// taken from [Esprima](http://esprima.org) by Ariya Hidayat. +// +// Git repositories for Acorn are available at +// +// http://marijnhaverbeke.nl/git/acorn +// https://github.com/marijnh/acorn.git + +// ## Character categories + +// Big ugly regular expressions that match characters in the +// whitespace, identifier, and identifier-start categories. These +// are only applied when a character is found to actually have a +// code point above 128. + +var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/; // jshint ignore:line +var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; +var nonASCIIidentifierChars = "\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u0620-\u0649\u0672-\u06d3\u06e7-\u06e8\u06fb-\u06fc\u0730-\u074a\u0800-\u0814\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0840-\u0857\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962-\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09d7\u09df-\u09e0\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5f-\u0b60\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2-\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d46-\u0d48\u0d57\u0d62-\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e34-\u0e3a\u0e40-\u0e45\u0e50-\u0e59\u0eb4-\u0eb9\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f41-\u0f47\u0f71-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1029\u1040-\u1049\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u170e-\u1710\u1720-\u1730\u1740-\u1750\u1772\u1773\u1780-\u17b2\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1920-\u192b\u1930-\u193b\u1951-\u196d\u19b0-\u19c0\u19c8-\u19c9\u19d0-\u19d9\u1a00-\u1a15\u1a20-\u1a53\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b46-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1bb0-\u1bb9\u1be6-\u1bf3\u1c00-\u1c22\u1c40-\u1c49\u1c5b-\u1c7d\u1cd0-\u1cd2\u1d00-\u1dbe\u1e01-\u1f15\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2d81-\u2d96\u2de0-\u2dff\u3021-\u3028\u3099\u309a\ua640-\ua66d\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua7f8-\ua800\ua806\ua80b\ua823-\ua827\ua880-\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8f3-\ua8f7\ua900-\ua909\ua926-\ua92d\ua930-\ua945\ua980-\ua983\ua9b3-\ua9c0\uaa00-\uaa27\uaa40-\uaa41\uaa4c-\uaa4d\uaa50-\uaa59\uaa7b\uaae0-\uaae9\uaaf2-\uaaf3\uabc0-\uabe1\uabec\uabed\uabf0-\uabf9\ufb20-\ufb28\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; +var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); +var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + +// Whether a single character denotes a newline. + +exports.newline = /[\n\r\u2028\u2029]/; + +// Matches a whole line break (where CRLF is considered a single +// line break). Used to count lines. + +// in javascript, these two differ +// in python they are the same, different methods are called on them +exports.lineBreak = new RegExp('\r\n|' + exports.newline.source); +exports.allLineBreaks = new RegExp(exports.lineBreak.source, 'g'); + + +// Test whether a given character code starts an identifier. + +exports.isIdentifierStart = function(code) { + // permit $ (36) and @ (64). @ is used in ES7 decorators. + if (code < 65) return code === 36 || code === 64; + // 65 through 91 are uppercase letters. + if (code < 91) return true; + // permit _ (95). + if (code < 97) return code === 95; + // 97 through 123 are lowercase letters. + if (code < 123) return true; + return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); +}; + +// Test whether a given character is part of an identifier. + +exports.isIdentifierChar = function(code) { + if (code < 48) return code === 36; + if (code < 58) return true; + if (code < 65) return false; + if (code < 91) return true; + if (code < 97) return code === 95; + if (code < 123) return true; + return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); +}; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + +var mergeOpts = __webpack_require__(3).mergeOpts; +var acorn = __webpack_require__(0); +var Output = __webpack_require__(4).Output; +var Tokenizer = __webpack_require__(7).Tokenizer; + +function remove_redundant_indentation(output, frame) { + // This implementation is effective but has some issues: + // - can cause line wrap to happen too soon due to indent removal + // after wrap points are calculated + // These issues are minor compared to ugly indentation. + + if (frame.multiline_frame || + frame.mode === MODE.ForInitializer || + frame.mode === MODE.Conditional) { + return; + } + + // remove one indent from each line inside this section + var start_index = frame.start_line_index; + + output.remove_indent(start_index); +} + +function in_array(what, arr) { + for (var i = 0; i < arr.length; i += 1) { + if (arr[i] === what) { + return true; + } + } + return false; +} + +function trim(s) { + return s.replace(/^\s+|\s+$/g, ''); +} + +function ltrim(s) { + return s.replace(/^\s+/g, ''); +} + +// function rtrim(s) { +// return s.replace(/\s+$/g, ''); +// } + + +function generateMapFromStrings(list) { + var result = {}; + for (var x = 0; x < list.length; x++) { + // make the mapped names underscored instead of dash + result[list[x].replace(/-/g, '_')] = list[x]; + } + return result; +} + +function sanitizeOperatorPosition(opPosition) { + opPosition = opPosition || OPERATOR_POSITION.before_newline; + + if (!in_array(opPosition, validPositionValues)) { + throw new Error("Invalid Option Value: The option 'operator_position' must be one of the following values\n" + + validPositionValues + + "\nYou passed in: '" + opPosition + "'"); + } + + return opPosition; +} + +var validPositionValues = ['before-newline', 'after-newline', 'preserve-newline']; + +// Generate map from array +var OPERATOR_POSITION = generateMapFromStrings(validPositionValues); + +var OPERATOR_POSITION_BEFORE_OR_PRESERVE = [OPERATOR_POSITION.before_newline, OPERATOR_POSITION.preserve_newline]; + +var MODE = { + BlockStatement: 'BlockStatement', // 'BLOCK' + Statement: 'Statement', // 'STATEMENT' + ObjectLiteral: 'ObjectLiteral', // 'OBJECT', + ArrayLiteral: 'ArrayLiteral', //'[EXPRESSION]', + ForInitializer: 'ForInitializer', //'(FOR-EXPRESSION)', + Conditional: 'Conditional', //'(COND-EXPRESSION)', + Expression: 'Expression' //'(EXPRESSION)' +}; + +function Beautifier(js_source_text, options) { + "use strict"; + var output; + var tokens = [], + token_pos; + var tokenizer; + var current_token; + var last_type, last_last_text, indent_string; + var flags, previous_flags, flag_store; + var prefix; + + var handlers, opt; + var baseIndentString = ''; + + handlers = { + 'TK_START_EXPR': handle_start_expr, + 'TK_END_EXPR': handle_end_expr, + 'TK_START_BLOCK': handle_start_block, + 'TK_END_BLOCK': handle_end_block, + 'TK_WORD': handle_word, + 'TK_RESERVED': handle_word, + 'TK_SEMICOLON': handle_semicolon, + 'TK_STRING': handle_string, + 'TK_EQUALS': handle_equals, + 'TK_OPERATOR': handle_operator, + 'TK_COMMA': handle_comma, + 'TK_BLOCK_COMMENT': handle_block_comment, + 'TK_COMMENT': handle_comment, + 'TK_DOT': handle_dot, + 'TK_UNKNOWN': handle_unknown, + 'TK_EOF': handle_eof + }; + + function create_flags(flags_base, mode) { + var next_indent_level = 0; + if (flags_base) { + next_indent_level = flags_base.indentation_level; + if (!output.just_added_newline() && + flags_base.line_indent_level > next_indent_level) { + next_indent_level = flags_base.line_indent_level; + } + } + + var next_flags = { + mode: mode, + parent: flags_base, + last_text: flags_base ? flags_base.last_text : '', // last token text + last_word: flags_base ? flags_base.last_word : '', // last 'TK_WORD' passed + declaration_statement: false, + declaration_assignment: false, + multiline_frame: false, + inline_frame: false, + if_block: false, + else_block: false, + do_block: false, + do_while: false, + import_block: false, + in_case_statement: false, // switch(..){ INSIDE HERE } + in_case: false, // we're on the exact line with "case 0:" + case_body: false, // the indented case-action block + indentation_level: next_indent_level, + line_indent_level: flags_base ? flags_base.line_indent_level : next_indent_level, + start_line_index: output.get_line_number(), + ternary_depth: 0 + }; + return next_flags; + } + + // Some interpreters have unexpected results with foo = baz || bar; + options = options ? options : {}; + + // Allow the setting of language/file-type specific options + // with inheritance of overall settings + options = mergeOpts(options, 'js'); + + opt = {}; + + // compatibility, re + if (options.brace_style === "expand-strict") { //graceful handling of deprecated option + options.brace_style = "expand"; + } else if (options.brace_style === "collapse-preserve-inline") { //graceful handling of deprecated option + options.brace_style = "collapse,preserve-inline"; + } else if (options.braces_on_own_line !== undefined) { //graceful handling of deprecated option + options.brace_style = options.braces_on_own_line ? "expand" : "collapse"; + } else if (!options.brace_style) { //Nothing exists to set it + options.brace_style = "collapse"; + } + + //preserve-inline in delimited string will trigger brace_preserve_inline, everything + //else is considered a brace_style and the last one only will have an effect + var brace_style_split = options.brace_style.split(/[^a-zA-Z0-9_\-]+/); + opt.brace_preserve_inline = false; //Defaults in case one or other was not specified in meta-option + opt.brace_style = "collapse"; + for (var bs = 0; bs < brace_style_split.length; bs++) { + if (brace_style_split[bs] === "preserve-inline") { + opt.brace_preserve_inline = true; + } else { + opt.brace_style = brace_style_split[bs]; + } + } + + opt.indent_size = options.indent_size ? parseInt(options.indent_size, 10) : 4; + opt.indent_char = options.indent_char ? options.indent_char : ' '; + opt.eol = options.eol ? options.eol : 'auto'; + opt.preserve_newlines = (options.preserve_newlines === undefined) ? true : options.preserve_newlines; + opt.unindent_chained_methods = (options.unindent_chained_methods === undefined) ? false : options.unindent_chained_methods; + opt.break_chained_methods = (options.break_chained_methods === undefined) ? false : options.break_chained_methods; + opt.max_preserve_newlines = (options.max_preserve_newlines === undefined) ? 0 : parseInt(options.max_preserve_newlines, 10); + opt.space_in_paren = (options.space_in_paren === undefined) ? false : options.space_in_paren; + opt.space_in_empty_paren = (options.space_in_empty_paren === undefined) ? false : options.space_in_empty_paren; + opt.jslint_happy = (options.jslint_happy === undefined) ? false : options.jslint_happy; + opt.space_after_anon_function = (options.space_after_anon_function === undefined) ? false : options.space_after_anon_function; + opt.keep_array_indentation = (options.keep_array_indentation === undefined) ? false : options.keep_array_indentation; + opt.space_before_conditional = (options.space_before_conditional === undefined) ? true : options.space_before_conditional; + opt.unescape_strings = (options.unescape_strings === undefined) ? false : options.unescape_strings; + opt.wrap_line_length = (options.wrap_line_length === undefined) ? 0 : parseInt(options.wrap_line_length, 10); + opt.e4x = (options.e4x === undefined) ? false : options.e4x; + opt.end_with_newline = (options.end_with_newline === undefined) ? false : options.end_with_newline; + opt.comma_first = (options.comma_first === undefined) ? false : options.comma_first; + opt.operator_position = sanitizeOperatorPosition(options.operator_position); + + // For testing of beautify ignore:start directive + opt.test_output_raw = (options.test_output_raw === undefined) ? false : options.test_output_raw; + + // force opt.space_after_anon_function to true if opt.jslint_happy + if (opt.jslint_happy) { + opt.space_after_anon_function = true; + } + + if (options.indent_with_tabs) { + opt.indent_char = '\t'; + opt.indent_size = 1; + } + + if (opt.eol === 'auto') { + opt.eol = '\n'; + if (js_source_text && acorn.lineBreak.test(js_source_text || '')) { + opt.eol = js_source_text.match(acorn.lineBreak)[0]; + } + } + + opt.eol = opt.eol.replace(/\\r/, '\r').replace(/\\n/, '\n'); + + //---------------------------------- + indent_string = ''; + while (opt.indent_size > 0) { + indent_string += opt.indent_char; + opt.indent_size -= 1; + } + + var preindent_index = 0; + if (js_source_text && js_source_text.length) { + while ((js_source_text.charAt(preindent_index) === ' ' || + js_source_text.charAt(preindent_index) === '\t')) { + preindent_index += 1; + } + baseIndentString = js_source_text.substring(0, preindent_index); + js_source_text = js_source_text.substring(preindent_index); + } + + last_type = 'TK_START_BLOCK'; // last token type + last_last_text = ''; // pre-last token text + output = new Output(indent_string, baseIndentString); + + // If testing the ignore directive, start with output disable set to true + output.raw = opt.test_output_raw; + + + // Stack of parsing/formatting states, including MODE. + // We tokenize, parse, and output in an almost purely a forward-only stream of token input + // and formatted output. This makes the beautifier less accurate than full parsers + // but also far more tolerant of syntax errors. + // + // For example, the default mode is MODE.BlockStatement. If we see a '{' we push a new frame of type + // MODE.BlockStatement on the the stack, even though it could be object literal. If we later + // encounter a ":", we'll switch to to MODE.ObjectLiteral. If we then see a ";", + // most full parsers would die, but the beautifier gracefully falls back to + // MODE.BlockStatement and continues on. + flag_store = []; + set_mode(MODE.BlockStatement); + + this.beautify = function() { + + /*jshint onevar:true */ + var sweet_code; + tokenizer = new Tokenizer(js_source_text, opt, indent_string); + tokens = tokenizer.tokenize(); + token_pos = 0; + + current_token = get_token(); + while (current_token) { + handlers[current_token.type](); + + last_last_text = flags.last_text; + last_type = current_token.type; + flags.last_text = current_token.text; + + token_pos += 1; + current_token = get_token(); + } + + sweet_code = output.get_code(opt.end_with_newline, opt.eol); + + return sweet_code; + }; + + function handle_whitespace_and_comments(local_token, preserve_statement_flags) { + var newlines = local_token.newlines; + var keep_whitespace = opt.keep_array_indentation && is_array(flags.mode); + var temp_token = current_token; + + for (var h = 0; h < local_token.comments_before.length; h++) { + // The cleanest handling of inline comments is to treat them as though they aren't there. + // Just continue formatting and the behavior should be logical. + // Also ignore unknown tokens. Again, this should result in better behavior. + current_token = local_token.comments_before[h]; + handle_whitespace_and_comments(current_token, preserve_statement_flags); + handlers[current_token.type](preserve_statement_flags); + } + current_token = temp_token; + + if (keep_whitespace) { + for (var i = 0; i < newlines; i += 1) { + print_newline(i > 0, preserve_statement_flags); + } + } else { + if (opt.max_preserve_newlines && newlines > opt.max_preserve_newlines) { + newlines = opt.max_preserve_newlines; + } + + if (opt.preserve_newlines) { + if (local_token.newlines > 1) { + print_newline(false, preserve_statement_flags); + for (var j = 1; j < newlines; j += 1) { + print_newline(true, preserve_statement_flags); + } + } + } + } + + } + + // we could use just string.split, but + // IE doesn't like returning empty strings + function split_linebreaks(s) { + //return s.split(/\x0d\x0a|\x0a/); + + s = s.replace(acorn.allLineBreaks, '\n'); + var out = [], + idx = s.indexOf("\n"); + while (idx !== -1) { + out.push(s.substring(0, idx)); + s = s.substring(idx + 1); + idx = s.indexOf("\n"); + } + if (s.length) { + out.push(s); + } + return out; + } + + var newline_restricted_tokens = ['break', 'continue', 'return', 'throw', 'yield']; + + function allow_wrap_or_preserved_newline(force_linewrap) { + force_linewrap = (force_linewrap === undefined) ? false : force_linewrap; + + // Never wrap the first token on a line + if (output.just_added_newline()) { + return; + } + + var shouldPreserveOrForce = (opt.preserve_newlines && current_token.wanted_newline) || force_linewrap; + var operatorLogicApplies = in_array(flags.last_text, tokenizer.positionable_operators) || in_array(current_token.text, tokenizer.positionable_operators); + + if (operatorLogicApplies) { + var shouldPrintOperatorNewline = ( + in_array(flags.last_text, tokenizer.positionable_operators) && + in_array(opt.operator_position, OPERATOR_POSITION_BEFORE_OR_PRESERVE) + ) || + in_array(current_token.text, tokenizer.positionable_operators); + shouldPreserveOrForce = shouldPreserveOrForce && shouldPrintOperatorNewline; + } + + if (shouldPreserveOrForce) { + print_newline(false, true); + } else if (opt.wrap_line_length) { + if (last_type === 'TK_RESERVED' && in_array(flags.last_text, newline_restricted_tokens)) { + // These tokens should never have a newline inserted + // between them and the following expression. + return; + } + var proposed_line_length = output.current_line.get_character_count() + current_token.text.length + + (output.space_before_token ? 1 : 0); + if (proposed_line_length >= opt.wrap_line_length) { + print_newline(false, true); + } + } + } + + function print_newline(force_newline, preserve_statement_flags) { + if (!preserve_statement_flags) { + if (flags.last_text !== ';' && flags.last_text !== ',' && flags.last_text !== '=' && last_type !== 'TK_OPERATOR') { + var next_token = get_token(1); + while (flags.mode === MODE.Statement && + !(flags.if_block && next_token && next_token.type === 'TK_RESERVED' && next_token.text === 'else') && + !flags.do_block) { + restore_mode(); + } + } + } + + if (output.add_new_line(force_newline)) { + flags.multiline_frame = true; + } + } + + function print_token_line_indentation() { + if (output.just_added_newline()) { + if (opt.keep_array_indentation && is_array(flags.mode) && current_token.wanted_newline) { + output.current_line.push(current_token.whitespace_before); + output.space_before_token = false; + } else if (output.set_indent(flags.indentation_level)) { + flags.line_indent_level = flags.indentation_level; + } + } + } + + function print_token(printable_token) { + if (output.raw) { + output.add_raw_token(current_token); + return; + } + + if (opt.comma_first && last_type === 'TK_COMMA' && + output.just_added_newline()) { + if (output.previous_line.last() === ',') { + var popped = output.previous_line.pop(); + // if the comma was already at the start of the line, + // pull back onto that line and reprint the indentation + if (output.previous_line.is_empty()) { + output.previous_line.push(popped); + output.trim(true); + output.current_line.pop(); + output.trim(); + } + + // add the comma in front of the next token + print_token_line_indentation(); + output.add_token(','); + output.space_before_token = true; + } + } + + printable_token = printable_token || current_token.text; + print_token_line_indentation(); + output.add_token(printable_token); + } + + function indent() { + flags.indentation_level += 1; + } + + function deindent() { + if (flags.indentation_level > 0 && + ((!flags.parent) || flags.indentation_level > flags.parent.indentation_level)) { + flags.indentation_level -= 1; + + } + } + + function set_mode(mode) { + if (flags) { + flag_store.push(flags); + previous_flags = flags; + } else { + previous_flags = create_flags(null, mode); + } + + flags = create_flags(previous_flags, mode); + } + + function is_array(mode) { + return mode === MODE.ArrayLiteral; + } + + function is_expression(mode) { + return in_array(mode, [MODE.Expression, MODE.ForInitializer, MODE.Conditional]); + } + + function restore_mode() { + if (flag_store.length > 0) { + previous_flags = flags; + flags = flag_store.pop(); + if (previous_flags.mode === MODE.Statement && !opt.unindent_chained_methods) { + remove_redundant_indentation(output, previous_flags); + } + } + } + + function start_of_object_property() { + return flags.parent.mode === MODE.ObjectLiteral && flags.mode === MODE.Statement && ( + (flags.last_text === ':' && flags.ternary_depth === 0) || (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['get', 'set']))); + } + + function start_of_statement() { + if ( + (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['var', 'let', 'const']) && current_token.type === 'TK_WORD') || + (last_type === 'TK_RESERVED' && flags.last_text === 'do') || + (last_type === 'TK_RESERVED' && in_array(flags.last_text, newline_restricted_tokens) && !current_token.wanted_newline) || + (last_type === 'TK_RESERVED' && flags.last_text === 'else' && + !(current_token.type === 'TK_RESERVED' && current_token.text === 'if' && !current_token.comments_before.length)) || + (last_type === 'TK_END_EXPR' && (previous_flags.mode === MODE.ForInitializer || previous_flags.mode === MODE.Conditional)) || + (last_type === 'TK_WORD' && flags.mode === MODE.BlockStatement && + !flags.in_case && + !(current_token.text === '--' || current_token.text === '++') && + last_last_text !== 'function' && + current_token.type !== 'TK_WORD' && current_token.type !== 'TK_RESERVED') || + (flags.mode === MODE.ObjectLiteral && ( + (flags.last_text === ':' && flags.ternary_depth === 0) || (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['get', 'set'])))) + ) { + + set_mode(MODE.Statement); + if (!opt.unindent_chained_methods) { + indent(); + } + + handle_whitespace_and_comments(current_token, true); + + // Issue #276: + // If starting a new statement with [if, for, while, do], push to a new line. + // if (a) if (b) if(c) d(); else e(); else f(); + if (!start_of_object_property()) { + allow_wrap_or_preserved_newline( + current_token.type === 'TK_RESERVED' && in_array(current_token.text, ['do', 'for', 'if', 'while'])); + } + + return true; + } + return false; + } + + function all_lines_start_with(lines, c) { + for (var i = 0; i < lines.length; i++) { + var line = trim(lines[i]); + if (line.charAt(0) !== c) { + return false; + } + } + return true; + } + + function each_line_matches_indent(lines, indent) { + var i = 0, + len = lines.length, + line; + for (; i < len; i++) { + line = lines[i]; + // allow empty lines to pass through + if (line && line.indexOf(indent) !== 0) { + return false; + } + } + return true; + } + + function is_special_word(word) { + return in_array(word, ['case', 'return', 'do', 'if', 'throw', 'else']); + } + + function get_token(offset) { + var index = token_pos + (offset || 0); + return (index < 0 || index >= tokens.length) ? null : tokens[index]; + } + + function handle_start_expr() { + // The conditional starts the statement if appropriate. + if (!start_of_statement()) { + handle_whitespace_and_comments(current_token); + } + + var next_mode = MODE.Expression; + if (current_token.text === '[') { + + if (last_type === 'TK_WORD' || flags.last_text === ')') { + // this is array index specifier, break immediately + // a[x], fn()[x] + if (last_type === 'TK_RESERVED' && in_array(flags.last_text, tokenizer.line_starters)) { + output.space_before_token = true; + } + set_mode(next_mode); + print_token(); + indent(); + if (opt.space_in_paren) { + output.space_before_token = true; + } + return; + } + + next_mode = MODE.ArrayLiteral; + if (is_array(flags.mode)) { + if (flags.last_text === '[' || + (flags.last_text === ',' && (last_last_text === ']' || last_last_text === '}'))) { + // ], [ goes to new line + // }, [ goes to new line + if (!opt.keep_array_indentation) { + print_newline(); + } + } + } + + } else { + if (last_type === 'TK_RESERVED' && flags.last_text === 'for') { + next_mode = MODE.ForInitializer; + } else if (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['if', 'while'])) { + next_mode = MODE.Conditional; + } else { + // next_mode = MODE.Expression; + } + } + + if (flags.last_text === ';' || last_type === 'TK_START_BLOCK') { + print_newline(); + } else if (last_type === 'TK_END_EXPR' || last_type === 'TK_START_EXPR' || last_type === 'TK_END_BLOCK' || flags.last_text === '.') { + // TODO: Consider whether forcing this is required. Review failing tests when removed. + allow_wrap_or_preserved_newline(current_token.wanted_newline); + // do nothing on (( and )( and ][ and ]( and .( + } else if (!(last_type === 'TK_RESERVED' && current_token.text === '(') && last_type !== 'TK_WORD' && last_type !== 'TK_OPERATOR') { + output.space_before_token = true; + } else if ((last_type === 'TK_RESERVED' && (flags.last_word === 'function' || flags.last_word === 'typeof')) || + (flags.last_text === '*' && + (in_array(last_last_text, ['function', 'yield']) || + (flags.mode === MODE.ObjectLiteral && in_array(last_last_text, ['{', ',']))))) { + // function() vs function () + // yield*() vs yield* () + // function*() vs function* () + if (opt.space_after_anon_function) { + output.space_before_token = true; + } + } else if (last_type === 'TK_RESERVED' && (in_array(flags.last_text, tokenizer.line_starters) || flags.last_text === 'catch')) { + if (opt.space_before_conditional) { + output.space_before_token = true; + } + } + + // Should be a space between await and an IIFE, or async and an arrow function + if (current_token.text === '(' && last_type === 'TK_RESERVED' && in_array(flags.last_word, ['await', 'async'])) { + output.space_before_token = true; + } + + // Support of this kind of newline preservation. + // a = (b && + // (c || d)); + if (current_token.text === '(') { + if (last_type === 'TK_EQUALS' || last_type === 'TK_OPERATOR') { + if (!start_of_object_property()) { + allow_wrap_or_preserved_newline(); + } + } + } + + // Support preserving wrapped arrow function expressions + // a.b('c', + // () => d.e + // ) + if (current_token.text === '(' && last_type !== 'TK_WORD' && last_type !== 'TK_RESERVED') { + allow_wrap_or_preserved_newline(); + } + + set_mode(next_mode); + print_token(); + if (opt.space_in_paren) { + output.space_before_token = true; + } + + // In all cases, if we newline while inside an expression it should be indented. + indent(); + } + + function handle_end_expr() { + // statements inside expressions are not valid syntax, but... + // statements must all be closed when their container closes + while (flags.mode === MODE.Statement) { + restore_mode(); + } + + handle_whitespace_and_comments(current_token); + + if (flags.multiline_frame) { + allow_wrap_or_preserved_newline(current_token.text === ']' && is_array(flags.mode) && !opt.keep_array_indentation); + } + + if (opt.space_in_paren) { + if (last_type === 'TK_START_EXPR' && !opt.space_in_empty_paren) { + // () [] no inner space in empty parens like these, ever, ref #320 + output.trim(); + output.space_before_token = false; + } else { + output.space_before_token = true; + } + } + if (current_token.text === ']' && opt.keep_array_indentation) { + print_token(); + restore_mode(); + } else { + restore_mode(); + print_token(); + } + remove_redundant_indentation(output, previous_flags); + + // do {} while () // no statement required after + if (flags.do_while && previous_flags.mode === MODE.Conditional) { + previous_flags.mode = MODE.Expression; + flags.do_block = false; + flags.do_while = false; + + } + } + + function handle_start_block() { + handle_whitespace_and_comments(current_token); + + // Check if this is should be treated as a ObjectLiteral + var next_token = get_token(1); + var second_token = get_token(2); + if (second_token && ( + (in_array(second_token.text, [':', ',']) && in_array(next_token.type, ['TK_STRING', 'TK_WORD', 'TK_RESERVED'])) || + (in_array(next_token.text, ['get', 'set', '...']) && in_array(second_token.type, ['TK_WORD', 'TK_RESERVED'])) + )) { + // We don't support TypeScript,but we didn't break it for a very long time. + // We'll try to keep not breaking it. + if (!in_array(last_last_text, ['class', 'interface'])) { + set_mode(MODE.ObjectLiteral); + } else { + set_mode(MODE.BlockStatement); + } + } else if (last_type === 'TK_OPERATOR' && flags.last_text === '=>') { + // arrow function: (param1, paramN) => { statements } + set_mode(MODE.BlockStatement); + } else if (in_array(last_type, ['TK_EQUALS', 'TK_START_EXPR', 'TK_COMMA', 'TK_OPERATOR']) || + (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['return', 'throw', 'import', 'default'])) + ) { + // Detecting shorthand function syntax is difficult by scanning forward, + // so check the surrounding context. + // If the block is being returned, imported, export default, passed as arg, + // assigned with = or assigned in a nested object, treat as an ObjectLiteral. + set_mode(MODE.ObjectLiteral); + } else { + set_mode(MODE.BlockStatement); + } + + var empty_braces = !next_token.comments_before.length && next_token.text === '}'; + var empty_anonymous_function = empty_braces && flags.last_word === 'function' && + last_type === 'TK_END_EXPR'; + + if (opt.brace_preserve_inline) // check for inline, set inline_frame if so + { + // search forward for a newline wanted inside this block + var index = 0; + var check_token = null; + flags.inline_frame = true; + do { + index += 1; + check_token = get_token(index); + if (check_token.wanted_newline) { + flags.inline_frame = false; + break; + } + } while (check_token.type !== 'TK_EOF' && + !(check_token.type === 'TK_END_BLOCK' && check_token.opened === current_token)); + } + + if ((opt.brace_style === "expand" || + (opt.brace_style === "none" && current_token.wanted_newline)) && + !flags.inline_frame) { + if (last_type !== 'TK_OPERATOR' && + (empty_anonymous_function || + last_type === 'TK_EQUALS' || + (last_type === 'TK_RESERVED' && is_special_word(flags.last_text) && flags.last_text !== 'else'))) { + output.space_before_token = true; + } else { + print_newline(false, true); + } + } else { // collapse || inline_frame + if (is_array(previous_flags.mode) && (last_type === 'TK_START_EXPR' || last_type === 'TK_COMMA')) { + if (last_type === 'TK_COMMA' || opt.space_in_paren) { + output.space_before_token = true; + } + + if (last_type === 'TK_COMMA' || (last_type === 'TK_START_EXPR' && flags.inline_frame)) { + allow_wrap_or_preserved_newline(); + previous_flags.multiline_frame = previous_flags.multiline_frame || flags.multiline_frame; + flags.multiline_frame = false; + } + } + if (last_type !== 'TK_OPERATOR' && last_type !== 'TK_START_EXPR') { + if (last_type === 'TK_START_BLOCK' && !flags.inline_frame) { + print_newline(); + } else { + output.space_before_token = true; + } + } + } + print_token(); + indent(); + } + + function handle_end_block() { + // statements must all be closed when their container closes + handle_whitespace_and_comments(current_token); + + while (flags.mode === MODE.Statement) { + restore_mode(); + } + + var empty_braces = last_type === 'TK_START_BLOCK'; + + if (flags.inline_frame && !empty_braces) { // try inline_frame (only set if opt.braces-preserve-inline) first + output.space_before_token = true; + } else if (opt.brace_style === "expand") { + if (!empty_braces) { + print_newline(); + } + } else { + // skip {} + if (!empty_braces) { + if (is_array(flags.mode) && opt.keep_array_indentation) { + // we REALLY need a newline here, but newliner would skip that + opt.keep_array_indentation = false; + print_newline(); + opt.keep_array_indentation = true; + + } else { + print_newline(); + } + } + } + restore_mode(); + print_token(); + } + + function handle_word() { + if (current_token.type === 'TK_RESERVED') { + if (in_array(current_token.text, ['set', 'get']) && flags.mode !== MODE.ObjectLiteral) { + current_token.type = 'TK_WORD'; + } else if (in_array(current_token.text, ['as', 'from']) && !flags.import_block) { + current_token.type = 'TK_WORD'; + } else if (flags.mode === MODE.ObjectLiteral) { + var next_token = get_token(1); + if (next_token.text === ':') { + current_token.type = 'TK_WORD'; + } + } + } + + if (start_of_statement()) { + // The conditional starts the statement if appropriate. + if (last_type === 'TK_RESERVED' && in_array(flags.last_text, ['var', 'let', 'const']) && current_token.type === 'TK_WORD') { + flags.declaration_statement = true; + } + } else if (current_token.wanted_newline && !is_expression(flags.mode) && + (last_type !== 'TK_OPERATOR' || (flags.last_text === '--' || flags.last_text === '++')) && + last_type !== 'TK_EQUALS' && + (opt.preserve_newlines || !(last_type === 'TK_RESERVED' && in_array(flags.last_text, ['var', 'let', 'const', 'set', 'get'])))) { + handle_whitespace_and_comments(current_token); + print_newline(); + } else { + handle_whitespace_and_comments(current_token); + } + + if (flags.do_block && !flags.do_while) { + if (current_token.type === 'TK_RESERVED' && current_token.text === 'while') { + // do {} ## while () + output.space_before_token = true; + print_token(); + output.space_before_token = true; + flags.do_while = true; + return; + } else { + // do {} should always have while as the next word. + // if we don't see the expected while, recover + print_newline(); + flags.do_block = false; + } + } + + // if may be followed by else, or not + // Bare/inline ifs are tricky + // Need to unwind the modes correctly: if (a) if (b) c(); else d(); else e(); + if (flags.if_block) { + if (!flags.else_block && (current_token.type === 'TK_RESERVED' && current_token.text === 'else')) { + flags.else_block = true; + } else { + while (flags.mode === MODE.Statement) { + restore_mode(); + } + flags.if_block = false; + flags.else_block = false; + } + } + + if (current_token.type === 'TK_RESERVED' && (current_token.text === 'case' || (current_token.text === 'default' && flags.in_case_statement))) { + print_newline(); + if (flags.case_body || opt.jslint_happy) { + // switch cases following one another + deindent(); + flags.case_body = false; + } + print_token(); + flags.in_case = true; + flags.in_case_statement = true; + return; + } + + if (last_type === 'TK_COMMA' || last_type === 'TK_START_EXPR' || last_type === 'TK_EQUALS' || last_type === 'TK_OPERATOR') { + if (!start_of_object_property()) { + allow_wrap_or_preserved_newline(); + } + } + + if (current_token.type === 'TK_RESERVED' && current_token.text === 'function') { + if (in_array(flags.last_text, ['}', ';']) || + (output.just_added_newline() && !(in_array(flags.last_text, ['(', '[', '{', ':', '=', ',']) || last_type === 'TK_OPERATOR'))) { + // make sure there is a nice clean space of at least one blank line + // before a new function definition + if (!output.just_added_blankline() && !current_token.comments_before.length) { + print_newline(); + print_newline(true); + } + } + if (last_type === 'TK_RESERVED' || last_type === 'TK_WORD') { + if (last_type === 'TK_RESERVED' && ( + in_array(flags.last_text, ['get', 'set', 'new', 'export', 'async']) || + in_array(flags.last_text, newline_restricted_tokens))) { + output.space_before_token = true; + } else if (last_type === 'TK_RESERVED' && flags.last_text === 'default' && last_last_text === 'export') { + output.space_before_token = true; + } else { + print_newline(); + } + } else if (last_type === 'TK_OPERATOR' || flags.last_text === '=') { + // foo = function + output.space_before_token = true; + } else if (!flags.multiline_frame && (is_expression(flags.mode) || is_array(flags.mode))) { + // (function + } else { + print_newline(); + } + + print_token(); + flags.last_word = current_token.text; + return; + } + + prefix = 'NONE'; + + if (last_type === 'TK_END_BLOCK') { + + if (previous_flags.inline_frame) { + prefix = 'SPACE'; + } else if (!(current_token.type === 'TK_RESERVED' && in_array(current_token.text, ['else', 'catch', 'finally', 'from']))) { + prefix = 'NEWLINE'; + } else { + if (opt.brace_style === "expand" || + opt.brace_style === "end-expand" || + (opt.brace_style === "none" && current_token.wanted_newline)) { + prefix = 'NEWLINE'; + } else { + prefix = 'SPACE'; + output.space_before_token = true; + } + } + } else if (last_type === 'TK_SEMICOLON' && flags.mode === MODE.BlockStatement) { + // TODO: Should this be for STATEMENT as well? + prefix = 'NEWLINE'; + } else if (last_type === 'TK_SEMICOLON' && is_expression(flags.mode)) { + prefix = 'SPACE'; + } else if (last_type === 'TK_STRING') { + prefix = 'NEWLINE'; + } else if (last_type === 'TK_RESERVED' || last_type === 'TK_WORD' || + (flags.last_text === '*' && + (in_array(last_last_text, ['function', 'yield']) || + (flags.mode === MODE.ObjectLiteral && in_array(last_last_text, ['{', ',']))))) { + prefix = 'SPACE'; + } else if (last_type === 'TK_START_BLOCK') { + if (flags.inline_frame) { + prefix = 'SPACE'; + } else { + prefix = 'NEWLINE'; + } + } else if (last_type === 'TK_END_EXPR') { + output.space_before_token = true; + prefix = 'NEWLINE'; + } + + if (current_token.type === 'TK_RESERVED' && in_array(current_token.text, tokenizer.line_starters) && flags.last_text !== ')') { + if (flags.inline_frame || flags.last_text === 'else' || flags.last_text === 'export') { + prefix = 'SPACE'; + } else { + prefix = 'NEWLINE'; + } + + } + + if (current_token.type === 'TK_RESERVED' && in_array(current_token.text, ['else', 'catch', 'finally'])) { + if ((!(last_type === 'TK_END_BLOCK' && previous_flags.mode === MODE.BlockStatement) || + opt.brace_style === "expand" || + opt.brace_style === "end-expand" || + (opt.brace_style === "none" && current_token.wanted_newline)) && + !flags.inline_frame) { + print_newline(); + } else { + output.trim(true); + var line = output.current_line; + // If we trimmed and there's something other than a close block before us + // put a newline back in. Handles '} // comment' scenario. + if (line.last() !== '}') { + print_newline(); + } + output.space_before_token = true; + } + } else if (prefix === 'NEWLINE') { + if (last_type === 'TK_RESERVED' && is_special_word(flags.last_text)) { + // no newline between 'return nnn' + output.space_before_token = true; + } else if (last_type !== 'TK_END_EXPR') { + if ((last_type !== 'TK_START_EXPR' || !(current_token.type === 'TK_RESERVED' && in_array(current_token.text, ['var', 'let', 'const']))) && flags.last_text !== ':') { + // no need to force newline on 'var': for (var x = 0...) + if (current_token.type === 'TK_RESERVED' && current_token.text === 'if' && flags.last_text === 'else') { + // no newline for } else if { + output.space_before_token = true; + } else { + print_newline(); + } + } + } else if (current_token.type === 'TK_RESERVED' && in_array(current_token.text, tokenizer.line_starters) && flags.last_text !== ')') { + print_newline(); + } + } else if (flags.multiline_frame && is_array(flags.mode) && flags.last_text === ',' && last_last_text === '}') { + print_newline(); // }, in lists get a newline treatment + } else if (prefix === 'SPACE') { + output.space_before_token = true; + } + print_token(); + flags.last_word = current_token.text; + + if (current_token.type === 'TK_RESERVED') { + if (current_token.text === 'do') { + flags.do_block = true; + } else if (current_token.text === 'if') { + flags.if_block = true; + } else if (current_token.text === 'import') { + flags.import_block = true; + } else if (flags.import_block && current_token.type === 'TK_RESERVED' && current_token.text === 'from') { + flags.import_block = false; + } + } + } + + function handle_semicolon() { + if (start_of_statement()) { + // The conditional starts the statement if appropriate. + // Semicolon can be the start (and end) of a statement + output.space_before_token = false; + } else { + handle_whitespace_and_comments(current_token); + } + + var next_token = get_token(1); + while (flags.mode === MODE.Statement && + !(flags.if_block && next_token && next_token.type === 'TK_RESERVED' && next_token.text === 'else') && + !flags.do_block) { + restore_mode(); + } + + // hacky but effective for the moment + if (flags.import_block) { + flags.import_block = false; + } + print_token(); + } + + function handle_string() { + if (start_of_statement()) { + // The conditional starts the statement if appropriate. + // One difference - strings want at least a space before + output.space_before_token = true; + } else { + handle_whitespace_and_comments(current_token); + if (last_type === 'TK_RESERVED' || last_type === 'TK_WORD' || flags.inline_frame) { + output.space_before_token = true; + } else if (last_type === 'TK_COMMA' || last_type === 'TK_START_EXPR' || last_type === 'TK_EQUALS' || last_type === 'TK_OPERATOR') { + if (!start_of_object_property()) { + allow_wrap_or_preserved_newline(); + } + } else { + print_newline(); + } + } + print_token(); + } + + function handle_equals() { + if (start_of_statement()) { + // The conditional starts the statement if appropriate. + } else { + handle_whitespace_and_comments(current_token); + } + + if (flags.declaration_statement) { + // just got an '=' in a var-line, different formatting/line-breaking, etc will now be done + flags.declaration_assignment = true; + } + output.space_before_token = true; + print_token(); + output.space_before_token = true; + } + + function handle_comma() { + handle_whitespace_and_comments(current_token, true); + + print_token(); + output.space_before_token = true; + if (flags.declaration_statement) { + if (is_expression(flags.parent.mode)) { + // do not break on comma, for(var a = 1, b = 2) + flags.declaration_assignment = false; + } + + if (flags.declaration_assignment) { + flags.declaration_assignment = false; + print_newline(false, true); + } else if (opt.comma_first) { + // for comma-first, we want to allow a newline before the comma + // to turn into a newline after the comma, which we will fixup later + allow_wrap_or_preserved_newline(); + } + } else if (flags.mode === MODE.ObjectLiteral || + (flags.mode === MODE.Statement && flags.parent.mode === MODE.ObjectLiteral)) { + if (flags.mode === MODE.Statement) { + restore_mode(); + } + + if (!flags.inline_frame) { + print_newline(); + } + } else if (opt.comma_first) { + // EXPR or DO_BLOCK + // for comma-first, we want to allow a newline before the comma + // to turn into a newline after the comma, which we will fixup later + allow_wrap_or_preserved_newline(); + } + } + + function handle_operator() { + var isGeneratorAsterisk = current_token.text === '*' && + ((last_type === 'TK_RESERVED' && in_array(flags.last_text, ['function', 'yield'])) || + (in_array(last_type, ['TK_START_BLOCK', 'TK_COMMA', 'TK_END_BLOCK', 'TK_SEMICOLON'])) + ); + var isUnary = in_array(current_token.text, ['-', '+']) && ( + in_array(last_type, ['TK_START_BLOCK', 'TK_START_EXPR', 'TK_EQUALS', 'TK_OPERATOR']) || + in_array(flags.last_text, tokenizer.line_starters) || + flags.last_text === ',' + ); + + if (start_of_statement()) { + // The conditional starts the statement if appropriate. + } else { + var preserve_statement_flags = !isGeneratorAsterisk; + handle_whitespace_and_comments(current_token, preserve_statement_flags); + } + + if (last_type === 'TK_RESERVED' && is_special_word(flags.last_text)) { + // "return" had a special handling in TK_WORD. Now we need to return the favor + output.space_before_token = true; + print_token(); + return; + } + + // hack for actionscript's import .*; + if (current_token.text === '*' && last_type === 'TK_DOT') { + print_token(); + return; + } + + if (current_token.text === '::') { + // no spaces around exotic namespacing syntax operator + print_token(); + return; + } + + // Allow line wrapping between operators when operator_position is + // set to before or preserve + if (last_type === 'TK_OPERATOR' && in_array(opt.operator_position, OPERATOR_POSITION_BEFORE_OR_PRESERVE)) { + allow_wrap_or_preserved_newline(); + } + + if (current_token.text === ':' && flags.in_case) { + flags.case_body = true; + indent(); + print_token(); + print_newline(); + flags.in_case = false; + return; + } + + var space_before = true; + var space_after = true; + var in_ternary = false; + if (current_token.text === ':') { + if (flags.ternary_depth === 0) { + // Colon is invalid javascript outside of ternary and object, but do our best to guess what was meant. + space_before = false; + } else { + flags.ternary_depth -= 1; + in_ternary = true; + } + } else if (current_token.text === '?') { + flags.ternary_depth += 1; + } + + // let's handle the operator_position option prior to any conflicting logic + if (!isUnary && !isGeneratorAsterisk && opt.preserve_newlines && in_array(current_token.text, tokenizer.positionable_operators)) { + var isColon = current_token.text === ':'; + var isTernaryColon = (isColon && in_ternary); + var isOtherColon = (isColon && !in_ternary); + + switch (opt.operator_position) { + case OPERATOR_POSITION.before_newline: + // if the current token is : and it's not a ternary statement then we set space_before to false + output.space_before_token = !isOtherColon; + + print_token(); + + if (!isColon || isTernaryColon) { + allow_wrap_or_preserved_newline(); + } + + output.space_before_token = true; + return; + + case OPERATOR_POSITION.after_newline: + // if the current token is anything but colon, or (via deduction) it's a colon and in a ternary statement, + // then print a newline. + + output.space_before_token = true; + + if (!isColon || isTernaryColon) { + if (get_token(1).wanted_newline) { + print_newline(false, true); + } else { + allow_wrap_or_preserved_newline(); + } + } else { + output.space_before_token = false; + } + + print_token(); + + output.space_before_token = true; + return; + + case OPERATOR_POSITION.preserve_newline: + if (!isOtherColon) { + allow_wrap_or_preserved_newline(); + } + + // if we just added a newline, or the current token is : and it's not a ternary statement, + // then we set space_before to false + space_before = !(output.just_added_newline() || isOtherColon); + + output.space_before_token = space_before; + print_token(); + output.space_before_token = true; + return; + } + } + + if (isGeneratorAsterisk) { + allow_wrap_or_preserved_newline(); + space_before = false; + var next_token = get_token(1); + space_after = next_token && in_array(next_token.type, ['TK_WORD', 'TK_RESERVED']); + } else if (current_token.text === '...') { + allow_wrap_or_preserved_newline(); + space_before = last_type === 'TK_START_BLOCK'; + space_after = false; + } else if (in_array(current_token.text, ['--', '++', '!', '~']) || isUnary) { + // unary operators (and binary +/- pretending to be unary) special cases + + space_before = false; + space_after = false; + + // http://www.ecma-international.org/ecma-262/5.1/#sec-7.9.1 + // if there is a newline between -- or ++ and anything else we should preserve it. + if (current_token.wanted_newline && (current_token.text === '--' || current_token.text === '++')) { + print_newline(false, true); + } + + if (flags.last_text === ';' && is_expression(flags.mode)) { + // for (;; ++i) + // ^^^ + space_before = true; + } + + if (last_type === 'TK_RESERVED') { + space_before = true; + } else if (last_type === 'TK_END_EXPR') { + space_before = !(flags.last_text === ']' && (current_token.text === '--' || current_token.text === '++')); + } else if (last_type === 'TK_OPERATOR') { + // a++ + ++b; + // a - -b + space_before = in_array(current_token.text, ['--', '-', '++', '+']) && in_array(flags.last_text, ['--', '-', '++', '+']); + // + and - are not unary when preceeded by -- or ++ operator + // a-- + b + // a * +b + // a - -b + if (in_array(current_token.text, ['+', '-']) && in_array(flags.last_text, ['--', '++'])) { + space_after = true; + } + } + + + if (((flags.mode === MODE.BlockStatement && !flags.inline_frame) || flags.mode === MODE.Statement) && + (flags.last_text === '{' || flags.last_text === ';')) { + // { foo; --i } + // foo(); --bar; + print_newline(); + } + } + + output.space_before_token = output.space_before_token || space_before; + print_token(); + output.space_before_token = space_after; + } + + function handle_block_comment(preserve_statement_flags) { + if (output.raw) { + output.add_raw_token(current_token); + if (current_token.directives && current_token.directives.preserve === 'end') { + // If we're testing the raw output behavior, do not allow a directive to turn it off. + output.raw = opt.test_output_raw; + } + return; + } + + if (current_token.directives) { + print_newline(false, preserve_statement_flags); + print_token(); + if (current_token.directives.preserve === 'start') { + output.raw = true; + } + print_newline(false, true); + return; + } + + // inline block + if (!acorn.newline.test(current_token.text) && !current_token.wanted_newline) { + output.space_before_token = true; + print_token(); + output.space_before_token = true; + return; + } + + var lines = split_linebreaks(current_token.text); + var j; // iterator for this case + var javadoc = false; + var starless = false; + var lastIndent = current_token.whitespace_before; + var lastIndentLength = lastIndent.length; + + // block comment starts with a new line + print_newline(false, preserve_statement_flags); + if (lines.length > 1) { + javadoc = all_lines_start_with(lines.slice(1), '*'); + starless = each_line_matches_indent(lines.slice(1), lastIndent); + } + + // first line always indented + print_token(lines[0]); + for (j = 1; j < lines.length; j++) { + print_newline(false, true); + if (javadoc) { + // javadoc: reformat and re-indent + print_token(' ' + ltrim(lines[j])); + } else if (starless && lines[j].length > lastIndentLength) { + // starless: re-indent non-empty content, avoiding trim + print_token(lines[j].substring(lastIndentLength)); + } else { + // normal comments output raw + output.add_token(lines[j]); + } + } + + // for comments of more than one line, make sure there's a new line after + print_newline(false, preserve_statement_flags); + } + + function handle_comment(preserve_statement_flags) { + if (current_token.wanted_newline) { + print_newline(false, preserve_statement_flags); + } else { + output.trim(true); + } + + output.space_before_token = true; + print_token(); + print_newline(false, preserve_statement_flags); + } + + function handle_dot() { + if (start_of_statement()) { + // The conditional starts the statement if appropriate. + } else { + handle_whitespace_and_comments(current_token, true); + } + + if (last_type === 'TK_RESERVED' && is_special_word(flags.last_text)) { + output.space_before_token = true; + } else { + // allow preserved newlines before dots in general + // force newlines on dots after close paren when break_chained - for bar().baz() + allow_wrap_or_preserved_newline(flags.last_text === ')' && opt.break_chained_methods); + } + + print_token(); + } + + function handle_unknown(preserve_statement_flags) { + print_token(); + + if (current_token.text[current_token.text.length - 1] === '\n') { + print_newline(false, preserve_statement_flags); + } + } + + function handle_eof() { + // Unwind any open statements + while (flags.mode === MODE.Statement) { + restore_mode(); + } + handle_whitespace_and_comments(current_token); + } +} + +module.exports.Beautifier = Beautifier; + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + +function InputScanner(input) { + var _input = input; + var _input_length = _input.length; + var _position = 0; + + this.back = function() { + _position -= 1; + }; + + this.hasNext = function() { + return _position < _input_length; + }; + + this.next = function() { + var val = null; + if (this.hasNext()) { + val = _input.charAt(_position); + _position += 1; + } + return val; + }; + + this.peek = function(index) { + var val = null; + index = index || 0; + index += _position; + if (index >= 0 && index < _input_length) { + val = _input.charAt(index); + } + return val; + }; + + this.peekCharCode = function(index) { + var val = 0; + index = index || 0; + index += _position; + if (index >= 0 && index < _input_length) { + val = _input.charCodeAt(index); + } + return val; + }; + + this.test = function(pattern, index) { + index = index || 0; + pattern.lastIndex = _position + index; + return pattern.test(_input); + }; + + this.testChar = function(pattern, index) { + var val = this.peek(index); + return val !== null && pattern.test(val); + }; + + this.match = function(pattern) { + pattern.lastIndex = _position; + var pattern_match = pattern.exec(_input); + if (pattern_match && pattern_match.index === _position) { + _position += pattern_match[0].length; + } else { + pattern_match = null; + } + return pattern_match; + }; +} + + +module.exports.InputScanner = InputScanner; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + +function mergeOpts(allOptions, targetType) { + var finalOpts = {}; + var name; + + for (name in allOptions) { + if (name !== targetType) { + finalOpts[name] = allOptions[name]; + } + } + + //merge in the per type settings for the targetType + if (targetType in allOptions) { + for (name in allOptions[targetType]) { + finalOpts[name] = allOptions[targetType][name]; + } + } + return finalOpts; +} + +module.exports.mergeOpts = mergeOpts; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + +function OutputLine(parent) { + var _character_count = 0; + // use indent_count as a marker for lines that have preserved indentation + var _indent_count = -1; + + var _items = []; + var _empty = true; + + this.set_indent = function(level) { + _character_count = parent.baseIndentLength + level * parent.indent_length; + _indent_count = level; + }; + + this.get_character_count = function() { + return _character_count; + }; + + this.is_empty = function() { + return _empty; + }; + + this.last = function() { + if (!this._empty) { + return _items[_items.length - 1]; + } else { + return null; + } + }; + + this.push = function(input) { + _items.push(input); + _character_count += input.length; + _empty = false; + }; + + this.pop = function() { + var item = null; + if (!_empty) { + item = _items.pop(); + _character_count -= item.length; + _empty = _items.length === 0; + } + return item; + }; + + this.remove_indent = function() { + if (_indent_count > 0) { + _indent_count -= 1; + _character_count -= parent.indent_length; + } + }; + + this.trim = function() { + while (this.last() === ' ') { + _items.pop(); + _character_count -= 1; + } + _empty = _items.length === 0; + }; + + this.toString = function() { + var result = ''; + if (!this._empty) { + if (_indent_count >= 0) { + result = parent.indent_cache[_indent_count]; + } + result += _items.join(''); + } + return result; + }; +} + +function Output(indent_string, baseIndentString) { + baseIndentString = baseIndentString || ''; + this.indent_cache = [baseIndentString]; + this.baseIndentLength = baseIndentString.length; + this.indent_length = indent_string.length; + this.raw = false; + + var lines = []; + this.baseIndentString = baseIndentString; + this.indent_string = indent_string; + this.previous_line = null; + this.current_line = null; + this.space_before_token = false; + + this.add_outputline = function() { + this.previous_line = this.current_line; + this.current_line = new OutputLine(this); + lines.push(this.current_line); + }; + + // initialize + this.add_outputline(); + + + this.get_line_number = function() { + return lines.length; + }; + + // Using object instead of string to allow for later expansion of info about each line + this.add_new_line = function(force_newline) { + if (this.get_line_number() === 1 && this.just_added_newline()) { + return false; // no newline on start of file + } + + if (force_newline || !this.just_added_newline()) { + if (!this.raw) { + this.add_outputline(); + } + return true; + } + + return false; + }; + + this.get_code = function(end_with_newline, eol) { + var sweet_code = lines.join('\n').replace(/[\r\n\t ]+$/, ''); + + if (end_with_newline) { + sweet_code += '\n'; + } + + if (eol !== '\n') { + sweet_code = sweet_code.replace(/[\n]/g, eol); + } + + return sweet_code; + }; + + this.set_indent = function(level) { + // Never indent your first output indent at the start of the file + if (lines.length > 1) { + while (level >= this.indent_cache.length) { + this.indent_cache.push(this.indent_cache[this.indent_cache.length - 1] + this.indent_string); + } + + this.current_line.set_indent(level); + return true; + } + this.current_line.set_indent(0); + return false; + }; + + this.add_raw_token = function(token) { + for (var x = 0; x < token.newlines; x++) { + this.add_outputline(); + } + this.current_line.push(token.whitespace_before); + this.current_line.push(token.text); + this.space_before_token = false; + }; + + this.add_token = function(printable_token) { + this.add_space_before_token(); + this.current_line.push(printable_token); + }; + + this.add_space_before_token = function() { + if (this.space_before_token && !this.just_added_newline()) { + this.current_line.push(' '); + } + this.space_before_token = false; + }; + + this.remove_indent = function(index) { + var output_length = lines.length; + while (index < output_length) { + lines[index].remove_indent(); + index++; + } + }; + + this.trim = function(eat_newlines) { + eat_newlines = (eat_newlines === undefined) ? false : eat_newlines; + + this.current_line.trim(indent_string, baseIndentString); + + while (eat_newlines && lines.length > 1 && + this.current_line.is_empty()) { + lines.pop(); + this.current_line = lines[lines.length - 1]; + this.current_line.trim(); + } + + this.previous_line = lines.length > 1 ? lines[lines.length - 2] : null; + }; + + this.just_added_newline = function() { + return this.current_line.is_empty(); + }; + + this.just_added_blankline = function() { + if (this.just_added_newline()) { + if (lines.length === 1) { + return true; // start of the file and newline = blank + } + + var line = lines[lines.length - 2]; + return line.is_empty(); + } + return false; + }; +} + +module.exports.Output = Output; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + +function Token(type, text, newlines, whitespace_before, parent) { + this.type = type; + this.text = text; + + // comments_before are + // comments that have a new line before them + // and may or may not have a newline after + // this is a set of comments before + this.comments_before = /* inline comment*/ []; + + + this.comments_after = []; // no new line before and newline after + this.newlines = newlines || 0; + this.wanted_newline = newlines > 0; + this.whitespace_before = whitespace_before || ''; + this.parent = parent || null; + this.opened = null; + this.directives = null; +} + +module.exports.Token = Token; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + +var Beautifier = __webpack_require__(1).Beautifier; + +function js_beautify(js_source_text, options) { + var beautifier = new Beautifier(js_source_text, options); + return beautifier.beautify(); +} + +module.exports = js_beautify; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + +var InputScanner = __webpack_require__(2).InputScanner; +var Token = __webpack_require__(5).Token; +var acorn = __webpack_require__(0); + +function trim(s) { + return s.replace(/^\s+|\s+$/g, ''); +} + +function in_array(what, arr) { + for (var i = 0; i < arr.length; i += 1) { + if (arr[i] === what) { + return true; + } + } + return false; +} + +function Tokenizer(input_string, opts) { + + var whitespace = "\n\r\t ".split(''); + var digit = /[0-9]/; + var digit_bin = /[01]/; + var digit_oct = /[01234567]/; + var digit_hex = /[0123456789abcdefABCDEF]/; + + this.positionable_operators = '!= !== % & && * ** + - / : < << <= == === > >= >> >>> ? ^ | ||'.split(' '); + var punct = this.positionable_operators.concat( + // non-positionable operators - these do not follow operator position settings + '! %= &= *= **= ++ += , -- -= /= :: <<= = => >>= >>>= ^= |= ~ ...'.split(' ')); + + // words which should always start on new line. + this.line_starters = 'continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export'.split(','); + var reserved_words = this.line_starters.concat(['do', 'in', 'of', 'else', 'get', 'set', 'new', 'catch', 'finally', 'typeof', 'yield', 'async', 'await', 'from', 'as']); + + // /* ... */ comment ends with nearest */ or end of file + var block_comment_pattern = /([\s\S]*?)((?:\*\/)|$)/g; + + // comment ends just before nearest linefeed or end of file + var comment_pattern = /([^\n\r\u2028\u2029]*)/g; + + var directives_block_pattern = /\/\* beautify( \w+[:]\w+)+ \*\//g; + var directive_pattern = / (\w+)[:](\w+)/g; + var directives_end_ignore_pattern = /([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g; + + var template_pattern = /((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g; + + var n_newlines, whitespace_before_token, in_html_comment, tokens; + var input; + + this.tokenize = function() { + input = new InputScanner(input_string); + in_html_comment = false; + tokens = []; + + var next, last; + var token_values; + var open = null; + var open_stack = []; + var comments = []; + + while (!(last && last.type === 'TK_EOF')) { + token_values = tokenize_next(); + next = new Token(token_values[1], token_values[0], n_newlines, whitespace_before_token); + while (next.type === 'TK_COMMENT' || next.type === 'TK_BLOCK_COMMENT' || next.type === 'TK_UNKNOWN') { + if (next.type === 'TK_BLOCK_COMMENT') { + next.directives = token_values[2]; + } + comments.push(next); + token_values = tokenize_next(); + next = new Token(token_values[1], token_values[0], n_newlines, whitespace_before_token); + } + + if (comments.length) { + next.comments_before = comments; + comments = []; + } + + if (next.type === 'TK_START_BLOCK' || next.type === 'TK_START_EXPR') { + next.parent = last; + open_stack.push(open); + open = next; + } else if ((next.type === 'TK_END_BLOCK' || next.type === 'TK_END_EXPR') && + (open && ( + (next.text === ']' && open.text === '[') || + (next.text === ')' && open.text === '(') || + (next.text === '}' && open.text === '{')))) { + next.parent = open.parent; + next.opened = open; + + open = open_stack.pop(); + } + + tokens.push(next); + last = next; + } + + return tokens; + }; + + function get_directives(text) { + if (!text.match(directives_block_pattern)) { + return null; + } + + var directives = {}; + directive_pattern.lastIndex = 0; + var directive_match = directive_pattern.exec(text); + + while (directive_match) { + directives[directive_match[1]] = directive_match[2]; + directive_match = directive_pattern.exec(text); + } + + return directives; + } + + function tokenize_next() { + var resulting_string; + var whitespace_on_this_line = []; + + n_newlines = 0; + whitespace_before_token = ''; + + var c = input.next(); + + if (c === null) { + return ['', 'TK_EOF']; + } + + var last_token; + if (tokens.length) { + last_token = tokens[tokens.length - 1]; + } else { + // For the sake of tokenizing we can pretend that there was on open brace to start + last_token = new Token('TK_START_BLOCK', '{'); + } + + while (in_array(c, whitespace)) { + + if (acorn.newline.test(c)) { + if (!(c === '\n' && input.peek(-2) === '\r')) { + n_newlines += 1; + whitespace_on_this_line = []; + } + } else { + whitespace_on_this_line.push(c); + } + + c = input.next(); + + if (c === null) { + return ['', 'TK_EOF']; + } + } + + if (whitespace_on_this_line.length) { + whitespace_before_token = whitespace_on_this_line.join(''); + } + + if (digit.test(c) || (c === '.' && input.testChar(digit))) { + var allow_decimal = true; + var allow_e = true; + var local_digit = digit; + + if (c === '0' && input.testChar(/[XxOoBb]/)) { + // switch to hex/oct/bin number, no decimal or e, just hex/oct/bin digits + allow_decimal = false; + allow_e = false; + if (input.testChar(/[Bb]/)) { + local_digit = digit_bin; + } else if (input.testChar(/[Oo]/)) { + local_digit = digit_oct; + } else { + local_digit = digit_hex; + } + c += input.next(); + } else if (c === '.') { + // Already have a decimal for this literal, don't allow another + allow_decimal = false; + } else { + // we know this first loop will run. It keeps the logic simpler. + c = ''; + input.back(); + } + + // Add the digits + while (input.testChar(local_digit)) { + c += input.next(); + + if (allow_decimal && input.peek() === '.') { + c += input.next(); + allow_decimal = false; + } + + // a = 1.e-7 is valid, so we test for . then e in one loop + if (allow_e && input.testChar(/[Ee]/)) { + c += input.next(); + + if (input.testChar(/[+-]/)) { + c += input.next(); + } + + allow_e = false; + allow_decimal = false; + } + } + + return [c, 'TK_WORD']; + } + + if (acorn.isIdentifierStart(input.peekCharCode(-1))) { + if (input.hasNext()) { + while (acorn.isIdentifierChar(input.peekCharCode())) { + c += input.next(); + if (!input.hasNext()) { + break; + } + } + } + + if (!(last_token.type === 'TK_DOT' || + (last_token.type === 'TK_RESERVED' && in_array(last_token.text, ['set', 'get']))) && + in_array(c, reserved_words)) { + if (c === 'in' || c === 'of') { // hack for 'in' and 'of' operators + return [c, 'TK_OPERATOR']; + } + return [c, 'TK_RESERVED']; + } + + return [c, 'TK_WORD']; + } + + if (c === '(' || c === '[') { + return [c, 'TK_START_EXPR']; + } + + if (c === ')' || c === ']') { + return [c, 'TK_END_EXPR']; + } + + if (c === '{') { + return [c, 'TK_START_BLOCK']; + } + + if (c === '}') { + return [c, 'TK_END_BLOCK']; + } + + if (c === ';') { + return [c, 'TK_SEMICOLON']; + } + + if (c === '/') { + var comment = ''; + var comment_match; + // peek for comment /* ... */ + if (input.peek() === '*') { + input.next(); + comment_match = input.match(block_comment_pattern); + comment = '/*' + comment_match[0]; + var directives = get_directives(comment); + if (directives && directives.ignore === 'start') { + comment_match = input.match(directives_end_ignore_pattern); + comment += comment_match[0]; + } + comment = comment.replace(acorn.allLineBreaks, '\n'); + return [comment, 'TK_BLOCK_COMMENT', directives]; + } + // peek for comment // ... + if (input.peek() === '/') { + input.next(); + comment_match = input.match(comment_pattern); + comment = '//' + comment_match[0]; + return [comment, 'TK_COMMENT']; + } + + } + + var startXmlRegExp = /<()([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/g; + + if (c === '`' || c === "'" || c === '"' || // string + ( + (c === '/') || // regexp + (opts.e4x && c === "<" && input.test(startXmlRegExp, -1)) // xml + ) && ( // regex and xml can only appear in specific locations during parsing + (last_token.type === 'TK_RESERVED' && in_array(last_token.text, ['return', 'case', 'throw', 'else', 'do', 'typeof', 'yield'])) || + (last_token.type === 'TK_END_EXPR' && last_token.text === ')' && + last_token.parent && last_token.parent.type === 'TK_RESERVED' && in_array(last_token.parent.text, ['if', 'while', 'for'])) || + (in_array(last_token.type, ['TK_COMMENT', 'TK_START_EXPR', 'TK_START_BLOCK', + 'TK_END_BLOCK', 'TK_OPERATOR', 'TK_EQUALS', 'TK_EOF', 'TK_SEMICOLON', 'TK_COMMA' + ])) + )) { + + var sep = c, + esc = false, + has_char_escapes = false; + + resulting_string = c; + + if (sep === '/') { + // + // handle regexp + // + var in_char_class = false; + while (input.hasNext() && + ((esc || in_char_class || input.peek() !== sep) && + !input.testChar(acorn.newline))) { + resulting_string += input.peek(); + if (!esc) { + esc = input.peek() === '\\'; + if (input.peek() === '[') { + in_char_class = true; + } else if (input.peek() === ']') { + in_char_class = false; + } + } else { + esc = false; + } + input.next(); + } + } else if (opts.e4x && sep === '<') { + // + // handle e4x xml literals + // + + var xmlRegExp = /[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/g; + input.back(); + var xmlStr = ''; + var match = input.match(startXmlRegExp); + if (match) { + // Trim root tag to attempt to + var rootTag = match[2].replace(/^{\s+/, '{').replace(/\s+}$/, '}'); + var isCurlyRoot = rootTag.indexOf('{') === 0; + var depth = 0; + while (match) { + var isEndTag = !!match[1]; + var tagName = match[2]; + var isSingletonTag = (!!match[match.length - 1]) || (tagName.slice(0, 8) === "![CDATA["); + if (!isSingletonTag && + (tagName === rootTag || (isCurlyRoot && tagName.replace(/^{\s+/, '{').replace(/\s+}$/, '}')))) { + if (isEndTag) { + --depth; + } else { + ++depth; + } + } + xmlStr += match[0]; + if (depth <= 0) { + break; + } + match = input.match(xmlRegExp); + } + // if we didn't close correctly, keep unformatted. + if (!match) { + xmlStr += input.match(/[\s\S]*/g)[0]; + } + xmlStr = xmlStr.replace(acorn.allLineBreaks, '\n'); + return [xmlStr, "TK_STRING"]; + } + } else { + // + // handle string + // + var parse_string = function(delimiter, allow_unescaped_newlines, start_sub) { + // Template strings can travers lines without escape characters. + // Other strings cannot + var current_char; + while (input.hasNext()) { + current_char = input.peek(); + if (!(esc || (current_char !== delimiter && + (allow_unescaped_newlines || !acorn.newline.test(current_char))))) { + break; + } + + // Handle \r\n linebreaks after escapes or in template strings + if ((esc || allow_unescaped_newlines) && acorn.newline.test(current_char)) { + if (current_char === '\r' && input.peek(1) === '\n') { + input.next(); + current_char = input.peek(); + } + resulting_string += '\n'; + } else { + resulting_string += current_char; + } + + if (esc) { + if (current_char === 'x' || current_char === 'u') { + has_char_escapes = true; + } + esc = false; + } else { + esc = current_char === '\\'; + } + + input.next(); + + if (start_sub && resulting_string.indexOf(start_sub, resulting_string.length - start_sub.length) !== -1) { + if (delimiter === '`') { + parse_string('}', allow_unescaped_newlines, '`'); + } else { + parse_string('`', allow_unescaped_newlines, '${'); + } + + if (input.hasNext()) { + resulting_string += input.next(); + } + } + } + }; + + if (sep === '`') { + parse_string('`', true, '${'); + } else { + parse_string(sep); + } + } + + if (has_char_escapes && opts.unescape_strings) { + resulting_string = unescape_string(resulting_string); + } + + if (input.peek() === sep) { + resulting_string += sep; + input.next(); + + if (sep === '/') { + // regexps may have modifiers /regexp/MOD , so fetch those, too + // Only [gim] are valid, but if the user puts in garbage, do what we can to take it. + while (input.hasNext() && acorn.isIdentifierStart(input.peekCharCode())) { + resulting_string += input.next(); + } + } + } + return [resulting_string, 'TK_STRING']; + } + + if (c === '#') { + + if (tokens.length === 0 && input.peek() === '!') { + // shebang + resulting_string = c; + while (input.hasNext() && c !== '\n') { + c = input.next(); + resulting_string += c; + } + return [trim(resulting_string) + '\n', 'TK_UNKNOWN']; + } + + + + // Spidermonkey-specific sharp variables for circular references + // https://developer.mozilla.org/En/Sharp_variables_in_JavaScript + // http://mxr.mozilla.org/mozilla-central/source/js/src/jsscan.cpp around line 1935 + var sharp = '#'; + if (input.hasNext() && input.testChar(digit)) { + do { + c = input.next(); + sharp += c; + } while (input.hasNext() && c !== '#' && c !== '='); + if (c === '#') { + // + } else if (input.peek() === '[' && input.peek(1) === ']') { + sharp += '[]'; + input.next(); + input.next(); + } else if (input.peek() === '{' && input.peek(1) === '}') { + sharp += '{}'; + input.next(); + input.next(); + } + return [sharp, 'TK_WORD']; + } + } + + if (c === '<' && (input.peek() === '?' || input.peek() === '%')) { + input.back(); + var template_match = input.match(template_pattern); + if (template_match) { + c = template_match[0]; + c = c.replace(acorn.allLineBreaks, '\n'); + return [c, 'TK_STRING']; + } + } + + if (c === '<' && input.match(/\!--/g)) { + c = '', 'TK_COMMENT']; + } + + if (c === '.') { + if (input.peek() === '.' && input.peek(1) === '.') { + c += input.next() + input.next(); + return [c, 'TK_OPERATOR']; + } + return [c, 'TK_DOT']; + } + + if (in_array(c, punct)) { + while (input.hasNext() && in_array(c + input.peek(), punct)) { + c += input.next(); + if (!input.hasNext()) { + break; + } + } + + if (c === ',') { + return [c, 'TK_COMMA']; + } else if (c === '=') { + return [c, 'TK_EQUALS']; + } else { + return [c, 'TK_OPERATOR']; + } + } + + return [c, 'TK_UNKNOWN']; + } + + + function unescape_string(s) { + // You think that a regex would work for this + // return s.replace(/\\x([0-9a-f]{2})/gi, function(match, val) { + // return String.fromCharCode(parseInt(val, 16)); + // }) + // However, dealing with '\xff', '\\xff', '\\\xff' makes this more fun. + var out = '', + escaped = 0; + + var input_scan = new InputScanner(s); + var matched = null; + + while (input_scan.hasNext()) { + // Keep any whitespace, non-slash characters + // also keep slash pairs. + matched = input_scan.match(/([\s]|[^\\]|\\\\)+/g); + + if (matched) { + out += matched[0]; + } + + if (input_scan.peek() === '\\') { + input_scan.next(); + if (input_scan.peek() === 'x') { + matched = input_scan.match(/x([0-9A-Fa-f]{2})/g); + } else if (input_scan.peek() === 'u') { + matched = input_scan.match(/u([0-9A-Fa-f]{4})/g); + } else { + out += '\\'; + if (input_scan.hasNext()) { + out += input_scan.next(); + } + continue; + } + + // If there's some error decoding, return the original string + if (!matched) { + return s; + } + + escaped = parseInt(matched[1], 16); + + if (escaped > 0x7e && escaped <= 0xff && matched[0].indexOf('x') === 0) { + // we bail out on \x7f..\xff, + // leaving whole string escaped, + // as it's probably completely binary + return s; + } else if (escaped >= 0x00 && escaped < 0x20) { + // leave 0x00...0x1f escaped + out += '\\' + matched[0]; + continue; + } else if (escaped === 0x22 || escaped === 0x27 || escaped === 0x5c) { + // single-quote, apostrophe, backslash - escape these + out += '\\' + String.fromCharCode(escaped); + } else { + out += String.fromCharCode(escaped); + } + } + } + + return out; + } +} + +module.exports.Tokenizer = Tokenizer; + +/***/ }) +/******/ ]); +var js_beautify = legacy_beautify_js; +/* Footer */ +if (true) { + // Add support for AMD ( https://github.com/amdjs/amdjs-api/wiki/AMD#defineamd-property- ) + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() { + return { js_beautify: js_beautify }; + }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +} else if (typeof exports !== "undefined") { + // Add support for CommonJS. Just put this file somewhere on your require.paths + // and you will be able to `var js_beautify = require("beautify").js_beautify`. + exports.js_beautify = js_beautify; +} else if (typeof window !== "undefined") { + // If we're running a web page and don't have either of the above, add our one global + window.js_beautify = js_beautify; +} else if (typeof global !== "undefined") { + // If we don't even have window, try global. + global.js_beautify = js_beautify; +} + +}()); + + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*jshint curly:false, eqeqeq:true, laxbreak:true, noempty:false */ +/* AUTO-GENERATED. DO NOT MODIFY. */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + + CSS Beautifier +--------------- + + Written by Harutyun Amirjanyan, (amirjanyan@gmail.com) + + Based on code initially developed by: Einar Lielmanis, + http://jsbeautifier.org/ + + Usage: + css_beautify(source_text); + css_beautify(source_text, options); + + The options are (default in brackets): + indent_size (4) — indentation size, + indent_char (space) — character to indent with, + selector_separator_newline (true) - separate selectors with newline or + not (e.g. "a,\nbr" or "a, br") + end_with_newline (false) - end with a newline + newline_between_rules (true) - add a new line after every css rule + space_around_selector_separator (false) - ensure space around selector separators: + '>', '+', '~' (e.g. "a>b" -> "a > b") + e.g + + css_beautify(css_source_text, { + 'indent_size': 1, + 'indent_char': '\t', + 'selector_separator': ' ', + 'end_with_newline': false, + 'newline_between_rules': true, + 'space_around_selector_separator': true + }); +*/ + +// http://www.w3.org/TR/CSS21/syndata.html#tokenization +// http://www.w3.org/TR/css3-syntax/ + +(function() { +var legacy_beautify_css = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 4); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + +var mergeOpts = __webpack_require__(2).mergeOpts; +var acorn = __webpack_require__(1); +var Output = __webpack_require__(3).Output; + + +var lineBreak = acorn.lineBreak; +var allLineBreaks = acorn.allLineBreaks; + +function Beautifier(source_text, options) { + options = options || {}; + + // Allow the setting of language/file-type specific options + // with inheritance of overall settings + options = mergeOpts(options, 'css'); + + source_text = source_text || ''; + + var newlinesFromLastWSEat = 0; + var indentSize = options.indent_size ? parseInt(options.indent_size, 10) : 4; + var indentCharacter = options.indent_char || ' '; + var preserve_newlines = (options.preserve_newlines === undefined) ? false : options.preserve_newlines; + var selectorSeparatorNewline = (options.selector_separator_newline === undefined) ? true : options.selector_separator_newline; + var end_with_newline = (options.end_with_newline === undefined) ? false : options.end_with_newline; + var newline_between_rules = (options.newline_between_rules === undefined) ? true : options.newline_between_rules; + var space_around_combinator = (options.space_around_combinator === undefined) ? false : options.space_around_combinator; + space_around_combinator = space_around_combinator || ((options.space_around_selector_separator === undefined) ? false : options.space_around_selector_separator); + var eol = options.eol ? options.eol : 'auto'; + + if (options.indent_with_tabs) { + indentCharacter = '\t'; + indentSize = 1; + } + + if (eol === 'auto') { + eol = '\n'; + if (source_text && lineBreak.test(source_text || '')) { + eol = source_text.match(lineBreak)[0]; + } + } + + eol = eol.replace(/\\r/, '\r').replace(/\\n/, '\n'); + + // HACK: newline parsing inconsistent. This brute force normalizes the input. + source_text = source_text.replace(allLineBreaks, '\n'); + + // tokenizer + var whiteRe = /^\s+$/; + + var pos = -1, + ch; + var parenLevel = 0; + + function next() { + ch = source_text.charAt(++pos); + return ch || ''; + } + + function peek(skipWhitespace) { + var result = ''; + var prev_pos = pos; + if (skipWhitespace) { + eatWhitespace(); + } + result = source_text.charAt(pos + 1) || ''; + pos = prev_pos - 1; + next(); + return result; + } + + function eatString(endChars) { + var start = pos; + while (next()) { + if (ch === "\\") { + next(); + } else if (endChars.indexOf(ch) !== -1) { + break; + } else if (ch === "\n") { + break; + } + } + return source_text.substring(start, pos + 1); + } + + function peekString(endChar) { + var prev_pos = pos; + var str = eatString(endChar); + pos = prev_pos - 1; + next(); + return str; + } + + function eatWhitespace(preserve_newlines_local) { + var result = 0; + while (whiteRe.test(peek())) { + next(); + if (ch === '\n' && preserve_newlines_local && preserve_newlines) { + output.add_new_line(true); + result++; + } + } + newlinesFromLastWSEat = result; + return result; + } + + function skipWhitespace() { + var result = ''; + if (ch && whiteRe.test(ch)) { + result = ch; + } + while (whiteRe.test(next())) { + result += ch; + } + return result; + } + + function eatComment() { + var start = pos; + var singleLine = peek() === "/"; + next(); + while (next()) { + if (!singleLine && ch === "*" && peek() === "/") { + next(); + break; + } else if (singleLine && ch === "\n") { + return source_text.substring(start, pos); + } + } + + return source_text.substring(start, pos) + ch; + } + + + function lookBack(str) { + return source_text.substring(pos - str.length, pos).toLowerCase() === + str; + } + + // Nested pseudo-class if we are insideRule + // and the next special character found opens + // a new block + function foundNestedPseudoClass() { + var openParen = 0; + for (var i = pos + 1; i < source_text.length; i++) { + var ch = source_text.charAt(i); + if (ch === "{") { + return true; + } else if (ch === '(') { + // pseudoclasses can contain () + openParen += 1; + } else if (ch === ')') { + if (openParen === 0) { + return false; + } + openParen -= 1; + } else if (ch === ";" || ch === "}") { + return false; + } + } + return false; + } + + // printer + var baseIndentString = ''; + var preindent_index = 0; + if (source_text && source_text.length) { + while ((source_text.charAt(preindent_index) === ' ' || + source_text.charAt(preindent_index) === '\t')) { + preindent_index += 1; + } + baseIndentString = source_text.substring(0, preindent_index); + source_text = source_text.substring(preindent_index); + } + + + var singleIndent = new Array(indentSize + 1).join(indentCharacter); + var indentLevel; + var nestedLevel; + var output; + + function print_string(output_string) { + if (output.just_added_newline()) { + output.set_indent(indentLevel); + } + output.add_token(output_string); + } + + function preserveSingleSpace(isAfterSpace) { + if (isAfterSpace) { + output.space_before_token = true; + } + } + + function indent() { + indentLevel++; + } + + function outdent() { + if (indentLevel > 0) { + indentLevel--; + } + } + + /*_____________________--------------------_____________________*/ + + this.beautify = function() { + // reset + output = new Output(singleIndent, baseIndentString); + indentLevel = 0; + nestedLevel = 0; + + pos = -1; + ch = null; + parenLevel = 0; + + var insideRule = false; + var insidePropertyValue = false; + var enteringConditionalGroup = false; + var top_ch = ''; + var last_top_ch = ''; + + while (true) { + var whitespace = skipWhitespace(); + var isAfterSpace = whitespace !== ''; + var isAfterNewline = whitespace.indexOf('\n') !== -1; + last_top_ch = top_ch; + top_ch = ch; + + if (!ch) { + break; + } else if (ch === '/' && peek() === '*') { /* css comment */ + var header = indentLevel === 0; + + if (isAfterNewline || header) { + output.add_new_line(); + } + + print_string(eatComment()); + output.add_new_line(); + if (header) { + output.add_new_line(true); + } + } else if (ch === '/' && peek() === '/') { // single line comment + if (!isAfterNewline && last_top_ch !== '{') { + output.trim(true); + } + output.space_before_token = true; + print_string(eatComment()); + output.add_new_line(); + } else if (ch === '@') { + preserveSingleSpace(isAfterSpace); + + // deal with less propery mixins @{...} + if (peek() === '{') { + print_string(eatString('}')); + } else { + print_string(ch); + + // strip trailing space, if present, for hash property checks + var variableOrRule = peekString(": ,;{}()[]/='\""); + + if (variableOrRule.match(/[ :]$/)) { + // we have a variable or pseudo-class, add it and insert one space before continuing + next(); + variableOrRule = eatString(": ").replace(/\s$/, ''); + print_string(variableOrRule); + output.space_before_token = true; + } + + variableOrRule = variableOrRule.replace(/\s$/, ''); + + // might be a nesting at-rule + if (variableOrRule in this.NESTED_AT_RULE) { + nestedLevel += 1; + if (variableOrRule in this.CONDITIONAL_GROUP_RULE) { + enteringConditionalGroup = true; + } + } + } + } else if (ch === '#' && peek() === '{') { + preserveSingleSpace(isAfterSpace); + print_string(eatString('}')); + } else if (ch === '{') { + if (peek(true) === '}') { + eatWhitespace(); + next(); + output.space_before_token = true; + print_string("{}"); + if (!eatWhitespace(true)) { + output.add_new_line(); + } + + if (newlinesFromLastWSEat < 2 && newline_between_rules && indentLevel === 0) { + output.add_new_line(true); + } + } else { + indent(); + output.space_before_token = true; + print_string(ch); + if (!eatWhitespace(true)) { + output.add_new_line(); + } + + // when entering conditional groups, only rulesets are allowed + if (enteringConditionalGroup) { + enteringConditionalGroup = false; + insideRule = (indentLevel > nestedLevel); + } else { + // otherwise, declarations are also allowed + insideRule = (indentLevel >= nestedLevel); + } + } + } else if (ch === '}') { + outdent(); + output.add_new_line(); + print_string(ch); + insideRule = false; + insidePropertyValue = false; + if (nestedLevel) { + nestedLevel--; + } + + if (!eatWhitespace(true)) { + output.add_new_line(); + } + + if (newlinesFromLastWSEat < 2 && newline_between_rules && indentLevel === 0) { + output.add_new_line(true); + } + } else if (ch === ":") { + eatWhitespace(); + if ((insideRule || enteringConditionalGroup) && + !(lookBack("&") || foundNestedPseudoClass()) && + !lookBack("(")) { + // 'property: value' delimiter + // which could be in a conditional group query + print_string(':'); + if (!insidePropertyValue) { + insidePropertyValue = true; + output.space_before_token = true; + } + } else { + // sass/less parent reference don't use a space + // sass nested pseudo-class don't use a space + + // preserve space before pseudoclasses/pseudoelements, as it means "in any child" + if (lookBack(" ")) { + output.space_before_token = true; + } + if (peek() === ":") { + // pseudo-element + next(); + print_string("::"); + } else { + // pseudo-class + print_string(':'); + } + } + } else if (ch === '"' || ch === '\'') { + preserveSingleSpace(isAfterSpace); + print_string(eatString(ch)); + } else if (ch === ';') { + insidePropertyValue = false; + print_string(ch); + if (!eatWhitespace(true)) { + output.add_new_line(); + } + } else if (ch === '(') { // may be a url + if (lookBack("url")) { + print_string(ch); + eatWhitespace(); + if (next()) { + if (ch !== ')' && ch !== '"' && ch !== '\'') { + print_string(eatString(')')); + } else { + pos--; + } + } + } else { + parenLevel++; + preserveSingleSpace(isAfterSpace); + print_string(ch); + eatWhitespace(); + } + } else if (ch === ')') { + print_string(ch); + parenLevel--; + } else if (ch === ',') { + print_string(ch); + if (!eatWhitespace(true) && selectorSeparatorNewline && !insidePropertyValue && parenLevel < 1) { + output.add_new_line(); + } else { + output.space_before_token = true; + } + } else if ((ch === '>' || ch === '+' || ch === '~') && + !insidePropertyValue && parenLevel < 1) { + //handle combinator spacing + if (space_around_combinator) { + output.space_before_token = true; + print_string(ch); + output.space_before_token = true; + } else { + print_string(ch); + eatWhitespace(); + // squash extra whitespace + if (ch && whiteRe.test(ch)) { + ch = ''; + } + } + } else if (ch === ']') { + print_string(ch); + } else if (ch === '[') { + preserveSingleSpace(isAfterSpace); + print_string(ch); + } else if (ch === '=') { // no whitespace before or after + eatWhitespace(); + print_string('='); + if (whiteRe.test(ch)) { + ch = ''; + } + } else if (ch === '!') { // !important + print_string(' '); + print_string(ch); + } else { + preserveSingleSpace(isAfterSpace); + print_string(ch); + } + } + + var sweetCode = output.get_code(end_with_newline, eol); + + return sweetCode; + }; + + // https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule + this.NESTED_AT_RULE = { + "@page": true, + "@font-face": true, + "@keyframes": true, + // also in CONDITIONAL_GROUP_RULE below + "@media": true, + "@supports": true, + "@document": true + }; + this.CONDITIONAL_GROUP_RULE = { + "@media": true, + "@supports": true, + "@document": true + }; +} + +module.exports.Beautifier = Beautifier; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports) { + +/* jshint curly: false */ +// This section of code is taken from acorn. +// +// Acorn was written by Marijn Haverbeke and released under an MIT +// license. The Unicode regexps (for identifiers and whitespace) were +// taken from [Esprima](http://esprima.org) by Ariya Hidayat. +// +// Git repositories for Acorn are available at +// +// http://marijnhaverbeke.nl/git/acorn +// https://github.com/marijnh/acorn.git + +// ## Character categories + +// Big ugly regular expressions that match characters in the +// whitespace, identifier, and identifier-start categories. These +// are only applied when a character is found to actually have a +// code point above 128. + +var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/; // jshint ignore:line +var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; +var nonASCIIidentifierChars = "\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u0620-\u0649\u0672-\u06d3\u06e7-\u06e8\u06fb-\u06fc\u0730-\u074a\u0800-\u0814\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0840-\u0857\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962-\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09d7\u09df-\u09e0\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5f-\u0b60\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2-\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d46-\u0d48\u0d57\u0d62-\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e34-\u0e3a\u0e40-\u0e45\u0e50-\u0e59\u0eb4-\u0eb9\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f41-\u0f47\u0f71-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1029\u1040-\u1049\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u170e-\u1710\u1720-\u1730\u1740-\u1750\u1772\u1773\u1780-\u17b2\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1920-\u192b\u1930-\u193b\u1951-\u196d\u19b0-\u19c0\u19c8-\u19c9\u19d0-\u19d9\u1a00-\u1a15\u1a20-\u1a53\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b46-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1bb0-\u1bb9\u1be6-\u1bf3\u1c00-\u1c22\u1c40-\u1c49\u1c5b-\u1c7d\u1cd0-\u1cd2\u1d00-\u1dbe\u1e01-\u1f15\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2d81-\u2d96\u2de0-\u2dff\u3021-\u3028\u3099\u309a\ua640-\ua66d\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua7f8-\ua800\ua806\ua80b\ua823-\ua827\ua880-\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8f3-\ua8f7\ua900-\ua909\ua926-\ua92d\ua930-\ua945\ua980-\ua983\ua9b3-\ua9c0\uaa00-\uaa27\uaa40-\uaa41\uaa4c-\uaa4d\uaa50-\uaa59\uaa7b\uaae0-\uaae9\uaaf2-\uaaf3\uabc0-\uabe1\uabec\uabed\uabf0-\uabf9\ufb20-\ufb28\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; +var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); +var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + +// Whether a single character denotes a newline. + +exports.newline = /[\n\r\u2028\u2029]/; + +// Matches a whole line break (where CRLF is considered a single +// line break). Used to count lines. + +// in javascript, these two differ +// in python they are the same, different methods are called on them +exports.lineBreak = new RegExp('\r\n|' + exports.newline.source); +exports.allLineBreaks = new RegExp(exports.lineBreak.source, 'g'); + + +// Test whether a given character code starts an identifier. + +exports.isIdentifierStart = function(code) { + // permit $ (36) and @ (64). @ is used in ES7 decorators. + if (code < 65) return code === 36 || code === 64; + // 65 through 91 are uppercase letters. + if (code < 91) return true; + // permit _ (95). + if (code < 97) return code === 95; + // 97 through 123 are lowercase letters. + if (code < 123) return true; + return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); +}; + +// Test whether a given character is part of an identifier. + +exports.isIdentifierChar = function(code) { + if (code < 48) return code === 36; + if (code < 58) return true; + if (code < 65) return false; + if (code < 91) return true; + if (code < 97) return code === 95; + if (code < 123) return true; + return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); +}; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + +function mergeOpts(allOptions, targetType) { + var finalOpts = {}; + var name; + + for (name in allOptions) { + if (name !== targetType) { + finalOpts[name] = allOptions[name]; + } + } + + //merge in the per type settings for the targetType + if (targetType in allOptions) { + for (name in allOptions[targetType]) { + finalOpts[name] = allOptions[targetType][name]; + } + } + return finalOpts; +} + +module.exports.mergeOpts = mergeOpts; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + +function OutputLine(parent) { + var _character_count = 0; + // use indent_count as a marker for lines that have preserved indentation + var _indent_count = -1; + + var _items = []; + var _empty = true; + + this.set_indent = function(level) { + _character_count = parent.baseIndentLength + level * parent.indent_length; + _indent_count = level; + }; + + this.get_character_count = function() { + return _character_count; + }; + + this.is_empty = function() { + return _empty; + }; + + this.last = function() { + if (!this._empty) { + return _items[_items.length - 1]; + } else { + return null; + } + }; + + this.push = function(input) { + _items.push(input); + _character_count += input.length; + _empty = false; + }; + + this.pop = function() { + var item = null; + if (!_empty) { + item = _items.pop(); + _character_count -= item.length; + _empty = _items.length === 0; + } + return item; + }; + + this.remove_indent = function() { + if (_indent_count > 0) { + _indent_count -= 1; + _character_count -= parent.indent_length; + } + }; + + this.trim = function() { + while (this.last() === ' ') { + _items.pop(); + _character_count -= 1; + } + _empty = _items.length === 0; + }; + + this.toString = function() { + var result = ''; + if (!this._empty) { + if (_indent_count >= 0) { + result = parent.indent_cache[_indent_count]; + } + result += _items.join(''); + } + return result; + }; +} + +function Output(indent_string, baseIndentString) { + baseIndentString = baseIndentString || ''; + this.indent_cache = [baseIndentString]; + this.baseIndentLength = baseIndentString.length; + this.indent_length = indent_string.length; + this.raw = false; + + var lines = []; + this.baseIndentString = baseIndentString; + this.indent_string = indent_string; + this.previous_line = null; + this.current_line = null; + this.space_before_token = false; + + this.add_outputline = function() { + this.previous_line = this.current_line; + this.current_line = new OutputLine(this); + lines.push(this.current_line); + }; + + // initialize + this.add_outputline(); + + + this.get_line_number = function() { + return lines.length; + }; + + // Using object instead of string to allow for later expansion of info about each line + this.add_new_line = function(force_newline) { + if (this.get_line_number() === 1 && this.just_added_newline()) { + return false; // no newline on start of file + } + + if (force_newline || !this.just_added_newline()) { + if (!this.raw) { + this.add_outputline(); + } + return true; + } + + return false; + }; + + this.get_code = function(end_with_newline, eol) { + var sweet_code = lines.join('\n').replace(/[\r\n\t ]+$/, ''); + + if (end_with_newline) { + sweet_code += '\n'; + } + + if (eol !== '\n') { + sweet_code = sweet_code.replace(/[\n]/g, eol); + } + + return sweet_code; + }; + + this.set_indent = function(level) { + // Never indent your first output indent at the start of the file + if (lines.length > 1) { + while (level >= this.indent_cache.length) { + this.indent_cache.push(this.indent_cache[this.indent_cache.length - 1] + this.indent_string); + } + + this.current_line.set_indent(level); + return true; + } + this.current_line.set_indent(0); + return false; + }; + + this.add_raw_token = function(token) { + for (var x = 0; x < token.newlines; x++) { + this.add_outputline(); + } + this.current_line.push(token.whitespace_before); + this.current_line.push(token.text); + this.space_before_token = false; + }; + + this.add_token = function(printable_token) { + this.add_space_before_token(); + this.current_line.push(printable_token); + }; + + this.add_space_before_token = function() { + if (this.space_before_token && !this.just_added_newline()) { + this.current_line.push(' '); + } + this.space_before_token = false; + }; + + this.remove_indent = function(index) { + var output_length = lines.length; + while (index < output_length) { + lines[index].remove_indent(); + index++; + } + }; + + this.trim = function(eat_newlines) { + eat_newlines = (eat_newlines === undefined) ? false : eat_newlines; + + this.current_line.trim(indent_string, baseIndentString); + + while (eat_newlines && lines.length > 1 && + this.current_line.is_empty()) { + lines.pop(); + this.current_line = lines[lines.length - 1]; + this.current_line.trim(); + } + + this.previous_line = lines.length > 1 ? lines[lines.length - 2] : null; + }; + + this.just_added_newline = function() { + return this.current_line.is_empty(); + }; + + this.just_added_blankline = function() { + if (this.just_added_newline()) { + if (lines.length === 1) { + return true; // start of the file and newline = blank + } + + var line = lines[lines.length - 2]; + return line.is_empty(); + } + return false; + }; +} + +module.exports.Output = Output; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */ +/* + + The MIT License (MIT) + + Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ + +var Beautifier = __webpack_require__(0).Beautifier; + +function css_beautify(source_text, options) { + var beautifier = new Beautifier(source_text, options); + return beautifier.beautify(); +} + +module.exports = css_beautify; + +/***/ }) +/******/ ]); +var css_beautify = legacy_beautify_css; +/* Footer */ +if (true) { + // Add support for AMD ( https://github.com/amdjs/amdjs-api/wiki/AMD#defineamd-property- ) + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() { + return { + css_beautify: css_beautify + }; + }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +} else if (typeof exports !== "undefined") { + // Add support for CommonJS. Just put this file somewhere on your require.paths + // and you will be able to `var html_beautify = require("beautify").html_beautify`. + exports.css_beautify = css_beautify; +} else if (typeof window !== "undefined") { + // If we're running a web page and don't have either of the above, add our one global + window.css_beautify = css_beautify; +} else if (typeof global !== "undefined") { + // If we don't even have window, try global. + global.css_beautify = css_beautify; +} + +}()); + + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(17) && !__webpack_require__(22)(function () { + return Object.defineProperty(__webpack_require__(39)('div'), 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(18); +var toIObject = __webpack_require__(19); +var arrayIndexOf = __webpack_require__(84)(false); +var IE_PROTO = __webpack_require__(43)('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; + + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(29); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; + + +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(18); +var toObject = __webpack_require__(32); +var IE_PROTO = __webpack_require__(43)('IE_PROTO'); +var ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; + + +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(90), __esModule: true }; + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(48); +var $export = __webpack_require__(12); +var redefine = __webpack_require__(66); +var hide = __webpack_require__(20); +var has = __webpack_require__(18); +var Iterators = __webpack_require__(26); +var $iterCreate = __webpack_require__(95); +var setToStringTag = __webpack_require__(50); +var getPrototypeOf = __webpack_require__(63); +var ITERATOR = __webpack_require__(11)('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; + +var returnThis = function () { return this; }; + +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = (!BUGGY && $native) || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; + + +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(20); + + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +var document = __webpack_require__(10).document; +module.exports = document && document.documentElement; + + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +var META = __webpack_require__(30)('meta'); +var isObject = __webpack_require__(16); +var has = __webpack_require__(18); +var setDesc = __webpack_require__(15).f; +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; +var FREEZE = !__webpack_require__(22)(function () { + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function (it) { + setDesc(it, META, { value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + } }); +}; +var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; + + +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(19); +var gOPN = __webpack_require__(70).f; +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } +}; + +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; + + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = __webpack_require__(61); +var hiddenKeys = __webpack_require__(45).concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; + + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(112), __esModule: true }; + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _slicedToArray2 = __webpack_require__(73); + +var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); + +var _stringify = __webpack_require__(76); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _stringifyWorker = __webpack_require__(158); + +var _stringifyWorker2 = _interopRequireDefault(_stringifyWorker); + +var _util = __webpack_require__(0); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var isWorkerSupported = !!window.Worker; + +var callbacks = {}, + worker = void 0; + +if (isWorkerSupported) { + worker = new _stringifyWorker2.default(); + worker.onmessage = function (e) { + var _e$data = (0, _slicedToArray3.default)(e.data, 2), + id = _e$data[0], + result = _e$data[1]; + + if (callbacks[id]) { + callbacks[id](result); + delete callbacks[id]; + } + }; +} + +function _exports(obj, options, cb) { + var useWorker = _exports.useWorker && isWorkerSupported; + + if (useWorker) { + var id = (0, _util.uniqId)('stringifyWorker'); + callbacks[id] = cb; + // Some native object can't be cloned, such as window.location. + try { + worker.postMessage([id, obj, options]); + return; + } catch (e) { + delete callbacks[id]; + } + } + + var result = (0, _stringify2.default)(obj, options); + (0, _util.nextTick)(function () { + return cb(result); + }); +} + +_exports.useWorker = false; + +exports.default = _exports; + +/***/ }), +/* 73 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _isIterable2 = __webpack_require__(151); + +var _isIterable3 = _interopRequireDefault(_isIterable2); + +var _getIterator2 = __webpack_require__(75); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if ((0, _isIterable3.default)(Object(arr))) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; +}(); + +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { + +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(29); +var TAG = __webpack_require__(11)('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } +}; + +module.exports = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; + + +/***/ }), +/* 75 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(154), __esModule: true }; + +/***/ }), +/* 76 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _keys = __webpack_require__(35); + +var _keys2 = _interopRequireDefault(_keys); + +var _getOwnPropertyNames = __webpack_require__(55); + +var _getOwnPropertyNames2 = _interopRequireDefault(_getOwnPropertyNames); + +var _getOwnPropertyDescriptor = __webpack_require__(34); + +var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +exports.default = stringify; + +var _stringifyUtil = __webpack_require__(157); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// Modified from: https://jsconsole.com/ +function stringify(obj) { + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$visitor = _ref.visitor, + visitor = _ref$visitor === undefined ? new Visitor() : _ref$visitor, + topObj = _ref.topObj, + _ref$level = _ref.level, + level = _ref$level === undefined ? 0 : _ref$level, + _ref$circularMarker = _ref.circularMarker, + circularMarker = _ref$circularMarker === undefined ? false : _ref$circularMarker, + _ref$getterVal = _ref.getterVal, + getterVal = _ref$getterVal === undefined ? false : _ref$getterVal, + _ref$unenumerable = _ref.unenumerable, + unenumerable = _ref$unenumerable === undefined ? true : _ref$unenumerable; + + var json = '', + type = void 0, + parts = [], + names = [], + proto = void 0, + objAbstract = void 0, + circularObj = void 0, + allKeys = void 0, + keys = void 0, + id = ''; + + topObj = topObj || obj; + + var passOpts = { visitor: visitor, getterVal: getterVal, unenumerable: unenumerable, level: level + 1 }, + passProtoOpts = { visitor: visitor, getterVal: getterVal, topObj: topObj, unenumerable: unenumerable, level: level + 1 }; + + var wrapKey = function wrapKey(key) { + return '"' + (0, _stringifyUtil.escapeJsonStr)(key) + '"'; + }, + wrapStr = function wrapStr(str) { + return '"' + (0, _stringifyUtil.escapeJsonStr)((0, _stringifyUtil.toStr)(str)) + '"'; + }; + + type = getType(obj); + + var isFn = type == '[object Function]', + isStr = type == '[object String]', + isArr = type == '[object Array]', + isObj = type == '[object Object]', + isNum = type == '[object Number]', + isSymbol = type == '[object Symbol]', + isBool = type == '[object Boolean]'; + + circularObj = visitor.check(obj); + + if (circularObj) { + json = stringify(circularObj.abstract, { circularMarker: true }); + } else if (isStr) { + json = wrapStr(obj); + } else if (isArr || isObj || isFn) { + id = visitor.visit(obj); + + if (canBeProto(obj)) { + obj = (0, _getPrototypeOf2.default)(obj); + id = visitor.visit(obj); + } + + names = getKeys(obj); + keys = names.keys; + allKeys = names.allKeys; + names = unenumerable ? allKeys : keys; + + proto = (0, _getPrototypeOf2.default)(obj); + if (circularMarker && proto === Object.prototype) proto = null; + if (proto) { + proto = wrapKey('erudaProto') + ': ' + stringify(proto, passProtoOpts); + } + if (isFn) { + // We don't need these properties to display for functions. + names = names.filter(function (val) { + return ['arguments', 'caller'].indexOf(val) < 0; + }); + } + json = '{ '; + objAbstract = getObjAbstract(obj); + visitor.updateAbstract(id, { + erudaObjAbstract: objAbstract, + erudaCircular: id + }); + parts.push(wrapKey('erudaObjAbstract') + ': ' + wrapStr(objAbstract)); + if (!circularMarker) parts.push('"erudaId": "' + id + '"'); + (0, _stringifyUtil.each)(names, objIteratee); + if (proto) parts.push(proto); + json += parts.join(', ') + ' }'; + } else if (isNum) { + json = obj + ''; + if ((0, _stringifyUtil.endWith)(json, 'Infinity') || json === 'NaN') json = '"' + json + '"'; + } else if (isBool) { + json = obj ? 'true' : 'false'; + } else if (obj === null) { + json = 'null'; + } else if (isSymbol) { + json = wrapStr('Symbol'); + } else if (obj === undefined) { + json = wrapStr('undefined'); + } else if (type === '[object HTMLAllCollection]') { + // https://docs.webplatform.org/wiki/dom/HTMLAllCollection + // Might cause a performance issue when stringify a dom element. + json = wrapStr('[object HTMLAllCollection]'); + } else if (type === '[object HTMLDocument]' && level > 1) { + // Same as reason above. + json = wrapStr('[object HTMLDocument]'); + } else { + try { + id = visitor.visit(obj); + if (canBeProto(obj)) { + obj = (0, _getPrototypeOf2.default)(obj); + id = visitor.visit(obj); + } + + json = '{ '; + objAbstract = getObjAbstract(obj); + visitor.updateAbstract(id, { + erudaObjAbstract: objAbstract, + erudaCircular: id + }); + parts.push(wrapKey('erudaObjAbstract') + ': ' + wrapStr(objAbstract)); + if (!circularMarker) parts.push('"erudaId": "' + id + '"'); + + names = getKeys(obj); + keys = names.keys; + allKeys = names.allKeys; + names = unenumerable ? allKeys : keys; + + proto = (0, _getPrototypeOf2.default)(obj); + if (circularMarker && proto === Object.prototype) proto = null; + if (proto) { + try { + proto = wrapKey('erudaProto') + ': ' + stringify(proto, passProtoOpts); + } catch (e) { + proto = wrapKey('erudaProto') + ': ' + wrapStr(e.message); + } + } + (0, _stringifyUtil.each)(names, objIteratee); + if (proto) parts.push(proto); + json += parts.join(', ') + ' }'; + } catch (e) { + json = wrapStr(obj); + } + } + + function objIteratee(name) { + var unenumerable = !(0, _stringifyUtil.contain)(keys, name) ? 'erudaUnenumerable ' : '', + key = wrapKey(unenumerable + name), + getKey = wrapKey(unenumerable + 'get ' + name), + setKey = wrapKey(unenumerable + 'set ' + name); + + var descriptor = (0, _getOwnPropertyDescriptor2.default)(obj, name), + hasGetter = descriptor && descriptor.get, + hasSetter = descriptor && descriptor.set; + + if (!getterVal && hasGetter) { + parts.push(key + ': "(...)"'); + parts.push(getKey + ': ' + stringify(descriptor.get, passOpts)); + } else { + var val = void 0; + try { + val = topObj[name]; + } catch (e) { + val = e.message; + } + parts.push(key + ': ' + stringify(val, passOpts)); + } + if (hasSetter) { + parts.push(setKey + ': ' + stringify(descriptor.set, passOpts)); + } + } + + return json; +} + +function getKeys(obj) { + var allKeys = (0, _getOwnPropertyNames2.default)(obj), + keys = (0, _keys2.default)(obj).sort(sortObjName); + + allKeys = keys.concat((0, _stringifyUtil.filter)(allKeys, function (val) { + return !(0, _stringifyUtil.contain)(keys, val); + }).sort(sortObjName)); + + return { keys: keys, allKeys: allKeys }; +} + +// $, upperCase, lowerCase, _ +function sortObjName(a, b) { + var lenA = a.length, + lenB = b.length, + len = lenA > lenB ? lenB : lenA; + + for (var i = 0; i < len; i++) { + var codeA = a.charCodeAt(i), + codeB = b.charCodeAt(i), + cmpResult = cmpCode(codeA, codeB); + + if (cmpResult !== 0) return cmpResult; + } + + if (lenA > lenB) return 1; + if (lenA < lenB) return -1; + + return 0; +} + +function cmpCode(a, b) { + a = transCode(a); + b = transCode(b); + + if (a > b) return 1; + if (a < b) return -1; + return 0; +} + +function transCode(code) { + // _ should be placed after lowercase chars. + if (code === 95) return 123; + return code; +} + +var regFnHead = /function(.*?)\((.*?)\)/; + +function extractFnHead(fn) { + var str = fn.toString(), + fnHead = str.match(regFnHead); + + if (fnHead) return fnHead[0]; + + return str; +} + +function getFnAbstract(fn) { + var fnStr = fn.toString(); + if (fnStr.length > 500) fnStr = fnStr.slice(0, 500) + '...'; + + return extractFnHead(fnStr).replace('function', ''); +} + +function canBeProto(obj) { + var emptyObj = (0, _stringifyUtil.isEmpty)((0, _getOwnPropertyNames2.default)(obj)), + proto = (0, _getPrototypeOf2.default)(obj); + + return emptyObj && proto && proto !== Object.prototype; +} + +function getObjAbstract(obj) { + if ((0, _stringifyUtil.isArr)(obj)) return 'Array(' + obj.length + ')'; + if ((0, _stringifyUtil.isFn)(obj)) return getFnAbstract(obj); + if ((0, _stringifyUtil.isRegExp)(obj)) return obj.toString(); + + var type = getType(obj); + + return type.replace(/(\[object )|]/g, ''); +} + +function getType(obj) { + var type = void 0; + + try { + type = {}.toString.call(obj); + } catch (e) { + type = '[object Object]'; + } + + return type; +} + +var Visitor = function () { + function Visitor() { + (0, _classCallCheck3.default)(this, Visitor); + + this._visited = []; + this._map = {}; + } + + (0, _createClass3.default)(Visitor, [{ + key: 'visit', + value: function visit(val) { + /* Add 0 to distinguish stringify generated id from JsonViewer id. + * When used in web worker, they are not calling the same uniqId method, thus result may be repeated. + */ + var id = (0, _stringifyUtil.uniqId)('erudaJson0'); + + this._visited.push({ id: id, val: val, abstract: {} }); + this._map[id] = (0, _stringifyUtil.last)(this._visited); + + return id; + } + }, { + key: 'check', + value: function check(val) { + var visited = this._visited; + + for (var i = 0, len = visited.length; i < len; i++) { + if (val === visited[i].val) return visited[i]; + } + + return false; + } + }, { + key: 'update', + value: function update(id, data) { + (0, _stringifyUtil.extend)(this._map[id], data); + } + }, { + key: 'updateAbstract', + value: function updateAbstract(id, abstract) { + this.update(id, { abstract: abstract }); + } + }]); + return Visitor; +}(); + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _typeof2 = __webpack_require__(25); + +var _typeof3 = _interopRequireDefault(_typeof2); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _util = __webpack_require__(0); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var JsonViewer = function () { + function JsonViewer(data, $el) { + (0, _classCallCheck3.default)(this, JsonViewer); + + (0, _util.evalCss)(__webpack_require__(162)); + + this._data = [data]; + this._data.erudaId = (0, _util.uniqId)('erudaJson'); + this._$el = $el; + this._map = {}; + createMap(this._map, this._data); + + this._appendTpl(); + this._bindEvent(); + } + + (0, _createClass3.default)(JsonViewer, [{ + key: 'jsonToHtml', + value: function jsonToHtml(data, firstLevel) { + var ret = ''; + + for (var key in data) { + var val = data[key]; + + if (key === 'erudaObjAbstract' || key === 'erudaCircular' || key === 'erudaId' || key === 'erudaSplitArr' || (0, _util.isStr)(val) && (0, _util.startWith)(val, 'erudaJson')) continue; + + if (Object.hasOwnProperty.call(data, key)) ret += this.createEl(key, val, firstLevel); + } + + return ret; + } + }, { + key: 'createEl', + value: function createEl(key, val) { + var firstLevel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + var type = 'object', + isUnenumerable = false, + id = void 0; + + if (key === 'erudaProto') key = '__proto__'; + if ((0, _util.startWith)(key, 'erudaUnenumerable')) { + key = (0, _util.trim)(key.replace('erudaUnenumerable', '')); + isUnenumerable = true; + } + + if ((0, _util.isArr)(val)) type = 'array'; + + function wrapKey(key) { + if (firstLevel) return ''; + if ((0, _util.isObj)(val) && val.erudaSplitArr) return ''; + + var keyClass = 'eruda-key'; + if (isUnenumerable || (0, _util.contain)(LIGHTER_KEY, key)) keyClass = 'eruda-key-lighter'; + + return '' + encode(key) + ': '; + } + + if (val === null) { + return '
  • \n ' + wrapKey(key) + '\n null\n
  • '; + } + + if ((0, _util.isObj)(val)) { + id = val.erudaId; + var circularId = val.erudaCircular; + var objAbstract = val['erudaObjAbstract'] || (0, _util.upperFirst)(type); + + var obj = '
  • \n \n ' + wrapKey(key) + '\n ' + (firstLevel ? '' : objAbstract) + '\n
      '; + + if (firstLevel) obj += this.jsonToHtml(this._map[id]); + + return obj + '
  • '; + } + if ((0, _util.isNum)(val) || (0, _util.isBool)(val)) { + return '
  • \n ' + wrapKey(key) + '\n ' + encode(val) + '\n
  • '; + } + if ((0, _util.isStr)(val) && (0, _util.startWith)(val, 'function')) { + return '
  • \n ' + wrapKey(key) + '\n ' + encode(val).replace('function', '') + '\n
  • '; + } + if (val === 'undefined' || val === 'Symbol' || val === '(...)') { + return '
  • \n ' + wrapKey(key) + '\n ' + val + '\n
  • '; + } + + return '
  • \n ' + wrapKey(key) + '\n "' + encode(val) + '"\n
  • '; + } + }, { + key: '_appendTpl', + value: function _appendTpl() { + var data = this._map[this._data.erudaId]; + + this._$el.html(this.jsonToHtml(data, true)); + } + }, { + key: '_bindEvent', + value: function _bindEvent() { + var map = this._map; + + var self = this; + + this._$el.on('click', 'li', function (e) { + var $this = (0, _util.$)(this), + circularId = $this.data('object-id'), + $firstSpan = (0, _util.$)(this).find('span').eq(0); + + if ($this.data('first-level')) return; + if (circularId) { + $this.find('ul').html(self.jsonToHtml(map[circularId], false)); + $this.rmAttr('data-object-id'); + } + + e.stopImmediatePropagation(); + + if (!$firstSpan.hasClass('eruda-expanded')) return; + + var $ul = $this.find('ul').eq(0); + if ($firstSpan.hasClass('eruda-collapsed')) { + $firstSpan.rmClass('eruda-collapsed'); + $ul.show(); + } else { + $firstSpan.addClass('eruda-collapsed'); + $ul.hide(); + } + }); + } + }]); + return JsonViewer; +}(); + +exports.default = JsonViewer; + + +function createMap(map, data) { + var id = void 0; + + if (data.erudaId) { + id = data.erudaId; + } else { + id = (0, _util.uniqId)('erudaJson'); + data.erudaId = id; + } + + if (id) { + var objAbstract = data.erudaObjAbstract; + + var _isArr = objAbstract && (0, _util.startWith)(objAbstract, 'Array'); + if (_isArr) { + var arr = objToArr(data); + if (arr.length > 100) data = splitBigArr(objToArr(data), id); + } + map[id] = data; + } + + for (var key in data) { + var val = data[key]; + if ((0, _util.isObj)(val)) createMap(map, val); + } +} + +function splitBigArr(val, id) { + var ret = (0, _util.chunk)(val, 100); + var idx = 0; + ret = (0, _util.map)(ret, function (val) { + var obj = {}; + var startIdx = idx; + obj.erudaObjAbstract = '[' + startIdx; + (0, _util.each)(val, function (val) { + obj[idx] = val; + idx += 1; + }); + var endIdx = idx - 1; + obj.erudaObjAbstract += (endIdx - startIdx > 0 ? ' … ' + endIdx : '') + ']'; + obj.erudaId = (0, _util.uniqId)('erudaJson'); + obj.erudaSplitArr = true; + return obj; + }); + (0, _util.each)(val.erudaStrKeys, function (val, key) { + return ret[key] = val; + }); + ret.erudaId = id; + + return ret; +} + +function objToArr(val) { + var ret = []; + + var strKeys = {}; + + (0, _util.each)(val, function (val, key) { + var idx = (0, _util.toNum)(key); + if (!(0, _util.isNaN)(idx)) { + ret[idx] = val; + } else { + strKeys[key] = val; + } + }); + + ret['erudaStrKeys'] = strKeys; + + return ret; +} + +var LIGHTER_KEY = ['__proto__']; + +var encode = function encode(str) { + return (0, _util.escape)((0, _util.toStr)(str)); +}; + +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getType = getType; +exports.lenToUtf8Bytes = lenToUtf8Bytes; + +var _util = __webpack_require__(0); + +function getType(contentType) { + if (!contentType) return 'unknown'; + + var type = contentType.split(';')[0].split('/'); + + return { + type: type[0], + subType: (0, _util.last)(type) + }; +} + +function lenToUtf8Bytes(str) { + var m = encodeURIComponent(str).match(/%[89ABab]/g); + + return str.length + (m ? m.length : 0); +} + +/***/ }), +/* 79 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _assign = __webpack_require__(37); + +var _assign2 = _interopRequireDefault(_assign); + +var _EntryBtn = __webpack_require__(87); + +var _EntryBtn2 = _interopRequireDefault(_EntryBtn); + +var _DevTools = __webpack_require__(141); + +var _DevTools2 = _interopRequireDefault(_DevTools); + +var _Tool = __webpack_require__(9); + +var _Tool2 = _interopRequireDefault(_Tool); + +var _Console = __webpack_require__(146); + +var _Console2 = _interopRequireDefault(_Console); + +var _Network = __webpack_require__(170); + +var _Network2 = _interopRequireDefault(_Network); + +var _Elements = __webpack_require__(175); + +var _Elements2 = _interopRequireDefault(_Elements); + +var _Snippets = __webpack_require__(185); + +var _Snippets2 = _interopRequireDefault(_Snippets); + +var _Resources = __webpack_require__(189); + +var _Resources2 = _interopRequireDefault(_Resources); + +var _Info = __webpack_require__(192); + +var _Info2 = _interopRequireDefault(_Info); + +var _Sources = __webpack_require__(196); + +var _Sources2 = _interopRequireDefault(_Sources); + +var _Settings = __webpack_require__(13); + +var _Settings2 = _interopRequireDefault(_Settings); + +var _emitter = __webpack_require__(27); + +var _emitter2 = _interopRequireDefault(_emitter); + +var _config = __webpack_require__(204); + +var _config2 = _interopRequireDefault(_config); + +var _logger = __webpack_require__(36); + +var _logger2 = _interopRequireDefault(_logger); + +var _extraUtil = __webpack_require__(206); + +var _extraUtil2 = _interopRequireDefault(_extraUtil); + +var _util = __webpack_require__(0); + +var _util2 = _interopRequireDefault(_util); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = { + init: function init() { + var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + container = _ref.container, + tool = _ref.tool, + _ref$autoScale = _ref.autoScale, + autoScale = _ref$autoScale === undefined ? true : _ref$autoScale; + + this._isInit = true; + this._scale = 1; + + this._initContainer(container); + this._initStyle(); + this._initDevTools(); + this._initEntryBtn(); + this._initSettings(); + this._initTools(tool); + this._registerListener(); + + if (autoScale) this._autoScale(); + }, + + _isInit: false, + version: "1.4.3", + config: _config2.default, util: _util2.default, + Tool: _Tool2.default, Console: _Console2.default, Elements: _Elements2.default, Network: _Network2.default, Sources: _Sources2.default, Resources: _Resources2.default, Info: _Info2.default, Snippets: _Snippets2.default, + get: function get(name) { + if (!this._checkInit()) return; + + var devTools = this._devTools; + + return name ? devTools.get(name) : devTools; + }, + add: function add(tool) { + if (!this._checkInit()) return; + + if ((0, _util.isFn)(tool)) tool = tool(this); + + this._devTools.add(tool); + + return this; + }, + remove: function remove(name) { + this._devTools.remove(name); + + return this; + }, + show: function show(name) { + if (!this._checkInit()) return; + + var devTools = this._devTools; + + name ? devTools.showTool(name) : devTools.show(); + + return this; + }, + hide: function hide() { + if (!this._checkInit()) return; + + this._devTools.hide(); + + return this; + }, + destroy: function destroy() { + this._devTools.destroy(); + delete this._devTools; + this._entryBtn.destroy(); + delete this._entryBtn; + this._unregisterListener(); + this._$el.remove(); + _util.evalCss.clear(); + }, + scale: function scale(s) { + if ((0, _util.isNum)(s)) { + this._scale = s; + _emitter2.default.emit(_emitter2.default.SCALE, s); + return this; + } + + return this._scale; + }, + _autoScale: function _autoScale() { + if (!(0, _util.isMobile)()) return; + + this.scale(1 / (0, _util.viewportScale)()); + }, + _registerListener: function _registerListener() { + var _this = this; + + this._addListener = function () { + return _this.add.apply(_this, arguments); + }; + this._showListener = function () { + return _this.show.apply(_this, arguments); + }; + + _emitter2.default.on(_emitter2.default.ADD, this._addListener); + _emitter2.default.on(_emitter2.default.SHOW, this._showListener); + _emitter2.default.on(_emitter2.default.SCALE, _util.evalCss.setScale); + }, + _unregisterListener: function _unregisterListener() { + _emitter2.default.off(_emitter2.default.ADD, this._addListener); + _emitter2.default.off(_emitter2.default.SHOW, this._showListener); + _emitter2.default.off(_emitter2.default.SCALE, _util.evalCss.setScale); + }, + _checkInit: function _checkInit() { + if (!this._isInit) _logger2.default.error('Please call "eruda.init()" first'); + return this._isInit; + }, + _initContainer: function _initContainer(el) { + if (!el) { + el = document.createElement('div'); + document.documentElement.appendChild(el); + } + + (0, _assign2.default)(el, { + id: 'eruda', + className: 'eruda-container', + contentEditable: false + }); + + // http://stackoverflow.com/questions/3885018/active-pseudo-class-doesnt-work-in-mobile-safari + if ((0, _util.detectBrowser)().name === 'ios') el.setAttribute('ontouchstart', ''); + + this._$el = (0, _util.$)(el); + }, + _initDevTools: function _initDevTools() { + this._devTools = new _DevTools2.default(this._$el); + }, + _initStyle: function _initStyle() { + var className = 'eruda-style-container', + $el = this._$el; + + $el.append('
    '); + + _util.evalCss.container = $el.find('.' + className).get(0); + (0, _util.evalCss)(__webpack_require__(207) + __webpack_require__(208) + __webpack_require__(209)); + }, + _initEntryBtn: function _initEntryBtn() { + var _this2 = this; + + this._entryBtn = new _EntryBtn2.default(this._$el); + this._entryBtn.on('click', function () { + return _this2._devTools.toggle(); + }); + }, + _initSettings: function _initSettings() { + var devTools = this._devTools, + settings = new _Settings2.default(); + + devTools.add(settings); + + this._entryBtn.initCfg(settings); + devTools.initCfg(settings); + }, + _initTools: function _initTools() { + var _this3 = this; + + var tool = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['console', 'elements', 'network', 'resources', 'sources', 'info', 'snippets']; + + tool = (0, _util.toArr)(tool).reverse(); + + var devTools = this._devTools; + + tool.forEach(function (name) { + var Tool = _this3[(0, _util.upperFirst)(name)]; + try { + if (Tool) devTools.add(new Tool()); + } catch (e) { + // Use nextTick to make sure it is possible to be caught by console panel. + (0, _util.nextTick)(function () { + _logger2.default.error('Something wrong when initializing tool ' + name + ':', e.message); + }); + } + }); + + devTools.showTool((0, _util.last)(tool) || 'settings'); + } +}; + +(0, _extraUtil2.default)(_util2.default); + +//# sourceMappingURL=index.js.map + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(81); +module.exports = __webpack_require__(5).Object.assign; + + +/***/ }), +/* 81 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.1 Object.assign(target, source) +var $export = __webpack_require__(12); + +$export($export.S + $export.F, 'Object', { assign: __webpack_require__(83) }); + + +/***/ }), +/* 82 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; + + +/***/ }), +/* 83 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.2.1 Object.assign(target, source, ...) +var getKeys = __webpack_require__(23); +var gOPS = __webpack_require__(46); +var pIE = __webpack_require__(31); +var toObject = __webpack_require__(32); +var IObject = __webpack_require__(62); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__(22)(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; + } return T; +} : $assign; + + +/***/ }), +/* 84 */ +/***/ (function(module, exports, __webpack_require__) { + +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(19); +var toLength = __webpack_require__(85); +var toAbsoluteIndex = __webpack_require__(86); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + + +/***/ }), +/* 85 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.15 ToLength +var toInteger = __webpack_require__(42); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + + +/***/ }), +/* 86 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(42); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; + + +/***/ }), +/* 87 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(7); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(8); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _draggabilly = __webpack_require__(114); + +var _draggabilly2 = _interopRequireDefault(_draggabilly); + +var _emitter = __webpack_require__(27); + +var _emitter2 = _interopRequireDefault(_emitter); + +var _Settings = __webpack_require__(13); + +var _Settings2 = _interopRequireDefault(_Settings); + +var _util = __webpack_require__(0); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var EntryBtn = function (_Emitter) { + (0, _inherits3.default)(EntryBtn, _Emitter); + + function EntryBtn($container) { + (0, _classCallCheck3.default)(this, EntryBtn); + + var _this = (0, _possibleConstructorReturn3.default)(this, (EntryBtn.__proto__ || (0, _getPrototypeOf2.default)(EntryBtn)).call(this)); + + _this._style = (0, _util.evalCss)(__webpack_require__(139)); + + _this._$container = $container; + _this._appendTpl(); + _this._makeDraggable(); + _this._bindEvent(); + _this._registerListener(); + return _this; + } + + (0, _createClass3.default)(EntryBtn, [{ + key: 'hide', + value: function hide() { + this._$el.hide(); + } + }, { + key: 'show', + value: function show() { + this._$el.show(); + } + }, { + key: 'destroy', + value: function destroy() { + _util.evalCss.remove(this._style); + this._unregisterListener(); + this._$el.remove(); + } + }, { + key: '_isOutOfRange', + value: function _isOutOfRange() { + var cfg = this.config, + pos = cfg.get('pos'), + defPos = this._getDefPos(); + + return pos.x > defPos.x + 10 || pos.x < 0 || pos.y < 0 || pos.y > defPos.y + 10; + } + }, { + key: '_registerListener', + value: function _registerListener() { + var _this2 = this; + + this._scaleListener = function () { + return (0, _util.nextTick)(function () { + if (_this2._isOutOfRange()) _this2._setPos(); + }); + }; + _emitter2.default.on(_emitter2.default.SCALE, this._scaleListener); + } + }, { + key: '_unregisterListener', + value: function _unregisterListener() { + _emitter2.default.off(_emitter2.default.SCALE, this._scaleListener); + } + }, { + key: '_appendTpl', + value: function _appendTpl() { + var $container = this._$container; + + $container.append(__webpack_require__(140)()); + this._$el = $container.find('.eruda-entry-btn'); + } + }, { + key: '_setPos', + value: function _setPos(orientationChanged) { + var cfg = this.config, + pos = cfg.get('pos'), + defPos = this._getDefPos(); + + if (this._isOutOfRange() || !cfg.get('rememberPos') || orientationChanged) pos = defPos; + + this._$el.css({ + left: pos.x, + top: pos.y + }); + + cfg.set('pos', pos); + } + }, { + key: '_bindEvent', + value: function _bindEvent() { + var _this3 = this; + + var draggabilly = this._draggabilly, + $el = this._$el; + + draggabilly.on('staticClick', function () { + return _this3.emit('click'); + }).on('dragStart', function () { + return $el.addClass('eruda-active'); + }); + + draggabilly.on('dragEnd', function () { + var cfg = _this3.config; + + if (cfg.get('rememberPos')) { + cfg.set('pos', { + x: (0, _util.pxToNum)(_this3._$el.css('left')), + y: (0, _util.pxToNum)(_this3._$el.css('top')) + }); + } + + $el.rmClass('eruda-active'); + }); + + _util.orientation.on('change', function () { + return _this3._setPos(true); + }); + window.addEventListener('resize', function () { + return _this3._setPos(); + }); + } + }, { + key: '_makeDraggable', + value: function _makeDraggable() { + this._draggabilly = new _draggabilly2.default(this._$el.get(0), { containment: true }); + } + }, { + key: 'initCfg', + value: function initCfg(settings) { + var cfg = this.config = _Settings2.default.createCfg('home-button', { + rememberPos: true, + pos: this._getDefPos() + }); + + settings.separator().switch(cfg, 'rememberPos', 'Remember Entry Button Position'); + + this._setPos(); + } + }, { + key: '_getDefPos', + value: function _getDefPos() { + var minWidth = this._$el.get(0).offsetWidth + 10; + + return { + x: window.innerWidth - minWidth, + y: window.innerHeight - minWidth + }; + } + }]); + return EntryBtn; +}(_util.Emitter); + +exports.default = EntryBtn; + +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(89); +module.exports = __webpack_require__(5).Object.getPrototypeOf; + + +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = __webpack_require__(32); +var $getPrototypeOf = __webpack_require__(63); + +__webpack_require__(24)('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); + + +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(91); +var $Object = __webpack_require__(5).Object; +module.exports = function defineProperty(it, key, desc) { + return $Object.defineProperty(it, key, desc); +}; + + +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(12); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !__webpack_require__(17), 'Object', { defineProperty: __webpack_require__(15).f }); + + +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(93), __esModule: true }; + +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(47); +__webpack_require__(51); +module.exports = __webpack_require__(52).f('iterator'); + + +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(42); +var defined = __webpack_require__(41); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; + + +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var create = __webpack_require__(49); +var descriptor = __webpack_require__(28); +var setToStringTag = __webpack_require__(50); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(20)(IteratorPrototype, __webpack_require__(11)('iterator'), function () { return this; }); + +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; + + +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(15); +var anObject = __webpack_require__(21); +var getKeys = __webpack_require__(23); + +module.exports = __webpack_require__(17) ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; + + +/***/ }), +/* 97 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var addToUnscopables = __webpack_require__(98); +var step = __webpack_require__(99); +var Iterators = __webpack_require__(26); +var toIObject = __webpack_require__(19); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = __webpack_require__(65)(Array, 'Array', function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + + +/***/ }), +/* 98 */ +/***/ (function(module, exports) { + +module.exports = function () { /* empty */ }; + + +/***/ }), +/* 99 */ +/***/ (function(module, exports) { + +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + + +/***/ }), +/* 100 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(101), __esModule: true }; + +/***/ }), +/* 101 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(102); +__webpack_require__(105); +__webpack_require__(106); +__webpack_require__(107); +module.exports = __webpack_require__(5).Symbol; + + +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// ECMAScript 6 symbols shim +var global = __webpack_require__(10); +var has = __webpack_require__(18); +var DESCRIPTORS = __webpack_require__(17); +var $export = __webpack_require__(12); +var redefine = __webpack_require__(66); +var META = __webpack_require__(68).KEY; +var $fails = __webpack_require__(22); +var shared = __webpack_require__(44); +var setToStringTag = __webpack_require__(50); +var uid = __webpack_require__(30); +var wks = __webpack_require__(11); +var wksExt = __webpack_require__(52); +var wksDefine = __webpack_require__(53); +var enumKeys = __webpack_require__(103); +var isArray = __webpack_require__(104); +var anObject = __webpack_require__(21); +var isObject = __webpack_require__(16); +var toIObject = __webpack_require__(19); +var toPrimitive = __webpack_require__(40); +var createDesc = __webpack_require__(28); +var _create = __webpack_require__(49); +var gOPNExt = __webpack_require__(69); +var $GOPD = __webpack_require__(54); +var $DP = __webpack_require__(15); +var $keys = __webpack_require__(23); +var gOPD = $GOPD.f; +var dP = $DP.f; +var gOPN = gOPNExt.f; +var $Symbol = global.Symbol; +var $JSON = global.JSON; +var _stringify = $JSON && $JSON.stringify; +var PROTOTYPE = 'prototype'; +var HIDDEN = wks('_hidden'); +var TO_PRIMITIVE = wks('toPrimitive'); +var isEnum = {}.propertyIsEnumerable; +var SymbolRegistry = shared('symbol-registry'); +var AllSymbols = shared('symbols'); +var OPSymbols = shared('op-symbols'); +var ObjectProto = Object[PROTOTYPE]; +var USE_NATIVE = typeof $Symbol == 'function'; +var QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function () { + return _create(dP({}, 'a', { + get: function () { return dP(this, 'a', { value: 7 }).a; } + })).a != 7; +}) ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); +} : dP; + +var wrap = function (tag) { + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys(P = toIObject(P)); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = toPrimitive(key, true)); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(70).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(31).f = $propertyIsEnumerable; + __webpack_require__(46).f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(48)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function (name) { + return wrap(wks(name)); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + +for (var es6Symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); + +for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { setter = true; }, + useSimple: function () { setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(20)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); + + +/***/ }), +/* 103 */ +/***/ (function(module, exports, __webpack_require__) { + +// all enumerable object keys, includes symbols +var getKeys = __webpack_require__(23); +var gOPS = __webpack_require__(46); +var pIE = __webpack_require__(31); +module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; +}; + + +/***/ }), +/* 104 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.2.2 IsArray(argument) +var cof = __webpack_require__(29); +module.exports = Array.isArray || function isArray(arg) { + return cof(arg) == 'Array'; +}; + + +/***/ }), +/* 105 */ +/***/ (function(module, exports) { + + + +/***/ }), +/* 106 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(53)('asyncIterator'); + + +/***/ }), +/* 107 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(53)('observable'); + + +/***/ }), +/* 108 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(109), __esModule: true }; + +/***/ }), +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(110); +module.exports = __webpack_require__(5).Object.setPrototypeOf; + + +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = __webpack_require__(12); +$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(111).set }); + + +/***/ }), +/* 111 */ +/***/ (function(module, exports, __webpack_require__) { + +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = __webpack_require__(16); +var anObject = __webpack_require__(21); +var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function (test, buggy, set) { + try { + set = __webpack_require__(38)(Function.call, __webpack_require__(54).f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { buggy = true; } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; + + +/***/ }), +/* 112 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(113); +var $Object = __webpack_require__(5).Object; +module.exports = function create(P, D) { + return $Object.create(P, D); +}; + + +/***/ }), +/* 113 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(12); +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', { create: __webpack_require__(49) }); + + +/***/ }), +/* 114 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! + * Draggabilly v2.1.1 + * Make that shiz draggable + * http://draggabilly.desandro.com + * MIT license + */ + +/*jshint browser: true, strict: true, undef: true, unused: true */ + +( function( window, factory ) { + // universal module definition + /* jshint strict: false */ /*globals define, module, require */ + if ( true ) { + // AMD + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ + __webpack_require__(115), + __webpack_require__(116) + ], __WEBPACK_AMD_DEFINE_RESULT__ = (function( getSize, Unidragger ) { + return factory( window, getSize, Unidragger ); + }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + window, + require('get-size'), + require('unidragger') + ); + } else { + // browser global + window.Draggabilly = factory( + window, + window.getSize, + window.Unidragger + ); + } + +}( window, function factory( window, getSize, Unidragger ) { + +'use strict'; + +// vars +var document = window.document; + +function noop() {} + +// -------------------------- helpers -------------------------- // + +// extend objects +function extend( a, b ) { + for ( var prop in b ) { + a[ prop ] = b[ prop ]; + } + return a; +} + +function isElement( obj ) { + return obj instanceof HTMLElement; +} + +// -------------------------- requestAnimationFrame -------------------------- // + +// get rAF, prefixed, if present +var requestAnimationFrame = window.requestAnimationFrame || + window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame; + +// fallback to setTimeout +var lastTime = 0; +if ( !requestAnimationFrame ) { + requestAnimationFrame = function( callback ) { + var currTime = new Date().getTime(); + var timeToCall = Math.max( 0, 16 - ( currTime - lastTime ) ); + var id = setTimeout( callback, timeToCall ); + lastTime = currTime + timeToCall; + return id; + }; +} + +// -------------------------- support -------------------------- // + +var docElem = document.documentElement; +var transformProperty = typeof docElem.style.transform == 'string' ? + 'transform' : 'WebkitTransform'; + +var jQuery = window.jQuery; + +// -------------------------- -------------------------- // + +function Draggabilly( element, options ) { + // querySelector if string + this.element = typeof element == 'string' ? + document.querySelector( element ) : element; + + if ( jQuery ) { + this.$element = jQuery( this.element ); + } + + // options + this.options = extend( {}, this.constructor.defaults ); + this.option( options ); + + this._create(); +} + +// inherit Unidragger methods +var proto = Draggabilly.prototype = Object.create( Unidragger.prototype ); + +Draggabilly.defaults = { +}; + +/** + * set options + * @param {Object} opts + */ +proto.option = function( opts ) { + extend( this.options, opts ); +}; + +// css position values that don't need to be set +var positionValues = { + relative: true, + absolute: true, + fixed: true +}; + +proto._create = function() { + + // properties + this.position = {}; + this._getPosition(); + + this.startPoint = { x: 0, y: 0 }; + this.dragPoint = { x: 0, y: 0 }; + + this.startPosition = extend( {}, this.position ); + + // set relative positioning + var style = getComputedStyle( this.element ); + if ( !positionValues[ style.position ] ) { + this.element.style.position = 'relative'; + } + + this.enable(); + this.setHandles(); + +}; + +/** + * set this.handles and bind start events to 'em + */ +proto.setHandles = function() { + this.handles = this.options.handle ? + this.element.querySelectorAll( this.options.handle ) : [ this.element ]; + + this.bindHandles(); +}; + +/** + * emits events via EvEmitter and jQuery events + * @param {String} type - name of event + * @param {Event} event - original event + * @param {Array} args - extra arguments + */ +proto.dispatchEvent = function( type, event, args ) { + var emitArgs = [ event ].concat( args ); + this.emitEvent( type, emitArgs ); + var jQuery = window.jQuery; + // trigger jQuery event + if ( jQuery && this.$element ) { + if ( event ) { + // create jQuery event + var $event = jQuery.Event( event ); + $event.type = type; + this.$element.trigger( $event, args ); + } else { + // just trigger with type if no event available + this.$element.trigger( type, args ); + } + } +}; + +// -------------------------- position -------------------------- // + +// get x/y position from style +proto._getPosition = function() { + var style = getComputedStyle( this.element ); + var x = this._getPositionCoord( style.left, 'width' ); + var y = this._getPositionCoord( style.top, 'height' ); + // clean up 'auto' or other non-integer values + this.position.x = isNaN( x ) ? 0 : x; + this.position.y = isNaN( y ) ? 0 : y; + + this._addTransformPosition( style ); +}; + +proto._getPositionCoord = function( styleSide, measure ) { + if ( styleSide.indexOf('%') != -1 ) { + // convert percent into pixel for Safari, #75 + var parentSize = getSize( this.element.parentNode ); + // prevent not-in-DOM element throwing bug, #131 + return !parentSize ? 0 : + ( parseFloat( styleSide ) / 100 ) * parentSize[ measure ]; + } + return parseInt( styleSide, 10 ); +}; + +// add transform: translate( x, y ) to position +proto._addTransformPosition = function( style ) { + var transform = style[ transformProperty ]; + // bail out if value is 'none' + if ( transform.indexOf('matrix') !== 0 ) { + return; + } + // split matrix(1, 0, 0, 1, x, y) + var matrixValues = transform.split(','); + // translate X value is in 12th or 4th position + var xIndex = transform.indexOf('matrix3d') === 0 ? 12 : 4; + var translateX = parseInt( matrixValues[ xIndex ], 10 ); + // translate Y value is in 13th or 5th position + var translateY = parseInt( matrixValues[ xIndex + 1 ], 10 ); + this.position.x += translateX; + this.position.y += translateY; +}; + +// -------------------------- events -------------------------- // + +/** + * pointer start + * @param {Event} event + * @param {Event or Touch} pointer + */ +proto.pointerDown = function( event, pointer ) { + this._dragPointerDown( event, pointer ); + // kludge to blur focused inputs in dragger + var focused = document.activeElement; + // do not blur body for IE10, metafizzy/flickity#117 + if ( focused && focused.blur && focused != document.body ) { + focused.blur(); + } + // bind move and end events + this._bindPostStartEvents( event ); + this.element.classList.add('is-pointer-down'); + this.dispatchEvent( 'pointerDown', event, [ pointer ] ); +}; + +/** + * drag move + * @param {Event} event + * @param {Event or Touch} pointer + */ +proto.pointerMove = function( event, pointer ) { + var moveVector = this._dragPointerMove( event, pointer ); + this.dispatchEvent( 'pointerMove', event, [ pointer, moveVector ] ); + this._dragMove( event, pointer, moveVector ); +}; + +/** + * drag start + * @param {Event} event + * @param {Event or Touch} pointer + */ +proto.dragStart = function( event, pointer ) { + if ( !this.isEnabled ) { + return; + } + this._getPosition(); + this.measureContainment(); + // position _when_ drag began + this.startPosition.x = this.position.x; + this.startPosition.y = this.position.y; + // reset left/top style + this.setLeftTop(); + + this.dragPoint.x = 0; + this.dragPoint.y = 0; + + this.element.classList.add('is-dragging'); + this.dispatchEvent( 'dragStart', event, [ pointer ] ); + // start animation + this.animate(); +}; + +proto.measureContainment = function() { + var containment = this.options.containment; + if ( !containment ) { + return; + } + + // use element if element + var container = isElement( containment ) ? containment : + // fallback to querySelector if string + typeof containment == 'string' ? document.querySelector( containment ) : + // otherwise just `true`, use the parent + this.element.parentNode; + + var elemSize = getSize( this.element ); + var containerSize = getSize( container ); + var elemRect = this.element.getBoundingClientRect(); + var containerRect = container.getBoundingClientRect(); + + var borderSizeX = containerSize.borderLeftWidth + containerSize.borderRightWidth; + var borderSizeY = containerSize.borderTopWidth + containerSize.borderBottomWidth; + + var position = this.relativeStartPosition = { + x: elemRect.left - ( containerRect.left + containerSize.borderLeftWidth ), + y: elemRect.top - ( containerRect.top + containerSize.borderTopWidth ) + }; + + this.containSize = { + width: ( containerSize.width - borderSizeX ) - position.x - elemSize.width, + height: ( containerSize.height - borderSizeY ) - position.y - elemSize.height + }; +}; + +// ----- move event ----- // + +/** + * drag move + * @param {Event} event + * @param {Event or Touch} pointer + */ +proto.dragMove = function( event, pointer, moveVector ) { + if ( !this.isEnabled ) { + return; + } + var dragX = moveVector.x; + var dragY = moveVector.y; + + var grid = this.options.grid; + var gridX = grid && grid[0]; + var gridY = grid && grid[1]; + + dragX = applyGrid( dragX, gridX ); + dragY = applyGrid( dragY, gridY ); + + dragX = this.containDrag( 'x', dragX, gridX ); + dragY = this.containDrag( 'y', dragY, gridY ); + + // constrain to axis + dragX = this.options.axis == 'y' ? 0 : dragX; + dragY = this.options.axis == 'x' ? 0 : dragY; + + this.position.x = this.startPosition.x + dragX; + this.position.y = this.startPosition.y + dragY; + // set dragPoint properties + this.dragPoint.x = dragX; + this.dragPoint.y = dragY; + + this.dispatchEvent( 'dragMove', event, [ pointer, moveVector ] ); +}; + +function applyGrid( value, grid, method ) { + method = method || 'round'; + return grid ? Math[ method ]( value / grid ) * grid : value; +} + +proto.containDrag = function( axis, drag, grid ) { + if ( !this.options.containment ) { + return drag; + } + var measure = axis == 'x' ? 'width' : 'height'; + + var rel = this.relativeStartPosition[ axis ]; + var min = applyGrid( -rel, grid, 'ceil' ); + var max = this.containSize[ measure ]; + max = applyGrid( max, grid, 'floor' ); + return Math.min( max, Math.max( min, drag ) ); +}; + +// ----- end event ----- // + +/** + * pointer up + * @param {Event} event + * @param {Event or Touch} pointer + */ +proto.pointerUp = function( event, pointer ) { + this.element.classList.remove('is-pointer-down'); + this.dispatchEvent( 'pointerUp', event, [ pointer ] ); + this._dragPointerUp( event, pointer ); +}; + +/** + * drag end + * @param {Event} event + * @param {Event or Touch} pointer + */ +proto.dragEnd = function( event, pointer ) { + if ( !this.isEnabled ) { + return; + } + // use top left position when complete + if ( transformProperty ) { + this.element.style[ transformProperty ] = ''; + this.setLeftTop(); + } + this.element.classList.remove('is-dragging'); + this.dispatchEvent( 'dragEnd', event, [ pointer ] ); +}; + +// -------------------------- animation -------------------------- // + +proto.animate = function() { + // only render and animate if dragging + if ( !this.isDragging ) { + return; + } + + this.positionDrag(); + + var _this = this; + requestAnimationFrame( function animateFrame() { + _this.animate(); + }); + +}; + +// left/top positioning +proto.setLeftTop = function() { + this.element.style.left = this.position.x + 'px'; + this.element.style.top = this.position.y + 'px'; +}; + +proto.positionDrag = function() { + this.element.style[ transformProperty ] = 'translate3d( ' + this.dragPoint.x + + 'px, ' + this.dragPoint.y + 'px, 0)'; +}; + +// ----- staticClick ----- // + +proto.staticClick = function( event, pointer ) { + this.dispatchEvent( 'staticClick', event, [ pointer ] ); +}; + +// ----- methods ----- // + +proto.enable = function() { + this.isEnabled = true; +}; + +proto.disable = function() { + this.isEnabled = false; + if ( this.isDragging ) { + this.dragEnd(); + } +}; + +proto.destroy = function() { + this.disable(); + // reset styles + this.element.style[ transformProperty ] = ''; + this.element.style.left = ''; + this.element.style.top = ''; + this.element.style.position = ''; + // unbind handles + this.unbindHandles(); + // remove jQuery data + if ( this.$element ) { + this.$element.removeData('draggabilly'); + } +}; + +// ----- jQuery bridget ----- // + +// required for jQuery bridget +proto._init = noop; + +if ( jQuery && jQuery.bridget ) { + jQuery.bridget( 'draggabilly', Draggabilly ); +} + +// ----- ----- // + +return Draggabilly; + +})); + + +/***/ }), +/* 115 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;/*! + * getSize v2.0.2 + * measure size of elements + * MIT license + */ + +/*jshint browser: true, strict: true, undef: true, unused: true */ +/*global define: false, module: false, console: false */ + +( function( window, factory ) { + 'use strict'; + + if ( true ) { + // AMD + !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { + return factory(); + }).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory(); + } else { + // browser global + window.getSize = factory(); + } + +})( window, function factory() { +'use strict'; + +// -------------------------- helpers -------------------------- // + +// get a number from a string, not a percentage +function getStyleSize( value ) { + var num = parseFloat( value ); + // not a percent like '100%', and a number + var isValid = value.indexOf('%') == -1 && !isNaN( num ); + return isValid && num; +} + +function noop() {} + +var logError = typeof console == 'undefined' ? noop : + function( message ) { + console.error( message ); + }; + +// -------------------------- measurements -------------------------- // + +var measurements = [ + 'paddingLeft', + 'paddingRight', + 'paddingTop', + 'paddingBottom', + 'marginLeft', + 'marginRight', + 'marginTop', + 'marginBottom', + 'borderLeftWidth', + 'borderRightWidth', + 'borderTopWidth', + 'borderBottomWidth' +]; + +var measurementsLength = measurements.length; + +function getZeroSize() { + var size = { + width: 0, + height: 0, + innerWidth: 0, + innerHeight: 0, + outerWidth: 0, + outerHeight: 0 + }; + for ( var i=0; i < measurementsLength; i++ ) { + var measurement = measurements[i]; + size[ measurement ] = 0; + } + return size; +} + +// -------------------------- getStyle -------------------------- // + +/** + * getStyle, get style of element, check for Firefox bug + * https://bugzilla.mozilla.org/show_bug.cgi?id=548397 + */ +function getStyle( elem ) { + var style = getComputedStyle( elem ); + if ( !style ) { + logError( 'Style returned ' + style + + '. Are you running this code in a hidden iframe on Firefox? ' + + 'See http://bit.ly/getsizebug1' ); + } + return style; +} + +// -------------------------- setup -------------------------- // + +var isSetup = false; + +var isBoxSizeOuter; + +/** + * setup + * check isBoxSizerOuter + * do on first getSize() rather than on page load for Firefox bug + */ +function setup() { + // setup once + if ( isSetup ) { + return; + } + isSetup = true; + + // -------------------------- box sizing -------------------------- // + + /** + * WebKit measures the outer-width on style.width on border-box elems + * IE & Firefox<29 measures the inner-width + */ + var div = document.createElement('div'); + div.style.width = '200px'; + div.style.padding = '1px 2px 3px 4px'; + div.style.borderStyle = 'solid'; + div.style.borderWidth = '1px 2px 3px 4px'; + div.style.boxSizing = 'border-box'; + + var body = document.body || document.documentElement; + body.appendChild( div ); + var style = getStyle( div ); + + getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize( style.width ) == 200; + body.removeChild( div ); + +} + +// -------------------------- getSize -------------------------- // + +function getSize( elem ) { + setup(); + + // use querySeletor if elem is string + if ( typeof elem == 'string' ) { + elem = document.querySelector( elem ); + } + + // do not proceed on non-objects + if ( !elem || typeof elem != 'object' || !elem.nodeType ) { + return; + } + + var style = getStyle( elem ); + + // if hidden, everything is 0 + if ( style.display == 'none' ) { + return getZeroSize(); + } + + var size = {}; + size.width = elem.offsetWidth; + size.height = elem.offsetHeight; + + var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box'; + + // get all measurements + for ( var i=0; i < measurementsLength; i++ ) { + var measurement = measurements[i]; + var value = style[ measurement ]; + var num = parseFloat( value ); + // any 'auto', 'medium' value will be 0 + size[ measurement ] = !isNaN( num ) ? num : 0; + } + + var paddingWidth = size.paddingLeft + size.paddingRight; + var paddingHeight = size.paddingTop + size.paddingBottom; + var marginWidth = size.marginLeft + size.marginRight; + var marginHeight = size.marginTop + size.marginBottom; + var borderWidth = size.borderLeftWidth + size.borderRightWidth; + var borderHeight = size.borderTopWidth + size.borderBottomWidth; + + var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter; + + // overwrite width and height if we can get it from style + var styleWidth = getStyleSize( style.width ); + if ( styleWidth !== false ) { + size.width = styleWidth + + // add padding and border unless it's already including it + ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth ); + } + + var styleHeight = getStyleSize( style.height ); + if ( styleHeight !== false ) { + size.height = styleHeight + + // add padding and border unless it's already including it + ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight ); + } + + size.innerWidth = size.width - ( paddingWidth + borderWidth ); + size.innerHeight = size.height - ( paddingHeight + borderHeight ); + + size.outerWidth = size.width + marginWidth; + size.outerHeight = size.height + marginHeight; + + return size; +} + +return getSize; + +}); + + +/***/ }), +/* 116 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! + * Unidragger v2.1.0 + * Draggable base class + * MIT license + */ + +/*jshint browser: true, unused: true, undef: true, strict: true */ + +( function( window, factory ) { + // universal module definition + /*jshint strict: false */ /*globals define, module, require */ + + if ( true ) { + // AMD + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ + __webpack_require__(117) + ], __WEBPACK_AMD_DEFINE_RESULT__ = (function( Unipointer ) { + return factory( window, Unipointer ); + }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + window, + require('unipointer') + ); + } else { + // browser global + window.Unidragger = factory( + window, + window.Unipointer + ); + } + +}( window, function factory( window, Unipointer ) { + +'use strict'; + +// ----- ----- // + +function noop() {} + +// -------------------------- Unidragger -------------------------- // + +function Unidragger() {} + +// inherit Unipointer & EvEmitter +var proto = Unidragger.prototype = Object.create( Unipointer.prototype ); + +// ----- bind start ----- // + +proto.bindHandles = function() { + this._bindHandles( true ); +}; + +proto.unbindHandles = function() { + this._bindHandles( false ); +}; + +var navigator = window.navigator; +/** + * works as unbinder, as you can .bindHandles( false ) to unbind + * @param {Boolean} isBind - will unbind if falsey + */ +proto._bindHandles = function( isBind ) { + // munge isBind, default to true + isBind = isBind === undefined ? true : !!isBind; + // extra bind logic + var binderExtra; + if ( navigator.pointerEnabled ) { + binderExtra = function( handle ) { + // disable scrolling on the element + handle.style.touchAction = isBind ? 'none' : ''; + }; + } else if ( navigator.msPointerEnabled ) { + binderExtra = function( handle ) { + // disable scrolling on the element + handle.style.msTouchAction = isBind ? 'none' : ''; + }; + } else { + binderExtra = noop; + } + // bind each handle + var bindMethod = isBind ? 'addEventListener' : 'removeEventListener'; + for ( var i=0; i < this.handles.length; i++ ) { + var handle = this.handles[i]; + this._bindStartEvent( handle, isBind ); + binderExtra( handle ); + handle[ bindMethod ]( 'click', this ); + } +}; + +// ----- start event ----- // + +/** + * pointer start + * @param {Event} event + * @param {Event or Touch} pointer + */ +proto.pointerDown = function( event, pointer ) { + // dismiss range sliders + if ( event.target.nodeName == 'INPUT' && event.target.type == 'range' ) { + // reset pointerDown logic + this.isPointerDown = false; + delete this.pointerIdentifier; + return; + } + + this._dragPointerDown( event, pointer ); + // kludge to blur focused inputs in dragger + var focused = document.activeElement; + if ( focused && focused.blur ) { + focused.blur(); + } + // bind move and end events + this._bindPostStartEvents( event ); + this.emitEvent( 'pointerDown', [ event, pointer ] ); +}; + +// base pointer down logic +proto._dragPointerDown = function( event, pointer ) { + // track to see when dragging starts + this.pointerDownPoint = Unipointer.getPointerPoint( pointer ); + + var canPreventDefault = this.canPreventDefaultOnPointerDown( event, pointer ); + if ( canPreventDefault ) { + event.preventDefault(); + } +}; + +// overwriteable method so Flickity can prevent for scrolling +proto.canPreventDefaultOnPointerDown = function( event ) { + // prevent default, unless touchstart or s and \r\n\r\n"; +},"useData":true}); + +/***/ }), +/* 170 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(7); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _get2 = __webpack_require__(14); + +var _get3 = _interopRequireDefault(_get2); + +var _inherits2 = __webpack_require__(8); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _Tool2 = __webpack_require__(9); + +var _Tool3 = _interopRequireDefault(_Tool2); + +var _XhrRequest = __webpack_require__(171); + +var _XhrRequest2 = _interopRequireDefault(_XhrRequest); + +var _FetchRequest = __webpack_require__(172); + +var _FetchRequest2 = _interopRequireDefault(_FetchRequest); + +var _Settings = __webpack_require__(13); + +var _Settings2 = _interopRequireDefault(_Settings); + +var _util = __webpack_require__(0); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Network = function (_Tool) { + (0, _inherits3.default)(Network, _Tool); + + function Network() { + (0, _classCallCheck3.default)(this, Network); + + var _this = (0, _possibleConstructorReturn3.default)(this, (Network.__proto__ || (0, _getPrototypeOf2.default)(Network)).call(this)); + + _this._style = (0, _util.evalCss)(__webpack_require__(173)); + + _this.name = 'network'; + _this._requests = {}; + _this._tpl = __webpack_require__(174); + _this._isFetchSupported = false; + if (window.fetch) _this._isFetchSupported = (0, _util.isNative)(window.fetch); + return _this; + } + + (0, _createClass3.default)(Network, [{ + key: 'init', + value: function init($el, container) { + (0, _get3.default)(Network.prototype.__proto__ || (0, _getPrototypeOf2.default)(Network.prototype), 'init', this).call(this, $el); + + this._container = container; + this._bindEvent(); + this._initCfg(); + this.overrideXhr(); + } + }, { + key: 'show', + value: function show() { + (0, _get3.default)(Network.prototype.__proto__ || (0, _getPrototypeOf2.default)(Network.prototype), 'show', this).call(this); + + this._render(); + } + }, { + key: 'clear', + value: function clear() { + this._requests = {}; + this._render(); + } + }, { + key: 'overrideXhr', + value: function overrideXhr() { + var winXhrProto = window.XMLHttpRequest.prototype; + + var origSend = this._origSend = winXhrProto.send, + origOpen = this._origOpen = winXhrProto.open; + + var self = this; + + winXhrProto.open = function (method, url) { + var xhr = this; + + var req = xhr.erudaRequest = new _XhrRequest2.default(xhr, method, url); + + req.on('send', function (id, data) { + return self._addReq(id, data); + }); + req.on('update', function (id, data) { + return self._updateReq(id, data); + }); + + xhr.addEventListener('readystatechange', function () { + switch (xhr.readyState) { + case 2: + return req.handleHeadersReceived(); + case 4: + return req.handleDone(); + } + }); + + origOpen.apply(this, arguments); + }; + + winXhrProto.send = function (data) { + var req = this.erudaRequest; + if (req) req.handleSend(data); + + origSend.apply(this, arguments); + }; + } + }, { + key: 'restoreXhr', + value: function restoreXhr() { + var winXhrProto = window.XMLHttpRequest.prototype; + + if (this._origOpen) winXhrProto.open = this._origOpen; + if (this._origSend) winXhrProto.send = this._origSend; + } + }, { + key: 'overrideFetch', + value: function overrideFetch() { + if (!this._isFetchSupported) return; + + var origFetch = this._origFetch = window.fetch; + + var self = this; + + window.fetch = function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + var req = new (Function.prototype.bind.apply(_FetchRequest2.default, [null].concat(args)))(); + req.on('send', function (id, data) { + return self._addReq(id, data); + }); + req.on('update', function (id, data) { + return self._updateReq(id, data); + }); + + var fetchResult = origFetch.apply(undefined, args); + req.send(fetchResult); + + return fetchResult; + }; + } + }, { + key: 'restoreFetch', + value: function restoreFetch() { + if (!this._isFetchSupported) return; + + if (this._origFetch) window.fetch = this._origFetch; + } + }, { + key: '_addReq', + value: function _addReq(id, data) { + (0, _util.defaults)(data, { + name: '', + url: '', + status: 'pending', + type: 'unknown', + subType: 'unknown', + size: 0, + data: '', + method: 'GET', + startTime: (0, _util.now)(), + time: 0, + resHeaders: {}, + resTxt: '', + done: false + }); + + this._requests[id] = data; + + this._render(); + } + }, { + key: '_updateReq', + value: function _updateReq(id, data) { + var target = this._requests[id]; + + if (!target) return; + + (0, _util.extend)(target, data); + + target.time = target.time - target.startTime; + target.displayTime = formatTime(target.time); + + if (target.done && (target.status < 200 || target >= 300)) target.hasErr = true; + + this._render(); + } + }, { + key: '_bindEvent', + value: function _bindEvent() { + var _this2 = this; + + var $el = this._$el, + container = this._container; + + var self = this; + + $el.on('click', '.eruda-request', function () { + var id = (0, _util.$)(this).data('id'), + data = self._requests[id]; + + if (!data.done) return; + + showSources('http', { + url: data.url, + data: data.data, + resTxt: data.resTxt, + type: data.type, + subType: data.subType, + resHeaders: data.resHeaders + }); + }).on('click', '.eruda-clear-request', function () { + return _this2.clear(); + }); + + function showSources(type, data) { + var sources = container.get('sources'); + if (!sources) return; + + sources.set(type, data); + + container.showTool('sources'); + } + } + }, { + key: 'destroy', + value: function destroy() { + (0, _get3.default)(Network.prototype.__proto__ || (0, _getPrototypeOf2.default)(Network.prototype), 'destroy', this).call(this); + + _util.evalCss.remove(this._style); + this.restoreXhr(); + this.restoreFetch(); + } + }, { + key: '_initCfg', + value: function _initCfg() { + var _this3 = this; + + var cfg = this.config = _Settings2.default.createCfg('network', { + overrideFetch: true + }); + + if (cfg.get('overrideFetch')) this.overrideFetch(); + + cfg.on('change', function (key, val) { + switch (key) { + case 'overrideFetch': + return val ? _this3.overrideFetch() : _this3.restoreFetch(); + } + }); + + var settings = this._container.get('settings'); + settings.text('Network').switch(cfg, 'overrideFetch', 'Catch Fetch Requests').separator(); + } + }, { + key: '_render', + value: function _render() { + if (!this.active) return; + + var renderData = {}; + + if (!(0, _util.isEmpty)(this._requests)) renderData.requests = this._requests; + + this._renderHtml(this._tpl(renderData)); + } + }, { + key: '_renderHtml', + value: function _renderHtml(html) { + if (html === this._lastHtml) return; + this._lastHtml = html; + this._$el.html(html); + } + }]); + return Network; +}(_Tool3.default); + +exports.default = Network; + + +function formatTime(time) { + time = Math.round(time); + + if (time < 1000) return time + 'ms'; + + return (time / 1000).toFixed(1) + 's'; +} + +/***/ }), +/* 171 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _slicedToArray2 = __webpack_require__(73); + +var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(7); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(8); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _util = __webpack_require__(78); + +var _util2 = __webpack_require__(0); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var XhrRequest = function (_Emitter) { + (0, _inherits3.default)(XhrRequest, _Emitter); + + function XhrRequest(xhr, method, url) { + (0, _classCallCheck3.default)(this, XhrRequest); + + var _this = (0, _possibleConstructorReturn3.default)(this, (XhrRequest.__proto__ || (0, _getPrototypeOf2.default)(XhrRequest)).call(this)); + + _this._xhr = xhr; + _this._method = method; + _this._url = (0, _util2.fullUrl)(url); + _this._id = (0, _util2.uniqId)('request'); + return _this; + } + + (0, _createClass3.default)(XhrRequest, [{ + key: 'handleSend', + value: function handleSend(data) { + if (!(0, _util2.isStr)(data)) data = ''; + + this.emit('send', this._id, { + name: (0, _util2.getFileName)(this._url), + url: this._url, + data: data, + method: this._method + }); + } + }, { + key: 'handleHeadersReceived', + value: function handleHeadersReceived() { + var xhr = this._xhr; + + var type = (0, _util.getType)(xhr.getResponseHeader('Content-Type')); + + this.emit('update', this._id, { + type: type.type, + subType: type.subType, + size: getSize(xhr, true, this._url), + time: (0, _util2.now)(), + resHeaders: getHeaders(xhr) + }); + } + }, { + key: 'handleDone', + value: function handleDone() { + var xhr = this._xhr, + resType = xhr.responseType; + + var resTxt = resType === '' || resType === 'text' || resType === 'json' ? xhr.responseText : ''; + + this.emit('update', this._id, { + status: xhr.status, + done: true, + size: getSize(xhr, false, this._url), + time: (0, _util2.now)(), + resTxt: resTxt + }); + } + }]); + return XhrRequest; +}(_util2.Emitter); + +exports.default = XhrRequest; + + +function getHeaders(xhr) { + var raw = xhr.getAllResponseHeaders(), + lines = raw.split('\n'); + + var ret = {}; + + (0, _util2.each)(lines, function (line) { + line = (0, _util2.trim)(line); + + if (line === '') return; + + var _line$split = line.split(':', 2), + _line$split2 = (0, _slicedToArray3.default)(_line$split, 2), + key = _line$split2[0], + val = _line$split2[1]; + + ret[key] = (0, _util2.trim)(val); + }); + + return ret; +} + +function getSize(xhr, headersOnly, url) { + var size = 0; + + function getStrSize() { + if (!headersOnly) { + var resType = xhr.responseType; + var resTxt = resType === '' || resType === 'text' || resType === 'json' ? xhr.responseText : ''; + if (resTxt) size = (0, _util.lenToUtf8Bytes)(resTxt); + } + } + + if ((0, _util2.isCrossOrig)(url)) { + getStrSize(); + } else { + try { + size = (0, _util2.toNum)(xhr.getResponseHeader('Content-Length')); + } catch (e) { + getStrSize(); + } + } + + if (size === 0) getStrSize(); + + return (0, _util2.fileSize)(size) + 'B'; +} + +/***/ }), +/* 172 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(7); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(8); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _util = __webpack_require__(78); + +var _util2 = __webpack_require__(0); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var FetchRequest = function (_Emitter) { + (0, _inherits3.default)(FetchRequest, _Emitter); + + function FetchRequest(url) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + (0, _classCallCheck3.default)(this, FetchRequest); + + var _this = (0, _possibleConstructorReturn3.default)(this, (FetchRequest.__proto__ || (0, _getPrototypeOf2.default)(FetchRequest)).call(this)); + + if (url instanceof window.Request) url = url.url; + + _this._url = (0, _util2.fullUrl)(url); + _this._id = (0, _util2.uniqId)('request'); + _this._options = options; + _this._method = options.method || 'GET'; + return _this; + } + + (0, _createClass3.default)(FetchRequest, [{ + key: 'send', + value: function send(fetchResult) { + var _this2 = this; + + var options = this._options; + + var data = (0, _util2.isStr)(options.body) ? options.body : ''; + + this._fetch = fetchResult; + this.emit('send', this._id, { + name: (0, _util2.getFileName)(this._url), + url: this._url, + data: data, + method: this._method + }); + + fetchResult.then(function (res) { + res = res.clone(); + + var type = (0, _util.getType)(res.headers.get('Content-Type')); + + res.text().then(function (resTxt) { + _this2.emit('update', _this2._id, { + type: type.type, + subType: type.subType, + time: (0, _util2.now)(), + size: getSize(res, resTxt), + resTxt: resTxt, + resHeaders: getHeaders(res), + status: res.status, + done: true + }); + }); + + return res; + }); + } + }]); + return FetchRequest; +}(_util2.Emitter); + +exports.default = FetchRequest; + + +function getSize(res, resTxt) { + var size = 0; + + var contentLen = res.headers.get('Content-length'); + + if (contentLen) { + size = (0, _util2.toNum)(contentLen); + } else { + size = (0, _util.lenToUtf8Bytes)(resTxt); + } + + return (0, _util2.fileSize)(size) + 'B'; +} + +function getHeaders(res) { + var ret = {}; + + res.headers.forEach(function (val, key) { + return ret[key] = val; + }); + + return ret; +} + +/***/ }), +/* 173 */ +/***/ (function(module, exports, __webpack_require__) { + +exports = module.exports = __webpack_require__(6)(false); +// imports + + +// module +exports.push([module.i, ".eruda-dev-tools .eruda-tools .eruda-network {\n overflow-y: auto;\n -webkit-overflow-scrolling: touch; }\n .eruda-dev-tools .eruda-tools .eruda-network .eruda-title {\n background: #707d8b;\n padding: 10px;\n color: #fff; }\n .eruda-dev-tools .eruda-tools .eruda-network .eruda-title .eruda-btn {\n margin-left: 10px;\n float: right;\n background: #fff;\n color: #707d8b;\n text-align: center;\n width: 18px;\n height: 18px;\n line-height: 18px;\n border-radius: 50%;\n font-size: 12px;\n cursor: pointer;\n -webkit-transition: color 0.3s;\n transition: color 0.3s; }\n .eruda-dev-tools .eruda-tools .eruda-network .eruda-title .eruda-btn:active {\n color: #263238; }\n .eruda-dev-tools .eruda-tools .eruda-network .eruda-requests {\n background: #fff;\n border-bottom: 1px solid #eceffe;\n margin-bottom: 10px; }\n .eruda-dev-tools .eruda-tools .eruda-network .eruda-requests li {\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n cursor: pointer;\n border-top: 1px solid #eceffe;\n height: 41px;\n white-space: nowrap; }\n .eruda-dev-tools .eruda-tools .eruda-network .eruda-requests li.eruda-error span {\n color: #f44336; }\n .eruda-dev-tools .eruda-tools .eruda-network .eruda-requests li span {\n display: inline-block;\n line-height: 40px;\n height: 40px;\n padding: 0 10px;\n font-size: 12px;\n vertical-align: top; }\n .eruda-dev-tools .eruda-tools .eruda-network .eruda-requests li:nth-child(even) {\n background: #eceffe; }\n", ""]); + +// exports + + +/***/ }), +/* 174 */ +/***/ (function(module, exports, __webpack_require__) { + +var Handlebars = __webpack_require__(3); +function __default(obj) { return obj && (obj.__esModule ? obj["default"] : obj); } +module.exports = (Handlebars["default"] || Handlebars).template({"1":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.requests : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"2":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
  • \r\n " + + alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data}) : helper))) + + "\r\n " + + alias4(((helper = (helper = helpers.status || (depth0 != null ? depth0.status : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"status","hash":{},"data":data}) : helper))) + + "\r\n " + + alias4(((helper = (helper = helpers.method || (depth0 != null ? depth0.method : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"method","hash":{},"data":data}) : helper))) + + "\r\n " + + alias4(((helper = (helper = helpers.subType || (depth0 != null ? depth0.subType : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"subType","hash":{},"data":data}) : helper))) + + "\r\n " + + alias4(((helper = (helper = helpers.size || (depth0 != null ? depth0.size : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"size","hash":{},"data":data}) : helper))) + + "\r\n " + + alias4(((helper = (helper = helpers.displayTime || (depth0 != null ? depth0.displayTime : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"displayTime","hash":{},"data":data}) : helper))) + + "\r\n " + + alias4(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"url","hash":{},"data":data}) : helper))) + + "\r\n
  • \r\n"; +},"3":function(container,depth0,helpers,partials,data) { + return "eruda-error"; +},"5":function(container,depth0,helpers,partials,data) { + return "
  • Empty
  • \r\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1; + + return "
    \r\n Request\r\n
    \r\n \r\n
    \r\n
    \r\n
      \r\n" + + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.requests : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(5, data, 0),"data":data})) != null ? stack1 : "") + + "
    \r\n"; +},"useData":true}); + +/***/ }), +/* 175 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(7); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _get2 = __webpack_require__(14); + +var _get3 = _interopRequireDefault(_get2); + +var _inherits2 = __webpack_require__(8); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _Tool2 = __webpack_require__(9); + +var _Tool3 = _interopRequireDefault(_Tool2); + +var _CssStore = __webpack_require__(176); + +var _CssStore2 = _interopRequireDefault(_CssStore); + +var _stringify = __webpack_require__(76); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _Highlight = __webpack_require__(177); + +var _Highlight2 = _interopRequireDefault(_Highlight); + +var _Select = __webpack_require__(180); + +var _Select2 = _interopRequireDefault(_Select); + +var _Settings = __webpack_require__(13); + +var _Settings2 = _interopRequireDefault(_Settings); + +var _util = __webpack_require__(0); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Elements = function (_Tool) { + (0, _inherits3.default)(Elements, _Tool); + + function Elements() { + (0, _classCallCheck3.default)(this, Elements); + + var _this = (0, _possibleConstructorReturn3.default)(this, (Elements.__proto__ || (0, _getPrototypeOf2.default)(Elements)).call(this)); + + _this._style = (0, _util.evalCss)(__webpack_require__(181)); + + _this.name = 'elements'; + _this._tpl = __webpack_require__(182); + _this._rmDefComputedStyle = true; + _this._highlightElement = false; + _this._selectElement = false; + _this._observeElement = true; + return _this; + } + + (0, _createClass3.default)(Elements, [{ + key: 'init', + value: function init($el, container) { + (0, _get3.default)(Elements.prototype.__proto__ || (0, _getPrototypeOf2.default)(Elements.prototype), 'init', this).call(this, $el); + + this._container = container; + + $el.html('
    '); + this._$showArea = $el.find('.eruda-show-area'); + $el.append(__webpack_require__(183)()); + + this._htmlEl = document.documentElement; + this._highlight = new _Highlight2.default(this._container.$container); + this._select = new _Select2.default(); + this._bindEvent(); + this._initObserver(); + this._initCfg(); + } + }, { + key: 'show', + value: function show() { + (0, _get3.default)(Elements.prototype.__proto__ || (0, _getPrototypeOf2.default)(Elements.prototype), 'show', this).call(this); + + if (this._observeElement) this._enableObserver(); + if (!this._curEl) this._setEl(this._htmlEl); + this._render(); + } + }, { + key: 'hide', + value: function hide() { + this._disableObserver(); + + return (0, _get3.default)(Elements.prototype.__proto__ || (0, _getPrototypeOf2.default)(Elements.prototype), 'hide', this).call(this); + } + }, { + key: 'set', + value: function set(e) { + this._setEl(e); + this.scrollToTop(); + this._render(); + + return this; + } + }, { + key: 'overrideEventTarget', + value: function overrideEventTarget() { + var winEventProto = getWinEventProto(); + + var origAddEvent = this._origAddEvent = winEventProto.addEventListener, + origRmEvent = this._origRmEvent = winEventProto.removeEventListener; + + winEventProto.addEventListener = function (type, listener, useCapture) { + addEvent(this, type, listener, useCapture); + origAddEvent.apply(this, arguments); + }; + + winEventProto.removeEventListener = function (type, listener, useCapture) { + rmEvent(this, type, listener, useCapture); + origRmEvent.apply(this, arguments); + }; + } + }, { + key: 'scrollToTop', + value: function scrollToTop() { + var el = this._$showArea.get(0); + + el.scrollTop = 0; + } + }, { + key: 'restoreEventTarget', + value: function restoreEventTarget() { + var winEventProto = getWinEventProto(); + + if (this._origAddEvent) winEventProto.addEventListener = this._origAddEvent; + if (this._origRmEvent) winEventProto.removeEventListener = this._origRmEvent; + } + }, { + key: 'destroy', + value: function destroy() { + (0, _get3.default)(Elements.prototype.__proto__ || (0, _getPrototypeOf2.default)(Elements.prototype), 'destroy', this).call(this); + + _util.evalCss.remove(this._style); + this._select.disable(); + this._highlight.destroy(); + this._disableObserver(); + this.restoreEventTarget(); + } + }, { + key: '_back', + value: function _back() { + if (this._curEl === this._htmlEl) return; + + var parentQueue = this._curParentQueue, + parent = parentQueue.shift(); + + while (!isElExist(parent)) { + parent = parentQueue.shift(); + }this.set(parent); + } + }, { + key: '_bindEvent', + value: function _bindEvent() { + var _this2 = this; + + var self = this, + container = this._container, + select = this._select; + + this._$el.on('click', '.eruda-child', function () { + var idx = (0, _util.$)(this).data('idx'), + curEl = self._curEl, + el = curEl.childNodes[idx]; + + if (el && el.nodeType === 3) { + var curTagName = curEl.tagName, + type = void 0; + + switch (curTagName) { + case 'SCRIPT': + type = 'js';break; + case 'STYLE': + type = 'css';break; + default: + return; + } + + var sources = container.get('sources'); + + if (sources) { + sources.set(type, el.nodeValue); + container.showTool('sources'); + } + + return; + } + + !isElExist(el) ? self._render() : self.set(el); + }).on('click', '.eruda-listener-content', function () { + var text = (0, _util.$)(this).text(), + sources = container.get('sources'); + + if (sources) { + sources.set('js', text); + container.showTool('sources'); + } + }).on('click', '.eruda-breadcrumb', function () { + var data = _this2._elData || JSON.parse((0, _stringify2.default)(_this2._curEl, { getterVal: true })), + sources = container.get('sources'); + + _this2._elData = data; + + if (sources) { + sources.set('json', data); + container.showTool('sources'); + } + }).on('click', '.eruda-parent', function () { + var idx = (0, _util.$)(this).data('idx'), + curEl = self._curEl, + el = curEl.parentNode; + + while (idx-- && el.parentNode) { + el = el.parentNode; + }!isElExist(el) ? self._render() : self.set(el); + }).on('click', '.eruda-toggle-all-computed-style', function () { + return _this2._toggleAllComputedStyle(); + }); + + var $bottomBar = this._$el.find('.eruda-bottom-bar'); + + $bottomBar.on('click', '.eruda-refresh', function () { + return _this2._render(); + }).on('click', '.eruda-highlight', function () { + return _this2._toggleHighlight(); + }).on('click', '.eruda-select', function () { + return _this2._toggleSelect(); + }).on('click', '.eruda-reset', function () { + return _this2.set(_this2._htmlEl); + }); + + select.on('select', function (target) { + return _this2.set(target); + }); + } + }, { + key: '_toggleAllComputedStyle', + value: function _toggleAllComputedStyle() { + this._rmDefComputedStyle = !this._rmDefComputedStyle; + + this._render(); + } + }, { + key: '_enableObserver', + value: function _enableObserver() { + this._observer.observe(this._htmlEl, { + attributes: true, + childList: true, + subtree: true + }); + } + }, { + key: '_disableObserver', + value: function _disableObserver() { + this._observer.disconnect(); + } + }, { + key: '_toggleHighlight', + value: function _toggleHighlight() { + if (this._selectElement) return; + + this._$el.find('.eruda-highlight').toggleClass('eruda-active'); + this._highlightElement = !this._highlightElement; + + this._render(); + } + }, { + key: '_toggleSelect', + value: function _toggleSelect() { + var select = this._select; + + this._$el.find('.eruda-select').toggleClass('eruda-active'); + if (!this._selectElement && !this._highlightElement) this._toggleHighlight(); + this._selectElement = !this._selectElement; + + if (this._selectElement) { + select.enable(); + this._container.hide(); + } else { + select.disable(); + } + } + }, { + key: '_setEl', + value: function _setEl(el) { + this._curEl = el; + this._elData = null; + this._curCssStore = new _CssStore2.default(el); + this._highlight.setEl(el); + this._rmDefComputedStyle = true; + + var parentQueue = []; + + var parent = el.parentNode; + while (parent) { + parentQueue.push(parent); + parent = parent.parentNode; + } + this._curParentQueue = parentQueue; + } + }, { + key: '_getData', + value: function _getData() { + var ret = {}; + + var el = this._curEl, + cssStore = this._curCssStore; + + var className = el.className, + id = el.id, + attributes = el.attributes, + tagName = el.tagName; + + + ret.parents = getParents(el); + ret.children = formatChildNodes(el.childNodes); + ret.attributes = formatAttr(attributes); + ret.name = formatElName({ tagName: tagName, id: id, className: className, attributes: attributes }); + + var events = el.erudaEvents; + if (events && (0, _util.keys)(events).length !== 0) ret.listeners = events; + + if (needNoStyle(tagName)) return ret; + + var computedStyle = cssStore.getComputedStyle(); + + function getBoxModelValue(type) { + var keys = ['top', 'left', 'right', 'bottom']; + if (type !== 'position') keys = (0, _util.map)(keys, function (key) { + return type + '-' + key; + }); + if (type === 'border') keys = (0, _util.map)(keys, function (key) { + return key + '-width'; + }); + + return { + top: boxModelValue(computedStyle[keys[0]], type), + left: boxModelValue(computedStyle[keys[1]], type), + right: boxModelValue(computedStyle[keys[2]], type), + bottom: boxModelValue(computedStyle[keys[3]], type) + }; + } + + var boxModel = { + margin: getBoxModelValue('margin'), + border: getBoxModelValue('border'), + padding: getBoxModelValue('padding'), + content: { + width: boxModelValue(computedStyle['width']), + height: boxModelValue(computedStyle['height']) + } + }; + + if (computedStyle['position'] !== 'static') { + boxModel.position = getBoxModelValue('position'); + } + ret.boxModel = boxModel; + + if (this._rmDefComputedStyle) computedStyle = rmDefComputedStyle(computedStyle); + ret.rmDefComputedStyle = this._rmDefComputedStyle; + processStyleRules(computedStyle); + ret.computedStyle = computedStyle; + + var styles = cssStore.getMatchedCSSRules(); + styles.unshift(getInlineStyle(el.style)); + styles.forEach(function (style) { + return processStyleRules(style.style); + }); + ret.styles = styles; + + return ret; + } + }, { + key: '_render', + value: function _render() { + if (!isElExist(this._curEl)) return this._back(); + + this._highlight[this._highlightElement ? 'show' : 'hide'](); + this._renderHtml(this._tpl(this._getData())); + } + }, { + key: '_renderHtml', + value: function _renderHtml(html) { + if (html === this._lastHtml) return; + this._lastHtml = html; + this._$showArea.html(html); + } + }, { + key: '_initObserver', + value: function _initObserver() { + var _this3 = this; + + this._observer = new _util.SafeMutationObserver(function (mutations) { + (0, _util.each)(mutations, function (mutation) { + return _this3._handleMutation(mutation); + }); + }); + } + }, { + key: '_handleMutation', + value: function _handleMutation(mutation) { + var i = void 0, + len = void 0, + node = void 0; + + if ((0, _util.isErudaEl)(mutation.target)) return; + + if (mutation.type === 'attributes') { + if (mutation.target !== this._curEl) return; + this._render(); + } else if (mutation.type === 'childList') { + if (mutation.target === this._curEl) return this._render(); + + var addedNodes = mutation.addedNodes; + + for (i = 0, len = addedNodes.length; i < len; i++) { + node = addedNodes[i]; + + if (node.parentNode === this._curEl) return this._render(); + } + + var removedNodes = mutation.removedNodes; + + for (i = 0, len = removedNodes.length; i < len; i++) { + if (removedNodes[i] === this._curEl) return this.set(this._htmlEl); + } + } + } + }, { + key: '_initCfg', + value: function _initCfg() { + var _this4 = this; + + var cfg = this.config = _Settings2.default.createCfg('elements', { + overrideEventTarget: true, + observeElement: true + }); + + if (cfg.get('overrideEventTarget')) this.overrideEventTarget(); + if (cfg.get('observeElement')) this._observeElement = false; + + cfg.on('change', function (key, val) { + switch (key) { + case 'overrideEventTarget': + return val ? _this4.overrideEventTarget() : _this4.restoreEventTarget(); + case 'observeElement': + _this4._observeElement = val; + return val ? _this4._enableObserver() : _this4._disableObserver(); + } + }); + + var settings = this._container.get('settings'); + settings.text('Elements').switch(cfg, 'overrideEventTarget', 'Catch Event Listeners'); + + if (this._observer) settings.switch(cfg, 'observeElement', 'Auto Refresh'); + + settings.separator(); + } + }]); + return Elements; +}(_Tool3.default); + +exports.default = Elements; + + +function processStyleRules(style) { + (0, _util.each)(style, function (val, key) { + return style[key] = processStyleRule(val); + }); +} + +var regColor = /rgba?\((.*?)\)/g, + regCssUrl = /url\("?(.*?)"?\)/g; + +function processStyleRule(val) { + // For css custom properties, val is unable to retrieved. + val = (0, _util.toStr)(val); + + return val.replace(regColor, '$&').replace(regCssUrl, function (match, url) { + return 'url("' + wrapLink(url) + '")'; + }); +} + +var isElExist = function isElExist(val) { + return (0, _util.isEl)(val) && val.parentNode; +}; + +function formatElName(data) { + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$noAttr = _ref.noAttr, + noAttr = _ref$noAttr === undefined ? false : _ref$noAttr; + + var id = data.id, + className = data.className, + attributes = data.attributes; + + + var ret = '' + data.tagName.toLowerCase() + ''; + + if (id !== '') ret += '#' + id; + + if ((0, _util.isStr)(className)) { + (0, _util.each)(className.split(/\s+/g), function (val) { + if (val.trim() === '') return; + ret += '.' + val; + }); + } + + if (!noAttr) { + (0, _util.each)(attributes, function (attr) { + var name = attr.name; + if (name === 'id' || name === 'class' || name === 'style') return; + ret += ' ' + name + '="' + attr.value + '"'; + }); + } + + return ret; +} + +var formatAttr = function formatAttr(attributes) { + return (0, _util.map)(attributes, function (attr) { + var name = attr.name, + value = attr.value; + + value = (0, _util.escape)(value); + + var isLink = (name === 'src' || name === 'href') && !(0, _util.startWith)(value, 'data'); + if (isLink) value = wrapLink(value); + if (name === 'style') value = processStyleRule(value); + + return { name: name, value: value }; + }); +}; + +function formatChildNodes(nodes) { + var ret = []; + + for (var i = 0, len = nodes.length; i < len; i++) { + var child = nodes[i], + nodeType = child.nodeType; + + if (nodeType === 3 || nodeType === 8) { + var val = child.nodeValue.trim(); + if (val !== '') ret.push({ + text: val, + isCmt: nodeType === 8, + idx: i + }); + continue; + } + + var isSvg = !(0, _util.isStr)(child.className); + + if (nodeType === 1 && child.id !== 'eruda' && (isSvg || child.className.indexOf('eruda') < 0)) { + ret.push({ + text: formatElName(child), + isEl: true, + idx: i + }); + } + } + + return ret; +} + +function getParents(el) { + var ret = [], + i = 0, + parent = el.parentNode; + + while (parent && parent.nodeType === 1) { + ret.push({ + text: formatElName(parent, { noAttr: true }), + idx: i++ + }); + + parent = parent.parentNode; + } + + return ret.reverse(); +} + +function getInlineStyle(style) { + var ret = { + selectorText: 'element.style', + style: {} + }; + + for (var i = 0, len = style.length; i < len; i++) { + var s = style[i]; + + ret.style[s] = style[s]; + } + + return ret; +} + +var defComputedStyle = __webpack_require__(184); + +function rmDefComputedStyle(computedStyle) { + var ret = {}; + + (0, _util.each)(computedStyle, function (val, key) { + if (val === defComputedStyle[key]) return; + + ret[key] = val; + }); + + return ret; +} + +var NO_STYLE_TAG = ['script', 'style', 'meta', 'title', 'link', 'head']; + +var needNoStyle = function needNoStyle(tagName) { + return NO_STYLE_TAG.indexOf(tagName.toLowerCase()) > -1; +}; + +function addEvent(el, type, listener) { + var useCapture = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + if (!(0, _util.isEl)(el) || !(0, _util.isFn)(listener) || !(0, _util.isBool)(useCapture)) return; + + var events = el.erudaEvents = el.erudaEvents || {}; + + events[type] = events[type] || []; + events[type].push({ + listener: listener, + listenerStr: listener.toString(), + useCapture: useCapture + }); +} + +function rmEvent(el, type, listener) { + var useCapture = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + if (!(0, _util.isEl)(el) || !(0, _util.isFn)(listener) || !(0, _util.isBool)(useCapture)) return; + + var events = el.erudaEvents; + + if (!(events && events[type])) return; + + var listeners = events[type]; + + for (var i = 0, len = listeners.length; i < len; i++) { + if (listeners[i].listener === listener) { + listeners.splice(i, 1); + break; + } + } + + if (listeners.length === 0) delete events[type]; + if ((0, _util.keys)(events).length === 0) delete el.erudaEvents; +} + +var getWinEventProto = function getWinEventProto() { + return (0, _util.safeGet)(window, 'EventTarget.prototype') || window.Node.prototype; +}; + +var wrapLink = function wrapLink(link) { + return '' + link + ''; +}; + +function boxModelValue(val, type) { + if ((0, _util.isNum)(val)) return val; + + if (!(0, _util.isStr)(val)) return '‒'; + + var ret = (0, _util.pxToNum)(val); + if ((0, _util.isNaN)(ret)) return val; + + if (type === 'position') return ret; + + return ret === 0 ? '‒' : ret; +} + +/***/ }), +/* 176 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _util = __webpack_require__(0); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function formatStyle(style) { + var ret = {}; + + for (var i = 0, len = style.length; i < len; i++) { + var name = style[i]; + + if (style[name] === 'initial') continue; + + ret[name] = style[name]; + } + + return ret; +} + +var elProto = Element.prototype; + +var matchesSel = function matchesSel() { + return false; +}; + +if (elProto.webkitMatchesSelector) { + matchesSel = function matchesSel(el, selText) { + return el.webkitMatchesSelector(selText); + }; +} else if (elProto.mozMatchesSelector) { + matchesSel = function matchesSel(el, selText) { + return el.mozMatchesSelector(selText); + }; +} + +var CssStore = function () { + function CssStore(el) { + (0, _classCallCheck3.default)(this, CssStore); + + this._el = el; + } + + (0, _createClass3.default)(CssStore, [{ + key: 'getComputedStyle', + value: function getComputedStyle() { + var computedStyle = window.getComputedStyle(this._el); + + return formatStyle(computedStyle); + } + }, { + key: 'getMatchedCSSRules', + value: function getMatchedCSSRules() { + var _this = this; + + var ret = []; + + (0, _util.each)(document.styleSheets, function (styleSheet) { + if (!styleSheet.cssRules) return; + + (0, _util.each)(styleSheet.cssRules, function (cssRule) { + var matchesEl = false; + + // Mobile safari will throw DOM Exception 12 error, need to try catch it. + try { + matchesEl = _this._elMatchesSel(cssRule.selectorText); + /* eslint-disable no-empty */ + } catch (e) {} + + if (!matchesEl) return; + + ret.push({ + selectorText: cssRule.selectorText, + style: formatStyle(cssRule.style) + }); + }); + }); + + return ret; + } + }, { + key: '_elMatchesSel', + value: function _elMatchesSel(selText) { + return matchesSel(this._el, selText); + } + }]); + return CssStore; +}(); + +exports.default = CssStore; + +/***/ }), +/* 177 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _util = __webpack_require__(0); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Highlight = function () { + function Highlight($container) { + (0, _classCallCheck3.default)(this, Highlight); + + this._style = (0, _util.evalCss)(__webpack_require__(178)); + + this._isShow = false; + + this._appendTpl($container); + this._bindEvent(); + } + + (0, _createClass3.default)(Highlight, [{ + key: 'setEl', + value: function setEl(el) { + this._$target = (0, _util.$)(el); + this._target = el; + } + }, { + key: 'show', + value: function show() { + this._isShow = true; + this.render(); + this._$el.show(); + } + }, { + key: 'destroy', + value: function destroy() { + _util.evalCss.remove(this._style); + } + }, { + key: 'hide', + value: function hide() { + this._isShow = false; + this._$el.hide(); + } + }, { + key: 'render', + value: function render() { + var _$target$offset = this._$target.offset(), + left = _$target$offset.left, + width = _$target$offset.width, + top = _$target$offset.top, + height = _$target$offset.height; + + this._$el.css({ left: left, top: top - window.scrollY, width: width, height: height }); + + var computedStyle = getComputedStyle(this._target, ''); + + var getNumStyle = function getNumStyle(name) { + return (0, _util.pxToNum)(computedStyle.getPropertyValue(name)); + }; + + var ml = getNumStyle('margin-left'), + mr = getNumStyle('margin-right'), + mt = getNumStyle('margin-top'), + mb = getNumStyle('margin-bottom'); + + this._$margin.css({ + left: -ml, + top: -mt, + width: width + ml + mr, + height: height + mt + mb + }); + + var bl = getNumStyle('border-left-width'), + br = getNumStyle('border-right-width'), + bt = getNumStyle('border-top-width'), + bb = getNumStyle('border-bottom-width'); + + var bw = width - bl - br, + bh = height - bt - bb; + + this._$padding.css({ + left: bl, + top: bt, + width: bw, + height: bh + }); + + var pl = getNumStyle('padding-left'), + pr = getNumStyle('padding-right'), + pt = getNumStyle('padding-top'), + pb = getNumStyle('padding-bottom'); + + this._$content.css({ + left: bl + pl, + top: bl + pt, + width: bw - pl - pr, + height: bh - pt - pb + }); + + this._$size.css({ + top: -mt - (top - mt < 25 ? 0 : 25), + left: -ml + }).html(formatElName(this._target) + ' | ' + width + ' \xD7 ' + height); + } + }, { + key: '_bindEvent', + value: function _bindEvent() { + var _this = this; + + window.addEventListener('scroll', function () { + if (!_this._isShow) return; + _this.render(); + }, false); + } + }, { + key: '_appendTpl', + value: function _appendTpl($container) { + $container.append(__webpack_require__(179)()); + + var $el = this._$el = (0, _util.$)('.eruda-elements-highlight'); + this._$margin = $el.find('.eruda-margin'); + this._$padding = $el.find('.eruda-padding'); + this._$content = $el.find('.eruda-content'); + this._$size = $el.find('.eruda-size'); + } + }]); + return Highlight; +}(); + +exports.default = Highlight; + + +function formatElName(el) { + var id = el.id, + className = el.className; + + + var ret = '' + el.tagName.toLowerCase() + ''; + + if (id !== '') ret += '#' + id + ''; + + var classes = ''; + if ((0, _util.isStr)(className)) { + (0, _util.each)(className.split(/\s+/g), function (val) { + if ((0, _util.trim)(val) === '') return; + + classes += '.' + val; + }); + } + + ret += '' + classes + ''; + + return ret; +} + +/***/ }), +/* 178 */ +/***/ (function(module, exports, __webpack_require__) { + +exports = module.exports = __webpack_require__(6)(false); +// imports + + +// module +exports.push([module.i, ".eruda-elements-highlight {\n display: none;\n position: absolute;\n left: 0;\n right: 0;\n z-index: -100;\n pointer-events: none !important; }\n .eruda-elements-highlight * {\n pointer-events: none !important; }\n .eruda-elements-highlight .eruda-indicator {\n opacity: .5;\n position: absolute;\n left: 0;\n right: 0;\n width: 100%;\n height: 100%; }\n .eruda-elements-highlight .eruda-margin {\n position: absolute;\n background: #e8925b;\n z-index: 100; }\n .eruda-elements-highlight .eruda-border {\n position: absolute;\n left: 0;\n right: 0;\n width: 100%;\n height: 100%;\n background: #ffcd7c;\n z-index: 200; }\n .eruda-elements-highlight .eruda-padding {\n position: absolute;\n background: #86af76;\n z-index: 300; }\n .eruda-elements-highlight .eruda-content {\n position: absolute;\n background: #5e88c1;\n z-index: 400; }\n .eruda-elements-highlight .eruda-size {\n position: absolute;\n top: 0;\n left: 0;\n background: #333740;\n color: #d9d9d9;\n font-size: 12px;\n height: 25px;\n line-height: 25px;\n text-align: center;\n padding: 0 5px;\n white-space: nowrap;\n overflow-x: hidden; }\n", ""]); + +// exports + + +/***/ }), +/* 179 */ +/***/ (function(module, exports, __webpack_require__) { + +var Handlebars = __webpack_require__(3); +function __default(obj) { return obj && (obj.__esModule ? obj["default"] : obj); } +module.exports = (Handlebars["default"] || Handlebars).template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + return "
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    "; +},"useData":true}); + +/***/ }), +/* 180 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(7); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(8); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _util = __webpack_require__(0); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Select = function (_Emitter) { + (0, _inherits3.default)(Select, _Emitter); + + function Select() { + (0, _classCallCheck3.default)(this, Select); + + var _this = (0, _possibleConstructorReturn3.default)(this, (Select.__proto__ || (0, _getPrototypeOf2.default)(Select)).call(this)); + + var self = _this; + + _this._startListener = function (e) { + if ((0, _util.isErudaEl)(e.target)) return; + + self._timer = setTimeout(function () { + self.emit('select', e.target); + }, 200); + + return false; + }; + + _this._moveListener = function () { + clearTimeout(self._timer); + }; + + _this._clickListener = function (e) { + if ((0, _util.isErudaEl)(e.target)) return; + + e.preventDefault(); + e.stopImmediatePropagation(); + }; + return _this; + } + + (0, _createClass3.default)(Select, [{ + key: 'enable', + value: function enable() { + this.disable(); + function addEvent(type, listener) { + document.body.addEventListener(type, listener, true); + } + addEvent('touchstart', this._startListener); + addEvent('touchmove', this._moveListener); + addEvent('click', this._clickListener); + + return this; + } + }, { + key: 'disable', + value: function disable() { + function rmEvent(type, listener) { + document.body.removeEventListener(type, listener, true); + } + rmEvent('touchstart', this._startListener); + rmEvent('touchmove', this._moveListener); + rmEvent('click', this._clickListener); + + return this; + } + }]); + return Select; +}(_util.Emitter); + +exports.default = Select; + +/***/ }), +/* 181 */ +/***/ (function(module, exports, __webpack_require__) { + +exports = module.exports = __webpack_require__(6)(false); +// imports + + +// module +exports.push([module.i, ".eruda-dev-tools .eruda-tools .eruda-elements {\n padding-bottom: 40px;\n font-size: 14px; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-show-area {\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n height: 100%; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-parents {\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n background: #fff;\n padding: 10px;\n white-space: nowrap;\n border-bottom: 1px solid #eceffe;\n cursor: pointer;\n font-size: 12px; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-parents li {\n display: inline-block; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-parents li .eruda-parent {\n display: inline-block; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-parents li:last-child {\n margin-right: 0; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-parents .eruda-icon-chevron-right {\n font-size: 8px; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-breadcrumb {\n background: #fff;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n margin-bottom: 10px;\n word-break: break-all;\n padding: 10px;\n font-size: 16px;\n min-height: 40px;\n border-bottom: 1px solid #eceffe;\n cursor: pointer;\n -webkit-transition: background 0.3s, color 0.3s;\n transition: background 0.3s, color 0.3s; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-breadcrumb:active {\n background: #2196f3;\n color: #fff; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-breadcrumb:active span {\n color: #fff; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-section {\n margin-bottom: 10px; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-section h2 {\n background: #2196f3;\n padding: 10px;\n color: #fff;\n font-size: 14px;\n -webkit-transition: background 0.3s;\n transition: background 0.3s; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-section h2 .eruda-btn {\n margin-left: 10px;\n float: right;\n text-align: center;\n width: 18px;\n height: 18px;\n line-height: 18px;\n font-size: 12px; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-section h2.eruda-active-effect {\n cursor: pointer; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-section h2.eruda-active-effect:active {\n background: #1565c0; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-children {\n background: #fff;\n margin-bottom: 10px !important;\n border-bottom: 1px solid #eceffe; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-children li {\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n cursor: default;\n padding: 10px;\n border-top: 1px solid #eceffe;\n white-space: nowrap;\n -webkit-transition: background 0.3s, color 0.3s;\n transition: background 0.3s, color 0.3s; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-children li span {\n -webkit-transition: color 0.3s;\n transition: color 0.3s; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-children li.eruda-active-effect {\n cursor: pointer; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-children li.eruda-active-effect:active {\n background: #2196f3;\n color: #fff; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-children li.eruda-active-effect:active span {\n color: #fff; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-attributes {\n background: #fff;\n font-size: 12px; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-attributes a {\n color: #2196f3; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-attributes .eruda-table-wrapper {\n overflow-x: auto;\n -webkit-overflow-scrolling: touch; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-attributes table td {\n padding: 5px 10px; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-text-content {\n background: #fff; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-text-content .eruda-content {\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n padding: 10px; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-style-color {\n width: 7px;\n height: 7px;\n margin-right: 2px;\n border: 1px solid #263238;\n display: inline-block; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-box-model {\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n background: #fff;\n font-size: 12px;\n padding: 10px;\n text-align: center;\n white-space: nowrap;\n border-bottom: 1px solid #eceffe; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-box-model .eruda-label {\n position: absolute;\n margin-left: 3px;\n padding: 0 2px; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-box-model .eruda-top, .eruda-dev-tools .eruda-tools .eruda-elements .eruda-box-model .eruda-left, .eruda-dev-tools .eruda-tools .eruda-elements .eruda-box-model .eruda-right, .eruda-dev-tools .eruda-tools .eruda-elements .eruda-box-model .eruda-bottom {\n display: inline-block; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-box-model .eruda-left, .eruda-dev-tools .eruda-tools .eruda-elements .eruda-box-model .eruda-right {\n vertical-align: middle; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-box-model .eruda-position, .eruda-dev-tools .eruda-tools .eruda-elements .eruda-box-model .eruda-margin, .eruda-dev-tools .eruda-tools .eruda-elements .eruda-box-model .eruda-border, .eruda-dev-tools .eruda-tools .eruda-elements .eruda-box-model .eruda-padding, .eruda-dev-tools .eruda-tools .eruda-elements .eruda-box-model .eruda-content {\n position: relative;\n background: #fff;\n display: inline-block;\n text-align: center;\n vertical-align: middle;\n padding: 3px;\n margin: 3px; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-box-model .eruda-position {\n border: 1px grey dotted; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-box-model .eruda-margin {\n border: 1px dashed;\n background: rgba(246, 178, 107, 0.66); }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-box-model .eruda-border {\n border: 1px #000 solid;\n background: rgba(255, 229, 153, 0.66); }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-box-model .eruda-padding {\n border: 1px grey dashed;\n background: rgba(147, 196, 125, 0.55); }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-box-model .eruda-content {\n border: 1px grey solid;\n min-width: 100px;\n background: rgba(111, 168, 220, 0.66); }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-computed-style {\n background: #fff;\n font-size: 12px; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-computed-style a {\n color: #2196f3; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-computed-style .eruda-table-wrapper {\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n max-height: 200px; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-computed-style table td {\n padding: 5px 10px; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-computed-style table td.eruda-key {\n white-space: nowrap;\n color: #f44336; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-styles {\n background: #fff;\n font-size: 12px; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-styles .eruda-style-wrapper {\n padding: 10px; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-styles .eruda-style-wrapper .eruda-style-rules {\n border-radius: 4px;\n -webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 4px 0 rgba(0, 0, 0, 0.08), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 4px 0 rgba(0, 0, 0, 0.08), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n padding: 10px;\n background: #fff;\n margin-bottom: 10px; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-styles .eruda-style-wrapper .eruda-style-rules .eruda-rule {\n padding-left: 2em;\n word-break: break-all; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-styles .eruda-style-wrapper .eruda-style-rules .eruda-rule a {\n color: #2196f3; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-styles .eruda-style-wrapper .eruda-style-rules .eruda-rule span {\n color: #f44336; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-styles .eruda-style-wrapper .eruda-style-rules:last-child {\n margin-bottom: 0; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-listeners {\n background: #fff;\n font-size: 12px; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-listeners .eruda-listener-wrapper {\n padding: 10px; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-listeners .eruda-listener-wrapper .eruda-listener {\n -webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 4px 0 rgba(0, 0, 0, 0.08), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 4px 0 rgba(0, 0, 0, 0.08), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n margin-bottom: 10px;\n background: #fff;\n border-radius: 4px;\n overflow: hidden; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-listeners .eruda-listener-wrapper .eruda-listener .eruda-listener-type {\n padding: 10px;\n background: #2196f3;\n color: #fff; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-listeners .eruda-listener-wrapper .eruda-listener .eruda-listener-content li {\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n padding: 10px;\n border-top: none; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-listeners .eruda-listener-wrapper .eruda-listener .eruda-listener-content li.eruda-capture {\n background: #eceffe; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-bottom-bar {\n height: 40px;\n background: #fff;\n position: absolute;\n left: 0;\n bottom: 0;\n width: 100%;\n font-size: 0;\n border-top: 1px solid #eceffe; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-bottom-bar .eruda-btn {\n cursor: pointer;\n text-align: center;\n color: #707d8b;\n font-size: 14px;\n line-height: 40px;\n width: 25%;\n display: inline-block;\n -webkit-transition: background 0.3s, color 0.3s;\n transition: background 0.3s, color 0.3s; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-bottom-bar .eruda-btn:active {\n background: #2196f3;\n color: #fff; }\n .eruda-dev-tools .eruda-tools .eruda-elements .eruda-bottom-bar .eruda-btn.eruda-active {\n color: #2196f3; }\n", ""]); + +// exports + + +/***/ }), +/* 182 */ +/***/ (function(module, exports, __webpack_require__) { + +var Handlebars = __webpack_require__(3); +function __default(obj) { return obj && (obj.__esModule ? obj["default"] : obj); } +module.exports = (Handlebars["default"] || Handlebars).template({"1":function(container,depth0,helpers,partials,data) { + var stack1; + + return "
      \r\n" + + ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.parents : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
    \r\n"; +},"2":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function"; + + return "
  • \r\n
    " + + ((stack1 = ((helper = (helper = helpers.text || (depth0 != null ? depth0.text : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"text","hash":{},"data":data}) : helper))) != null ? stack1 : "") + + "
    \r\n \r\n
  • \r\n"; +},"4":function(container,depth0,helpers,partials,data) { + var stack1; + + return "
      \r\n" + + ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.children : depth0),{"name":"each","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
    \r\n"; +},"5":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function"; + + return "
  • " + + ((stack1 = ((helper = (helper = helpers.text || (depth0 != null ? depth0.text : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"text","hash":{},"data":data}) : helper))) != null ? stack1 : "") + + "
  • \r\n"; +},"6":function(container,depth0,helpers,partials,data) { + return "eruda-green"; +},"8":function(container,depth0,helpers,partials,data) { + return "eruda-active-effect"; +},"10":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.attributes : depth0),{"name":"each","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"11":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function"; + + return " \r\n " + + container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data}) : helper))) + + "\r\n " + + ((stack1 = ((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"value","hash":{},"data":data}) : helper))) != null ? stack1 : "") + + "\r\n \r\n"; +},"13":function(container,depth0,helpers,partials,data) { + return " \r\n Empty\r\n \r\n"; +},"15":function(container,depth0,helpers,partials,data) { + var stack1; + + return "
    \r\n

    Styles

    \r\n
    \r\n" + + ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.styles : depth0),{"name":"each","hash":{},"fn":container.program(16, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
    \r\n
    \r\n"; +},"16":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}); + + return "
    \r\n
    " + + container.escapeExpression(((helper = (helper = helpers.selectorText || (depth0 != null ? depth0.selectorText : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(alias1,{"name":"selectorText","hash":{},"data":data}) : helper))) + + " {
    \r\n" + + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.style : depth0),{"name":"each","hash":{},"fn":container.program(17, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
    }
    \r\n
    \r\n"; +},"17":function(container,depth0,helpers,partials,data) { + var stack1, helper; + + return "
    \r\n " + + container.escapeExpression(((helper = (helper = helpers.key || (data && data.key)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"key","hash":{},"data":data}) : helper))) + + ": " + + ((stack1 = container.lambda(depth0, depth0)) != null ? stack1 : "") + + ";\r\n
    \r\n"; +},"19":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.lambda, alias3=container.escapeExpression; + + return "
    \r\n

    Computed Style\r\n
    \r\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.rmDefComputedStyle : depth0),{"name":"if","hash":{},"fn":container.program(20, data, 0),"inverse":container.program(22, data, 0),"data":data})) != null ? stack1 : "") + + "
    \r\n

    \r\n
    \r\n " + + ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.boxModel : depth0)) != null ? stack1.position : stack1),{"name":"if","hash":{},"fn":container.program(24, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
    \r\n
    margin
    " + + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.boxModel : depth0)) != null ? stack1.margin : stack1)) != null ? stack1.top : stack1), depth0)) + + "

    " + + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.boxModel : depth0)) != null ? stack1.margin : stack1)) != null ? stack1.left : stack1), depth0)) + + "
    \r\n
    border
    " + + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.boxModel : depth0)) != null ? stack1.border : stack1)) != null ? stack1.top : stack1), depth0)) + + "

    " + + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.boxModel : depth0)) != null ? stack1.border : stack1)) != null ? stack1.left : stack1), depth0)) + + "
    \r\n
    padding
    " + + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.boxModel : depth0)) != null ? stack1.padding : stack1)) != null ? stack1.top : stack1), depth0)) + + "

    " + + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.boxModel : depth0)) != null ? stack1.padding : stack1)) != null ? stack1.left : stack1), depth0)) + + "
    \r\n " + + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.boxModel : depth0)) != null ? stack1.content : stack1)) != null ? stack1.width : stack1), depth0)) + + " × " + + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.boxModel : depth0)) != null ? stack1.content : stack1)) != null ? stack1.height : stack1), depth0)) + + "\r\n
    " + + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.boxModel : depth0)) != null ? stack1.padding : stack1)) != null ? stack1.right : stack1), depth0)) + + "

    " + + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.boxModel : depth0)) != null ? stack1.padding : stack1)) != null ? stack1.bottom : stack1), depth0)) + + "
    " + + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.boxModel : depth0)) != null ? stack1.border : stack1)) != null ? stack1.right : stack1), depth0)) + + "

    " + + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.boxModel : depth0)) != null ? stack1.border : stack1)) != null ? stack1.bottom : stack1), depth0)) + + "
    " + + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.boxModel : depth0)) != null ? stack1.margin : stack1)) != null ? stack1.right : stack1), depth0)) + + "

    " + + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.boxModel : depth0)) != null ? stack1.margin : stack1)) != null ? stack1.bottom : stack1), depth0)) + + "
    " + + ((stack1 = helpers["if"].call(alias1,((stack1 = (depth0 != null ? depth0.boxModel : depth0)) != null ? stack1.position : stack1),{"name":"if","hash":{},"fn":container.program(26, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "\r\n
    \r\n
    \r\n \r\n \r\n" + + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.computedStyle : depth0),{"name":"each","hash":{},"fn":container.program(28, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " \r\n
    \r\n
    \r\n
    \r\n"; +},"20":function(container,depth0,helpers,partials,data) { + return " \r\n"; +},"22":function(container,depth0,helpers,partials,data) { + return " \r\n"; +},"24":function(container,depth0,helpers,partials,data) { + var stack1, alias1=container.lambda, alias2=container.escapeExpression; + + return "
    \r\n
    position
    " + + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? depth0.boxModel : depth0)) != null ? stack1.position : stack1)) != null ? stack1.top : stack1), depth0)) + + "

    " + + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? depth0.boxModel : depth0)) != null ? stack1.position : stack1)) != null ? stack1.left : stack1), depth0)) + + "
    "; +},"26":function(container,depth0,helpers,partials,data) { + var stack1, alias1=container.lambda, alias2=container.escapeExpression; + + return "
    " + + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? depth0.boxModel : depth0)) != null ? stack1.position : stack1)) != null ? stack1.right : stack1), depth0)) + + "

    " + + alias2(alias1(((stack1 = ((stack1 = (depth0 != null ? depth0.boxModel : depth0)) != null ? stack1.position : stack1)) != null ? stack1.bottom : stack1), depth0)) + + "
    "; +},"28":function(container,depth0,helpers,partials,data) { + var stack1, helper; + + return " \r\n " + + container.escapeExpression(((helper = (helper = helpers.key || (data && data.key)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"key","hash":{},"data":data}) : helper))) + + "\r\n " + + ((stack1 = container.lambda(depth0, depth0)) != null ? stack1 : "") + + "\r\n \r\n"; +},"30":function(container,depth0,helpers,partials,data) { + var stack1; + + return "
    \r\n

    Event Listeners

    \r\n
    \r\n" + + ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.listeners : depth0),{"name":"each","hash":{},"fn":container.program(31, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
    \r\n
    \r\n"; +},"31":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}); + + return "
    \r\n
    " + + container.escapeExpression(((helper = (helper = helpers.key || (data && data.key)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(alias1,{"name":"key","hash":{},"data":data}) : helper))) + + "
    \r\n
      \r\n" + + ((stack1 = helpers.each.call(alias1,depth0,{"name":"each","hash":{},"fn":container.program(32, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
    \r\n
    \r\n"; +},"32":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}); + + return "
  • " + + container.escapeExpression(((helper = (helper = helpers.listenerStr || (depth0 != null ? depth0.listenerStr : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(alias1,{"name":"listenerStr","hash":{},"data":data}) : helper))) + + "
  • \r\n"; +},"33":function(container,depth0,helpers,partials,data) { + return "eruda-capture"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}); + + return ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.parents : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
    \r\n " + + ((stack1 = ((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(alias1,{"name":"name","hash":{},"data":data}) : helper))) != null ? stack1 : "") + + "\r\n
    \r\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.children : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
    \r\n

    Attributes

    \r\n
    \r\n \r\n \r\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.attributes : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.program(13, data, 0),"data":data})) != null ? stack1 : "") + + " \r\n
    \r\n
    \r\n
    \r\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.styles : depth0),{"name":"if","hash":{},"fn":container.program(15, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.computedStyle : depth0),{"name":"if","hash":{},"fn":container.program(19, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.listeners : depth0),{"name":"if","hash":{},"fn":container.program(30, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"useData":true}); + +/***/ }), +/* 183 */ +/***/ (function(module, exports, __webpack_require__) { + +var Handlebars = __webpack_require__(3); +function __default(obj) { return obj && (obj.__esModule ? obj["default"] : obj); } +module.exports = (Handlebars["default"] || Handlebars).template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + return "
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    "; +},"useData":true}); + +/***/ }), +/* 184 */ +/***/ (function(module, exports) { + +module.exports = {"align-content":"stretch","align-items":"stretch","align-self":"start","alignment-baseline":"auto","all":"","animation":"none 0s ease 0s 1 normal none running","animation-delay":"0s","animation-direction":"normal","animation-duration":"0s","animation-fill-mode":"none","animation-iteration-count":"1","animation-name":"none","animation-play-state":"running","animation-timing-function":"ease","backface-visibility":"visible","background":"rgba(0, 0, 0, 0) none repeat scroll 0% 0% / auto padding-box border-box","background-attachment":"scroll","background-blend-mode":"normal","background-clip":"border-box","background-color":"rgba(0, 0, 0, 0)","background-image":"none","background-origin":"padding-box","background-position":"0% 0%","background-position-x":"0%","background-position-y":"0%","background-repeat":"repeat","background-repeat-x":"","background-repeat-y":"","background-size":"auto","baseline-shift":"0px","border":"0px none rgb(0, 0, 0)","border-bottom":"0px none rgb(0, 0, 0)","border-bottom-color":"rgb(0, 0, 0)","border-bottom-left-radius":"0px","border-bottom-right-radius":"0px","border-bottom-style":"none","border-bottom-width":"0px","border-collapse":"separate","border-color":"rgb(0, 0, 0)","border-image":"none","border-image-outset":"0px","border-image-repeat":"stretch","border-image-slice":"100%","border-image-source":"none","border-image-width":"1","border-left":"0px none rgb(0, 0, 0)","border-left-color":"rgb(0, 0, 0)","border-left-style":"none","border-left-width":"0px","border-radius":"0px","border-right":"0px none rgb(0, 0, 0)","border-right-color":"rgb(0, 0, 0)","border-right-style":"none","border-right-width":"0px","border-spacing":"0px 0px","border-style":"none","border-top":"0px none rgb(0, 0, 0)","border-top-color":"rgb(0, 0, 0)","border-top-left-radius":"0px","border-top-right-radius":"0px","border-top-style":"none","border-top-width":"0px","border-width":"0px","bottom":"auto","box-shadow":"none","box-sizing":"content-box","buffered-rendering":"auto","caption-side":"top","clear":"none","clip":"auto","clip-path":"none","clip-rule":"nonzero","color":"rgb(0, 0, 0)","color-interpolation":"sRGB","color-interpolation-filters":"linearRGB","color-rendering":"auto","content":"","counter-increment":"none","counter-reset":"none","cursor":"auto","cx":"0px","cy":"0px","direction":"ltr","display":"block","dominant-baseline":"auto","empty-cells":"show","fill":"rgb(0, 0, 0)","fill-opacity":"1","fill-rule":"nonzero","filter":"none","flex":"0 1 auto","flex-basis":"auto","flex-direction":"row","flex-flow":"row nowrap","flex-grow":"0","flex-shrink":"1","flex-wrap":"nowrap","float":"none","flood-color":"rgb(0, 0, 0)","flood-opacity":"1","font":"normal normal normal normal 16px / normal simsun","font-family":"Simsun","font-feature-settings":"normal","font-kerning":"auto","font-size":"16px","font-stretch":"normal","font-style":"normal","font-variant":"normal","font-variant-ligatures":"normal","font-weight":"normal","image-rendering":"auto","isolation":"auto","justify-content":"flex-start","left":"auto","letter-spacing":"normal","lighting-color":"rgb(255, 255, 255)","line-height":"normal","list-style":"disc outside none","list-style-image":"none","list-style-position":"outside","list-style-type":"disc","margin":"0px","margin-bottom":"0px","margin-left":"0px","margin-right":"0px","margin-top":"0px","marker":"","marker-end":"none","marker-mid":"none","marker-start":"none","mask":"none","mask-type":"luminance","max-height":"none","max-width":"none","max-zoom":"","min-height":"0px","min-width":"0px","min-zoom":"","mix-blend-mode":"normal","motion":"none 0px auto 0deg","motion-offset":"0px","motion-path":"none","motion-rotation":"auto 0deg","object-fit":"fill","object-position":"50% 50%","opacity":"1","order":"0","orientation":"","orphans":"auto","outline":"rgb(0, 0, 0) none 0px","outline-color":"rgb(0, 0, 0)","outline-offset":"0px","outline-style":"none","outline-width":"0px","overflow":"visible","overflow-wrap":"normal","overflow-x":"visible","overflow-y":"visible","padding":"0px","padding-bottom":"0px","padding-left":"0px","padding-right":"0px","padding-top":"0px","page":"","page-break-after":"auto","page-break-before":"auto","page-break-inside":"auto","paint-order":"fill stroke markers","perspective":"none","pointer-events":"auto","position":"static","quotes":"","r":"0px","resize":"none","right":"auto","rx":"0px","ry":"0px","shape-image-threshold":"0","shape-margin":"0px","shape-outside":"none","shape-rendering":"auto","size":"","speak":"normal","src":"","stop-color":"rgb(0, 0, 0)","stop-opacity":"1","stroke":"none","stroke-dasharray":"none","stroke-dashoffset":"0px","stroke-linecap":"butt","stroke-linejoin":"miter","stroke-miterlimit":"4","stroke-opacity":"1","stroke-width":"1px","tab-size":"8","table-layout":"auto","text-align":"start","text-align-last":"auto","text-anchor":"start","text-combine-upright":"none","text-decoration":"none","text-indent":"0px","text-orientation":"mixed","text-overflow":"clip","text-rendering":"auto","text-shadow":"none","text-transform":"none","top":"auto","touch-action":"auto","transform":"none","transform-style":"flat","transition":"all 0s ease 0s","transition-delay":"0s","transition-duration":"0s","transition-property":"all","transition-timing-function":"ease","unicode-bidi":"normal","unicode-range":"","user-zoom":"","vector-effect":"none","vertical-align":"baseline","visibility":"visible","-webkit-app-region":"no-drag","-webkit-appearance":"none","-webkit-background-clip":"border-box","-webkit-background-composite":"source-over","-webkit-background-origin":"padding-box","-webkit-border-after":"0px none rgb(0, 0, 0)","-webkit-border-after-color":"rgb(0, 0, 0)","-webkit-border-after-style":"none","-webkit-border-after-width":"0px","-webkit-border-before":"0px none rgb(0, 0, 0)","-webkit-border-before-color":"rgb(0, 0, 0)","-webkit-border-before-style":"none","-webkit-border-before-width":"0px","-webkit-border-end":"0px none rgb(0, 0, 0)","-webkit-border-end-color":"rgb(0, 0, 0)","-webkit-border-end-style":"none","-webkit-border-end-width":"0px","-webkit-border-horizontal-spacing":"0px","-webkit-border-image":"none","-webkit-border-start":"0px none rgb(0, 0, 0)","-webkit-border-start-color":"rgb(0, 0, 0)","-webkit-border-start-style":"none","-webkit-border-start-width":"0px","-webkit-border-vertical-spacing":"0px","-webkit-box-align":"stretch","-webkit-box-decoration-break":"slice","-webkit-box-direction":"normal","-webkit-box-flex":"0","-webkit-box-flex-group":"1","-webkit-box-lines":"single","-webkit-box-ordinal-group":"1","-webkit-box-orient":"horizontal","-webkit-box-pack":"start","-webkit-box-reflect":"none","-webkit-clip-path":"none","-webkit-column-break-after":"auto","-webkit-column-break-before":"auto","-webkit-column-break-inside":"auto","-webkit-column-count":"auto","-webkit-column-gap":"normal","-webkit-column-rule":"0px none rgb(0, 0, 0)","-webkit-column-rule-color":"rgb(0, 0, 0)","-webkit-column-rule-style":"none","-webkit-column-rule-width":"0px","-webkit-column-span":"none","-webkit-column-width":"auto","-webkit-columns":"auto auto","-webkit-filter":"none","-webkit-font-size-delta":"","-webkit-font-smoothing":"auto","-webkit-highlight":"none","-webkit-hyphenate-character":"auto","-webkit-line-break":"auto","-webkit-line-clamp":"none","-webkit-locale":"auto","-webkit-logical-height":"8px","-webkit-logical-width":"980px","-webkit-margin-after":"0px","-webkit-margin-after-collapse":"collapse","-webkit-margin-before":"0px","-webkit-margin-before-collapse":"collapse","-webkit-margin-bottom-collapse":"collapse","-webkit-margin-collapse":"","-webkit-margin-end":"0px","-webkit-margin-start":"0px","-webkit-margin-top-collapse":"collapse","-webkit-mask":"","-webkit-mask-box-image":"none","-webkit-mask-box-image-outset":"0px","-webkit-mask-box-image-repeat":"stretch","-webkit-mask-box-image-slice":"0 fill","-webkit-mask-box-image-source":"none","-webkit-mask-box-image-width":"auto","-webkit-mask-clip":"border-box","-webkit-mask-composite":"source-over","-webkit-mask-image":"none","-webkit-mask-origin":"border-box","-webkit-mask-position":"0% 0%","-webkit-mask-position-x":"0%","-webkit-mask-position-y":"0%","-webkit-mask-repeat":"repeat","-webkit-mask-repeat-x":"","-webkit-mask-repeat-y":"","-webkit-mask-size":"auto","-webkit-max-logical-height":"none","-webkit-max-logical-width":"none","-webkit-min-logical-height":"0px","-webkit-min-logical-width":"0px","-webkit-padding-after":"0px","-webkit-padding-before":"0px","-webkit-padding-end":"0px","-webkit-padding-start":"0px","-webkit-perspective-origin-x":"","-webkit-perspective-origin-y":"","-webkit-print-color-adjust":"economy","-webkit-rtl-ordering":"logical","-webkit-ruby-position":"before","-webkit-tap-highlight-color":"rgba(0, 0, 0, 0.180392)","-webkit-text-combine":"none","-webkit-text-decorations-in-effect":"none","-webkit-text-emphasis":"","-webkit-text-emphasis-color":"rgb(0, 0, 0)","-webkit-text-emphasis-position":"over","-webkit-text-emphasis-style":"none","-webkit-text-fill-color":"rgb(0, 0, 0)","-webkit-text-orientation":"vertical-right","-webkit-text-security":"none","-webkit-text-stroke":"","-webkit-text-stroke-color":"rgb(0, 0, 0)","-webkit-text-stroke-width":"0px","-webkit-transform-origin-x":"","-webkit-transform-origin-y":"","-webkit-transform-origin-z":"","-webkit-user-drag":"auto","-webkit-user-modify":"read-only","-webkit-user-select":"text","-webkit-writing-mode":"horizontal-tb","white-space":"normal","widows":"1","will-change":"auto","word-break":"normal","word-spacing":"0px","word-wrap":"normal","writing-mode":"horizontal-tb","x":"0px","y":"0px","z-index":"0","zoom":"1"} + +/***/ }), +/* 185 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(7); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _get2 = __webpack_require__(14); + +var _get3 = _interopRequireDefault(_get2); + +var _inherits2 = __webpack_require__(8); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _Tool2 = __webpack_require__(9); + +var _Tool3 = _interopRequireDefault(_Tool2); + +var _defSnippets = __webpack_require__(186); + +var _defSnippets2 = _interopRequireDefault(_defSnippets); + +var _util = __webpack_require__(0); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Snippets = function (_Tool) { + (0, _inherits3.default)(Snippets, _Tool); + + function Snippets() { + (0, _classCallCheck3.default)(this, Snippets); + + var _this = (0, _possibleConstructorReturn3.default)(this, (Snippets.__proto__ || (0, _getPrototypeOf2.default)(Snippets)).call(this)); + + _this._style = (0, _util.evalCss)(__webpack_require__(187)); + + _this.name = 'snippets'; + + _this._snippets = []; + _this._tpl = __webpack_require__(188); + return _this; + } + + (0, _createClass3.default)(Snippets, [{ + key: 'init', + value: function init($el) { + (0, _get3.default)(Snippets.prototype.__proto__ || (0, _getPrototypeOf2.default)(Snippets.prototype), 'init', this).call(this, $el); + + this._bindEvent(); + this._addDefSnippets(); + } + }, { + key: 'destroy', + value: function destroy() { + (0, _get3.default)(Snippets.prototype.__proto__ || (0, _getPrototypeOf2.default)(Snippets.prototype), 'destroy', this).call(this); + + _util.evalCss.remove(this._style); + } + }, { + key: 'add', + value: function add(name, fn, desc) { + this._snippets.push({ name: name, fn: fn, desc: desc }); + + this._render(); + + return this; + } + }, { + key: 'remove', + value: function remove(name) { + var snippets = this._snippets; + + for (var i = 0, len = snippets.length; i < len; i++) { + if (snippets[i].name === name) snippets.splice(i, 1); + } + + this._render(); + + return this; + } + }, { + key: 'run', + value: function run(name) { + var snippets = this._snippets; + + for (var i = 0, len = snippets.length; i < len; i++) { + if (snippets[i].name === name) this._run(i); + } + + return this; + } + }, { + key: 'clear', + value: function clear() { + this._snippets = []; + this._render(); + + return this; + } + }, { + key: '_bindEvent', + value: function _bindEvent() { + var self = this; + + this._$el.on('click', '.eruda-run', function () { + var idx = (0, _util.$)(this).data('idx'); + + self._run(idx); + }); + } + }, { + key: '_run', + value: function _run(idx) { + this._snippets[idx].fn.call(null); + } + }, { + key: '_addDefSnippets', + value: function _addDefSnippets() { + var _this2 = this; + + (0, _util.each)(_defSnippets2.default, function (snippet) { + _this2.add(snippet.name, snippet.fn, snippet.desc); + }); + } + }, { + key: '_render', + value: function _render() { + this._renderHtml(this._tpl({ + snippets: this._snippets + })); + } + }, { + key: '_renderHtml', + value: function _renderHtml(html) { + if (html === this._lastHtml) return; + this._lastHtml = html; + this._$el.html(html); + } + }]); + return Snippets; +}(_Tool3.default); + +exports.default = Snippets; + +/***/ }), +/* 186 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _stringify = __webpack_require__(33); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _logger = __webpack_require__(36); + +var _logger2 = _interopRequireDefault(_logger); + +var _emitter = __webpack_require__(27); + +var _emitter2 = _interopRequireDefault(_emitter); + +var _util = __webpack_require__(0); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var style = null; + +exports.default = [{ + name: 'Border All', + fn: function fn() { + if (style) { + _util.evalCss.remove(style); + style = null; + return; + } + + style = (0, _util.evalCss)(borderCss); + }, + + desc: 'Add color borders to all elements' +}, { + name: 'Refresh Page', + fn: function fn() { + var url = new _util.Url(); + url.setQuery('timestamp', (0, _util.now)()); + + window.location.replace(url.toString()); + }, + + desc: 'Add timestamp to url and refresh' +}, { + name: 'Search Text', + fn: function fn() { + var keyword = prompt('Enter the text'); + + search(keyword); + }, + + desc: 'Highlight given text on page' +}, { + name: 'Edit Page', + fn: function fn() { + var body = document.body; + + body.contentEditable = body.contentEditable !== 'true'; + }, + + desc: 'Toggle body contentEditable' +}, { + name: 'Load Fps Plugin', + fn: function fn() { + loadPlugin('fps'); + }, + + desc: 'Display page fps' +}, { + name: 'Load Features Plugin', + fn: function fn() { + loadPlugin('features'); + }, + + desc: 'Browser feature detections' +}, { + name: 'Load Timing Plugin', + fn: function fn() { + loadPlugin('timing'); + }, + + desc: 'Show performance and resource timing' +}, { + name: 'Load Memory Plugin', + fn: function fn() { + loadPlugin('memory'); + }, + + desc: 'Display memory' +}, { + name: 'Load Code Plugin', + fn: function fn() { + loadPlugin('code'); + }, + + desc: 'Edit and run JavaScript' +}, { + name: 'Load Benchmark Plugin', + fn: function fn() { + loadPlugin('benchmark'); + }, + + desc: 'Run JavaScript benchmarks' +}, { + name: 'Restore Settings', + fn: function fn() { + var store = (0, _util.safeStorage)('local'); + + var data = JSON.parse((0, _stringify2.default)(store)); + + (0, _util.each)(data, function (val, key) { + if (!(0, _util.isStr)(val)) return; + + if ((0, _util.startWith)(key, 'eruda')) store.removeItem(key); + }); + + window.location.reload(); + }, + + desc: 'Restore defaults and reload' +}]; + + +var borderCss = '', + styleName = (0, _util.has)(document.documentElement.style, 'outline') ? 'outline' : 'border', + selector = 'html', + colors = ['f5f5f5', 'dabb3a', 'abc1c7', '472936', 'c84941', '296dd1', '67adb4', '1ea061']; + +(0, _util.each)(colors, function (color, idx) { + selector += idx === 0 ? '>*:not([class^="eruda-"])' : '>*'; + + borderCss += selector + ('{' + styleName + ': 2px solid #' + color + ' !important}'); +}); + +function search(text) { + var root = document.documentElement, + regText = new RegExp(text, 'ig'); + + traverse(root, function (node) { + var $node = (0, _util.$)(node); + + if (!$node.hasClass('eruda-search-highlight-block')) return; + + return document.createTextNode($node.text()); + }); + + traverse(root, function (node) { + if (node.nodeType !== 3) return; + + var val = node.nodeValue; + val = val.replace(regText, function (match) { + return '' + match + ''; + }); + if (val === node.nodeValue) return; + + var $ret = (0, _util.$)(document.createElement('div')); + + $ret.html(val); + $ret.addClass('eruda-search-highlight-block'); + + return $ret.get(0); + }); +} + +function traverse(root, processor) { + var childNodes = root.childNodes; + + if ((0, _util.isErudaEl)(root)) return; + + for (var i = 0, len = childNodes.length; i < len; i++) { + var newNode = traverse(childNodes[i], processor); + if (newNode) root.replaceChild(newNode, childNodes[i]); + } + + return processor(root); +} + +function loadPlugin(name) { + var globalName = 'eruda' + (0, _util.upperFirst)(name); + if (window[globalName]) return; + + (0, _util.loadJs)('//cdn.jsdelivr.net/npm/eruda-' + name + '@' + pluginVersion[name], function (isLoaded) { + if (!isLoaded || !window[globalName]) return _logger2.default.error('Fail to load plugin ' + name); + + _emitter2.default.emit(_emitter2.default.ADD, window[globalName]); + _emitter2.default.emit(_emitter2.default.SHOW, name); + }); +} + +var pluginVersion = { + fps: '1.0.2', + features: '1.0.2', + timing: '1.1.1', + memory: '1.0.1', + code: '1.0.0', + benchmark: '1.0.0' +}; + +/***/ }), +/* 187 */ +/***/ (function(module, exports, __webpack_require__) { + +exports = module.exports = __webpack_require__(6)(false); +// imports + + +// module +exports.push([module.i, ".eruda-dev-tools .eruda-tools .eruda-snippets {\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n padding: 10px; }\n .eruda-dev-tools .eruda-tools .eruda-snippets .eruda-section {\n margin-bottom: 10px;\n border-radius: 4px;\n -webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 4px 0 rgba(0, 0, 0, 0.08), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 4px 0 rgba(0, 0, 0, 0.08), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n overflow: hidden;\n cursor: pointer; }\n .eruda-dev-tools .eruda-tools .eruda-snippets .eruda-section:active .eruda-name {\n background: #263238; }\n .eruda-dev-tools .eruda-tools .eruda-snippets .eruda-section:active .eruda-description {\n background: #eceffe; }\n .eruda-dev-tools .eruda-tools .eruda-snippets .eruda-section .eruda-name {\n padding: 10px;\n color: #fff;\n background: #707d8b;\n -webkit-transition: background 0.3s;\n transition: background 0.3s; }\n .eruda-dev-tools .eruda-tools .eruda-snippets .eruda-section .eruda-name .eruda-btn {\n margin-left: 10px;\n float: right;\n text-align: center;\n width: 18px;\n height: 18px;\n line-height: 18px;\n font-size: 12px; }\n .eruda-dev-tools .eruda-tools .eruda-snippets .eruda-section .eruda-description {\n background: #fff;\n padding: 10px;\n -webkit-transition: background 0.3s;\n transition: background 0.3s; }\n\n.eruda-search-highlight-block {\n display: inline; }\n .eruda-search-highlight-block .eruda-keyword {\n background: #ffc107;\n color: #fff; }\n", ""]); + +// exports + + +/***/ }), +/* 188 */ +/***/ (function(module, exports, __webpack_require__) { + +var Handlebars = __webpack_require__(3); +function __default(obj) { return obj && (obj.__esModule ? obj["default"] : obj); } +module.exports = (Handlebars["default"] || Handlebars).template({"1":function(container,depth0,helpers,partials,data) { + var alias1=container.lambda, alias2=container.escapeExpression; + + return "
    \r\n

    " + + alias2(alias1((depth0 != null ? depth0.name : depth0), depth0)) + + "\r\n
    \r\n \r\n
    \r\n

    \r\n
    \r\n " + + alias2(alias1((depth0 != null ? depth0.desc : depth0), depth0)) + + "\r\n
    \r\n
    \r\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.snippets : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"useData":true}); + +/***/ }), +/* 189 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getIterator2 = __webpack_require__(75); + +var _getIterator3 = _interopRequireDefault(_getIterator2); + +var _stringify = __webpack_require__(33); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(7); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _get2 = __webpack_require__(14); + +var _get3 = _interopRequireDefault(_get2); + +var _inherits2 = __webpack_require__(8); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _Tool2 = __webpack_require__(9); + +var _Tool3 = _interopRequireDefault(_Tool2); + +var _Settings = __webpack_require__(13); + +var _Settings2 = _interopRequireDefault(_Settings); + +var _util = __webpack_require__(0); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Resources = function (_Tool) { + (0, _inherits3.default)(Resources, _Tool); + + function Resources() { + (0, _classCallCheck3.default)(this, Resources); + + var _this = (0, _possibleConstructorReturn3.default)(this, (Resources.__proto__ || (0, _getPrototypeOf2.default)(Resources)).call(this)); + + _this._style = (0, _util.evalCss)(__webpack_require__(190)); + + _this.name = 'resources'; + _this._localStoreData = []; + _this._hideErudaSetting = false; + _this._sessionStoreData = []; + _this._cookieData = []; + _this._scriptData = []; + _this._stylesheetData = []; + _this._iframeData = []; + _this._imageData = []; + _this._observeElement = true; + _this._tpl = __webpack_require__(191); + return _this; + } + + (0, _createClass3.default)(Resources, [{ + key: 'init', + value: function init($el, container) { + (0, _get3.default)(Resources.prototype.__proto__ || (0, _getPrototypeOf2.default)(Resources.prototype), 'init', this).call(this, $el); + + this._container = container; + + this.refresh(); + this._bindEvent(); + this._initObserver(); + this._initCfg(); + } + }, { + key: 'refresh', + value: function refresh() { + return this.refreshLocalStorage().refreshSessionStorage().refreshCookie().refreshScript().refreshStylesheet().refreshIframe().refreshImage()._render(); + } + }, { + key: 'destroy', + value: function destroy() { + (0, _get3.default)(Resources.prototype.__proto__ || (0, _getPrototypeOf2.default)(Resources.prototype), 'destroy', this).call(this); + + this._disableObserver(); + _util.evalCss.remove(this._style); + } + }, { + key: 'refreshScript', + value: function refreshScript() { + var scriptData = []; + + (0, _util.$)('script').each(function () { + var src = this.src; + + if (src !== '') scriptData.push(src); + }); + + scriptData = (0, _util.unique)(scriptData); + + this._scriptData = scriptData; + + return this; + } + }, { + key: 'refreshStylesheet', + value: function refreshStylesheet() { + var stylesheetData = []; + + (0, _util.$)('link').each(function () { + if (this.rel !== 'stylesheet') return; + + stylesheetData.push(this.href); + }); + + stylesheetData = (0, _util.unique)(stylesheetData); + + this._stylesheetData = stylesheetData; + + return this; + } + }, { + key: 'refreshIframe', + value: function refreshIframe() { + var iframeData = []; + + (0, _util.$)('iframe').each(function () { + var $this = (0, _util.$)(this), + src = $this.attr('src'); + + if (src) iframeData.push(src); + }); + + iframeData = (0, _util.unique)(iframeData); + + this._iframeData = iframeData; + + return this; + } + }, { + key: 'refreshLocalStorage', + value: function refreshLocalStorage() { + this._refreshStorage('local'); + + return this; + } + }, { + key: 'refreshSessionStorage', + value: function refreshSessionStorage() { + this._refreshStorage('session'); + + return this; + } + }, { + key: '_refreshStorage', + value: function _refreshStorage(type) { + var _this2 = this; + + var store = (0, _util.safeStorage)(type, false); + + if (!store) return; + + var storeData = []; + + // Mobile safari is not able to loop through localStorage directly. + store = JSON.parse((0, _stringify2.default)(store)); + + (0, _util.each)(store, function (val, key) { + // According to issue 20, not all values are guaranteed to be string. + if (!(0, _util.isStr)(val)) return; + + if (_this2._hideErudaSetting) { + if ((0, _util.startWith)(key, 'eruda') || key === 'active-eruda') return; + } + + storeData.push({ + key: key, + val: sliceStr(val, 200) + }); + }); + + this['_' + type + 'StoreData'] = storeData; + } + }, { + key: 'refreshCookie', + value: function refreshCookie() { + var cookieData = []; + + var cookie = document.cookie; + if ((0, _util.trim)(cookie) !== '') { + (0, _util.each)(document.cookie.split(';'), function (val, t) { + val = val.split('='); + try { + t = decodeURIComponent(val[1]); + } catch (e) { + t = val[1]; + } + cookieData.push({ + key: (0, _util.trim)(val[0]), + val: t + }); + }); + } + + this._cookieData = cookieData; + + return this; + } + }, { + key: 'refreshImage', + value: function refreshImage() { + var imageData = []; + + var performance = this._performance = window.webkitPerformance || window.performance; + if (performance && performance.getEntries) { + var entries = this._performance.getEntries(); + entries.forEach(function (entry) { + if (entry.initiatorType === 'img' || isImg(entry.name)) { + imageData.push(entry.name); + } + }); + } else { + (0, _util.$)('img').each(function () { + var $this = (0, _util.$)(this), + src = $this.attr('src'); + + if ($this.data('exclude') === 'true') return; + + imageData.push(src); + }); + } + + imageData = (0, _util.unique)(imageData); + imageData.sort(); + this._imageData = imageData; + + return this; + } + }, { + key: 'show', + value: function show() { + (0, _get3.default)(Resources.prototype.__proto__ || (0, _getPrototypeOf2.default)(Resources.prototype), 'show', this).call(this); + if (this._observeElement) this._enableObserver(); + + return this.refresh(); + } + }, { + key: 'hide', + value: function hide() { + this._disableObserver(); + + return (0, _get3.default)(Resources.prototype.__proto__ || (0, _getPrototypeOf2.default)(Resources.prototype), 'hide', this).call(this); + } + }, { + key: '_bindEvent', + value: function _bindEvent() { + var _this3 = this; + + var self = this, + $el = this._$el, + container = this._container; + + $el.on('click', '.eruda-refresh-local-storage', function () { + return _this3.refreshLocalStorage()._render(); + }).on('click', '.eruda-refresh-session-storage', function () { + return _this3.refreshSessionStorage()._render(); + }).on('click', '.eruda-refresh-cookie', function () { + return _this3.refreshCookie()._render(); + }).on('click', '.eruda-refresh-script', function () { + return _this3.refreshScript()._render(); + }).on('click', '.eruda-refresh-stylesheet', function () { + return _this3.refreshStylesheet()._render(); + }).on('click', '.eruda-refresh-iframe', function () { + return _this3.refreshIframe()._render(); + }).on('click', '.eruda-refresh-image', function () { + return _this3.refreshImage()._render(); + }).on('click', '.eruda-delete-storage', function () { + var $this = (0, _util.$)(this), + key = $this.data('key'), + type = $this.data('type'); + + if (type === 'local') { + localStorage.removeItem(key); + self.refreshLocalStorage()._render(); + } else { + sessionStorage.removeItem(key); + self.refreshSessionStorage()._render(); + } + }).on('click', '.eruda-delete-cookie', function () { + var key = (0, _util.$)(this).data('key'); + + delCookie(key); + self.refreshCookie()._render(); + }).on('click', '.eruda-clear-storage', function () { + var type = (0, _util.$)(this).data('type'); + + if (type === 'local') { + (0, _util.each)(self._localStoreData, function (val) { + return localStorage.removeItem(val.key); + }); + self.refreshLocalStorage()._render(); + } else { + (0, _util.each)(self._sessionStoreData, function (val) { + return sessionStorage.removeItem(val.key); + }); + self.refreshSessionStorage()._render(); + } + }).on('click', '.eruda-clear-cookie', function () { + (0, _util.each)(_this3._cookieData, function (val) { + return delCookie(val.key); + }); + _this3.refreshCookie()._render(); + }).on('click', '.eruda-storage-val', function () { + var $this = (0, _util.$)(this), + key = $this.data('key'), + type = $this.data('type'); + + var val = type === 'local' ? localStorage.getItem(key) : sessionStorage.getItem(key); + + try { + showSources('json', JSON.parse(val)); + } catch (e) { + showSources('raw', val); + } + }).on('click', '.eruda-img-link', function () { + var src = (0, _util.$)(this).attr('src'); + + showSources('img', src); + }).on('click', '.eruda-css-link', linkFactory('css')).on('click', '.eruda-js-link', linkFactory('js')).on('click', '.eruda-iframe-link', linkFactory('iframe')); + + _util.orientation.on('change', function () { + return _this3._render(); + }); + + function showSources(type, data) { + var sources = container.get('sources'); + if (!sources) return; + + sources.set(type, data); + + container.showTool('sources'); + + return true; + } + + function linkFactory(type) { + return function (e) { + if (!container.get('sources')) return; + e.preventDefault(); + + var url = (0, _util.$)(this).attr('href'); + + if (type === 'iframe' || (0, _util.isCrossOrig)(url)) { + showSources('iframe', url); + } else { + (0, _util.ajax)({ + url: url, + success: function success(data) { + showSources(type, data); + }, + dataType: 'raw' + }); + } + }; + } + } + }, { + key: '_initCfg', + value: function _initCfg() { + var _this4 = this; + + var cfg = this.config = _Settings2.default.createCfg('resources', { + hideErudaSetting: true, + observeElement: true + }); + + if (cfg.get('hideErudaSetting')) this._hideErudaSetting = true; + if (!cfg.get('observeElement')) this._observeElement = false; + + cfg.on('change', function (key, val) { + switch (key) { + case 'hideErudaSetting': + _this4._hideErudaSetting = val;return; + case 'observeElement': + _this4._observeElement = val; + return val ? _this4._enableObserver() : _this4._disableObserver(); + } + }); + + var settings = this._container.get('settings'); + settings.text('Resources').switch(cfg, 'hideErudaSetting', 'Hide Eruda Setting').switch(cfg, 'observeElement', 'Auto Refresh Elements').separator(); + } + }, { + key: '_render', + value: function _render() { + var cookieData = this._cookieData, + scriptData = this._scriptData, + stylesheetData = this._stylesheetData, + imageData = this._imageData; + + this._renderHtml(this._tpl({ + localStoreData: this._localStoreData, + sessionStoreData: this._sessionStoreData, + cookieData: cookieData, + cookieState: getState('cookie', cookieData.length), + scriptData: scriptData, + scriptState: getState('script', scriptData.length), + stylesheetData: stylesheetData, + stylesheetState: getState('stylesheet', stylesheetData.length), + iframeData: this._iframeData, + imageData: imageData, + imageState: getState('image', imageData.length) + })); + } + }, { + key: '_renderHtml', + value: function _renderHtml(html) { + if (html === this._lastHtml) return; + this._lastHtml = html; + this._$el.html(html); + } + }, { + key: '_initObserver', + value: function _initObserver() { + var _this5 = this; + + this._observer = new _util.SafeMutationObserver(function (mutations) { + var needToRender = false; + (0, _util.each)(mutations, function (mutation) { + if (_this5._handleMutation(mutation)) needToRender = true; + }); + if (needToRender) _this5._render(); + }); + } + }, { + key: '_handleMutation', + value: function _handleMutation(mutation) { + var _this6 = this; + + if ((0, _util.isErudaEl)(mutation.target)) return; + + var checkEl = function checkEl(el) { + var tagName = getLowerCaseTagName(el); + switch (tagName) { + case 'script': + _this6.refreshScript();return true; + case 'img': + _this6.refreshImage();return true; + case 'link': + _this6.refreshStylesheet();return true; + } + + return false; + }; + + if (mutation.type === 'attributes') { + if (checkEl(mutation.target)) return true; + } else if (mutation.type === 'childList') { + if (checkEl(mutation.target)) return true; + var nodes = (0, _util.toArr)(mutation.addedNodes); + nodes = (0, _util.concat)(nodes, (0, _util.toArr)(mutation.removedNodes)); + + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = (0, _getIterator3.default)(nodes), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var node = _step.value; + + if (checkEl(node)) return true; + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + } + + return false; + } + }, { + key: '_enableObserver', + value: function _enableObserver() { + this._observer.observe(document.documentElement, { + attributes: true, + childList: true, + subtree: true + }); + } + }, { + key: '_disableObserver', + value: function _disableObserver() { + this._observer.disconnect(); + } + }]); + return Resources; +}(_Tool3.default); + +exports.default = Resources; + + +function getState(type, len) { + if (len === 0) return ''; + + var warn = 0, + danger = 0; + + switch (type) { + case 'cookie': + warn = 30;danger = 60;break; + case 'script': + warn = 5;danger = 10;break; + case 'stylesheet': + warn = 4;danger = 8;break; + case 'image': + warn = 50;danger = 100;break; + } + + if (len >= danger) return 'eruda-danger'; + if (len >= warn) return 'eruda-warn'; + + return 'eruda-ok'; +} + +var _window$location = window.location, + hostname = _window$location.hostname, + pathname = _window$location.pathname; + + +function delCookie(key) { + var hostNames = hostname.split('.'), + pathNames = pathname.split('/'), + domain = '', + pathLen = pathNames.length, + path = void 0; + + if (del()) return; + + for (var i = hostNames.length - 1; i >= 0; i--) { + var hostName = hostNames[i]; + if (hostName === '') continue; + domain = domain === '' ? hostName : hostName + '.' + domain; + + path = '/'; + if (del({ domain: domain, path: path }) || del({ domain: domain })) return; + + for (var j = 0; j < pathLen; j++) { + var pathName = pathNames[j]; + if (pathName === '') continue; + + path += pathName; + if (del({ domain: domain, path: path }) || del({ path: path })) return; + + path += '/'; + if (del({ domain: domain, path: path }) || del({ path: path })) return; + } + } + + function del() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + _util.cookie.remove(key, options); + + return !_util.cookie.get(key); + } +} + +function getLowerCaseTagName(el) { + if (!el.tagName) return ''; + return el.tagName.toLowerCase(); +} + +var sliceStr = function sliceStr(str, len) { + return str.length < len ? str : str.slice(0, len) + '...'; +}; + +var regImg = /\.(jpeg|jpg|gif|png)$/; + +var isImg = function isImg(url) { + return regImg.test(url); +}; + +/***/ }), +/* 190 */ +/***/ (function(module, exports, __webpack_require__) { + +exports = module.exports = __webpack_require__(6)(false); +// imports + + +// module +exports.push([module.i, ".eruda-dev-tools .eruda-tools .eruda-resources {\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n padding: 10px;\n font-size: 14px; }\n .eruda-dev-tools .eruda-tools .eruda-resources .eruda-section {\n margin-bottom: 10px;\n border-radius: 4px;\n -webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 4px 0 rgba(0, 0, 0, 0.08), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 4px 0 rgba(0, 0, 0, 0.08), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n overflow: hidden; }\n .eruda-dev-tools .eruda-tools .eruda-resources .eruda-title {\n padding: 10px;\n color: #fff;\n background: #2196f3; }\n .eruda-dev-tools .eruda-tools .eruda-resources .eruda-title .eruda-btn {\n margin-left: 10px;\n float: right;\n background: #fff;\n color: #707d8b;\n text-align: center;\n width: 18px;\n height: 18px;\n line-height: 18px;\n border-radius: 50%;\n font-size: 12px;\n cursor: pointer;\n -webkit-transition: color 0.3s;\n transition: color 0.3s; }\n .eruda-dev-tools .eruda-tools .eruda-resources .eruda-title .eruda-btn:active {\n color: #263238; }\n .eruda-dev-tools .eruda-tools .eruda-resources .eruda-title.eruda-ok {\n background: #009688; }\n .eruda-dev-tools .eruda-tools .eruda-resources .eruda-title.eruda-warn {\n background: #ffc107; }\n .eruda-dev-tools .eruda-tools .eruda-resources .eruda-title.eruda-danger {\n background: #f44336; }\n .eruda-dev-tools .eruda-tools .eruda-resources .eruda-link-list {\n font-size: 12px; }\n .eruda-dev-tools .eruda-tools .eruda-resources .eruda-link-list li {\n padding: 10px;\n background: #fff;\n word-break: break-all; }\n .eruda-dev-tools .eruda-tools .eruda-resources .eruda-link-list li a {\n color: #2196f3 !important; }\n .eruda-dev-tools .eruda-tools .eruda-resources .eruda-image-list {\n font-size: 12px;\n background: #fff;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n padding: 10px !important; }\n .eruda-dev-tools .eruda-tools .eruda-resources .eruda-image-list:after {\n content: '';\n display: block;\n clear: both; }\n .eruda-dev-tools .eruda-tools .eruda-resources .eruda-image-list li {\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n cursor: pointer;\n overflow-y: hidden; }\n .eruda-dev-tools .eruda-tools .eruda-resources .eruda-image-list li.eruda-image {\n height: 100px;\n font-size: 0; }\n .eruda-dev-tools .eruda-tools .eruda-resources .eruda-image-list li img {\n height: 100px;\n min-width: 100%;\n -o-object-fit: cover;\n object-fit: cover; }\n .eruda-dev-tools .eruda-tools .eruda-resources table {\n border-collapse: collapse;\n width: 100%;\n font-size: 12px;\n background: #fff; }\n .eruda-dev-tools .eruda-tools .eruda-resources table td {\n padding: 10px;\n word-break: break-all; }\n .eruda-dev-tools .eruda-tools .eruda-resources table td.eruda-key {\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n white-space: nowrap;\n max-width: 120px; }\n .eruda-dev-tools .eruda-tools .eruda-resources table td.eruda-control {\n padding: 0;\n font-size: 0;\n width: 40px; }\n .eruda-dev-tools .eruda-tools .eruda-resources table td.eruda-control .eruda-icon-trash {\n cursor: pointer;\n color: #f44336;\n font-size: 14px;\n display: inline-block;\n width: 40px;\n height: 40px;\n text-align: center;\n line-height: 40px;\n -webkit-transition: color 0.3s;\n transition: color 0.3s; }\n .eruda-dev-tools .eruda-tools .eruda-resources table td.eruda-control .eruda-icon-trash:active {\n color: #b71c1c; }\n", ""]); + +// exports + + +/***/ }), +/* 191 */ +/***/ (function(module, exports, __webpack_require__) { + +var Handlebars = __webpack_require__(3); +function __default(obj) { return obj && (obj.__esModule ? obj["default"] : obj); } +module.exports = (Handlebars["default"] || Handlebars).template({"1":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.localStoreData : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"2":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return " \r\n " + + alias4(((helper = (helper = helpers.key || (depth0 != null ? depth0.key : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"key","hash":{},"data":data}) : helper))) + + "\r\n " + + alias4(((helper = (helper = helpers.val || (depth0 != null ? depth0.val : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"val","hash":{},"data":data}) : helper))) + + "\r\n \r\n \r\n \r\n \r\n"; +},"4":function(container,depth0,helpers,partials,data) { + return " \r\n Empty\r\n \r\n"; +},"6":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.sessionStoreData : depth0),{"name":"each","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"7":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return " \r\n " + + alias4(((helper = (helper = helpers.key || (depth0 != null ? depth0.key : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"key","hash":{},"data":data}) : helper))) + + "\r\n " + + alias4(((helper = (helper = helpers.val || (depth0 != null ? depth0.val : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"val","hash":{},"data":data}) : helper))) + + "\r\n \r\n \r\n \r\n \r\n"; +},"9":function(container,depth0,helpers,partials,data) { + return " \r\n Empty\r\n \r\n"; +},"11":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.cookieData : depth0),{"name":"each","hash":{},"fn":container.program(12, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"12":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return " \r\n " + + alias4(((helper = (helper = helpers.key || (depth0 != null ? depth0.key : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"key","hash":{},"data":data}) : helper))) + + "\r\n " + + alias4(((helper = (helper = helpers.val || (depth0 != null ? depth0.val : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"val","hash":{},"data":data}) : helper))) + + "\r\n \r\n \r\n \r\n \r\n"; +},"14":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.scriptData : depth0),{"name":"each","hash":{},"fn":container.program(15, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"15":function(container,depth0,helpers,partials,data) { + var alias1=container.lambda, alias2=container.escapeExpression; + + return "
  • \r\n " + + alias2(alias1(depth0, depth0)) + + "\r\n
  • \r\n"; +},"17":function(container,depth0,helpers,partials,data) { + return "
  • Empty
  • \r\n"; +},"19":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.stylesheetData : depth0),{"name":"each","hash":{},"fn":container.program(20, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"20":function(container,depth0,helpers,partials,data) { + var alias1=container.lambda, alias2=container.escapeExpression; + + return "
  • \r\n " + + alias2(alias1(depth0, depth0)) + + "\r\n
  • \r\n"; +},"22":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.iframeData : depth0),{"name":"each","hash":{},"fn":container.program(23, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"23":function(container,depth0,helpers,partials,data) { + var alias1=container.lambda, alias2=container.escapeExpression; + + return "
  • \r\n " + + alias2(alias1(depth0, depth0)) + + "\r\n
  • \r\n"; +},"25":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.imageData : depth0),{"name":"each","hash":{},"fn":container.program(26, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"26":function(container,depth0,helpers,partials,data) { + return "
  • \r\n \r\n
  • \r\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
    \r\n

    \r\n Local Storage\r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n

    \r\n \r\n \r\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.localStoreData : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "") + + " \r\n
    \r\n
    \r\n
    \r\n

    \r\n Session Storage\r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n

    \r\n \r\n \r\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.sessionStoreData : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.program(9, data, 0),"data":data})) != null ? stack1 : "") + + " \r\n
    \r\n
    \r\n
    \r\n

    \r\n Cookie\r\n
    \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n

    \r\n \r\n \r\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.cookieData : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.program(4, data, 0),"data":data})) != null ? stack1 : "") + + " \r\n
    \r\n
    \r\n
    \r\n

    \r\n Script\r\n
    \r\n \r\n
    \r\n

    \r\n \r\n
    \r\n
    \r\n

    \r\n Stylesheet\r\n
    \r\n \r\n
    \r\n

    \r\n \r\n
    \r\n
    \r\n

    \r\n Iframe\r\n
    \r\n \r\n
    \r\n

    \r\n \r\n
    \r\n
    \r\n

    \r\n Image\r\n
    \r\n \r\n
    \r\n

    \r\n
      \r\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.imageData : depth0),{"name":"if","hash":{},"fn":container.program(25, data, 0),"inverse":container.program(17, data, 0),"data":data})) != null ? stack1 : "") + + "
    \r\n
    \r\n"; +},"useData":true}); + +/***/ }), +/* 192 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(7); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _get2 = __webpack_require__(14); + +var _get3 = _interopRequireDefault(_get2); + +var _inherits2 = __webpack_require__(8); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _Tool2 = __webpack_require__(9); + +var _Tool3 = _interopRequireDefault(_Tool2); + +var _defInfo = __webpack_require__(193); + +var _defInfo2 = _interopRequireDefault(_defInfo); + +var _util = __webpack_require__(0); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Info = function (_Tool) { + (0, _inherits3.default)(Info, _Tool); + + function Info() { + (0, _classCallCheck3.default)(this, Info); + + var _this = (0, _possibleConstructorReturn3.default)(this, (Info.__proto__ || (0, _getPrototypeOf2.default)(Info)).call(this)); + + _this._style = (0, _util.evalCss)(__webpack_require__(194)); + + _this.name = 'info'; + _this._tpl = __webpack_require__(195); + _this._infos = []; + return _this; + } + + (0, _createClass3.default)(Info, [{ + key: 'init', + value: function init($el) { + (0, _get3.default)(Info.prototype.__proto__ || (0, _getPrototypeOf2.default)(Info.prototype), 'init', this).call(this, $el); + + this._addDefInfo(); + } + }, { + key: 'show', + value: function show() { + this._render(); + + (0, _get3.default)(Info.prototype.__proto__ || (0, _getPrototypeOf2.default)(Info.prototype), 'show', this).call(this); + } + }, { + key: 'destroy', + value: function destroy() { + (0, _get3.default)(Info.prototype.__proto__ || (0, _getPrototypeOf2.default)(Info.prototype), 'destroy', this).call(this); + + _util.evalCss.remove(this._style); + } + }, { + key: 'add', + value: function add(name, val) { + var infos = this._infos, + isUpdate = false; + + (0, _util.each)(infos, function (info) { + if (name !== info.name) return; + + info.val = val; + isUpdate = true; + }); + + if (!isUpdate) infos.push({ name: name, val: val }); + + this._render(); + + return this; + } + }, { + key: 'remove', + value: function remove(name) { + var infos = this._infos; + + for (var i = infos.length - 1; i >= 0; i--) { + if (infos[i].name === name) infos.splice(i, 1); + } + + this._render(); + + return this; + } + }, { + key: 'clear', + value: function clear() { + this._infos = []; + + this._render(); + + return this; + } + }, { + key: '_addDefInfo', + value: function _addDefInfo() { + var _this2 = this; + + (0, _util.each)(_defInfo2.default, function (info) { + return _this2.add(info.name, info.val); + }); + } + }, { + key: '_render', + value: function _render() { + var infos = []; + + (0, _util.each)(this._infos, function (_ref) { + var name = _ref.name, + val = _ref.val; + + if ((0, _util.isFn)(val)) val = val(); + + infos.push({ name: name, val: val }); + }); + + this._renderHtml(this._tpl({ infos: infos })); + } + }, { + key: '_renderHtml', + value: function _renderHtml(html) { + if (html === this._lastHtml) return; + this._lastHtml = html; + this._$el.html(html); + } + }]); + return Info; +}(_Tool3.default); + +exports.default = Info; + +/***/ }), +/* 193 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _util = __webpack_require__(0); + +var browser = (0, _util.detectBrowser)(); + +exports.default = [{ + name: 'Location', + val: function val() { + return location.href; + } +}, { + name: 'User Agent', + val: navigator.userAgent +}, { + name: 'Device', + val: '\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    screen' + screen.width + ' * ' + screen.height + '
    viewport' + window.innerWidth + ' * ' + window.innerHeight + '
    pixel ratio' + window.devicePixelRatio + '
    ' + +}, { + name: 'System', + val: '\n \n \n \n \n \n \n \n \n \n \n
    os' + (0, _util.detectOs)() + '
    browser' + (browser.name + ' ' + browser.version) + '
    ' +}, { + name: 'About', + val: 'Eruda v' + "1.4.3" + '' +}]; + +/***/ }), +/* 194 */ +/***/ (function(module, exports, __webpack_require__) { + +exports = module.exports = __webpack_require__(6)(false); +// imports + + +// module +exports.push([module.i, ".eruda-dev-tools .eruda-tools .eruda-info.eruda-tool {\n overflow-y: auto;\n -webkit-overflow-scrolling: touch; }\n .eruda-dev-tools .eruda-tools .eruda-info.eruda-tool li {\n border-radius: 4px;\n background: #fff;\n margin: 10px;\n -webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 4px 0 rgba(0, 0, 0, 0.08), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 4px 0 rgba(0, 0, 0, 0.08), 0 3px 1px -2px rgba(0, 0, 0, 0.2); }\n .eruda-dev-tools .eruda-tools .eruda-info.eruda-tool li .eruda-title, .eruda-dev-tools .eruda-tools .eruda-info.eruda-tool li .eruda-content {\n padding: 10px; }\n .eruda-dev-tools .eruda-tools .eruda-info.eruda-tool li .eruda-title {\n padding-bottom: 0;\n font-size: 16px;\n color: #2196f3; }\n .eruda-dev-tools .eruda-tools .eruda-info.eruda-tool li .eruda-content {\n margin: 0;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n word-break: break-all; }\n .eruda-dev-tools .eruda-tools .eruda-info.eruda-tool li .eruda-content table {\n width: 100%;\n border-collapse: collapse; }\n .eruda-dev-tools .eruda-tools .eruda-info.eruda-tool li .eruda-content table th, .eruda-dev-tools .eruda-tools .eruda-info.eruda-tool li .eruda-content table td {\n border: 1px solid #eceffe;\n padding: 10px; }\n .eruda-dev-tools .eruda-tools .eruda-info.eruda-tool li .eruda-content * {\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text; }\n .eruda-dev-tools .eruda-tools .eruda-info.eruda-tool li .eruda-content a {\n color: #2196f3; }\n .eruda-dev-tools .eruda-tools .eruda-info.eruda-tool li .eruda-device-key, .eruda-dev-tools .eruda-tools .eruda-info.eruda-tool li .eruda-system-key {\n width: 100px; }\n", ""]); + +// exports + + +/***/ }), +/* 195 */ +/***/ (function(module, exports, __webpack_require__) { + +var Handlebars = __webpack_require__(3); +function __default(obj) { return obj && (obj.__esModule ? obj["default"] : obj); } +module.exports = (Handlebars["default"] || Handlebars).template({"1":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function"; + + return "
  • \r\n

    " + + container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"name","hash":{},"data":data}) : helper))) + + "

    \r\n
    " + + ((stack1 = ((helper = (helper = helpers.val || (depth0 != null ? depth0.val : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"val","hash":{},"data":data}) : helper))) != null ? stack1 : "") + + "
    \r\n
  • \r\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1; + + return "
      \r\n" + + ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.infos : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
    \r\n"; +},"useData":true}); + +/***/ }), +/* 196 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(7); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _get2 = __webpack_require__(14); + +var _get3 = _interopRequireDefault(_get2); + +var _inherits2 = __webpack_require__(8); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _Tool2 = __webpack_require__(9); + +var _Tool3 = _interopRequireDefault(_Tool2); + +var _jsBeautify = __webpack_require__(57); + +var _jsBeautify2 = _interopRequireDefault(_jsBeautify); + +var _highlight = __webpack_require__(56); + +var _highlight2 = _interopRequireDefault(_highlight); + +var _JsonViewer = __webpack_require__(77); + +var _JsonViewer2 = _interopRequireDefault(_JsonViewer); + +var _Settings = __webpack_require__(13); + +var _Settings2 = _interopRequireDefault(_Settings); + +var _util = __webpack_require__(0); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Sources = function (_Tool) { + (0, _inherits3.default)(Sources, _Tool); + + function Sources() { + (0, _classCallCheck3.default)(this, Sources); + + var _this = (0, _possibleConstructorReturn3.default)(this, (Sources.__proto__ || (0, _getPrototypeOf2.default)(Sources)).call(this)); + + _this._style = (0, _util.evalCss)(__webpack_require__(197)); + + _this.name = 'sources'; + _this._showLineNum = true; + _this._formatCode = true; + + _this._loadTpl(); + return _this; + } + + (0, _createClass3.default)(Sources, [{ + key: 'init', + value: function init($el, container) { + (0, _get3.default)(Sources.prototype.__proto__ || (0, _getPrototypeOf2.default)(Sources.prototype), 'init', this).call(this, $el); + + this._container = container; + this._bindEvent(); + this._initCfg(); + } + }, { + key: 'destroy', + value: function destroy() { + (0, _get3.default)(Sources.prototype.__proto__ || (0, _getPrototypeOf2.default)(Sources.prototype), 'destroy', this).call(this); + + _util.evalCss.remove(this._style); + } + }, { + key: 'set', + value: function set(type, val) { + if (type === 'img') { + this._isFetchingData = true; + + var img = new Image(); + + var self = this; + + img.onload = function () { + self._isFetchingData = false; + self._data = { + type: 'img', + val: { + width: this.width, + height: this.height, + src: val + } + }; + + self._render(); + }; + img.onerror = function () { + self._isFetchingData = false; + }; + + img.src = val; + + return; + } + + this._data = { type: type, val: val }; + + this._render(); + + return this; + } + }, { + key: 'show', + value: function show() { + (0, _get3.default)(Sources.prototype.__proto__ || (0, _getPrototypeOf2.default)(Sources.prototype), 'show', this).call(this); + + if (!this._data && !this._isFetchingData) { + this._renderDef(); + } + + return this; + } + }, { + key: '_renderDef', + value: function _renderDef() { + var _this2 = this; + + if (this._html) { + this._data = { + type: 'html', + val: this._html + }; + + return this._render(); + } + + if (this._isGettingHtml) return; + this._isGettingHtml = true; + + (0, _util.ajax)({ + url: location.href, + success: function success(data) { + return _this2._html = data; + }, + error: function error() { + return _this2._html = 'Sorry, unable to fetch source code:('; + }, + complete: function complete() { + _this2._isGettingHtml = false; + _this2._renderDef(); + }, + dataType: 'raw' + }); + } + }, { + key: '_bindEvent', + value: function _bindEvent() { + var _this3 = this; + + this._container.on('showTool', function (name, lastTool) { + if (name !== _this3.name && lastTool.name === _this3.name) { + delete _this3._data; + } + }); + + this._$el.on('click', '.eruda-http .eruda-response', function () { + var data = _this3._data.val, + resTxt = data.resTxt; + + switch (data.subType) { + case 'css': + return _this3.set('css', resTxt); + case 'html': + return _this3.set('html', resTxt); + case 'javascript': + return _this3.set('js', resTxt); + case 'json': + return _this3.set('json', resTxt); + } + switch (data.type) { + case 'image': + return _this3.set('img', data.url); + } + }); + } + }, { + key: '_loadTpl', + value: function _loadTpl() { + this._codeTpl = __webpack_require__(198); + this._imgTpl = __webpack_require__(199); + this._httpTpl = __webpack_require__(200); + this._jsonTpl = __webpack_require__(201); + this._rawTpl = __webpack_require__(202); + this._iframeTpl = __webpack_require__(203); + } + }, { + key: '_initCfg', + value: function _initCfg() { + var _this4 = this; + + var cfg = this.config = _Settings2.default.createCfg('sources', { + 'showLineNum': true, + 'formatCode': true + }); + + if (!cfg.get('showLineNum')) this._showLineNum = false; + if (!cfg.get('formatCode')) this._formatCode = false; + + cfg.on('change', function (key, val) { + switch (key) { + case 'showLineNum': + _this4._showLineNum = val;return; + case 'formatCode': + _this4._formatCode = val;return; + } + }); + + var settings = this._container.get('settings'); + settings.text('Sources').switch(cfg, 'showLineNum', 'Show Line Numbers').switch(cfg, 'formatCode', 'Beautify Code').separator(); + } + }, { + key: '_render', + value: function _render() { + this._isInit = true; + + var data = this._data; + + switch (data.type) { + case 'html': + case 'js': + case 'css': + return this._renderCode(); + case 'img': + return this._renderImg(); + case 'http': + return this._renderHttp(); + case 'json': + return this._renderJson(); + case 'raw': + return this._renderRaw(); + case 'iframe': + return this._renderIframe(); + } + } + }, { + key: '_renderImg', + value: function _renderImg() { + this._renderHtml(this._imgTpl(this._data.val)); + } + }, { + key: '_renderHttp', + value: function _renderHttp() { + var val = this._data.val; + + if (val.resTxt.trim() === '') delete val.resTxt; + if ((0, _util.isEmpty)(val.resHeaders)) delete val.resHeaders; + + this._renderHtml(this._httpTpl(this._data.val)); + } + }, { + key: '_renderCode', + value: function _renderCode() { + var data = this._data; + + var code = data.val, + len = data.val.length; + + // If source code too big, don't process it. + if (len < MAX_BEAUTIFY_LEN && this._formatCode) { + switch (data.type) { + case 'html': + code = _jsBeautify2.default.html(code, { unformatted: [] }); + break; + case 'css': + code = _jsBeautify2.default.css(code); + break; + case 'js': + code = (0, _jsBeautify2.default)(code); + break; + } + + code = (0, _highlight2.default)(code, data.type); + } else { + code = (0, _util.escape)(code); + } + + if (len < MAX_LINE_NUM_LEN && this._showLineNum) { + code = code.split('\n').map(function (line, idx) { + if ((0, _util.trim)(line) === '') line = ' '; + + return { + idx: idx + 1, + val: line + }; + }); + } + + this._renderHtml(this._codeTpl({ + code: code, + showLineNum: len < MAX_LINE_NUM_LEN && this._showLineNum + })); + } + }, { + key: '_renderJson', + value: function _renderJson() { + // Using cache will keep binding json events to the same elements. + this._renderHtml(this._jsonTpl(), false); + + var val = this._data.val; + + try { + if ((0, _util.isStr)(val)) val = JSON.parse(val); + /* eslint-disable no-empty */ + } catch (e) {} + + new _JsonViewer2.default(val, this._$el.find('.eruda-json')); + } + }, { + key: '_renderRaw', + value: function _renderRaw() { + this._renderHtml(this._rawTpl({ val: this._data.val })); + } + }, { + key: '_renderIframe', + value: function _renderIframe() { + this._renderHtml(this._iframeTpl({ src: this._data.val })); + } + }, { + key: '_renderHtml', + value: function _renderHtml(html) { + var _this5 = this; + + var cache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (cache && html === this._lastHtml) return; + this._lastHtml = html; + this._$el.html(html); + // Need setTimeout to make it work + setTimeout(function () { + return _this5._$el.get(0).scrollTop = 0; + }, 0); + } + }]); + return Sources; +}(_Tool3.default); + +exports.default = Sources; + + +var MAX_BEAUTIFY_LEN = 100000, + MAX_LINE_NUM_LEN = 400000; + +/***/ }), +/* 197 */ +/***/ (function(module, exports, __webpack_require__) { + +exports = module.exports = __webpack_require__(6)(false); +// imports + + +// module +exports.push([module.i, ".eruda-dev-tools .eruda-tools .eruda-sources {\n overflow-y: auto;\n -webkit-overflow-scrolling: touch; }\n .eruda-dev-tools .eruda-tools .eruda-sources .eruda-code-wrapper, .eruda-dev-tools .eruda-tools .eruda-sources .eruda-raw-wrapper {\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n width: 100%;\n background: #fff;\n min-height: 100%; }\n .eruda-dev-tools .eruda-tools .eruda-sources .eruda-raw {\n padding: 10px; }\n .eruda-dev-tools .eruda-tools .eruda-sources .eruda-code {\n font-family: Consolas, Lucida Console, Monaco, MonoSpace;\n font-size: 12px; }\n .eruda-dev-tools .eruda-tools .eruda-sources pre.eruda-code {\n padding: 10px; }\n .eruda-dev-tools .eruda-tools .eruda-sources table.eruda-code {\n border-collapse: collapse; }\n .eruda-dev-tools .eruda-tools .eruda-sources table.eruda-code .eruda-gutter {\n background: #eceffe;\n color: #707d8b; }\n .eruda-dev-tools .eruda-tools .eruda-sources table.eruda-code .eruda-line-num {\n border-right: 1px solid #707d8b;\n padding: 0 3px 0 5px;\n text-align: right; }\n .eruda-dev-tools .eruda-tools .eruda-sources table.eruda-code .eruda-code-line {\n padding: 0 4px;\n white-space: pre; }\n .eruda-dev-tools .eruda-tools .eruda-sources .eruda-image .eruda-breadcrumb {\n background: #fff;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n margin-bottom: 10px;\n word-break: break-all;\n padding: 10px;\n font-size: 16px;\n min-height: 40px;\n border-bottom: 1px solid #eceffe; }\n .eruda-dev-tools .eruda-tools .eruda-sources .eruda-image .eruda-img-container {\n text-align: center; }\n .eruda-dev-tools .eruda-tools .eruda-sources .eruda-image .eruda-img-container img {\n max-width: 100%;\n -webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 4px 0 rgba(0, 0, 0, 0.08), 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 4px 0 rgba(0, 0, 0, 0.08), 0 3px 1px -2px rgba(0, 0, 0, 0.2); }\n .eruda-dev-tools .eruda-tools .eruda-sources .eruda-image .eruda-img-info {\n text-align: center;\n margin: 20px 0;\n color: #707d8b; }\n .eruda-dev-tools .eruda-tools .eruda-sources .eruda-json {\n background: #fff;\n padding: 10px; }\n .eruda-dev-tools .eruda-tools .eruda-sources .eruda-http .eruda-breadcrumb {\n background: #fff;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n margin-bottom: 10px;\n word-break: break-all;\n padding: 10px;\n font-size: 16px;\n min-height: 40px;\n border-bottom: 1px solid #eceffe; }\n .eruda-dev-tools .eruda-tools .eruda-sources .eruda-http .eruda-section {\n background: #fff;\n margin-bottom: 10px; }\n .eruda-dev-tools .eruda-tools .eruda-sources .eruda-http .eruda-section h2 {\n background: #2196f3;\n padding: 10px;\n color: #fff;\n font-size: 14px; }\n .eruda-dev-tools .eruda-tools .eruda-sources .eruda-http .eruda-section table td {\n font-size: 12px;\n padding: 5px 10px; }\n .eruda-dev-tools .eruda-tools .eruda-sources .eruda-http .eruda-section table .eruda-key {\n white-space: nowrap; }\n .eruda-dev-tools .eruda-tools .eruda-sources .eruda-http .eruda-response, .eruda-dev-tools .eruda-tools .eruda-sources .eruda-http .eruda-data {\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n background: #fff;\n padding: 10px;\n font-size: 12px;\n margin-bottom: 10px;\n white-space: pre-wrap; }\n .eruda-dev-tools .eruda-tools .eruda-sources iframe {\n width: 100%;\n height: 100%; }\n", ""]); + +// exports + + +/***/ }), +/* 198 */ +/***/ (function(module, exports, __webpack_require__) { + +var Handlebars = __webpack_require__(3); +function __default(obj) { return obj && (obj.__esModule ? obj["default"] : obj); } +module.exports = (Handlebars["default"] || Handlebars).template({"1":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}); + + return "
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n" + + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.code : depth0),{"name":"each","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " \r\n" + + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.code : depth0),{"name":"each","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
    \r\n
    \r\n"; +},"2":function(container,depth0,helpers,partials,data) { + var helper; + + return "
    " + + container.escapeExpression(((helper = (helper = helpers.idx || (depth0 != null ? depth0.idx : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"idx","hash":{},"data":data}) : helper))) + + "
    \r\n"; +},"4":function(container,depth0,helpers,partials,data) { + var stack1, helper; + + return "
    "
    +    + ((stack1 = ((helper = (helper = helpers.val || (depth0 != null ? depth0.val : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"val","hash":{},"data":data}) : helper))) != null ? stack1 : "")
    +    + "
    \r\n"; +},"6":function(container,depth0,helpers,partials,data) { + var stack1, helper; + + return "
    \r\n
    "
    +    + ((stack1 = ((helper = (helper = helpers.code || (depth0 != null ? depth0.code : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"code","hash":{},"data":data}) : helper))) != null ? stack1 : "")
    +    + "
    \r\n
    \r\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.showLineNum : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(6, data, 0),"data":data})) != null ? stack1 : ""); +},"useData":true}); + +/***/ }), +/* 199 */ +/***/ (function(module, exports, __webpack_require__) { + +var Handlebars = __webpack_require__(3); +function __default(obj) { return obj && (obj.__esModule ? obj["default"] : obj); } +module.exports = (Handlebars["default"] || Handlebars).template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3="function", alias4=container.escapeExpression; + + return "
    \r\n
    " + + alias4(((helper = (helper = helpers.src || (depth0 != null ? depth0.src : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"src","hash":{},"data":data}) : helper))) + + "
    \r\n
    \r\n \r\n
    \r\n
    " + + alias4(((helper = (helper = helpers.width || (depth0 != null ? depth0.width : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"width","hash":{},"data":data}) : helper))) + + " × " + + alias4(((helper = (helper = helpers.height || (depth0 != null ? depth0.height : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"height","hash":{},"data":data}) : helper))) + + "
    \r\n
    "; +},"useData":true}); + +/***/ }), +/* 200 */ +/***/ (function(module, exports, __webpack_require__) { + +var Handlebars = __webpack_require__(3); +function __default(obj) { return obj && (obj.__esModule ? obj["default"] : obj); } +module.exports = (Handlebars["default"] || Handlebars).template({"1":function(container,depth0,helpers,partials,data) { + var helper; + + return "
    "
    +    + container.escapeExpression(((helper = (helper = helpers.data || (depth0 != null ? depth0.data : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"data","hash":{},"data":data}) : helper)))
    +    + "
    \r\n"; +},"3":function(container,depth0,helpers,partials,data) { + var stack1; + + return ((stack1 = helpers.each.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.resHeaders : depth0),{"name":"each","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); +},"4":function(container,depth0,helpers,partials,data) { + var helper, alias1=container.escapeExpression; + + return " \r\n " + + alias1(((helper = (helper = helpers.key || (data && data.key)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"key","hash":{},"data":data}) : helper))) + + "\r\n " + + alias1(container.lambda(depth0, depth0)) + + "\r\n \r\n"; +},"6":function(container,depth0,helpers,partials,data) { + return " \r\n Empty\r\n \r\n"; +},"8":function(container,depth0,helpers,partials,data) { + var helper; + + return "
    "
    +    + container.escapeExpression(((helper = (helper = helpers.resTxt || (depth0 != null ? depth0.resTxt : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"resTxt","hash":{},"data":data}) : helper)))
    +    + "
    \r\n"; +},"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}); + + return "
    \r\n
    " + + container.escapeExpression(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(alias1,{"name":"url","hash":{},"data":data}) : helper))) + + "
    \r\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.data : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
    \r\n

    Response Headers

    \r\n \r\n \r\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.resHeaders : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.program(6, data, 0),"data":data})) != null ? stack1 : "") + + " \r\n
    \r\n
    \r\n" + + ((stack1 = helpers["if"].call(alias1,(depth0 != null ? depth0.resTxt : depth0),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + "
    "; +},"useData":true}); + +/***/ }), +/* 201 */ +/***/ (function(module, exports, __webpack_require__) { + +var Handlebars = __webpack_require__(3); +function __default(obj) { return obj && (obj.__esModule ? obj["default"] : obj); } +module.exports = (Handlebars["default"] || Handlebars).template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + return "
      "; +},"useData":true}); + +/***/ }), +/* 202 */ +/***/ (function(module, exports, __webpack_require__) { + +var Handlebars = __webpack_require__(3); +function __default(obj) { return obj && (obj.__esModule ? obj["default"] : obj); } +module.exports = (Handlebars["default"] || Handlebars).template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var helper; + + return "
      \r\n
      " + + container.escapeExpression(((helper = (helper = helpers.val || (depth0 != null ? depth0.val : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"val","hash":{},"data":data}) : helper))) + + "
      \r\n
      \r\n"; +},"useData":true}); + +/***/ }), +/* 203 */ +/***/ (function(module, exports, __webpack_require__) { + +var Handlebars = __webpack_require__(3); +function __default(obj) { return obj && (obj.__esModule ? obj["default"] : obj); } +module.exports = (Handlebars["default"] || Handlebars).template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, helper; + + return ""; +},"useData":true}); + +/***/ }), +/* 204 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _Storage = __webpack_require__(205); + +var _Storage2 = _interopRequireDefault(_Storage); + +var _logger = __webpack_require__(36); + +var _logger2 = _interopRequireDefault(_logger); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var configs = {}; + +var config = { + create: function create(name) { + _logger2.default.warn('createCfg is deprecated'); + + if (!configs[name]) configs[name] = new _Storage2.default(name); + + return configs[name]; + } +}; + +exports.default = config; + +/***/ }), +/* 205 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(4); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(1); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(2); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(7); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(8); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _stringify = __webpack_require__(33); + +var _stringify2 = _interopRequireDefault(_stringify); + +var _util = __webpack_require__(0); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var localStore = { + _storage: (0, _util.safeStorage)('local'), + get: function get(key) { + var val = this._storage.getItem(key); + + try { + val = JSON.parse(val); + /* eslint-disable no-empty */ + } catch (e) {} + + return val; + }, + set: function set(key, val) { + if ((0, _util.isObj)(val)) val = (0, _stringify2.default)(val); + + this._storage.setItem(key, val); + + return this; + }, + remove: function remove(key) { + this._storage.removeItem(key); + + return this; + } +}; + +var Storage = function (_Emitter) { + (0, _inherits3.default)(Storage, _Emitter); + + function Storage(name) { + (0, _classCallCheck3.default)(this, Storage); + + var _this = (0, _possibleConstructorReturn3.default)(this, (Storage.__proto__ || (0, _getPrototypeOf2.default)(Storage)).call(this)); + + _this._name = name; + _this._val = localStore.get(name); + if (!_this._val || !(0, _util.isObj)(_this._val)) _this._val = {}; + return _this; + } + + (0, _createClass3.default)(Storage, [{ + key: 'save', + value: function save() { + localStore.set(this._name, this._val); + + return this; + } + }, { + key: 'get', + value: function get(key) { + if ((0, _util.isUndef)(key)) return this._val; + + return this._val[key]; + } + }, { + key: 'set', + value: function set(key, val) { + var _this2 = this; + + var kv = void 0; + + if ((0, _util.isObj)(key)) { + kv = key; + } else { + kv = {}; + kv[key] = val; + } + + (0, _util.each)(kv, function (val, key) { + var preVal = _this2._val[key]; + _this2._val[key] = val; + if (preVal !== val) _this2.emit('change', key, val); + }); + + return this.save(); + } + }]); + return Storage; +}(_util.Emitter); + +exports.default = Storage; + +/***/ }), +/* 206 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _assign = __webpack_require__(37); + +var _assign2 = _interopRequireDefault(_assign); + +exports.default = function (util) { + (0, _assign2.default)(util, { + highlight: _highlight2.default, + beautify: _jsBeautify2.default + }); +}; + +var _highlight = __webpack_require__(56); + +var _highlight2 = _interopRequireDefault(_highlight); + +var _jsBeautify = __webpack_require__(57); + +var _jsBeautify2 = _interopRequireDefault(_jsBeautify); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/***/ }), +/* 207 */ +/***/ (function(module, exports, __webpack_require__) { + +exports = module.exports = __webpack_require__(6)(false); +// imports + + +// module +exports.push([module.i, ".eruda-container {\n pointer-events: none;\n will-change: transform;\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n z-index: 100000;\n color: #263238;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-seri;\n font-size: 14px;\n direction: ltr; }\n .eruda-container * {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n pointer-events: all;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-text-size-adjust: none; }\n .eruda-container ul {\n list-style: none;\n padding: 0;\n margin: 0; }\n .eruda-container h1, .eruda-container h2, .eruda-container h3, .eruda-container h4 {\n margin: 0; }\n\n.eruda-hidden {\n display: none; }\n\n.eruda-blue {\n color: #2196f3; }\n\n.eruda-red {\n color: #f44336; }\n\n.eruda-green {\n color: #009688; }\n", ""]); + +// exports + + +/***/ }), +/* 208 */ +/***/ (function(module, exports, __webpack_require__) { + +exports = module.exports = __webpack_require__(6)(false); +// imports + + +// module +exports.push([module.i, ".eruda-container html, .eruda-container body, .eruda-container div, .eruda-container span, .eruda-container applet, .eruda-container object, .eruda-container iframe, .eruda-container h1, .eruda-container h2, .eruda-container h3, .eruda-container h4, .eruda-container h5, .eruda-container h6, .eruda-container p, .eruda-container blockquote, .eruda-container pre, .eruda-container a, .eruda-container abbr, .eruda-container acronym, .eruda-container address, .eruda-container big, .eruda-container cite, .eruda-container code, .eruda-container del, .eruda-container dfn, .eruda-container em, .eruda-container img, .eruda-container ins, .eruda-container kbd, .eruda-container q, .eruda-container s, .eruda-container samp, .eruda-container small, .eruda-container strike, .eruda-container strong, .eruda-container sub, .eruda-container sup, .eruda-container tt, .eruda-container var, .eruda-container b, .eruda-container u, .eruda-container i, .eruda-container center, .eruda-container dl, .eruda-container dt, .eruda-container dd, .eruda-container ol, .eruda-container ul, .eruda-container li, .eruda-container fieldset, .eruda-container form, .eruda-container label, .eruda-container legend, .eruda-container table, .eruda-container caption, .eruda-container tbody, .eruda-container tfoot, .eruda-container thead, .eruda-container tr, .eruda-container th, .eruda-container td, .eruda-container article, .eruda-container aside, .eruda-container canvas, .eruda-container details, .eruda-container embed, .eruda-container figure, .eruda-container figcaption, .eruda-container footer, .eruda-container header, .eruda-container hgroup, .eruda-container menu, .eruda-container nav, .eruda-container output, .eruda-container ruby, .eruda-container section, .eruda-container summary, .eruda-container time, .eruda-container mark, .eruda-container audio, .eruda-container video {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n vertical-align: baseline; }\n\n.eruda-container article, .eruda-container aside, .eruda-container details, .eruda-container figcaption, .eruda-container figure, .eruda-container footer, .eruda-container header, .eruda-container hgroup, .eruda-container menu, .eruda-container nav, .eruda-container section {\n display: block; }\n\n.eruda-container body {\n line-height: 1; }\n\n.eruda-container ol, .eruda-container ul {\n list-style: none; }\n\n.eruda-container blockquote, .eruda-container q {\n quotes: none; }\n\n.eruda-container blockquote:before, .eruda-container blockquote:after, .eruda-container q:before, .eruda-container q:after {\n content: '';\n content: none; }\n\n.eruda-container table {\n border-collapse: collapse;\n border-spacing: 0; }\n", ""]); + +// exports + + +/***/ }), +/* 209 */ +/***/ (function(module, exports, __webpack_require__) { + +exports = module.exports = __webpack_require__(6)(false); +// imports + + +// module +exports.push([module.i, "@font-face {\r\n font-family: 'eruda-icon';\r\n src: url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAABEAAAsAAAAAELQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIFi2NtYXAAAAFoAAAAVAAAAFQXVtKVZ2FzcAAAAbwAAAAIAAAACAAAABBnbHlmAAABxAAADKQAAAykjK19FmhlYWQAAA5oAAAANgAAADYPCS8LaGhlYQAADqAAAAAkAAAAJAfCA9RobXR4AAAOxAAAAEwAAABMOSwAm2xvY2EAAA8QAAAAKAAAACgZ4h0QbWF4cAAADzgAAAAgAAAAIAAZAIVuYW1lAAAPWAAAAYYAAAGGmUoJ+3Bvc3QAABDgAAAAIAAAACAAAwAAAAMDUwGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA6Q4DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADgAAAAKAAgAAgACAAEAIOkO//3//wAAAAAAIOkA//3//wAB/+MXBAADAAEAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAgAHAAcDZgNmACIARQAAAREUBiMiJi8BBw4BIyImLwEuATU0Nj8BJy4BNTQ2MyEyFhUBFAYPARceARUUBiMhIiY1ETQ2MzIWHwE3PgEzMhYfAR4BFQG3Fg8HDQVTvQMHBAMHA0ECBAQCvlIGBRUPAQAPFgGvAwK+UgUGFg//AA8VFQ8IDQVSvgMHAwQHAkICAwGS/wAPFQUGUr4CBAQCQQMHAwQHA71TBQ0HDxYWDwGAAwcDvlIFDQgPFRUPAQAPFgYFUr4CAwMCQgIHBAAAAAIAAAAAA24DbgAiAEUAAAEUBg8BFx4BFRQGIyEiJjURNDYzMhYfATc+ATMyFh8BHgEVAREUBiMiJi8BBw4BIyImLwEuATU0Nj8BJy4BNTQ2MyEyFhUBrwMCvlIFBhUP/wAPFhYPBw0FU70DBwMEBwNBAgMBvxYPBw0GUr4CBwQDBwNBAwMDA75TBQUVDwEADxYBWwMHA71TBQ0HDxYWDwEADxUGBVK+AgMDAkEDBwQB7v8ADxUFBVO+AwMDA0EDBwMEBwK+UgYNBw8WFg8AAAADAAAAAANuA24AJgA7AFQAACU1NCcmKwERNCcmKwEiBwYdARQXFjsBFSMiBwYdARQXFjMhMjc2NQM1NCcmKwEiBwYdARQXFjsBMjc2NQUUBwYHBiMiJyYnJjU0NzY3NjMyFxYXFhUCSQUFCDcFBQi3CAUFBQUINzcIBQUFBQgBAAgFBUkFBQhuCAUFBQUIbggFBQFuOztlZXd4ZGU7Ozs7ZWR4d2VlOzulWwgFBQElCAUFBQUIXAgFBbcFBQhbCAYFBQYIAgBbCAUFBQUIWwgGBQUGCO54ZGU7Ozs7ZWR4d2VlOzs7O2VldwAAAAMAAAAAA24DcQANABkAOQAAATQnARYzMjc2NzY3NjUFASYjIgcGBwYVFBclFAcGBwYHBiMiJyYnJicmNTQ3Njc2NzYzMhcWFxYXFgLuMv5RTlw/OjkqKhgZ/cUBr01eVUdIKSozArsjIzs6UlFZWVJROzojIyMjOjtRUllZUVI6OyMjAblcTP5SMxkZKSo6OkCrAa80KipISFRdTqtaUlI6OyMjIyM7OlJSWllSUTs7IyMjIzs7UVIAAAAAAgAAAAADbgNuAA8AggAAATQnJiMiBwYVFBcWMzI3NiUVFAcGDwEGBxYXFhUUBwYHBiMiLwEGBwYHBisBIicmNScmJwcGIyInJicmNTQ3Njc2NyYvASYnJj0BNDc2PwE2NyYnJjU0NzY3NjMyHwE2NzY3NjsBMhcWHwEWFzc2MzIXFhcWFRQHBgcGBxYfARYXFhUCSSsrPD0rKiorPTwrKwElBQQHagsLFCkGBg8pKQ0HCE8ZGwkHBBF/CAYGEBwYUAYICAdIFgQFCBUUCxAIaAgEBQUEBmsIDhcmBgUPKikNBwdPGRsJCAQQfwgGBgEQHBdRBggIBkoVBAUIFRUKDwloCAQFAbc8KysrKzw9KyoqK3t/BwYGARAfFR0yBwcIBhUoKQU+DQlNHRAFBQdpCQw9BQZCHgYIBgcMGhoOHRwPAQYGCH4HBwYBEBobIC4HBwYHFSkpBj0NCE4dEAUFB2oJDD0GBkQdBQgHBgwaGg4dGxABBgYIAAUAAAAAAyUDbgAUACkAPgBGAHMAACURNCcmKwEiBwYVERQXFjsBMjc2NTMRNCcmKwEiBwYVERQXFjsBMjc2NTMRNCcmKwEiBwYVERQXFjsBMjc2NQEhJyYnIwYHBRUUBwYrAREUBwYjISInJjURIyInJj0BNDc2OwE3Njc2OwEyFxYfATMyFxYVASUGBQgkCAUGBgUIJAgFBpIFBQglCAUFBQUIJQgFBZIFBQglCAUFBQUIJQgFBf7JAQAbBAa1BgQB9wYFCDcaGyb+JSYbGzcIBQUFBQixKAgXFhe3FxYWCSiwCAUGpQGSCAUFBQUI/m4IBgUFBggBkggFBQUFCP5uCAYFBQYIAZIIBQUFBQj+bggGBQUGCAI2QwUCAgVVJAgGBf3jMCIjISIvAiAFBggkCAUFYBUPDw8PFWAFBQgAAQAAAAADbgNuAEcAAAERFAcGIyEiJyY/ASYjIgcGBwYHBhUUFxYXFhcWMzI3Njc2NzIfARYVFAcGBwYjIicmJyYnJjU0NzY3Njc2MzIXFhc3NhcWFQNuCwsP/wAYCgkRT1RzPDY2JycYFxcYJyc2NjxEPD0qBAkIBk4GBD9YWWJZUVI6OyMjIyM7OlJRWVROTz1KERcXAyX/AA8LCxcWEU9OFxcnKDY2Ozw2NicnGBceHjYGAQVPBQcHBksqKSMjOzpSUVlZUVE7OyMjICA5SRIKCRgAAAAAAQAzAA8CgwOoABoAAAkBBiMiLwEmNTQ3CQEmNTQ/ATYzMhcBFhUUBwJ5/lgLDw8LXwsLATD+0AsLXwsPDwsBqAoKAcL+WAsLXwoPDwsBLwEwCw8OC18LC/5YCw8OCwAAAQBYAA8CqAOoABoAAAkCFhUUDwEGIyInASY1NDcBNjMyHwEWFRQHAp3+0QEvCwtfCw4PC/5YCwsBqAsPDgtfCwsDC/7Q/tELDw8KXwsLAagLDg8LAagLC18LDg8LAAAABQAA/7cDtwO3AD4AbQBxAHUAegAAASIHBhURJyYjIgcGFRQXExYzITI3Nj8BNj0BNCcmIyIHBhUjNTQnJiMiBwYdASM1NCcmIyIHBh0BIxE0JyYjNTIXFh0BNjMyFzYzMhc2MzIXFh0BFA8BBgcGIyEiJyYnAyY1NDc2MzIXETQ3NjMTNSMVMzUjFTM1IxUzAW4fFRVXFyYeFRUP2xYlAZoNCgoCNQ4QEBcXEBASExIbGxITExUVHx4VFhIVFR89KisNBTkqGx5AKQ8RNiUlEDUJHh0m/mYjHx8U3B0rKjwpISsrPUkSpBKkEhIDbhYVHv4Acx8WFh0ZE/7bHQgHDNM3OHwXEREQEBcjHBMTExMaJTQfFxYVFR83AUYgFhdJLC09fgIoDDIEJic1fEM+0iUXFxAPGwElJzE8KysUATk8Kyv829zc3Nzc3AADAAAASQQAAtsAGAAxAEoAAAEmJxYVFAcGIyInJjU0NwYHFhcWMzI3NjclNCcmIyIHBhUUFxYzMjc2NTQ3NjMyNzY1BRQHBgcGIyInJicmNTQ3Njc2MzIXFhcWFQO3V4MjS0tqaktLI4NXTHNyhoZyc0z+ZAgIC0c0MwgIDAsICCMjMQsICAHlC1CIh5aWh4hQCwtQiIeWloeIUAsBkodDO0ZpS0xMS2lGO0OHdUVGRkV13AsICDMzSAsICAgICzIiIwgIDNwTFIRPT1BPgxQTFBSDT09PT4MUFAAAAQAAAAADbgNuAEkAAAEUBwYHBgcGIyInJicmNTY/ATYzFhcWFxYzMjc2NzY3NjU0JyYnJicmIyIHBgcXFgcGIyEiJyY1ETQ3Nh8BNjc2MzIXFhcWFxYVA24jIzs7UVFZYllZPgQBBE8FCQkEKjw9RDs2NignFxcXFycoNjY7ODQzKE4SCgkY/wAPCwsXFhFLPU5PVFlRUTs7IyMBt1lRUjo7IyMpKksGBwcFTwUBBjYeHhcYJyc2Njw7NjYoJxcXFBQmTxEWFwsLDwEAGAkKEkk5ICAjIzs7UVFZAAMACQAAA/cDtwAUACkAQQAAJTU0JyYrASIHBh0BFBcWOwEyNzY1JxM0JyYrASIHBhUTFBcWOwEyNzY3AwEWBwYHBiMhIicmJyY3ATY3NjMyFxYXAkkFBgduBwYFBQYHbgcGBQEKBQgGfgYIBQkGBghqCAUFAQgBtxQVChERE/ySExERChUUAbcKEREUFBERCqVtCAUGBgUIbQgFBgYFCNYBBgcEBgYECP77BgQDAwQGAhb82yQkEQkKCgkRJCQDJRELCgoLEQAAAgAAAAADbgNuACsARAAAATQvATc2NTQvASYjIg8BJyYjIg8BBhUUHwEHBhUUHwEWMzI/ARcWMzI/ATY3FAcGBwYjIicmJyY1NDc2NzYzMhcWFxYVApELaGgLCzQLDw8LZ2gKDxALMwsLZ2cLCzMLEA8KaGcLDw8LNAvdOztlZXd4ZGU7Ozs7ZWR4d2VlOzsBNg8KaGcLDw8LNAsLaGgLCzQLDw8LZ2gKDxALMwsLZ2cLCzMLkXhkZTs7OztlZHh3ZWU7Ozs7ZWV3AAAAAQAA//8DFwNuAAsAAAkBBiY1ETQ2FwEWFAMX/QkNExMNAvcNAaX+WgcLDwNJDwwI/lsIFQAAAAABAAAAAAAA0YpcH18PPPUACwQAAAAAANX1dVAAAAAA1fV1UAAA/7cEAAO3AAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAQAAAEAAAAAAAAAAAAAAAAAAAATBAAAAAAAAAAAAAAAAgAAAANuAAcDbgAAA24AAANuAAADbgAAAyUAAANuAAACtwAzAwAAWAO3AAAEAAAAA24AAAQAAAkDbgAAAykAAAAAAAAACgAUAB4AhgDuAWQBwgJ+Ax4DigO6A+oEkAT+BWwF0AY2BlIAAQAAABMAgwAFAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGljb21vb24AaQBjAG8AbQBvAG8AblZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGljb21vb24AaQBjAG8AbQBvAG8Abmljb21vb24AaQBjAG8AbQBvAG8AblJlZ3VsYXIAUgBlAGcAdQBsAGEAcmljb21vb24AaQBjAG8AbQBvAG8AbkZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=') format('woff');\r\n font-weight: normal;\r\n font-style: normal;\r\n}\r\n\r\n[class^=\"eruda-icon-\"], [class*=\" eruda-icon-\"] {\r\n /* use !important to prevent issues with browser extensions that change fonts */\r\n font-family: 'eruda-icon' !important;\r\n speak: none;\r\n font-style: normal;\r\n font-weight: normal;\r\n font-variant: normal;\r\n text-transform: none;\r\n line-height: 1;\r\n\r\n /* Better Font Rendering =========== */\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n}\r\n\r\n.eruda-icon-play:before {\r\n content: \"\\E90E\";\r\n}\r\n.eruda-icon-compress:before {\r\n content: \"\\E900\";\r\n}\r\n.eruda-icon-expand:before {\r\n content: \"\\E901\";\r\n}\r\n.eruda-icon-rotate-left:before {\r\n content: \"\\E90B\";\r\n}\r\n.eruda-icon-hand-pointer-o:before {\r\n content: \"\\E909\";\r\n}\r\n.eruda-icon-eye:before {\r\n content: \"\\E90A\";\r\n}\r\n.eruda-icon-info-circle:before {\r\n content: \"\\E902\";\r\n}\r\n.eruda-icon-ban:before {\r\n content: \"\\E903\";\r\n}\r\n.eruda-icon-cog:before {\r\n content: \"\\E904\";\r\n}\r\n.eruda-icon-trash:before {\r\n content: \"\\E905\";\r\n}\r\n.eruda-icon-repeat:before {\r\n content: \"\\E906\";\r\n}\r\n.eruda-icon-chevron-right:before {\r\n content: \"\\E907\";\r\n}\r\n.eruda-icon-chevron-left:before {\r\n content: \"\\E908\";\r\n}\r\n.eruda-icon-exclamation-triangle:before {\r\n content: \"\\E90C\";\r\n}\r\n.eruda-icon-times-circle:before {\r\n content: \"\\E90D\";\r\n}\r\n", ""]); + +// exports + + +/***/ }) +/******/ ]); +}); +//# sourceMappingURL=eruda.js.map \ No newline at end of file diff --git a/site/js/escape.js b/site/js/escape.js new file mode 100644 index 0000000..ca15d50 --- /dev/null +++ b/site/js/escape.js @@ -0,0 +1,76 @@ +/*! + * escape-html + * Copyright(c) 2012-2013 TJ Holowaychuk + * Copyright(c) 2015 Andreas Lubbe + * Copyright(c) 2015 Tiancheng "Timothy" Gu + * MIT Licensed + */ + +'use strict'; + +/** + * Module variables. + * @private + */ + +var matchHtmlRegExp = /["'&<>]/; + +/** + * Module exports. + * @public + */ + +/** + * Escape special characters in the given string of html. + * + * @param {string} string The string to escape for inserting into HTML + * @return {string} + * @public + */ + +function escapeHtml(string) { + var str = '' + string; + var match = matchHtmlRegExp.exec(str); + + if (!match) { + return str; + } + + var escape; + var html = ''; + var index = 0; + var lastIndex = 0; + + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: // " + escape = '"'; + break; + case 38: // & + escape = '&'; + break; + case 39: // ' + escape = '''; + break; + case 60: // < + escape = '<'; + break; + case 62: // > + escape = '>'; + break; + default: + continue; + } + + if (lastIndex !== index) { + html += str.substring(lastIndex, index); + } + + lastIndex = index + 1; + html += escape; + } + + return lastIndex !== index + ? html + str.substring(lastIndex, index) + : html; +} diff --git a/site/js/line.js b/site/js/line.js new file mode 100644 index 0000000..1c14812 --- /dev/null +++ b/site/js/line.js @@ -0,0 +1,1385 @@ +const TYPE = { + STOP: 0, + VOID: 1, + BOOL: 2, + BYTE: 3, + I08: 3, + DOUBLE: 4, + I16: 6, + I32: 8, + I64: 10, + STRING: 11, + UTF7: 11, + STRUCT: 12, + MAP: 13, + SET: 14, + LIST: 15, + UTF8: 16, + UTF16: 17, +}; +function getType(obj) { + if (obj.type === "BaseType") { + return TYPE[obj.baseType.toUpperCase()]; + } else if (obj.type === "Identifier") { + return obj.name; + } +} +function isStruct(obj) { + return obj && obj.constructor === Array; +} +class ThriftRenameParser { + constructor() { + this.def = {}; + } + name2fid(struct_name, name) { + const struct = this.def[struct_name]; + if (struct) { + const result = struct.findIndex((e) => { + return e.name == name; + }); + if (result === -1) { + return { name: name, fid: -1 }; + } else { + return struct[result]; + } + } else { + return { name: name, fid: -1 }; + } + } + fid2name(struct_name, fid) { + const struct = this.def[struct_name]; + if (struct) { + const result = struct.findIndex((e) => { + return e.fid == fid; + }); + if (result === -1) { + return { name: fid, fid: fid }; + } else { + return struct[result]; + } + } else { + return { name: fid, fid: fid }; + } + } + rename_thrift(struct_name, object) { + const newObject = {}; + for (const fid in object) { + const value = object[fid]; + const finfo = this.fid2name(struct_name, fid); + if (finfo.struct) { + if (isStruct(this.def[finfo.struct])) { + newObject[finfo.name] = this.rename_thrift( + finfo.struct, + value, + ); + } else { + newObject[finfo.name] = this.def[finfo.struct][value] || + value; + } + } else if (finfo.list) { + newObject[finfo.name] = []; + value.forEach((e, i) => { + newObject[finfo.name][i] = this.rename_thrift( + finfo.list, + e, + ); + }); + } else if (finfo.map) { + newObject[finfo.name] = {}; + for (const key in value) { + const e = value[key]; + newObject[finfo.name][key] = this.rename_thrift( + finfo.map, + e, + ); + } + } else if (finfo.set) { + newObject[finfo.name] = []; + value.forEach((e, i) => { + newObject[finfo.name][i] = this.rename_thrift( + finfo.set, + e, + ); + }); + } else { + newObject[finfo.name] = value; + } + } + return newObject; + } + rename_data(data) { + const name = data._info.fname; + const value = data.value; + const struct_name = name.substr(0, 1).toUpperCase() + name.substr(1) + + "Response"; + data.value = this.rename_thrift(struct_name, value); + return data; + } + parse_data(struct_name, object) { + const newThrift = []; + for (const fname in object) { + const value = object[fname]; + const finfo = this.name2fid(struct_name, fname); + if (finfo.fid == -1) { + continue; + } + const thisValue = [null, finfo.fid, null]; + if (finfo.struct) { + if (isStruct(this.def[finfo.struct])) { + thisValue[2] = this.parse_data( + finfo.struct, + value, + ); + thisValue[0] = TYPE.STRUCT; + } else { + if (typeof value === "number") { + thisValue[2] = value; + thisValue[0] = TYPE.I64; + } else { + const Enum = this.def[finfo.struct]; + let i64; + for (const k in Enum) { + const val = Enum[k]; + if (val == value) { + i64 = Number(k); + } + } + thisValue[2] = i64; + thisValue[0] = TYPE.I64; + } + } + } else if (finfo.list) { + thisValue[0] = TYPE.LIST; + if (typeof finfo.list === "number") { + thisValue[2] = [finfo.list, value]; + } else { + thisValue[2] = [ + TYPE.STRUCT, + value.map((e) => this.parse_data(finfo.list, e)), + ]; + } + } else if (finfo.map) { + thisValue[0] = TYPE.MAP; + if (typeof finfo.map === "number") { + thisValue[2] = [TYPE.STRING, finfo.map, value]; + } else { + const obj = {}; + for (const key in value) { + const e = value[key]; + obj[key] = this.parse_data(finfo.map,e) + } + thisValue[2] = [TYPE.STRING, TYPE.STRUCT, obj]; + } + } else if (finfo.set) { + thisValue[0] = TYPE.SET; + if (typeof finfo.map === "number") { + thisValue[2] = [finfo.map, value]; + } else { + thisValue[2] = [ + TYPE.STRUCT, + value.map((e) => this.parse_data(finfo.map, e)), + ]; + } + } else if(finfo.type) { + thisValue[0] = finfo.type + thisValue[2] = value + } + newThrift.push(thisValue) + } + return newThrift; + } +} + +class LineThriftPost { + constructor(win) { + this.window = win; + this.waitFunc = {}; + } + post(data) { + return new Promise((resolve, reject) => { + data = { arg: data }; + data.id = Date.now(); + this.send( + this.window, + this.waitFunc, + data, + resolve, + ); + }); + } + + async postParseThrift(data) { + let reqJson, resJson; + reqJson = data; + resJson = await this.post(reqJson); + if (resJson.err) { + throw new Error("Server Error : " + resJson.err); + } + return resJson; + } + + postRequestAndGetResponse( + CHRdata, + methodName, + protocol_type = 3, + path = "/S3", + headers = {}, + ) { + return new Promise((resolve, reject) => { + const request = [path, CHRdata, methodName, protocol_type, headers]; + this.postParseThrift(request).then((r) => resolve(r)) + }); + } + send(socket, funcMap, data, returnFunc) { + if (socket) { + socket.postMessage(data,"*"); + funcMap[data.id] = (e) => { + returnFunc(e); + }; + window.onmessage = (e) => { + let j = e.data; + funcMap[j.id](j); + delete funcMap[j.id]; + }; + } else throw new Error("No parent window"); + } +} + +class SquareServise { + SquareService_API_PATH = "/SQ1"; + SquareService_P_TYPE = 4; + async getJoinedSquares(limit = 50, continuationToken) { + return await this.request( + [[11, 2, continuationToken], [8, 3, limit]], + "getJoinedSquares", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async inviteIntoSquareChat(inviteeMids, squareChatMid) { + return await this.request( + [[15, 1, [11, inviteeMids]], [11, 2, squareChatMid]], + "inviteIntoSquareChat", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async inviteToSquare(squareMid, invitees, squareChatMid) { + return await this.request( + [[11, 2, squareMid], [15, 3, [11, invitees]], [ + 11, + 4, + squareChatMid, + ]], + "inviteToSquare", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async markAsRead(squareChatMid, messageId) { + return await this.request( + [[11, 2, squareChatMid], [11, 4, messageId]], + "markAsRead", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async reactToMessage(squareChatMid, messageId, reactionType = 2) { + /* + reactionType + ALL = 0, + UNDO = 1, + NICE = 2, + LOVE = 3, + FUN = 4, + AMAZING = 5, + SAD = 6, + OMG = 7, + */ + return await this.request( + [ + [8, 1, 0], + [11, 2, squareChatMid], + [11, 3, messageId], + [8, 4, reactionType], + ], + "reactToMessage", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async findSquareByInvitationTicket(invitationTicket) { + return await this.request( + [[11, 2, invitationTicket]], + "findSquareByInvitationTicket", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async fetchMyEvents( + syncToken = undefined, + limit = 100, + continuationToken = undefined, + subscriptionId, + ) { + return await this.request( + [ + [10, 1, subscriptionId], + [11, 2, syncToken], + [8, 3, limit], + [11, 4, continuationToken], + ], + "fetchMyEvents", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async fetchSquareChatEvents( + squareChatMid, + syncToken = undefined, + continuationToken = undefined, + subscriptionId = 0, + limit = 100, + ) { + return await this.request( + [ + [10, 1, subscriptionId], + [11, 2, squareChatMid], + [11, 3, syncToken], + [8, 4, limit], + [8, 5, 1], + [8, 6, 1], + [11, 7, continuationToken], + [8, 8, 1], + ], + "fetchSquareChatEvents", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async sendSquareMessage( + squareChatMid, + text = "test Message", + contentType = 0, + contentMetadata = {}, + relatedMessageId = undefined, + ) { + const msg = [ + [11, 2, squareChatMid], + [11, 10, text], + [8, 15, contentType], + [13, 18, [11, 11, contentMetadata]], + ]; + if (relatedMessageId) { + msg.push( + [11, 21, relatedMessageId], + [8, 22, 3], + [8, 24, 2], + ); + } + return await this.request( + [ + [8, 1, 0], + [11, 2, squareChatMid], + [ + 12, + 3, + [ + [12, 1, msg], + [8, 3, 4], + ], + ], + ], + "sendMessage", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquare(squareMid) { + return await this.request( + [[11, 2, squareMid]], + "getSquare", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + async getSquareChat(squareChatMid) { + return await this.request( + [[11, 1, squareChatMid]], + "getSquareChat", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + async getJoinableSquareChats( + squareMid, + continuationToken = undefined, + limit = 100, + ) { + return await this.request( + [[11, 1, squareMid], [11, 10, continuationToken], [8, 11, limit]], + "getJoinableSquareChats", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async createSquare( + name = "TEST Square", + displayName = "Tester", + profileImageObsHash = + "0h6tJf0hQsaVt3H0eLAsAWDFheczgHd3wTCTx2eApNKSoefHNVGRdwfgxbdgUMLi8MSngnPFMeNmpbLi8MSngnPFMeNmpbLi8MSngnOA", + desc = "test with LINE-Deno-Client", + searchable = true, + SquareJoinMethodType = 0, + ) { + /* + SquareJoinMethodType + NONE(0), + APPROVAL(1), + CODE(2); + */ + return await this.request( + [ + [8, 2, 0], + [ + 12, + 2, + [ + [11, 2, name], + [11, 4, profileImageObsHash], + [11, 5, desc], + [2, 6, searchable], + [8, 7, 1], // type + [8, 8, 1], // categoryId + [10, 10, 0], // revision + [2, 11, true], // ableToUseInvitationTicket + [12, 14, [[8, 1, SquareJoinMethodType]]], + [2, 15, false], // adultOnly + [15, 16, [11, []]], // svcTags + ], + ], + [ + 12, + 3, + [ + [11, 3, displayName], + // [11, 4, profileImageObsHash], + [2, 5, true], // ableToReceiveMessage + [10, 9, 0], // revision + ], + ], + ], + "createSquare", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquareChatAnnouncements(squareChatMid) { + return await this.request( + [[11, 2, squareChatMid]], + "getSquareChatAnnouncements", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async updateSquareFeatureSet( + updateAttributes = [], + squareMid, + revision, + creatingSecretSquareChat = 0, + ) { + /* + updateAttributes: + CREATING_SECRET_SQUARE_CHAT(1), + INVITING_INTO_OPEN_SQUARE_CHAT(2), + CREATING_SQUARE_CHAT(3), + READONLY_DEFAULT_CHAT(4), + SHOWING_ADVERTISEMENT(5), + DELEGATE_JOIN_TO_PLUG(6), + DELEGATE_KICK_OUT_TO_PLUG(7), + DISABLE_UPDATE_JOIN_METHOD(8), + DISABLE_TRANSFER_ADMIN(9), + CREATING_LIVE_TALK(10); + */ + const SquareFeatureSet = [ + [11, 1, squareMid], + [10, 2, revision], + ]; + if (creatingSecretSquareChat) { + SquareFeatureSet.push([12, 11, [ + [8, 1, 1], + [8, 2, creatingSecretSquareChat], + ]]); + } + return await this.request( + [ + [14, 2, [8, updateAttributes]], + [12, 3, SquareFeatureSet], + ], + "updateSquareFeatureSet", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async joinSquare( + squareMid, + displayName, + ableToReceiveMessage = false, + passCode = undefined, + ) { + return await this.request( + [ + [11, 2, squareMid], + [ + 12, + 3, + [ + [11, 2, squareMid], + [11, 3, displayName], + [2, 5, ableToReceiveMessage], + [10, 9, 0], + ], + ], + [12, 5, [[12, 2, [[11, 1, passCode]]]]], + ], + "joinSquare", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async removeSubscriptions(subscriptionIds = []) { + return await this.request( + [ + [15, 2, [10, subscriptionIds]], + ], + "removeSubscriptions", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async unsendSquareMessage(squareChatMid, messageId) { + return await this.request( + [[11, 2, squareChatMid], [11, 3, messageId]], + "unsendMessage", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async createSquareChat( + squareChatMid, + name, + chatImageObsHash, + squareChatType = 1, + maxMemberCount = 5000, + ableToSearchMessage = 1, + squareMemberMids = [], + ) { + /* + - SquareChatType: + OPEN(1), + SECRET(2), + ONE_ON_ONE(3), + SQUARE_DEFAULT(4); + - ableToSearchMessage: + NONE(0), + OFF(1), + ON(2); + */ + return await this.request( + [ + [8, 1, 0], + [ + 12, + 2, + [ + [11, 1, squareChatMid], + [8, 3, squareChatType], + [11, 4, name], + [11, 5, chatImageObsHash], + [8, 7, maxMemberCount], + [8, 11, ableToSearchMessage], + ], + ], + [15, 3, [11, squareMemberMids]], + ], + "createSquareChat", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquareChatMembers( + squareChatMid, + continuationToken = undefined, + limit = 200, + ) { + const req = [[11, 1, squareChatMid], [8, 3, limit]]; + if (continuationToken) { + req.push([11, 2, continuationToken]); + } + return await this.request( + req, + "getSquareChatMembers", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquareFeatureSet(squareMid) { + return await this.request( + [ + [11, 2, squareMid], + ], + "getSquareFeatureSet", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquareInvitationTicketUrl(mid) { + return await this.request( + [ + [11, 2, mid], + ], + "getInvitationTicketUrl", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async updateSquareChatMember( + squareMemberMid, + squareChatMid, + notificationForMessage = true, + notificationForNewMember = true, + updatedAttrs = [6], + ) { + /* + - SquareChatMemberAttribute: + MEMBERSHIP_STATE(4), + NOTIFICATION_MESSAGE(6), + NOTIFICATION_NEW_MEMBER(7); + */ + return await this.request( + [ + [14, 2, [8, updatedAttrs]], + [ + 12, + 3, + [ + [11, 1, squareMemberMid], + [11, 2, squareChatMid], + [2, 5, notificationForMessage], + [2, 6, notificationForNewMember], + ], + ], + ], + "updateSquareChatMember", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async updateSquareMember( + updatedAttrs = [], + updatedPreferenceAttrs = [], + squareMemberMid, + squareMid, + revision, + displayName, + membershipState, + role, + ) { + /* + SquareMemberAttribute: + DISPLAY_NAME(1), + PROFILE_IMAGE(2), + ABLE_TO_RECEIVE_MESSAGE(3), + MEMBERSHIP_STATE(5), + ROLE(6), + PREFERENCE(7); + SquareMembershipState: + JOIN_REQUESTED(1), + JOINED(2), + REJECTED(3), + LEFT(4), + KICK_OUT(5), + BANNED(6), + DELETED(7); + */ + const squareMember = [[11, 1, squareMemberMid], [11, 2, squareMid]]; + if (updatedAttrs.includes(1)) { + squareMember.push([11, 3, displayName]); + } + if (updatedAttrs.includes(5)) { + squareMember.push([8, 7, membershipState]); + } + if (updatedAttrs.includes(6)) { + squareMember.push([8, 8, role]); + } + squareMember.push([10, 9, revision]); + return await this.request( + [ + [14, 2, [8, updatedAttrs]], + [14, 3, [8, updatedPreferenceAttrs]], + [12, 4, squareMember], + ], + "updateSquareMember", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async kickOutSquareMember(sid, pid) { + const UPDATE_PREF_ATTRS = []; + const UPDATE_ATTRS = [5]; + const MEMBERSHIP_STATE = 5; + const getSquareMemberResp = this.getSquareMember(pid); + const squareMember = getSquareMemberResp[1]; + const squareMemberRevision = squareMember[9]; + return await this.updateSquareMember( + UPDATE_ATTRS, + UPDATE_PREF_ATTRS, + pid, + sid, + squareMemberRevision, + undefined, + MEMBERSHIP_STATE, + ); + } + + async checkSquareJoinCode(squareMid, code) { + return await this.request( + [ + [11, 2, squareMid], + [11, 3, code], + ], + "checkJoinCode", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async createSquareChatAnnouncement( + squareChatMid, + messageId, + text, + senderSquareMemberMid, + createdAt, + announcementType = 0, + ) { + return await this.request( + [ + [8, 1, 0], + [11, 2, squareChatMid], + [ + 12, + 3, + [ + [8, 2, announcementType], + [ + 12, + 3, + [ + [ + 12, + 1, + [ + [11, 1, messageId], + [11, 2, text], + [11, 3, senderSquareMemberMid], + [10, 4, createdAt], + ], + ], + ], + ], + ], + ], + ], + "createSquareChatAnnouncement", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquareMember(squareMemberMid) { + return await this.request( + [ + [11, 2, squareMemberMid], + ], + "getSquareMember", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async searchSquareChatMembers( + squareChatMid, + displayName = "", + continuationToken, + limit = 20, + ) { + const req = [ + [11, 1, squareChatMid], + [ + 12, + 2, + [ + [11, 1, displayName], + ], + ], + [8, 4, limit], + [11, 3, continuationToken], + ]; + return await this.request( + [[12, 1, req]], + "searchSquareChatMembers", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquareEmid(squareMid) { + return await this.request( + [[11, 1, squareMid]], + "getSquareEmid", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquareMembersBySquare(squareMid, squareMemberMids = []) { + return await this.request( + [ + [11, 2, squareMid], + [14, 3, [11, squareMemberMids]], + ], + "getSquareMembersBySquare", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async manualRepair(syncToken, limit = 100, continuationToken) { + return await this.request( + [ + [11, 1, syncToken], + [8, 2, limit], + [11, 3, continuationToken], + ], + "manualRepair", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async leaveSquare(squareMid) { + return await this.request( + [ + [11, 2, squareMid], + ], + "leaveSquare", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async reportSquare(squareMid, reportType, otherReason) { + /* + ReportType { + ADVERTISING = 1; + GENDER_HARASSMENT = 2; + HARASSMENT = 3; + OTHER = 4; + } + */ + return await this.parse_request( + { + squareMid, + reportType, + otherReason, + }, + "reportSquare", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + async sendSquareRequestByName(METHOD_NAME, params) { + return await this.request( + params, + METHOD_NAME, + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + async getSyncToken() { + return (await Line.manualRepair(null, 1)).continuationToken; + } + async squareEvent(handler, syncToken, i, remove = {}) { + if (!syncToken) { + syncToken = await this.getSyncToken(); + } + const res = await this.fetchMyEvents(syncToken); + const _syncToken = res.syncToken; + if (syncToken) { + res.events.forEach((e) => { + handler(e, this); + }); + } + let interval = 1000; + if (!res.events.length) { + interval = 2000; + } + if (!remove.remove) { + setTimeout(() => { + this.squareEvent(handler, _syncToken, i, remove); + }, i ? i : interval); + } + return remove; + } + getSquareEventTarget() { + if (this.squareEventTarget && (!this.squareEventTarget.remove.remove)) { + return this.squareEventTarget; + } + const squareEventTarget = new EventTarget(); + this.squareEventTarget = squareEventTarget; + this.parser.def.SquareEventPayload.forEach((e) => { + let name = e.name.replace("notified", "") + .replace("notification", ""); + name = name[0].toLowerCase() + name.substring(1); + squareEventTarget["on" + name] = null; + }); + squareEventTarget.remove = { remove: false }; + this.squareEvent( + (event) => { + let name = Object.keys(event.payload)[0].toString().replace( + "notified", + "", + ) + .replace("notification", ""); + name = name[0].toLowerCase() + name.substring(1); + const data = event.payload[Object.keys(event.payload)[0]]; + const squareEvent = new Event(name); + objectPlus(squareEvent, data); + if (typeof squareEventTarget["on" + name] === "function") { + squareEventTarget["on" + name](squareEvent); + } + squareEventTarget.dispatchEvent(squareEvent); + }, + null, + null, + squareEventTarget.remove, + ); + return this.squareEventTarget; + } + async squareChatEvent(handler, mid, syncToken, i, remove = {}) { + if (remove.remove) return; + const res = await this.fetchSquareChatEvents(mid, syncToken); + if (remove.remove) return; + const _syncToken = res.syncToken; + for (let i = 0; i < res.events.length; i++) { + const event = res.events[i]; + if (remove.remove) return; + await handler(event, this, mid); + } + let interval = 1000; + if (!res.events.length) { + interval = 2000; + } + if (!remove.remove) { + setTimeout(() => { + this.squareChatEvent(handler, mid, _syncToken, i, remove); + }, i ? i : interval); + } + return remove; + } + squareChatEventTargets = {}; + getSquareChatEventTarget(mid) { + if (this.squareChatEventTargets[mid]) { + return this.squareChatEventTargets[mid]; + } + const squareEventTarget = new EventTarget(); + this.squareChatEventTargets[mid] = squareEventTarget; + squareEventTarget.remove = { remove: false }; + this.parser.def.SquareEventPayload.forEach((e) => { + let name = e.name.replace("notified", "") + .replace("notification", ""); + name = name[0].toLowerCase() + name.substring(1); + squareEventTarget["on" + name] = null; + }); + this.squareChatEvent( + (event) => { + let name = Object.keys(event.payload)[0].toString().replace( + "notified", + "", + ) + .replace("notification", ""); + name = name[0].toLowerCase() + name.substring(1); + const data = event.payload[Object.keys(event.payload)[0]]; + const squareEvent = new Event(name); + objectPlus(squareEvent, data); + if (typeof squareEventTarget["on" + name] === "function") { + squareEventTarget["on" + name](squareEvent); + } + squareEventTarget.dispatchEvent(squareEvent); + if (name == "receiveMessage" || name == "sendMessage") { + const squareEventM = new Event("message"); + objectPlus(squareEventM, data); + if (typeof squareEventTarget["onmessage"] === "function") { + squareEventTarget["onmessage"](squareEventM); + } + } + }, + mid, + null, + null, + squareEventTarget.remove, + ); + return this.squareChatEventTargets[mid]; + } +} +class LINEServise { + LINEService_API_PATH = "/S4"; + LINEService_P_TYPE = 4; + async getProfile() { + const profile = await this.request( + [], + "getProfile", + this.LINEService_P_TYPE, + "Profile", + this.LINEService_API_PATH, + ); + this.profile = profile; + return profile; + } +} +class LiffServise { + LiffService_API_PATH = "/LIFF1"; + LiffService_P_TYPE = 4; + async issueLiffView( + chatMid, + liffId = "1562242036-RW04okm", + lang = "ja_JP", + ) { + let context = [12, 1, []]; + let chatType; + if (chatMid) { + chat = [11, 1, chatMid]; + if (chatMid[0] in ["u", "c", "r"]) { + chatType = 2; + } else { + chatType = 3; + } + context = [12, chatType, [chat]]; + } + return await this.request( + [ + [11, 1, liffId], + [12, 2, [ + context, + ]], + [11, 3, lang], + ], + "issueLiffView", + this.LiffService_P_TYPE, + true, + this.LiffService_API_PATH, + ); + } +} +class ChannelService { + ChannelService_API_PATH = "/CH3"; + ChannelService_P_TYPE = 3; + Channels = {}; + async approveChannelAndIssueChannelToken(channelId = "1341209850") { + const res = await this.direct_request( + [[11, 1, channelId]], + "approveChannelAndIssueChannelToken", + this.ChannelService_P_TYPE, + true, + this.ChannelService_API_PATH, + ); + this.Channels[channelId] = res; + return res; + } + async getChannelToken(channelId, refresh = false) { + if (this.Channels[channelId] && (!refresh)) { + return this.Channels[channelId][5]; + } + return (await this.approveChannelAndIssueChannelToken(channelId))[5]; + } +} +class LineMethod { + async voom2mid(postId) { + const postf = await this.proxyFetchx( + "https://gw.line.naver.jp/mh/api/v57/post/get.json?postId=" + + postId + + "&sourceType=TALKROOM", + { + method: "GET", + headers: { + "x-line-bdbtemplateversion": "v1", + "x-lsr": "JP", + "user-agent": this.thrift.config.ua, + "x-line-channeltoken": await this.getChannelToken( + "1341209850", + ), + "accept-encoding": "gzip", + "x-line-global-config": + "discover.enable=true; follow.enable=true; reboot.phase=scenario", + "x-line-mid": this.profile.mid, + "content-type": "application/json; charset=UTF-8", + "x-line-application": this.thrift.config.appName, + "x-lal": "ja_JP", + "x-lpv": "1", + }, + }, + ); + const info = await postf.json(); + const resp = {}; + if (info.message == "success") { + resp.postUser = { + name: info.result.feed.post.userInfo.nickname, + mid: info.result.feed.post.userInfo.mid, + }; + if (info.result.feed.post.comments) { + resp.commentUsers = []; + for ( + let i = 0; + i < info.result.feed.post.comments.length; + i++ + ) { + resp.commentUsers[i] = { + name: + info.result.feed.post.comments[i].userInfo.nickname, + mid: info.result.feed.post.comments[i].userInfo.mid, + }; + } + } + if (info.result.feed.post.likes) { + resp.likeUsers = []; + for (let i = 0; i < info.result.feed.post.likes.length; i++) { + resp.likeUsers[i] = { + name: info.result.feed.post.likes[i].userInfo.nickname, + mid: info.result.feed.post.likes[i].userInfo.mid, + }; + } + } + return resp; + } + throw new Error(info.message); + } +} + +function objectPlus(baseObj, object) { + for (const key in object) { + if (Object.hasOwnProperty.call(object, key)) { + baseObj[key] = object[key]; + } + } +} + +class LineClient extends Classes( + LineMethod, + ChannelService, + SquareServise, + LiffServise, + LINEServise, +) { + constructor( + ) { + var target; + if (opener) { + target = opener; + } else if (parent) { + target = parent; + } + super(); + if (target) { + this.thrift = new LineThriftPost(target); + } else { + throw new Error("No parentWindow"); + } + this.parser = new ThriftRenameParser() + } + async init(){ + this.parser.def = await fetch("https://line-selfbot--dev.deno.dev/res/thrift.json").then((r) => r.json()) + } + async request( + CHRdata, + methodName, + protocol_type = 3, + parse = true, + path = "/S3", + headers = {}, + ) { + const res = await this.thrift.postRequestAndGetResponse( + [ + [ + 12, + 1, + CHRdata, + ], + ], + methodName, + protocol_type, + path, + headers, + ); + if (res.e) { + throw new Error(JSON.stringify(res.e, null, 2), { cause: res.e }); + } + if (this.parser && (parse === true)) { + this.parser.rename_data(res); + } else if (this.parser && parse) { + return this.parser.rename_thrift(parse, res.value); + } + return res.value; + } + async direct_request( + CHRdata, + methodName, + protocol_type = 3, + parse = true, + path = "/S3", + headers = {}, + ) { + const res = await this.thrift.postRequestAndGetResponse( + CHRdata, + methodName, + protocol_type, + path, + headers, + ); + if (res.e) { + throw new Error(JSON.stringify(res.e, null, 2), { cause: res.e }); + } + if (this.parser && (parse === true)) { + this.parser.rename_data(res); + } else if (this.parser && parse) { + return this.parser.rename_thrift(parse, res.value); + } + return res.value; + } + async parse_request( + data, + methodName, + protocol_type = 3, + parse = true, + path = "/S3", + headers = {}, + parseName, + ) { + if (!parseName) { + parseName = methodName.substr(0, 1).toUpperCase() + + methodName.substr(1) + "Request"; + } + const CHRdata = this.parser.parse_data(parseName, data); + return this.request( + CHRdata, + methodName, + protocol_type, + parse, + path, + headers, + ); + } + sleep() { + this.thrift.closeSocket(); + } + wake() { + this.thrift.reOpenSocket(); + } + timeout(f, t, e) { + return new Promise((resolve, reject) => { + let time = true; + f().then((res) => { + resolve(res); + time = false; + }); + setTimeout(() => { + if (time) { + reject("Time Out"); + e(); + } + }, t); + }); + } + toJSON() { + return { + device: this.deviceName, + authToken: this.authToken, + profile: this.profile, + }; + } + toString() { + return "LineClient(" + (JSON.stringify({ + device: this.deviceName, + authToken: this.authToken, + })) + ")"; + } +} +//export {LineSquareClient,LineTCompactSocket} +function Classes(...bases) { + class Bases { + constructor() { + bases.forEach((base) => Object.assign(this, new base())); + } + } + bases.forEach((base) => { + Object.getOwnPropertyNames(base.prototype) + .filter((prop) => prop != "constructor") + .forEach((prop) => Bases.prototype[prop] = base.prototype[prop]); + }); + return Bases; +} diff --git a/site/js/localforage.min.js b/site/js/localforage.min.js new file mode 100644 index 0000000..7403f8f --- /dev/null +++ b/site/js/localforage.min.js @@ -0,0 +1,7 @@ +/*! + localForage -- Offline Storage, Improved + Version 1.10.0 + https://localforage.github.io/localForage + (c) 2013-2017 Mozilla, Apache License 2.0 +*/ +!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.localforage=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g=43)}}).catch(function(){return!1})}function n(a){return"boolean"==typeof xa?va.resolve(xa):m(a).then(function(a){return xa=a})}function o(a){var b=ya[a.name],c={};c.promise=new va(function(a,b){c.resolve=a,c.reject=b}),b.deferredOperations.push(c),b.dbReady?b.dbReady=b.dbReady.then(function(){return c.promise}):b.dbReady=c.promise}function p(a){var b=ya[a.name],c=b.deferredOperations.pop();if(c)return c.resolve(),c.promise}function q(a,b){var c=ya[a.name],d=c.deferredOperations.pop();if(d)return d.reject(b),d.promise}function r(a,b){return new va(function(c,d){if(ya[a.name]=ya[a.name]||B(),a.db){if(!b)return c(a.db);o(a),a.db.close()}var e=[a.name];b&&e.push(a.version);var f=ua.open.apply(ua,e);b&&(f.onupgradeneeded=function(b){var c=f.result;try{c.createObjectStore(a.storeName),b.oldVersion<=1&&c.createObjectStore(wa)}catch(c){if("ConstraintError"!==c.name)throw c;console.warn('The database "'+a.name+'" has been upgraded from version '+b.oldVersion+" to version "+b.newVersion+', but the storage "'+a.storeName+'" already exists.')}}),f.onerror=function(a){a.preventDefault(),d(f.error)},f.onsuccess=function(){var b=f.result;b.onversionchange=function(a){a.target.close()},c(b),p(a)}})}function s(a){return r(a,!1)}function t(a){return r(a,!0)}function u(a,b){if(!a.db)return!0;var c=!a.db.objectStoreNames.contains(a.storeName),d=a.versiona.db.version;if(d&&(a.version!==b&&console.warn('The database "'+a.name+"\" can't be downgraded from version "+a.db.version+" to version "+a.version+"."),a.version=a.db.version),e||c){if(c){var f=a.db.version+1;f>a.version&&(a.version=f)}return!0}return!1}function v(a){return new va(function(b,c){var d=new FileReader;d.onerror=c,d.onloadend=function(c){var d=btoa(c.target.result||"");b({__local_forage_encoded_blob:!0,data:d,type:a.type})},d.readAsBinaryString(a)})}function w(a){return g([l(atob(a.data))],{type:a.type})}function x(a){return a&&a.__local_forage_encoded_blob}function y(a){var b=this,c=b._initReady().then(function(){var a=ya[b._dbInfo.name];if(a&&a.dbReady)return a.dbReady});return i(c,a,a),c}function z(a){o(a);for(var b=ya[a.name],c=b.forages,d=0;d0&&(!a.db||"InvalidStateError"===e.name||"NotFoundError"===e.name))return va.resolve().then(function(){if(!a.db||"NotFoundError"===e.name&&!a.db.objectStoreNames.contains(a.storeName)&&a.version<=a.db.version)return a.db&&(a.version=a.db.version+1),t(a)}).then(function(){return z(a).then(function(){A(a,b,c,d-1)})}).catch(c);c(e)}}function B(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function C(a){function b(){return va.resolve()}var c=this,d={db:null};if(a)for(var e in a)d[e]=a[e];var f=ya[d.name];f||(f=B(),ya[d.name]=f),f.forages.push(c),c._initReady||(c._initReady=c.ready,c.ready=y);for(var g=[],h=0;h>4,k[i++]=(15&d)<<4|e>>2,k[i++]=(3&e)<<6|63&f;return j}function O(a){var b,c=new Uint8Array(a),d="";for(b=0;b>2],d+=Da[(3&c[b])<<4|c[b+1]>>4],d+=Da[(15&c[b+1])<<2|c[b+2]>>6],d+=Da[63&c[b+2]];return c.length%3==2?d=d.substring(0,d.length-1)+"=":c.length%3==1&&(d=d.substring(0,d.length-2)+"=="),d}function P(a,b){var c="";if(a&&(c=Ua.call(a)),a&&("[object ArrayBuffer]"===c||a.buffer&&"[object ArrayBuffer]"===Ua.call(a.buffer))){var d,e=Ga;a instanceof ArrayBuffer?(d=a,e+=Ia):(d=a.buffer,"[object Int8Array]"===c?e+=Ka:"[object Uint8Array]"===c?e+=La:"[object Uint8ClampedArray]"===c?e+=Ma:"[object Int16Array]"===c?e+=Na:"[object Uint16Array]"===c?e+=Pa:"[object Int32Array]"===c?e+=Oa:"[object Uint32Array]"===c?e+=Qa:"[object Float32Array]"===c?e+=Ra:"[object Float64Array]"===c?e+=Sa:b(new Error("Failed to get type for BinaryArray"))),b(e+O(d))}else if("[object Blob]"===c){var f=new FileReader;f.onload=function(){var c=Ea+a.type+"~"+O(this.result);b(Ga+Ja+c)},f.readAsArrayBuffer(a)}else try{b(JSON.stringify(a))}catch(c){console.error("Couldn't convert value into a JSON string: ",a),b(null,c)}}function Q(a){if(a.substring(0,Ha)!==Ga)return JSON.parse(a);var b,c=a.substring(Ta),d=a.substring(Ha,Ta);if(d===Ja&&Fa.test(c)){var e=c.match(Fa);b=e[1],c=c.substring(e[0].length)}var f=N(c);switch(d){case Ia:return f;case Ja:return g([f],{type:b});case Ka:return new Int8Array(f);case La:return new Uint8Array(f);case Ma:return new Uint8ClampedArray(f);case Na:return new Int16Array(f);case Pa:return new Uint16Array(f);case Oa:return new Int32Array(f);case Qa:return new Uint32Array(f);case Ra:return new Float32Array(f);case Sa:return new Float64Array(f);default:throw new Error("Unkown type: "+d)}}function R(a,b,c,d){a.executeSql("CREATE TABLE IF NOT EXISTS "+b.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],c,d)}function S(a){var b=this,c={db:null};if(a)for(var d in a)c[d]="string"!=typeof a[d]?a[d].toString():a[d];var e=new va(function(a,d){try{c.db=openDatabase(c.name,String(c.version),c.description,c.size)}catch(a){return d(a)}c.db.transaction(function(e){R(e,c,function(){b._dbInfo=c,a()},function(a,b){d(b)})},d)});return c.serializer=Va,e}function T(a,b,c,d,e,f){a.executeSql(c,d,e,function(a,g){g.code===g.SYNTAX_ERR?a.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[b.storeName],function(a,h){h.rows.length?f(a,g):R(a,b,function(){a.executeSql(c,d,e,f)},f)},f):f(a,g)},f)}function U(a,b){var c=this;a=j(a);var d=new va(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){T(c,e,"SELECT * FROM "+e.storeName+" WHERE key = ? LIMIT 1",[a],function(a,c){var d=c.rows.length?c.rows.item(0).value:null;d&&(d=e.serializer.deserialize(d)),b(d)},function(a,b){d(b)})})}).catch(d)});return h(d,b),d}function V(a,b){var c=this,d=new va(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){T(c,e,"SELECT * FROM "+e.storeName,[],function(c,d){for(var f=d.rows,g=f.length,h=0;h0)return void f(W.apply(e,[a,h,c,d-1]));g(b)}})})}).catch(g)});return h(f,c),f}function X(a,b,c){return W.apply(this,[a,b,c,1])}function Y(a,b){var c=this;a=j(a);var d=new va(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){T(c,e,"DELETE FROM "+e.storeName+" WHERE key = ?",[a],function(){b()},function(a,b){d(b)})})}).catch(d)});return h(d,b),d}function Z(a){var b=this,c=new va(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){T(b,d,"DELETE FROM "+d.storeName,[],function(){a()},function(a,b){c(b)})})}).catch(c)});return h(c,a),c}function $(a){var b=this,c=new va(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){T(b,d,"SELECT COUNT(key) as c FROM "+d.storeName,[],function(b,c){var d=c.rows.item(0).c;a(d)},function(a,b){c(b)})})}).catch(c)});return h(c,a),c}function _(a,b){var c=this,d=new va(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){T(c,e,"SELECT key FROM "+e.storeName+" WHERE id = ? LIMIT 1",[a+1],function(a,c){var d=c.rows.length?c.rows.item(0).key:null;b(d)},function(a,b){d(b)})})}).catch(d)});return h(d,b),d}function aa(a){var b=this,c=new va(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){T(b,d,"SELECT key FROM "+d.storeName,[],function(b,c){for(var d=[],e=0;e '__WebKitDatabaseInfoTable__'",[],function(c,d){for(var e=[],f=0;f0}function ha(a){var b=this,c={};if(a)for(var d in a)c[d]=a[d];return c.keyPrefix=ea(a,b._defaultConfig),ga()?(b._dbInfo=c,c.serializer=Va,va.resolve()):va.reject()}function ia(a){var b=this,c=b.ready().then(function(){for(var a=b._dbInfo.keyPrefix,c=localStorage.length-1;c>=0;c--){var d=localStorage.key(c);0===d.indexOf(a)&&localStorage.removeItem(d)}});return h(c,a),c}function ja(a,b){var c=this;a=j(a);var d=c.ready().then(function(){var b=c._dbInfo,d=localStorage.getItem(b.keyPrefix+a);return d&&(d=b.serializer.deserialize(d)),d});return h(d,b),d}function ka(a,b){var c=this,d=c.ready().then(function(){for(var b=c._dbInfo,d=b.keyPrefix,e=d.length,f=localStorage.length,g=1,h=0;h=0;b--){var c=localStorage.key(b);0===c.indexOf(a)&&localStorage.removeItem(c)}}):va.reject("Invalid arguments"),h(d,b),d}function ra(a,b){a[b]=function(){var c=arguments;return a.ready().then(function(){return a[b].apply(a,c)})}}function sa(){for(var a=1;a div +//profile +div( + { + "class": "profileModal-module__modal__QRrnT ", + "role": "dialog", + "aria-labelledby": "profile modal", + "style": "position: absolute; z-index: 28; left: 40%; top: 40%; height: fit-content; background-color: #fff;" + }, + div( + { + "class": "profileModal-module__content__qKTEy" + }, + div( + { + "class": "profileModal-module__info_area__VRAIt" + }, + div( + { + "class": "profileImage-module__thumbnail_wrap__0bK7m ", + "data-mid": "UWFbyqkZaWy8RbxqKUd2J_jPG-YLeoKRlwwlqlGZqnGA", + "data-profile-image": "true", + "style": "border-radius: 50%;cursor: default;margin: 30% 0 0 0;" + }, + div( + { + "class": "profileImage-module__thumbnail_area__nqIpB" + }, + span( + { + "class": "profileImage-module__thumbnail__Q6OsR" + }, + img( + { + "src": "", + "class": "", + "loading": "lazy", + "alt": "", + "draggable": "false" + }, + + ) + ) + ) + ), div( + { + "class": "profileModal-module__name_box__vJfbr" + }, + button( + { + "class": "editButton-module__button_edit__GA02s ", + "type": "button", + "aria-pressed": "false", + "data-ellipsis": "1" + }, + span( + { + "class": "editButton-module__name__uQ-y5" + }, + pre( + {}, + span( + {}, + "大島 聡太郎" + ) + ) + ), i( + { + "class": "icon editButton-module__icon__rQo8u" + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "5.0" + }, + g( + { + "transform": "translate(-2 -2)" + }, + path( + { + "d": "M20.0996 19.2397v1.3H3.9176v-1.3h16.182ZM14.9654 3.4603l3.133 3.134-11.063 11.065h-3.135v-3.133l11.065-11.066Z" + }, + + ) + ) + ) + ) + ), form( + { + "class": "editInput-module__edit_box__ygtSs" + }, + label( + { + "class": "editInput-module__label_text__5j1Nn" + }, + input( + { + "type": "text", + "class": "editInput-module__input_text__X58rV ", + "placeholder": "大島 聡太郎", + "maxlength": "20", + "value": "大島 聡太郎" + }, + + ), span( + { + "class": "editInput-module__count__GpSgr" + }, + "(6/20)" + ) + ), button( + { + "type": "submit", + "class": "editInput-module__button_confirm__r46cQ", + "aria-label": "confirm button" + }, + i( + { + "class": "icon editInput-module__icon__UT9Fu" + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "5.0" + }, + g( + { + "transform": "translate(-2 -2)" + }, + path( + { + "d": "m10 18.561-7.707-7.707L3.707 9.44 10 15.732 20.293 5.439l1.414 1.415z" + }, + + ) + ) + ) + ) + ), button( + { + "type": "button", + "class": "editInput-module__button_cancel__A7CNA", + "aria-label": "cancel button" + }, + i( + { + "class": "icon editInput-module__icon__UT9Fu" + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "5.0" + }, + g( + { + "transform": "translate(-2 -2)" + }, + path( + { + "d": "m19.008 6.406-1.414-1.414L12 10.586 6.405 4.992 4.991 6.406 10.586 12l-5.595 5.594 1.414 1.415L12 13.414l5.594 5.595 1.414-1.415L13.414 12z" + }, + + ) + ) + ) + ) + ) + ) + ), div( + { + "class": "profileModal-module__description_box__Jb6O2" + }, + p( + { + "class": "profileModal-module__description__hSNDU", + "data-tooltip": "87f15f9f-0c36-4796-bf4e-f74d9f10fef5" + }, + + ) + ) + ), div( + { + "class": "profileModal-module__action_area__gN4d-" + }, + button( + { + "type": "button", + "class": "profileModal-module__button_action__SmB4T", + "aria-label": "chat", + "data-tooltip": "トーク" + }, + i( + { + "class": "icon profileModal-module__icon__ryFCf" + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "5.0" + }, + g( + { + "transform": "translate(-2 -2)" + }, + path( + { + "d": "M11.9997 3.257c5.156 0 9.35 3.685 9.35 8.215 0 4.53-4.194 8.216-9.35 8.216-1.289 0-2.543-.232-3.732-.69l-2.846 1.657a.6473.6473 0 0 1-.327.088.649.649 0 0 1-.64-.765l.552-3.061c-1.523-1.506-2.357-3.426-2.357-5.445 0-4.53 4.195-8.215 9.35-8.215Zm3.783 7.227c-.546 0-.989.442-.989.988s.443.989.989.989.988-.443.988-.989-.442-.988-.988-.988Zm-3.783 0c-.546 0-.988.442-.988.988s.442.989.988.989.989-.443.989-.989-.443-.988-.989-.988Zm-3.782 0c-.546 0-.989.442-.989.988s.443.989.989.989c.545 0 .988-.443.988-.989s-.443-.988-.988-.988Z" + }, + + ) + ) + ) + ) + ), button( + { + "type": "button", + "class": "profileModal-module__button_action__SmB4T", + "aria-label": "home", + "data-tooltip": "ホーム" + }, + i( + { + "class": "icon profileModal-module__icon__ryFCf" + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "5.0" + }, + g( + { + "transform": "translate(-2 -2)" + }, + path( + { + "d": "m12.3875 3.927-.001-.001-.386-.297-.387.297c0 .001 0 .001-.001.001L2 11.3194l.775 1.0084 2.4839-1.9103v8.8298c0 .6195.5033 1.1237 1.1228 1.1237h5.1302V16.437h.9772v3.9341h5.1292c.6195 0 1.1228-.5042 1.1228-1.1237v-8.8298l2.484 1.9103L22 11.3194 12.3875 3.927Z" + }, + + ) + ) + ) + ) + ) + ) + ) +) +//msgUI +div( + { + "style": "position: absolute; z-index: 28; left: 575px; top: 335px;" + }, + div( + { + "class": "actionPopoverLayout-module__popover_wrap__Eob7j ", + "style": "left: auto; opacity: 1; right: 0px;" + }, + ul( + { + "class": "actionPopoverList-module__action_list__tJDFe" + }, + li( + { + "class": "actionPopoverListItem-module__action_item__sCl2u" + }, + button( + { + "type": "button", + "class": "actionPopoverListItem-module__button_action__mHl56", + "aria-haspopup": "false", + "aria-expanded": "true" + }, + "リプライ" + ) + ), li( + { + "class": "actionPopoverListItem-module__action_item__sCl2u" + }, + button( + { + "type": "button", + "class": "actionPopoverListItem-module__button_action__mHl56", + "aria-haspopup": "false", + "aria-expanded": "true" + }, + "コピー" + ) + ), li( + { + "class": "actionPopoverListItem-module__action_item__sCl2u" + }, + button( + { + "type": "button", + "class": "actionPopoverListItem-module__button_action__mHl56", + "aria-haspopup": "false", + "aria-expanded": "true" + }, + "転送" + ) + ) + ), ul( + { + "class": "actionPopoverList-module__action_list__tJDFe" + }, + li( + { + "class": "actionPopoverListItem-module__action_item__sCl2u" + }, + button( + { + "type": "button", + "class": "actionPopoverListItem-module__button_action__mHl56", + "aria-haspopup": "false", + "aria-expanded": "true" + }, + "通報" + ) + ) + ) + ) +) + +// group :UI +div( + { + "style": "position: absolute; z-index: 28; left: 766px; top: 69.4167px;" + }, + div( + { + "class": "actionPopoverLayout-module__popover_wrap__Eob7j ", + "style": "left: auto; opacity: 1; right: 27px;" + }, + ul( + { + "class": "actionPopoverList-module__action_list__tJDFe" + }, + li( + { + "class": "actionPopoverListItem-module__action_item__sCl2u" + }, + button( + { + "type": "button", + "class": "actionPopoverListItem-module__button_action__mHl56", + "aria-haspopup": "false", + "aria-expanded": "true" + }, + "通知オフ" + ) + ) + , li( + { + "class": "actionPopoverListItem-module__action_item__sCl2u" + }, + button( + { + "type": "button", + "class": "actionPopoverListItem-module__button_action__mHl56", + "aria-haspopup": "false", + "aria-expanded": "true" + }, + "招待" + ) + ) + ), ul( + { + "class": "actionPopoverList-module__action_list__tJDFe" + }, + li( + { + "class": "actionPopoverListItem-module__action_item__sCl2u" + }, + button( + { + "type": "button", + "class": "actionPopoverListItem-module__button_action__mHl56", + "aria-haspopup": "false", + "aria-expanded": "true" + }, + "グループを編集" + ) + ), li( + { + "class": "actionPopoverListItem-module__action_item__sCl2u" + }, + button( + { + "type": "button", + "class": "actionPopoverListItem-module__button_action__mHl56", + "aria-haspopup": "false", + "aria-expanded": "true" + }, + "通報" + ) + ), li( + { + "class": "actionPopoverListItem-module__action_item__sCl2u" + }, + button( + { + "type": "button", + "class": "actionPopoverListItem-module__button_action__mHl56", + "aria-haspopup": "false", + "aria-expanded": "true" + }, + "グループ退会" + ) + ) + ) + ) +) + diff --git a/site/js/reportUI.js b/site/js/reportUI.js new file mode 100644 index 0000000..45beac1 --- /dev/null +++ b/site/js/reportUI.js @@ -0,0 +1,225 @@ +div( + { + "id": "root", + "style": "min-width: 264px; min-height: 442px;", + }, + div( + { + "class": "reportPopup-module__popup__gOoi- ", + }, + div( + { + "class": "reportPopup-module__header__tvDLL", + }, + strong( + { + "class": "reportPopup-module__title__aWBrs", + }, + "通報", + ), + ), + div( + { + "class": "reportPopup-module__contents__ym78g", + }, + div( + { + "class": "reportPopup-module__select_box__330HE", + }, + p( + { + "class": "reportPopup-module__description__SZQas", + }, + "通報する理由を選択してください", + ), + ul( + {}, + li( + {}, + div( + { + "class": "radio-module__radio_wrap__AaS4a", + }, + label( + { + "class": "radio-module__radio_label__sDfDn", + }, + input( + { + "type": "radio", + "class": + "blind radio-module__radio_input__xqGP8 ", + "name": "report_reason", + "value": "スパム / 宣伝目的", + "checked": "", + }, + ), + i( + { + "class": "radio-module__icon__17T16", + }, + ), + span( + { + "class": "radio-module__text__CEMXA", + }, + "スパム / 宣伝目的", + ), + ), + ), + ), + li( + {}, + div( + { + "class": "radio-module__radio_wrap__AaS4a", + }, + label( + { + "class": "radio-module__radio_label__sDfDn", + }, + input( + { + "type": "radio", + "class": + "blind radio-module__radio_input__xqGP8 ", + "name": "report_reason", + "value": "性的いやがらせ / 出会い目的", + }, + ), + i( + { + "class": "radio-module__icon__17T16", + }, + ), + span( + { + "class": "radio-module__text__CEMXA", + }, + "性的いやがらせ / 出会い目的", + ), + ), + ), + ), + li( + {}, + div( + { + "class": "radio-module__radio_wrap__AaS4a", + }, + label( + { + "class": "radio-module__radio_label__sDfDn", + }, + input( + { + "type": "radio", + "class": + "blind radio-module__radio_input__xqGP8 ", + "name": "report_reason", + "value": "迷惑行為", + }, + ), + i( + { + "class": "radio-module__icon__17T16", + }, + ), + span( + { + "class": "radio-module__text__CEMXA", + }, + "迷惑行為", + ), + ), + ), + ), + li( + {}, + div( + { + "class": "radio-module__radio_wrap__AaS4a", + }, + label( + { + "class": "radio-module__radio_label__sDfDn", + }, + input( + { + "type": "radio", + "class": + "blind radio-module__radio_input__xqGP8 ", + "name": "report_reason", + "value": "その他", + }, + ), + i( + { + "class": "radio-module__icon__17T16", + }, + ), + span( + { + "class": "radio-module__text__CEMXA", + }, + "その他", + ), + ), + ), + ), + ), + ), + pre( + { + "class": "reportPopup-module__description__SZQas", + }, + "通報するとLINEに以下の情報が送信され、通報内容の確認・対応や不正利用防止ツールの開発を含む不正利用防止のために利用されます。\nまた、上記目的の達成に必要な範囲で以下の情報を業務委託先に共有することがあります。\n\n■送信される情報:\n最近送受信した10件のトークメッセージ、グループの情報(表示名/グループの画像/あなたをグループに招待したユーザーの情報等)、通報者の情報(表示名/プロフィール画像等)", + ), + ), + div( + { + "class": "reportPopup-module__footer__8dbYz", + }, + div( + { + "class": "reportPopup-module__button_group__Aw3yL", + }, + button( + { + "class": + "reportPopup-module__button_cancel__-9EqR button-module__button__NBD6v ", + "type": "button", + "data-shape": "contained", + }, + span( + { + "class": "button-module__text__sF0fb", + }, + "キャンセル", + ), + ), + button( + { + "class": + "reportPopup-module__button_confirm__epFlj button-module__button__NBD6v ", + "type": "button", + "data-shape": "contained", + "data-color": "primary", + }, + span( + { + "class": "button-module__text__sF0fb", + }, + "同意して送信", + ), + ), + ), + ), + ), + ul( + { + "class": "ToastContainer-module__toast-list__QAniw", + "style": "z-index: 100;", + }, + ), +); diff --git a/site/js/strint.js b/site/js/strint.js new file mode 100644 index 0000000..bb2a333 --- /dev/null +++ b/site/js/strint.js @@ -0,0 +1 @@ +(()=>{function string_to_utf8_hex_string(text) {var bytes1 = string_to_utf8_bytes(text);var hex_str1 = bytes_to_hex_string(bytes1);return hex_str1;}function string_to_utf8_bytes(text) {var result = [];if (text == null)return result;for (var i = 0; i < text.length; i++) {var c = text.charCodeAt(i);if (c <= 0x7f) {result.push(c);} else if (c <= 0x07ff) {result.push(((c >> 6) & 0x1F) | 0xC0);result.push((c & 0x3F) | 0x80);} else {result.push(((c >> 12) & 0x0F) | 0xE0);result.push(((c >> 6) & 0x3F) | 0x80);result.push((c & 0x3F) | 0x80);}}return result;}function byte_to_hex(byte_num) {var digits = (byte_num).toString(16);if (byte_num < 16) return '0' + digits;return digits;}function bytes_to_hex_string(bytes) {var result = "";for (var i = 0; i < bytes.length; i++) {result += byte_to_hex(bytes[i]);}return result;}function hex_to_byte(hex_str) {return parseInt(hex_str, 16);}function hex_string_to_bytes(hex_str) {var result = [];for (var i = 0; i < hex_str.length; i += 2) {result.push(hex_to_byte(hex_str.substr(i, 2)));}return result;}function enc(str) {let int = BigInt("0x" + string_to_utf8_hex_string(str));int = int * 334n;return base64encode(hex_string_to_bytes(int.toString(16)));}function base64encode(data){return btoa([...data].map(n => String.fromCharCode(n)).join(""));};window.enc=enc})() \ No newline at end of file diff --git a/site/js/thrift/LineServises.js b/site/js/thrift/LineServises.js new file mode 100644 index 0000000..e20a4f1 --- /dev/null +++ b/site/js/thrift/LineServises.js @@ -0,0 +1,1017 @@ +class SquareServise { + SquareService_API_PATH = "/SQ1"; + SquareService_P_TYPE = 4; + async getJoinedSquares(limit = 50, continuationToken) { + return await this.request( + [[11, 2, continuationToken], [8, 3, limit]], + "getJoinedSquares", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async inviteIntoSquareChat(inviteeMids, squareChatMid) { + return await this.request( + [[15, 1, [11, inviteeMids]], [11, 2, squareChatMid]], + "inviteIntoSquareChat", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async inviteToSquare(squareMid, invitees, squareChatMid) { + return await this.request( + [[11, 2, squareMid], [15, 3, [11, invitees]], [ + 11, + 4, + squareChatMid, + ]], + "inviteToSquare", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async markAsRead(squareChatMid, messageId) { + return await this.request( + [[11, 2, squareChatMid], [11, 4, messageId]], + "markAsRead", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async reactToMessage(squareChatMid, messageId, reactionType = 2) { + /* + reactionType + ALL = 0, + UNDO = 1, + NICE = 2, + LOVE = 3, + FUN = 4, + AMAZING = 5, + SAD = 6, + OMG = 7, + */ + return await this.request( + [ + [8, 1, 0], + [11, 2, squareChatMid], + [11, 3, messageId], + [8, 4, reactionType], + ], + "reactToMessage", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async findSquareByInvitationTicket(invitationTicket) { + return await this.request( + [[11, 2, invitationTicket]], + "findSquareByInvitationTicket", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async fetchMyEvents( + syncToken = undefined, + limit = 100, + continuationToken = undefined, + subscriptionId, + ) { + return await this.request( + [ + [10, 1, subscriptionId], + [11, 2, syncToken], + [8, 3, limit], + [11, 4, continuationToken], + ], + "fetchMyEvents", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async fetchSquareChatEvents( + squareChatMid, + syncToken = undefined, + continuationToken = undefined, + subscriptionId = 0, + limit = 100, + ) { + return await this.request( + [ + [10, 1, subscriptionId], + [11, 2, squareChatMid], + [11, 3, syncToken], + [8, 4, limit], + [8, 5, 1], + [8, 6, 1], + [11, 7, continuationToken], + [8, 8, 1], + ], + "fetchSquareChatEvents", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async sendSquareMessage( + squareChatMid, + text = "test Message", + contentType = 0, + contentMetadata = {}, + relatedMessageId = undefined, + ) { + const msg = [ + [11, 2, squareChatMid], + [11, 10, text], + [8, 15, contentType], + [13, 18, [11, 11, contentMetadata]], + ]; + if (relatedMessageId) { + msg.push( + [11, 21, relatedMessageId], + [8, 22, 3], + [8, 24, 2], + ); + } + return await this.request( + [ + [8, 1, 0], + [11, 2, squareChatMid], + [ + 12, + 3, + [ + [12, 1, msg], + [8, 3, 4], + ], + ], + ], + "sendMessage", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquare(squareMid) { + return await this.request( + [[11, 2, squareMid]], + "getSquare", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + async getSquareChat(squareChatMid) { + return await this.request( + [[11, 1, squareChatMid]], + "getSquareChat", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + async getJoinableSquareChats( + squareMid, + continuationToken = undefined, + limit = 100, + ) { + return await this.request( + [[11, 1, squareMid], [11, 10, continuationToken], [8, 11, limit]], + "getJoinableSquareChats", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async createSquare( + name = "TEST Square", + displayName = "Tester", + profileImageObsHash = + "0h6tJf0hQsaVt3H0eLAsAWDFheczgHd3wTCTx2eApNKSoefHNVGRdwfgxbdgUMLi8MSngnPFMeNmpbLi8MSngnPFMeNmpbLi8MSngnOA", + desc = "test with LINE-Deno-Client", + searchable = true, + SquareJoinMethodType = 0, + ) { + /* + SquareJoinMethodType + NONE(0), + APPROVAL(1), + CODE(2); + */ + return await this.request( + [ + [8, 2, 0], + [ + 12, + 2, + [ + [11, 2, name], + [11, 4, profileImageObsHash], + [11, 5, desc], + [2, 6, searchable], + [8, 7, 1], // type + [8, 8, 1], // categoryId + [10, 10, 0], // revision + [2, 11, true], // ableToUseInvitationTicket + [12, 14, [[8, 1, SquareJoinMethodType]]], + [2, 15, false], // adultOnly + [15, 16, [11, []]], // svcTags + ], + ], + [ + 12, + 3, + [ + [11, 3, displayName], + // [11, 4, profileImageObsHash], + [2, 5, true], // ableToReceiveMessage + [10, 9, 0], // revision + ], + ], + ], + "createSquare", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquareChatAnnouncements(squareChatMid) { + return await this.request( + [[11, 2, squareChatMid]], + "getSquareChatAnnouncements", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async updateSquareFeatureSet( + updateAttributes = [], + squareMid, + revision, + creatingSecretSquareChat = 0, + ) { + /* + updateAttributes: + CREATING_SECRET_SQUARE_CHAT(1), + INVITING_INTO_OPEN_SQUARE_CHAT(2), + CREATING_SQUARE_CHAT(3), + READONLY_DEFAULT_CHAT(4), + SHOWING_ADVERTISEMENT(5), + DELEGATE_JOIN_TO_PLUG(6), + DELEGATE_KICK_OUT_TO_PLUG(7), + DISABLE_UPDATE_JOIN_METHOD(8), + DISABLE_TRANSFER_ADMIN(9), + CREATING_LIVE_TALK(10); + */ + const SquareFeatureSet = [ + [11, 1, squareMid], + [10, 2, revision], + ]; + if (creatingSecretSquareChat) { + SquareFeatureSet.push([12, 11, [ + [8, 1, 1], + [8, 2, creatingSecretSquareChat], + ]]); + } + return await this.request( + [ + [14, 2, [8, updateAttributes]], + [12, 3, SquareFeatureSet], + ], + "updateSquareFeatureSet", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async joinSquare( + squareMid, + displayName, + ableToReceiveMessage = false, + passCode = undefined, + ) { + return await this.request( + [ + [11, 2, squareMid], + [ + 12, + 3, + [ + [11, 2, squareMid], + [11, 3, displayName], + [2, 5, ableToReceiveMessage], + [10, 9, 0], + ], + ], + [12, 5, [[12, 2, [[11, 1, passCode]]]]], + ], + "joinSquare", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async removeSubscriptions(subscriptionIds = []) { + return await this.request( + [ + [15, 2, [10, subscriptionIds]], + ], + "removeSubscriptions", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async unsendSquareMessage(squareChatMid, messageId) { + return await this.request( + [[11, 2, squareChatMid], [11, 3, messageId]], + "unsendMessage", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async createSquareChat( + squareChatMid, + name, + chatImageObsHash, + squareChatType = 1, + maxMemberCount = 5000, + ableToSearchMessage = 1, + squareMemberMids = [], + ) { + /* + - SquareChatType: + OPEN(1), + SECRET(2), + ONE_ON_ONE(3), + SQUARE_DEFAULT(4); + - ableToSearchMessage: + NONE(0), + OFF(1), + ON(2); + */ + return await this.request( + [ + [8, 1, 0], + [ + 12, + 2, + [ + [11, 1, squareChatMid], + [8, 3, squareChatType], + [11, 4, name], + [11, 5, chatImageObsHash], + [8, 7, maxMemberCount], + [8, 11, ableToSearchMessage], + ], + ], + [15, 3, [11, squareMemberMids]], + ], + "createSquareChat", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquareChatMembers( + squareChatMid, + continuationToken = undefined, + limit = 200, + ) { + const req = [[11, 1, squareChatMid], [8, 3, limit]]; + if (continuationToken) { + req.push([11, 2, continuationToken]); + } + return await this.request( + req, + "getSquareChatMembers", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquareFeatureSet(squareMid) { + return await this.request( + [ + [11, 2, squareMid], + ], + "getSquareFeatureSet", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquareInvitationTicketUrl(mid) { + return await this.request( + [ + [11, 2, mid], + ], + "getInvitationTicketUrl", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async updateSquareChatMember( + squareMemberMid, + squareChatMid, + notificationForMessage = true, + notificationForNewMember = true, + updatedAttrs = [6], + ) { + /* + - SquareChatMemberAttribute: + MEMBERSHIP_STATE(4), + NOTIFICATION_MESSAGE(6), + NOTIFICATION_NEW_MEMBER(7); + */ + return await this.request( + [ + [14, 2, [8, updatedAttrs]], + [ + 12, + 3, + [ + [11, 1, squareMemberMid], + [11, 2, squareChatMid], + [2, 5, notificationForMessage], + [2, 6, notificationForNewMember], + ], + ], + ], + "updateSquareChatMember", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async updateSquareMember( + updatedAttrs = [], + updatedPreferenceAttrs = [], + squareMemberMid, + squareMid, + revision, + displayName, + membershipState, + role, + ) { + /* + SquareMemberAttribute: + DISPLAY_NAME(1), + PROFILE_IMAGE(2), + ABLE_TO_RECEIVE_MESSAGE(3), + MEMBERSHIP_STATE(5), + ROLE(6), + PREFERENCE(7); + SquareMembershipState: + JOIN_REQUESTED(1), + JOINED(2), + REJECTED(3), + LEFT(4), + KICK_OUT(5), + BANNED(6), + DELETED(7); + */ + const squareMember = [[11, 1, squareMemberMid], [11, 2, squareMid]]; + if (updatedAttrs.includes(1)) { + squareMember.push([11, 3, displayName]); + } + if (updatedAttrs.includes(5)) { + squareMember.push([8, 7, membershipState]); + } + if (updatedAttrs.includes(6)) { + squareMember.push([8, 8, role]); + } + squareMember.push([10, 9, revision]); + return await this.request( + [ + [14, 2, [8, updatedAttrs]], + [14, 3, [8, updatedPreferenceAttrs]], + [12, 4, squareMember], + ], + "updateSquareMember", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async kickOutSquareMember(sid, pid) { + const UPDATE_PREF_ATTRS = []; + const UPDATE_ATTRS = [5]; + const MEMBERSHIP_STATE = 5; + const getSquareMemberResp = this.getSquareMember(pid); + const squareMember = getSquareMemberResp[1]; + const squareMemberRevision = squareMember[9]; + return await this.updateSquareMember( + UPDATE_ATTRS, + UPDATE_PREF_ATTRS, + pid, + sid, + squareMemberRevision, + undefined, + MEMBERSHIP_STATE, + ); + } + + async checkSquareJoinCode(squareMid, code) { + return await this.request( + [ + [11, 2, squareMid], + [11, 3, code], + ], + "checkJoinCode", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async createSquareChatAnnouncement( + squareChatMid, + messageId, + text, + senderSquareMemberMid, + createdAt, + announcementType = 0, + ) { + return await this.request( + [ + [8, 1, 0], + [11, 2, squareChatMid], + [ + 12, + 3, + [ + [8, 2, announcementType], + [ + 12, + 3, + [ + [ + 12, + 1, + [ + [11, 1, messageId], + [11, 2, text], + [11, 3, senderSquareMemberMid], + [10, 4, createdAt], + ], + ], + ], + ], + ], + ], + ], + "createSquareChatAnnouncement", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquareMember(squareMemberMid) { + return await this.request( + [ + [11, 2, squareMemberMid], + ], + "getSquareMember", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async searchSquareChatMembers( + squareChatMid, + displayName = "", + continuationToken, + limit = 20, + ) { + const req = [ + [11, 1, squareChatMid], + [ + 12, + 2, + [ + [11, 1, displayName], + ], + ], + [8, 4, limit], + [11, 3, continuationToken], + ]; + return await this.request( + [[12, 1, req]], + "searchSquareChatMembers", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquareEmid(squareMid) { + return await this.request( + [[11, 1, squareMid]], + "getSquareEmid", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async getSquareMembersBySquare(squareMid, squareMemberMids = []) { + return await this.request( + [ + [11, 2, squareMid], + [14, 3, [11, squareMemberMids]], + ], + "getSquareMembersBySquare", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async manualRepair(syncToken, limit = 100, continuationToken) { + return await this.request( + [ + [11, 1, syncToken], + [8, 2, limit], + [11, 3, continuationToken], + ], + "manualRepair", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async leaveSquare(squareMid) { + return await this.request( + [ + [11, 2, squareMid], + ], + "leaveSquare", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + + async reportSquare(squareMid, reportType, otherReason) { +/* + ReportType { + ADVERTISING = 1; + GENDER_HARASSMENT = 2; + HARASSMENT = 3; + OTHER = 4; +} +*/ + return await this.parse_request( + { + squareMid, + reportType, + otherReason, + }, + "reportSquare", + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + async sendSquareRequestByName(METHOD_NAME, params) { + return await this.request( + params, + METHOD_NAME, + this.SquareService_P_TYPE, + true, + this.SquareService_API_PATH, + ); + } + async getSyncToken() { + return (await Line.manualRepair(null, 1)).continuationToken; + } + async squareEvent(handler, syncToken, i, remove = {}) { + if (!syncToken) { + syncToken = await this.getSyncToken(); + } + const res = await this.fetchMyEvents(syncToken); + const _syncToken = res.syncToken; + if (syncToken) { + res.events.forEach((e) => { + handler(e, this); + }); + } + let interval = 1000; + if (!res.events.length) { + interval = 2000; + } + if (!remove.remove) { + setTimeout(() => { + this.squareEvent(handler, _syncToken, i, remove); + }, i ? i : interval); + } + return remove; + } + getSquareEventTarget() { + if (this.squareEventTarget && (!this.squareEventTarget.remove.remove)) { + return this.squareEventTarget; + } + const squareEventTarget = new EventTarget(); + this.squareEventTarget = squareEventTarget; + this.parser.def.SquareEventPayload.forEach((e) => { + let name = e.name.replace("notified", "") + .replace("notification", ""); + name = name[0].toLowerCase() + name.substring(1); + squareEventTarget["on" + name] = null; + }); + squareEventTarget.remove = { remove: false }; + this.squareEvent( + (event) => { + let name = Object.keys(event.payload)[0].toString().replace( + "notified", + "", + ) + .replace("notification", ""); + name = name[0].toLowerCase() + name.substring(1); + const data = event.payload[Object.keys(event.payload)[0]]; + const squareEvent = new Event(name); + objectPlus(squareEvent, data); + if (typeof squareEventTarget["on" + name] === "function") { + squareEventTarget["on" + name](squareEvent); + } + squareEventTarget.dispatchEvent(squareEvent); + }, + null, + null, + squareEventTarget.remove, + ); + return this.squareEventTarget; + } + async squareChatEvent(handler, mid, syncToken, i, remove = {}) { + if (remove.remove) return; + const res = await this.fetchSquareChatEvents(mid, syncToken); + if (remove.remove) return; + const _syncToken = res.syncToken; + for (let i = 0; i < res.events.length; i++) { + const event = res.events[i]; + if (remove.remove) return; + await handler(event, this, mid); + } + let interval = 1000; + if (!res.events.length) { + interval = 2000; + } + if (!remove.remove) { + setTimeout(() => { + this.squareChatEvent(handler, mid, _syncToken, i, remove); + }, i ? i : interval); + } + return remove; + } + squareChatEventTargets = {}; + getSquareChatEventTarget(mid) { + if (this.squareChatEventTargets[mid]) { + return this.squareChatEventTargets[mid]; + } + const squareEventTarget = new EventTarget(); + this.squareChatEventTargets[mid] = squareEventTarget; + squareEventTarget.remove = { remove: false }; + this.parser.def.SquareEventPayload.forEach((e) => { + let name = e.name.replace("notified", "") + .replace("notification", ""); + name = name[0].toLowerCase() + name.substring(1); + squareEventTarget["on" + name] = null; + }); + this.squareChatEvent( + (event) => { + let name = Object.keys(event.payload)[0].toString().replace( + "notified", + "", + ) + .replace("notification", ""); + name = name[0].toLowerCase() + name.substring(1); + const data = event.payload[Object.keys(event.payload)[0]]; + const squareEvent = new Event(name); + objectPlus(squareEvent, data); + if (typeof squareEventTarget["on" + name] === "function") { + squareEventTarget["on" + name](squareEvent); + } + squareEventTarget.dispatchEvent(squareEvent); + if (name == "receiveMessage" || name == "sendMessage") { + const squareEventM = new Event("message"); + objectPlus(squareEventM, data); + if (typeof squareEventTarget["onmessage"] === "function") { + squareEventTarget["onmessage"](squareEventM); + } + } + }, + mid, + null, + null, + squareEventTarget.remove, + ); + return this.squareChatEventTargets[mid]; + } +} +class LINEServise { + LINEService_API_PATH = "/S4"; + LINEService_P_TYPE = 4; + async getProfile() { + const profile = await this.request( + [], + "getProfile", + this.LINEService_P_TYPE, + "Profile", + this.LINEService_API_PATH, + ); + this.profile = profile; + return profile; + } +} +class LiffServise { + LiffService_API_PATH = "/LIFF1"; + LiffService_P_TYPE = 4; + async issueLiffView( + chatMid, + liffId = "1562242036-RW04okm", + lang = "ja_JP", + ) { + let context = [12, 1, []]; + let chatType; + if (chatMid) { + chat = [11, 1, chatMid]; + if (chatMid[0] in ["u", "c", "r"]) { + chatType = 2; + } else { + chatType = 3; + } + context = [12, chatType, [chat]]; + } + return await this.request( + [ + [11, 1, liffId], + [12, 2, [ + context, + ]], + [11, 3, lang], + ], + "issueLiffView", + this.LiffService_P_TYPE, + true, + this.LiffService_API_PATH, + ); + } +} +class ChannelService { + ChannelService_API_PATH = "/CH3"; + ChannelService_P_TYPE = 3; + Channels = {}; + async approveChannelAndIssueChannelToken(channelId = "1341209850") { + const res = await this.direct_request( + [[11, 1, channelId]], + "approveChannelAndIssueChannelToken", + this.ChannelService_P_TYPE, + true, + this.ChannelService_API_PATH, + ); + this.Channels[channelId] = res; + return res; + } + async getChannelToken(channelId, refresh = false) { + if (this.Channels[channelId] && (!refresh)) { + return this.Channels[channelId][5]; + } + return (await this.approveChannelAndIssueChannelToken(channelId))[5]; + } +} +class LineMethod { + loginMP(email, pw, cert, pincall = (pin) => { + alert(`Enter Pincode: ${pin}`); + console.log(`Enter Pincode: ${pin}`); + }) { + return new Promise((resolve, reject) => { + if (!cert) { + cert = this.getEmailCert(email); + } + const loginSSE = new EventSource( + "/login_mp?" + new URLSearchParams({ + a: btoa(JSON.stringify({ + device: this.deviceName, + email, + pw, + cert, + })), + }).toString(), + ); + loginSSE.addEventListener("pincode", (d) => { + pincall(d.data); + }); + loginSSE.addEventListener("loginErr", (d) => { + console.log("err", d.data); + loginSSE.close(); + }); + loginSSE.addEventListener("login", (d) => { + const res = JSON.parse(d.data); + this.setAuthToken(res[1]); + if (res[2]) { + this.setEmailCert(res[2], email); + } + resolve(res); + loginSSE.close(); + }); + }); + } + getEmailCert(email) { + return localStorage.getItem("cert:" + email); + } + setEmailCert(cert, email) { + return localStorage.setItem("cert:" + email, cert); + } + async voom2mid(postId) { + const postf = await this.proxyFetchx( + "https://gw.line.naver.jp/mh/api/v57/post/get.json?postId=" + postId + + "&sourceType=TALKROOM", + { + method: "GET", + headers: { + "x-line-bdbtemplateversion": "v1", + "x-lsr": "JP", + "user-agent": this.thrift.config.ua, + "x-line-channeltoken": await this.getChannelToken("1341209850"), + "accept-encoding": "gzip", + "x-line-global-config": + "discover.enable=true; follow.enable=true; reboot.phase=scenario", + "x-line-mid": this.profile.mid, + "content-type": "application/json; charset=UTF-8", + "x-line-application": this.thrift.config.appName, + "x-lal": "ja_JP", + "x-lpv": "1", + }, + }, + ); + const info = await postf.json(); + const resp = {}; + if (info.message == "success") { + resp.postUser = { + name: info.result.feed.post.userInfo.nickname, + mid: info.result.feed.post.userInfo.mid, + }; + if (info.result.feed.post.comments) { + resp.commentUsers = []; + for (let i = 0; i < info.result.feed.post.comments.length; i++) { + resp.commentUsers[i] = { + name: info.result.feed.post.comments[i].userInfo.nickname, + mid: info.result.feed.post.comments[i].userInfo.mid, + }; + } + } + if (info.result.feed.post.likes) { + resp.likeUsers = []; + for (let i = 0; i < info.result.feed.post.likes.length; i++) { + resp.likeUsers[i] = { + name: info.result.feed.post.likes[i].userInfo.nickname, + mid: info.result.feed.post.likes[i].userInfo.mid, + }; + } + } + return resp; + } + throw new Error(info.message); + } +} + +function objectPlus(baseObj, object) { + for (const key in object) { + if (Object.hasOwnProperty.call(object, key)) { + baseObj[key] = object[key]; + } + } +} diff --git a/site/js/thrift/LoginAPI.js b/site/js/thrift/LoginAPI.js new file mode 100644 index 0000000..94b2a40 --- /dev/null +++ b/site/js/thrift/LoginAPI.js @@ -0,0 +1,136 @@ +class PinVerifier { + constructor(message) { + this.message = message; + } + + getRSACrypto(json) { + const message = this.message; + const rsa = new RSAKey(); + console.log(rsa) + rsa.setPublic(json[2], json[3]); + const credentials = rsa.encrypt(message); + const keyname = json[1]; + return { keyname, credentials, message }; + } +} +class LoginAPI { + certs = {}; + async requestEmailLogin( + email, + pw, + pin = (p) => console.log(`Enter Pincode:`, p), + e2ee = false, + ) { + const rsaKey = await this.getRSAKeyInfo(); + const keynm = rsaKey[1]; + const nvalue = rsaKey[2]; + const evalue = rsaKey[3]; + const sessionKey = rsaKey[4]; + const message = String.fromCharCode(sessionKey.length) + + sessionKey + + String.fromCharCode(email.length) + + email + + String.fromCharCode(pw.length) + + pw; + const crypto = + new PinVerifier(message).getRSACrypto(rsaKey).credentials; + let secret; + if (e2ee) { //ß + secret = + "0\x8aEH\x96\xa7\x8d#5<\xfb\x91c\x12\x15\xbd\x13H\xfa\x04d\xcf\x96\xee1e\xa0]v,\x9f\xf2"; + } + const res = await this.loginV2( + keynm, + crypto, + secret, + this.device, + null, //"0697765bf509fed4ab1de69aae623212bdd1bd875bee9db071e7d413e9d84f90", //this.certs[email], + null, + "loginZ", + ); + if (res[1]) { + this.authToken = res[1]; + return res; + } else { + pin(res[4]); + const headers = { + "Host": "gw.line.naver.jp", + "accept": "application/x-thrift", + "user-agent": this.ua, + "x-line-application": this.type, + "x-line-access": res[3], + "x-lal": "ja_JP", + //'x-le': '18', 'x-lap': '5', + "x-lpv": "1", + "x-lhm": "GET", + //"x-lcs":'0005svgBAiJMiGMJdzBkKqR/78GAZEMOQ6E0p3FJkMBZA/NXe10zfYnVQDufzNaRMEW1nvYJYsLWZaWb4ww7EsebLNXGbuhmyAT2V4Fr3tA23xzvvbOaLjCahQK/4qrha2gC54XuPRbtSFNzALjs3rAyfWyczSnlenV/KFv06iqMmt1v+l3KBQdBkN9uLqGRTXzII0Y/rXtkw1wTYvMZZB7b6KunfzHf9AbFOMCqyveInGhYAetFN9Ly9x3kf2uC2czTSlynvelkYn4qn2VeGmAWOLqZrbQelyh/rRIFPttCILbOrWNEwv71Y7Pa1C0MTGFGlWWQQKlBHj0lcK+kJL13Ww==', + "accept-encoding": "gzip", + }; + const verifier = await this.proxyFetch("https://gw.line.naver.jp/Q", headers).then((res) => res.json()); + const login_res = await this.loginV2( + keynm, + crypto, + secret, + this.deviceName, + null, + verifier.result.verifier, + "loginZ", + ); + this.certs[email] = login_res[2]; + this.authToken = login_res[1]; + return login_res; + } + } + async loginV2( + keynm, + encData, + secret, + deviceName = this.device, + cert, + verifier, + calledName = "loginV2", + ) { + let loginType = 2; + if (!secret) loginType = 0; + if (verifier) { + loginType = 1; + } + return await this.direct_request( + [ + [ + 12, + 2, + [ + [8, 1, loginType], + [8, 2, 1], + [11, 3, keynm], + [11, 4, encData], + [2, 5, 0], + [11, 6, ""], + [11, 7, deviceName], + [11, 8, cert], + [11, 9, verifier], + [11, 10, secret], + [8, 11, 1], + [11, 12, "System Product Name"], + ], + ], + ], + calledName, + 3, + true, + "/api/v3p/rs", + ); + } + async getRSAKeyInfo(provider = 0) { + return await this.request( + [ + [8, 2, provider], + ], + "getRSAKeyInfo", + 3, + true, + "/api/v3/TalkService.do", + ); + } +} diff --git a/site/js/thrift/rename_thrift.js b/site/js/thrift/rename_thrift.js new file mode 100644 index 0000000..e0307dc --- /dev/null +++ b/site/js/thrift/rename_thrift.js @@ -0,0 +1,239 @@ +import thriftIdl from "./thriftrw-node/thrift-idl.js"; +const TYPE = { + STOP: 0, + VOID: 1, + BOOL: 2, + BYTE: 3, + I08: 3, + DOUBLE: 4, + I16: 6, + I32: 8, + I64: 10, + STRING: 11, + UTF7: 11, + STRUCT: 12, + MAP: 13, + SET: 14, + LIST: 15, + UTF8: 16, + UTF16: 17, +}; +function getType(obj) { + if (obj.type === "BaseType") { + return TYPE[obj.baseType.toUpperCase()]; + } else if (obj.type === "Identifier") { + return obj.name; + } +} +function isStruct(obj) { + return obj && obj.constructor === Array; +} +export default class ThriftRenameParser { + constructor(input) { + this.def = {}; + if (!input) { + return; + } + this.add_def(input); + } + add_def(input) { + const def = thriftIdl.parse(input); + const thrift_def = {}; + def.definitions.forEach((e) => { + if (e.type === "Struct") { + const name = e.id.name; + const fields_def = []; + const fields = e.fields; + for (let i = 0; i < fields.length; i++) { + const field = fields[i]; + const field_fid = field.id.value; + const field_name = field.name; + const field_def = { fid: field_fid, name: field_name }; + if (field.valueType.type == "Identifier") { + field_def.struct = field.valueType.name; + } else if (field.valueType.type == "Map") { + field_def.map = getType(field.valueType.valueType); + } else if (field.valueType.type == "List") { + field_def.list = getType(field.valueType.valueType); + } else if (field.valueType.type == "Set") { + field_def.set = getType(field.valueType.valueType); + } else if (field.valueType.baseType) { + field_def.type = + TYPE[field.valueType.baseType.toUpperCase()]; + } + fields_def.push(field_def); + } + thrift_def[name] = fields_def; + } else if (e.type === "Enum") { + const name = e.id.name; + const defs_def = {}; + const defs = e.definitions; + for (let i = 0; i < defs.length; i++) { + const def = defs[i]; + defs_def[def.value.value] = def.id.name; + } + thrift_def[name] = defs_def; + } + }); + this.def = { ...this.def, ...thrift_def }; + } + name2fid(struct_name, name) { + const struct = this.def[struct_name]; + if (struct) { + const result = struct.findIndex((e) => { + return e.name == name; + }); + if (result === -1) { + return { name: name, fid: -1 }; + } else { + return struct[result]; + } + } else { + return { name: name, fid: -1 }; + } + } + fid2name(struct_name, fid) { + const struct = this.def[struct_name]; + if (struct) { + const result = struct.findIndex((e) => { + return e.fid == fid; + }); + if (result === -1) { + return { name: fid, fid: fid }; + } else { + return struct[result]; + } + } else { + return { name: fid, fid: fid }; + } + } + rename_thrift(struct_name, object) { + const newObject = {}; + for (const fid in object) { + const value = object[fid]; + const finfo = this.fid2name(struct_name, fid); + if (finfo.struct) { + if (isStruct(this.def[finfo.struct])) { + newObject[finfo.name] = this.rename_thrift( + finfo.struct, + value, + ); + } else { + newObject[finfo.name] = this.def[finfo.struct][value] || + value; + } + } else if (typeof finfo.list === "string") { + newObject[finfo.name] = []; + value.forEach((e, i) => { + newObject[finfo.name][i] = this.rename_thrift( + finfo.list, + e, + ); + }); + } else if (typeof finfo.map === "string") { + newObject[finfo.name] = {}; + for (const key in value) { + const e = value[key]; + newObject[finfo.name][key] = this.rename_thrift( + finfo.map, + e, + ); + } + } else if (typeof finfo.set === "string") { + newObject[finfo.name] = []; + value.forEach((e, i) => { + newObject[finfo.name][i] = this.rename_thrift( + finfo.set, + e, + ); + }); + } else { + newObject[finfo.name] = value; + } + } + return newObject; + } + rename_data(data) { + const name = data._info.fname; + const value = data.value; + const struct_name = name.substr(0, 1).toUpperCase() + name.substr(1) + + "Response"; + data.value = this.rename_thrift(struct_name, value); + return data; + } + parse_data(struct_name, object) { + const newThrift = []; + for (const fname in object) { + const value = object[fname]; + const finfo = this.name2fid(struct_name, fname); + if (finfo.fid == -1) { + continue; + } + const thisValue = [null, finfo.fid, null]; + if (finfo.struct) { + if (isStruct(this.def[finfo.struct])) { + thisValue[2] = this.parse_data( + finfo.struct, + value, + ); + thisValue[0] = TYPE.STRUCT; + } else { + if (typeof value === "number") { + thisValue[2] = value; + thisValue[0] = TYPE.I64; + } else { + const Enum = this.def[finfo.struct]; + let i64; + for (const k in Enum) { + const val = Enum[k]; + if (val == value) { + i64 = Number(k); + } + } + thisValue[2] = i64; + thisValue[0] = TYPE.I64; + } + } + } else if (finfo.list) { + thisValue[0] = TYPE.LIST; + if (typeof finfo.list === "number") { + thisValue[2] = [finfo.list, value]; + } else { + thisValue[2] = [ + TYPE.STRUCT, + value.map((e) => this.parse_data(finfo.list, e)), + ]; + } + } else if (finfo.map) { + thisValue[0] = TYPE.MAP; + if (typeof finfo.map === "number") { + thisValue[2] = [TYPE.STRING, finfo.map, value]; + } else { + const obj = {}; + for (const key in value) { + const e = value[key]; + obj[key] = this.parse_data(finfo.map,e) + } + thisValue[2] = [TYPE.STRING, TYPE.STRUCT, obj]; + } + } else if (finfo.set) { + thisValue[0] = TYPE.SET; + if (typeof finfo.map === "number") { + thisValue[2] = [finfo.map, value]; + } else { + thisValue[2] = [ + TYPE.STRUCT, + value.map((e) => this.parse_data(finfo.map, e)), + ]; + } + } else if(finfo.type) { + thisValue[0] = finfo.type + thisValue[2] = value + } + newThrift.push(thisValue) + } + return newThrift; + } +} +globalThis.thriftIdl = thriftIdl; +globalThis.ThriftRenameParser = ThriftRenameParser; diff --git a/site/js/thrift/script.js b/site/js/thrift/script.js new file mode 100644 index 0000000..2d0a19e --- /dev/null +++ b/site/js/thrift/script.js @@ -0,0 +1,384 @@ +class LineThriftSocket { + constructor(authToken, device, resolve, ontokenUpdate,addH) { + this.socket = {}; + this.socketInfo = {}; + let appVer, sysName, sysVer, UA, appName; + sysVer = "12.1.4"; + switch (device) { + case "DESKTOPWIN": + appVer = "7.16.1.3000"; + sysName = "WINDOWS"; + sysVer = "10.0.0-NT-x64"; + break; + case "DESKTOPMAC": + appVer = "7.16.1.3000"; + sysName = "MAC"; + break; + case "CHROMEOS": + appVer = "3.0.3"; + sysName = "Chrome_OS"; + sysVer = "1"; + break; + case "ANDROID": + appVer = "13.4.1"; + sysName = "Android OS"; + break; + case "IOS": + appVer = "13.3.0"; + sysName = "iOS"; + break; + case "IOSIPAD": + appVer = "13.3.0"; + sysName = "iOS"; + break; + case "WATCHOS": + appVer = "13.3.0"; + sysName = "Watch OS"; + break; + case "WEAROS": + appVer = "13.4.1"; + sysName = "Wear OS"; + break; + default: + throw new Error("deviceName is wrong"); + break; + } + appName = device + "\t" + appVer + "\t" + sysName + "\t" + sysVer; + UA = "Line/" + appVer; + this.config = { + ua: UA, + appName: appName, + }; + let account = { auth: authToken, ua: UA, type: appName }; + if (addH) { + account["ex"] = JSON.stringify(addH); + } + this.wsURL = "ws" + + location.protocol.replace(":", "").replace("http", "") + "://" + + location.host + "/post?" + new URLSearchParams(account).toString(); + this.socket.post = new WebSocket(this.wsURL); + this.socket.post.onopen = (e) => { + try { + setTimeout(() => resolve(this), 200); + } catch (e) { + } + this.socketInfo.post = { status: "open", waitFunc: {} }; + }; + this.socket.post.onclose = (e) => { + this.socketInfo.post.status = false; + }; + this.socket.post.onmessage = null; + this.socket.post.onclose = (e) => { + this.socketInfo.post = { status: false }; + }; + this.socket.post.addEventListener("message",(e)=>{ + const data = JSON.parse(e.data) + if (data.event) { + ontokenUpdate(data.event) + } + }) + } + closeSocket() { + try { + this.socket.post.close(); + } catch (e) { + } + } + reOpenSocket(resolve) { + this.closeSocket(); + this.socket.post = new WebSocket(this.wsURL); + this.socket.post.onopen = (e) => { + try { + setTimeout(() => resolve(this), 200); + } catch (e) { + } + this.socketInfo.post = { status: "open", waitFunc: {} }; + }; + this.socket.post.onclose = (e) => { + this.socketInfo.post.status = false; + }; + this.socket.post.onmessage = null; + this.socket.post.onclose = (e) => { + this.socketInfo.post = { status: false }; + }; + } + post(data) { + return new Promise((resolve, reject) => { + data = { arg: data }; + data.id = Date.now(); + this.send( + this.socket.post, + this.socketInfo.post.waitFunc, + data, + resolve, + ); + }); + } + + async postParseThrift(data) { + let reqJson, resJson; + reqJson = data; + resJson = await this.post(reqJson); + if (resJson.err) { + throw new Error("Server Error : " + resJson.err); + } + return resJson; + } + + postRequestAndGetResponse( + CHRdata, + methodName, + protocol_type = 3, + path = "/S3", + headers = {}, + ) { + return new Promise((resolve, reject) => { + const request = [path, CHRdata, methodName, protocol_type, headers]; + this.postParseThrift(request).then((r) => resolve(r)).catch((e) => { + this.reOpenSocket(() => { + this.postParseThrift(request).then((r) => resolve(r)); + }); + }); + }); + } + async serverConfig( + type, + value, + ) { + const request = ["!CONFIG", type, value]; + const response = await this.postParseThrift(request); + return response; + } + send(socket, FuncMap, data, returnFunc) { + if (socket.readyState === socket.OPEN) { + socket.send(JSON.stringify(data)); + FuncMap[data.id] = (e) => { + returnFunc(e); + }; + socket.onmessage = (e) => { + let j = JSON.parse(e.data); + try { + FuncMap[j.id](j); + delete FuncMap[j.id]; + } catch (error) { + } + }; + } else throw new Error("socket not open"); + } +} +class LineClient extends Classes( + //LoginAPI, + LineMethod, + ChannelService, + SquareServise, + LiffServise, + LINEServise, +) { + constructor() { + super(); + } + async init({ + authToken, + device, + email, + pw, + pincall, + noLogin, + }) { + if (!authToken) { + authToken = 0; + } + this.deviceName = device; + await new Promise((resolve, reject) => { + this.thrift = new LineThriftSocket(authToken, device, () => { + setTimeout(async () => { + if (!authToken && !noLogin) { + return; + } + if (!authToken) { + return; + } + this.getProfile().then(() => { + resolve(); + }).catch((e) => { + throw new Error( + "authTokenが間違っているか期限切れです。もう一度ログインしてください\n" + + e, + ); + }); + }, 200); + },(t)=>{ + this.authToken = t + }); + }); + this.parser = new ThriftRenameParser(); + this.parser.def = await fetch("./res/thrift.json").then((r) => + r.json() + ); + this.authToken = authToken; + if ((!authToken) && (!noLogin)) { + await this.loginMP(email, pw, pincall); + } + } + async setAuthToken(authToken) { + this.authToken = authToken; + await this.thrift.serverConfig("UPDATE_TOKEN", authToken); + await this.getProfile(); + } + async request( + CHRdata, + methodName, + protocol_type = 3, + parse = true, + path = "/S3", + headers = {}, + ) { + const res = await this.thrift.postRequestAndGetResponse( + [ + [ + 12, + 1, + CHRdata, + ], + ], + methodName, + protocol_type, + path, + headers, + ); + if (res.e) { + throw new Error(JSON.stringify(res.e, null, 2), { cause: res.e }); + } + if (this.parser && (parse === true)) { + this.parser.rename_data(res); + } else if (this.parser && parse) { + return this.parser.rename_thrift(parse, res.value); + } + return res.value; + } + async direct_request( + CHRdata, + methodName, + protocol_type = 3, + parse = true, + path = "/S3", + headers = {}, + ) { + const res = await this.thrift.postRequestAndGetResponse( + CHRdata, + methodName, + protocol_type, + path, + headers, + ); + if (res.e) { + throw new Error(JSON.stringify(res.e, null, 2), { cause: res.e }); + } + if (this.parser && (parse === true)) { + this.parser.rename_data(res); + } else if (this.parser && parse) { + return this.parser.rename_thrift(parse, res.value); + } + return res.value; + } + async parse_request( + data, + methodName, + protocol_type = 3, + parse = true, + path = "/S3", + headers = {}, + parseName, + ) { + if (!parseName) { + parseName = methodName.substr(0, 1).toUpperCase() + + methodName.substr(1) + "Request"; + } + const CHRdata = this.parser.parse_data(parseName, data); + return this.request( + CHRdata, + methodName, + protocol_type, + parse, + path, + headers, + ); + } + async proxyFetch(url, headers = {}, method = "GET", body = null) { + const requrl = new URL(url); + const reqhost = btoa(requrl.protocol + "//" + requrl.host).replace( + "=", + "", + ); + const reqpath = requrl.pathname + requrl.search; + return await fetch( + location.origin + "/proxy/" + reqhost + "/path" + reqpath, + { + headers: headers, + method: method, + body: body, + }, + ); + } + async proxyFetchx(url, arg) { + const requrl = new URL(url); + const reqhost = btoa(requrl.protocol + "//" + requrl.host).replace( + "=", + "", + ); + const reqpath = requrl.pathname + requrl.search; + return await fetch( + location.origin + "/proxy/" + reqhost + "/path" + reqpath, + arg, + ); + } + sleep() { + this.thrift.closeSocket(); + } + wake() { + this.thrift.reOpenSocket(); + } + timeout(f, t, e) { + return new Promise((resolve, reject) => { + let time = true; + f().then((res) => { + resolve(res); + time = false; + }); + setTimeout(() => { + if (time) { + reject("Time Out"); + e(); + } + }, t); + }); + } + toJSON() { + return { + device: this.deviceName, + authToken: this.authToken, + profile: this.profile, + }; + } + toString() { + return "LineClient(" + (JSON.stringify({ + device: this.deviceName, + authToken: this.authToken, + })) + ")"; + } +} +//export {LineSquareClient,LineTCompactSocket} +function Classes(...bases) { + class Bases { + constructor() { + bases.forEach((base) => Object.assign(this, new base())); + } + } + bases.forEach((base) => { + Object.getOwnPropertyNames(base.prototype) + .filter((prop) => prop != "constructor") + .forEach((prop) => Bases.prototype[prop] = base.prototype[prop]); + }); + return Bases; +} +let Line = {}; diff --git a/site/js/thrift/thriftrw-node/.DS_Store b/site/js/thrift/thriftrw-node/.DS_Store new file mode 100644 index 0000000..e5c1f4c Binary files /dev/null and b/site/js/thrift/thriftrw-node/.DS_Store differ diff --git a/site/thriftrw-node/ast.js b/site/js/thrift/thriftrw-node/ast.js similarity index 100% rename from site/thriftrw-node/ast.js rename to site/js/thrift/thriftrw-node/ast.js diff --git a/site/thriftrw-node/thrift-idl.js b/site/js/thrift/thriftrw-node/thrift-idl.js similarity index 99% rename from site/thriftrw-node/thrift-idl.js rename to site/js/thrift/thriftrw-node/thrift-idl.js index e68d87d..ab22881 100644 --- a/site/thriftrw-node/thrift-idl.js +++ b/site/js/thrift/thriftrw-node/thrift-idl.js @@ -17,6 +17,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. + import ast from "./ast.js"; export default (function() { /* diff --git a/site/js/tmp.js b/site/js/tmp.js new file mode 100644 index 0000000..09be420 --- /dev/null +++ b/site/js/tmp.js @@ -0,0 +1,239 @@ +let eventTemplate = { + undefined:{ + "createdTime": 1712477065625, + "payload": { + "receiveMessage": { + "squareChatMid": "m3df38438ef13539f38b951d58ba30929", + "squareMessage": { + "message": { + "_from": "p2a281f8efd6632add0ffa868a36eac35", + "to": "m3df38438ef13539f38b951d58ba30929", + "toType": 4, + "id": "502722166333374818", + "createdTime": 1712477065625, + "deliveredTime": 1712477065625, + "text": "あ", + "contentMetadata": { + "NOTIFICATION_DISABLED": "null", + "app_extension_type": "null", + "PREVIEW_URL_ENABLED": "true", + "app_version_code": "140420286" + } + }, + "fromType": 5, + "squareMessageRevision": 1 + } + } + }, + "syncToken": "CgABAAAAAAAAACAKAAIAAAAAAAAADAoAAwAAAAAAAAAUCgAEAAAAAAAAAAUKAAUAAAAAAAAAAgoABgAAAAAAAAAACgAHAAABjreV9PcMAAgIAAEAAAAAAAwACQ0AAQsKAAAAAAAKAAoAAAAAAAAAAAA=" + }, + 1:{ + "createdTime": 1712476885873, + "type": 1, + "payload": { + "sendMessage": { + "squareChatMid": "m3df38438ef13539f38b951d58ba30929", + "squareMessage": { + "message": { + "_from": "p84edcedb2ef04bb3add55b2c0f0101e5", + "to": "m3df38438ef13539f38b951d58ba30929", + "toType": 4, + "id": "502721864997798226", + "createdTime": 1712476885873, + "deliveredTime": 1712476885873, + "text": "あ", + "contentMetadata": { + "NOTIFICATION_DISABLED": "null", + "app_extension_type": "null", + "PREVIEW_URL_ENABLED": "true", + "app_version_code": "140420286" + } + }, + "fromType": 5, + "squareMessageRevision": 1 + }, + "reqSeq": -1 + } + }, + "syncToken": "CgABAAAAAAAAABwKAAIAAAAAAAAACwoAAwAAAAAAAAAFCgAEAAAAAAAAAAUKAAUAAAAAAAAAAgoABgAAAAAAAAAACgAHAAABjreTboIMAAgIAAEAAAAAAAwACQ0AAQsKAAAAAAAKAAoAAAAAAAAAAAA=" + }, + 2: { + "createdTime": 1700778236872, + "type": 2, + "payload": { + "notifiedJoinSquareChat": { + "squareChatMid": "m3df38438ef13539f38b951d58ba30929", + "joinedMember": { + "squareMemberMid": "p5a5132d6ccf8433e2264f9669a3372d1", + "squareMid": "s38d1f33723b7a7c04b30408bed4a7211", + "displayName": "見物", + "profileImageObsHash": "0hfp6ASj3sOV8LOCpn1pJGCDRuZHF6XCJaYx1oeCpoY28kCysOZQwhMCs6ZTslC3kMYFZxPiZoZW0gCysJ", + "ableToReceiveMessage": true, + "membershipState": 7, + "role": 2, + "revision": 4, + "preference": { + "favoriteTimestamp": 18446744073709552000, + "notiForNewJoinRequest": true + } + } + } + }, + "syncToken": "CgABAAAAAAAAAAEKAAIAAAAAAAAAAAoAAwAAAAAAAAAACgAEAAAAAAAAAAAKAAUAAAAAAAAAAAoABgAAAAAAAAAADAAICAABAAAAAAAMAAkNAAELCgAAAAAACgAKAAAAAAAAAAAA" + }, + 4: { + "createdTime": 1712469113807, + "type": 4, + "payload": { + "notifiedLeaveSquareChat": { + "squareChatMid": "m877c95891929586ad3e90984db54e746", + "squareMemberMid": "p215d008221ac8a21eab6362260949157", + "sayGoodbye": true, + "squareMember": { + "squareMemberMid": "p215d008221ac8a21eab6362260949157", + "squareMid": "sf1630c98f02cd380409ee17582d3d03d", + "displayName": "長野マン", + "ableToReceiveMessage": true, + "membershipState": 4, + "role": 10, + "revision": 2, + "preference": { + "favoriteTimestamp": 18446744073709552000, + "notiForNewJoinRequest": true + } + } + } + }, + "syncToken": "CgABAAAAAAABHR0KAAIAAAAAAAAqyAoAAwAAAAAAAAAACgAEAAAAAAAAAAAKAAUAAAAAAAAAAAoABgAAAAAAABGBDAAICAABAAAAAAAMAAkNAAELCgAAAAAACgAKAAAAAAAAAAAA" + }, + 5: { + "createdTime": 0, + "type": 5, + "payload": { + "notifiedDestroyMessage": { + "squareChatMid": "m3df38438ef13539f38b951d58ba30929", + "messageId": "502717230191215097" + } + }, + "syncToken": "CgABAAAAAAAAABEKAAIAAAAAAAAAAQoAAwAAAAAAAAAFCgAEAAAAAAAAAAQKAAUAAAAAAAAAAAoABgAAAAAAAAAACgAHAAABjrdyUkUMAAgIAAEAAAAAAAwACQ0AAQsKAAAAAAAKAAoAAAAAAAAAAAA=" + }, + 19:{ + "createdTime": 1712477801027, + "type": 19, + "payload": { + "notifiedKickoutFromSquare": { + "squareChatMid": "m3df38438ef13539f38b951d58ba30929", + "kickees": [ + { + "squareMemberMid": "pc26e137584b426f862957ecc28df6eac", + "squareMid": "s38d1f33723b7a7c04b30408bed4a7211", + "displayName": "あ", + "ableToReceiveMessage": true, + "membershipState": 6, + "role": 10, + "revision": 2 + } + ], + "by": { + "squareMemberMid": "p84edcedb2ef04bb3add55b2c0f0101e5", + "squareMid": "s38d1f33723b7a7c04b30408bed4a7211", + "displayName": "test", + "profileImageObsHash": "0hkT4bVyeTNHsJGydD1DtLLDZNaVV4fy9-YT5lXCUePh52fyZ-NiksHClIOUl0fiYpMS54Ty1Ma0slKycp", + "ableToReceiveMessage": true, + "membershipState": 2, + "role": 1, + "revision": 3 + } + } + }, + "syncToken": "CgABAAAAAAAAACoKAAIAAAAAAAAADAoAAwAAAAAAAAAfCgAEAAAAAAAAAAcKAAUAAAAAAAAAAgoABgAAAAAAAAAACgAHAAABjrehkwAMAAgIAAEAAAAAAAwACQ0AAQsKAAAAAAAKAAoAAAAAAAAAAAA=" + }, + 30: { + "createdTime": 1712474206555, + "type": 30, + "payload": { + "notifiedUpdateSquareChatProfileName": { + "squareChatMid": "m3df38438ef13539f38b951d58ba30929", + "editor": { + "squareMemberMid": "p84edcedb2ef04bb3add55b2c0f0101e5", + "squareMid": "s38d1f33723b7a7c04b30408bed4a7211", + "displayName": "ででででで", + "profileImageObsHash": "0hkT4bVyeTNHsJGydD1DtLLDZNaVV4fy9-YT5lXCUePh52fyZ-NiksHClIOUl0fiYpMS54Ty1Ma0slKycp", + "ableToReceiveMessage": true, + "membershipState": 2, + "role": 1, + "revision": 2, + "preference": { + "favoriteTimestamp": 18446744073709552000, + "notiForNewJoinRequest": true + } + }, + "updatedChatName": "あい" + } + }, + "syncToken": "CgABAAAAAAAAAAsKAAIAAAAAAAAAAAoAAwAAAAAAAAAACgAEAAAAAAAAAAAKAAUAAAAAAAAAAAoABgAAAAAAAAAADAAICAABAAAAAAAMAAkNAAELCgAAAAAACgAKAAAAAAAAAAAA" + }, + 31: { + "createdTime": 1712474465001, + "type": 31, + "payload": { + "notifiedUpdateSquareChatProfileImage": { + "squareChatMid": "m3df38438ef13539f38b951d58ba30929", + "editor": { + "squareMemberMid": "p84edcedb2ef04bb3add55b2c0f0101e5", + "squareMid": "s38d1f33723b7a7c04b30408bed4a7211", + "displayName": "ででででで", + "profileImageObsHash": "0hkT4bVyeTNHsJGydD1DtLLDZNaVV4fy9-YT5lXCUePh52fyZ-NiksHClIOUl0fiYpMS54Ty1Ma0slKycp", + "ableToReceiveMessage": true, + "membershipState": 2, + "role": 1, + "revision": 2, + "preference": { + "favoriteTimestamp": 18446744073709552000, + "notiForNewJoinRequest": true + } + } + } + }, + "syncToken": "CgABAAAAAAAAAAwKAAIAAAAAAAAAAAoAAwAAAAAAAAAFCgAEAAAAAAAAAAQKAAUAAAAAAAAAAAoABgAAAAAAAAAACgAHAAABjrduWW0MAAgIAAEAAAAAAAwACQ0AAQsKAAAAAAAKAAoAAAAAAAAAAAA=" + }, + 41: {//torikeshi + "createdTime": 1712476065446, + "type": 41, + "payload": { + "41": { + "1": "m3df38438ef13539f38b951d58ba30929", + "2": { + "1": { + "1": "p84edcedb2ef04bb3add55b2c0f0101e5", + "2": "m3df38438ef13539f38b951d58ba30929", + "3": 4, + "4": "502720483964223505", + "5": 1712476062685, + "6": 1712476062685, + "18": { + "NOTIFICATION_DISABLED": "null", + "app_extension_type": "null", + "PREVIEW_URL_ENABLED": "true", + "app_version_code": "140420286", + "UNSENT": "true" + } + } + }, + "9": [] + } + } + }, + 49: {//other + "createdTime": 1712476483151, + "type": 49, + "payload": { + "47": { + "1": "m3df38438ef13539f38b951d58ba30929", + "2": "設定が変更されたため、オープンチャットのプロフィールと検索結果に最新メッセージが表示されなくなります。なお、設定が反映されるまで時間がかかる場合があります。" + } + }, + "syncToken": "CgABAAAAAAAAABsKAAIAAAAAAAAACwoAAwAAAAAAAAAFCgAEAAAAAAAAAAUKAAUAAAAAAAAAAgoABgAAAAAAAAAACgAHAAABjreKrWQMAAgIAAEAAAAAAAwACQ0AAQsKAAAAAAAKAAoAAAAAAAAAAAA=" + } +} +eventTemplate[1].payload.sendMessage.squareMessage.message diff --git a/site/tmp/voom.html b/site/js/voom.html similarity index 100% rename from site/tmp/voom.html rename to site/js/voom.html diff --git a/site/js/voomUI.js b/site/js/voomUI.js new file mode 100644 index 0000000..5101f06 --- /dev/null +++ b/site/js/voomUI.js @@ -0,0 +1,565 @@ +const voom=(elm,data)=>{ + elm.appendChild(article( + { + "class": "generalPostLayout_feed_post__9CnYc", + "data-mid":data.mid, + "data-rmid":data.rmid, + "data-id":data.id, + }, + div( + { + "class": "postHeaderLayout_post_header__jc8wg" + }, + div( + { + "class": "writerInfoLayout_writer_info_wrap__IV9NI", + "$click":(...arg) => { buttonEvent("voom-profile", arg) } + }, + a( + { + "class": "profileLayout_thumbnail_wrap__tAvs2", + }, + span( + { + "class": "userProfileThumbnail_thumbnail__PANhF", + "style": "width: 100%; height: 100%;" + }, + img( + { + "src": data.icon, + "class": "userProfileThumbnail_image__A5Afu", + "width": "64", + "height": "64" + }, + ) + ) + ), span( + { + "class": "linkText_text_area__eG4IS" + }, + a( + { + "class": "linkText_link__pMHBf", + }, + strong( + { + "class": "linkText_text__QJFNU" + }, + data.name + ) + ) + ) + ), div( + { + "class": "postButtonLayout_post_button_wrap__hbU8V" + }, + div( + { + "class": "postMenuLayout_post_menu_wrap__LXysY" + }, + button( + { + "type": "button", + "class": "postMenuLayout_button_menu__A5gwf" + }, + i( + { + "class": "postMenuLayout_icon_menu__SawF4" + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "15.0" + }, + g( + { + "transform": "translate(-2 -2)" + }, + path( + { + "d": "M12 10.5c-.829 0-1.5.671-1.5 1.5s.671 1.5 1.5 1.5 1.5-.671 1.5-1.5-.671-1.5-1.5-1.5Zm0-2.9722c.829 0 1.5-.671 1.5-1.5 0-.828-.671-1.5-1.5-1.5s-1.5.672-1.5 1.5c0 .829.671 1.5 1.5 1.5Zm0 8.9444c-.829 0-1.5.671-1.5 1.5 0 .311.094.599.256.838.054.08.116.155.183.223.272.271.647.439 1.061.439.414 0 .789-.168 1.061-.439.067-.068.129-.143.183-.223.162-.239.256-.527.256-.838 0-.829-.671-1.5-1.5-1.5Z" + }, + + ) + ) + ), span( + { + "class": "blind" + }, + "Menu" + ) + ) + ) + ) + ) + ), div( + { + "class": "postContentLayout_post_content__bYnAD", + "style": "--full-viewer-text-bottom: 24px; --full-viewer-inner-height: 54px;" + }, + div( + { + "class": "viewer_trigger" + }, + div( + {}, + div( + { + "class": "voomEditor-layout" + }, + div( + {}, + div( + { + "class": "media_layout type_single" + }, + div( + { + "class": "media_inner", + "style": "padding-top: 100%;" + }, + div( + { + "role": "button", + "tabindex": "0", + "class": "media_box_layout" + }, + div( + { + "class": "media_item type_viewer" + }, + img( + { + "src": data.img, + "class": "media_image", + "alt": "", + "style": "object-position: 50% 50%;" + }, + + ) + ) + ) + ) + ) + ), div( + { + "class": "post_text post_text_margin" + }, + div( + { + "class": "text_layout" + }, + div( + { + "class": "text_area" + }, + div( + { + "class": "text_inner" + }, + div( + { + "class": "text_viewer page_feed" + }, + pre( + {}, + data.text + ) + ) + ) + ) + ) + ) + ) + ) + ) + ), section( + { + "class": "reactionLayout_reaction_group__B1CXz" + }, + div( + { + "class": "likeButtonLayout_like_button_wrap__qJwig" + }, + button( + { + "type": "button", + "class": "likeButton_button_like__WwN6d", + "id": "", + "$click":(...arg) => { buttonEvent("voom-like", arg) } + }, + i( + { + "class": "likeButton_icon___PUSz" + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "15.0" + }, + g( + { + "transform": "translate(-2 -2)" + }, + path( + { + "d": "M8.6233 13.1151a.65.65 0 0 1 .8882.237c.4976.8597 1.4261 1.4359 2.4887 1.4359 1.0626 0 1.9911-.5762 2.4887-1.4359a.65.65 0 0 1 1.1252.6512c-.7206 1.2449-2.0689 2.0847-3.6139 2.0847s-2.8932-.8398-3.6138-2.0847a.65.65 0 0 1 .237-.8882ZM14.7773 9.2964c-.5522 0-1 .4477-1 1s.4478 1 1 1c.5523 0 1-.4477 1-1s-.4477-1-1-1Zm-5.5546 0c-.5523 0-1 .4477-1 1s.4477 1 1 1c.5522 0 1-.4477 1-1s-.4478-1-1-1Z" + }, + + ), path( + { + "d": "M12 4.05c-4.3907 0-7.95 3.5593-7.95 7.95 0 4.3907 3.5593 7.95 7.95 7.95 4.3907 0 7.95-3.5593 7.95-7.95 0-4.3907-3.5593-7.95-7.95-7.95ZM2.75 12c0-5.1086 4.1414-9.25 9.25-9.25s9.25 4.1414 9.25 9.25-4.1414 9.25-9.25 9.25S2.75 17.1086 2.75 12Z" + }, + + ) + ) + ) + ), span( + { + "class": "blind" + }, + "Like" + ) + ) + ), button( + { + "type": "button", + "class": "commentButton_button_comment__gjMIk", + "id": "", + "$click":(...arg) => { buttonEvent("voom-comment", arg) } + }, + i( + { + "class": "commentButton_icon__2elZ8" + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "15.0" + }, + g( + { + "transform": "translate(-2 -2)" + }, + path( + { + "d": "M5.412 5.412C7.1288 3.695 9.4172 2.75 11.839 2.75s4.7102.945 6.4272 2.662c2.8754 2.8753 3.4863 7.2297 1.5648 10.7585l1.2894 4.136a.65.65 0 0 1-.8108.815l-4.1492-1.2705a9.1125 9.1125 0 0 1-4.332 1.0983c-2.4226 0-4.7002-.9455-6.4166-2.6619C3.6946 16.5701 2.75 14.2816 2.75 11.8497c0-2.4332.9454-4.71 2.6604-6.4363l.0015-.0015Zm.92.9184C4.8575 7.8148 4.05 9.7626 4.05 11.8497c0 2.0886.8087 4.046 2.2812 5.5185 1.4733 1.4734 3.4206 2.2811 5.4973 2.2811 1.3838 0 2.7393-.3703 3.9296-1.063a.6504.6504 0 0 1 .5173-.0598l3.2376.9915-1.0066-3.2289a.6499.6499 0 0 1 .0597-.5221c1.7939-3.0613 1.3074-6.9094-1.219-9.4358-1.4728-1.4728-3.4304-2.2812-5.508-2.2812-2.0773 0-4.0345.8081-5.5072 2.2804Z" + }, + + ), path( + { + "d": "M15.5501 11.05c-.5235 0-.95.4265-.95.95 0 .5234.4265.95.95.95.5234 0 .95-.4266.95-.95 0-.5235-.4266-.95-.95-.95Zm-3.5503 0c-.5235 0-.95.4265-.95.95 0 .5234.4265.95.95.95.5234 0 .95-.4266.95-.95 0-.5235-.4169-.95-.95-.95Zm-3.5996 0c-.5235 0-.95.4265-.95.95 0 .5234.4265.95.95.95s.95-.4266.95-.95c0-.5235-.4265-.95-.95-.95Z" + }, + + ) + ) + ) + ), span( + { + "class": "commentButton_count__rX03b" + }, + data.comment + ), span( + { + "class": "blind" + }, + "Comment" + ) + ), div( + { + "class": "shareButton_share_button_wrap__3ksAj" + }, + button( + { + "type": "button", + "class": "shareButton_button_share__a21_m", + "id": "" + }, + i( + { + "class": "shareButton_icon__6Sa8Y" + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "15.0" + }, + g( + { + "transform": "translate(-2 -2)" + }, + path( + { + "d": "M4.4263 19.0055v-7.967h1.3V18.85h12.5461v-7.8115h1.3v7.967c0 .6321-.5124 1.1445-1.1445 1.1445H5.5708c-.6321 0-1.1445-.5124-1.1445-1.1445Zm7.5731-15.4009 4.1008 3.885-.894.9438-3.2068-3.038-3.2069 3.038-.894-.9438 4.1009-3.885Z" + }, + + ), path( + { + "d": "m11.3457 14.4995.0071-10 1.3.001-.0071 10-1.3-.001Z" + }, + + ) + ) + ) + ), span( + { + "class": "shareButton_count___ItWD" + },"" + ), span( + { + "class": "blind" + }, + "Share" + ) + ) + ) + ), div( + { + "class": "commentList_comment_list__6XUED" + }, + + ), div( + { + "class": "postFooter_post_footer__V0Dfl" + }, + i( + { + "class": "iconPrivacy_icon_privacy__X1zsb" + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "15.0" + }, + g( + { + "transform": "translate(-2 -2)" + }, + path( + { + "d": "M21.25 12c0-5.1-4.15-9.25-9.25-9.25S2.75 6.9 2.75 12 6.9 21.25 12 21.25h.06c5.07-.04 9.19-4.17 9.19-9.25ZM10.33 4.23c-.03.22-.12.46-.39.53-.43.12-.65.05-.88-.14.41-.16.83-.3 1.27-.39ZM4.05 12c0-.84.14-1.66.38-2.42.31.53.64 1.04.98 1.5.89 1.2 2.09 1.86 3.16 2.43.03.02.07.03.1.04.37.13.74.35 1 .6.04.06.09.1.14.14.12.14.2.27.21.39.02.18.01.36 0 .55-.01.35-.03.75.1 1.16.13.42.39.72.6.96.13.15.25.28.31.42.16.33.24.73.25 1.2 0 .38 0 .68.02.95-4.06-.36-7.25-3.77-7.25-7.91V12Zm10.08 7.65c0-.05.01-.1.02-.11.1-.29.33-.88.34-.92.11-.34.33-.99.49-1.26.08-.14.21-.29.34-.44.2-.22.42-.47.58-.8.2-.42.44-1.47.22-1.96-.36-1.34-1.87-1.61-2.7-1.55 0 0-1.25.07-1.77.09-.33.01-.64.17-.93.31-.05.02-.11.05-.16.08-.13-.25-.33-.57-.82-.95-.21-.16-.41-.25-.58-.32-.2-.09-.26-.12-.3-.18 0-.09.02-.24.03-.29.03-.07.32-.16.45-.19l.1-.03c.17-.05.22-.04.26-.01.74.8 1.68.1 2.04-.17.19-.14.31-.34.34-.57.06-.42-.2-.75-.43-1.05a.6257.6257 0 0 1-.09-.12c.17-.11.42-.22.57-.29.41-.18.76-.33.89-.71.14-.39-.04-.71-.21-.91.42-.43 1.18-1.22.81-2.47-.1-.26-.25-.49-.41-.7 2.39.37 4.43 1.8 5.62 3.8-.08 0-.16.02-.21.03h-.03c-.85.21-1.57.89-1.97 1.65-.4.76-.56 1.78.02 2.63.5.74 1.32 1.04 1.92 1.22.1.03.55.15.94.25l.23.06c-.65 2.84-2.83 5.09-5.61 5.87l.01.01Z" + }, + + ) + ) + ), span( + { + "class": "blind" + }, + "Public" + ) + ), span( + { + "class": "postFooter_time__dTT6T", + "id": "dateTime" + }, + data.time + ) + ), div( + { + "class": "commentWriter_comment_writer__KKGfj" + }, + div( + { + "class": "commentWriter_thumbnail_wrap__Sg3o0" + }, + span( + { + "class": "userProfileThumbnail_thumbnail__PANhF", + "style": "width: 100%; height: 100%;" + }, + img( + { + "src": "", + "class": "userProfileThumbnail_image__A5Afu", + "width": "64", + "height": "64" + }, + ) + ) + ), div( + { + "class": "commentWriter_writer_wrap__yJMVg" + }, + div( + { + "class": "commentWriter_writer_area__71gGR" + }, + div( + { + "class": "voomEditor-layout" + }, + div( + { + "class": "comment_writer_layout" + }, + div( + { + "class": "comment_content", + "data-name": "comment_content" + }, + div( + { + "class": "voomEditor-layout" + }, + div( + { + "class": "post_writer_text_card" + }, + div( + { + "class": "text_layout animation_0" + }, + div( + { + "class": "text_area" + }, + div( + { + "class": "text_inner" + }, + label( + { + "class": "text_editor" + }, + textarea( + { + "class": "input_text", + "placeholder": "コメントしてみよう", + "maxlength": "1000", + "data-feedid": "1168769285681398053" + }, + + ), span( + { + "class": "label_text", + "aria-hidden": "true" + }, + "コメントしてみよう" + ) + ), div( + { + "class": "text_viewer page_editor" + }, + + ) + ) + ) + ) + ) + ) + ), div( + { + "class": "comment_tool_group" + }, + label( + { + "class": "tool_button", + "title": "写真を追加" + }, + input( + { + "type": "file", + "class": "blind", + "accept": "image/*" + }, + + ), i( + { + "class": "icon_photo" + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "15.0" + }, + g( + { + "transform": "translate(-2 -2)" + }, + path( + { + "d": "M15.5519 8.5134c-.5769 0-1.0446.4678-1.0446 1.0447 0 .577.4677 1.0447 1.0446 1.0447s1.0446-.4677 1.0446-1.0447c0-.5769-.4677-1.0447-1.0446-1.0447ZM8.6929 10.2734l8.5795 8.5796a.6498.6498 0 0 1 0 .9192.6498.6498 0 0 1-.9192 0l-7.6603-7.6604-4.4334 4.4335a.65.65 0 1 1-.9192-.9192l5.3526-5.3527Z" + }, + + ), path( + { + "d": "M4.4499 5.3375v13.3251h15.1V5.3375h-15.1Zm-1.3-.15c0-.6353.515-1.15 1.15-1.15h15.4c.635 0 1.15.5147 1.15 1.15v13.6251c0 .6353-.515 1.15-1.15 1.15h-15.4c-.635 0-1.15-.5149-1.15-1.15V5.1875Z" + }, + + ) + ) + ) + ), span( + { + "class": "blind" + }, + "photo" + ) + ), button( + { + "type": "button", + "class": "tool_button", + "title": "スタンプを追加" + }, + i( + { + "class": "icon_sticker" + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "15.0" + }, + g( + { + "transform": "translate(-2 -2)" + }, + path( + { + "d": "M8.6233 13.1151a.65.65 0 0 1 .8882.237c.4976.8597 1.4261 1.4359 2.4887 1.4359 1.0626 0 1.9911-.5762 2.4887-1.4359a.65.65 0 0 1 1.1252.6512c-.7206 1.2449-2.0689 2.0847-3.6139 2.0847s-2.8932-.8398-3.6138-2.0847a.65.65 0 0 1 .237-.8882ZM14.7773 9.2964c-.5522 0-1 .4477-1 1s.4478 1 1 1c.5523 0 1-.4477 1-1s-.4477-1-1-1Zm-5.5546 0c-.5523 0-1 .4477-1 1s.4477 1 1 1c.5522 0 1-.4477 1-1s-.4478-1-1-1Z" + }, + + ), path( + { + "d": "M12 4.05c-4.3907 0-7.95 3.5593-7.95 7.95 0 4.3907 3.5593 7.95 7.95 7.95 4.3907 0 7.95-3.5593 7.95-7.95 0-4.3907-3.5593-7.95-7.95-7.95ZM2.75 12c0-5.1086 4.1414-9.25 9.25-9.25s9.25 4.1414 9.25 9.25-4.1414 9.25-9.25 9.25S2.75 17.1086 2.75 12Z" + }, + + ) + ) + ) + ), span( + { + "class": "blind" + }, + "sticker" + ) + ) + ) + ) + ) + ) + ) + ) +))} \ No newline at end of file diff --git a/site/js/x3.js b/site/js/x3.js new file mode 100644 index 0000000..d00ebc5 --- /dev/null +++ b/site/js/x3.js @@ -0,0 +1,628 @@ +const INIT_HTML = () => { + $("body").in( + div( + { "style": "display: none;", "id": "hide" }, + "hidden DIV" + ), + noscript( + {}, + "You need to enable JavaScript to run this app." + ), + div( + { + "id": "root", + "$click": () => { + document.querySelector("#modal-root").innerHTML = "" + } + }, + div( + { + "class": "app" + }, + div( + { + "class": "pageLayout-module__wrap__h-oSt" + }, + div( + { + "class": "gnb-module__gnb__01tnB " + }, + ul( + { + "class": "gnb-module__nav_list__wRO2S" + }, + li( + { + "class": "gnb-module__nav_list_item__tbnc4" + }, + button( + { + "type": "button", + "class": "gnb-module__button_action__aTdj7", + "aria-label": "Friend", + "aria-current": "false", + "data-tooltip": "友だち", + "$click": (...arg) => { buttonEvent("openProfile", arg) } + }, + i( + { + "class": "icon gnb-module__icon__RvjKM" + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "5.0" + }, + g( + { + "transform": "translate(-2 -2)" + }, + path( + { + "d": "M19.394 16.513s-3.866-2.369-4.816-2.969c-.086-.055-.316-.2-.296-.694.014-.348.151-.712.271-.902.185-.291.395-.702.639-1.183.124-.244.258-.507.404-.782.339-.184.729-.559.866-1.493.078-.531-.07-.945-.223-1.214C16.175 4.555 14.45 2.669 12 2.669c-2.439 0-4.16 1.869-4.236 4.602-.154.269-.304.685-.226 1.22.138.941.535 1.314.866 1.49.145.276.28.54.404.784.244.481.454.892.639 1.183.12.19.257.554.271.902.02.494-.21.639-.297.694-.949.6-4.815 2.969-4.83 2.979a2.7233 2.7233 0 0 0-1.241 2.29v2.518h17.3v-2.518c0-.928-.464-1.784-1.256-2.3" + }, + + ) + ) + ) + ) + ) + ), li( + { + "class": "gnb-module__nav_list_item__tbnc4" + }, + button( + { + "type": "button", + "class": "gnb-module__button_action__aTdj7", + "aria-label": "Chat", + "aria-current": "true", + "data-tooltip": "トーク", + "$click": (...arg) => { buttonEvent("openTalk", arg) } + }, + i( + { + "class": "icon gnb-module__icon__RvjKM" + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "5.0" + }, + g( + { + "transform": "translate(-2 -2)" + }, + path( + { + "d": "M12.1 3.078c5.194 0 8.549 2.979 8.549 7.591 0 4.185-3.405 7.59-7.591 7.59l-2.289.01c-1.346 0-2.132.993-2.555 1.826l-.418.827-.635-.676c-1.423-1.516-3.81-4.616-3.81-8.343 0-5.361 3.434-8.825 8.749-8.825Zm-3.724 7.155a.9.9 0 1 0 .0001 1.8001.9.9 0 0 0-.0001-1.8001Zm3.538 0a.9.9 0 1 0 .0001 1.8001.9.9 0 0 0-.0001-1.8001Zm3.538 0a.9.9 0 1 0 .0001 1.8001.9.9 0 0 0-.0001-1.8001Z" + }, + + ) + ) + ) + ) + ), div( + { + "class": "gnb-module__badge__nU45a badge-module__badge__Eh36I " + }, + "25" + ) + ), li( + { + "class": "gnb-module__nav_list_item__tbnc4" + }, + button( + { + "type": "button", + "class": "gnb-module__button_action__aTdj7", + "aria-label": "Voom", + "aria-current": "false", + "data-tooltip": "LINE VOOM", + "$click": (...arg) => { buttonEvent("openVoom", arg) } + }, + i( + { + "class": "icon gnb-module__icon__RvjKM" + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "7.3" + }, + g( + { + "transform": "translate(-2 -2)" + }, + path( + { + "d": "m19.088 15.33-9.068 5.149a3.907 3.907 0 0 1-5.86-3.329v-1.62a3.1 3.1 0 0 1 1.579-2.69l4.351-2.47a.728.728 0 0 0 .367-.63.736.736 0 0 0-.149-.44.756.756 0 0 0-.963-.18L5.7 11.19a1.023 1.023 0 0 1-1.54-.87V6.851a3.908 3.908 0 0 1 5.86-3.33l9.068 5.149a3.816 3.816 0 0 1 0 6.66z" + }, + + ) + ) + ) + ) + ) + ), li( + { + "class": "gnb-module__nav_list_item__tbnc4" + }, + button( + { + "type": "button", + "class": "gnb-module__button_action__aTdj7", + "aria-label": "Voom", + "aria-current": "false", + "data-tooltip": "LINE Openchat", + "$click": (...arg) => { buttonEvent("openSquare", arg) } + }, + i( + { + "class": "icon gnb-module__icon__RvjKM" + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "7.3" + }, + g( + { + "transform": "translate(-2 -2)" + }, + path( + { + "d": "M19.7 19.982V9.018c0-2.606-2.163-4.718-4.832-4.718H9.132C6.463 4.3 4.3 6.412 4.3 9.018v5.6c0 2.605 2.163 4.717 4.832 4.717h5.908", + "stroke": "#707991", + "stroke-width": "3", + "style": "color: #202a43;" + }, + + ) + ) + ) + ) + ) + ), li( + { + "class": "gnb-module__nav_list_item__tbnc4" + }, + button( + { + "type": "button", + "class": "gnb-module__button_action__aTdj7", + "aria-label": "Voom", + "aria-current": "false", + "data-tooltip": "Console", + "$click": (...arg) => { buttonEvent("openConsole", arg) } + }, + i( + { + "class": "icon gg-terminal" + }, + + ) + ) + ) + ), ul( + { + "class": "gnb-module__nav_bottom_list__t-ASJ" + }, + li( + { + "class": "gnb-module__nav_list_item__tbnc4" + }, + button( + { + "type": "button", + "class": "gnb-module__button_action__aTdj7", + "aria-label": "Popover more actions", + "data-tooltip": "設定", + "$click": (...arg) => { buttonEvent("openSettings", arg) } + }, + i( + { + "class": "icon gnb-module__icon__RvjKM" + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "5.0" + }, + g( + { + "transform": "translate(-2 -2)" + }, + path( + { + "d": "M12 10.5c.829 0 1.5.671 1.5 1.5s-.671 1.5-1.5 1.5-1.5-.671-1.5-1.5.671-1.5 1.5-1.5Zm5.9722 0c.828 0 1.5.671 1.5 1.5s-.672 1.5-1.5 1.5c-.829 0-1.5-.671-1.5-1.5s.671-1.5 1.5-1.5Zm-11.9444-.0003c.208 0 .405.042.584.118.18.076.341.186.477.322.272.271.439.646.439 1.06 0 .414-.167.789-.439 1.061-.136.136-.297.245-.477.322-.179.075-.376.117-.584.117-.828 0-1.5-.671-1.5-1.5 0-.828.672-1.5 1.5-1.5Z" + }, + + ) + ) + ) + ) + ) + ) + ) + ) + , div( + { + "class": "chatlist-module__tab__xaUJd folderTab-module__tab__YXsQR" + }, + div( + { + "class": "folderTab-module__tab_list__hjBJ2", + "role": "tablist" + }, + button( + { + "class": "folderTab-module__tab_item__7dbuI", + "role": "tab", + "data-state": "", + "data-folder-id": "ALL", + "aria-selected": "false" + }, + span( + { + "class": "folderTab-module__text__0saah" + }, + "すべて") + ) + , button( + { + "class": "folderTab-module__tab_item__7dbuI", + "role": "tab", + "data-state": "", + "data-folder-id": "FRIENDS", + "aria-selected": "false" + }, + span( + { + "class": "folderTab-module__text__0saah" + }, + "友だち") + ) + , button( + { + "class": "folderTab-module__tab_item__7dbuI", + "role": "tab", + "data-state": "", + "data-folder-id": "GROUP", + "aria-selected": "true" + }, + span( + { + "class": "folderTab-module__text__0saah" + }, + "グループ") + ) + ) + ) + , div( + { + "class": "chatlist-module__chatlist_wrap__KtTpq" + }, + div( + { + "class": "chatlist-module__search_box__enOMX searchInput-module__input_box__vp6NF" + }, + label( + { + "class": "searchInput-module__label__40CWI" + }, + i( + { + "class": "icon searchInput-module__icon_search__amOMA" + }, + svg( + { + "xmlns": "http://www.w3.org/2000/svg", + "width": "24", + "height": "24", + "viewBox": "0 0 24 24" + }, + g( + { + "fill": "none", + "fill-rule": "evenodd" + }, + g( + {}, + g( + {}, + g( + {}, + g( + {}, + g( + {}, + path( + { + "d": "M0 0H20V20H0z", + "transform": "translate(-261.000000, -95.000000) translate(181.000000, 54.000000) translate(74.000000, 34.000000) translate(6.000000, 7.000000) translate(2.000000, 2.000000)" + }, + ) + , g( + { + "stroke": "#B7B7B7", + "stroke-width": "1.5", + "transform": "translate(-261.000000, -95.000000) translate(181.000000, 54.000000) translate(74.000000, 34.000000) translate(6.000000, 7.000000) translate(2.000000, 2.000000) translate(4.000000, 4.000000)" + }, + circle( + { + "cx": "4.5", + "cy": "4.5", + "r": "4.5", + "fill-rule": "nonzero" + }, + ) + , path( + { + "stroke-linecap": "square", + "d": "M8 8L11 11" + }, + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + , input( + { + "class": "searchInput-module__input__ekGp7 ", + "placeholder": "トークルーム検索", + "maxlength": "20", + "value": "" + }, + ) + , button( + { + "type": "button", + "class": "searchInput-module__button_reset__l2-td", + "aria-label": "reset" + }, + i( + { + "class": "icon searchInput-module__icon_reset__bPtuX" + }, + svg( + { + "xmlns": "http://www.w3.org/2000/svg", + "width": "24", + "height": "24", + "viewBox": "0 0 24 24" + }, + g( + { + "fill": "none", + "fill-rule": "evenodd" + }, + g( + {}, + g( + {}, + g( + {}, + g( + {}, + path( + { + "d": "M0 0H24V24H0z", + "transform": "translate(-1216.000000, -227.000000) translate(928.000000, 162.000000) translate(14.000000, 58.000000) translate(274.000000, 7.000000)" + }, + ) + , path( + { + "fill": "#C8C8C8", + "d": "M12 5c3.866 0 7 3.134 7 7s-3.134 7-7 7-7-3.134-7-7 3.134-7 7-7zm2.413 3.5L12 10.912 9.587 8.5 8.5 9.587 10.912 12 8.5 14.413 9.587 15.5 12 13.087l2.413 2.413 1.087-1.087L13.087 12 15.5 9.587 14.413 8.5z", + "transform": "translate(-1216.000000, -227.000000) translate(928.000000, 162.000000) translate(14.000000, 58.000000) translate(274.000000, 7.000000)" + }, + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + , div( + { + "class": "chatlist-module__chatlist__qruAE" + }, + div( + { + "class": "chatlist-module__chatlist_inner__YtvQB", + "style": "position: relative; overflow: hidden;" + }, + div( + { + "style": "position: absolute; width: 100%; height: 100%; overflow: scroll;" + }, + div( + { + "style": "position: relative; height: auto; width: 100%; overflow: overlay; will-change: transform; direction: ltr;" + }, + + ) + ) + ) + ) + , div( + { + "class": "chatlist-module__create_chat_button__lADKP createChatButton-module__popover_wrap__CxRuU ", + "aria-hidden": "false", + "data-tooltip": "トークルームを作成" + }, + button( + { + "type": "button", + "class": "createChatButton-module__button_create__-BK-p", + "aria-haspopup": "true", + "aria-expanded": "false", + "aria-labelledby": "create action list popover" + }, + i( + { + "class": "icon createChatButton-module__icon_create__pLEwQ" + }, + img({ src: "https://static.line-scdn.net/Openchat-Real/edge/img/apng/icon-nav-create.png", alt: "" }) + ) + ) + , div( + { + "class": "createChatButton-module__popover_content__DG6zk" + }, + ul( + { + "class": "createChatButton-module__action_list__zZqLv" + }, + li( + { + "class": "createChatButton-module__action_list_item__I1EVN" + }, + button( + { + "class": "createChatButton-module__link__1CoG2" + }, + i( + { + "class": "icon" + }, + svg( + { + "xmlns": "http://www.w3.org/2000/svg", + "width": "18", + "height": "18", + "viewBox": "0 0 18 18" + }, + path( + { + "fill": "#303030", + "stroke": "#303030", + "stroke-width": "0.4", + "d": "M9.246 2.218c4.155 0 6.84 2.384 6.84 6.073-.004 3.352-2.72 6.069-6.073 6.072h0l-1.831.008c-.908.049-1.704.619-2.044 1.461h0l-.335.662-.508-.54C4.157 14.74 2.247 12.26 2.247 9.277c0-4.289 2.747-7.06 7-7.06zm0 1.04c-3.731 0-5.96 2.25-5.96 6.02 0 2.299 1.38 4.336 2.31 5.447.577-.864 1.544-1.387 2.583-1.394h0l1.832-.008c2.778-.002 5.031-2.253 5.035-5.032 0-3.104-2.223-5.033-5.8-5.033zm-.148 4.685c.397 0 .72.322.72.72 0 .397-.323.72-.72.72-.398 0-.72-.323-.72-.72 0-.398.322-.72.72-.72zm-2.83 0c.397 0 .72.322.72.72 0 .397-.323.72-.72.72-.399 0-.72-.323-.72-.72 0-.398.321-.72.72-.72zm5.66 0c.398 0 .72.322.72.72 0 .397-.322.72-.72.72-.397 0-.72-.323-.72-.72 0-.398.323-.72.72-.72z" + }, + ) + ) + ) + , span( + { + "class": "createChatButton-module__text__ji4iL" + }, + "トーク") + ) + ) + , li( + { + "class": "createChatButton-module__action_list_item__I1EVN" + }, + button( + { + "class": "createChatButton-module__link__1CoG2" + }, + i( + { + "class": "icon" + }, + svg( + { + "xmlns": "http://www.w3.org/2000/svg", + "width": "18", + "height": "18", + "viewBox": "0 0 18 18" + }, + path( + { + "fill": "#303030", + "stroke": "#303030", + "stroke-width": "0.4", + "d": "M10.665 2.082c.864.004 1.69.353 2.296.969.605.616.94 1.449.927 2.313.149.267.204.577.158.88-.04.474-.267.913-.63 1.222-.307.566-.528.927-.72 1.231-.112.176-.154.538.017.658.312.218 1.994 1.376 2.964 2.043.575.396.919 1.049.918 1.747h0v2.175h-2.25v-1.04h1.21v-1.135c0-.355-.175-.688-.468-.89-.972-.669-2.657-1.83-2.97-2.048-.616-.51-.745-1.403-.3-2.066.224-.355.437-.709.743-1.279h0l.07-.13.128-.074c.032-.018.195-.133.26-.565.014-.092-.008-.187-.063-.263h0l-.106-.139v-.174c.082-1.134-.7-2.149-1.817-2.358-.21-.384-.48-.733-.797-1.035.142-.023.286-.037.43-.042zm-4.955.44c1.006-.587 2.251-.586 3.257.003 1.005.59 1.614 1.675 1.592 2.84.148.268.203.577.157.879-.04.474-.266.912-.628 1.22-.315.58-.533.937-.722 1.234-.111.175-.153.537.018.657.293.206 1.8 1.242 2.785 1.92h0l.179.123c.575.396.918 1.05.918 1.747h0v2.175H1.405v-2.36c0-.582.286-1.127.765-1.456h0l.203-.14c.977-.673 2.607-1.794 2.914-2.009.17-.12.129-.482.018-.657-.193-.305-.414-.666-.721-1.232-.363-.308-.589-.747-.63-1.221-.046-.304.01-.616.16-.884-.02-1.166.59-2.25 1.596-2.838zm2.787.933c-.703-.439-1.594-.444-2.302-.013S5.083 4.667 5.15 5.493h0v.174l-.105.163c-.055.076-.077.172-.061.265.063.43.226.545.258.563h0l.128.074.07.13c.306.57.519.924.744 1.28.444.663.314 1.555-.3 2.065-.308.215-1.942 1.34-2.92 2.014h0l-.205.14c-.197.136-.314.36-.314.599h0v1.32h9.78v-1.135c0-.355-.174-.688-.466-.89h0l-.18-.123c-.988-.68-2.498-1.72-2.791-1.925-.623-.506-.753-1.404-.301-2.065.19-.3.412-.663.744-1.28h0l.07-.129.126-.074c.16-.145.254-.35.26-.565.016-.093-.007-.188-.062-.264h0L9.52 5.69v-.174c.076-.826-.32-1.623-1.023-2.062z" + }, + ) + ) + ) + , span( + { + "class": "createChatButton-module__text__ji4iL" + }, + "グループ") + ) + ) + ) + ) + ) + ), + div({}) + , div( + { + "class": "notificationStateToast-module__notification_toast__b7WP7 ", + "data-visible": "false" + }, + i( + { + "class": "icon notificationStateToast-module__icon__hvseN" + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "7.0" + }, + g( + { + "transform": "translate(-2 -2)" + }, + path( + { + "d": "M13.38 3.18 8.376 7.845H2.66a.65.65 0 0 0-.66.639v7.032l.006.094a.654.654 0 0 0 .654.545l5.716-.001 5.004 4.666c.419.391 1.119.103 1.119-.46V3.64c0-.563-.699-.851-1.119-.46zm-.203 1.965v13.711l-4.076-3.8-.078-.063a.68.68 0 0 0-.38-.117H3.319V9.124h5.324c.17 0 .333-.064.458-.179l4.076-3.8zm4.569 3.943a4.185 4.185 0 0 0-.725-.57l-.702 1.09.175.118A2.793 2.793 0 0 1 16.818 14c-.153.15-.32.281-.498.392l.701 1.09.192-.127c.19-.133.368-.28.533-.443a4.068 4.068 0 0 0 0-5.824zM18.638 6c.45.28.87.61 1.248.983h.002a7.008 7.008 0 0 1 0 10.034c-.306.3-.635.57-.984.809L18.64 18l-.704-1.09c.37-.23.712-.5 1.023-.805a5.735 5.735 0 0 0 0-8.21 5.874 5.874 0 0 0-.753-.626l-.27-.179.701-1.09z" + }, + ) + ) + ) + ) + , span( + { + "class": "notificationStateToast-module__text__PGuSE" + }, + ) + ) + ) + , ul( + { + "class": "ToastContainer-module__toast-list__QAniw", + "style": "z-index: 100;" + }, + ) + ) + ) + , div( + { + "id": "modal-root" + }, + )) +} \ No newline at end of file diff --git a/site/js/xUI.js b/site/js/xUI.js new file mode 100644 index 0000000..7a93cda --- /dev/null +++ b/site/js/xUI.js @@ -0,0 +1,3020 @@ +// deno-lint-ignore-file no-window + +if (localStorage.getItem("auth")) { + document.getElementById("auth").value = localStorage.getItem("auth"); +} +if (localStorage.getItem("device")) { + document.getElementById("device").value = localStorage.getItem("device"); +} +function runnnn() { + window.Line = new LineSquareClient( + document.getElementById("auth").value, + document.getElementById("device").value, + () => { + setTimeout(async () => { + let rooms = await UserCashe.getItem(Line.mid + ":chatsList"); + if (!rooms) { + rooms = await Line.getJoinedSquareChats(); + await buildChatButton(rooms); + } else { + await buildChatButtonC(rooms); + } + }, 200); + }, + ); + localStorage.setItem("auth", document.getElementById("auth").value); + localStorage.setItem("device", document.getElementById("device").value); + runLINE(); +} +window.version = "β 0.0.1"; +window.versionCode = 1; +var chatData = { //チャットリストのデータを入れる + chatList: [], +}; +const blobUrl = {}; +function createObjectURL(prot, blob) { + if (blobUrl[prot]) { + return blobUrl[prot]; + } + blobUrl[prot] = URL.createObjectURL(blob); + return blobUrl[prot]; +} +async function updateChat() { + if (roomData.roomMid) { + let isLate = false; + let data = await Line.timeout( + () => + Line.fetchSquareChatEvents( + roomData.roomMid, + roomData.syncToken, + ), + 2100, + ); + if (!data) { + setTimeout(() => { + isTooLate = true; + updateChat(); + }, 2000); + return; + } + if (isLate) { + return; + } + if (data.syncToken && !Number(data.syncToken)) { + roomData.syncToken = data.syncToken; + } else if (!data.syncToken) { + console.log(data.events) + roomData.syncToken = data.events[data.events.length - 1].syncToken; + } + + let events = []; + let reading = []; + for (let i = 0; i < data.events.length; i++) { + const e = data.events[i]; + if ( + e.type == 1 || e.type == undefined || e.type == 2 || + e.type == 4 || e.type == 5 || e.type == 30 || e.type == 31 || + e.type == 41 || e.type == 49 || e.type == 6 + ) { + events.push(e); + } else if (e.type == 7) { + await refreshProfile( + e.payload.notifiedUpdateSquareMemberProfile.squareMember + .squareMemberMid, + ); + } + } + if (roomData.syncToken) { + let readingTxt = "浮上中: "; + reading.forEach((e) => { + readingTxt += e.name + " "; + }); + genNewMessage({ + text: readingTxt, + by: "", + call: () => { + notify(readingTxt, "#fff", "#333"); + }, + }); + } + await append2Talk( + events, + roomData.roomMid, + roomData.setting.viewMkRead, + ); + setTimeout(() => { + isLate = true; + updateChat(); + }, 2000); + } else { + } +} + +async function initTalk(mid) { + let res = await Line.timeout(() => Line.fetchSquareChatEvents(mid), 2100); + roomData.syncToken = res.syncToken; + await append2Talk(res.events, mid, false); +} + +async function append2Talk(events, mid, withEvent) { + let htmls = []; + for (let index = 0; index < events.length; index++) { + const e = events[index]; + if (e.type == undefined && e.payload) { + roomData.messageView.dataList.push( + e.payload.receiveMessage.squareMessage.message, + ); + htmls.push( + (await Message2Elm( + e.payload.receiveMessage.squareMessage.message, + ))[0], + ); + } else if (e.type == 1) { + roomData.messageView.dataList.push( + e.payload.sendMessage.squareMessage.message, + ); + htmls.push( + (await Message2Elm( + e.payload.sendMessage.squareMessage.message, + ))[0], + ); + } else if (e.type == 2) { + let date = new Date(e.createdTime); + date = date.getMonth() + 1 + "/" + date.getDate() + " " + + date.toLocaleTimeString().substring(0, 5); + htmls.push(genSysMsg({ + event: { + timeStr: date, + arg: e.payload, + text: (await getProfile( + e.payload.notifiedJoinSquareChat.joinedMember + .squareMemberMid, + )).name + " がトークに参加しました", + }, + })); + } else if (e.type == 4) { + let date = new Date(e.createdTime); + date = date.getMonth() + 1 + "/" + date.getDate() + " " + + date.toLocaleTimeString().substring(0, 5); + htmls.push(genSysMsg({ + event: { + timeStr: date, + arg: e.payload, + text: (await getProfile( + e.payload.notifiedLeaveSquareChat.squareMember + .squareMemberMid, + )).name + " がトークを退出しました", + }, + })); + } else if (e.type == 5) { + htmls.push(genSysMsg({ + event: { + timeStr: "", + onclick: async () => { + let res = await getMsgById( + e.payload.notifiedDestroyMessage.messageId, + true, + ); + if (res) { + res.scrollIntoView(); + res.focus(); + } + }, + text: "メッセージが削除されました", + }, + })); + } else if (e.type == 6 && withEvent) { + htmls.push(genSysMsg({ + event: { + timeStr: "", + arg: e.payload, + text: (await getProfile( + e.payload.notifiedMarkAsRead.sMemberMid, + )).name + "が既読しました", + }, + })); + } else if (e.type == 19) { + let date = new Date(e.createdTime); + date = date.getMonth() + 1 + "/" + date.getDate() + " " + + date.toLocaleTimeString().substring(0, 5); + htmls.push(genSysMsg({ + event: { + timeStr: date, + arg: e.payload, + text: (await getProfile( + e.payload.notifiedKickoutFromSquare.by + .squareMemberMid, + )).name + " が " + + e.payload.notifiedKickoutFromSquare.kickees[0] + .displayName + + " をこのトークから強制退会させました", + }, + })); + } else if (e.type == 30) { + let date = new Date(e.createdTime); + date = date.getMonth() + 1 + "/" + date.getDate() + " " + + date.toLocaleTimeString().substring(0, 5); + htmls.push(genSysMsg({ + event: { + timeStr: date, + arg: e.payload, + text: (await getProfile( + e.payload.notifiedUpdateSquareChatProfileName.editor + .squareMemberMid, + )).name + "がこのトークの名前を " + + e.payload.notifiedUpdateSquareChatProfileName + .updatedChatName + + " に変更しました", + }, + })); + } else if (e.type == 31) { + let date = new Date(e.createdTime); + date = date.getMonth() + 1 + "/" + date.getDate() + " " + + date.toLocaleTimeString().substring(0, 5); + htmls.push(genSysMsg({ + event: { + timeStr: date, + arg: e.payload, + text: (await getProfile( + e.payload.notifiedUpdateSquareChatProfileImage + .editor.squareMemberMid, + )).name + "がこのトークの背景画像を変更しました", + }, + })); + } else if (e.type == 41) { + let date = new Date(e.createdTime); + date = date.getMonth() + 1 + "/" + date.getDate() + " " + + date.toLocaleTimeString().substring(0, 5); + htmls.push(genSysMsg({ + event: { + timeStr: date, + onclick: async () => { + let res = await getMsgById( + e.payload[41][2][1][4], + true, + ); + if (res) { + res.scrollIntoView(); + res.focus(); + } + }, + text: "メッセージが送信取り消しされました", + }, + })); + } else if (e.type == 49) { + let date = new Date(e.createdTime); + date = date.getMonth() + 1 + "/" + date.getDate() + " " + + date.toLocaleTimeString().substring(0, 5); + htmls.push(genSysMsg({ + event: { + timeStr: date, + arg: e.payload, + text: e.payload[47][2], + }, + })); + } + if (mid != roomData.roomMid) { + return; + } + } + for (let index = 0; index < htmls.length; index++) { + const dom = htmls[index]; + roomData.messageView.elmList.prepend(dom); + if (roomData.followLatest) { + dom.scrollIntoView(); + } + observer.observe(dom); + } + return; +} + +function genNewMessage(data) { + roomData.notifyMsg.innerHTML = ""; + roomData.notifyMsg.appendChild(div( + { + "class": "newMessage-module__new_message__7AimN ", + }, + button( + { + "type": "button", + "class": "newMessage-module__button_new_message__4lxeN", + "$click": (...arg) => { + data.call(arg); + }, + }, + strong( + { + "class": "newMessage-module__name__i7cy-", + }, + pre( + {}, + data.by, + ), + ), + p( + { + "class": "newMessage-module__description__Bp-zX", + }, + span( + {}, + data.text, + ), + ), + ), + )); +} + +var defaltIMG = + "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAEYCAYAAACHjumMAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABGKADAAQAAAABAAABGAAAAADGOxDpAAAUVklEQVR4Ae2daVNbORaGhQ0Ewp6tl6qZ//+vej7MdHcSSAIJJCy2R68J1Vmwde4i6+r4URWV4OUszxGvZV1daeOP/9zOAg0CEIBABgKjDDYxCQEIQGBOAIGhI0AAAtkIIDDZ0GIYAhBAYOgDEIBANgIITDa0GIYABBAY+gAEIJCNAAKTDS2GIQABBIY+AAEIZCOAwGRDi2EIQACBoQ9AAALZCCAw2dBiGAIQQGDoAxCAQDYCCEw2tBiGAAQQGPoABCCQjQACkw0thiEAAQSGPgABCGQjgMBkQ4thCEAAgaEPQAAC2QggMNnQYhgCEEBg6AMQgEA2AghMNrQYhgAEEBj6AAQgkI0AApMNLYYhAAEEhj4AAQhkI4DAZEOLYQhAAIGhD0AAAtkIIDDZ0GIYAhBAYOgDEIBANgIITDa0GIYABBAY+gAEIJCNAAKTDS2GIQABBIY+AAEIZCOAwGRDi2EIQACBoQ9AAALZCCAw2dBiGAIQQGDoAxCAQDYCCEw2tBiGAAQQGPoABCCQjQACkw0thiEAAQSGPgABCGQjgMBkQ4thCEAAgaEPQAAC2QggMNnQYhgCEEBg6AMQgEA2AghMNrQYhgAEEBj6AAQgkI0AApMNLYYhAAEEhj4AAQhkI4DAZEOLYQhAAIGhD0AAAtkIIDDZ0GIYAhBAYOgDEIBANgIITDa0GIYABBAY+gAEIJCNAAKTDS2GIQABBIY+AAEIZCOAwGRDi2EIQACBoQ9AAALZCCAw2dBiGAIQQGDoAxCAQDYCCEw2tBiGAAQQGPoABCCQjQACkw0thiEAAQSGPgABCGQjgMBkQ4thCEAAgaEPQAAC2QggMNnQYhgCEEBg6AMQgEA2AghMNrQYhgAEEBj6AAQgkI0AApMNLYYhAAEEhj4AAQhkI4DAZEOLYQhAAIGhD0AAAtkIIDDZ0GIYAhBAYOgDEIBANgIITDa0GIYABBAY+gAEIJCNwGY2yxiunsA4fvxsbsWfzY0w2ghh4+vH0WwawnQWwt3dLNzdhjCJv9Mg8BgBBOYxKmv62GbsDbu7G2F3ZyM8iT9jqYqhTaLaXH+Zhc/6+RxF587wJl6yFgQQmLUo8+IkN6KG7O1thP39Udh5YhOUH61JiJ4+1c/9M1+uZ+HTp2m4vJyFWRzp0NaXAAKzprWXsBzsb4Sjo1EYj9sJyyJ0EqqdJ+NwcjwL5+fT8PETQrOIlffHERjvFX4kv5349efF89F8buWRp3t7SML17Nk4HB7OwunZNHyJX6Fo60UAgVmveofnUVgO4tehVTZNEv/6yziOZKbhLAoNbX0IIDBrUmt9JXr1ahQncFcrLt/ilbBpIvnNmylzM9+Ccfz/cr3NMdShpTYeh/Dbr+Oi4vLARAKnWBQTzT8BBMZ5jbfiOhb9QW9v9zuR2wWbYlFMio3mmwBfkRzXVwvlNPfR9irRLF5j1pqWu8ksTOK/k8k9LI0+xrHnbMZJXH3l2dD3r4ZN8zK/xNj++nPCQr2G7Gp6OQJTU7UaxvriZfNL0BIVXe25uoo/cdHcg6gsci2xeRoX52kdjK5ONREbCZRifP2aid9FfGt/HIGpvYIL4j+O61uaTuheXk7D+/fTOGJZYPSRhyVAWuein80oNicno7hwz/7NWzEeH4XwIa6XofkjgMD4q+l8JHF0ZP/acnMzC2fvJuH6uhsMCdPb02m4+DgNz+P6F+u8j2L9ch1/WCfTrQADfLf9o2aAwRPSzwQ0HfLyxcj8VeXq8zT89Xd3cfk2EgmVbMq2pelr1X3MllfzmpoIIDA1VcsQ68FBvEnRuPRf9wvlWpOie5BkWz4sTTErdpovAgiMo3rqz/Pw0FZS/eFr+X7uJh9WkVHsSEzuiqzWvq03rjYmvLUksB9HALoyk2q3t5pzyS8uD3HIl3ymmmJXDjQ/BBAYP7UMR4bRiy5Dvz2drHSpvr4u3ftMi4wlB0clc58KAuOkxNrTRYvXUu38fBZublKv6v95+ZTvVFMOyoXmgwAC46OOYS8udEu1adx5TpeQSzX5VgypZsklZYPnh0EAgRlGHTpFoUvTO3E1bap9iovhpuX0Ze5bMaSacmlx90HKLM8XIIDAFIDet0st0R8l/iI193J+UVBdviatGBTLsqZclBOtfgIITP01DE8Me+lexzmQ1H1Fq0ChGCxzQJacVhEvProRQGC68RvEuy2bdQ9pGb5OH0g1S04pGzxfngACU74GnSPY2k6bGJLAWGKx5JTOmleUJoDAlK5AR/86uih1fpHmPK7jUSJDaYolNQ+jnIzHMg0lLeJ4hAAC8wiUmh7SyYupprucE/OqKRO9Pq9YLFtCWHLrNTCM9U4Agekd6WoNpkYvimYaBWZozRKTJbeh5UU83xNAYL7nUd1vD+dFLwtcR7sOrVlisuQ2tLyI53sCCMz3PKr7zXK1xTJaWHXilpgsua06bvw1I4DANOM1qFdrbd1+PP411Uqu3l0UmyUm5ZZYP7jIPI8PhAACM5BCtAlDm22PHF9qUW7KkVYvAQSm3tqZVvDq5kId2Tq0ppgsNz6yondolWsWDwLTjNegXm05uOziYhY3expU2PNgFNPFx/TksyXH4WVHRA8EEJgHEhX+a9l717rxdon0r67SIytLjiVix6eNAAJj4zTIVw3w6nPvnNYhx96hDcggAjOgYjQNZWb467OeTdTUdx+vt8RmybGPWLCRhwACk4frSqxa5laGvJbEEpslx5XAxkkrAghMK2zDeNONYad+nRk9GmCVFZNiSzVLjikbPF+OwAC7XjkYtXm2bHugtSTWs5JWmb9isqzhseS4yrjx1YwAAtOM16BefXcXwu1d+lLv0eFGPNIkPVpYVXLWeJSbcqTVSwCBqbd288g/GU4J0NnPJyfj+fnPpdPVGdSKRTGlmiW3lA2eL0sAgSnLv7P3j/OTAtKjGDnSnMe2Yfe7zkEtMCDflnkXvf1+BbItrwXueHgABBCYARShSwi6adByFIh8zEcyx+VKfhJ9W0YuirX0ESuKgdadQLne1j12LHwl8OF8GucqbJ/2u7ujYLk83Ddc+ZRvS1MuyolWPwFbxevP03UGGsW8eavzpm0ic3Ky+rJbfSoH5WLZzsF1UZ0kt/qe5gTc0NLQWUOnp+lDzRS37lC2zoX0kad8We6KlrgoB8u5SX3EhY38BBCY/IxX5uHyahbexj9QS9N8yKqa1ZdiVw40PwRW18v8MBt0JlfxD9RyRMnWlhbgpS8Vd01WPuQr1RSzYqf5IoDA+KrnPJv3722jmOOjURiP8wGQbfmwNGvMFlu8ZjgEbNUfTrxEYiDwRaOBz2mR0VJ969cXg9ufXiLbltsBFKtipvkjgMD4q+k8I40ILFeV9vY0Ads/BNmU7VRTjIxeUpTqfR6Bqbd2SyPXNgeWBXha+PbsWf/fk2TTsqhOMbIlw9JSVv0kAlN1+ZYH//7DNFgOOHuyvWE6/mS5t3+e1XEjsplqik0x0vwSQGD81na+WO2D8Q/YOhlrwWW1pdhYUGchWu9rEJh6a2eK/GPcuf/mJj2BurnZzyhGoxfZSjXFpNhovgkgML7rO8/u7N3ElOWeYYe5lCGrDWtMKX88P2wCCMyw69NLdNfXccL3Mj3XsbPT7ahWbfEiG6mmWBQTzT8BBMZ/jecZar4jddlaV30s9wwtQqb3pq4cKQbrvNAiPzxeDwEEpp5adYpUW09a9rfd3GzvxvJexcA2mO0Z1/ZOBKa2inWI98ZwhOzmOP0VZ1EIlvdaYlhkn8frI4DA1Fez1hFbDpufhfZXdizvtcTQOkHeODgCCMzgSpIvIMtdzR30JVjea4ohHwIsr5gAArNi4KXcaX7k6W76689th2NCLO9VDJa5mlKc8NsvAQSmX56DtKY/6t9+HZvubLYsyluUpOW9urtasVjEbpEfHq+HQIdrBvUkua6R6njWZ89GYX/P9jmizba7XOHRe2UjtZJ3HCeSX70az9fmvHvH7QKe+6et53km4DS33Thq+f33sVlchOGj4RC3FK4mNiR8ilGx0nwSQGCc1VWjlhfPR+GXOEKwXDZ+SL+vg86aHAQn34pRsSrm+O2J5owAAuOooPNRy29x1LLfvKx9fVXR3dHvjFt2foteMTOa+ZaIj/8374k+8naVhe4Bev4wajHcyfxj8pfx3qBPl+3Xv/xoT5tIyWbTprkbjWaUi3Ki1U+ASd7Ka6ibC/X1IjWxuijNj5+m4eysuRgssvfwuI4giftJhYMWoym9ZzfmdRrjstze8OCTf4dHYOOP/9z299E1vPzcRqRP+GfxhMaDg3aD0PleuPEGyIuLvOXXsSXa/Dt1E+SiQmnSWF+54j2StAoJIDAVFq3rqEVnEJ2eTVa2F+7Wliaex63v1Nalb0YzFXbUGDICU1HdNGrRGc+HHUYt2irhPPOoZRHSoziaOe4wmrmIo5n70xIWeeDxoRFAYIZWkQXx7MS9Vp6/GIWtFpO4MrnqUcuCNOIpj91GM7dxNHMW53c4R2kR4WE9jsAMqx4/RTMftcRP/YOD9GZOP705PjDf4Ok8jlrOhzWJcXQURzPx1Mc2czPKSfv56kQC5mYeq/pwHkNghlOLnyLR4WWau2h7B7LuDXp7urq5lp8SSDyg0czLF+OwbTji5DFTt/H6hOaS2H7zMTrDeAyBGUYdvouij1GLRiwf4silhqaRjEY0jGZqqFazGBGYZryyv7qPUYs+1W9usofaq4Pt7fvRGqOZXrEWN4bAFC/BfQBauHo8v0LU/pNcV4dq31BbV5l0tantaOYizs180LqZgdR13cNAYAbQA57o0zvORXSZa6lx1LIIfS+jmTj3dF3ZKG4Rj5ofR2AKV0+rXLXatfUndhy1eD3fGTaFO2cP7hGYHiC2MTEeh/mmS5ZD4h+zf6MrKPFTura5lsdyWfbYfDSjK01b7e5+vI5X0t68mYSJ7XDLZaHwXAsCCEwLaF3fosuz8/1aWiya0xqQdZtn6Do/pVsNXkeRuTUc29K1trz/ewIIzPc8sv+m+4hevYybK7XYXWnd1310ucKmDbXevOXu7Owd/AcH7W7F/cEIv9oIaDf9NuIyH7VcTMOff633ojItqBODi8hCTJo0CbrYc6JBE2rdX4vAdGdotqBVuU1HLhq1/P16wpYFXylLV7R9g5iITZMm9qoBbXUEEJgVsdbaDn09sjZGLctJtR3NqAaqBW01BBCYFXDWsFwLyKxNn8yvX7PRUorXw2hGrJqMZlQLviql6PbzvL3X9+NvLa0cHtrvGtYWlppnYDsCe1cRKzETO0vTmiPVhJafAJQzM9aNi/t7tiH5+/eT+f64DecvM2dQh3kx097CYmhpqolqQ8tLAIHJy3e+ebVlYld7z5baaS4zgpWaF0PL4W+qiTYWp+UlgMDk5Ws6tVALwdqcJZQ59GrNi6WYphonSqYIdX8egenOcKkFy/YDOkeIr0VLMTZ6UizFNNUstUnZ4PnlBBCY5Xw6P6vbAlLt8so2OZmyw/P/ELAwtdTmH4v8rw0BBKYNtQbvSc2/aL0L98g0AGp8qZimVvumamN0xcuWEEBglsDp+pQOok81neVMy0PAwtZSozzRrYdVw5/AeoAolSVzL/nIwzYfW6tlBMZKitdBAAKNCSAwjZHxBghAwEoAgbGS4nUQgEBjAghMY2S8AQIQsBJAYKykeB0EINCYAALTGBlvgAAErAQQGCspXgcBCDQmgMA0RsYbIAABK4G41xqtNAFWk5auAP5zEUBgcpE12t2MZyP9+1+UwYiLl1VGgK9IlRWMcCFQEwEEpqZqESsEKiOAwFRWMMKFQE0EEJiaqkWsEKiMAAJTWcEIFwI1EUBgaqoWsUKgMgIITGUFI1wI1ESABRiZq2U5PiNzCJiHQDECCExG9NoT9r//s500mDEMTEOgGAG+IhVDj2MI+CeAwPivMRlCoBgBBKYYehxDwD8BBMZ/jckQAsUIIDDF0OMYAv4JIDD+a0yGEChGAIEphh7HEPBPAIHxX2MyhEAxAghMMfQ4hoB/AgiM/xqTIQSKEUBgiqHHMQT8E0Bg/NeYDCFQjAACUww9jiHgnwAC47/GZAiBYgQQmGLocQwB/wQQGP81JkMIFCOAwBRDj2MI+CeAwPivMRlCoBgBBKYYehxDwD8BBMZ/jckQAsUIIDDF0OMYAv4JIDD+a0yGEChGAIEphh7HEPBPAIHxX2MyhEAxAghMMfQ4hoB/AgiM/xqTIQSKEUBgiqHHMQT8E0Bg/NeYDCFQjAACUww9jiHgnwAC47/GZAiBYgQQmGLocQwB/wQQGP81JkMIFCOAwBRDj2MI+CeAwPivMRlCoBgBBKYYehxDwD8BBMZ/jckQAsUIIDDF0OMYAv4JIDD+a0yGEChGAIEphh7HEPBPAIHxX2MyhEAxAghMMfQ4hoB/AgiM/xqTIQSKEUBgiqHHMQT8E0Bg/NeYDCFQjAACUww9jiHgnwAC47/GZAiBYgQQmGLocQwB/wQQGP81JkMIFCOAwBRDj2MI+CeAwPivMRlCoBgBBKYYehxDwD8BBMZ/jckQAsUIIDDF0OMYAv4JIDD+a0yGEChGAIEphh7HEPBPAIHxX2MyhEAxAghMMfQ4hoB/AgiM/xqTIQSKEUBgiqHHMQT8E0Bg/NeYDCFQjAACUww9jiHgnwAC47/GZAiBYgQQmGLocQwB/wQQGP81JkMIFCOAwBRDj2MI+CeAwPivMRlCoBgBBKYYehxDwD8BBMZ/jckQAsUIIDDF0OMYAv4JIDD+a0yGEChGAIEphh7HEPBPAIHxX2MyhEAxAghMMfQ4hoB/AgiM/xqTIQSKEUBgiqHHMQT8E0Bg/NeYDCFQjAACUww9jiHgnwAC47/GZAiBYgQQmGLocQwB/wQQGP81JkMIFCOAwBRDj2MI+CeAwPivMRlCoBgBBKYYehxDwD8BBMZ/jckQAsUI/B/m95a6zS3tegAAAABJRU5ErkJggg=="; +async function chatMembersList(mid) { + notify("Loading...", "#FFF", "#333"); + let member = (await Line.getSquareChatMembers(mid)).squareChatMembers; + let members = []; + for (let i = 0; i < member.length; i++) { + const e = member[i]; + let data = { + mid: e.squareMemberMid, + name: e.displayName, + }; + if (e.profileImageObsHash) { + data.img = await getObsUrl(e.profileImageObsHash + "/preview"); + } + if (!data.img) { + data.img = defaltIMG; + } + members.push(data); + } + let data = { + mid: mid, + members: members, + }; + $("#root > div > div > div:nth-child(4)").in(genMemberList(data)); +} + +function genMemberList(data) { + function memberButton(data, index) { + return div( + { + "class": "friendlistItem-module__item__1tuZn ", + "data-mid": data.mid, + "style": "position: absolute; left: 0px; top: " + + (index * 57 + 20) + "px; height: 57px; width: 100%;", + "$click": (...arg) => { + buttonEvent("openProfileM", arg); + }, + }, + div( + { + "class": "profileImage-module__thumbnail_wrap__0bK7m ", + "data-mid": data.mid, + "data-profile-image": "true", + "style": "width: 43px; height: 43px; border-radius: 50%;", + }, + button( + { + "type": "button", + "class": "profileImage-module__button_profile__GqKue", + }, + div( + { + "class": + "profileImage-module__thumbnail_area__nqIpB", + }, + span( + { + "class": + "profileImage-module__thumbnail__Q6OsR", + }, + img( + { + "src": data.img, + "class": "", + "loading": "lazy", + "alt": "", + "draggable": "false", + }, + ), + ), + ), + ), + ), + div( + { + "class": "friendlistItem-module__info__89Stz", + }, + strong( + { + "class": "friendlistItem-module__name_box__fUKhX", + "role": "", + }, + span( + { + "class": "friendlistItem-module__text__YxSko", + }, + pre( + {}, + span( + {}, + data.name, + ), + ), + ), + ), + ), + ); + } + let members = []; + data.members.forEach((e, i) => { + members.push(memberButton(e, i)); + }); + return div( + { + "class": "memberPopup-module__popup__KtCXP ", + "style": "min-width:300;", + }, + div( + { + "class": "memberPopup-module__contents__7scEN", + }, + div( + { + "class": "friendlist-module__list_wrap__IeJXY", + "data-type": "invite", + }, + div( + { + "class": "searchInput-module__input_box__vp6NF", + }, + label( + { + "class": "searchInput-module__label__40CWI", + }, + i( + { + "class": + "icon searchInput-module__icon_search__amOMA", + }, + svg( + { + "xmlns": "http://www.w3.org/2000/svg", + "width": "24", + "height": "24", + "viewBox": "0 0 24 24", + }, + g( + { + "fill": "none", + "fill-rule": "evenodd", + }, + g( + {}, + g( + {}, + g( + {}, + g( + {}, + g( + {}, + path( + { + "d": "M0 0H20V20H0z", + "transform": + "translate(-261.000000, -95.000000) translate(181.000000, 54.000000) translate(74.000000, 34.000000) translate(6.000000, 7.000000) translate(2.000000, 2.000000)", + }, + ), + g( + { + "stroke": + "#B7B7B7", + "stroke-width": + "1.5", + "transform": + "translate(-261.000000, -95.000000) translate(181.000000, 54.000000) translate(74.000000, 34.000000) translate(6.000000, 7.000000) translate(2.000000, 2.000000) translate(4.000000, 4.000000)", + }, + circle( + { + "cx": "4.5", + "cy": "4.5", + "r": "4.5", + "fill-rule": + "nonzero", + }, + ), + path( + { + "stroke-linecap": + "square", + "d": "M8 8L11 11", + }, + ), + ), + ), + ), + ), + ), + ), + ), + ), + ), + input( + { + "class": "searchInput-module__input__ekGp7 ", + "placeholder": "名前で検索", + "maxlength": "20", + "data-chatmid": data.mid, + "value": "", + "$input": (...arg) => { + buttonEvent("searchMember", arg); + }, + }, + ), + button( + { + "type": "button", + "class": + "searchInput-module__button_reset__l2-td", + "aria-label": "reset", + "$click": (...arg) => { }, + }, + i( + { + "class": + "icon searchInput-module__icon_reset__bPtuX", + }, + svg( + { + "xmlns": "http://www.w3.org/2000/svg", + "width": "24", + "height": "24", + "viewBox": "0 0 24 24", + }, + g( + { + "fill": "none", + "fill-rule": "evenodd", + }, + g( + {}, + g( + {}, + g( + {}, + g( + {}, + path( + { + "d": "M0 0H24V24H0z", + "transform": + "translate(-1216.000000, -227.000000) translate(928.000000, 162.000000) translate(14.000000, 58.000000) translate(274.000000, 7.000000)", + }, + ), + path( + { + "fill": + "#C8C8C8", + "d": "M12 5c3.866 0 7 3.134 7 7s-3.134 7-7 7-7-3.134-7-7 3.134-7 7-7zm2.413 3.5L12 10.912 9.587 8.5 8.5 9.587 10.912 12 8.5 14.413 9.587 15.5 12 13.087l2.413 2.413 1.087-1.087L13.087 12 15.5 9.587 14.413 8.5z", + "transform": + "translate(-1216.000000, -227.000000) translate(928.000000, 162.000000) translate(14.000000, 58.000000) translate(274.000000, 7.000000)", + }, + ), + ), + ), + ), + ), + ), + ), + ), + ), + ), + ), + div( + { + "class": "friendlist-module__list__Z-8nt", + }, + div( + { + "class": "friendlist-module__inner__d3xFH", + "style": "position: relative; overflow: hidden;", + }, + div( + { + "style": + "position: absolute; width: 100%; height: 100%;", + }, + div( + { + "style": + "position: relative; height: 558px; width: 100%; overflow: overlay; will-change: transform; direction: ltr;", + }, + div( + { + "style": "height: " + + (data.members.length * 57 + 60) + + "px; width: 100%;", + }, + div( + { + "class": + "categoryLayout-module__category_wrap__31191 ", + "style": + "position: absolute; left: 0px; top: 0px; height: 20px; width: 100%;", + }, + button( + { + "class": + "categoryLayout-module__button_category__nqIZM", + "aria-expanded": "true", + }, + span( + { + "class": + "categoryLayout-module__title__iV725", + }, + span( + { + "class": + "categoryLayout-module__text__crUcb", + }, + "メンバー", + ), + span( + { + "class": + "categoryLayout-module__count__8h25Q", + }, + data.members.length, + ), + ), + i( + { + "class": + "icon categoryLayout-module__icon_arrow__kdyor", + }, + svg( + { + "xmlns": + "http://www.w3.org/2000/svg", + "width": "20", + "height": "20", + "viewBox": "0 0 20 20", + }, + g( + { + "fill": "none", + "fill-rule": + "evenodd", + }, + path( + { + "d": "M0 0H20V20H0z", + }, + ), + path( + { + "fill-rule": + "nonzero", + "stroke": + "#C8C8C8", + "stroke-linecap": + "square", + "stroke-width": + "1.4", + "d": "M7 11L7 5 13 5", + "transform": + "rotate(-135 10 8)", + }, + ), + ), + ), + ), + ), + ), + ...members, + ), + ), + ), + ), + ), + ), + ), + ); +} +async function memberPopup(pid) { + let data = await refreshProfile(pid); + let data2 = await getProfile(pid, true); + data.desc = JSON.stringify(data2, null, 2); + let member = genProfilePopup(data); + $("#modal-root").in(member); + member.scrollIntoView(); +} +function genProfilePopup(data) { + return div( + { + "class": "profileModal-module__modal__QRrnT ", + "role": "dialog", + "aria-labelledby": "profile modal", + "style": + "position: absolute;z-index: 28;left: 0px;top: 0px;width: 100%;height: 100%;text-align: center;", + }, + div( + { + "class": "profileModal-module__content__qKTEy", + "style": + "width: 300px;height: 400px;margin-right: auto;margin-left: auto;margin-top: 100;border: solid;background-color: #fff;border-color: black;", + }, + button({ + "type": "button", + "style": + "margin-right: auto;font-size: 18px;margin-left: 10px;margin-top: 10px;", + "$click": () => { + document.querySelector("#modal-root").innerHTML = ""; + }, + }, "X"), + div( + { + "class": "profileModal-module__info_area__VRAIt", + "style": "height:100px", + }, + div( + { + "class": "profileImage-module__thumbnail_wrap__0bK7m ", + "data-mid": data.mid, + "data-profile-image": "true", + "style": + "border-radius: 50%;cursor: default;margin: 0 0 0 0;", + }, + div( + { + "class": + "profileImage-module__thumbnail_area__nqIpB", + "$click": (...arg) => { + buttonEvent("openProfileImg", arg); + }, + }, + span( + { + "class": + "profileImage-module__thumbnail__Q6OsR", + }, + img( + { + "src": data.img, + "class": "", + "loading": "lazy", + "alt": "", + "draggable": "false", + }, + ), + ), + ), + ), + div( + { + "class": "profileModal-module__name_box__vJfbr", + }, + button( + { + "class": "editButton-module__button_edit__GA02s ", + "type": "button", + "aria-pressed": "false", + "data-ellipsis": "1", + }, + span( + { + "class": "editButton-module__name__uQ-y5", + }, + pre( + {}, + span( + {}, + data.name, + ), + ), + ), + ), + ), + div( + { + "class": "profileModal-module__description_box__Jb6O2", + "style": "max-height:300;", + }, + pre( + { + "class": "profileModal-module__description__hSNDU", + "data-tooltip": + "87f15f9f-0c36-4796-bf4e-f74d9f10fef5", + "style": "text-align: left;user-select:text;", + }, + data.desc, + ), + ), + ), + div( + { + "class": "profileModal-module__action_area__gN4d-", + "data-mid": data.mid, + }, + button( + { + "type": "button", + "class": "profileModal-module__button_action__SmB4T", + "$click": (...arg) => { + buttonEvent("reportMember", arg); + }, + }, + "通報", + ), + button( + { + "type": "button", + "class": "profileModal-module__button_action__SmB4T", + "$click": (...arg) => { + buttonEvent("kickoutMember", arg); + }, + }, + "強制退会", + ), + ), + ), + ); +} + +function genTxtPopup(data) { + $("#modal-root").out.appendChild(div( + { + "class": "profileModal-module__modal__QRrnT ", + "role": "dialog", + "aria-labelledby": "profile modal", + "style": + "position: absolute;z-index: 28;left: 0px;top: 0px;width: 100%;height: 100%;text-align: center;", + }, + div( + { + "class": "profileModal-module__content__qKTEy", + "style": + "width: 300px;height: 400px;margin-right: auto;margin-left: auto;margin-top: 100;border: solid;background-color: #fff;border-color: black;", + }, + button({ + "type": "button", + "style": + "margin-right: auto;font-size: 18px;margin-left: 10px;margin-top: 10px;", + "$click": () => { + document.querySelector("#modal-root").innerHTML = ""; + }, + }, "X"), + div( + { + "class": "profileModal-module__info_area__VRAIt", + "style": "height:100px", + }, + div( + { + "class": "profileModal-module__name_box__vJfbr", + }, + span( + { + "class": "editButton-module__name__uQ-y5", + }, + pre( + {}, + span( + {}, + data.name, + ), + ), + ), + ), + div( + { + "class": "profileModal-module__description_box__Jb6O2", + "style": "max-height:300;", + }, + pre( + { + "class": "profileModal-module__description__hSNDU", + "data-tooltip": + "87f15f9f-0c36-4796-bf4e-f74d9f10fef5", + "style": "text-align: left;user-select:text;", + }, + data.desc, + ), + ), + ), + ), + )); + console.log(data); +} + +function notify(text, color, bcolor, time = 5000) { + let noti = li( + {}, + div( + { + style: "background-color:" + bcolor + + ";border-radius: 17.5px;user-select:text;", + "$click": () => { + $("#root > div > ul").out.innerHTML = ""; + }, + }, + pre( + { + style: "font-size:20px;padding:5px;color:" + color + ";", + }, + text, + ), + ), + ); + $("#root > div > ul").out.appendChild(noti); + setTimeout(() => { + $("#root > div > ul").out.removeChild(noti); + }, time); +} + +async function buildChatButton(squareChatResponseList = []) { //[getSquareChatResponse]からチャットリストのボタンを生成追加 + function list(inElm) { + return div({ + style: "height: " + 71 * squareChatResponseList.length + + "px; width: 100%;", + }, ...inElm); + } + let elms = []; + for (let index = 0; index < squareChatResponseList.length; index++) { + const element = squareChatResponseList[index]; + let elm = await squareChat2chatButton(element, index); + observer.observe(elm); + elms.push(elm); + } + let res = list(elms); + $("#root > div > div > div.chatlist-module__chatlist_wrap__KtTpq > div.chatlist-module__chatlist__qruAE > div > div > div") + .in(res); + setInterval(() => { + try { + fetchEventUpdate(); + //更新開始 + } catch (error) { + } + }, 2000); + return res; +} +async function buildChatButtonC(dataList = []) { //dataListからチャットリストのボタンを生成追加 + function list(inElm) { + return div({ + style: "height: " + 71 * dataList.length + "px; width: 100%;", + }, ...inElm); + } + let elms = []; + for (let index = 0; index < dataList.length; index++) { + const element = await Line.getSquareChat(dataList[index]); + let elm = await squareChat2chatButton(element); + if (!elm) { + continue; + } + observer.observe(elm); + elms.push(elm); + } + let res = list(elms); + $("#root > div > div > div.chatlist-module__chatlist_wrap__KtTpq > div.chatlist-module__chatlist__qruAE > div > div > div") + .in(res); + setInterval(() => { + try { + fetchEventUpdate(); //更新開始 + } catch (error) { + } + }, 2000); + return res; +} +function fetchEventUpdate() { //fetchMyEvents fetchSquareChatEvents から表示を更新 + if (Line.SQ1.socket.post.readyState !== Line.SQ1.socket.post.OPEN) { + Line.SQ1.reOpenSocket(); + notify("Network Error", "#fff", "#f00"); + return; + } + let mids = []; + chatData.chatList.forEach((e, i) => { + let is1 = true; + mids.forEach((f) => { + if (e.mid == f) { + is1 = false; + } + }); + if (is1) { + mids.push(e.mid); + } else { + chatData.chatList.splice(i, 1); + } + }); + + UserCashe.setItem(Line.mid + ":chatsList", mids); + //myEvent + (async () => { + function list(inElm) { + return div({ + style: "height: " + 71 * inElm.length + "px; width: 100%;", + }, ...inElm); + } + let elms = []; + if (!chatData.syncToken) { + chatData.syncToken = (await Line.fetchMyEvents()).syncToken; + } + let res = await Line.timeout( + () => Line.fetchMyEvents(chatData.syncToken), + 3500, + ); + chatData.syncToken = res.syncToken; + res.events.forEach(async (e) => { + let chat; + switch (e.type) { + case 29: + chat = await getChatdata( + e.payload.notificationMessage.squareChatMid, + ); + let date = + e.payload.notificationMessage.squareMessage.message + .deliveredTime; + date = new Date(date); + date = date.getMonth() + 1 + "/" + date.getDate(); + chat.timeInt = + e.payload.notificationMessage.squareMessage.message + .deliveredTime; + if ( + e.payload.notificationMessage.squareMessage.message.text + ) { + chat.lastText = + e.payload.notificationMessage.squareMessage.message + .text; + } + + if (e.payload.notificationMessage.unreadCount) { + let unread = e.payload.notificationMessage.unreadCount; + chat.unread = span({ + class: "chatlistItem-module__message_count__FRt4s", + }, unread); + } else { + chat.unread = ""; + } + break; + case 13: + chat = await getChatdata( + e.payload.notifiedUpdateSquareChatStatus.squareChatMid, + ); + chat.member = e.payload.notifiedUpdateSquareChatStatus + .statusWithoutMessage.memberCount; + if ( + e.payload.notifiedUpdateSquareChatStatus + .statusWithoutMessage.unreadCount + ) { + let unread = e.payload.notifiedUpdateSquareChatStatus + .statusWithoutMessage.unreadCount; + chat.unread = span({ + class: "chatlistItem-module__message_count__FRt4s", + }, unread); + } else { + chat.unread = ""; + } + default: + break; + } + }); + chatData.chatList.sort((a, b) => { + return b.timeInt - a.timeInt; + }); + chatData.chatList.forEach((e, i) => { + e.index = i; + elms.push(genChatButton(e)); + }); + let elm = list(elms); + $("#root > div > div > div.chatlist-module__chatlist_wrap__KtTpq > div.chatlist-module__chatlist__qruAE > div > div > div") + .in(elm); + + async function getChatdata(id) { + for (let index = 0; index < chatData.chatList.length; index++) { + const e = chatData.chatList[index]; + if (e.mid == id) { + return e; + } + } + let chat = await Line.getSquareChat(id); + await squareChat2chatButton(chat, 0); + return await getChatdata(id); + } + })(); +} + +async function squareChat2chatButton(squareChatResponse, index) { //getSquareChatと上からの順番からボタンを生成 + let lastText = ""; + let date = ""; + let unread = ""; + if (!squareChatResponse.squareChatStatus) { + return; + } + if (squareChatResponse.squareChatStatus.lastMessage) { + date = new Date( + squareChatResponse.squareChatStatus.lastMessage.message.createdTime, + ); + date = date.getMonth() + 1 + "/" + date.getDate() + " " + + date.getHours() + ":" + date.getMinutes(); + if (squareChatResponse.squareChatStatus.lastMessage.message.text) { + lastText = + squareChatResponse.squareChatStatus.lastMessage.message.text; + } + } + if (squareChatResponse.squareChatStatus.otherStatus.unreadMessageCount) { + unread = + squareChatResponse.squareChatStatus.otherStatus.unreadMessageCount; + unread = span( + { class: "chatlistItem-module__message_count__FRt4s" }, + unread, + ); + } + let data = { + mid: squareChatResponse.squareChat.squareChatMid, + name: squareChatResponse.squareChat.name, + member: squareChatResponse.squareChatStatus.otherStatus.memberCount, + img: await getObsUrl(squareChatResponse.squareChat.chatImageObsHash), + index: index, + date: date, + timeInt: squareChatResponse.squareChatStatus.lastMessage + ? squareChatResponse.squareChatStatus.lastMessage.message + .createdTime + : 0, + lastText: lastText, + unread: unread, + }; + chatData.chatList.push(data); + return genChatButton(data); +} + +function genChatButton(data) { //html生成部分 + return div( + { + "class": "chatlistItem-module__chatlist_item__MOwxh ", + "aria-selected": "false", + "aria-busy": "false", + "aria-current": "true", + "data-mid": data.mid, + "style": "position: absolute; left: 0px; top: " + data.index * 71 + + "px; height: 71px; width: 100%;", + }, + div( + { + "class": "profileImage-module__thumbnail_wrap__0bK7m ", + "data-mid": data.mid, + "data-profile-image": "true", + "style": "width: 53px; height: 53px; border-radius: 50%;", + }, + button( + { + "type": "button", + "class": "profileImage-module__button_profile__GqKue", + }, + div( + { + "class": "profileImage-module__thumbnail_area__nqIpB", + }, + span( + { + "class": "profileImage-module__thumbnail__Q6OsR", + }, + img( + { + "src": data.img, + "class": "", + "loading": "lazy", + "alt": "", + "draggable": "false", + }, + ), + ), + ), + ), + ), + div( + { + "class": "chatlistItem-module__info__nHGhi", + }, + strong( + { + "class": "chatlistItem-module__title_box__aDNJD", + }, + span( + { + "class": "chatlistItem-module__text__daDD3", + }, + pre( + {}, + span( + {}, + data.name, + ), + ), + ), + span( + { + "class": "chatlistItem-module__member_count__MbL2c", + }, + "(" + data.member + ")", + ), + ), + time( + { + "datetime": + "Tue Mar 26 2024 14:20:07 GMT+0900 (日本標準時)", + "class": "chatlistItem-module__date__tG-MV", + }, + data.date, + ), + div( + { + "class": "chatlistItem-module__description__JH3NE", + }, + p( + { + "class": "chatlistItem-module__text__daDD3", + }, + span( + { + "data-message-id": "500966165850882385", + }, + data.lastText, + ), + ), + ), + data.unread, + ), + button( + { + "role": "link", + "type": "button", + "aria-label": "Go chatroom", + "class": "chatlistItem-module__button_chatlist_item__pcmtA", + "$click": (...arg) => { + buttonEvent("goChat", arg); + }, + }, + ), + ); +} + +var roomData = { //chat + messageView: { + dataList: [], + elmList: [], + }, + mymid: null, + roomMid: null, + followLatest: false, + setting: {}, +}; + +var URLcashe = localforage.createInstance({ + name: "URLcashe", +}); +var MDataCashe = localforage.createInstance({ + name: "MDataCashe", +}); +var ThriftCashe = localforage.createInstance({ + name: "ThriftCashe", +}); +var UserCashe = localforage.createInstance({ + name: "UserCashe", +}); +async function getMDataUrl(id) { + let url = "https://obs-jp.line-apps.com/r/g2/m/" + id; + let data = await MDataCashe.getItem(url); + if (data) { + return createObjectURL(url, data); + } else { + let res; + try { + res = await Line.proxyFetch(url, { + "x-line-access": Line.authToken, + "x-line-application": Line.SQ1.config.appName, + }); + } catch (error) { + } + if (!res || !res.ok) { + console.error("Error response at " + url); + return ""; + } + data = await res.blob(); + MDataCashe.setItem(url, data); + return createObjectURL(url, data); + } +} +async function getMPDataUrl(id) { + let url = "https://obs-jp.line-apps.com/r/g2/m/" + id + "/preview"; + let data = await MDataCashe.getItem(url); + if (data) { + return createObjectURL(url, data); + } else { + let res; + try { + res = await Line.proxyFetch(url, { + "x-line-access": Line.authToken, + "x-line-application": Line.SQ1.config.appName, + }); + } catch (error) { + } + if (!res || !res.ok) { + console.error("Error response at " + url); + return ""; + } + data = await res.blob(); + MDataCashe.setItem(url, data); + return createObjectURL(url, data); + } +} +async function getMsgById(id, isElm) { + let data = { txt: "このメッセージはありません" }; + if (isElm) { + for ( + let index = 0; + index < roomData.messageView.elmList.childNodes.length; + index++ + ) { + const e = roomData.messageView.elmList.childNodes[index]; + if (e.dataset.id == id) { + return e; + } + } + return null; + } + for (let index = 0; index < roomData.messageView.dataList.length; index++) { + const e = roomData.messageView.dataList[index]; + if (e.id == id) { + if (e.text) { + data.txt = e.text; + data.profile = await getProfile(e._from); + } else { + data.txt = ""; + data.profile = await getProfile(e._from); + } + return data; + } + } + + if (!data.profile) { + data.profile = { img: defaltIMG, mid: "", name: "" }; + } + return data; +} +async function getObsUrl(obs) { + let url = "https://obs.line-scdn.net/" + obs; + let data = await URLcashe.getItem(url); + if (data) { + return createObjectURL(url, data); + } else { + let res; + try { + res = await fetch(url); + } catch (error) { + } + if (!res || !res.ok) { + console.error("Error response at " + url); + res = await fetch(defaltIMG); + } + data = await res.blob(); + URLcashe.setItem(url, data); + return createObjectURL(url, data); + } +} +async function getSquareChatHistory(mid) { + let prot = "squareChatHistory:" + mid; + let data = await ThriftCashe.getItem(prot); + if (data) { + return data; + } else { + return null; + } +} +async function setSquareChatHistory(mid, sync, history = []) { + let prot = "squareChatHistory:" + mid; + let data = await getSquareChatHistory(mid); + if (data) { + data = { + syncToken: sync, + history: [...data.history, ...history], + }; + } else { + data = { + syncToken: sync, + history: history, + }; + } + await ThriftCashe.setItem(prot, data); +} +async function refreshProfile(mid) { + let prot = "squareMember:" + mid; + await ThriftCashe.removeItem(prot); + return await getProfile(mid); +} +async function getProfile(mid, raw, Line) { + if (mid.substring(0, 1) == "v") { + return { + name: "Auto-reply", + img: await getObsUrl( + "0hC0fMBLdfHB9bNA6h2cdjSGViQTEgRwUNJkwRLXxnSyp0DAxBNFVRfncwQykhAFJPY1YDK3g2RngkUAw/preview", + ), + mid: mid, + }; + } + const prot = "squareMember:" + mid; + let data = await ThriftCashe.getItem(prot); + if (data) { + } else { + const member = (await Line.getSquareMember(mid)).squareMember; + data = member; + ThriftCashe.setItem(prot, data); + } + if (raw) { + return data; + } + let img = defaltIMG; + if (data.profileImageObsHash) { + img = await getObsUrl(data.profileImageObsHash + "/preview"); + } + return { name: data.displayName, img: img, mid: data.squareMemberMid }; +} +async function getStkDataUrl(id) { + let url = "https://stickershop.line-scdn.net/stickershop/v1/sticker/" + id + + "/android/sticker.png"; + let data = await URLcashe.getItem(url); + if (data) { + return URL.createObjectURL(data); + } else { + let res; + try { + res = await fetch(url); + } catch (error) { + } + if (!res || !res.ok) { + console.error("Error response at " + url); + return ""; + } + data = await res.blob(); + URLcashe.setItem(url, data); + return URL.createObjectURL(data); + } +} +async function buttonEvent(n, arg, add) { + if (n == "goChat") { + if (roomData.roomMid == arg[0].parentElement.dataset.mid) { + notify("すでに開いています", "red", "#fff"); + return; + } + notify("Loading...", "#000", "#fff"); + roomData.roomMid = arg[0].parentElement.dataset.mid; + await squareChat2chatroom( + await Line.getSquareChat(arg[0].parentElement.dataset.mid), + ); + await initTalk(arg[0].parentElement.dataset.mid); + updateChat(); + return; + } + if (n == "send") { + if (roomData.command) { + cRequest( + arg[0].parentElement.parentElement.childNodes[0].childNodes[0] + .value, + ); + cResponse( + await runCommand( + " " + + arg[0].parentElement.parentElement.childNodes[0] + .childNodes[0].value, + ), + ); + } + if ( + arg[0].parentElement.parentElement.childNodes[0].childNodes[0].value + .substring(0, 4) == "$cmd" + ) { + notify( + await runCommand( + arg[0].parentElement.parentElement.childNodes[0] + .childNodes[0].value.substring(4), + ), + "#fff", + "#222", + 7000, + ); + return; + } + Line.sendTxtMessage( + roomData.roomMid, + arg[0].parentElement.parentElement.childNodes[0].childNodes[0] + .value, + ); + arg[0].parentElement.parentElement.childNodes[0].childNodes[0].value = + ""; + return; + } + if (n == "viewReply") { + let res = await getMsgById( + arg[0].parentElement.dataset.messageId, + true, + ); + if (res) { + res.scrollIntoView(); + } + return; + } + if (n == "chatScroll") { + var scroll = arg[0].scrollTop; + if (scroll > -1) { + arg[0].parentElement.childNodes[1].dataset.hidden = "true"; + roomData.followLatest = true; + } else { + roomData.followLatest = false; + arg[0].parentElement.childNodes[1].dataset.hidden = "false"; + } + return; + } + if (n == "chatDown") { + roomData.followLatest = true; + arg[0].parentElement.childNodes[2].scrollTop = 0; + return; + } + if (n == "openProfileM") { + memberPopup(arg[0].dataset.mid); + return; + } + if (n == "openProfile") { + memberPopup(arg[0].parentElement.dataset.mid); + return; + } + if (n == "closeChat") { + roomData.roomMid = null; + $("#root > div > div > div:nth-child(4)").out.innerHTML = ""; + return; + } + if (n == "memberView") { + roomData.roomMid = null; + chatMembersList( + arg[0].parentElement.parentElement.parentElement.parentElement + .dataset.mid, + ); + return; + } + if (n == "imgMsgView") { + notify("画像を読み込み中...", "#fff", "green"); + open( + await getMDataUrl( + arg[0].parentElement.parentElement.dataset.messageId, + ), + "image", + "popup,width=400,height=400", + ); + return; + } + if (n == "videoMsgView") { + notify("動画を読み込み中...", "#fff", "green"); + open( + await getMDataUrl( + arg[0].parentElement.parentElement.dataset.messageId, + ), + "video", + "popup,width=400,height=400", + ); + return; + } + if (n == "stkView") { + open( + "https://store.line.me/stickershop/product/" + + arg[0].dataset.stkPkgId, + ); + return; + } + if (n == "openProfileImg") { + open( + "https://obs.line-scdn.net/" + + (await getProfile(arg[0].parentElement.dataset.mid, true)) + .profileImageObsHash, + "image", + "popup,width=400,height=400", + ); + return; + } + if (n == "openConsole") { + consoleRoom(); + return; + } + if (n == "msgAction") { + genTxtPopup({ + name: "Message Data", + desc: JSON.stringify(add, null, 2), + }); + return; + } + if (n == "eventView") { + genTxtPopup({ name: "Event Data", desc: JSON.stringify(add, null, 2) }); + return; + } + if (n == "msgInput") { + return; + } + console.log(n, arg); +} +async function runCommand(command) { + console.log(command); + command = command.split(" "); + switch (command[1]) { + case "viewRead": + if (command[2] == "true") { + roomData.setting.viewMkRead = true; + return "viewMkRead : true"; + } else { + roomData.setting.viewMkRead = false; + return "viewMkRead : false"; + } + case "allkick": + return "👿"; + case "silent": + return `${command[2]} : mode = Silent`; + case "nosilent": + return `${command[2]} : mode = Normal`; + case "status": + return `OpenChat-Web-Client : ${window.version} / ${window.versionCode} +User-Name : ${Line.name} +User-Mid : ${Line.mid} +User-Device : ${Line.deviceName} +SquareChatMid : ${roomData.commandMid ? roomData.commandMid : roomData.roomMid} +MySquareMemberMid : ${roomData.mymid}`; + case "cd": + roomData.commandMid = command[2]; + roomData.mymid = null; + return `SquareChatMid : ${roomData.commandMid}`; + default: + return "unknown command : " + command[1]; + } +} +function consoleRoom() { + let data = { + mymid: roomData.mymid, + mid: roomData.roomMid, + name: "Console", + member: version, + img: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBoRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAMAAAExAAIAAAARAAAATgAAAAAAAJOjAAAD6AAAk6MAAAPocGFpbnQubmV0IDUuMC4xMwAA/+ICKElDQ19QUk9GSUxFAAEBAAACGAAAAAAEMAAAbW50clJHQiBYWVogAAAAAAAAAAAAAAAAYWNzcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAPbWAAEAAAAA0y0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJZGVzYwAAAPAAAAB0clhZWgAAAWQAAAAUZ1hZWgAAAXgAAAAUYlhZWgAAAYwAAAAUclRSQwAAAaAAAAAoZ1RSQwAAAaAAAAAoYlRSQwAAAaAAAAAod3RwdAAAAcgAAAAUY3BydAAAAdwAAAA8bWx1YwAAAAAAAAABAAAADGVuVVMAAABYAAAAHABzAFIARwBCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9wYXJhAAAAAAAEAAAAAmZmAADypwAADVkAABPQAAAKWwAAAAAAAAAAWFlaIAAAAAAAAPbWAAEAAAAA0y1tbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADb/2wBDAAIBAQEBAQIBAQECAgICAgQDAgICAgUEBAMEBgUGBgYFBgYGBwkIBgcJBwYGCAsICQoKCgoKBggLDAsKDAkKCgr/2wBDAQICAgICAgUDAwUKBwYHCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgr/wAARCAABAAEDARIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+f+igD//Z", + inputName: "コマンド ", + }; + let res = genChatroom(data); + $("#root > div > div > div:nth-child(4)").in(res); + if (!roomData.commandMid) { + roomData.commandMid = roomData.roomMid; + } + roomData.command = true; + roomData.roomMid = null; + data = { + isSelected: false, + timeInt: new Date().getTime(), + timeStr: new Date() + .toLocaleTimeString() + .substring(0, 5), + profile: { img: defaltIMG, name: "console", mid: "vconsole" }, + mid: "vconsole", + msgId: new Date().getTime(), + contentType: 0, + direction: "", //reverse + msgGroup: "item", + text: `chatCommand +OpenChat-Web-Client : ${window.version} / ${window.versionCode} +User-Name : ${Line.name} +User-Mid : ${Line.mid} +User-Device : ${Line.deviceName} +SquareChatMid : ${roomData.commandMid} +MySquareMemberMid : ${roomData.mymid}`, + }; + appendMsgByData(data); +} +function cResponse(text) { + data = { + isSelected: false, + timeInt: new Date().getTime(), + timeStr: new Date() + .toLocaleTimeString() + .substring(0, 5), + profile: { img: defaltIMG, name: "console", mid: "vconsole" }, + mid: "vconsole", + msgId: new Date().getTime(), + contentType: 0, + direction: "", //reverse + msgGroup: "item", + text: text, + }; + appendMsgByData(data); +} +function cRequest(text) { + data = { + isSelected: false, + timeInt: new Date().getTime(), + timeStr: new Date() + .toLocaleTimeString() + .substring(0, 5), + profile: { img: defaltIMG, name: "console", mid: "vconsole" }, + mid: "vconsole", + msgId: new Date().getTime(), + contentType: 0, + direction: "reverse", // + msgGroup: "item", + text: text, + }; + appendMsgByData(data); +} +function appendMsgByData(data) { + let dom = genMsg(data); + roomData.messageView.elmList.prepend(dom); + if (roomData.followLatest) { + dom.scrollIntoView(); + } + observer.observe(dom); +} +async function squareChat2chatroom(squareChatResponse) { + roomData.messageView.dataList = []; + roomData.commandMid = null; + roomData.command = false; + roomData.roomMid = squareChatResponse.squareChat.squareChatMid; + let data = { + mymid: squareChatResponse.squareChatMember.squareMemberMid, + mid: squareChatResponse.squareChat.squareChatMid, + name: squareChatResponse.squareChat.name, + member: squareChatResponse.squareChatStatus.otherStatus.memberCount, + img: await getObsUrl(squareChatResponse.squareChat.chatImageObsHash), + inputName: (await getProfile( + squareChatResponse.squareChatMember.squareMemberMid, + )).name + "として", + }; + let res = genChatroom(data); + $("#root > div > div > div:nth-child(4)").in(res); + return res; +} +function genChatroom(data) { + let mlist = div( + { + "class": "message_list", + "role": "log", + "data-mymid": data.mymid, + "$scroll": (...arg) => { + buttonEvent("chatScroll", arg); + }, + "style": "background-color:rgba(0,0,0,0.2)", + }, + ); + roomData.mymid = data.mymid; + roomData.messageView.elmList = mlist; + let notifyMsg = div({}); + roomData.notifyMsg = notifyMsg; + return div( + { + "class": "chatroom-module__chatroom__eVUaK ", + "data-mid": data.mid, + "data-font-size": "normal", + "data-is-dropzone": "true", + }, + div( + { + "class": "chatroomHeader-module__header__ihDT2", + }, + div( + { + "class": "chatroomHeader-module__inner__0P5fp", + }, + div( + { + "class": "chatroomHeader-module__info__2my0W", + }, + button( + { + "type": "button", + "class": + "chatroomHeader-module__button_name__US7lb", + "aria-controls": "member_popup", + "aria-haspopup": "false", + "aria-expanded": "false", + "$click": (...arg) => { + buttonEvent("memberView", arg); + }, + }, + strong( + { + "class": "chatroomHeader-module__name__t-K11", + }, + pre( + {}, + span( + {}, + data.name, + ), + ), + ), + span( + { + "class": + "chatroomHeader-module__member_count__s6hqu", + }, + "(" + data.member + ")", + ), + ), + button( + { + "class": + "chatroomHeader-module__button_alarm__dBqwP", + "data-tooltip": "通知オフ", + "$click": (...arg) => { + buttonEvent("chatNotiDisable", arg); + }, + }, + i( + { + "class": + "icon chatroomHeader-module__icon_alarm__tgjw2", + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "7.0", + }, + g( + { + "transform": "translate(-2 -2)", + }, + path( + { + "d": "m8.377 7.845 5.004-4.665c.419-.391 1.119-.103 1.119.46v16.72c0 .563-.699.851-1.119.46l-5.004-4.665H2.661a.654.654 0 0 1-.654-.545L2 15.515v-7.03a.65.65 0 0 1 .661-.64h5.716zm9.37 1.243a4.185 4.185 0 0 0-.725-.57l-.702 1.09.175.118A2.793 2.793 0 0 1 16.819 14c-.153.15-.32.281-.498.392l.701 1.09.192-.127c.19-.133.368-.28.533-.443a4.068 4.068 0 0 0 0-5.824zM18.637 6c.452.28.87.61 1.25.983a7.008 7.008 0 0 1 0 10.034c-.305.3-.634.57-.983.809L18.64 18l-.704-1.09c.37-.23.712-.5 1.023-.805a5.735 5.735 0 0 0 0-8.21 5.874 5.874 0 0 0-.753-.626l-.27-.179.701-1.09z", + }, + ), + ), + ), + ), + ), + button( + { + "class": + "chatroomHeader-module__button_popup__tcF1V", + "data-tooltip": "閉じる", + "$click": (...arg) => { + buttonEvent("closeChat", arg); + }, + }, + "X", + ), + ), + div( + { + "class": "chatroomHeader-module__action_group__k8w1P", + }, + button( + { + "type": "button", + "aria-label": "more button", + "data-tooltip": "ノート", + "class": + "chatroomHeader-module__button_more__9rz-2", + "aria-haspopup": "true", + "$click": (...arg) => { + buttonEvent("noteView", arg); + }, + }, + i( + { + "class": + "icon chatroomHeader-module__icon_more__Q8OVO", + }, + svg( + { + "xmlns": "http://www.w3.org/2000/svg", + "height": "2em", + "fill": "#fff", + "viewBox": "0 0 20 20", + }, + g( + { + "stroke": "#000", + "stroke-width": "1.5", + }, + path( + { + "d": "M3.75 4c0-.69.56-1.25 1.25-1.25h13c.69 0 1.25.56 1.25 1.25v14.004c0 .69-.56 1.25-1.25 1.25H5c-.69 0-1.25-.56-1.25-1.25V4zM8.523 8.026h5.954M8.523 10.979h5.954M8.523 13.979h5.954", + }, + ), + ), + defs( + {}, + clipPath( + { + "id": "bcclip0_1_5447", + }, + path( + { + "fill": "currentColor", + "transform": "translate(3 2)", + "d": "M0 0h17v18H0z", + }, + ), + ), + ), + ), + ), + ), + button( + { + "type": "button", + "aria-label": "more button", + "class": + "chatroomHeader-module__button_more__9rz-2", + "aria-haspopup": "true", + "$click": (...arg) => { + buttonEvent("chatAction", arg); + }, + }, + i( + { + "class": + "icon chatroomHeader-module__icon_more__Q8OVO", + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "5.0", + }, + g( + { + "transform": "translate(-2 -2)", + }, + path( + { + "d": "M12 16.4722c.829 0 1.5.671 1.5 1.5 0 .311-.094.599-.256.838-.054.08-.116.155-.183.223a1.499 1.499 0 0 1-1.061.439c-.414 0-.789-.168-1.061-.439a1.5739 1.5739 0 0 1-.183-.223 1.487 1.487 0 0 1-.256-.838c0-.829.671-1.5 1.5-1.5ZM12 10.5c.829 0 1.5.671 1.5 1.5s-.671 1.5-1.5 1.5-1.5-.671-1.5-1.5.671-1.5 1.5-1.5Zm0-5.9722c.829 0 1.5.672 1.5 1.5 0 .829-.671 1.5-1.5 1.5s-1.5-.671-1.5-1.5c0-.828.671-1.5 1.5-1.5Z", + }, + ), + ), + ), + ), + ), + ), + ), + ), + div( + { + "class": "chatroomContent-module__content_area__gK6db ", + "style": "background-image:url(" + data.img + + ");background-size: 100% auto;background-position: center;height:50vh;", + }, + ul( + { + "class": "ToastContainer-module__toast-list__QAniw", + "style": "z-index: 100;", + }, + ), + button( + { + "type": "button", + "aria-label": "Scroll down", + "class": + "scrollDownButton-module__button_scroll_down__-XrLT", + "data-hidden": "true", + "$click": (...arg) => { + buttonEvent("chatDown", arg); + }, + }, + i( + { + "class": + "icon scrollDownButton-module__icon_arrow__6We-I", + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "5.0", + }, + g( + { + "transform": "translate(-2 -2)", + }, + path( + { + "d": "m13 3.6245-.0002 13.046 5.7122-5.4163 1.3762 1.4512L12 20.3754l-8.0882-7.67 1.3762-1.4512 5.7118 5.4163L11 3.6245h2Z", + }, + ), + ), + ), + ), + ), + mlist, + notifyMsg, + ), + div( + { + "class": "chatroomEditor-module__editor_area__1UsgR", + }, + div( + { + "data-is-empty": "true", + "class": "text chatroomEditor-module__textarea__yKTlH", + spellcheck: "false", + autofocus: "", + maxlength: "10000", + placeholder: "メッセージを入力", + }, + textarea( + { + "part": "input", + "class": "input ", + "placeholder": data.inputName + "メッセージを入力", + "maxlength": "10000", + "autofocus": "", + "style": + 'max-width: 100%; min-width: 100%;max-height:150%;--inherited-font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", helvetica, "Hiragino Sans", arial, "MS PGothic", sans-serif; --webfont-family: F2607980855;', + "$input": (...arg) => { + buttonEvent("msgInput", arg); + }, + }, + ), + div( + { + "class": "cover", + "part": "cover", + "style": + '--inherited-font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", helvetica, "Hiragino Sans", arial, "MS PGothic", sans-serif; --webfont-family: F2607980855;', + }, + ), + ), + div( + { + "class": "actionGroup-module__action_box__-HA8N ", + }, + button( + { + "type": "button", + "aria-label": "Send file", + "class": "actionGroup-module__button_action__VwNgx", + "data-type": "file", + "data-tooltip": "ファイル送信", + "data-tooltip-placement": "top-start", + "$click": (...arg) => { + buttonEvent("sendFile", arg); + }, + }, + i( + { + "class": "icon", + }, + svg( + { + "width": "24", + "height": "24", + "viewBox": "0 0 24 24", + "fill": "none", + "xmlns": "http://www.w3.org/2000/svg", + }, + path( + { + "d": "M11.479 4.971c1.664-1.925 4.658-2.24 6.686-.702.988.749 1.603 1.823 1.73 3.021a4.32 4.32 0 0 1-.908 3.123l-.156.19-8.75 10.125-1.1-.834 8.78-10.158c.566-.655.828-1.47.74-2.3A3.009 3.009 0 0 0 17.3 5.341c-1.382-1.049-3.414-.88-4.615.352l-.134.147-6.762 7.828a1.86 1.86 0 0 0-.458 1.421c.054.513.316.971.744 1.295a2.16 2.16 0 0 0 1.54.418 2.17 2.17 0 0 0 1.296-.597l.123-.131 6.763-7.83a.707.707 0 0 0-.109-1.042.885.885 0 0 0-1.098.046l-.078.078-5.367 6.213-1.043-.954 5.34-6.128a2.316 2.316 0 0 1 3.113-.326 2.034 2.034 0 0 1 .415 2.854l-.102.127-6.763 7.83a3.579 3.579 0 0 1-2.348 1.21 3.578 3.578 0 0 1-2.55-.696 3.192 3.192 0 0 1-1.269-2.22 3.176 3.176 0 0 1 .638-2.26l.142-.176 6.762-7.829z", + "fill": "#303030", + }, + ), + ), + ), + ), + button( + { + "type": "button", + "aria-label": "Select sticker", + "class": "actionGroup-module__button_action__VwNgx", + "data-type": "sticker", + "data-tooltip": "スタンプ", + "data-tooltip-placement": "top-end", + "$click": (...arg) => { + buttonEvent("sendStk", arg); + }, + }, + i( + { + "class": "icon", + }, + svg( + { + "width": "24", + "height": "24", + "viewBox": "0 0 24 24", + "fill": "none", + "xmlns": "http://www.w3.org/2000/svg", + }, + g( + { + "opacity": "0.01", + "fill": "#fff", + }, + path( + { + "d": "M0 0h24v24H0z", + }, + ), + path( + { + "opacity": "0.7", + "d": "M2 2h20v20H2z", + }, + ), + ), + path( + { + "d": "M14.843 13.17a.624.624 0 0 0-.853.228 2.76 2.76 0 0 1-4.78 0 .624.624 0 1 0-1.08.625 4.008 4.008 0 0 0 6.94 0 .624.624 0 0 0-.227-.852z", + "fill": "#303030", + }, + ), + circle( + { + "cx": "14.266", + "cy": "10.464", + "r": "0.96", + "fill": "#303030", + }, + ), + circle( + { + "cx": "8.934", + "cy": "10.464", + "r": "0.96", + "fill": "#303030", + }, + ), + path( + { + "fill-rule": "evenodd", + "clip-rule": "evenodd", + "d": "M11.6 3.22a8.88 8.88 0 1 0 8.88 8.88 8.89 8.89 0 0 0-8.88-8.88zm0 16.512a7.632 7.632 0 1 1 7.632-7.632 7.64 7.64 0 0 1-7.632 7.632z", + "fill": "#303030", + }, + ), + path( + { + "d": "M11.6 3.22v-.1.1zm8.88 8.88h.1-.1zm-8.88 7.632v.1-.1zm7.632-7.632h.1-.1zM11.6 3.12a8.98 8.98 0 0 0-8.98 8.98h.2a8.78 8.78 0 0 1 8.78-8.78v-.2zM2.62 12.1a8.98 8.98 0 0 0 8.98 8.98v-.2a8.78 8.78 0 0 1-8.78-8.78h-.2zm8.98 8.98a8.98 8.98 0 0 0 8.98-8.98h-.2a8.78 8.78 0 0 1-8.78 8.78v.2zm8.98-8.98a8.99 8.99 0 0 0-8.98-8.98v.2a8.79 8.79 0 0 1 8.78 8.78h.2zm-8.98 7.532a7.532 7.532 0 0 1-6.96-4.649l-.184.077a7.732 7.732 0 0 0 7.144 4.772v-.2zm-6.96-4.649a7.532 7.532 0 0 1 1.633-8.209l-.142-.141a7.732 7.732 0 0 0-1.675 8.427l.185-.077zm1.633-8.209a7.532 7.532 0 0 1 8.209-1.633l.076-.185a7.732 7.732 0 0 0-8.427 1.677l.142.141zm8.209-1.633a7.532 7.532 0 0 1 4.65 6.959h.2a7.732 7.732 0 0 0-4.774-7.144l-.076.185zm4.65 6.959a7.54 7.54 0 0 1-7.532 7.532v.2a7.74 7.74 0 0 0 7.731-7.732h-.2z", + "fill": "#303030", + }, + ), + ), + ), + ), + button( + { + "type": "button", + "aria-label": "Select sticker", + "class": "actionGroup-module__button_action__VwNgx", + "data-type": "send", + "data-tooltip": "送信", + "data-tooltip-placement": "top-end", + "$click": (...arg) => { + buttonEvent("send", arg); + }, + }, + i( + { + "class": "icon", + "style": "color:#007aff;", + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "15.0", + }, + g( + { + "transform": "translate(-2 -2)", + }, + path( + { + "d": "m20.1864 11.0044-15.477-7.736a1.1091 1.1091 0 0 0-1.165.105c-.338.254-.503.671-.427 1.087l1.274 7.04h8.108v1h-8.119l-1.263 7.039c-.076.417.089.833.427 1.087.198.148.432.224.667.224.169 0 .34-.039.499-.118l15.476-7.737c.379-.19.614-.571.614-.995 0-.425-.235-.806-.614-.996Z", + }, + ), + ), + ), + ), + ), + ), + ), + ); +} + +const observer = new IntersectionObserver((entries) => { + for (const e of entries) { + if (e.isIntersecting) { + e.target.setAttribute("style", ""); + } else { + e.target.setAttribute("style", "visibility:hidden;"); + } + } +}); + +var fileMenu = ""; + +async function Message2Elm(message) { + let date = new Date(message.deliveredTime); + let data = { + isSelected: false, + timeInt: message.deliveredTime, + timeStr: date.getHours() + ":" + date.getMinutes(), + profile: await getProfile(message._from), + mid: message._from, + msgId: message.id, + rId: message.relatedMessageId, + contentType: message.contentType, + direction: "", + msgGroup: "", + }; + + if (data.mid == roomData.mymid) { + data.direction = "reverse"; + } + if ( + data.rId && (message.relatedMessageServiceCode == 2) && + (message.messageRelationType == 3) + ) { + data.reply = await getMsgById(data.rId); + } + let add; + + if (message.contentMetadata && message.contentMetadata.UNSENT == "true") { + return [genSysMsg({ + event: { + timeStr: data.timeStr, + arg: message, + text: data.profile.name + "が送信取り消ししたメッセージ", + }, + })]; + } + + switch (message.contentType) { + case 0: //t + add = { + text: [message.text], + emoji: message.contentMetadata + ? message.contentMetadata.REPLACE + : null, + mention: message.contentMetadata + ? message.contentMetadata.MENTION + : null, + }; + data = { ...data, ...add }; + break; + case undefined: //t + add = { + text: [message.text], + emoji: message.contentMetadata + ? message.contentMetadata.REPLACE + : null, + mention: message.contentMetadata + ? message.contentMetadata.MENTION + : null, + }; + data = { ...data, ...add }; + break; + case 1: //i + add = { + data: { + preview: await getMPDataUrl(message.id), + }, + }; + data = { ...data, ...add }; + break; + case 2: //v + add = { + data: { + preview: await getMPDataUrl(message.id), + }, + }; + data = { ...data, ...add }; + break; + case 3: //a + add = { + data: await getMDataUrl(message.id), + }; + data = { ...data, ...add }; + break; + case 7: //st + add = { + img: await getStkDataUrl(message.contentMetadata.STKID), + stkId: message.contentMetadata.STKID, + stkPId: message.contentMetadata.STKPKGID, + }; + data = { ...data, ...add }; + break; + case 14: //fi + break; + case 16: //note + add = { + text: message.text, + url: message.contentMetadata.postEndUrl, + createBy: message.contentMetadata.officialName, + }; + data = { ...data, ...add }; + break; + break; + case 22: //fl + add = { + text: message.contentMetadata.ALT_TEXT, + flex: message.contentMetadata.FLEX_JSON, + }; + data = { ...data, ...add }; + break; + default: + break; + } + + return [genMsg(data, message), data, genMsg]; //elm data func +} + +function genSysMsg(data, raw) { + if (data.date) { + return div( + { + "class": "messageDate-module__date_wrap__I4ily ", + "data-selected": "false", + }, + time( + { + "class": "messageDate-module__date__pDnK3", + }, + data.date, + ), + ); + } else if (data.event) { + return div( + { + "class": "systemMessage-module__message__yIiOJ ", + "data-flexible": "true", + "data-selected": "false", + "data-timestamp": data.event.timeStr, + "$click": (data.event.arg + ? (...arg) => { + setTimeout(() => + genTxtPopup({ + name: "Event Data", + desc: JSON.stringify(data.event.arg, null, 2), + }) + ); + } + : data.event.onclick), + }, + div( + { + "class": "systemMessage-module__text__7T3Lj", + }, + pre( + {}, + time( + { + "class": "systemMessage-module__date__o1LDL", + "style": "color:#fff;", + }, + data.event.timeStr, + ), + span( + { "style": "color:#fff;" }, + data.event.text, + ), + ), + ), + ); + } +} +function genMsg(data = {}, raw) { + return div( + { + "class": + "message-module__message__7odk3 messageLayout-module__message__YVDhk ", + "data-selected": data.isSelected, + "data-timestamp": data.timeInt, + "data-message-content-prefix": data.timeStr + " " + + data.profile.name, + "data-mid": data.mid, + "data-group": data.msgGroup, + "data-direction": data.direction, + "data-id": data.msgId, + }, + div( + { + "class": + "thumbnail profileImage-module__thumbnail_wrap__0bK7m ", + "data-mid": data.mid, + "data-profile-image": "true", + "style": "border-radius: 50%;", + }, + button( + { + "type": "button", + "class": "profileImage-module__button_profile__GqKue", + "$click": (...arg) => { + buttonEvent("openProfile", arg); + }, + }, + div( + { + "class": "profileImage-module__thumbnail_area__nqIpB", + }, + span( + { + "class": "profileImage-module__thumbnail__Q6OsR", + }, + img( + { + "src": data.profile.img, + "class": "", + "loading": "lazy", + "alt": "", + "draggable": "false", + }, + ), + ), + ), + ), + ), + pre( + { + "class": "username-module__username__vGQGj", + "style": "color:#fff;", + }, + fuchi(data.profile.name), + ), + div( + { + "class": "messageLayout-module__content__PGz66", + }, + div( + { + "class": "message-module__content__OuUCi", + }, + div( + { + "class": "message-module__content_inner__j-iko", + }, + msgMain(data, raw), + div( + { + "class": "metaInfo-module__meta__F2Lfn ", + }, + span( + { + "class": "metaInfo-module__read_count__8-U6j", + }, + ), + time( + { + "class": "metaInfo-module__send_time__-3Q6-", + "style": "color:#fff;", + }, + fuchi(data.timeStr), + ), + ), + ), + ), + div( + { + "class": + "reactionBubblelist-module__reaction_bubble_list__eV9o2 ", + }, + ), + fileMenu, + ), + "‌", + ); +} +function msgMain(data, raw) { + fileMenu = ""; + switch (data.contentType) { + case 0: //txt + if (data.reply) { + return replyBox(data, textMsg(data)); + } else { + return textMsg(data); + } + break; + case undefined: //txt + if (data.reply) { + return replyBox(data, textMsg(data)); + } else { + return textMsg(data); + } + break; + case 1: //img + return imgMsg(data); + case 2: //video + return videoMsg(data); + case 3: //audio + return audioMsg(data); + case 7: //sticker + return stickerMsg(data); + case 14: //file + break; + case 16: //note + return noteMessage(data); + case 22: //flex + return flexMsg(data); + default: + break; + } + function noteMessage(data) { + if (!data.text) { + data.text = ""; + } + let text = [ + "ノート\n", + data.text, + "\n", + a({ href: data.url }, "ノートを見る"), + ]; + return div( + { + "class": "textMessageContent-module__content_wrap__238E1 ", + "data-message-id": data.msgId, + "$contextmenu": (...arg) => { + buttonEvent("msgAction", arg, raw); + }, + "data-direction": data.direction, + }, + pre( + { + "class": "textMessageContent-module__text__EFwEN", + }, + span( + { + "data-message-content": "", + "data-is-message-text": "true", + }, + ...text, + ), + ), + ); + } + function textMsg(data) { + if (!data.text) { + data.text = [""]; + } + if (data.mention) { + let mention = JSON.parse(data.mention); + let txt = []; + let otxt = data.text[0]; + mention.MENTIONEES.forEach((e, i, l) => { + let oE; + if (l[i - 1]) { + oE = Number(l[i - 1].E); + } else { + oE = 0; + } + + if (i == (l.length - 1)) { + txt.push(otxt.substring(oE, Number(e.S))); + txt.push(strong( + { + "class": "mention", + "data-mid": e.M, + "$click": (...arg) => { + buttonEvent("openProfileM", arg); + }, + }, + otxt.substring(Number(e.S), Number(e.E)), + )); + txt.push(otxt.substring(Number(e.E))); + } else { + txt.push(otxt.substring(oE, Number(e.S))); + txt.push(strong( + { + "class": "mention", + "data-mid": e.M, + "$click": (...arg) => { + buttonEvent("openProfileM", arg); + }, + }, + otxt.substring(Number(e.S), Number(e.E)), + )); + } + }); + data.text = txt; + } else if (data.emoji) { + let emoji = JSON.parse(data.emoji); + let txt = []; + let otxt = data.text[0]; + emoji.sticon.resources.forEach((e, i, l) => { + let oE; + if (l[i - 1]) { + oE = l[i - 1].E; + } else { + oE = 0; + } + + if (i == (l.length - 1)) { + txt.push(otxt.substring(oE, e.S)); + txt.push(span( + { + "class": "emoji-wrap", + "data-tooltip": "", + "data-tooltip-is-html": "true", + "data-tooltip-is-preserved": "true", + "data-emoji": e.productId + ":" + e.sticonId, + "$click": (...arg) => { + buttonEvent("emojiView", arg); + }, + }, + img( + { + "src": + `https://stickershop.line-scdn.net/sticonshop/v1/sticon/${e.productId}/android/${e.sticonId}.png`, + "class": "emoji", + "alt": "(emoji)", + "loading": "lazy", + }, + ), + )); + txt.push(otxt.substring(e.E)); + } else { + txt.push(otxt.substring(oE, e.S)); + txt.push(span( + { + "class": "emoji-wrap", + "data-tooltip": "", + "data-tooltip-is-html": "true", + "data-tooltip-is-preserved": "true", + "data-emoji": e.productId + ":" + e.sticonId, + "$click": (...arg) => { + buttonEvent("emojiView", arg); + }, + }, + img( + { + "src": + `https://stickershop.line-scdn.net/sticonshop/v1/sticon/${e.productId}/android/${e.sticonId}.png`, + "class": "emoji", + "alt": "(emoji)", + "loading": "lazy", + }, + ), + )); + } + }); + data.text = txt; + } + return div( + { + "class": "textMessageContent-module__content_wrap__238E1 ", + "data-message-id": data.msgId, + "$contextmenu": (...arg) => { + buttonEvent("msgAction", arg, raw); + }, + "data-direction": data.direction, + }, + pre( + { + "class": "textMessageContent-module__text__EFwEN", + "style": "max-height: 500px;overflow-y: auto;", + }, + span( + { + "data-message-content": "", + "data-is-message-text": "true", + }, + ...data.text, + ), + ), + ); + } + + function replyBox(data, index) { + return div( + { + "class": "replyMessageContent-module__content_wrap__D0K-5 ", + "data-type": "", + "data-content-type": "", + "data-message-id": data.rId, + }, + button( + { + "type": "button", + "class": "replyMessageContent-module__button_move__Jo33w", + "aria-label": "See in chat", + "$click": (...arg) => { + buttonEvent("viewReply", arg); + }, + }, + div( + { + "class": + "replyMessageContent-module__message__0FNkK messageLayout-module__message__YVDhk ", + }, + div( + { + "class": + "thumbnail profileImage-module__thumbnail_wrap__0bK7m ", + "data-mid": data.reply.profile.mid, + "data-profile-image": "true", + "style": "border-radius: 50%; cursor: default;", + }, + div( + { + "class": + "profileImage-module__thumbnail_area__nqIpB", + }, + span( + { + "class": + "profileImage-module__thumbnail__Q6OsR", + }, + img( + { + "src": data.reply.profile.img, + "class": "", + "loading": "lazy", + "alt": "", + "draggable": "false", + }, + ), + ), + ), + ), + pre( + { + "class": "username-module__username__vGQGj", + }, + span( + {}, + data.reply.profile.name, + ), + ), + div( + { + "class": "messageLayout-module__content__PGz66", + }, + p( + { + "class": + "replyMessageContent-module__text__0T50-", + }, + span( + {}, + data.reply.txt, + ), + ), + ), + "‌", + ), + ), + index, + ); + } + function imgMsg(data) { + return div( + { + "class": "imageMessageContent-module__content_wrap__bT-Si ", + "data-type": "", + }, + div( + { + "class": "imageMessageContent-module__image_group__ZOeAa", + }, + div( + { + "class": "imageMessageContent-module__item__fJDih ", + "data-message-id": data.msgId, + }, + div( + { + "class": + "imageMessageContent-module__thumbnail__z4GO8", + }, + button( + { + "type": "button", + "class": + "imageMessageContent-module__button_view__4y-jN", + "aria-label": "Show image", + "data-index": "0", + "$click": (...arg) => { + buttonEvent("imgMsgView", arg); + }, + }, + img( + { + "alt": "", + "src": data.data.preview, + "class": "", + "loading": "lazy", + "draggable": "false", + }, + ), + ), + ), + ), + ), + ); + } + function videoMsg(data) { + return div( + { + "class": "videoMessageContent-module__content_wrap__ffvJq ", + "data-message-id": data.msgId, + }, + div( + { + "class": "videoMessageContent-module__thumbnail__Va9Ie", + }, + button( + { + "type": "button", + "class": + "videoMessageContent-module__button_view__qMX7E", + "aria-label": "view video", + "$click": (...arg) => { + buttonEvent("videoMsgView", arg); + }, + }, + img( + { + "alt": "", + "src": data.data.preview, + "class": "", + "loading": "lazy", + "draggable": "false", + }, + ), + div( + { + "class": "videoMessageContent-module__info__j528-", + }, + i( + { + "class": + "icon videoMessageContent-module__icon_play__N7WFP", + }, + svg( + { + "height": "1em", + "fill": "currentColor", + "viewBox": "0 0 20 20", + "xmlns": "http://www.w3.org/2000/svg", + "data-laicon-version": "10.0", + }, + g( + { + "transform": "translate(-2 -2)", + }, + path( + { + "d": "M18.105 11.437a.665.665 0 0 1 0 1.126L7.412 19.29a.665.665 0 0 1-1.02-.563V5.274a.665.665 0 0 1 1.02-.563l10.693 6.726z", + }, + ), + ), + ), + ), + ), + ), + ), + ); + } + function audioMsg(data) { + return div( + { + "class": "textMessageContent-module__content_wrap__238E1 ", + "data-message-id": data.msgId, + }, + audio( + { + controls: "", + src: data.data, + }, + ), + ); + } + function stickerMsg(data) { + return div( + { + "class": "stickerMessageContent-module__content_wrap__BGfk- ", + "data-message-id": data.msgId, + }, + button( + { + "type": "button", + "class": "stickerMessageContent-module__button_view__rTOx0", + "aria-label": "view sticker", + "data-stkPkgId": data.stkPId, + "$click": (...arg) => { + buttonEvent("stkView", arg); + }, + }, + div( + { + "class": + "stickerMessageContent-module__thumbnail__eMXOS", + }, + div( + { + "class": "sticker", + }, + img( + { + "src": data.img, + "alt": "[スタンプ]", + "loading": "lazy", + "draggable": "false", + "class": "", + "width": "170", + "height": "149.33333333333334", + "data-is-owned": "false", + "data-is-effect-sticker": "false", + }, + ), + ), + ), + ), + ); + } + function flexMsg(data) { + let flex = JSON.parse(data.flex); + let html = + '
      '; + html += flex2html("hide", { + "type": "flex", + "altText": "Flex Message", + "contents": flex, + }) + "
      "; + document.getElementById("hide").innerHTML = ""; + let ifr = iframe( + { + "frameborder": "0", + "title": "", + "style": "width:100%;height:100%;", + "data-message-id": "501557461296873730", + "srcdoc": html, + }, + ); + setTimeout(() => { + ifr.setAttribute( + "style", + "width:" + + (ifr.contentWindow.document.documentElement.offsetWidth + + 1) + + "px;height:" + + (ifr.contentWindow.document.documentElement.offsetHeight + + 11) + + "px;", + ); + }, 2000); + + return div( + { + "class": "iframeMessage-module__iframe_wrap__PUSyZ", + }, + ifr, + ); + } + function fileM() { + fileMenu = div( + { + "class": + "message-module__action_group__c8hSm actionGroup-module__action_group__sGYDY", + }, + button( + { + "type": "button", + "class": "actionGroup-module__button_action__Cu9RJ", + "$click": (...arg) => { + buttonEvent("dlFile", arg); + }, + }, + span( + { + "class": "actionGroup-module__text__OBOQx", + }, + fuchi("保存"), + ), + ), + ); + } +} + +function fuchi(txt) { + return span( + { style: "color:#fff;" }, + txt, + ); +} +/*setInterval(()=>{ + let a=Date.now() + setTimeout(()=>{ + let b=Date.now() + if ((b-a)>80) { + location.reload() + } + },10) + debugger; + +},500)*/ diff --git a/site/rename_thrift.js b/site/rename_thrift.js deleted file mode 100644 index 6c64fa9..0000000 --- a/site/rename_thrift.js +++ /dev/null @@ -1,129 +0,0 @@ -import thriftIdl from "./thriftrw-node/thrift-idl.js"; - -function getType(obj) { - if (obj.type === "BaseType") { - return; - } else if (obj.type === "Identifier") { - return obj.name; - } -} -function isStruct(obj) { - return obj && obj.constructor === Object; -} -export default class ThriftRenameParser { - constructor(input) { - const def = thriftIdl.parse(input); - const thrift_def = {}; - def.definitions.forEach((e) => { - if (e.type === "Struct") { - const name = e.id.name; - const fields_def = []; - const fields = e.fields; - for (let i = 0; i < fields.length; i++) { - const field = fields[i]; - const field_fid = field.id.value; - const field_name = field.name; - const field_def = { fid: field_fid, name: field_name }; - if (field.valueType.type == "Identifier") { - field_def.struct = field.valueType.name; - } else if (field.valueType.type == "Map") { - field_def.map = getType(field.valueType.valueType); - } else if (field.valueType.type == "List") { - field_def.list = getType(field.valueType.valueType); - } else if (field.valueType.type == "Set") { - field_def.set = getType(field.valueType.valueType); - } - fields_def.push(field_def); - } - thrift_def[name] = fields_def; - } else if (e.type === "Enum") { - const name = e.id.name; - const defs_def = {}; - const defs = e.definitions; - for (let i = 0; i < defs.length; i++) { - const def = defs[i]; - defs_def[def.value.value] = def.id.name; - } - thrift_def[name] = defs_def; - } - }); - this.def = thrift_def; - } - name2fid(struct_name, name) { - const struct = this.def[struct_name]; - if (isStruct(struct)) { - return struct.find((e) => { - return e.name === name; - }); - } - } - fid2name(struct_name, fid) { - const struct = this.def[struct_name]; - if (struct) { - const result = struct.findIndex((e) => { - return e.fid == fid; - }); - if (result === -1) { - return { name: fid, fid: fid }; - } else { - return struct[result]; - } - } else { - return { name: fid, fid: fid }; - } - } - rename_thrift(struct_name, object) { - const newObject = {}; - for (const fid in object) { - const value = object[fid]; - const finfo = this.fid2name(struct_name, fid); - if (finfo.struct) { - if (isStruct(this.def[finfo.struct])) { - newObject[finfo.name] = this.rename_thrift( - finfo.struct, - value, - ); - } else { - newObject[finfo.name] = this.def[finfo.struct][value] || - value; - } - } else if (finfo.list) { - newObject[finfo.name] = []; - value.forEach((e, i) => { - newObject[finfo.name][i] = this.rename_thrift( - finfo.list, - e, - ); - }); - } else if (finfo.map) { - newObject[finfo.name] = {}; - for (const key in value) { - const e = value[key]; - newObject[finfo.name][key] = this.rename_thrift( - finfo.map, - e, - ); - } - } else if (finfo.set) { - newObject[finfo.name] = []; - value.forEach((e, i) => { - newObject[finfo.name][i] = this.rename_thrift( - finfo.set, - e, - ); - }); - } else { - newObject[finfo.name] = value; - } - } - return newObject; - } - rename_data(data){ - const name = data._info.fname - const value = data.value - const struct_name = name.substr(0, 1).toUpperCase() + name.substr(1) + "Response"; - data.value = this.rename_thrift(struct_name,value) - return data - } -} - diff --git a/site/res/README.html b/site/res/README.html new file mode 100644 index 0000000..e5c3b65 --- /dev/null +++ b/site/res/README.html @@ -0,0 +1,682 @@ + + + +README.md + + + + + + + + + + +

      Line-Deno-Client

      +

      Line-Deno-ClientはDenoで書かれたLINEの非公式APIです。

      +

      DenoまたはDeno DeployのHTTPサーバーを利用してブラウザ上で、またDeno単体でも実行できます。

      +

      使用方法

      +
      git clone -b dev https://github.com/test0987654321234567890/Line-Deno-Client +cd Line-Deno-Client +# HTTPサーバー起動 +deno run server/main.js +
      +

      コード例

      +

      インスタンス生成と初期化

      +

      Denoの場合、importします。

      +
      import LineClient from "./server/line_deno.js"; +
      +

      Webの場合、deno run server/main.jsでサーバーを起動してからlocalhost:7070にアクセスします。

      +

      または、Deno Deployのテストサーバーにアクセスします。

      +

      メールとパスワードでログイン:

      +
      const Line = new LineClient(); +await Line.init({ + device: "device", + email: "email", + pw: "pass_word", + pincall: (pincode) => { + // pincode callback + }, +}); +
      +

      Tokenで初期化:

      +
      const Line = new LineClient(); +await Line.init({ + authToken: "FHZWgN1MvZyCcGvljBib.vVQ0sVYTH+QJRnQ0rDoTsW.GBdUE+X+C7SrvpMBMbBrjaVbhQc+hCFoijX6xE29cbM=", + device: "IOSIPAD", +}); +
      +

      Lineリクエストを送信

      +

      LineClient.requestを使用してthriftデータを送信、受信できます:

      +
      await Line.request( + CHRdata = [], // CHRLINE Thrift [[ftype,fid,value],...] + methodName, // Method Name + protocol_type = 3, // 3:TBINARY 4:TCOMPACT + parse = true, // true:auto-parse false:no-parse "name":name-parse + path = "/S3", // gw.line.naver.jp{path} + headers = {}, // HTTP headers +); +// return Promise<Object(thriftData)> +// throw error.cause = thriftExceptionData +
      +

      実装されているメソッドを利用することもできます:

      +
      // SquareServise +await Line.getJoinedSquares(limit = 50, continuationToken); +await Line.inviteIntoSquareChat(inviteeMids, squareChatMid); +await Line.inviteToSquare(squareMid, invitees, squareChatMid); +await Line.markAsRead(squareChatMid, messageId); +await Line.reactToMessage(squareChatMid, messageId, reactionType = 2); +/* + reactionType + ALL = 0, + UNDO = 1, + NICE = 2, + LOVE = 3, + FUN = 4, + AMAZING = 5, + SAD = 6, + OMG = 7, +*/ +await Line.findSquareByInvitationTicket(invitationTicket); +await Line.fetchMyEvents( + syncToken = undefined, + limit = 100, + continuationToken = undefined, + subscriptionId, +); +await Line.fetchSquareChatEvents( + squareChatMid, + syncToken = undefined, + continuationToken = undefined, + subscriptionId = 0, + limit = 100, +); +await Line.sendSquareMessage( + squareChatMid, + text = "test Message", + contentType = 0, + contentMetadata = {}, + relatedMessageId = undefined, +); +await Line.getSquare(squareMid); +await Line.getSquareChat(squareChatMid); +await Line.getJoinableSquareChats( + squareMid, + continuationToken = undefined, + limit = 100, +); +await Line.createSquare( + name = "TEST Square", + displayName = "Tester", + profileImageObsHash = + "0h6tJf0hQsaVt3H0eLAsAWDFheczgHd3wTCTx2eApNKSoefHNVGRdwfgxbdgUMLi8MSngnPFMeNmpbLi8MSngnPFMeNmpbLi8MSngnOA", + desc = "test with Line-Deno-Client", + searchable = true, + SquareJoinMethodType = 0, +); +/* + SquareJoinMethodType + NONE(0), + APPROVAL(1), + CODE(2); +*/ +await Line.getSquareChatAnnouncements(squareChatMid); +await Line.updateSquareFeatureSet( + updateAttributes = [], + squareMid, + revision, + creatingSecretSquareChat = 0, +); +/* + updateAttributes: + CREATING_SECRET_SQUARE_CHAT(1), + INVITING_INTO_OPEN_SQUARE_CHAT(2), + CREATING_SQUARE_CHAT(3), + READONLY_DEFAULT_CHAT(4), + SHOWING_ADVERTISEMENT(5), + DELEGATE_JOIN_TO_PLUG(6), + DELEGATE_KICK_OUT_TO_PLUG(7), + DISABLE_UPDATE_JOIN_METHOD(8), + DISABLE_TRANSFER_ADMIN(9), + CREATING_LIVE_TALK(10); +*/ +await Line.joinSquare( + squareMid, + displayName, + ableToReceiveMessage = false, + passCode = undefined, +); +await Line.removeSubscriptions(subscriptionIds = []); +await Line.unsendSquareMessage(squareChatMid, messageId); +await Line.createSquareChat( + squareChatMid, + name, + chatImageObsHash, + squareChatType = 1, + maxMemberCount = 5000, + ableToSearchMessage = 1, + squareMemberMids = [], +); +/* + - SquareChatType: + OPEN(1), + SECRET(2), + ONE_ON_ONE(3), + SQUARE_DEFAULT(4); + - ableToSearchMessage: + NONE(0), + OFF(1), + ON(2); +*/ +await Line.getSquareChatMembers( + squareChatMid, + continuationToken = undefined, + limit = 200, +); +await Line.getSquareFeatureSet(squareMid); +await Line.getSquareInvitationTicketUrl(mid); +await Line.updateSquareChatMember( + squareMemberMid, + squareChatMid, + notificationForMessage = true, + notificationForNewMember = true, + updatedAttrs = [6], +); +/* + - SquareChatMemberAttribute: + MEMBERSHIP_STATE(4), + NOTIFICATION_MESSAGE(6), + NOTIFICATION_NEW_MEMBER(7); +*/ +await Line.updateSquareMember( + updatedAttrs = [], + updatedPreferenceAttrs = [], + squareMemberMid, + squareMid, + revision, + displayName, + membershipState, + role, +); +/* + SquareMemberAttribute: + DISPLAY_NAME(1), + PROFILE_IMAGE(2), + ABLE_TO_RECEIVE_MESSAGE(3), + MEMBERSHIP_STATE(5), + ROLE(6), + PREFERENCE(7); + SquareMembershipState: + JOIN_REQUESTED(1), + JOINED(2), + REJECTED(3), + LEFT(4), + KICK_OUT(5), + BANNED(6), + DELETED(7); +*/ +await Line.kickOutSquareMember(sid, pid); +await Line.checkSquareJoinCode(squareMid, code); +await Line.createSquareChatAnnouncement( + squareChatMid, + messageId, + text, + senderSquareMemberMid, + createdAt, + announcementType = 0, +); +await Line.getSquareMember(squareMemberMid); +await Line.searchSquareChatMembers( + squareChatMid, + displayName = "", + continuationToken, + limit = 20, +); +await Line.getSquareEmid(squareMid); +await Line.getSquareMembersBySquare(squareMid, squareMemberMids = []); +await Line.manualRepair(syncToken, limit = 100, continuationToken); +await Line.sendSquareRequestByName(METHOD_NAME, params); // send SquareRequest +// LineServise +await Line.getProfile(); +// LiffServise +await Line.issueLiffView( + chatMid, + liffId = "1562242036-RW04okm", + lang = "ja_JP", +); +// ChannelService +await Line.approveChannelAndIssueChannelToken(channelId = "1341209850"); +
      +

      イベントハンドラー

      +

      Squareでイベントハンドラーを利用できます。

      +

      fetchMyEventsのハンドラー:

      +
      const handler = (event, line) => { + console.log(event); +}; +const remove = await Line.squareEvent(handler, ?syncToken, ?interval, ?remove); +function stopRoop() { + remove.remove = true; +} +
      +

      fetchSquareChatEventsのハンドラー:

      +
      const handler = (event, line, mid) => { + console.log(event); +}; +const remove = await Line.squareChatEvent( + handler, + mid, + ?syncToken, + ?interval, + ?remove, +); +function stopRoop() { + remove.remove = true; +} +
      +

      addEventListener

      +

      addEventListenerを利用して処理することもできます。

      +

      fetchMyEventsのハンドラー:

      +
      const eventTarget = Line.getSquareEventTarget(); +eventTarget.addEventListener( + "message", + (e) => console.log(e.squareMessage.message.text), +); +eventTarget.onmessage = (e) => console.log(e.squareMessage.message.text); + +function stopRoop() { + eventTarget.remove.remove = true; +} +
      +

      fetchSquareChatEventsのハンドラー:

      +
      const eventTarget = Line.getSquareChatEventTarget(mid); +eventTarget.addEventListener( + "message", + (e) => { + console.log(e.squareMessage.message.text); + Line.sendSquareMessage( + mid, + e.squareMessage.message.text, + ); + // echo BOT + }, +); +eventTarget.onmessage = (e) => console.log(e.squareMessage.message.text); +// message は receiveMessage,sendMessage の受信時にも発火します +eventTarget.addEventListener( + "markAsRead", + (e) => console.log("既読:", e), +); + +function stopRoop() { + eventTarget.remove.remove = true; +} +
      +

      イベント名の配列は以下のコードで取得できます:

      +
      const eventNameArray = Line.parser.def.SquareEventPayload.map((e) => { + let name = e.name.replace("notified", "") + .replace("notification", ""); + name = name[0].toLowerCase() + name.substring(1); + return name; +}); +
      +

      ただし、全てのイベントが確実に発生するとは限りません。

      +

      例えば、メッセージの受信時にsquareEventTargetではmessageのみ発生しますが、squareChatEventTargetではsendMessagereceiveMessageも発生します。

      +

      また、/site/res/thrift.json|for webに記載されていないイベントではイベント名はそのfidの値になります。

      +

      Thanks

      +

      このプロジェクトは直接的、または間接的に以下の人々/プロジェクトの支援を得ました。深く感謝します。

      + +

      Licence free

      + + + diff --git a/site/tmp/icon_tale.svg b/site/res/icon_tale.svg similarity index 100% rename from site/tmp/icon_tale.svg rename to site/res/icon_tale.svg diff --git a/site/tmp/main.bdef6c38.css b/site/res/main.bdef6c38.css similarity index 100% rename from site/tmp/main.bdef6c38.css rename to site/res/main.bdef6c38.css diff --git a/site/res/thrift.json b/site/res/thrift.json new file mode 100644 index 0000000..ee80218 --- /dev/null +++ b/site/res/thrift.json @@ -0,0 +1,14958 @@ +{ + "ApplicationType": { + "16": "IOS", + "17": "IOS_RC", + "18": "IOS_BETA", + "19": "IOS_ALPHA", + "32": "ANDROID", + "33": "ANDROID_RC", + "34": "ANDROID_BETA", + "35": "ANDROID_ALPHA", + "48": "WAP", + "49": "WAP_RC", + "50": "WAP_BETA", + "51": "WAP_ALPHA", + "64": "BOT", + "65": "BOT_RC", + "66": "BOT_BETA", + "67": "BOT_ALPHA", + "80": "WEB", + "81": "WEB_RC", + "82": "WEB_BETA", + "83": "WEB_ALPHA", + "96": "DESKTOPWIN", + "97": "DESKTOPWIN_RC", + "98": "DESKTOPWIN_BETA", + "99": "DESKTOPWIN_ALPHA", + "112": "DESKTOPMAC", + "113": "DESKTOPMAC_RC", + "114": "DESKTOPMAC_BETA", + "115": "DESKTOPMAC_ALPHA", + "128": "CHANNELGW", + "129": "CHANNELGW_RC", + "130": "CHANNELGW_BETA", + "131": "CHANNELGW_ALPHA", + "144": "CHANNELCP", + "145": "CHANNELCP_RC", + "146": "CHANNELCP_BETA", + "147": "CHANNELCP_ALPHA", + "160": "WINPHONE", + "161": "WINPHONE_RC", + "162": "WINPHONE_BETA", + "163": "WINPHONE_ALPHA", + "176": "BLACKBERRY", + "177": "BLACKBERRY_RC", + "178": "BLACKBERRY_BETA", + "179": "BLACKBERRY_ALPHA", + "192": "WINMETRO", + "193": "WINMETRO_RC", + "194": "WINMETRO_BETA", + "195": "WINMETRO_ALPHA", + "208": "S40", + "209": "S40_RC", + "210": "S40_BETA", + "211": "S40_ALPHA", + "224": "CHRONO", + "225": "CHRONO_RC", + "226": "CHRONO_BETA", + "227": "CHRONO_ALPHA", + "256": "TIZEN", + "257": "TIZEN_RC", + "258": "TIZEN_BETA", + "259": "TIZEN_ALPHA", + "272": "VIRTUAL", + "288": "FIREFOXOS", + "289": "FIREFOXOS_RC", + "290": "FIREFOXOS_BETA", + "291": "FIREFOXOS_ALPHA", + "304": "IOSIPAD", + "305": "IOSIPAD_RC", + "306": "IOSIPAD_BETA", + "307": "IOSIPAD_ALPHA", + "320": "BIZIOS", + "321": "BIZIOS_RC", + "322": "BIZIOS_BETA", + "323": "BIZIOS_ALPHA", + "336": "BIZANDROID", + "337": "BIZANDROID_RC", + "338": "BIZANDROID_BETA", + "339": "BIZANDROID_ALPHA", + "352": "BIZBOT", + "353": "BIZBOT_RC", + "354": "BIZBOT_BETA", + "355": "BIZBOT_ALPHA", + "368": "CHROMEOS", + "369": "CHROMEOS_RC", + "370": "CHROMEOS_BETA", + "371": "CHROMEOS_ALPHA", + "384": "ANDROIDLITE", + "385": "ANDROIDLITE_RC", + "386": "ANDROIDLITE_BETA", + "387": "ANDROIDLITE_ALPHA", + "400": "WIN10", + "401": "WIN10_RC", + "402": "WIN10_BETA", + "403": "WIN10_ALPHA", + "416": "BIZWEB", + "417": "BIZWEB_RC", + "418": "BIZWEB_BETA", + "419": "BIZWEB_ALPHA", + "432": "DUMMYPRIMARY", + "433": "DUMMYPRIMARY_RC", + "434": "DUMMYPRIMARY_BETA", + "435": "DUMMYPRIMARY_ALPHA", + "448": "SQUARE", + "449": "SQUARE_RC", + "450": "SQUARE_BETA", + "451": "SQUARE_ALPHA", + "464": "INTERNAL", + "465": "INTERNAL_RC", + "466": "INTERNAL_BETA", + "467": "INTERNAL_ALPHA", + "480": "CLOVAFRIENDS", + "481": "CLOVAFRIENDS_RC", + "482": "CLOVAFRIENDS_BETA", + "483": "CLOVAFRIENDS_ALPHA", + "496": "WATCHOS", + "497": "WATCHOS_RC", + "498": "WATCHOS_BETA", + "499": "WATCHOS_ALPHA", + "512": "OPENCHAT_PLUG", + "513": "OPENCHAT_PLUG_RC", + "514": "OPENCHAT_PLUG_BETA", + "515": "OPENCHAT_PLUG_ALPHA", + "528": "ANDROIDSECONDARY", + "529": "ANDROIDSECONDARY_RC", + "530": "ANDROIDSECONDARY_BETA", + "531": "ANDROIDSECONDARY_ALPHA", + "544": "WEAROS", + "545": "WEAROS_RC", + "546": "WEAROS_BETA", + "547": "WEAROS_ALPHA" + }, + "ExtendedProfileAttribute": {}, + "PrivacyLevelType": { + "0": "PUBLIC", + "1": "PRIVATE" + }, + "PaidCallerIdStatus": { + "0": "NOT_SPECIFIED", + "1": "VALID", + "2": "VERIFICATION_REQUIRED", + "3": "NOT_PERMITTED", + "4": "LIMIT_EXCEEDED", + "5": "LIMIT_EXCEEDED_AND_VERIFICATION_REQUIRED" + }, + "PaidCallProductType": { + "0": "COIN", + "1": "CREDIT", + "2": "MONTHLY" + }, + "PaidCallType": { + "0": "OUT", + "1": "IN", + "2": "TOLLFREE", + "3": "RECORD", + "4": "AD", + "5": "CS" + }, + "BotType": { + "0": "RESERVED", + "1": "OFFICIAL", + "2": "LINE_AT_0", + "3": "LINE_AT" + }, + "BuddyOnAirLabel": { + "0": "ON_AIR", + "1": "LIVE", + "2": "GLP" + }, + "BuddyBannerLinkType": { + "0": "BUDDY_BANNER_LINK_HIDDEN", + "1": "BUDDY_BANNER_LINK_MID", + "2": "BUDDY_BANNER_LINK_URL" + }, + "BuddyOnAirType": { + "0": "NORMAL", + "1": "LIVE", + "2": "VOIP" + }, + "Diff": { + "0": "ADDED", + "1": "UPDATED", + "2": "REMOVED" + }, + "ReportType": { + "1": "ADVERTISING", + "2": "GENDER_HARASSMENT", + "3": "HARASSMENT", + "4": "OTHER" + }, + "SyncTriggerReason": { + "0": "UNKNOWN", + "1": "REVISION_GAP_TOO_LARGE_CLIENT", + "2": "REVISION_GAP_TOO_LARGE_SERVER", + "3": "OPERATION_EXPIRED", + "4": "REVISION_HOLE", + "5": "FORCE_TRIGGERED" + }, + "ReportCategory": { + "0": "PUSH_NORMAL_PLAIN", + "1": "PUSH_NORMAL_E2EE", + "2": "PUSH_VOIP_PLAIN", + "3": "PUSH_VOIP_E2EE" + }, + "BuddyResultState": { + "1": "ACCEPTED", + "2": "SUCCEEDED", + "3": "FAILED", + "4": "CANCELLED", + "5": "NOTIFY_FAILED", + "11": "STORING", + "21": "UPLOADING", + "31": "NOTIFYING", + "41": "REMOVING_SUBSCRIPTION", + "42": "UNREGISTERING_ACCOUNT", + "43": "NOTIFYING_LEAVE_CHAT" + }, + "BuddySearchRequestSource": { + "0": "NA", + "1": "FRIEND_VIEW", + "2": "OFFICIAL_ACCOUNT_VIEW" + }, + "CarrierCode": { + "0": "NOT_SPECIFIED", + "1": "JP_DOCOMO", + "2": "JP_AU", + "3": "JP_SOFTBANK", + "4": "JP_DOCOMO_LINE", + "17": "KR_SKT", + "18": "KR_KT", + "19": "KR_LGT" + }, + "ChannelConfiguration": { + "0": "MESSAGE", + "1": "MESSAGE_NOTIFICATION", + "2": "NOTIFICATION_CENTER" + }, + "ChannelPermission": { + "0": "PROFILE", + "1": "FRIENDS", + "2": "GROUP" + }, + "ChannelFeatureLicense": { + "26": "BLE_LCS_API_USABLE", + "27": "PROHIBIT_MINIMIZE_CHANNEL_BROWSER", + "28": "ALLOW_IOS_WEBKIT" + }, + "ChannelErrorCode": { + "0": "ILLEGAL_ARGUMENT", + "1": "INTERNAL_ERROR", + "2": "CONNECTION_ERROR", + "3": "AUTHENTICATIONI_FAILED", + "4": "NEED_PERMISSION_APPROVAL", + "5": "COIN_NOT_USABLE", + "6": "WEBVIEW_NOT_ALLOWED" + }, + "ChannelSyncType": { + "0": "SYNC", + "1": "REMOVE", + "2": "REMOVE_ALL" + }, + "LoginType": { + "0": "ID_CREDENTIAL", + "1": "QRCODE", + "2": "ID_CREDENTIAL_WITH_E2EE" + }, + "ContactAttribute": { + "1": "CONTACT_ATTRIBUTE_CAPABLE_VOICE_CALL", + "2": "CONTACT_ATTRIBUTE_CAPABLE_VIDEO_CALL", + "16": "CONTACT_ATTRIBUTE_CAPABLE_MY_HOME", + "32": "CONTACT_ATTRIBUTE_CAPABLE_BUDDY" + }, + "ContactCategory": { + "0": "NORMAL", + "1": "RECOMMEND" + }, + "ContactRelation": { + "0": "ONEWAY", + "1": "BOTH", + "2": "NOT_REGISTERED" + }, + "AsymmetricKeyAlgorithm": { + "1": "ASYMMETRIC_KEY_ALGORITHM_RSA", + "2": "ASYMMETRIC_KEY_ALGORITHM_ECDH" + }, + "ContactSetting": { + "1": "CONTACT_SETTING_NOTIFICATION_DISABLE", + "2": "CONTACT_SETTING_DISPLAY_NAME_OVERRIDE", + "4": "CONTACT_SETTING_CONTACT_HIDE", + "8": "CONTACT_SETTING_FAVORITE", + "16": "CONTACT_SETTING_DELETE" + }, + "ContactStatus": { + "0": "UNSPECIFIED", + "1": "FRIEND", + "2": "FRIEND_BLOCKED", + "3": "RECOMMEND", + "4": "RECOMMEND_BLOCKED", + "5": "DELETED", + "6": "DELETED_BLOCKED" + }, + "ContactType": { + "0": "MID", + "1": "PHONE", + "2": "EMAIL", + "3": "USERID", + "4": "PROXIMITY", + "5": "GROUP", + "6": "USER", + "7": "QRCODE", + "8": "PROMOTION_BOT", + "9": "CONTACT_MESSAGE", + "10": "FRIEND_REQUEST", + "11": "BEACON", + "128": "REPAIR", + "2305": "FACEBOOK", + "2306": "SINA", + "2307": "RENREN", + "2308": "FEIXIN", + "2309": "BBM" + }, + "GroupPreferenceAttribute": { + "1": "INVITATION_TICKET", + "2": "FAVORITE_TIMESTAMP" + }, + "ContentType": { + "0": "NONE", + "1": "IMAGE", + "2": "VIDEO", + "3": "AUDIO", + "4": "HTML", + "5": "PDF", + "6": "CALL", + "7": "STICKER", + "8": "PRESENCE", + "9": "GIFT", + "10": "GROUPBOARD", + "11": "APPLINK", + "12": "LINK", + "13": "CONTACT", + "14": "FILE", + "15": "LOCATION", + "16": "POSTNOTIFICATION", + "17": "RICH", + "18": "CHATEVENT", + "19": "MUSIC", + "20": "PAYMENT", + "21": "EXTIMAGE", + "22": "FLEX" + }, + "MessageRelationType": { + "0": "FORWARD", + "1": "AUTO_REPLY", + "2": "SUBORDINATE", + "3": "REPLY" + }, + "CustomMode": { + "1": "PROMOTION_FRIENDS_INVITE", + "2": "CAPABILITY_SERVER_SIDE_SMS", + "3": "LINE_CLIENT_ANALYTICS_CONFIGURATION" + }, + "RoomAttribute": { + "1": "NOTIFICATION_SETTING", + "255": "ALL" + }, + "UserStatus": { + "0": "NORMAL", + "1": "UNBOUND", + "2": "UNREGISTERED", + "3": "UNKNOWN" + }, + "EmailConfirmationStatus": { + "0": "NOT_SPECIFIED", + "1": "NOT_YET", + "3": "DONE", + "4": "NEED_ENFORCED_INPUT" + }, + "AccountMigrationPincodeType": { + "0": "NOT_APPLICABLE", + "1": "NOT_SET", + "2": "SET", + "3": "NEED_ENFORCED_INPUT" + }, + "AccountMigrationCheckType": { + "0": "SKIP", + "1": "PINCODE", + "2": "SECURITY_CENTER" + }, + "SecurityCenterSettingsType": { + "0": "NOT_APPLICABLE", + "1": "NOT_SET", + "2": "SET", + "3": "NEED_ENFORCED_INPUT" + }, + "EmailConfirmationType": { + "0": "SERVER_SIDE_EMAIL", + "1": "CLIENT_SIDE_EMAIL" + }, + "SquareChatAnnouncementType": {}, + "SquareChatAttribute": { + "2": "NAME", + "3": "SQUARE_CHAT_IMAGE", + "4": "STATE" + }, + "SquareMemberAttribute": { + "1": "DISPLAY_NAME", + "2": "PROFILE_IMAGE", + "3": "ABLE_TO_RECEIVE_MESSAGE", + "5": "MEMBERSHIP_STATE", + "6": "ROLE", + "7": "PREFERENCE" + }, + "SquareMemberRelationAttribute": { + "1": "BLOCKED" + }, + "SquarePreferenceAttribute": { + "1": "FAVORITE", + "2": "NOTI_FOR_NEW_JOIN_REQUEST" + }, + "SquareState": { + "0": "ALIVE", + "1": "DELETED", + "2": "SUSPENDED" + }, + "CommitMessageResultCode": { + "0": "DELIVERED", + "1": "DELIVERY_SKIPPED", + "2": "DELIVERY_RESTRICTED" + }, + "ErrorCode": { + "0": "ILLEGAL_ARGUMENT", + "1": "AUTHENTICATION_FAILED", + "2": "DB_FAILED", + "3": "INVALID_STATE", + "4": "EXCESSIVE_ACCESS", + "5": "NOT_FOUND", + "6": "INVALID_LENGTH", + "7": "NOT_AVAILABLE_USER", + "8": "NOT_AUTHORIZED_DEVICE", + "9": "INVALID_MID", + "10": "NOT_A_MEMBER", + "11": "INCOMPATIBLE_APP_VERSION", + "12": "NOT_READY", + "13": "NOT_AVAILABLE_SESSION", + "14": "NOT_AUTHORIZED_SESSION", + "15": "SYSTEM_ERROR", + "16": "NO_AVAILABLE_VERIFICATION_METHOD", + "17": "NOT_AUTHENTICATED", + "18": "INVALID_IDENTITY_CREDENTIAL", + "19": "NOT_AVAILABLE_IDENTITY_IDENTIFIER", + "20": "INTERNAL_ERROR", + "21": "NO_SUCH_IDENTITY_IDENFIER", + "22": "DEACTIVATED_ACCOUNT_BOUND_TO_THIS_IDENTITY", + "23": "ILLEGAL_IDENTITY_CREDENTIAL", + "24": "UNKNOWN_CHANNEL", + "25": "NO_SUCH_MESSAGE_BOX", + "26": "NOT_AVAILABLE_MESSAGE_BOX", + "27": "CHANNEL_DOES_NOT_MATCH", + "28": "NOT_YOUR_MESSAGE", + "29": "MESSAGE_DEFINED_ERROR", + "30": "USER_CANNOT_ACCEPT_PRESENTS", + "32": "USER_NOT_STICKER_OWNER", + "33": "MAINTENANCE_ERROR", + "34": "ACCOUNT_NOT_MATCHED", + "35": "ABUSE_BLOCK", + "36": "NOT_FRIEND", + "37": "NOT_ALLOWED_CALL", + "38": "BLOCK_FRIEND", + "39": "INCOMPATIBLE_VOIP_VERSION", + "40": "INVALID_SNS_ACCESS_TOKEN", + "41": "EXTERNAL_SERVICE_NOT_AVAILABLE", + "42": "NOT_ALLOWED_ADD_CONTACT", + "43": "NOT_CERTIFICATED", + "44": "NOT_ALLOWED_SECONDARY_DEVICE", + "45": "INVALID_PIN_CODE", + "46": "NOT_FOUND_IDENTITY_CREDENTIAL", + "47": "EXCEED_FILE_MAX_SIZE", + "48": "EXCEED_DAILY_QUOTA", + "49": "NOT_SUPPORT_SEND_FILE", + "50": "MUST_UPGRADE", + "51": "NOT_AVAILABLE_PIN_CODE_SESSION", + "52": "EXPIRED_REVISION", + "54": "NOT_YET_PHONE_NUMBER", + "55": "BAD_CALL_NUMBER", + "56": "UNAVAILABLE_CALL_NUMBER", + "57": "NOT_SUPPORT_CALL_SERVICE", + "58": "CONGESTION_CONTROL", + "59": "NO_BALANCE", + "60": "NOT_PERMITTED_CALLER_ID", + "61": "NO_CALLER_ID_LIMIT_EXCEEDED", + "62": "CALLER_ID_VERIFICATION_REQUIRED", + "63": "NO_CALLER_ID_LIMIT_EXCEEDED_AND_VERIFICATION_REQUIRED", + "64": "MESSAGE_NOT_FOUND", + "65": "INVALID_ACCOUNT_MIGRATION_PINCODE_FORMAT", + "66": "ACCOUNT_MIGRATION_PINCODE_NOT_MATCHED", + "67": "ACCOUNT_MIGRATION_PINCODE_BLOCKED", + "69": "INVALID_PASSWORD_FORMAT", + "70": "FEATURE_RESTRICTED", + "71": "MESSAGE_NOT_DESTRUCTIBLE", + "72": "PAID_CALL_REDEEM_FAILED", + "73": "PREVENTED_JOIN_BY_TICKET", + "75": "SEND_MESSAGE_NOT_PERMITTED_FROM_LINE_AT", + "76": "SEND_MESSAGE_NOT_PERMITTED_WHILE_AUTO_REPLY", + "77": "SECURITY_CENTER_NOT_VERIFIED", + "78": "SECURITY_CENTER_BLOCKED_BY_SETTING", + "79": "SECURITY_CENTER_BLOCKED", + "80": "TALK_PROXY_EXCEPTION", + "81": "E2EE_INVALID_PROTOCOL", + "82": "E2EE_RETRY_ENCRYPT", + "83": "E2EE_UPDATE_SENDER_KEY", + "84": "E2EE_UPDATE_RECEIVER_KEY", + "85": "E2EE_INVALID_ARGUMENT", + "86": "E2EE_INVALID_VERSION", + "87": "E2EE_SENDER_DISABLED", + "88": "E2EE_RECEIVER_DISABLED", + "89": "E2EE_SENDER_NOT_ALLOWED", + "90": "E2EE_RECEIVER_NOT_ALLOWED", + "91": "E2EE_RESEND_FAIL", + "92": "E2EE_RESEND_OK", + "93": "HITOKOTO_BACKUP_NO_AVAILABLE_DATA", + "94": "E2EE_UPDATE_PRIMARY_DEVICE", + "95": "SUCCESS", + "96": "CANCEL", + "97": "E2EE_PRIMARY_NOT_SUPPORT", + "98": "E2EE_RETRY_PLAIN", + "99": "E2EE_RECREATE_GROUP_KEY", + "100": "E2EE_GROUP_TOO_MANY_MEMBERS", + "101": "SERVER_BUSY", + "102": "NOT_ALLOWED_ADD_FOLLOW", + "103": "INCOMING_FRIEND_REQUEST_LIMIT", + "104": "OUTGOING_FRIEND_REQUEST_LIMIT", + "105": "OUTGOING_FRIEND_REQUEST_QUOTA", + "106": "DUPLICATED", + "107": "BANNED", + "108": "NOT_AN_INVITEE", + "109": "NOT_AN_OUTSIDER", + "111": "EMPTY_GROUP", + "112": "EXCEED_FOLLOW_LIMIT", + "113": "UNSUPPORTED_ACCOUNT_TYPE", + "114": "AGREEMENT_REQUIRED", + "115": "SHOULD_RETRY", + "116": "OVER_MAX_CHATS_PER_USER", + "117": "NOT_AVAILABLE_API", + "118": "INVALID_OTP", + "119": "MUST_REFRESH_V3_TOKEN", + "120": "ALREADY_EXPIRED", + "121": "USER_NOT_STICON_OWNER", + "122": "REFRESH_MEDIA_FLOW", + "123": "EXCEED_FOLLOWER_LIMIT" + }, + "FeatureType": { + "1": "OBS_VIDEO", + "2": "OBS_GENERAL", + "3": "OBS_RINGBACK_TONE" + }, + "GroupAttribute": { + "1": "NAME", + "2": "PICTURE_STATUS", + "4": "PREVENTED_JOIN_BY_TICKET", + "8": "NOTIFICATION_SETTING", + "255": "ALL" + }, + "IdentityProvider": { + "0": "UNKNOWN", + "1": "LINE", + "2": "NAVER_KR", + "3": "LINE_PHONE" + }, + "LoginResultType": { + "1": "SUCCESS", + "2": "REQUIRE_QRCODE", + "3": "REQUIRE_DEVICE_CONFIRM", + "4": "REQUIRE_SMS_CONFIRM" + }, + "MessageOperationType": { + "1": "SEND_MESSAGE", + "2": "RECEIVE_MESSAGE", + "3": "READ_MESSAGE", + "4": "NOTIFIED_READ_MESSAGE", + "5": "NOTIFIED_JOIN_CHAT", + "6": "FAILED_SEND_MESSAGE", + "7": "SEND_CONTENT", + "8": "SEND_CONTENT_RECEIPT", + "9": "SEND_CHAT_REMOVED", + "10": "REMOVE_ALL_MESSAGES" + }, + "MIDType": { + "0": "USER", + "1": "ROOM", + "2": "GROUP", + "3": "SQUARE", + "4": "SQUARE_CHAT", + "5": "SQUARE_MEMBER", + "6": "BOT" + }, + "ServiceCode": { + "0": "UNKNOWN", + "1": "TALK", + "2": "SQUARE" + }, + "FriendRequestDirection": { + "1": "INCOMING", + "2": "OUTGOING" + }, + "FriendRequestMethod": { + "1": "TIMELINE", + "2": "NEARBY", + "3": "SQUARE" + }, + "FriendRequestStatus": { + "0": "NONE", + "1": "AVAILABLE", + "2": "ALREADY_REQUESTED", + "3": "UNAVAILABLE" + }, + "ModificationType": { + "0": "ADD", + "1": "REMOVE", + "2": "MODIFY" + }, + "NotificationItemFetchMode": { + "0": "ALL", + "1": "APPEND" + }, + "NotificationQueueType": { + "1": "GLOBAL", + "2": "MESSAGE", + "3": "PRIMARY" + }, + "GroupCallMediaType": { + "1": "AUDIO", + "2": "VIDEO", + "3": "LIVE" + }, + "PersonalInfo": { + "0": "EMAIL", + "1": "PHONE", + "2": "BIRTHDAY", + "3": "RAW_BIRTHDAY" + }, + "NotificationStatus": { + "1": "NOTIFICATION_ITEM_EXIST", + "2": "TIMELINE_ITEM_EXIST", + "4": "NOTE_GROUP_NEW_ITEM_EXIST", + "8": "TIMELINE_BUDDYGROUP_CHANGED", + "16": "NOTE_ONE_TO_ONE_NEW_ITEM_EXIST", + "32": "ALBUM_ITEM_EXIST", + "64": "TIMELINE_ITEM_DELETED", + "128": "OTOGROUP_ITEM_EXIST", + "256": "GROUPHOME_NEW_ITEM_EXIST", + "512": "GROUPHOME_HIDDEN_ITEM_CHANGED", + "1024": "NOTIFICATION_ITEM_CHANGED", + "2048": "BEAD_ITEM_HIDE", + "4096": "BEAD_ITEM_SHOW", + "8192": "LINE_TICKET_UPDATED", + "16384": "TIMELINE_STORY_UPDATED", + "32768": "SMARTCH_UPDATED", + "65536": "AVATAR_UPDATED", + "131072": "HOME_NOTIFICATION_ITEM_EXIST", + "262144": "TIMELINE_REBOOT_COMPLETED", + "524288": "TIMELINE_GUIDE_STORY_UPDATED" + }, + "NotificationType": { + "1": "APPLE_APNS", + "2": "GOOGLE_C2DM", + "3": "NHN_NNI", + "4": "SKT_AOM", + "5": "MS_MPNS", + "6": "RIM_BIS", + "7": "GOOGLE_GCM", + "8": "NOKIA_NNAPI", + "9": "TIZEN", + "10": "MOZILLA_SIMPLE", + "17": "LINE_BOT", + "18": "LINE_WAP", + "19": "APPLE_APNS_VOIP", + "20": "MS_WNS", + "21": "GOOGLE_FCM", + "22": "CLOVA", + "23": "CLOVA_VOIP", + "24": "HUAWEI_HCM" + }, + "OpStatus": { + "0": "NORMAL", + "1": "ALERT_DISABLED", + "2": "ALWAYS" + }, + "OpType": { + "0": "END_OF_OPERATION", + "1": "UPDATE_PROFILE", + "2": "NOTIFIED_UPDATE_PROFILE", + "3": "REGISTER_USERID", + "4": "ADD_CONTACT", + "5": "NOTIFIED_ADD_CONTACT", + "6": "BLOCK_CONTACT", + "7": "UNBLOCK_CONTACT", + "8": "NOTIFIED_RECOMMEND_CONTACT", + "9": "CREATE_GROUP", + "10": "UPDATE_GROUP", + "11": "NOTIFIED_UPDATE_GROUP", + "12": "INVITE_INTO_GROUP", + "13": "NOTIFIED_INVITE_INTO_GROUP", + "14": "LEAVE_GROUP", + "15": "NOTIFIED_LEAVE_GROUP", + "16": "ACCEPT_GROUP_INVITATION", + "17": "NOTIFIED_ACCEPT_GROUP_INVITATION", + "18": "KICKOUT_FROM_GROUP", + "19": "NOTIFIED_KICKOUT_FROM_GROUP", + "20": "CREATE_ROOM", + "21": "INVITE_INTO_ROOM", + "22": "NOTIFIED_INVITE_INTO_ROOM", + "23": "LEAVE_ROOM", + "24": "NOTIFIED_LEAVE_ROOM", + "25": "SEND_MESSAGE", + "26": "RECEIVE_MESSAGE", + "27": "SEND_MESSAGE_RECEIPT", + "28": "RECEIVE_MESSAGE_RECEIPT", + "29": "SEND_CONTENT_RECEIPT", + "30": "RECEIVE_ANNOUNCEMENT", + "31": "CANCEL_INVITATION_GROUP", + "32": "NOTIFIED_CANCEL_INVITATION_GROUP", + "33": "NOTIFIED_UNREGISTER_USER", + "34": "REJECT_GROUP_INVITATION", + "35": "NOTIFIED_REJECT_GROUP_INVITATION", + "36": "UPDATE_SETTINGS", + "37": "NOTIFIED_REGISTER_USER", + "38": "INVITE_VIA_EMAIL", + "39": "NOTIFIED_REQUEST_RECOVERY", + "40": "SEND_CHAT_CHECKED", + "41": "SEND_CHAT_REMOVED", + "42": "NOTIFIED_FORCE_SYNC", + "43": "SEND_CONTENT", + "44": "SEND_MESSAGE_MYHOME", + "45": "NOTIFIED_UPDATE_CONTENT_PREVIEW", + "46": "REMOVE_ALL_MESSAGES", + "47": "NOTIFIED_UPDATE_PURCHASES", + "48": "DUMMY", + "49": "UPDATE_CONTACT", + "50": "NOTIFIED_RECEIVED_CALL", + "51": "CANCEL_CALL", + "52": "NOTIFIED_REDIRECT", + "53": "NOTIFIED_CHANNEL_SYNC", + "54": "FAILED_SEND_MESSAGE", + "55": "NOTIFIED_READ_MESSAGE", + "56": "FAILED_EMAIL_CONFIRMATION", + "58": "NOTIFIED_CHAT_CONTENT", + "59": "NOTIFIED_PUSH_NOTICENTER_ITEM", + "60": "NOTIFIED_JOIN_CHAT", + "61": "NOTIFIED_LEAVE_CHAT", + "62": "NOTIFIED_TYPING", + "63": "FRIEND_REQUEST_ACCEPTED", + "64": "DESTROY_MESSAGE", + "65": "NOTIFIED_DESTROY_MESSAGE", + "66": "UPDATE_PUBLICKEYCHAIN", + "67": "NOTIFIED_UPDATE_PUBLICKEYCHAIN", + "68": "NOTIFIED_BLOCK_CONTACT", + "69": "NOTIFIED_UNBLOCK_CONTACT", + "70": "UPDATE_GROUPPREFERENCE", + "71": "NOTIFIED_PAYMENT_EVENT", + "72": "REGISTER_E2EE_PUBLICKEY", + "73": "NOTIFIED_E2EE_KEY_EXCHANGE_REQ", + "74": "NOTIFIED_E2EE_KEY_EXCHANGE_RESP", + "75": "NOTIFIED_E2EE_MESSAGE_RESEND_REQ", + "76": "NOTIFIED_E2EE_MESSAGE_RESEND_RESP", + "77": "NOTIFIED_E2EE_KEY_UPDATE", + "78": "NOTIFIED_BUDDY_UPDATE_PROFILE", + "79": "NOTIFIED_UPDATE_LINEAT_TABS", + "80": "UPDATE_ROOM", + "81": "NOTIFIED_BEACON_DETECTED", + "82": "UPDATE_EXTENDED_PROFILE", + "83": "ADD_FOLLOW", + "84": "NOTIFIED_ADD_FOLLOW", + "85": "DELETE_FOLLOW", + "86": "NOTIFIED_DELETE_FOLLOW", + "87": "UPDATE_TIMELINE_SETTINGS", + "88": "NOTIFIED_FRIEND_REQUEST", + "89": "UPDATE_RINGBACK_TONE", + "90": "NOTIFIED_POSTBACK", + "91": "RECEIVE_READ_WATERMARK", + "92": "NOTIFIED_MESSAGE_DELIVERED", + "93": "NOTIFIED_UPDATE_CHAT_BAR", + "94": "NOTIFIED_CHATAPP_INSTALLED", + "95": "NOTIFIED_CHATAPP_UPDATED", + "96": "NOTIFIED_CHATAPP_NEW_MARK", + "97": "NOTIFIED_CHATAPP_DELETED", + "98": "NOTIFIED_CHATAPP_SYNC", + "99": "NOTIFIED_UPDATE_MESSAGE", + "100": "UPDATE_CHATROOMBGM", + "101": "NOTIFIED_UPDATE_CHATROOMBGM", + "102": "UPDATE_RINGTONE", + "118": "UPDATE_USER_SETTINGS", + "119": "NOTIFIED_UPDATE_STATUS_BAR", + "120": "CREATE_CHAT", + "121": "UPDATE_CHAT", + "122": "NOTIFIED_UPDATE_CHAT", + "123": "INVITE_INTO_CHAT", + "124": "NOTIFIED_INVITE_INTO_CHAT", + "125": "CANCEL_CHAT_INVITATION", + "126": "NOTIFIED_CANCEL_CHAT_INVITATION", + "127": "DELETE_SELF_FROM_CHAT", + "128": "NOTIFIED_DELETE_SELF_FROM_CHAT", + "129": "ACCEPT_CHAT_INVITATION", + "130": "NOTIFIED_ACCEPT_CHAT_INVITATION", + "131": "REJECT_CHAT_INVITATION", + "132": "DELETE_OTHER_FROM_CHAT", + "133": "NOTIFIED_DELETE_OTHER_FROM_CHAT", + "134": "NOTIFIED_CONTACT_CALENDAR_EVENT", + "135": "NOTIFIED_CONTACT_CALENDAR_EVENT_ALL", + "136": "UPDATE_THINGS_OPERATIONS", + "137": "SEND_CHAT_HIDDEN", + "138": "CHAT_META_SYNC_ALL", + "139": "SEND_REACTION", + "140": "NOTIFIED_SEND_REACTION", + "141": "NOTIFIED_UPDATE_PROFILE_CONTENT", + "142": "FAILED_DELIVERY_MESSAGE" + }, + "PayloadType": { + "101": "PAYLOAD_BUY", + "111": "PAYLOAD_CS", + "121": "PAYLOAD_BONUS", + "131": "PAYLOAD_EVENT" + }, + "PaymentPgType": { + "0": "PAYMENT_PG_NONE", + "1": "PAYMENT_PG_AU", + "2": "PAYMENT_PG_AL" + }, + "PaymentType": { + "1": "PAYMENT_APPLE", + "2": "PAYMENT_GOOGLE" + }, + "ProductBannerLinkType": { + "0": "BANNER_LINK_NONE", + "1": "BANNER_LINK_ITEM", + "2": "BANNER_LINK_URL", + "3": "BANNER_LINK_CATEGORY" + }, + "ProductEventType": { + "0": "NO_EVENT", + "65537": "CARRIER_ANY", + "131073": "BUDDY_ANY", + "196609": "INSTALL_IOS", + "196610": "INSTALL_ANDROID", + "262145": "MISSION_ANY", + "327681": "MUSTBUY_ANY" + }, + "StickerResourceType": { + "1": "STATIC", + "2": "ANIMATION", + "3": "SOUND", + "4": "ANIMATION_SOUND", + "5": "POPUP", + "6": "POPUP_SOUND", + "7": "NAME_TEXT", + "8": "PER_STICKER_TEXT" + }, + "PlaceSearchProvider": { + "0": "GOOGLE", + "1": "BAIDU", + "2": "FOURSQUARE" + }, + "PointErrorCode": { + "3001": "REQUEST_DUPLICATION", + "3002": "INVALID_PARAMETER", + "3003": "NOT_ENOUGH_BALANCE", + "3004": "AUTHENTICATION_FAIL", + "3005": "API_ACCESS_FORBIDDEN", + "3006": "MEMBER_ACCOUNT_NOT_FOUND", + "3007": "SERVICE_ACCOUNT_NOT_FOUND", + "3008": "TRANSACTION_NOT_FOUND", + "3009": "ALREADY_REVERSED_TRANSACTION", + "3010": "MESSAGE_NOT_READABLE", + "3011": "HTTP_REQUEST_METHOD_NOT_SUPPORTED", + "3012": "HTTP_MEDIA_TYPE_NOT_SUPPORTED", + "3013": "NOT_ALLOWED_TO_DEPOSIT", + "3014": "NOT_ALLOWED_TO_PAY", + "3015": "TRANSACTION_ACCESS_FORBIDDEN", + "4001": "INVALID_SERVICE_CONFIGURATION", + "5004": "DCS_COMMUNICATION_FAIL", + "5007": "UPDATE_BALANCE_FAIL", + "5888": "SYSTEM_MAINTENANCE", + "5999": "SYSTEM_ERROR" + }, + "ProfileAttribute": { + "1": "EMAIL", + "2": "DISPLAY_NAME", + "4": "PHONETIC_NAME", + "8": "PICTURE", + "16": "STATUS_MESSAGE", + "32": "ALLOW_SEARCH_BY_USERID", + "64": "ALLOW_SEARCH_BY_EMAIL", + "128": "BUDDY_STATUS", + "256": "MUSIC_PROFILE", + "511": "ALL" + }, + "PublicType": { + "0": "HIDDEN", + "1000": "PUBLIC" + }, + "RedirectType": { + "0": "NONE", + "1": "EXPIRE_SECOND" + }, + "RegistrationType": { + "0": "PHONE", + "1": "EMAIL_WAP", + "2305": "FACEBOOK", + "2306": "SINA", + "2307": "RENREN", + "2308": "FEIXIN" + }, + "ChatRoomAnnouncementType": { + "0": "MESSAGE", + "1": "NOTE" + }, + "SettingsAttribute": { + "1": "NOTIFICATION_ENABLE", + "2": "NOTIFICATION_MUTE_EXPIRATION", + "4": "NOTIFICATION_NEW_MESSAGE", + "8": "NOTIFICATION_GROUP_INVITATION", + "16": "NOTIFICATION_SHOW_MESSAGE", + "32": "NOTIFICATION_INCOMING_CALL", + "64": "PRIVACY_SYNC_CONTACTS", + "128": "PRIVACY_SEARCH_BY_PHONE_NUMBER", + "256": "NOTIFICATION_SOUND_MESSAGE", + "512": "NOTIFICATION_SOUND_GROUP", + "1024": "CONTACT_MY_TICKET", + "2048": "IDENTITY_PROVIDER", + "4096": "IDENTITY_IDENTIFIER", + "8192": "PRIVACY_SEARCH_BY_USERID", + "16384": "PRIVACY_SEARCH_BY_EMAIL", + "32768": "PREFERENCE_LOCALE", + "65536": "NOTIFICATION_DISABLED_WITH_SUB", + "131072": "NOTIFICATION_PAYMENT", + "262144": "SECURITY_CENTER_SETTINGS", + "524288": "SNS_ACCOUNT", + "1048576": "PHONE_REGISTRATION", + "2097152": "PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN", + "4194304": "CUSTOM_MODE", + "8388608": "PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME", + "16777216": "EMAIL_CONFIRMATION_STATUS", + "33554432": "PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND", + "67108864": "PRIVACY_AGREE_USE_LINECOIN_TO_PAIDCALL", + "134217728": "PRIVACY_AGREE_USE_PAIDCALL", + "268435456": "ACCOUNT_MIGRATION_PINCODE", + "536870912": "ENFORCED_INPUT_ACCOUNT_MIGRATION_PINCODE", + "1073741824": "PRIVACY_ALLOW_FRIEND_REQUEST", + "2147483647": "ALL" + }, + "SettingsAttributeEx": { + "0": "NOTIFICATION_ENABLE", + "1": "NOTIFICATION_MUTE_EXPIRATION", + "2": "NOTIFICATION_NEW_MESSAGE", + "3": "NOTIFICATION_GROUP_INVITATION", + "4": "NOTIFICATION_SHOW_MESSAGE", + "5": "NOTIFICATION_INCOMING_CALL", + "6": "PRIVACY_SYNC_CONTACTS", + "7": "PRIVACY_SEARCH_BY_PHONE_NUMBER", + "8": "NOTIFICATION_SOUND_MESSAGE", + "9": "NOTIFICATION_SOUND_GROUP", + "10": "CONTACT_MY_TICKET", + "11": "IDENTITY_PROVIDER", + "12": "IDENTITY_IDENTIFIER", + "13": "PRIVACY_SEARCH_BY_USERID", + "14": "PRIVACY_SEARCH_BY_EMAIL", + "15": "PREFERENCE_LOCALE", + "16": "NOTIFICATION_DISABLED_WITH_SUB", + "17": "NOTIFICATION_PAYMENT", + "18": "SECURITY_CENTER_SETTINGS", + "19": "SNS_ACCOUNT", + "20": "PHONE_REGISTRATION", + "21": "PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN", + "22": "CUSTOM_MODE", + "23": "PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME", + "24": "EMAIL_CONFIRMATION_STATUS", + "25": "PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND", + "26": "PRIVACY_AGREE_USE_LINECOIN_TO_PAIDCALL", + "27": "PRIVACY_AGREE_USE_PAIDCALL", + "28": "ACCOUNT_MIGRATION_PINCODE", + "29": "ENFORCED_INPUT_ACCOUNT_MIGRATION_PINCODE", + "30": "PRIVACY_ALLOW_FRIEND_REQUEST", + "33": "E2EE_ENABLE", + "34": "HITOKOTO_BACKUP_REQUESTED", + "35": "PRIVACY_PROFILE_MUSIC_POST_TO_MYHOME", + "36": "CONTACT_ALLOW_FOLLOWING", + "37": "PRIVACY_ALLOW_NEARBY", + "38": "AGREEMENT_NEARBY", + "39": "AGREEMENT_SQUARE", + "40": "NOTIFICATION_MENTION", + "41": "ALLOW_UNREGISTRATION_SECONDARY_DEVICE", + "42": "AGREEMENT_BOT_USE", + "43": "AGREEMENT_SHAKE_FUNCTION", + "44": "AGREEMENT_MOBILE_CONTACT_NAME", + "45": "NOTIFICATION_THUMBNAIL", + "46": "AGREEMENT_SOUND_TO_TEXT", + "47": "ENABLE_SOUND_TO_TEXT" + }, + "SnsIdType": { + "1": "FACEBOOK", + "2": "SINA", + "3": "RENREN", + "4": "FEIXIN", + "5": "BBM", + "6": "APPLE", + "7": "YAHOOJAPAN" + }, + "SpammerReason": { + "0": "OTHER", + "1": "ADVERTISING", + "2": "GENDER_HARASSMENT", + "3": "HARASSMENT" + }, + "SyncActionType": { + "0": "SYNC", + "1": "REPORT" + }, + "SpotCategory": { + "0": "UNKNOWN", + "1": "GOURMET", + "2": "BEAUTY", + "3": "TRAVEL", + "4": "SHOPPING", + "5": "ENTERTAINMENT", + "6": "SPORTS", + "7": "TRANSPORT", + "8": "LIFE", + "9": "HOSPITAL", + "10": "FINANCE", + "11": "EDUCATION", + "12": "OTHER", + "10000": "ALL" + }, + "SyncCategory": { + "0": "PROFILE", + "1": "SETTINGS", + "2": "OPS", + "3": "CONTACT", + "4": "RECOMMEND", + "5": "BLOCK", + "6": "GROUP", + "7": "ROOM", + "8": "NOTIFICATION", + "9": "ADDRESS_BOOK" + }, + "TMessageBoxStatus": { + "1": "ACTIVATED", + "2": "UNREAD" + }, + "UniversalNotificationServiceErrorCode": { + "0": "INTERNAL_ERROR", + "1": "INVALID_KEY", + "2": "ILLEGAL_ARGUMENT", + "3": "TOO_MANY_REQUEST", + "4": "AUTHENTICATION_FAILED", + "5": "NO_WRITE_PERMISSION" + }, + "UnregistrationReason": { + "1": "UNREGISTRATION_REASON_UNREGISTER_USER", + "2": "UNREGISTRATION_REASON_UNBIND_DEVICE" + }, + "UserAgeType": { + "1": "OVER", + "2": "UNDER", + "3": "UNDEFINED" + }, + "VerificationMethod": { + "0": "NO_AVAILABLE", + "1": "PIN_VIA_SMS", + "2": "CALLERID_INDIGO", + "4": "PIN_VIA_TTS", + "10": "SKIP" + }, + "VerificationResult": { + "0": "FAILED", + "1": "OK_NOT_REGISTERED_YET", + "2": "OK_REGISTERED_WITH_SAME_DEVICE", + "3": "OK_REGISTERED_WITH_ANOTHER_DEVICE" + }, + "WapInvitationType": { + "1": "REGISTRATION", + "2": "CHAT" + }, + "MediaType": { + "1": "AUDIO", + "2": "VIDEO" + }, + "SQErrorCode": { + "0": "UNKNOWN", + "400": "ILLEGAL_ARGUMENT", + "401": "AUTHENTICATION_FAILURE", + "403": "FORBIDDEN", + "404": "NOT_FOUND", + "409": "REVISION_MISMATCH", + "410": "PRECONDITION_FAILED", + "500": "INTERNAL_ERROR", + "501": "NOT_IMPLEMENTED", + "505": "TRY_AGAIN_LATER" + }, + "SquareEventType": { + "0": "RECEIVE_MESSAGE", + "1": "SEND_MESSAGE", + "2": "NOTIFIED_JOIN_SQUARE_CHAT", + "3": "NOTIFIED_INVITE_INTO_SQUARE_CHAT", + "4": "NOTIFIED_LEAVE_SQUARE_CHAT", + "5": "NOTIFIED_DESTROY_MESSAGE", + "6": "NOTIFIED_MARK_AS_READ", + "7": "NOTIFIED_UPDATE_SQUARE_MEMBER_PROFILE", + "8": "NOTIFIED_UPDATE_SQUARE", + "9": "NOTIFIED_UPDATE_SQUARE_STATUS", + "10": "NOTIFIED_UPDATE_SQUARE_AUTHORITY", + "11": "NOTIFIED_UPDATE_SQUARE_MEMBER", + "12": "NOTIFIED_UPDATE_SQUARE_CHAT", + "13": "NOTIFIED_UPDATE_SQUARE_CHAT_STATUS", + "14": "NOTIFIED_UPDATE_SQUARE_CHAT_MEMBER", + "15": "NOTIFIED_CREATE_SQUARE_MEMBER", + "16": "NOTIFIED_CREATE_SQUARE_CHAT_MEMBER", + "17": "NOTIFIED_UPDATE_SQUARE_MEMBER_RELATION", + "18": "NOTIFIED_SHUTDOWN_SQUARE", + "19": "NOTIFIED_KICKOUT_FROM_SQUARE", + "20": "NOTIFIED_DELETE_SQUARE_CHAT", + "21": "NOTIFICATION_JOIN_REQUEST", + "22": "NOTIFICATION_JOINED", + "23": "NOTIFICATION_PROMOTED_COADMIN", + "24": "NOTIFICATION_PROMOTED_ADMIN", + "25": "NOTIFICATION_DEMOTED_MEMBER", + "26": "NOTIFICATION_KICKED_OUT", + "27": "NOTIFICATION_SQUARE_DELETE", + "28": "NOTIFICATION_SQUARE_CHAT_DELETE", + "29": "NOTIFICATION_MESSAGE", + "30": "NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_NAME", + "31": "NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_IMAGE", + "32": "NOTIFIED_UPDATE_SQUARE_FEATURE_SET", + "33": "NOTIFIED_ADD_BOT", + "34": "NOTIFIED_REMOVE_BOT", + "36": "NOTIFIED_UPDATE_SQUARE_NOTE_STATUS", + "37": "NOTIFIED_UPDATE_SQUARE_CHAT_ANNOUNCEMENT", + "38": "NOTIFIED_UPDATE_SQUARE_CHAT_MAX_MEMBER_COUNT", + "39": "NOTIFICATION_POST_ANNOUNCEMENT", + "40": "NOTIFICATION_POST", + "41": "MUTATE_MESSAGE", + "42": "NOTIFICATION_NEW_CHAT_MEMBER", + "43": "NOTIFIED_UPDATE_READONLY_CHAT", + "46": "NOTIFIED_UPDATE_MESSAGE_STATUS", + "47": "NOTIFICATION_MESSAGE_REACTION", + "48": "NOTIFIED_CHAT_POPUP", + "49": "NOTIFIED_SYSTEM_MESSAGE", + "50": "NOTIFIED_UPDATE_SQUARE_CHAT_FEATURE_SET" + }, + "SquareMemberRelationState": { + "1": "NONE", + "2": "BLOCKED" + }, + "SquareFeatureControlState": { + "1": "DISABLED", + "2": "ENABLED" + }, + "BooleanState": { + "0": "NONE", + "1": "OFF", + "2": "ON" + }, + "SquareType": { + "0": "CLOSED", + "1": "OPEN" + }, + "SquareChatType": { + "1": "OPEN", + "2": "SECRET", + "3": "ONE_ON_ONE", + "4": "SQUARE_DEFAULT" + }, + "SquareErrorCode": { + "0": "UNKNOWN", + "400": "ILLEGAL_ARGUMENT", + "401": "AUTHENTICATION_FAILURE", + "403": "FORBIDDEN", + "404": "NOT_FOUND", + "409": "REVISION_MISMATCH", + "410": "PRECONDITION_FAILED", + "500": "INTERNAL_ERROR", + "501": "NOT_IMPLEMENTED", + "503": "TRY_AGAIN_LATER", + "505": "MAINTENANCE", + "506": "NO_PRESENCE_EXISTS" + }, + "SquareChatState": { + "0": "ALIVE", + "1": "DELETED", + "2": "SUSPENDED" + }, + "SquareFeatureSetAttribute": { + "1": "CREATING_SECRET_SQUARE_CHAT", + "2": "INVITING_INTO_OPEN_SQUARE_CHAT" + }, + "SquareMembershipState": { + "1": "JOIN_REQUESTED", + "2": "JOINED", + "3": "REJECTED", + "4": "LEFT", + "5": "KICK_OUT", + "6": "BANNED", + "7": "DELETED" + }, + "SquareChatMemberAttribute": { + "4": "MEMBERSHIP_STATE", + "6": "NOTIFICATION_MESSAGE" + }, + "SquareMemberRole": { + "1": "ADMIN", + "2": "CO_ADMIN", + "10": "MEMBER" + }, + "PreconditionFailedExtraInfo": { + "0": "DUPLICATED_DISPLAY_NAME" + }, + "SquareChatMembershipState": { + "1": "JOINED", + "2": "LEFT" + }, + "FetchDirection": { + "1": "FORWARD", + "2": "BACKWARD" + }, + "SquareAttribute": { + "1": "NAME", + "2": "WELCOME_MESSAGE", + "3": "PROFILE_IMAGE", + "4": "DESCRIPTION", + "6": "SEARCHABLE", + "7": "CATEGORY", + "8": "INVITATION_URL", + "9": "ABLE_TO_USE_INVITATION_URL", + "10": "STATE" + }, + "SquareAuthorityAttribute": { + "1": "UPDATE_SQUARE_PROFILE", + "2": "INVITE_NEW_MEMBER", + "3": "APPROVE_JOIN_REQUEST", + "4": "CREATE_POST", + "5": "CREATE_OPEN_SQUARE_CHAT", + "6": "DELETE_SQUARE_CHAT_OR_POST", + "7": "REMOVE_SQUARE_MEMBER", + "8": "GRANT_ROLE", + "9": "ENABLE_INVITATION_TICKET", + "10": "CREATE_CHAT_ANNOUNCEMENT" + }, + "SquareEventStatus": { + "1": "NORMAL", + "2": "ALERT_DISABLED" + }, + "Location": [ + { + "fid": 1, + "name": "title", + "type": 11 + }, + { + "fid": 2, + "name": "address", + "type": 11 + }, + { + "fid": 3, + "name": "latitude", + "type": 4 + }, + { + "fid": 4, + "name": "longitude", + "type": 4 + }, + { + "fid": 5, + "name": "phone", + "type": 11 + }, + { + "fid": 6, + "name": "categoryId", + "type": 11 + }, + { + "fid": 7, + "name": "provider", + "struct": "PlaceSearchProvider" + }, + { + "fid": 8, + "name": "accuracy", + "struct": "GeolocationAccuracy" + }, + { + "fid": 9, + "name": "altitudeMeters", + "type": 4 + } + ], + "MessageBoxV2MessageId": [ + { + "fid": 1, + "name": "deliveredTime", + "type": 10 + }, + { + "fid": 2, + "name": "messageId", + "type": 10 + } + ], + "MessageCommitResult": [ + { + "fid": 1, + "name": "requestId", + "type": 11 + }, + { + "fid": 2, + "name": "state", + "struct": "BuddyResultState" + }, + { + "fid": 3, + "name": "messageStoreRequestId", + "type": 11 + }, + { + "fid": 4, + "name": "messageIds", + "list": 11 + }, + { + "fid": 11, + "name": "receiverCount", + "type": 10 + }, + { + "fid": 12, + "name": "successCount", + "type": 10 + }, + { + "fid": 13, + "name": "failCount", + "type": 10 + }, + { + "fid": 14, + "name": "blockCount", + "type": 10 + }, + { + "fid": 15, + "name": "unregisteredCount", + "type": 10 + }, + { + "fid": 16, + "name": "unrelatedCount", + "type": 10 + }, + { + "fid": 21, + "name": "errorDescription", + "type": 11 + } + ], + "CallHost": [ + { + "fid": 1, + "name": "host", + "type": 11 + }, + { + "fid": 2, + "name": "port", + "type": 8 + }, + { + "fid": 3, + "name": "zone", + "type": 11 + } + ], + "AgeCheckDocomoResult": [ + { + "fid": 1, + "name": "authUrl", + "type": 11 + }, + { + "fid": 2, + "name": "userAgeType", + "struct": "UserAgeType" + } + ], + "AgeCheckRequestResult": [ + { + "fid": 1, + "name": "authUrl", + "type": 11 + }, + { + "fid": 2, + "name": "sessionId", + "type": 11 + } + ], + "TextMessageAnnouncementContents": [ + { + "fid": 1, + "name": "messageId", + "type": 11 + }, + { + "fid": 2, + "name": "text", + "type": 11 + }, + { + "fid": 3, + "name": "senderSquareMemberMid", + "type": 11 + }, + { + "fid": 4, + "name": "createdAt", + "type": 10 + }, + { + "fid": 5, + "name": "senderMid", + "type": 11 + } + ], + "SquareChatAnnouncementContents": [ + { + "fid": 1, + "name": "textMessageAnnouncementContents", + "struct": "TextMessageAnnouncementContents" + } + ], + "SquareChatAnnouncement": [ + { + "fid": 1, + "name": "announcementSeq", + "type": 10 + }, + { + "fid": 2, + "name": "type", + "struct": "SquareChatAnnouncementType" + }, + { + "fid": 3, + "name": "contents", + "struct": "SquareChatAnnouncementContents" + }, + { + "fid": 4, + "name": "createdAt", + "type": 10 + }, + { + "fid": 5, + "name": "creator", + "type": 11 + } + ], + "Announcement": [ + { + "fid": 1, + "name": "index", + "type": 8 + }, + { + "fid": 10, + "name": "forceUpdate", + "type": 2 + }, + { + "fid": 11, + "name": "title", + "type": 11 + }, + { + "fid": 12, + "name": "text", + "type": 11 + }, + { + "fid": 13, + "name": "createdTime", + "type": 10 + }, + { + "fid": 14, + "name": "pictureUrl", + "type": 11 + }, + { + "fid": 15, + "name": "thumbnailUrl", + "type": 11 + } + ], + "ChannelProvider": [ + { + "fid": 1, + "name": "name", + "type": 11 + } + ], + "E2EEPublicKey": [ + { + "fid": 1, + "name": "version", + "type": 8 + }, + { + "fid": 2, + "name": "keyId", + "type": 8 + }, + { + "fid": 4, + "name": "keyData" + }, + { + "fid": 5, + "name": "createdTime", + "type": 10 + } + ], + "ChannelDomain": [ + { + "fid": 1, + "name": "host", + "type": 11 + }, + { + "fid": 2, + "name": "removed", + "type": 2 + } + ], + "E2EENegotiationResult": [ + { + "fid": 1, + "name": "allowedTypes", + "set": "ContentType" + }, + { + "fid": 2, + "name": "publicKey", + "struct": "E2EEPublicKey" + }, + { + "fid": 3, + "name": "specVersion", + "type": 8 + } + ], + "OTPResult": [ + { + "fid": 1, + "name": "otpId", + "type": 11 + }, + { + "fid": 2, + "name": "otp", + "type": 11 + } + ], + "Square": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "name", + "type": 11 + }, + { + "fid": 3, + "name": "welcomeMessage", + "type": 11 + }, + { + "fid": 4, + "name": "profileImageObsHash", + "type": 11 + }, + { + "fid": 5, + "name": "desc", + "type": 11 + }, + { + "fid": 6, + "name": "searchable", + "type": 2 + }, + { + "fid": 7, + "name": "type", + "struct": "SquareType" + }, + { + "fid": 8, + "name": "categoryId", + "type": 8 + }, + { + "fid": 9, + "name": "invitationURL", + "type": 11 + }, + { + "fid": 10, + "name": "revision", + "type": 10 + }, + { + "fid": 11, + "name": "ableToUseInvitationTicket", + "type": 2 + }, + { + "fid": 12, + "name": "state", + "struct": "SquareState" + }, + { + "fid": 13, + "name": "emblems", + "list": "SquareEmblem" + }, + { + "fid": 14, + "name": "joinMethod", + "struct": "SquareJoinMethod" + }, + { + "fid": 15, + "name": "adultOnly", + "struct": "BooleanState" + }, + { + "fid": 16, + "name": "svcTags", + "list": 11 + }, + { + "fid": 17, + "name": "createdAt", + "type": 10 + } + ], + "SquareAuthority": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "updateSquareProfile", + "struct": "SquareMemberRole" + }, + { + "fid": 3, + "name": "inviteNewMember", + "struct": "SquareMemberRole" + }, + { + "fid": 4, + "name": "approveJoinRequest", + "struct": "SquareMemberRole" + }, + { + "fid": 5, + "name": "createPost", + "struct": "SquareMemberRole" + }, + { + "fid": 6, + "name": "createOpenSquareChat", + "struct": "SquareMemberRole" + }, + { + "fid": 7, + "name": "deleteSquareChatOrPost", + "struct": "SquareMemberRole" + }, + { + "fid": 8, + "name": "removeSquareMember", + "struct": "SquareMemberRole" + }, + { + "fid": 9, + "name": "grantRole", + "struct": "SquareMemberRole" + }, + { + "fid": 10, + "name": "enableInvitationTicket", + "struct": "SquareMemberRole" + }, + { + "fid": 11, + "name": "revision", + "type": 10 + }, + { + "fid": 12, + "name": "createSquareChatAnnouncement", + "struct": "SquareMemberRole" + }, + { + "fid": 13, + "name": "updateMaxChatMemberCount", + "struct": "SquareMemberRole" + }, + { + "fid": 14, + "name": "useReadonlyDefaultChat", + "struct": "SquareMemberRole" + } + ], + "SquarePreference": [ + { + "fid": 1, + "name": "favoriteTimestamp", + "type": 10 + }, + { + "fid": 2, + "name": "notiForNewJoinRequest", + "type": 2 + } + ], + "SquareMember": [ + { + "fid": 1, + "name": "squareMemberMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "displayName", + "type": 11 + }, + { + "fid": 4, + "name": "profileImageObsHash", + "type": 11 + }, + { + "fid": 5, + "name": "ableToReceiveMessage", + "type": 2 + }, + { + "fid": 7, + "name": "membershipState", + "struct": "SquareMembershipState" + }, + { + "fid": 8, + "name": "role", + "struct": "SquareMemberRole" + }, + { + "fid": 9, + "name": "revision", + "type": 10 + }, + { + "fid": 10, + "name": "preference", + "struct": "SquarePreference" + }, + { + "fid": 11, + "name": "joinMessage", + "type": 11 + } + ], + "SquareMemberRelation": [ + { + "fid": 1, + "name": "state", + "struct": "SquareMemberRelationState" + }, + { + "fid": 2, + "name": "revision", + "type": 10 + } + ], + "SquareFeature": [ + { + "fid": 1, + "name": "controlState", + "struct": "SquareFeatureControlState" + }, + { + "fid": 2, + "name": "booleanValue", + "struct": "BooleanState" + } + ], + "SquareFeatureSet": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "revision", + "type": 10 + }, + { + "fid": 11, + "name": "creatingSecretSquareChat", + "struct": "SquareFeature" + }, + { + "fid": 12, + "name": "invitingIntoOpenSquareChat", + "struct": "SquareFeature" + }, + { + "fid": 13, + "name": "creatingSquareChat", + "struct": "SquareFeature" + }, + { + "fid": 14, + "name": "readonlyDefaultChat", + "struct": "SquareFeature" + }, + { + "fid": 15, + "name": "showingAdvertisement", + "struct": "SquareFeature" + }, + { + "fid": 16, + "name": "delegateJoinToPlug", + "struct": "SquareFeature" + }, + { + "fid": 17, + "name": "delegateKickOutToPlug", + "struct": "SquareFeature" + }, + { + "fid": 18, + "name": "disableUpdateJoinMethod", + "struct": "SquareFeature" + }, + { + "fid": 19, + "name": "disableTransferAdmin", + "struct": "SquareFeature" + }, + { + "fid": 20, + "name": "creatingLiveTalk", + "struct": "SquareFeature" + }, + { + "fid": 21, + "name": "disableUpdateSearchable", + "struct": "SquareFeature" + } + ], + "SquareStatus": [ + { + "fid": 1, + "name": "memberCount", + "type": 8 + }, + { + "fid": 2, + "name": "joinRequestCount", + "type": 8 + }, + { + "fid": 3, + "name": "lastJoinRequestAt", + "type": 10 + }, + { + "fid": 4, + "name": "openChatCount", + "type": 8 + } + ], + "SquareChat": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "type", + "struct": "SquareChatType" + }, + { + "fid": 4, + "name": "name", + "type": 11 + }, + { + "fid": 5, + "name": "chatImageObsHash", + "type": 11 + }, + { + "fid": 6, + "name": "squareChatRevision", + "type": 10 + }, + { + "fid": 7, + "name": "maxMemberCount", + "type": 8 + }, + { + "fid": 8, + "name": "state", + "struct": "SquareChatState" + }, + { + "fid": 9, + "name": "invitationUrl", + "type": 11 + }, + { + "fid": 10, + "name": "messageVisibility", + "struct": "MessageVisibility" + }, + { + "fid": 11, + "name": "ableToSearchMessage", + "struct": "BooleanState" + } + ], + "NoteStatus": [ + { + "fid": 1, + "name": "noteCount", + "type": 8 + }, + { + "fid": 2, + "name": "latestCreatedAt", + "type": 10 + } + ], + "SquareInfo": [ + { + "fid": 1, + "name": "square", + "struct": "Square" + }, + { + "fid": 2, + "name": "squareStatus", + "struct": "SquareStatus" + }, + { + "fid": 3, + "name": "squareNoteStatus", + "struct": "NoteStatus" + } + ], + "BotUseInfo": [ + { + "fid": 1, + "name": "botUseAgreementAccepted", + "type": 2 + }, + { + "fid": 2, + "name": "botInFriends", + "type": 2 + }, + { + "fid": 3, + "name": "primaryApplication", + "type": 11 + }, + { + "fid": 4, + "name": "locale", + "type": 11 + } + ], + "PaidCallAdCountry": [ + { + "fid": 1, + "name": "countryCode", + "type": 11 + }, + { + "fid": 2, + "name": "rateDivision", + "type": 11 + } + ], + "PaidCallAdResult": [ + { + "fid": 1, + "name": "adRemains", + "type": 8 + } + ], + "PaidCallBalance": [ + { + "fid": 1, + "name": "productType", + "struct": "PaidCallProductType" + }, + { + "fid": 2, + "name": "productName", + "type": 11 + }, + { + "fid": 3, + "name": "unit", + "type": 11 + }, + { + "fid": 4, + "name": "limitedPaidBalance", + "type": 8 + }, + { + "fid": 5, + "name": "limitedFreeBalance", + "type": 8 + }, + { + "fid": 6, + "name": "unlimitedPaidBalance", + "type": 8 + }, + { + "fid": 7, + "name": "unlimitedFreeBalance", + "type": 8 + }, + { + "fid": 8, + "name": "startTime", + "type": 10 + }, + { + "fid": 9, + "name": "endTime", + "type": 10 + }, + { + "fid": 10, + "name": "autopayEnabled", + "type": 2 + } + ], + "PaidCallCurrencyExchangeRate": [ + { + "fid": 1, + "name": "currencyCode", + "type": 11 + }, + { + "fid": 2, + "name": "currencyName", + "type": 11 + }, + { + "fid": 3, + "name": "currencySign", + "type": 11 + }, + { + "fid": 4, + "name": "preferred", + "type": 2 + }, + { + "fid": 5, + "name": "coinRate", + "type": 11 + }, + { + "fid": 6, + "name": "creditRate", + "type": 11 + } + ], + "ExtendedProfileBirthday": [ + { + "fid": 1, + "name": "year", + "type": 11 + }, + { + "fid": 2, + "name": "yearPrivacyLevelType", + "struct": "PrivacyLevelType" + }, + { + "fid": 3, + "name": "yearEnabled", + "type": 2 + }, + { + "fid": 5, + "name": "day", + "type": 11 + }, + { + "fid": 6, + "name": "dayPrivacyLevelType", + "struct": "PrivacyLevelType" + }, + { + "fid": 7, + "name": "dayEnabled", + "type": 2 + } + ], + "ExtendedProfile": [ + { + "fid": 1, + "name": "birthday", + "struct": "ExtendedProfileBirthday" + } + ], + "PaidCallDialing": [ + { + "fid": 1, + "name": "type", + "struct": "PaidCallType" + }, + { + "fid": 2, + "name": "dialedNumber", + "type": 11 + }, + { + "fid": 3, + "name": "serviceDomain", + "type": 11 + }, + { + "fid": 4, + "name": "productType", + "struct": "PaidCallProductType" + }, + { + "fid": 5, + "name": "productName", + "type": 11 + }, + { + "fid": 6, + "name": "multipleProduct", + "type": 2 + }, + { + "fid": 7, + "name": "callerIdStatus", + "struct": "PaidCallerIdStatus" + }, + { + "fid": 10, + "name": "balance", + "type": 8 + }, + { + "fid": 11, + "name": "unit", + "type": 11 + }, + { + "fid": 12, + "name": "rate", + "type": 8 + }, + { + "fid": 13, + "name": "displayCode", + "type": 11 + }, + { + "fid": 14, + "name": "calledNumber", + "type": 11 + }, + { + "fid": 15, + "name": "calleeNationalNumber", + "type": 11 + }, + { + "fid": 16, + "name": "calleeCallingCode", + "type": 11 + }, + { + "fid": 17, + "name": "rateDivision", + "type": 11 + }, + { + "fid": 20, + "name": "adMaxMin", + "type": 8 + }, + { + "fid": 21, + "name": "adRemains", + "type": 8 + }, + { + "fid": 22, + "name": "adSessionId", + "type": 11 + } + ], + "SpotItem": [ + { + "fid": 2, + "name": "name", + "type": 11 + }, + { + "fid": 3, + "name": "phone", + "type": 11 + }, + { + "fid": 4, + "name": "category", + "struct": "SpotCategory" + }, + { + "fid": 5, + "name": "mid", + "type": 11 + }, + { + "fid": 6, + "name": "countryAreaCode", + "type": 11 + }, + { + "fid": 10, + "name": "freePhoneCallable", + "type": 2 + } + ], + "SpotNearbyItem": [ + { + "fid": 2, + "name": "spotItem", + "struct": "SpotItem" + }, + { + "fid": 11, + "name": "location", + "struct": "Location" + } + ], + "SpotNearbyResponse": [ + { + "fid": 1, + "name": "spotNearbyItems", + "list": "SpotNearbyItem" + } + ], + "SpotPhoneNumberResponse": [ + { + "fid": 1, + "name": "spotItems", + "list": "SpotItem" + } + ], + "PaidCallHistory": [ + { + "fid": 1, + "name": "seq", + "type": 10 + }, + { + "fid": 2, + "name": "type", + "struct": "PaidCallType" + }, + { + "fid": 3, + "name": "dialedNumber", + "type": 11 + }, + { + "fid": 4, + "name": "calledNumber", + "type": 11 + }, + { + "fid": 5, + "name": "toMid", + "type": 11 + }, + { + "fid": 6, + "name": "toName", + "type": 11 + }, + { + "fid": 7, + "name": "setupTime", + "type": 10 + }, + { + "fid": 8, + "name": "startTime", + "type": 10 + }, + { + "fid": 9, + "name": "endTime", + "type": 10 + }, + { + "fid": 10, + "name": "duration", + "type": 10 + }, + { + "fid": 11, + "name": "terminate", + "type": 8 + }, + { + "fid": 12, + "name": "productType", + "struct": "PaidCallProductType" + }, + { + "fid": 13, + "name": "charge", + "type": 8 + }, + { + "fid": 14, + "name": "unit", + "type": 11 + }, + { + "fid": 15, + "name": "result", + "type": 11 + } + ], + "PaidCallHistoryResult": [ + { + "fid": 1, + "name": "historys", + "list": "PaidCallHistory" + }, + { + "fid": 2, + "name": "hasNext", + "type": 2 + } + ], + "PaidCallMetadataResult": [ + { + "fid": 1, + "name": "currencyExchangeRates", + "list": "PaidCallCurrencyExchangeRate" + }, + { + "fid": 2, + "name": "recommendedCountryCodes", + "list": 11 + }, + { + "fid": 3, + "name": "adCountries", + "list": "PaidCallAdCountry" + } + ], + "PaidCallRedeemResult": [ + { + "fid": 1, + "name": "eventName", + "type": 11 + }, + { + "fid": 2, + "name": "eventAmount", + "type": 8 + } + ], + "PaidCallResponse": [ + { + "fid": 1, + "name": "host", + "struct": "CallHost" + }, + { + "fid": 2, + "name": "dialing", + "struct": "PaidCallDialing" + }, + { + "fid": 3, + "name": "token", + "type": 11 + }, + { + "fid": 4, + "name": "spotItems", + "list": "SpotItem" + } + ], + "PaidCallUserRate": [ + { + "fid": 1, + "name": "countryCode", + "type": 11 + }, + { + "fid": 2, + "name": "rate", + "type": 8 + }, + { + "fid": 3, + "name": "rateDivision", + "type": 11 + }, + { + "fid": 4, + "name": "rateName", + "type": 11 + } + ], + "ChannelInfo": [ + { + "fid": 1, + "name": "channelId", + "type": 11 + }, + { + "fid": 3, + "name": "name", + "type": 11 + }, + { + "fid": 4, + "name": "entryPageUrl", + "type": 11 + }, + { + "fid": 5, + "name": "descriptionText", + "type": 11 + }, + { + "fid": 6, + "name": "provider", + "struct": "ChannelProvider" + }, + { + "fid": 7, + "name": "publicType", + "struct": "PublicType" + }, + { + "fid": 8, + "name": "iconImage", + "type": 11 + }, + { + "fid": 9, + "name": "permissions", + "list": 11 + }, + { + "fid": 11, + "name": "iconThumbnailImage", + "type": 11 + }, + { + "fid": 12, + "name": "channelConfigurations", + "list": "ChannelConfiguration" + }, + { + "fid": 13, + "name": "lcsAllApiUsable", + "type": 2 + }, + { + "fid": 14, + "name": "allowedPermissions", + "set": "ChannelPermission" + }, + { + "fid": 15, + "name": "channelDomains", + "list": "ChannelDomain" + }, + { + "fid": 16, + "name": "updatedTimestamp", + "type": 10 + } + ], + "ApprovedChannelInfo": [ + { + "fid": 1, + "name": "channelInfo", + "struct": "ChannelInfo" + }, + { + "fid": 2, + "name": "approvedAt", + "type": 10 + } + ], + "ApprovedChannelInfos": [ + { + "fid": 1, + "name": "approvedChannelInfos", + "list": "ApprovedChannelInfo" + }, + { + "fid": 2, + "name": "revision", + "type": 10 + } + ], + "AuthQrcode": [ + { + "fid": 1, + "name": "qrcode", + "type": 11 + }, + { + "fid": 2, + "name": "verifier", + "type": 11 + }, + { + "fid": 3, + "name": "callbackUrl", + "type": 11 + } + ], + "AnalyticsInfo": [ + { + "fid": 1, + "name": "gaSamplingRate", + "type": 4 + }, + { + "fid": 2, + "name": "tmid", + "type": 11 + } + ], + "ContactTransition": [ + { + "fid": 1, + "name": "ownerMid", + "type": 11 + }, + { + "fid": 2, + "name": "targetMid", + "type": 11 + }, + { + "fid": 3, + "name": "previousStatus", + "struct": "ContactStatus" + }, + { + "fid": 4, + "name": "resultStatus", + "struct": "ContactStatus" + } + ], + "UserTicketResponse": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "userTicket", + "type": 11 + } + ], + "BuddyBanner": [ + { + "fid": 1, + "name": "buddyBannerLinkType", + "struct": "BuddyBannerLinkType" + }, + { + "fid": 2, + "name": "buddyBannerLink", + "type": 11 + }, + { + "fid": 3, + "name": "buddyBannerImageUrl", + "type": 11 + } + ], + "BuddyDetail": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "memberCount", + "type": 10 + }, + { + "fid": 3, + "name": "onAir", + "type": 2 + }, + { + "fid": 4, + "name": "businessAccount", + "type": 2 + }, + { + "fid": 5, + "name": "addable", + "type": 2 + }, + { + "fid": 6, + "name": "acceptableContentTypes", + "set": "ContentType" + }, + { + "fid": 7, + "name": "capableMyhome", + "type": 2 + }, + { + "fid": 8, + "name": "freePhoneCallable", + "type": 2 + }, + { + "fid": 9, + "name": "phoneNumberToDial", + "type": 11 + }, + { + "fid": 10, + "name": "needPermissionApproval", + "type": 2 + }, + { + "fid": 11, + "name": "channelId", + "type": 11 + }, + { + "fid": 12, + "name": "channelProviderName", + "type": 11 + }, + { + "fid": 13, + "name": "iconType", + "type": 8 + }, + { + "fid": 14, + "name": "botType", + "struct": "BotType" + }, + { + "fid": 15, + "name": "showRichMenu", + "type": 2 + }, + { + "fid": 16, + "name": "richMenuRevision", + "type": 10 + }, + { + "fid": 17, + "name": "onAirLabel", + "struct": "BuddyOnAirLabel" + }, + { + "fid": 18, + "name": "useTheme", + "type": 2 + }, + { + "fid": 19, + "name": "themeId", + "type": 11 + }, + { + "fid": 20, + "name": "useBar", + "type": 2 + }, + { + "fid": 21, + "name": "barRevision", + "type": 10 + }, + { + "fid": 22, + "name": "useBackground", + "type": 2 + }, + { + "fid": 23, + "name": "backgroundId", + "type": 11 + }, + { + "fid": 24, + "name": "statusBarEnabled", + "type": 2 + }, + { + "fid": 25, + "name": "statusBarRevision", + "type": 10 + }, + { + "fid": 26, + "name": "searchId", + "type": 11 + }, + { + "fid": 27, + "name": "onAirVersion", + "type": 8 + }, + { + "fid": 28, + "name": "blockable", + "type": 2 + }, + { + "fid": 29, + "name": "botActiveStatus", + "struct": "BuddyBotActiveStatus" + }, + { + "fid": 30, + "name": "membershipEnabled", + "type": 2 + } + ], + "Contact": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "createdTime", + "type": 10 + }, + { + "fid": 10, + "name": "type", + "struct": "ContactType" + }, + { + "fid": 11, + "name": "status", + "struct": "ContactStatus" + }, + { + "fid": 21, + "name": "relation", + "struct": "ContactRelation" + }, + { + "fid": 22, + "name": "displayName", + "type": 11 + }, + { + "fid": 23, + "name": "phoneticName", + "type": 11 + }, + { + "fid": 24, + "name": "pictureStatus", + "type": 11 + }, + { + "fid": 25, + "name": "thumbnailUrl", + "type": 11 + }, + { + "fid": 26, + "name": "statusMessage", + "type": 11 + }, + { + "fid": 27, + "name": "displayNameOverridden", + "type": 11 + }, + { + "fid": 28, + "name": "favoriteTime", + "type": 10 + }, + { + "fid": 31, + "name": "capableVoiceCall", + "type": 2 + }, + { + "fid": 32, + "name": "capableVideoCall", + "type": 2 + }, + { + "fid": 33, + "name": "capableMyhome", + "type": 2 + }, + { + "fid": 34, + "name": "capableBuddy", + "type": 2 + }, + { + "fid": 35, + "name": "attributes", + "type": 8 + }, + { + "fid": 36, + "name": "settings", + "type": 10 + }, + { + "fid": 37, + "name": "picturePath", + "type": 11 + }, + { + "fid": 38, + "name": "recommendParams", + "type": 11 + }, + { + "fid": 39, + "name": "friendRequestStatus", + "struct": "FriendRequestStatus" + }, + { + "fid": 40, + "name": "musicProfile", + "type": 11 + }, + { + "fid": 42, + "name": "videoProfile", + "type": 11 + }, + { + "fid": 43, + "name": "statusMessageContentMetadata", + "map": 11 + }, + { + "fid": 44, + "name": "avatarProfile", + "struct": "AvatarProfile" + }, + { + "fid": 45, + "name": "friendRingtone", + "type": 11 + }, + { + "fid": 46, + "name": "friendRingbackTone", + "type": 11 + }, + { + "fid": 47, + "name": "nftProfile", + "type": 2 + }, + { + "fid": 48, + "name": "pictureSource", + "struct": "PictureSource" + } + ], + "BuddyList": [ + { + "fid": 1, + "name": "classification", + "type": 11 + }, + { + "fid": 2, + "name": "displayName", + "type": 11 + }, + { + "fid": 3, + "name": "totalBuddyCount", + "type": 8 + }, + { + "fid": 4, + "name": "popularContacts", + "list": "Contact" + } + ], + "RegisterWithPhoneNumberResult": [ + { + "fid": 1, + "name": "authToken", + "type": 11 + }, + { + "fid": 2, + "name": "recommendEmailRegistration", + "type": 2 + }, + { + "fid": 3, + "name": "certificate", + "type": 11 + } + ], + "BuddyMessageRequest": [ + { + "fid": 1, + "name": "contentType", + "struct": "ContentType" + }, + { + "fid": 2, + "name": "text", + "type": 11 + }, + { + "fid": 3, + "name": "location", + "struct": "Location" + }, + { + "fid": 4, + "name": "content" + }, + { + "fid": 5, + "name": "contentMetadata", + "map": 11 + } + ], + "BuddyOnAirUrls": [ + { + "fid": 1, + "name": "hls", + "map": 11 + }, + { + "fid": 2, + "name": "smoothStreaming", + "map": 11 + } + ], + "BuddyOnAir": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 3, + "name": "freshnessLifetime", + "type": 10 + }, + { + "fid": 4, + "name": "onAirId", + "type": 11 + }, + { + "fid": 5, + "name": "onAir", + "type": 2 + }, + { + "fid": 11, + "name": "text", + "type": 11 + }, + { + "fid": 12, + "name": "viewerCount", + "type": 10 + }, + { + "fid": 13, + "name": "targetCount", + "type": 10 + }, + { + "fid": 31, + "name": "onAirType", + "struct": "BuddyOnAirType" + }, + { + "fid": 32, + "name": "onAirUrls", + "struct": "BuddyOnAirUrls" + } + ], + "BuddyProfile": [ + { + "fid": 1, + "name": "buddyId", + "type": 11 + }, + { + "fid": 2, + "name": "mid", + "type": 11 + }, + { + "fid": 3, + "name": "searchId", + "type": 11 + }, + { + "fid": 4, + "name": "displayName", + "type": 11 + }, + { + "fid": 5, + "name": "statusMessage", + "type": 11 + }, + { + "fid": 11, + "name": "contactCount", + "type": 10 + } + ], + "CommitMessageResult": [ + { + "fid": 1, + "name": "message", + "struct": "Message" + }, + { + "fid": 2, + "name": "code", + "struct": "CommitMessageResultCode" + }, + { + "fid": 3, + "name": "reason", + "type": 11 + }, + { + "fid": 4, + "name": "successCount", + "type": 10 + }, + { + "fid": 5, + "name": "failCount", + "type": 10 + }, + { + "fid": 6, + "name": "unregisterCount", + "type": 10 + }, + { + "fid": 7, + "name": "blockCount", + "type": 10 + } + ], + "BuddySearchResult": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "displayName", + "type": 11 + }, + { + "fid": 3, + "name": "pictureStatus", + "type": 11 + }, + { + "fid": 4, + "name": "picturePath", + "type": 11 + }, + { + "fid": 5, + "name": "statusMessage", + "type": 11 + }, + { + "fid": 6, + "name": "businessAccount", + "type": 2 + } + ], + "SyncParamMid": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "diff", + "struct": "Diff" + }, + { + "fid": 3, + "name": "revision", + "type": 10 + } + ], + "SIMInfo": [ + { + "fid": 1, + "name": "phoneNumber", + "type": 11 + }, + { + "fid": 2, + "name": "countryCode", + "type": 11 + } + ], + "SyncParamContact": [ + { + "fid": 1, + "name": "syncParamMid", + "struct": "SyncParamMid" + }, + { + "fid": 2, + "name": "contactStatus", + "struct": "ContactStatus" + } + ], + "ChannelDomains": [ + { + "fid": 1, + "name": "channelDomains", + "list": "ChannelDomain" + }, + { + "fid": 2, + "name": "revision", + "type": 10 + } + ], + "ProductCategory": [ + { + "fid": 1, + "name": "productCategoryId", + "type": 10 + }, + { + "fid": 2, + "name": "title", + "type": 11 + }, + { + "fid": 3, + "name": "productCount", + "type": 8 + }, + { + "fid": 4, + "name": "newFlag", + "type": 2 + } + ], + "ChannelInfos": [ + { + "fid": 1, + "name": "channelInfos", + "list": "ChannelInfo" + }, + { + "fid": 2, + "name": "revision", + "type": 10 + } + ], + "ChannelNotificationSetting": [ + { + "fid": 1, + "name": "channelId", + "type": 11 + }, + { + "fid": 2, + "name": "name", + "type": 11 + }, + { + "fid": 3, + "name": "notificationReceivable", + "type": 2 + }, + { + "fid": 4, + "name": "messageReceivable", + "type": 2 + }, + { + "fid": 5, + "name": "showDefault", + "type": 2 + } + ], + "ChannelSyncDatas": [ + { + "fid": 1, + "name": "channelInfos", + "list": "ChannelInfo" + }, + { + "fid": 2, + "name": "channelDomains", + "list": "ChannelDomain" + }, + { + "fid": 3, + "name": "revision", + "type": 10 + }, + { + "fid": 4, + "name": "expires", + "type": 10 + } + ], + "NotiCenterEventData": [ + { + "fid": 1, + "name": "id", + "type": 11 + }, + { + "fid": 2, + "name": "to", + "type": 11 + }, + { + "fid": 3, + "name": "from_", + "type": 11 + }, + { + "fid": 4, + "name": "toChannel", + "type": 11 + }, + { + "fid": 5, + "name": "fromChannel", + "type": 11 + }, + { + "fid": 6, + "name": "eventType", + "type": 11 + }, + { + "fid": 7, + "name": "createdTime", + "type": 10 + }, + { + "fid": 8, + "name": "operationRevision", + "type": 10 + }, + { + "fid": 9, + "name": "content", + "map": 11 + }, + { + "fid": 10, + "name": "push", + "map": 11 + } + ], + "ChannelToken": [ + { + "fid": 1, + "name": "token", + "type": 11 + }, + { + "fid": 2, + "name": "obsToken", + "type": 11 + }, + { + "fid": 3, + "name": "expiration", + "type": 10 + }, + { + "fid": 4, + "name": "refreshToken", + "type": 11 + }, + { + "fid": 5, + "name": "channelAccessToken", + "type": 11 + } + ], + "ChannelSettings": [ + { + "fid": 1, + "name": "unapprovedMessageReceivable", + "type": 2 + } + ], + "ChannelIdWithLastUpdated": [ + { + "fid": 1, + "name": "channelId", + "type": 11 + }, + { + "fid": 2, + "name": "lastUpdated", + "type": 10 + } + ], + "Coin": [ + { + "fid": 1, + "name": "freeCoinBalance", + "type": 8 + }, + { + "fid": 2, + "name": "payedCoinBalance", + "type": 8 + }, + { + "fid": 3, + "name": "totalCoinBalance", + "type": 8 + }, + { + "fid": 4, + "name": "rewardCoinBalance", + "type": 8 + } + ], + "CoinPayLoad": [ + { + "fid": 1, + "name": "payCoin", + "type": 8 + }, + { + "fid": 2, + "name": "freeCoin", + "type": 8 + }, + { + "fid": 3, + "name": "type", + "struct": "PayloadType" + }, + { + "fid": 4, + "name": "rewardCoin", + "type": 8 + } + ], + "CoinHistory": [ + { + "fid": 1, + "name": "payDate", + "type": 10 + }, + { + "fid": 2, + "name": "coinBalance", + "type": 8 + }, + { + "fid": 3, + "name": "coin", + "type": 8 + }, + { + "fid": 4, + "name": "price", + "type": 11 + }, + { + "fid": 5, + "name": "title", + "type": 11 + }, + { + "fid": 6, + "name": "refund", + "type": 2 + }, + { + "fid": 7, + "name": "paySeq", + "type": 11 + }, + { + "fid": 8, + "name": "currency", + "type": 11 + }, + { + "fid": 9, + "name": "currencySign", + "type": 11 + }, + { + "fid": 10, + "name": "displayPrice", + "type": 11 + }, + { + "fid": 11, + "name": "payload", + "struct": "CoinPayLoad" + }, + { + "fid": 12, + "name": "channelId", + "type": 11 + } + ], + "CoinHistoryCondition": [ + { + "fid": 1, + "name": "start", + "type": 10 + }, + { + "fid": 2, + "name": "size", + "type": 8 + }, + { + "fid": 3, + "name": "language", + "type": 11 + }, + { + "fid": 4, + "name": "eddt", + "type": 11 + }, + { + "fid": 5, + "name": "appStoreCode", + "struct": "PaymentType" + } + ], + "CoinHistoryResult": [ + { + "fid": 1, + "name": "historys", + "list": "CoinHistory" + }, + { + "fid": 2, + "name": "balance", + "struct": "Coin" + }, + { + "fid": 3, + "name": "hasNext", + "type": 2 + } + ], + "CoinProductItem": [ + { + "fid": 1, + "name": "itemId", + "type": 11 + }, + { + "fid": 2, + "name": "coin", + "type": 8 + }, + { + "fid": 3, + "name": "freeCoin", + "type": 8 + }, + { + "fid": 5, + "name": "currency", + "type": 11 + }, + { + "fid": 6, + "name": "price", + "type": 11 + }, + { + "fid": 7, + "name": "displayPrice", + "type": 11 + }, + { + "fid": 8, + "name": "name", + "type": 11 + }, + { + "fid": 9, + "name": "desc", + "type": 11 + } + ], + "CoinPurchaseConfirm": [ + { + "fid": 1, + "name": "orderId", + "type": 11 + }, + { + "fid": 2, + "name": "appStoreCode", + "struct": "PaymentType" + }, + { + "fid": 3, + "name": "receipt", + "type": 11 + }, + { + "fid": 4, + "name": "signature", + "type": 11 + }, + { + "fid": 5, + "name": "seller", + "type": 11 + }, + { + "fid": 6, + "name": "requestType", + "type": 11 + }, + { + "fid": 7, + "name": "ignoreReceipt", + "type": 2 + } + ], + "CoinPurchaseReservation": [ + { + "fid": 1, + "name": "productId", + "type": 11 + }, + { + "fid": 2, + "name": "country", + "type": 11 + }, + { + "fid": 3, + "name": "currency", + "type": 11 + }, + { + "fid": 4, + "name": "price", + "type": 11 + }, + { + "fid": 5, + "name": "appStoreCode", + "struct": "PaymentType" + }, + { + "fid": 6, + "name": "language", + "type": 11 + }, + { + "fid": 7, + "name": "pgCode", + "struct": "PaymentPgType" + }, + { + "fid": 8, + "name": "redirectUrl", + "type": 11 + } + ], + "CoinUseReservationItem": [ + { + "fid": 1, + "name": "itemId", + "type": 11 + }, + { + "fid": 2, + "name": "itemName", + "type": 11 + }, + { + "fid": 3, + "name": "amount", + "type": 8 + } + ], + "CoinUseReservation": [ + { + "fid": 1, + "name": "channelId", + "type": 11 + }, + { + "fid": 2, + "name": "shopOrderId", + "type": 11 + }, + { + "fid": 3, + "name": "appStoreCode", + "struct": "PaymentType" + }, + { + "fid": 4, + "name": "items", + "list": "CoinUseReservationItem" + }, + { + "fid": 5, + "name": "country", + "type": 11 + } + ], + "CompactContact": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "createdTime", + "type": 10 + }, + { + "fid": 3, + "name": "modifiedTime", + "type": 10 + }, + { + "fid": 4, + "name": "status", + "struct": "ContactStatus" + }, + { + "fid": 5, + "name": "settings", + "type": 10 + }, + { + "fid": 6, + "name": "displayNameOverridden", + "type": 11 + } + ], + "ContactModification": [ + { + "fid": 1, + "name": "type", + "struct": "ModificationType" + }, + { + "fid": 2, + "name": "luid", + "type": 11 + }, + { + "fid": 11, + "name": "phones", + "list": 11 + }, + { + "fid": 12, + "name": "emails", + "list": 11 + }, + { + "fid": 13, + "name": "userids", + "list": 11 + } + ], + "ContactRegistration": [ + { + "fid": 1, + "name": "contact", + "struct": "Contact" + }, + { + "fid": 10, + "name": "luid", + "type": 11 + }, + { + "fid": 11, + "name": "contactType", + "struct": "ContactType" + }, + { + "fid": 12, + "name": "contactKey", + "type": 11 + } + ], + "ContactReport": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "exists", + "type": 2 + }, + { + "fid": 3, + "name": "contact", + "struct": "Contact" + } + ], + "ContactReportResult": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "exists", + "type": 2 + } + ], + "DeviceInfo": [ + { + "fid": 1, + "name": "deviceName", + "type": 11 + }, + { + "fid": 2, + "name": "systemName", + "type": 11 + }, + { + "fid": 3, + "name": "systemVersion", + "type": 11 + }, + { + "fid": 4, + "name": "model", + "type": 11 + }, + { + "fid": 10, + "name": "carrierCode", + "struct": "CarrierCode" + }, + { + "fid": 11, + "name": "carrierName", + "type": 11 + }, + { + "fid": 20, + "name": "applicationType", + "struct": "ApplicationType" + } + ], + "EmailConfirmation": [ + { + "fid": 1, + "name": "usePasswordSet", + "type": 2 + }, + { + "fid": 2, + "name": "email", + "type": 11 + }, + { + "fid": 3, + "name": "password", + "type": 11 + }, + { + "fid": 4, + "name": "ignoreDuplication", + "type": 2 + } + ], + "EmailConfirmationSession": [ + { + "fid": 1, + "name": "emailConfirmationType", + "struct": "EmailConfirmationType" + }, + { + "fid": 2, + "name": "verifier", + "type": 11 + }, + { + "fid": 3, + "name": "targetEmail", + "type": 11 + } + ], + "FriendChannelMatrix": [ + { + "fid": 1, + "name": "channelId", + "type": 11 + }, + { + "fid": 2, + "name": "representMid", + "type": 11 + }, + { + "fid": 3, + "name": "count", + "type": 8 + }, + { + "fid": 4, + "name": "point", + "type": 8 + } + ], + "FriendChannelMatricesResponse": [ + { + "fid": 1, + "name": "expires", + "type": 10 + }, + { + "fid": 2, + "name": "matrices", + "list": "FriendChannelMatrix" + } + ], + "FriendRequest": [ + { + "fid": 1, + "name": "eMid", + "type": 11 + }, + { + "fid": 2, + "name": "mid", + "type": 11 + }, + { + "fid": 3, + "name": "direction", + "struct": "FriendRequestDirection" + }, + { + "fid": 4, + "name": "method", + "struct": "FriendRequestMethod" + }, + { + "fid": 5, + "name": "param", + "type": 11 + }, + { + "fid": 6, + "name": "timestamp", + "type": 10 + }, + { + "fid": 7, + "name": "seqId", + "type": 10 + }, + { + "fid": 10, + "name": "displayName", + "type": 11 + }, + { + "fid": 11, + "name": "picturePath", + "type": 11 + }, + { + "fid": 12, + "name": "pictureStatus", + "type": 11 + } + ], + "FriendRequestsInfo": [ + { + "fid": 1, + "name": "totalIncomingCount", + "type": 8 + }, + { + "fid": 2, + "name": "totalOutgoingCount", + "type": 8 + }, + { + "fid": 3, + "name": "recentIncomings", + "list": "FriendRequest" + }, + { + "fid": 4, + "name": "recentOutgoings", + "list": "FriendRequest" + }, + { + "fid": 5, + "name": "totalIncomingLimit", + "type": 8 + }, + { + "fid": 6, + "name": "totalOutgoingLimit", + "type": 8 + } + ], + "Geolocation": [ + { + "fid": 1, + "name": "longitude", + "type": 4 + }, + { + "fid": 2, + "name": "latitude", + "type": 4 + } + ], + "NotificationTarget": [ + { + "fid": 1, + "name": "applicationType", + "type": 11 + }, + { + "fid": 2, + "name": "applicationVersion", + "type": 11 + }, + { + "fid": 3, + "name": "region", + "type": 11 + } + ], + "GlobalEvent": [ + { + "fid": 1, + "name": "type", + "struct": "GlobalEventType" + }, + { + "fid": 2, + "name": "minDelayInMinutes", + "type": 8 + }, + { + "fid": 3, + "name": "maxDelayInMinutes", + "type": 8 + }, + { + "fid": 4, + "name": "createTimeMillis", + "type": 10 + }, + { + "fid": 5, + "name": "maxDelayHardLimit", + "type": 2 + } + ], + "GroupPreference": [ + { + "fid": 1, + "name": "invitationTicket", + "type": 11 + }, + { + "fid": 2, + "name": "favoriteTimestamp", + "type": 10 + } + ], + "Group": [ + { + "fid": 1, + "name": "id", + "type": 11 + }, + { + "fid": 2, + "name": "createdTime", + "type": 10 + }, + { + "fid": 10, + "name": "name", + "type": 11 + }, + { + "fid": 11, + "name": "pictureStatus", + "type": 11 + }, + { + "fid": 12, + "name": "preventedJoinByTicket", + "type": 2 + }, + { + "fid": 13, + "name": "groupPreference", + "struct": "GroupPreference" + }, + { + "fid": 20, + "name": "members", + "list": "Contact" + }, + { + "fid": 21, + "name": "creator", + "struct": "Contact" + }, + { + "fid": 22, + "name": "invitee", + "list": "Contact" + }, + { + "fid": 31, + "name": "notificationDisabled", + "type": 2 + } + ], + "IdentityCredential": [ + { + "fid": 1, + "name": "provider", + "struct": "IdentityProvider" + }, + { + "fid": 2, + "name": "identifier", + "type": 11 + }, + { + "fid": 3, + "name": "password", + "type": 11 + } + ], + "LastReadMessageId": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "lastReadMessageId", + "type": 11 + } + ], + "LastReadMessageIds": [ + { + "fid": 1, + "name": "chatId", + "type": 11 + }, + { + "fid": 2, + "name": "lastReadMessageIds", + "list": "LastReadMessageId" + } + ], + "VerificationSessionData": [ + { + "fid": 1, + "name": "sessionId", + "type": 11 + }, + { + "fid": 2, + "name": "method", + "struct": "VerificationMethod" + }, + { + "fid": 3, + "name": "callback", + "type": 11 + }, + { + "fid": 4, + "name": "normalizedPhone", + "type": 11 + }, + { + "fid": 5, + "name": "countryCode", + "type": 11 + }, + { + "fid": 6, + "name": "nationalSignificantNumber", + "type": 11 + }, + { + "fid": 7, + "name": "availableVerificationMethods", + "list": "VerificationMethod" + }, + { + "fid": 8, + "name": "callerIdMask", + "type": 11 + } + ], + "LoginResult": [ + { + "fid": 1, + "name": "authToken", + "type": 11 + }, + { + "fid": 2, + "name": "certificate", + "type": 11 + }, + { + "fid": 3, + "name": "verifier", + "type": 11 + }, + { + "fid": 4, + "name": "pinCode", + "type": 11 + }, + { + "fid": 5, + "name": "type", + "struct": "LoginResultType" + }, + { + "fid": 6, + "name": "lastPrimaryBindTime", + "type": 10 + }, + { + "fid": 7, + "name": "displayMessage", + "type": 11 + }, + { + "fid": 8, + "name": "sessionForSMSConfirm", + "struct": "VerificationSessionData" + } + ], + "LoginRequest": [ + { + "fid": 1, + "name": "type", + "type": 8 + }, + { + "fid": 2, + "name": "identityProvider", + "type": 8 + }, + { + "fid": 3, + "name": "identifier", + "type": 11 + }, + { + "fid": 4, + "name": "password", + "type": 11 + }, + { + "fid": 5, + "name": "keepLoggedIn", + "type": 2 + }, + { + "fid": 6, + "name": "accessLocation", + "type": 11 + }, + { + "fid": 7, + "name": "systemName", + "type": 11 + }, + { + "fid": 8, + "name": "certificate", + "type": 11 + }, + { + "fid": 9, + "name": "verifier", + "type": 11 + }, + { + "fid": 10, + "name": "secret", + "type": 11 + }, + { + "fid": 11, + "name": "e2eeVersion", + "type": 8 + } + ], + "LoginSession": [ + { + "fid": 1, + "name": "tokenKey", + "type": 11 + }, + { + "fid": 3, + "name": "expirationTime", + "type": 10 + }, + { + "fid": 11, + "name": "applicationType", + "struct": "ApplicationType" + }, + { + "fid": 12, + "name": "systemName", + "type": 11 + }, + { + "fid": 22, + "name": "accessLocation", + "type": 11 + } + ], + "Message": [ + { + "fid": 1, + "name": "_from", + "type": 11 + }, + { + "fid": 2, + "name": "to", + "type": 11 + }, + { + "fid": 3, + "name": "toType", + "struct": "MIDType" + }, + { + "fid": 4, + "name": "id", + "type": 11 + }, + { + "fid": 5, + "name": "createdTime", + "type": 10 + }, + { + "fid": 6, + "name": "deliveredTime", + "type": 10 + }, + { + "fid": 10, + "name": "text", + "type": 11 + }, + { + "fid": 11, + "name": "location", + "struct": "Location" + }, + { + "fid": 14, + "name": "hasContent", + "type": 2 + }, + { + "fid": 15, + "name": "contentType", + "struct": "ContentType" + }, + { + "fid": 17, + "name": "contentPreview" + }, + { + "fid": 18, + "name": "contentMetadata", + "map": 11 + }, + { + "fid": 19, + "name": "sessionId" + }, + { + "fid": 20, + "name": "chunks" + }, + { + "fid": 21, + "name": "relatedMessageId", + "type": 11 + }, + { + "fid": 22, + "name": "messageRelationType", + "struct": "MessageRelationType" + }, + { + "fid": 23, + "name": "readCount", + "type": 10 + }, + { + "fid": 24, + "name": "relatedMessageServiceCode", + "struct": "ServiceCode" + }, + { + "fid": 25, + "name": "appExtensionType", + "struct": "AppExtensionType" + }, + { + "fid": 27, + "name": "reactions", + "list": "Reaction" + } + ], + "SquareMessage": [ + { + "fid": 1, + "name": "message", + "struct": "Message" + }, + { + "fid": 3, + "name": "fromType", + "struct": "MIDType" + }, + { + "fid": 4, + "name": "squareMessageRevision", + "type": 10 + }, + { + "fid": 5, + "name": "state", + "struct": "SquareMessageState" + } + ], + "SquareChatStatusWithoutMessage": [ + { + "fid": 1, + "name": "memberCount", + "type": 8 + }, + { + "fid": 2, + "name": "unreadMessageCount", + "type": 8 + }, + { + "fid": 3, + "name": "markedAsReadMessageId", + "type": 11 + }, + { + "fid": 4, + "name": "mentionedMessageId", + "type": 11 + }, + { + "fid": 5, + "name": "notifiedMessageType", + "struct": "NotifiedMessageType" + } + ], + "SquareChatStatus": [ + { + "fid": 3, + "name": "lastMessage", + "struct": "SquareMessage" + }, + { + "fid": 4, + "name": "senderDisplayName", + "type": 11 + }, + { + "fid": 5, + "name": "otherStatus", + "struct": "SquareChatStatusWithoutMessage" + } + ], + "SquareChatMember": [ + { + "fid": 1, + "name": "squareMemberMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 3, + "name": "revision", + "type": 10 + }, + { + "fid": 4, + "name": "membershipState", + "struct": "SquareChatMembershipState" + }, + { + "fid": 5, + "name": "notificationForMessage", + "type": 2 + }, + { + "fid": 6, + "name": "notificationForNewMember", + "type": 2 + } + ], + "MessageOperation": [ + { + "fid": 1, + "name": "revision", + "type": 10 + }, + { + "fid": 2, + "name": "createdTime", + "type": 10 + }, + { + "fid": 3, + "name": "type", + "struct": "MessageOperationType" + }, + { + "fid": 4, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 5, + "name": "status", + "struct": "OpStatus" + }, + { + "fid": 10, + "name": "param1", + "type": 11 + }, + { + "fid": 11, + "name": "param2", + "type": 11 + }, + { + "fid": 12, + "name": "param3", + "type": 11 + }, + { + "fid": 20, + "name": "message", + "struct": "Message" + } + ], + "MessageOperations": [ + { + "fid": 1, + "name": "operations", + "list": "MessageOperation" + }, + { + "fid": 2, + "name": "endFlag", + "type": 2 + } + ], + "MessageStoreResult": [ + { + "fid": 1, + "name": "requestId", + "type": 11 + }, + { + "fid": 2, + "name": "messageIds", + "list": 11 + } + ], + "MetaProfile": [ + { + "fid": 1, + "name": "createTime", + "type": 10 + }, + { + "fid": 2, + "name": "regionCode", + "type": 11 + }, + { + "fid": 3, + "name": "identities", + "map": 11 + } + ], + "NotificationItem": [ + { + "fid": 1, + "name": "id", + "type": 11 + }, + { + "fid": 2, + "name": "_from", + "type": 11 + }, + { + "fid": 3, + "name": "to", + "type": 11 + }, + { + "fid": 4, + "name": "fromChannel", + "type": 11 + }, + { + "fid": 5, + "name": "toChannel", + "type": 11 + }, + { + "fid": 7, + "name": "revision", + "type": 10 + }, + { + "fid": 8, + "name": "createdTime", + "type": 10 + }, + { + "fid": 9, + "name": "content", + "map": 11 + } + ], + "NotificationFetchResult": [ + { + "fid": 1, + "name": "fetchMode", + "struct": "NotificationItemFetchMode" + }, + { + "fid": 2, + "name": "itemList", + "list": "NotificationItem" + } + ], + "Operation": [ + { + "fid": 1, + "name": "revision", + "type": 10 + }, + { + "fid": 2, + "name": "createdTime", + "type": 10 + }, + { + "fid": 3, + "name": "type", + "struct": "OpType" + }, + { + "fid": 4, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 5, + "name": "checksum", + "type": 11 + }, + { + "fid": 7, + "name": "status", + "struct": "OpStatus" + }, + { + "fid": 10, + "name": "param1", + "type": 11 + }, + { + "fid": 11, + "name": "param2", + "type": 11 + }, + { + "fid": 12, + "name": "param3", + "type": 11 + }, + { + "fid": 20, + "name": "message", + "struct": "Message" + } + ], + "PaymentReservation": [ + { + "fid": 1, + "name": "receiverMid", + "type": 11 + }, + { + "fid": 2, + "name": "productId", + "type": 11 + }, + { + "fid": 3, + "name": "language", + "type": 11 + }, + { + "fid": 4, + "name": "location", + "type": 11 + }, + { + "fid": 5, + "name": "currency", + "type": 11 + }, + { + "fid": 6, + "name": "price", + "type": 11 + }, + { + "fid": 7, + "name": "appStoreCode", + "struct": "PaymentType" + }, + { + "fid": 8, + "name": "messageText", + "type": 11 + }, + { + "fid": 9, + "name": "messageTemplate", + "type": 8 + }, + { + "fid": 10, + "name": "packageId", + "type": 10 + } + ], + "PaymentReservationResult": [ + { + "fid": 1, + "name": "orderId", + "type": 11 + }, + { + "fid": 2, + "name": "confirmUrl", + "type": 11 + }, + { + "fid": 3, + "name": "extras", + "map": 11 + } + ], + "Product": [ + { + "fid": 1, + "name": "productId", + "type": 11 + }, + { + "fid": 2, + "name": "packageId", + "type": 10 + }, + { + "fid": 3, + "name": "version", + "type": 8 + }, + { + "fid": 4, + "name": "authorName", + "type": 11 + }, + { + "fid": 5, + "name": "onSale", + "type": 2 + }, + { + "fid": 6, + "name": "validDays", + "type": 8 + }, + { + "fid": 7, + "name": "saleType", + "type": 8 + }, + { + "fid": 8, + "name": "copyright", + "type": 11 + }, + { + "fid": 9, + "name": "title", + "type": 11 + }, + { + "fid": 10, + "name": "descriptionText", + "type": 11 + }, + { + "fid": 11, + "name": "shopOrderId", + "type": 10 + }, + { + "fid": 12, + "name": "fromMid", + "type": 11 + }, + { + "fid": 13, + "name": "toMid", + "type": 11 + }, + { + "fid": 14, + "name": "validUntil", + "type": 10 + }, + { + "fid": 15, + "name": "priceTier", + "type": 8 + }, + { + "fid": 16, + "name": "price", + "type": 11 + }, + { + "fid": 17, + "name": "currency", + "type": 11 + }, + { + "fid": 18, + "name": "currencySymbol", + "type": 11 + }, + { + "fid": 19, + "name": "paymentType", + "struct": "PaymentType" + }, + { + "fid": 20, + "name": "createDate", + "type": 10 + }, + { + "fid": 21, + "name": "ownFlag", + "type": 2 + }, + { + "fid": 22, + "name": "eventType", + "struct": "ProductEventType" + }, + { + "fid": 23, + "name": "urlSchema", + "type": 11 + }, + { + "fid": 24, + "name": "downloadUrl", + "type": 11 + }, + { + "fid": 25, + "name": "buddyMid", + "type": 11 + }, + { + "fid": 26, + "name": "publishSince", + "type": 10 + }, + { + "fid": 27, + "name": "newFlag", + "type": 2 + }, + { + "fid": 28, + "name": "missionFlag", + "type": 2 + }, + { + "fid": 29, + "name": "categories", + "list": "ProductCategory" + }, + { + "fid": 30, + "name": "missionButtonText", + "type": 11 + }, + { + "fid": 31, + "name": "missionShortDescription", + "type": 11 + }, + { + "fid": 32, + "name": "authorId", + "type": 11 + }, + { + "fid": 41, + "name": "grantedByDefault", + "type": 2 + }, + { + "fid": 42, + "name": "displayOrder", + "type": 8 + }, + { + "fid": 43, + "name": "availableForPresent", + "type": 2 + }, + { + "fid": 44, + "name": "availableForMyself", + "type": 2 + }, + { + "fid": 51, + "name": "hasAnimation", + "type": 2 + }, + { + "fid": 52, + "name": "hasSound", + "type": 2 + }, + { + "fid": 53, + "name": "recommendationsEnabled", + "type": 2 + }, + { + "fid": 54, + "name": "stickerResourceType", + "struct": "StickerResourceType" + } + ], + "ProductList": [ + { + "fid": 1, + "name": "productList", + "list": "ProductDetail" + }, + { + "fid": 2, + "name": "offset", + "type": 8 + }, + { + "fid": 3, + "name": "totalSize", + "type": 8 + }, + { + "fid": 11, + "name": "title", + "type": 11 + } + ], + "StickerIdRange": [ + { + "fid": 1, + "name": "start", + "type": 10 + }, + { + "fid": 2, + "name": "size", + "type": 8 + } + ], + "ProductSimple": [ + { + "fid": 1, + "name": "productId", + "type": 11 + }, + { + "fid": 2, + "name": "packageId", + "type": 10 + }, + { + "fid": 3, + "name": "version", + "type": 8 + }, + { + "fid": 4, + "name": "onSale", + "type": 2 + }, + { + "fid": 5, + "name": "validUntil", + "type": 10 + }, + { + "fid": 10, + "name": "stickerIdRanges", + "list": "StickerIdRange" + }, + { + "fid": 41, + "name": "grantedByDefault", + "type": 2 + }, + { + "fid": 42, + "name": "displayOrder", + "type": 8 + } + ], + "ProductSimpleList": [ + { + "fid": 1, + "name": "hasNext", + "type": 2 + }, + { + "fid": 2, + "name": "reinvokeHour", + "type": 8 + }, + { + "fid": 3, + "name": "lastVersionSeq", + "type": 10 + }, + { + "fid": 4, + "name": "productList", + "list": "ProductSimple" + }, + { + "fid": 5, + "name": "recentNewReleaseDate", + "type": 10 + }, + { + "fid": 6, + "name": "recentEventReleaseDate", + "type": 10 + } + ], + "Profile": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 3, + "name": "userid", + "type": 11 + }, + { + "fid": 10, + "name": "phone", + "type": 11 + }, + { + "fid": 11, + "name": "email", + "type": 11 + }, + { + "fid": 12, + "name": "regionCode", + "type": 11 + }, + { + "fid": 20, + "name": "displayName", + "type": 11 + }, + { + "fid": 21, + "name": "phoneticName", + "type": 11 + }, + { + "fid": 22, + "name": "pictureStatus", + "type": 11 + }, + { + "fid": 23, + "name": "thumbnailUrl", + "type": 11 + }, + { + "fid": 24, + "name": "statusMessage", + "type": 11 + }, + { + "fid": 31, + "name": "allowSearchByUserid", + "type": 2 + }, + { + "fid": 32, + "name": "allowSearchByEmail", + "type": 2 + }, + { + "fid": 33, + "name": "picturePath", + "type": 11 + }, + { + "fid": 34, + "name": "musicProfile", + "type": 11 + }, + { + "fid": 35, + "name": "videoProfile", + "type": 11 + }, + { + "fid": 36, + "name": "statusMessageContentMetadata", + "map": 11 + }, + { + "fid": 37, + "name": "avatarProfile", + "struct": "AvatarProfile" + }, + { + "fid": 38, + "name": "nftProfile", + "type": 2 + }, + { + "fid": 39, + "name": "pictureSource", + "struct": "PictureSource" + } + ], + "ProximityMatchCandidateResult": [ + { + "fid": 1, + "name": "users", + "list": "Contact" + }, + { + "fid": 2, + "name": "buddies", + "list": "Contact" + } + ], + "RegisterWithSnsIdResult": [ + { + "fid": 1, + "name": "authToken", + "type": 11 + }, + { + "fid": 2, + "name": "userCreated", + "type": 2 + } + ], + "RequestTokenResponse": [ + { + "fid": 1, + "name": "requestToken", + "type": 11 + }, + { + "fid": 2, + "name": "returnUrl", + "type": 11 + } + ], + "Room": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "createdTime", + "type": 10 + }, + { + "fid": 10, + "name": "contacts", + "list": "Contact" + }, + { + "fid": 31, + "name": "notificationDisabled", + "type": 2 + }, + { + "fid": 40, + "name": "memberMids", + "list": 11 + } + ], + "SuggestDictionary": [ + { + "fid": 1, + "name": "language", + "type": 11 + }, + { + "fid": 2, + "name": "name", + "type": 11 + } + ], + "SuggestItemDictionaryIncrement": [ + { + "fid": 1, + "name": "status", + "struct": "SuggestDictionaryIncrementStatus" + }, + { + "fid": 2, + "name": "revision", + "type": 10 + }, + { + "fid": 3, + "name": "scheme", + "type": 11 + }, + { + "fid": 4, + "name": "data" + } + ], + "SuggestTagDictionaryIncrement": [ + { + "fid": 1, + "name": "status", + "struct": "SuggestDictionaryIncrementStatus" + }, + { + "fid": 2, + "name": "language", + "type": 11 + }, + { + "fid": 3, + "name": "revision", + "type": 10 + }, + { + "fid": 4, + "name": "scheme", + "type": 11 + }, + { + "fid": 5, + "name": "data" + } + ], + "SuggestDictionaryIncrements": [ + { + "fid": 1, + "name": "itemIncrement", + "struct": "SuggestItemDictionaryIncrement" + }, + { + "fid": 2, + "name": "tagIncrements", + "list": "SuggestTagDictionaryIncrement" + } + ], + "SuggestDictionaryIncrementStatus": { + "0": "SUCCESS", + "1": "INVALID_REVISION", + "2": "TOO_LARGE_DATA", + "3": "SCHEME_CHANGED", + "4": "RETRY", + "5": "FAIL", + "6": "TOO_OLD_DATA" + }, + "SuggestItemDictionaryRevision": [ + { + "fid": 1, + "name": "revision", + "type": 10 + }, + { + "fid": 2, + "name": "scheme", + "type": 11 + } + ], + "SuggestTagDictionaryRevision": [ + { + "fid": 1, + "name": "language", + "type": 11 + }, + { + "fid": 2, + "name": "revision", + "type": 10 + }, + { + "fid": 3, + "name": "scheme", + "type": 11 + } + ], + "SuggestDictionaryRevisions": [ + { + "fid": 1, + "name": "itemRevision", + "struct": "SuggestItemDictionaryRevision" + }, + { + "fid": 2, + "name": "tagRevisions", + "list": "SuggestTagDictionaryRevision" + } + ], + "SuggestDictionarySettings": [ + { + "fid": 1, + "name": "revision", + "type": 10 + }, + { + "fid": 2, + "name": "newRevision", + "type": 10 + }, + { + "fid": 3, + "name": "dictionaries", + "list": "SuggestDictionary" + }, + { + "fid": 4, + "name": "preloadedDictionaries", + "list": 11 + } + ], + "PhoneInfoForChannel": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "normalizedPhoneNumber", + "type": 11 + }, + { + "fid": 3, + "name": "allowedToSearchByPhoneNumber", + "type": 2 + }, + { + "fid": 4, + "name": "allowedToReceiveMessageFromNonFriend", + "type": 2 + }, + { + "fid": 5, + "name": "region", + "type": 11 + } + ], + "PhoneVerificationResult": [ + { + "fid": 1, + "name": "verificationResult", + "struct": "VerificationResult" + }, + { + "fid": 2, + "name": "accountMigrationCheckType", + "struct": "AccountMigrationCheckType" + }, + { + "fid": 3, + "name": "recommendAddFriends", + "type": 2 + } + ], + "PlaceSearchInfo": [ + { + "fid": 1, + "name": "name", + "type": 11 + }, + { + "fid": 2, + "name": "address", + "type": 11 + }, + { + "fid": 3, + "name": "latitude", + "type": 4 + }, + { + "fid": 4, + "name": "longitude", + "type": 4 + } + ], + "RSAKey": [ + { + "fid": 1, + "name": "keynm", + "type": 11 + }, + { + "fid": 2, + "name": "nvalue", + "type": 11 + }, + { + "fid": 3, + "name": "evalue", + "type": 11 + }, + { + "fid": 4, + "name": "sessionKey", + "type": 11 + } + ], + "SecurityCenterResult": [ + { + "fid": 1, + "name": "uri", + "type": 11 + }, + { + "fid": 2, + "name": "token", + "type": 11 + }, + { + "fid": 3, + "name": "cookiePath", + "type": 11 + }, + { + "fid": 4, + "name": "skip", + "type": 2 + } + ], + "SendBuddyMessageResult": [ + { + "fid": 1, + "name": "requestId", + "type": 11 + }, + { + "fid": 2, + "name": "state", + "struct": "BuddyResultState" + }, + { + "fid": 3, + "name": "messageId", + "type": 11 + }, + { + "fid": 4, + "name": "eventNo", + "type": 8 + }, + { + "fid": 11, + "name": "receiverCount", + "type": 10 + }, + { + "fid": 12, + "name": "successCount", + "type": 10 + }, + { + "fid": 13, + "name": "failCount", + "type": 10 + }, + { + "fid": 14, + "name": "cancelCount", + "type": 10 + }, + { + "fid": 15, + "name": "blockCount", + "type": 10 + }, + { + "fid": 16, + "name": "unregisterCount", + "type": 10 + }, + { + "fid": 21, + "name": "timestamp", + "type": 10 + }, + { + "fid": 22, + "name": "message", + "type": 11 + } + ], + "SetBuddyOnAirResult": [ + { + "fid": 1, + "name": "requestId", + "type": 11 + }, + { + "fid": 2, + "name": "state", + "struct": "BuddyResultState" + }, + { + "fid": 3, + "name": "eventNo", + "type": 8 + }, + { + "fid": 11, + "name": "receiverCount", + "type": 10 + }, + { + "fid": 12, + "name": "successCount", + "type": 10 + }, + { + "fid": 13, + "name": "failCount", + "type": 10 + }, + { + "fid": 14, + "name": "cancelCount", + "type": 10 + }, + { + "fid": 15, + "name": "unregisterCount", + "type": 10 + }, + { + "fid": 21, + "name": "timestamp", + "type": 10 + }, + { + "fid": 22, + "name": "message", + "type": 11 + } + ], + "Settings": [ + { + "fid": 10, + "name": "notificationEnable", + "type": 2 + }, + { + "fid": 11, + "name": "notificationMuteExpiration", + "type": 10 + }, + { + "fid": 12, + "name": "notificationNewMessage", + "type": 2 + }, + { + "fid": 13, + "name": "notificationGroupInvitation", + "type": 2 + }, + { + "fid": 14, + "name": "notificationShowMessage", + "type": 2 + }, + { + "fid": 15, + "name": "notificationIncomingCall", + "type": 2 + }, + { + "fid": 16, + "name": "notificationSoundMessage", + "type": 11 + }, + { + "fid": 17, + "name": "notificationSoundGroup", + "type": 11 + }, + { + "fid": 18, + "name": "notificationDisabledWithSub", + "type": 2 + }, + { + "fid": 19, + "name": "notificationPayment", + "type": 2 + }, + { + "fid": 20, + "name": "privacySyncContacts", + "type": 2 + }, + { + "fid": 21, + "name": "privacySearchByPhoneNumber", + "type": 2 + }, + { + "fid": 22, + "name": "privacySearchByUserid", + "type": 2 + }, + { + "fid": 23, + "name": "privacySearchByEmail", + "type": 2 + }, + { + "fid": 24, + "name": "privacyAllowSecondaryDeviceLogin", + "type": 2 + }, + { + "fid": 25, + "name": "privacyProfileImagePostToMyhome", + "type": 2 + }, + { + "fid": 26, + "name": "privacyReceiveMessagesFromNotFriend", + "type": 2 + }, + { + "fid": 27, + "name": "privacyAgreeUseLineCoinToPaidCall", + "type": 2 + }, + { + "fid": 28, + "name": "privacyAgreeUsePaidCall", + "type": 2 + }, + { + "fid": 29, + "name": "privacyAllowFriendRequest", + "type": 2 + }, + { + "fid": 30, + "name": "contactMyTicket", + "type": 11 + }, + { + "fid": 40, + "name": "identityProvider", + "struct": "IdentityProvider" + }, + { + "fid": 41, + "name": "identityIdentifier", + "type": 11 + }, + { + "fid": 42, + "name": "snsAccounts", + "map": 11 + }, + { + "fid": 43, + "name": "phoneRegistration", + "type": 2 + }, + { + "fid": 44, + "name": "emailConfirmationStatus", + "struct": "EmailConfirmationStatus" + }, + { + "fid": 45, + "name": "accountMigrationPincodeType", + "struct": "AccountMigrationPincodeType" + }, + { + "fid": 46, + "name": "enforcedInputAccountMigrationPincode", + "type": 2 + }, + { + "fid": 47, + "name": "securityCenterSettingsType", + "struct": "SecurityCenterSettingsType" + }, + { + "fid": 48, + "name": "allowUnregistrationSecondaryDevice", + "type": 2 + }, + { + "fid": 49, + "name": "pwlessPrimaryCredentialRegistration", + "type": 2 + }, + { + "fid": 50, + "name": "preferenceLocale", + "type": 11 + }, + { + "fid": 60, + "name": "customModes", + "map": 11 + }, + { + "fid": 61, + "name": "e2eeEnable", + "type": 2 + }, + { + "fid": 62, + "name": "hitokotoBackupRequested", + "type": 2 + }, + { + "fid": 63, + "name": "privacyProfileMusicPostToMyhome", + "type": 2 + }, + { + "fid": 65, + "name": "privacyAllowNearby", + "type": 2 + }, + { + "fid": 66, + "name": "agreementNearbyTime", + "type": 10 + }, + { + "fid": 67, + "name": "agreementSquareTime", + "type": 10 + }, + { + "fid": 68, + "name": "notificationMention", + "type": 2 + }, + { + "fid": 69, + "name": "botUseAgreementAcceptedAt", + "type": 10 + }, + { + "fid": 70, + "name": "agreementShakeFunction", + "type": 10 + }, + { + "fid": 71, + "name": "agreementMobileContactName", + "type": 10 + }, + { + "fid": 73, + "name": "agreementSoundToText", + "type": 10 + }, + { + "fid": 74, + "name": "privacyPolicyVersion", + "type": 11 + }, + { + "fid": 75, + "name": "agreementAdByWebAccess", + "type": 10 + }, + { + "fid": 76, + "name": "agreementPhoneNumberMatching", + "type": 10 + }, + { + "fid": 77, + "name": "agreementCommunicationInfo", + "type": 10 + }, + { + "fid": 78, + "name": "privacySharePersonalInfoToFriends", + "struct": "UserSharePersonalInfoToFriendsType" + }, + { + "fid": 79, + "name": "agreementThingsWirelessCommunication", + "type": 10 + }, + { + "fid": 80, + "name": "agreementGdpr", + "type": 10 + }, + { + "fid": 81, + "name": "privacyStatusMessageHistory", + "struct": "UserStatusMessageHistoryType" + }, + { + "fid": 82, + "name": "agreementProvideLocation", + "type": 10 + }, + { + "fid": 83, + "name": "agreementBeacon", + "type": 10 + }, + { + "fid": 85, + "name": "privacyAllowProfileHistory", + "struct": "UserAllowProfileHistoryType" + }, + { + "fid": 86, + "name": "agreementContentsSuggest", + "type": 10 + }, + { + "fid": 87, + "name": "agreementContentsSuggestDataCollection", + "type": 10 + }, + { + "fid": 88, + "name": "privacyAgeResult", + "struct": "UserAgeType" + }, + { + "fid": 89, + "name": "privacyAgeResultReceived", + "type": 2 + }, + { + "fid": 72, + "name": "notificationThumbnail", + "type": 2 + }, + { + "fid": 90, + "name": "agreementOcrImageCollection", + "type": 10 + }, + { + "fid": 91, + "name": "privacyAllowFollow", + "type": 2 + }, + { + "fid": 92, + "name": "privacyShowFollowList", + "type": 2 + }, + { + "fid": 93, + "name": "notificationBadgeTalkOnly", + "type": 2 + }, + { + "fid": 94, + "name": "agreementIcna", + "type": 10 + }, + { + "fid": 95, + "name": "notificationReaction", + "type": 2 + }, + { + "fid": 96, + "name": "agreementMid", + "type": 10 + }, + { + "fid": 97, + "name": "homeNotificationNewFriend", + "type": 2 + }, + { + "fid": 98, + "name": "homeNotificationFavoriteFriendUpdate", + "type": 2 + }, + { + "fid": 99, + "name": "homeNotificationGroupMemberUpdate", + "type": 2 + }, + { + "fid": 100, + "name": "homeNotificationBirthday", + "type": 2 + }, + { + "fid": 101, + "name": "eapAllowedToConnect", + "map": 2 + }, + { + "fid": 102, + "name": "agreementLineOutUse", + "type": 10 + }, + { + "fid": 103, + "name": "agreementLineOutProvideInfo", + "type": 10 + }, + { + "fid": 104, + "name": "notificationShowProfileImage", + "type": 2 + }, + { + "fid": 105, + "name": "agreementPdpa", + "type": 10 + }, + { + "fid": 106, + "name": "agreementLocationVersion", + "type": 11 + }, + { + "fid": 107, + "name": "zhdPageAllowedToShow", + "type": 2 + } + ], + "SimpleChannelClient": [ + { + "fid": 1, + "name": "applicationType", + "type": 11 + }, + { + "fid": 2, + "name": "applicationVersion", + "type": 11 + }, + { + "fid": 3, + "name": "locale", + "type": 11 + } + ], + "SimpleChannelContact": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "displayName", + "type": 11 + }, + { + "fid": 3, + "name": "pictureStatus", + "type": 11 + }, + { + "fid": 4, + "name": "picturePath", + "type": 11 + }, + { + "fid": 5, + "name": "statusMessage", + "type": 11 + } + ], + "SnsFriend": [ + { + "fid": 1, + "name": "snsUserId", + "type": 11 + }, + { + "fid": 2, + "name": "snsUserName", + "type": 11 + }, + { + "fid": 3, + "name": "snsIdType", + "struct": "SnsIdType" + } + ], + "SnsFriendContactRegistration": [ + { + "fid": 1, + "name": "contact", + "struct": "Contact" + }, + { + "fid": 2, + "name": "snsIdType", + "struct": "SnsIdType" + }, + { + "fid": 3, + "name": "snsUserId", + "type": 11 + } + ], + "SnsFriendModification": [ + { + "fid": 1, + "name": "type", + "struct": "ModificationType" + }, + { + "fid": 2, + "name": "snsFriend", + "struct": "SnsFriend" + } + ], + "SnsFriends": [ + { + "fid": 1, + "name": "snsFriends", + "list": "SnsFriend" + }, + { + "fid": 2, + "name": "hasMore", + "type": 2 + } + ], + "SnsIdUserStatus": [ + { + "fid": 1, + "name": "userExisting", + "type": 2 + }, + { + "fid": 2, + "name": "phoneNumberRegistered", + "type": 2 + }, + { + "fid": 3, + "name": "sameDevice", + "type": 2 + } + ], + "SnsProfile": [ + { + "fid": 1, + "name": "snsUserId", + "type": 11 + }, + { + "fid": 2, + "name": "snsUserName", + "type": 11 + }, + { + "fid": 3, + "name": "email", + "type": 11 + }, + { + "fid": 4, + "name": "thumbnailUrl", + "type": 11 + } + ], + "SystemConfiguration": [ + { + "fid": 1, + "name": "endpoint", + "type": 11 + }, + { + "fid": 2, + "name": "endpointSsl", + "type": 11 + }, + { + "fid": 3, + "name": "updateUrl", + "type": 11 + }, + { + "fid": 11, + "name": "c2dmAccount", + "type": 11 + }, + { + "fid": 12, + "name": "nniServer", + "type": 11 + } + ], + "Ticket": [ + { + "fid": 1, + "name": "id", + "type": 11 + }, + { + "fid": 10, + "name": "expirationTime", + "type": 10 + }, + { + "fid": 21, + "name": "maxUseCount", + "type": 8 + } + ], + "TMessageBox": [ + { + "fid": 1, + "name": "id", + "type": 11 + }, + { + "fid": 2, + "name": "channelId", + "type": 11 + }, + { + "fid": 5, + "name": "lastSeq", + "type": 10 + }, + { + "fid": 6, + "name": "unreadCount", + "type": 10 + }, + { + "fid": 7, + "name": "lastModifiedTime", + "type": 10 + }, + { + "fid": 8, + "name": "status", + "type": 8 + }, + { + "fid": 9, + "name": "midType", + "struct": "MIDType" + }, + { + "fid": 10, + "name": "lastMessages", + "list": "Message" + } + ], + "TMessageBoxWrapUp": [ + { + "fid": 1, + "name": "messageBox", + "struct": "TMessageBox" + }, + { + "fid": 2, + "name": "name", + "type": 11 + }, + { + "fid": 3, + "name": "contacts", + "list": "Contact" + }, + { + "fid": 4, + "name": "pictureRevision", + "type": 11 + } + ], + "TMessageBoxWrapUpResponse": [ + { + "fid": 1, + "name": "messageBoxWrapUpList", + "list": "TMessageBoxWrapUp" + }, + { + "fid": 2, + "name": "totalSize", + "type": 8 + } + ], + "TMessageReadRangeEntry": [ + { + "fid": 1, + "name": "startMessageId", + "type": 10 + }, + { + "fid": 2, + "name": "endMessageId", + "type": 10 + }, + { + "fid": 3, + "name": "startTime", + "type": 10 + }, + { + "fid": 4, + "name": "endTime", + "type": 10 + } + ], + "TMessageReadRange": [ + { + "fid": 1, + "name": "chatId", + "type": 11 + }, + { + "fid": 2, + "name": "ranges" + } + ], + "ChatRoomAnnouncementContents": [ + { + "fid": 1, + "name": "displayFields", + "type": 8 + }, + { + "fid": 2, + "name": "text", + "type": 11 + }, + { + "fid": 3, + "name": "link", + "type": 11 + }, + { + "fid": 4, + "name": "thumbnail", + "type": 11 + }, + { + "fid": 5, + "name": "contentMetadata", + "struct": "ChatRoomAnnouncementContentMetadata" + } + ], + "ChatRoomAnnouncement": [ + { + "fid": 1, + "name": "announcementSeq", + "type": 10 + }, + { + "fid": 2, + "name": "type", + "type": 8 + }, + { + "fid": 3, + "name": "contents", + "struct": "ChatRoomAnnouncementContents" + }, + { + "fid": 4, + "name": "creatorMid", + "type": 11 + }, + { + "fid": 5, + "name": "createdTime", + "type": 10 + }, + { + "fid": 6, + "name": "deletePermission", + "type": 8 + } + ], + "ErrorExtraInfo": [ + { + "fid": 1, + "name": "preconditionFailedExtraInfo", + "struct": "PreconditionFailedExtraInfo" + }, + { + "fid": 2, + "name": "userRestrictionInfo", + "struct": "UserRestrictionExtraInfo" + } + ], + "SyncRelations": [ + { + "fid": 1, + "name": "syncAll", + "type": 2 + }, + { + "fid": 2, + "name": "syncParamContact", + "list": "SyncParamContact" + }, + { + "fid": 3, + "name": "syncParamMid", + "list": "SyncParamMid" + } + ], + "SyncScope": [ + { + "fid": 1, + "name": "syncProfile", + "type": 2 + }, + { + "fid": 2, + "name": "syncSettings", + "type": 2 + }, + { + "fid": 3, + "name": "syncSticker", + "type": 2 + }, + { + "fid": 4, + "name": "syncThemeShop", + "type": 2 + }, + { + "fid": 10, + "name": "contact", + "struct": "SyncRelations" + }, + { + "fid": 11, + "name": "group", + "struct": "SyncRelations" + }, + { + "fid": 12, + "name": "room", + "struct": "SyncRelations" + }, + { + "fid": 13, + "name": "chat", + "struct": "SyncRelations" + } + ], + "JoinSquareResponse": [ + { + "fid": 1, + "name": "square", + "struct": "Square" + }, + { + "fid": 2, + "name": "squareAuthority", + "struct": "SquareAuthority" + }, + { + "fid": 3, + "name": "squareStatus", + "struct": "SquareStatus" + }, + { + "fid": 4, + "name": "squareMember", + "struct": "SquareMember" + }, + { + "fid": 5, + "name": "squareFeatureSet", + "struct": "SquareFeatureSet" + }, + { + "fid": 6, + "name": "noteStatus", + "struct": "NoteStatus" + } + ], + "JoinSquareRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "member", + "struct": "SquareMember" + } + ], + "JoinSquareChatResponse": [ + { + "fid": 1, + "name": "squareChat", + "struct": "SquareChat" + }, + { + "fid": 2, + "name": "squareChatStatus", + "struct": "SquareChatStatus" + }, + { + "fid": 3, + "name": "squareChatMember", + "struct": "SquareChatMember" + } + ], + "JoinSquareChatRequest": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + } + ], + "SendMessageResponse": [ + { + "fid": 1, + "name": "createdSquareMessage", + "struct": "SquareMessage" + } + ], + "SendMessageRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 3, + "name": "squareMessage", + "struct": "SquareMessage" + } + ], + "MarkAsReadRequest": [ + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 4, + "name": "messageId", + "type": 11 + } + ], + "MarkAsReadResponse": [], + "SubscriptionState": [ + { + "fid": 1, + "name": "subscriptionId", + "type": 10 + }, + { + "fid": 2, + "name": "ttlMillis", + "type": 10 + } + ], + "ApproveSquareMembersResponse": [ + { + "fid": 1, + "name": "approvedMembers", + "list": "SquareMember" + }, + { + "fid": 2, + "name": "status", + "struct": "SquareStatus" + } + ], + "ApproveSquareMembersRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "requestedMemberMids", + "list": 11 + } + ], + "CreateSquareChatResponse": [ + { + "fid": 1, + "name": "squareChat", + "struct": "SquareChat" + }, + { + "fid": 2, + "name": "squareChatStatus", + "struct": "SquareChatStatus" + }, + { + "fid": 3, + "name": "squareChatMember", + "struct": "SquareChatMember" + } + ], + "CreateSquareChatRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "squareChat", + "struct": "SquareChat" + }, + { + "fid": 3, + "name": "squareMemberMids", + "list": 11 + } + ], + "CreateSquareResponse": [ + { + "fid": 1, + "name": "square", + "struct": "Square" + }, + { + "fid": 2, + "name": "creator", + "struct": "SquareMember" + }, + { + "fid": 3, + "name": "authority", + "struct": "SquareAuthority" + }, + { + "fid": 4, + "name": "status", + "struct": "SquareStatus" + }, + { + "fid": 5, + "name": "featureSet", + "struct": "SquareFeatureSet" + }, + { + "fid": 6, + "name": "noteStatus", + "struct": "NoteStatus" + }, + { + "fid": 7, + "name": "squareChat", + "struct": "SquareChat" + }, + { + "fid": 8, + "name": "squareChatStatus", + "struct": "SquareChatStatus" + }, + { + "fid": 9, + "name": "squareChatMember", + "struct": "SquareChatMember" + }, + { + "fid": 10, + "name": "squareChatFeatureSet", + "struct": "SquareChatFeatureSet" + } + ], + "CreateSquareRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "square", + "struct": "Square" + }, + { + "fid": 3, + "name": "creator", + "struct": "SquareMember" + } + ], + "DeleteSquareResponse": [], + "DeleteSquareRequest": [ + { + "fid": 2, + "name": "mid", + "type": 11 + }, + { + "fid": 3, + "name": "revision", + "type": 10 + } + ], + "DestroyMessageResponse": [], + "DestroyMessageRequest": [ + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 4, + "name": "messageId", + "type": 11 + } + ], + "GetSquareChatMembersRequest": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "limit", + "type": 8 + } + ], + "GetSquareChatMembersResponse": [ + { + "fid": 1, + "name": "squareChatMembers", + "struct": "SquareMember" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + } + ], + "GetSquareChatStatusRequest": [ + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + } + ], + "GetSquareChatStatusResponse": [ + { + "fid": 1, + "name": "chatStatus", + "struct": "SquareChatStatus" + } + ], + "GetSquareChatRequest": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + } + ], + "GetSquareChatResponse": [ + { + "fid": 1, + "name": "squareChat", + "struct": "SquareChat" + }, + { + "fid": 2, + "name": "squareChatMember", + "struct": "SquareChatMember" + }, + { + "fid": 3, + "name": "squareChatStatus", + "struct": "SquareChatStatus" + } + ], + "GetSquareAuthorityRequest": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + } + ], + "GetSquareAuthorityResponse": [ + { + "fid": 1, + "name": "authority", + "struct": "SquareAuthority" + } + ], + "GetJoinedSquaresRequest": [ + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "limit", + "type": 8 + } + ], + "GetJoinedSquaresResponse": [ + { + "fid": 1, + "name": "squares", + "list": "Square" + }, + { + "fid": 2, + "name": "members", + "map": "SquareMember" + }, + { + "fid": 3, + "name": "authorities", + "map": "SquareAuthority" + }, + { + "fid": 4, + "name": "statuses", + "map": "SquareStatus" + }, + { + "fid": 5, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 6, + "name": "noteStatuses", + "map": "NoteStatus" + } + ], + "GetJoinableSquareChatsRequest": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 10, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 11, + "name": "limit", + "type": 8 + } + ], + "GetJoinableSquareChatsResponse": [ + { + "fid": 1, + "name": "squareChats", + "list": "SquareChat" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "totalSquareChatCount", + "type": 8 + }, + { + "fid": 4, + "name": "squareChatStatuses", + "map": "SquareChatStatus" + } + ], + "GetInvitationTicketUrlRequest": [ + { + "fid": 2, + "name": "mid", + "type": 11 + } + ], + "GetInvitationTicketUrlResponse": [ + { + "fid": 1, + "name": "invitationURL", + "type": 11 + } + ], + "LeaveSquareRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + } + ], + "LeaveSquareResponse": [], + "LeaveSquareChatRequest": [ + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 3, + "name": "sayGoodbye", + "type": 2 + }, + { + "fid": 4, + "name": "squareChatMemberRevision", + "type": 10 + } + ], + "LeaveSquareChatResponse": [], + "SquareMemberSearchOption": [ + { + "fid": 1, + "name": "membershipState", + "struct": "SquareMembershipState" + }, + { + "fid": 2, + "name": "memberRoles", + "set": "SquareMemberRole" + }, + { + "fid": 3, + "name": "displayName", + "type": 11 + }, + { + "fid": 4, + "name": "ableToReceiveMessage", + "struct": "BooleanState" + }, + { + "fid": 5, + "name": "ableToReceiveFriendRequest", + "struct": "BooleanState" + }, + { + "fid": 6, + "name": "chatMidToExcludeMembers", + "type": 11 + }, + { + "fid": 7, + "name": "includingMe", + "type": 2 + } + ], + "SearchSquareMembersRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "searchOption", + "struct": "SquareMemberSearchOption" + }, + { + "fid": 4, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 5, + "name": "limit", + "type": 8 + } + ], + "SearchSquareMembersResponse": [ + { + "fid": 1, + "name": "members", + "list": "SquareMember" + }, + { + "fid": 2, + "name": "revision", + "type": 10 + }, + { + "fid": 3, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 4, + "name": "totalCount", + "type": 8 + } + ], + "FindSquareByInvitationTicketRequest": [ + { + "fid": 2, + "name": "invitationTicket", + "type": 11 + } + ], + "FindSquareByInvitationTicketResponse": [ + { + "fid": 1, + "name": "square", + "struct": "Square" + }, + { + "fid": 2, + "name": "myMembership", + "struct": "SquareMember" + }, + { + "fid": 3, + "name": "squareAuthority", + "struct": "SquareAuthority" + }, + { + "fid": 4, + "name": "squareStatus", + "struct": "SquareStatus" + }, + { + "fid": 5, + "name": "squareFeatureSet", + "struct": "SquareFeatureSet" + }, + { + "fid": 6, + "name": "noteStatus", + "struct": "NoteStatus" + }, + { + "fid": 7, + "name": "chat", + "struct": "SquareChat" + }, + { + "fid": 8, + "name": "chatStatus", + "struct": "SquareChatStatus" + } + ], + "SquareEventReceiveMessage": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMessage", + "struct": "SquareMessage" + }, + { + "fid": 3, + "name": "senderDisplayName", + "type": 11 + }, + { + "fid": 4, + "name": "messageReactionStatus", + "struct": "SquareMessageReactionStatus" + }, + { + "fid": 5, + "name": "senderRevision", + "type": 10 + }, + { + "fid": 6, + "name": "squareMid", + "type": 11 + } + ], + "SquareEventSendMessage": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMessage", + "struct": "SquareMessage" + }, + { + "fid": 3, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 4, + "name": "senderDisplayName", + "type": 11 + }, + { + "fid": 5, + "name": "messageReactionStatus", + "struct": "SquareMessageReactionStatus" + } + ], + "SquareEventNotifiedJoinSquareChat": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "joinedMember", + "struct": "SquareMember" + } + ], + "SquareEventNotifiedInviteIntoSquareChat": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "invitees", + "list": "SquareMember" + }, + { + "fid": 3, + "name": "invitor", + "struct": "SquareMember" + }, + { + "fid": 4, + "name": "invitorRelation", + "struct": "SquareMemberRelation" + } + ], + "SquareEventNotifiedLeaveSquareChat": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMemberMid", + "type": 11 + }, + { + "fid": 3, + "name": "sayGoodbye", + "type": 2 + }, + { + "fid": 4, + "name": "squareMember", + "struct": "SquareMember" + } + ], + "SquareEventNotifiedDestroyMessage": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 3, + "name": "messageId", + "type": 11 + } + ], + "SquareEventNotifiedMarkAsRead": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "sMemberMid", + "type": 11 + }, + { + "fid": 4, + "name": "messageId", + "type": 11 + } + ], + "SquareEventNotifiedUpdateSquareMemberProfile": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMember", + "struct": "SquareMember" + } + ], + "SquareEventNotifiedKickoutFromSquare": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "kickees", + "list": "SquareMember" + }, + { + "fid": 4, + "name": "kicker", + "struct": "SquareMember" + } + ], + "SquareEventNotifiedShutdownSquare": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "square", + "struct": "Square" + } + ], + "SquareEventNotifiedDeleteSquareChat": [ + { + "fid": 1, + "name": "squareChat", + "struct": "SquareChat" + } + ], + "SquareEventNotifiedUpdateSquareChatProfileName": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "editor", + "struct": "SquareMember" + }, + { + "fid": 3, + "name": "updatedChatName", + "type": 11 + } + ], + "SquareEventNotifiedUpdateSquareChatProfileImage": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "editor", + "struct": "SquareMember" + } + ], + "SquareEventNotifiedUpdateSquareChatStatus": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "statusWithoutMessage", + "struct": "SquareChatStatusWithoutMessage" + } + ], + "SquareEventNotifiedUpdateSquareStatus": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareStatus", + "struct": "SquareStatus" + } + ], + "SquareEventNotifiedCreateSquareMember": [ + { + "fid": 1, + "name": "square", + "struct": "Square" + }, + { + "fid": 2, + "name": "squareAuthority", + "struct": "SquareAuthority" + }, + { + "fid": 3, + "name": "squareStatus", + "struct": "SquareStatus" + }, + { + "fid": 4, + "name": "squareMember", + "struct": "SquareMember" + }, + { + "fid": 5, + "name": "squareFeatureSet", + "struct": "SquareFeatureSet" + }, + { + "fid": 6, + "name": "noteStatus", + "struct": "NoteStatus" + } + ], + "SquareEventNotifiedCreateSquareChatMember": [ + { + "fid": 1, + "name": "chat", + "struct": "SquareChat" + }, + { + "fid": 2, + "name": "chatStatus", + "struct": "SquareChatStatus" + }, + { + "fid": 3, + "name": "chatMember", + "struct": "SquareChatMember" + }, + { + "fid": 4, + "name": "joinedAt", + "type": 10 + }, + { + "fid": 5, + "name": "peerSquareMember", + "struct": "SquareMember" + }, + { + "fid": 6, + "name": "squareChatFeatureSet", + "struct": "SquareChatFeatureSet" + } + ], + "SquareEventNotifiedUpdateSquareMemberRelation": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "myMemberMid", + "type": 11 + }, + { + "fid": 3, + "name": "targetSquareMemberMid", + "type": 11 + }, + { + "fid": 4, + "name": "squareMemberRelation", + "struct": "SquareMemberRelation" + } + ], + "SquareEventNotifiedUpdateSquare": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "square", + "struct": "Square" + } + ], + "SquareEventNotifiedUpdateSquareMember": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMemberMid", + "type": 11 + }, + { + "fid": 3, + "name": "squareMember", + "struct": "SquareMember" + } + ], + "SquareEventNotifiedUpdateSquareChat": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 3, + "name": "squareChat", + "struct": "SquareChat" + } + ], + "SquareEventNotificationJoinRequest": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareName", + "type": 11 + }, + { + "fid": 3, + "name": "requestMemberName", + "type": 11 + }, + { + "fid": 4, + "name": "profileImageObsHash", + "type": 11 + } + ], + "SquareEventNotificationMemberUpdate": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareName", + "type": 11 + }, + { + "fid": 3, + "name": "profileImageObsHash", + "type": 11 + } + ], + "SquareEventNotificationSquareDelete": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareName", + "type": 11 + }, + { + "fid": 3, + "name": "profileImageObsHash", + "type": 11 + } + ], + "SquareEventNotificationSquareChatDelete": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareChatName", + "type": 11 + }, + { + "fid": 3, + "name": "profileImageObsHash", + "type": 11 + } + ], + "SquareEventNotificationMessage": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMessage", + "struct": "SquareMessage" + }, + { + "fid": 3, + "name": "senderDisplayName", + "type": 11 + }, + { + "fid": 4, + "name": "unreadCount", + "type": 8 + }, + { + "fid": 5, + "name": "requiredToFetchChatEvents", + "type": 2 + }, + { + "fid": 6, + "name": "mentionedMessageId", + "type": 11 + }, + { + "fid": 7, + "name": "notifiedMessageType", + "struct": "NotifiedMessageType" + }, + { + "fid": 8, + "name": "reqSeq", + "type": 8 + } + ], + "SquareEventNotifiedUpdateSquareChatMember": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareChatMember", + "struct": "SquareChatMember" + } + ], + "SquareEventNotifiedUpdateSquareAuthority": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareAuthority", + "struct": "SquareAuthority" + } + ], + "SquareEventNotifiedUpdateSquareFeatureSet": [ + { + "fid": 1, + "name": "squareFeatureSet", + "struct": "SquareFeatureSet" + } + ], + "SquareEventPayload": [ + { + "fid": 1, + "name": "receiveMessage", + "struct": "SquareEventReceiveMessage" + }, + { + "fid": 2, + "name": "sendMessage", + "struct": "SquareEventSendMessage" + }, + { + "fid": 3, + "name": "notifiedJoinSquareChat", + "struct": "SquareEventNotifiedJoinSquareChat" + }, + { + "fid": 4, + "name": "notifiedInviteIntoSquareChat", + "struct": "SquareEventNotifiedInviteIntoSquareChat" + }, + { + "fid": 5, + "name": "notifiedLeaveSquareChat", + "struct": "SquareEventNotifiedLeaveSquareChat" + }, + { + "fid": 6, + "name": "notifiedDestroyMessage", + "struct": "SquareEventNotifiedDestroyMessage" + }, + { + "fid": 7, + "name": "notifiedMarkAsRead", + "struct": "SquareEventNotifiedMarkAsRead" + }, + { + "fid": 8, + "name": "notifiedUpdateSquareMemberProfile", + "struct": "SquareEventNotifiedUpdateSquareMemberProfile" + }, + { + "fid": 9, + "name": "notifiedUpdateSquare", + "struct": "SquareEventNotifiedUpdateSquare" + }, + { + "fid": 10, + "name": "notifiedUpdateSquareMember", + "struct": "SquareEventNotifiedUpdateSquareMember" + }, + { + "fid": 11, + "name": "notifiedUpdateSquareChat", + "struct": "SquareEventNotifiedUpdateSquareChat" + }, + { + "fid": 12, + "name": "notifiedUpdateSquareChatMember", + "struct": "SquareEventNotifiedUpdateSquareChatMember" + }, + { + "fid": 13, + "name": "notifiedUpdateSquareAuthority", + "struct": "SquareEventNotifiedUpdateSquareAuthority" + }, + { + "fid": 14, + "name": "notifiedUpdateSquareStatus", + "struct": "SquareEventNotifiedUpdateSquareStatus" + }, + { + "fid": 15, + "name": "notifiedUpdateSquareChatStatus", + "struct": "SquareEventNotifiedUpdateSquareChatStatus" + }, + { + "fid": 16, + "name": "notifiedCreateSquareMember", + "struct": "SquareEventNotifiedCreateSquareMember" + }, + { + "fid": 17, + "name": "notifiedCreateSquareChatMember", + "struct": "SquareEventNotifiedCreateSquareChatMember" + }, + { + "fid": 18, + "name": "notifiedUpdateSquareMemberRelation", + "struct": "SquareEventNotifiedUpdateSquareMemberRelation" + }, + { + "fid": 19, + "name": "notifiedShutdownSquare", + "struct": "SquareEventNotifiedShutdownSquare" + }, + { + "fid": 20, + "name": "notifiedKickoutFromSquare", + "struct": "SquareEventNotifiedKickoutFromSquare" + }, + { + "fid": 21, + "name": "notifiedDeleteSquareChat", + "struct": "SquareEventNotifiedDeleteSquareChat" + }, + { + "fid": 22, + "name": "notificationJoinRequest", + "struct": "SquareEventNotificationJoinRequest" + }, + { + "fid": 23, + "name": "notificationJoined", + "struct": "SquareEventNotificationMemberUpdate" + }, + { + "fid": 24, + "name": "notificationPromoteCoadmin", + "struct": "SquareEventNotificationMemberUpdate" + }, + { + "fid": 25, + "name": "notificationPromoteAdmin", + "struct": "SquareEventNotificationMemberUpdate" + }, + { + "fid": 26, + "name": "notificationDemoteMember", + "struct": "SquareEventNotificationMemberUpdate" + }, + { + "fid": 27, + "name": "notificationKickedOut", + "struct": "SquareEventNotificationMemberUpdate" + }, + { + "fid": 28, + "name": "notificationSquareDelete", + "struct": "SquareEventNotificationSquareDelete" + }, + { + "fid": 29, + "name": "notificationSquareChatDelete", + "struct": "SquareEventNotificationSquareChatDelete" + }, + { + "fid": 30, + "name": "notificationMessage", + "struct": "SquareEventNotificationMessage" + }, + { + "fid": 31, + "name": "notifiedUpdateSquareChatProfileName", + "struct": "SquareEventNotifiedUpdateSquareChatProfileName" + }, + { + "fid": 32, + "name": "notifiedUpdateSquareChatProfileImage", + "struct": "SquareEventNotifiedUpdateSquareChatProfileImage" + }, + { + "fid": 33, + "name": "notifiedUpdateSquareFeatureSet", + "struct": "SquareEventNotifiedUpdateSquareFeatureSet" + }, + { + "fid": 34, + "name": "notifiedAddBot", + "struct": "SquareEventNotifiedAddBot" + }, + { + "fid": 35, + "name": "notifiedRemoveBot", + "struct": "SquareEventNotifiedRemoveBot" + }, + { + "fid": 36, + "name": "notifiedUpdateSquareNoteStatus", + "struct": "SquareEventNotifiedUpdateSquareNoteStatus" + }, + { + "fid": 37, + "name": "notifiedUpdateSquareChatAnnouncement", + "struct": "SquareEventNotifiedUpdateSquareChatAnnouncement" + }, + { + "fid": 38, + "name": "notifiedUpdateSquareChatMaxMemberCount", + "struct": "SquareEventNotifiedUpdateSquareChatMaxMemberCount" + }, + { + "fid": 39, + "name": "notificationPostAnnouncement", + "struct": "SquareEventNotificationPostAnnouncement" + }, + { + "fid": 40, + "name": "notificationPost", + "struct": "SquareEventNotificationPost" + }, + { + "fid": 41, + "name": "mutateMessage", + "struct": "SquareEventMutateMessage" + }, + { + "fid": 42, + "name": "notificationNewChatMember", + "struct": "SquareEventNotificationNewChatMember" + }, + { + "fid": 43, + "name": "notifiedUpdateReadonlyChat", + "struct": "SquareEventNotifiedUpdateReadonlyChat" + }, + { + "fid": 44, + "name": "notifiedUpdateMessageStatus", + "struct": "SquareEventNotifiedUpdateMessageStatus" + }, + { + "fid": 45, + "name": "notificationMessageReaction", + "struct": "SquareEventNotificationMessageReaction" + }, + { + "fid": 46, + "name": "chatPopup", + "struct": "SquareEventChatPopup" + }, + { + "fid": 47, + "name": "notifiedSystemMessage", + "struct": "SquareEventNotifiedSystemMessage" + }, + { + "fid": 48, + "name": "notifiedUpdateSquareChatFeatureSet", + "struct": "SquareEventNotifiedUpdateSquareChatFeatureSet" + } + ], + "SquareEvent": [ + { + "fid": 2, + "name": "createdTime", + "type": 10 + }, + { + "fid": 3, + "name": "type", + "struct": "SquareEventType" + }, + { + "fid": 4, + "name": "payload", + "struct": "SquareEventPayload" + }, + { + "fid": 5, + "name": "syncToken", + "type": 11 + }, + { + "fid": 6, + "name": "eventStatus", + "struct": "SquareEventStatus" + } + ], + "FetchMyEventsRequest": [ + { + "fid": 1, + "name": "subscriptionId", + "type": 10 + }, + { + "fid": 2, + "name": "syncToken", + "type": 11 + }, + { + "fid": 3, + "name": "limit", + "type": 8 + }, + { + "fid": 4, + "name": "continuationToken", + "type": 11 + } + ], + "FetchMyEventsResponse": [ + { + "fid": 1, + "name": "subscription", + "struct": "SubscriptionState" + }, + { + "fid": 2, + "name": "events", + "list": "SquareEvent" + }, + { + "fid": 3, + "name": "syncToken", + "type": 11 + }, + { + "fid": 4, + "name": "continuationToken", + "type": 11 + } + ], + "FetchSquareChatEventsRequest": [ + { + "fid": 1, + "name": "subscriptionId", + "type": 10 + }, + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 3, + "name": "syncToken", + "type": 11 + }, + { + "fid": 4, + "name": "limit", + "type": 8 + }, + { + "fid": 5, + "name": "direction", + "struct": "FetchDirection" + } + ], + "FetchSquareChatEventsResponse": [ + { + "fid": 1, + "name": "subscription", + "struct": "SubscriptionState" + }, + { + "fid": 2, + "name": "events", + "list": "SquareEvent" + }, + { + "fid": 3, + "name": "syncToken", + "type": 11 + }, + { + "fid": 4, + "name": "continuationToken", + "type": 11 + } + ], + "InviteToSquareRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "invitees", + "list": 11 + }, + { + "fid": 4, + "name": "squareChatMid", + "type": 11 + } + ], + "InviteToSquareResponse": [], + "InviteToSquareChatRequest": [ + { + "fid": 1, + "name": "inviteeMids", + "list": 11 + }, + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + } + ], + "InviteToSquareChatResponse": [ + { + "fid": 1, + "name": "inviteeMids", + "list": 11 + } + ], + "GetSquareMemberRequest": [ + { + "fid": 1, + "name": "squareMemberMid", + "type": 11 + } + ], + "GetSquareMemberResponse": [ + { + "fid": 1, + "name": "squareMember", + "struct": "SquareMember" + }, + { + "fid": 2, + "name": "relation", + "struct": "SquareMemberRelation" + }, + { + "fid": 3, + "name": "oneOnOneChatMid", + "type": 11 + } + ], + "GetSquareMembersRequest": [ + { + "fid": 2, + "name": "mids", + "set": 11 + } + ], + "GetSquareMembersResponse": [ + { + "fid": 1, + "name": "members", + "struct": "SquareMember" + } + ], + "GetSquareMemberRelationsRequest": [ + { + "fid": 2, + "name": "state", + "struct": "SquareMemberRelationState" + }, + { + "fid": 3, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 4, + "name": "limit", + "type": 8 + } + ], + "GetSquareMemberRelationsResponse": [ + { + "fid": 1, + "name": "squareMembers", + "list": "SquareMember" + }, + { + "fid": 2, + "name": "relations", + "map": "SquareMemberRelation" + }, + { + "fid": 3, + "name": "continuationToken", + "type": 11 + } + ], + "GetSquareMemberRelationRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "targetSquareMemberMid", + "type": 11 + } + ], + "GetSquareMemberRelationResponse": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "targetSquareMemberMid", + "type": 11 + }, + { + "fid": 3, + "name": "relation", + "struct": "SquareMemberRelation" + } + ], + "Category": [ + { + "fid": 1, + "name": "id", + "type": 10 + }, + { + "fid": 11, + "name": "name", + "type": 11 + }, + { + "fid": 12, + "name": "newFlag", + "type": 2 + }, + { + "fid": 13, + "name": "productCount", + "type": 8 + }, + { + "fid": 14, + "name": "thumbnailUrl", + "type": 11 + } + ], + "GetSquareCategoriesRequest": [], + "GetSquareCategoriesResponse": [ + { + "fid": 1, + "name": "categoryList", + "list": "Category" + } + ], + "UpdateSquareRequest": [ + { + "fid": 2, + "name": "updatedAttrs", + "set": "SquareAttribute" + }, + { + "fid": 3, + "name": "square", + "struct": "Square" + } + ], + "UpdateSquareResponse": [ + { + "fid": 1, + "name": "updatedAttrs", + "set": "SquareAttribute" + }, + { + "fid": 2, + "name": "square", + "struct": "Square" + } + ], + "SearchSquaresRequest": [ + { + "fid": 2, + "name": "query", + "type": 11 + }, + { + "fid": 3, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 4, + "name": "limit", + "type": 8 + } + ], + "SearchSquaresResponse": [ + { + "fid": 1, + "name": "squares", + "list": "Square" + }, + { + "fid": 2, + "name": "squareStatuses", + "map": "SquareStatus" + }, + { + "fid": 3, + "name": "myMemberships", + "map": "SquareMember" + }, + { + "fid": 4, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 5, + "name": "noteStatuses", + "map": "NoteStatus" + } + ], + "GetSquareFeatureSetRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + } + ], + "GetSquareFeatureSetResponse": [ + { + "fid": 1, + "name": "squareFeatureSet", + "struct": "SquareFeatureSet" + } + ], + "UpdateSquareFeatureSetRequest": [ + { + "fid": 2, + "name": "updateAttributes", + "set": "SquareFeatureSetAttribute" + }, + { + "fid": 3, + "name": "squareFeatureSet", + "struct": "SquareFeatureSet" + } + ], + "UpdateSquareFeatureSetResponse": [ + { + "fid": 1, + "name": "updateAttributes", + "set": "SquareFeatureSetAttribute" + }, + { + "fid": 2, + "name": "squareFeatureSet", + "struct": "SquareFeatureSet" + } + ], + "UpdateSquareMemberRequest": [ + { + "fid": 2, + "name": "updatedAttrs", + "set": "SquareMemberAttribute" + }, + { + "fid": 3, + "name": "updatedPreferenceAttrs", + "set": "SquarePreferenceAttribute" + }, + { + "fid": 4, + "name": "squareMember", + "struct": "SquareMember" + } + ], + "UpdateSquareMemberResponse": [ + { + "fid": 1, + "name": "updatedAttrs", + "set": "SquareMemberAttribute" + }, + { + "fid": 2, + "name": "squareMember", + "struct": "SquareMember" + }, + { + "fid": 3, + "name": "updatedPreferenceAttrs", + "set": "SquarePreferenceAttribute" + } + ], + "UpdateSquareMembersRequest": [ + { + "fid": 2, + "name": "updatedAttrs", + "set": "SquareMemberAttribute" + }, + { + "fid": 3, + "name": "members", + "list": "SquareMember" + } + ], + "UpdateSquareMembersResponse": [ + { + "fid": 1, + "name": "updatedAttrs", + "set": "SquareMemberAttribute" + }, + { + "fid": 2, + "name": "editor", + "struct": "SquareMember" + }, + { + "fid": 3, + "name": "members", + "map": "SquareMember" + } + ], + "RejectSquareMembersRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "requestedMemberMids", + "list": 11 + } + ], + "RejectSquareMembersResponse": [ + { + "fid": 1, + "name": "rejectedMembers", + "list": "SquareMember" + }, + { + "fid": 2, + "name": "status", + "struct": "SquareStatus" + } + ], + "RemoveSubscriptionsRequest": [ + { + "fid": 2, + "name": "unsubscriptions", + "list": 10 + } + ], + "RemoveSubscriptionsResponse": [], + "RefreshSubscriptionsRequest": [ + { + "fid": 2, + "name": "subscriptions", + "list": 10 + } + ], + "RefreshSubscriptionsResponse": [ + { + "fid": 1, + "name": "ttlMillis", + "type": 10 + }, + { + "fid": 2, + "name": "subscriptionStates", + "map": "SubscriptionState" + } + ], + "UpdateSquareChatRequest": [ + { + "fid": 2, + "name": "updatedAttrs", + "set": "SquareChatAttribute" + }, + { + "fid": 3, + "name": "squareChat", + "struct": "SquareChat" + } + ], + "UpdateSquareChatResponse": [ + { + "fid": 1, + "name": "updatedAttrs", + "set": "SquareChatAttribute" + }, + { + "fid": 2, + "name": "squareChat", + "struct": "SquareChat" + } + ], + "DeleteSquareChatRequest": [ + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 3, + "name": "revision", + "type": 10 + } + ], + "DeleteSquareChatResponse": [], + "UpdateSquareChatMemberRequest": [ + { + "fid": 2, + "name": "updatedAttrs", + "set": "SquareChatMemberAttribute" + }, + { + "fid": 3, + "name": "chatMember", + "struct": "SquareChatMember" + } + ], + "UpdateSquareChatMemberResponse": [ + { + "fid": 1, + "name": "updatedChatMember", + "struct": "SquareChatMember" + } + ], + "UpdateSquareAuthorityRequest": [ + { + "fid": 2, + "name": "updateAttributes", + "set": "SquareAuthorityAttribute" + }, + { + "fid": 3, + "name": "authority", + "struct": "SquareAuthority" + } + ], + "UpdateSquareAuthorityResponse": [ + { + "fid": 1, + "name": "updatdAttributes", + "set": "SquareAuthorityAttribute" + }, + { + "fid": 2, + "name": "authority", + "struct": "SquareAuthority" + } + ], + "UpdateSquareMemberRelationRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "targetSquareMemberMid", + "type": 11 + }, + { + "fid": 4, + "name": "updatedAttrs", + "set": "SquareMemberRelationAttribute" + }, + { + "fid": 5, + "name": "relation", + "struct": "SquareMemberRelation" + } + ], + "UpdateSquareMemberRelationResponse": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "targetSquareMemberMid", + "type": 11 + }, + { + "fid": 3, + "name": "updatedAttrs", + "set": "SquareMemberRelationAttribute" + }, + { + "fid": 4, + "name": "relation", + "struct": "SquareMemberRelation" + } + ], + "ReportSquareRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "reportType", + "struct": "ReportType" + }, + { + "fid": 4, + "name": "otherReason", + "type": 11 + } + ], + "ReportSquareResponse": [], + "ReportSquareChatRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 5, + "name": "reportType", + "struct": "ReportType" + }, + { + "fid": 6, + "name": "otherReason", + "type": 11 + } + ], + "ReportSquareChatResponse": [], + "ReportSquareMessageRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + }, + { + "fid": 3, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 4, + "name": "squareMessageId", + "type": 11 + }, + { + "fid": 5, + "name": "reportType", + "struct": "ReportType" + }, + { + "fid": 6, + "name": "otherReason", + "type": 11 + } + ], + "ReportSquareMessageResponse": [], + "ReportSquareMemberRequest": [ + { + "fid": 2, + "name": "squareMemberMid", + "type": 11 + }, + { + "fid": 3, + "name": "reportType", + "struct": "ReportType" + }, + { + "fid": 4, + "name": "otherReason", + "type": 11 + }, + { + "fid": 5, + "name": "squareChatMid", + "type": 11 + } + ], + "ReportSquareMemberResponse": [], + "GetSquareRequest": [ + { + "fid": 2, + "name": "mid", + "type": 11 + } + ], + "GetSquareResponse": [ + { + "fid": 1, + "name": "square", + "struct": "Square" + }, + { + "fid": 2, + "name": "myMembership", + "struct": "SquareMember" + }, + { + "fid": 3, + "name": "squareAuthority", + "struct": "SquareAuthority" + }, + { + "fid": 4, + "name": "squareStatus", + "struct": "SquareStatus" + }, + { + "fid": 5, + "name": "squareFeatureSet", + "struct": "SquareFeatureSet" + }, + { + "fid": 6, + "name": "noteStatus", + "struct": "NoteStatus" + } + ], + "GetSquareStatusRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + } + ], + "GetSquareStatusResponse": [ + { + "fid": 1, + "name": "squareStatus", + "struct": "SquareStatus" + } + ], + "GetNoteStatusRequest": [ + { + "fid": 2, + "name": "squareMid", + "type": 11 + } + ], + "GetNoteStatusResponse": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "status", + "struct": "NoteStatus" + } + ], + "CreateSquareChatAnnouncementRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 3, + "name": "squareChatAnnouncement", + "struct": "SquareChatAnnouncement" + } + ], + "CreateSquareChatAnnouncementResponse": [ + { + "fid": 1, + "name": "announcement", + "struct": "SquareChatAnnouncement" + } + ], + "DeleteSquareChatAnnouncementRequest": [ + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 3, + "name": "announcementSeq", + "type": 10 + } + ], + "DeleteSquareChatAnnouncementResponse": [], + "GetSquareChatAnnouncementsRequest": [ + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + } + ], + "GetSquareChatAnnouncementsResponse": [ + { + "fid": 1, + "name": "announcements", + "list": "SquareChatAnnouncement" + } + ], + "GetJoinedSquareChatsRequest": [ + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "limit", + "type": 8 + } + ], + "GetJoinedSquareChatsResponse": [ + { + "fid": 1, + "name": "chats", + "list": "SquareChat" + }, + { + "fid": 2, + "name": "chatMembers", + "map": "SquareChatMember" + }, + { + "fid": 3, + "name": "statuses", + "map": "SquareChatStatus" + }, + { + "fid": 4, + "name": "continuationToken", + "type": 11 + } + ], + "UpdateBuddyProfileResult": [ + { + "fid": 1, + "name": "requestId", + "type": 11 + }, + { + "fid": 2, + "name": "state", + "struct": "BuddyResultState" + }, + { + "fid": 3, + "name": "eventNo", + "type": 8 + }, + { + "fid": 11, + "name": "receiverCount", + "type": 10 + }, + { + "fid": 12, + "name": "successCount", + "type": 10 + }, + { + "fid": 13, + "name": "failCount", + "type": 10 + }, + { + "fid": 14, + "name": "cancelCount", + "type": 10 + }, + { + "fid": 15, + "name": "unregisterCount", + "type": 10 + }, + { + "fid": 21, + "name": "timestamp", + "type": 10 + }, + { + "fid": 22, + "name": "message", + "type": 11 + } + ], + "UserAuthStatus": [ + { + "fid": 1, + "name": "phoneNumberRegistered", + "type": 2 + }, + { + "fid": 2, + "name": "registeredSnsIdTypes", + "list": "SnsIdType" + } + ], + "WapInvitation": [ + { + "fid": 1, + "name": "type", + "struct": "WapInvitationType" + }, + { + "fid": 10, + "name": "inviteeEmail", + "type": 11 + }, + { + "fid": 11, + "name": "inviterMid", + "type": 11 + }, + { + "fid": 12, + "name": "roomMid", + "type": 11 + } + ], + "GroupCall": [ + { + "fid": 1, + "name": "online", + "type": 2 + }, + { + "fid": 2, + "name": "chatMid", + "type": 11 + }, + { + "fid": 3, + "name": "hostMids", + "type": 11 + }, + { + "fid": 4, + "name": "memberMids", + "list": 11 + }, + { + "fid": 5, + "name": "started", + "type": 10 + }, + { + "fid": 6, + "name": "mediaType", + "struct": "GroupCallMediaType" + }, + { + "fid": 7, + "name": "protocol", + "struct": "GroupCallProtocol" + } + ], + "GroupCallRoute": [ + { + "fid": 1, + "name": "token", + "type": 11 + }, + { + "fid": 2, + "name": "cscf", + "struct": "CallHost" + }, + { + "fid": 3, + "name": "mix", + "struct": "CallHost" + } + ], + "LiffErrorCode": { + "1": "INVALID_REQUEST", + "2": "UNAUTHORIZED", + "3": "CONSENT_REQUIRED", + "4": "VERSION_UPDATE_REQUIRED", + "5": "COMPREHENSIVE_AGREEMENT_REQUIRED", + "6": "SPLASH_SCREEN_REQUIRED", + "100": "SERVER_ERROR" + }, + "HomeExceptionCode": { + "0": "INTERNAL_ERROR", + "1": "ILLEGAL_ARGUMENT", + "2": "VERIFICATION_FAILED", + "3": "NOT_FOUND", + "4": "RETRY_LATER", + "5": "HUMAN_VERIFICATION_REQUIRED", + "100": "INVALID_CONTEXT", + "101": "APP_UPGRADE_REQUIRED", + "102": "NO_CONTENT" + }, + "ChatappErrorCode": { + "1": "INVALID_REQUEST", + "2": "UNAUTHORIZED", + "100": "SERVER_ERROR" + }, + "MembershipErrorCode": { + "0": "ILLEGAL_ARGUMENT", + "1": "AUTHENTICATION_FAILED", + "5": "NOT_FOUND", + "20": "INTERNAL_ERROR", + "33": "MAINTENANCE_ERROR" + }, + "BotErrorCode": { + "0": "UNKNOWN", + "1": "BOT_NOT_FOUND", + "2": "BOT_NOT_AVAILABLE", + "3": "NOT_A_MEMBER", + "400": "ILLEGAL_ARGUMENT", + "401": "AUTHENTICATION_FAILED", + "500": "INTERNAL_ERROR" + }, + "BotExternalErrorCode": { + "0": "ILLEGAL_ARGUMENT", + "1": "INTERNAL_ERROR" + }, + "AccessTokenRefreshErrorCode": { + "1000": "INVALID_REQUEST", + "1001": "RETRY_REQUIRED" + }, + "AccountEapConnectErrorCode": { + "0": "INTERNAL_ERROR", + "1": "ILLEGAL_ARGUMENT", + "2": "VERIFICATION_FAILED", + "4": "RETRY_LATER", + "5": "HUMAN_VERIFICATION_REQUIRED", + "101": "APP_UPGRADE_REQUIRED" + }, + "PwlessCredentialErrorCode": { + "0": "INTERNAL_ERROR", + "1": "ILLEGAL_ARGUMENT", + "2": "VERIFICATION_FAILED", + "3": "EXTERNAL_SERVICE_UNAVAILABLE", + "4": "RETRY_LATER", + "100": "INVALID_CONTEXT", + "101": "NOT_SUPPORTED", + "102": "FORBIDDEN", + "201": "FIDO_RETRY_WITH_ANOTHER_AUTHENTICATOR" + }, + "SecondAuthFactorPinCodeErrorCode": { + "0": "INTERNAL_ERROR", + "1": "ILLEGAL_ARGUMENT", + "2": "VERIFICATION_FAILED", + "3": "RETRY_LATER", + "100": "INVALID_CONTEXT", + "101": "APP_UPGRADE_REQUIRED" + }, + "AuthErrorCode": { + "0": "INTERNAL_ERROR", + "1": "ILLEGAL_ARGUMENT", + "2": "VERIFICATION_FAILED", + "3": "NOT_FOUND", + "4": "RETRY_LATER", + "5": "HUMAN_VERIFICATION_REQUIRED", + "100": "INVALID_CONTEXT", + "101": "APP_UPGRADE_REQUIRED" + }, + "SecondaryPwlessLoginErrorCode": { + "0": "INTERNAL_ERROR", + "1": "VERIFICATION_FAILED", + "2": "LOGIN_NOT_ALLOWED", + "3": "EXTERNAL_SERVICE_UNAVAILABLE", + "4": "RETRY_LATER", + "100": "NOT_SUPPORTED", + "101": "ILLEGAL_ARGUMENT", + "102": "INVALID_CONTEXT", + "103": "FORBIDDEN", + "200": "FIDO_UNKNOWN_CREDENTIAL_ID", + "201": "FIDO_RETRY_WITH_ANOTHER_AUTHENTICATOR", + "202": "FIDO_UNACCEPTABLE_CONTENT" + }, + "SecondaryQrCodeErrorCode": { + "0": "INTERNAL_ERROR", + "1": "ILLEGAL_ARGUMENT", + "2": "VERIFICATION_FAILED", + "3": "NOT_ALLOWED_QR_CODE_LOGIN", + "4": "VERIFICATION_NOTICE_FAILED", + "5": "RETRY_LATER", + "100": "INVALID_CONTEXT", + "101": "APP_UPGRADE_REQUIRED" + }, + "PaymentErrorCode": { + "0": "SUCCESS", + "1000": "GENERAL_USER_ERROR", + "1101": "ACCOUNT_NOT_EXISTS", + "1102": "ACCOUNT_INVALID_STATUS", + "1103": "ACCOUNT_ALREADY_EXISTS", + "1104": "MERCHANT_NOT_EXISTS", + "1105": "MERCHANT_INVALID_STATUS", + "1107": "AGREEMENT_REQUIRED", + "1108": "BLACKLISTED", + "1109": "WRONG_PASSWORD", + "1110": "INVALID_CREDIT_CARD", + "1111": "LIMIT_EXCEEDED", + "1115": "CANNOT_PROCEED", + "1120": "TOO_WEAK_PASSWORD", + "1125": "CANNOT_CREATE_ACCOUNT", + "1130": "TEMPORARY_PASSWORD_ERROR", + "1140": "MISSING_PARAMETERS", + "1141": "NO_VALID_MYCODE_ACCOUNT", + "1142": "INSUFFICIENT_BALANCE", + "1150": "TRANSACTION_NOT_FOUND", + "1152": "TRANSACTION_FINISHED", + "1153": "PAYMENT_AMOUNT_WRONG", + "1157": "BALANCE_ACCOUNT_NOT_EXISTS", + "1158": "DUPLICATED_CITIZEN_ID", + "1159": "PAYMENT_REQUEST_NOT_FOUND", + "1169": "AUTH_FAILED", + "1171": "PASSWORD_SETTING_REQUIRED", + "1172": "TRANSACTION_ALREADY_PROCESSED", + "1178": "CURRENCY_NOT_SUPPORTED", + "1180": "PAYMENT_NOT_AVAILABLE", + "1181": "TRANSFER_REQUEST_NOT_FOUND", + "1183": "INVALID_PAYMENT_AMOUNT", + "1184": "INSUFFICIENT_PAYMENT_AMOUNT", + "1185": "EXTERNAL_SYSTEM_MAINTENANCE", + "1186": "EXTERNAL_SYSTEM_INOPERATIONAL", + "1192": "SESSION_EXPIRED", + "1195": "UPGRADE_REQUIRED", + "1196": "REQUEST_TOKEN_EXPIRED", + "1198": "OPERATION_FINISHED", + "1199": "EXTERNAL_SYSTEM_ERROR", + "1299": "PARTIAL_AMOUNT_APPROVED", + "1600": "PINCODE_AUTH_REQUIRED", + "1601": "ADDITIONAL_AUTH_REQUIRED", + "1603": "NOT_BOUND", + "1610": "OTP_USER_REGISTRATION_ERROR", + "1611": "OTP_CARD_REGISTRATION_ERROR", + "1612": "NO_AUTH_METHOD", + "1696": "GENERAL_USER_ERROR_RESTART", + "1697": "GENERAL_USER_ERROR_REFRESH", + "1698": "GENERAL_USER_ERROR_CLOSE", + "9000": "INTERNAL_SERVER_ERROR", + "9999": "INTERNAL_SYSTEM_MAINTENANCE", + "10000": "UNKNOWN_ERROR" + }, + "SettingsErrorCode": { + "0": "UNKNOWN", + "1": "NONE", + "16641": "ILLEGAL_ARGUMENT", + "16642": "NOT_FOUND", + "16643": "NOT_AVAILABLE", + "16644": "TOO_LARGE_VALUE", + "16645": "CLOCK_DRIFT_DETECTED", + "16646": "UNSUPPORTED_APPLICATION_TYPE", + "16647": "DUPLICATED_ENTRY", + "16897": "AUTHENTICATION_FAILED", + "20737": "INTERNAL_SERVER_ERROR", + "20738": "SERVICE_IN_MAINTENANCE_MODE", + "20739": "SERVICE_UNAVAILABLE" + }, + "ThingsErrorCode": { + "0": "INTERNAL_SERVER_ERROR", + "1": "UNAUTHORIZED", + "2": "INVALID_REQUEST", + "3": "INVALID_STATE", + "4096": "DEVICE_LIMIT_EXCEEDED", + "4097": "UNSUPPORTED_REGION" + }, + "SuggestTrialErrorCode": { + "0": "UNKNOWN", + "1": "NONE", + "16641": "ILLEGAL_ARGUMENT", + "16642": "NOT_FOUND", + "16643": "NOT_AVAILABLE", + "16897": "AUTHENTICATION_FAILED", + "20737": "INTERNAL_SERVER_ERROR", + "20739": "SERVICE_UNAVAILABLE" + }, + "LFLPremiumErrorCode": { + "16641": "ILLEGAL_ARGUMENT", + "16642": "MAJOR_VERSION_NOT_SUPPORTED", + "16897": "AUTHENTICATION_FAILED", + "20737": "INTERNAL_SERVER_ERROR" + }, + "WalletErrorCode": { + "400": "INVALID_PARAMETER", + "401": "AUTHENTICATION_FAILED", + "500": "INTERNAL_SERVER_ERROR", + "503": "SERVICE_IN_MAINTENANCE_MODE" + }, + "ShopErrorCode": { + "0": "UNKNOWN", + "1": "NONE", + "16641": "ILLEGAL_ARGUMENT", + "16642": "NOT_FOUND", + "16643": "NOT_AVAILABLE", + "16644": "NOT_PAID_PRODUCT", + "16645": "NOT_FREE_PRODUCT", + "16646": "ALREADY_OWNED", + "16647": "ERROR_WITH_CUSTOM_MESSAGE", + "16648": "NOT_AVAILABLE_TO_RECIPIENT", + "16649": "NOT_AVAILABLE_FOR_CHANNEL_ID", + "16650": "NOT_SALE_FOR_COUNTRY", + "16651": "NOT_SALES_PERIOD", + "16652": "NOT_SALE_FOR_DEVICE", + "16653": "NOT_SALE_FOR_VERSION", + "16654": "ALREADY_EXPIRED", + "16655": "LIMIT_EXCEEDED", + "16656": "MISSING_CAPABILITY", + "16897": "AUTHENTICATION_FAILED", + "17153": "BALANCE_SHORTAGE", + "20737": "INTERNAL_SERVER_ERROR", + "20738": "SERVICE_IN_MAINTENANCE_MODE", + "20739": "SERVICE_UNAVAILABLE" + }, + "E2EEKeyBackupErrorCode": { + "0": "ILLEGAL_ARGUMENT", + "1": "AUTHENTICATION_FAILED", + "2": "INTERNAL_ERROR", + "3": "RESTORE_KEY_FIRST", + "4": "NO_BACKUP", + "5": "LOCKOUT", + "6": "INVALID_PIN" + }, + "TalkSyncReason": { + "0": "UNSPECIFIED", + "1": "UNKNOWN", + "2": "INITIALIZATION", + "3": "OPERATION", + "4": "FULL_SYNC", + "5": "AUTO_REPAIR", + "6": "MANUAL_REPAIR", + "7": "INTERNAL", + "8": "USER_INITIATED" + }, + "AppExtensionType": { + "1": "SIRI", + "2": "GOOGLE_ASSISTANT", + "3": "OS_SHARE" + }, + "PredefinedReactionType": { + "2": "NICE", + "3": "LOVE", + "4": "FUN", + "5": "AMAZING", + "6": "SAD", + "7": "OMG" + }, + "GeolocationAccuracyMode": { + "0": "UNKNOWN", + "1": "IOS_REDUCED_ACCURACY", + "2": "IOS_FULL_ACCURACY", + "3": "AOS_PRECISE_LOCATION", + "4": "AOS_APPROXIMATE_LOCATION" + }, + "ContactCalendarEventType": { + "0": "BIRTHDAY" + }, + "ContactCalendarEventState": { + "0": "SHOW", + "1": "HIDE" + }, + "UserAllowProfileHistoryType": { + "0": "OWNER", + "1": "FRIEND" + }, + "UserStatusMessageHistoryType": { + "1": "NONE", + "2": "ALL" + }, + "UserSharePersonalInfoToFriendsType": { + "0": "NEVER_SHOW", + "1": "ONE_WAY", + "2": "MUTUAL" + }, + "CharType": { + "0": "GROUP", + "1": "ROOM", + "2": "PEER" + }, + "ChatAttribute": { + "1": "NAME", + "2": "PICTURE_STATUS", + "4": "PREVENTED_JOIN_BY_TICKET", + "8": "NOTIFICATION_SETTING", + "16": "INVITATION_TICKET", + "32": "FAVORITE_TIMESTAMP", + "64": "CHAT_TYPE" + }, + "BuddyBotActiveStatus": { + "0": "UNSPECIFIED", + "1": "INACTIVE", + "2": "ACTIVE", + "3": "DELETED" + }, + "GroupCallProtocol": { + "1": "STANDARD", + "2": "CONSTELLA" + }, + "GlobalEventType": { + "0": "DUMMY", + "1": "NOTICE", + "2": "MORETAB", + "3": "STICKERSHOP", + "4": "CHANNEL", + "5": "DENY_KEYWORD", + "6": "CONNECTIONINFO", + "7": "BUDDY", + "8": "TIMELINEINFO", + "9": "THEMESHOP", + "10": "CALLRATE", + "11": "CONFIGURATION", + "12": "STICONSHOP", + "13": "SUGGESTDICTIONARY", + "14": "SUGGESTSETTINGS", + "15": "USERSETTINGS", + "16": "ANALYTICSINFO", + "17": "SEARCHPOPULARKEYWORD", + "18": "SEARCHNOTICE", + "19": "TIMELINE", + "20": "SEARCHPOPULARCATEGORY", + "21": "EXTENDEDPROFILE", + "22": "SEASONALMARKETING", + "23": "NEWSTAB", + "24": "SUGGESTDICTIONARYV2", + "25": "CHATAPPSYNC", + "26": "AGREEMENTS", + "27": "INSTANTNEWS", + "28": "EMOJI_MAPPING", + "29": "SEARCHBARKEYWORDS", + "30": "SHOPPING", + "31": "CHAT_EFFECT_BACKGROUND", + "32": "CHAT_EFFECT_KEYWORD", + "33": "SEARCHINDEX", + "34": "HUBTAB", + "35": "PAY_RULE_UPDATED", + "36": "SMARTCH", + "37": "HOME_SERVICE_LIST", + "38": "TIMELINESTORY", + "39": "WALLET_TAB", + "40": "POD_TAB", + "41": "HOME_SAFETY_CHECK" + }, + "SyncCategories": { + "0": "ALL", + "1": "PROFILE", + "2": "SETTINGS", + "3": "CONFIGURATIONS", + "4": "CONTACT", + "5": "GROUP", + "6": "E2EE", + "7": "MESSAGE" + }, + "MediaMessageFlow": { + "1": "V1", + "2": "V2" + }, + "MessageReactionType": { + "0": "ALL", + "1": "UNDO", + "2": "NICE", + "3": "LOVE", + "4": "FUN", + "5": "AMAZING", + "6": "SAD", + "7": "OMG" + }, + "PictureSource": { + "1": "NFT", + "2": "AVATAR", + "3": "SNOW", + "4": "ARCZ" + }, + "RejectionReason": { + "0": "UNKNOWN", + "1": "INVALID_TARGET_USER", + "2": "AGE_VALIDATION", + "3": "TOO_MANY_FRIENDS", + "4": "TOO_MANY_REQUESTS", + "5": "MALFORMED_REQUEST" + }, + "UpdateChatRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "chat", + "struct": "Chat" + }, + { + "fid": 3, + "name": "updatedAttribute", + "type": 8 + } + ], + "UpdateChatResponse": [], + "AcceptChatInvitationByTicketRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "chatMid", + "type": 11 + }, + { + "fid": 3, + "name": "ticketId", + "type": 11 + } + ], + "AcceptChatInvitationByTicketResponse": [], + "AcceptChatInvitationRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "chatMid", + "type": 11 + } + ], + "ReissueChatTicketRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "groupMid", + "type": 11 + } + ], + "AcceptChatInvitationResponse": [], + "ReissueChatTicketResponse": [ + { + "fid": 1, + "name": "ticketId", + "type": 11 + } + ], + "RejectChatInvitationRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "chatMid", + "type": 11 + } + ], + "GetAllChatMidsRequest": [ + { + "fid": 1, + "name": "withMemberChats", + "type": 2 + }, + { + "fid": 2, + "name": "withInvitedChats", + "type": 2 + } + ], + "RejectChatInvitationResponse": [], + "GetAllChatMidsResponse": [ + { + "fid": 1, + "name": "memberChatMids", + "set": 11 + }, + { + "fid": 2, + "name": "invitedChatMids", + "set": 11 + } + ], + "CreateChatRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "type", + "type": 8 + }, + { + "fid": 3, + "name": "name", + "type": 11 + }, + { + "fid": 4, + "name": "targetUserMids", + "set": 11 + }, + { + "fid": 5, + "name": "picturePath", + "type": 11 + } + ], + "CreateChatResponse": [ + { + "fid": 1, + "name": "chat", + "struct": "Chat" + } + ], + "BeaconCondition": [ + { + "fid": 1, + "name": "inFriends", + "type": 11 + }, + { + "fid": 2, + "name": "notInFriends", + "type": 11 + }, + { + "fid": 3, + "name": "termsAgreed", + "type": 2 + } + ], + "BeaconBackgroundNotification": [ + { + "fid": 1, + "name": "actionInterval", + "type": 10 + }, + { + "fid": 2, + "name": "actionAndConditions", + "list": "BeaconCondition" + }, + { + "fid": 3, + "name": "actionDelay", + "type": 10 + }, + { + "fid": 4, + "name": "actionConditions", + "list": "BeaconCondition" + } + ], + "LiffErrorPayload": [ + { + "fid": 3, + "name": "consentRequired", + "struct": "LiffErrorConsentRequired" + } + ], + "LiffErrorConsentRequired": [ + { + "fid": 1, + "name": "channelId", + "type": 11 + }, + { + "fid": 2, + "name": "consentUrl", + "type": 11 + } + ], + "UserRestrictionExtraInfo": [ + { + "fid": 1, + "name": "linkUrl", + "type": 11 + } + ], + "WebAuthDetails": [ + { + "fid": 1, + "name": "baseUrl", + "type": 11 + }, + { + "fid": 2, + "name": "token", + "type": 11 + } + ], + "AvatarProfile": [ + { + "fid": 1, + "name": "version", + "type": 11 + }, + { + "fid": 2, + "name": "updatedMillis", + "type": 10 + }, + { + "fid": 3, + "name": "thumbnail", + "type": 11 + }, + { + "fid": 4, + "name": "usablePublicly", + "type": 2 + } + ], + "Reaction": [ + { + "fid": 1, + "name": "fromUserMid", + "type": 11 + }, + { + "fid": 2, + "name": "atMillis", + "type": 10 + }, + { + "fid": 3, + "name": "reactionType", + "struct": "ReactionType" + } + ], + "ReactionType": [ + { + "fid": 1, + "name": "predefinedReactionType", + "struct": "PredefinedReactionType" + } + ], + "ReactRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "messageId", + "type": 10 + }, + { + "fid": 3, + "name": "reactionType", + "struct": "ReactionType" + } + ], + "GeolocationAccuracy": [ + { + "fid": 1, + "name": "radiusMeters", + "type": 4 + }, + { + "fid": 2, + "name": "radiusConfidence", + "type": 4 + }, + { + "fid": 3, + "name": "altitudeAccuracy", + "type": 4 + }, + { + "fid": 4, + "name": "velocityAccuracy", + "type": 4 + }, + { + "fid": 5, + "name": "bearingAccuracy", + "type": 4 + }, + { + "fid": 6, + "name": "accuracyMode", + "struct": "GeolocationAccuracyMode" + } + ], + "GetContactsV2Request": [ + { + "fid": 1, + "name": "targetUserMids", + "list": 11 + }, + { + "fid": 2, + "name": "neededContactCalendarEvents", + "set": "ContactCalendarEventType" + }, + { + "fid": 3, + "name": "withUserStatus", + "type": 2 + } + ], + "GetContactsV2Response": [ + { + "fid": 1, + "name": "contacts", + "map": "ContactEntry" + } + ], + "ContactEntry": [ + { + "fid": 1, + "name": "userStatus", + "struct": "UserStatus" + }, + { + "fid": 2, + "name": "snapshotTimeMillis", + "type": 10 + }, + { + "fid": 3, + "name": "contact", + "struct": "Contact" + }, + { + "fid": 4, + "name": "calendarEvents", + "struct": "ContactCalendarEvents" + } + ], + "ContactCalendarEvents": [ + { + "fid": 1, + "name": "events", + "map": "ContactCalendarEvent" + } + ], + "ContactCalendarEvent": [ + { + "fid": 1, + "name": "id", + "type": 11 + }, + { + "fid": 2, + "name": "state", + "struct": "ContactCalendarEventState" + }, + { + "fid": 3, + "name": "year", + "type": 8 + }, + { + "fid": 4, + "name": "month", + "type": 8 + }, + { + "fid": 5, + "name": "day", + "type": 8 + } + ], + "Configurations": [ + { + "fid": 1, + "name": "revision", + "type": 10 + }, + { + "fid": 2, + "name": "configMap", + "map": 11 + } + ], + "E2EEGroupSharedKey": [ + { + "fid": 1, + "name": "keyVersion", + "type": 8 + }, + { + "fid": 2, + "name": "groupKeyId", + "type": 8 + }, + { + "fid": 3, + "name": "creator", + "type": 11 + }, + { + "fid": 4, + "name": "creatorKeyId", + "type": 8 + }, + { + "fid": 5, + "name": "receiver", + "type": 11 + }, + { + "fid": 6, + "name": "receiverKeyId", + "type": 8 + }, + { + "fid": 7, + "name": "encryptedSharedKey" + }, + { + "fid": 8, + "name": "allowedTypes", + "set": "ContentType" + }, + { + "fid": 9, + "name": "specVersion", + "type": 8 + } + ], + "FollowRequest": [ + { + "fid": 1, + "name": "followMid", + "struct": "FollowMid" + } + ], + "FollowMid": [ + { + "fid": 1, + "name": "mid", + "type": 11 + }, + { + "fid": 2, + "name": "eMid", + "type": 11 + } + ], + "UnfollowRequest": [ + { + "fid": 1, + "name": "followMid", + "struct": "FollowMid" + } + ], + "GetChatsRequest": [ + { + "fid": 1, + "name": "chatMids", + "list": 11 + }, + { + "fid": 2, + "name": "withMembers", + "type": 2 + }, + { + "fid": 3, + "name": "withInvitees", + "type": 2 + } + ], + "GetChatsResponse": [ + { + "fid": 1, + "name": "chats", + "list": "Chat" + } + ], + "Chat": [ + { + "fid": 1, + "name": "type", + "struct": "CharType" + }, + { + "fid": 2, + "name": "chatMid", + "type": 11 + }, + { + "fid": 3, + "name": "createdTime", + "type": 10 + }, + { + "fid": 4, + "name": "notificationDisabled", + "type": 2 + }, + { + "fid": 5, + "name": "favoriteTimestamp", + "type": 10 + }, + { + "fid": 6, + "name": "chatName", + "type": 11 + }, + { + "fid": 7, + "name": "picturePath", + "type": 11 + }, + { + "fid": 8, + "name": "extra", + "struct": "Extra" + } + ], + "Extra": [ + { + "fid": 1, + "name": "groupExtra", + "struct": "GroupExtra" + }, + { + "fid": 2, + "name": "peerExtra", + "struct": "PeerExtra" + } + ], + "GroupExtra": [ + { + "fid": 1, + "name": "creator", + "type": 11 + }, + { + "fid": 2, + "name": "preventedJoinByTicket", + "type": 2 + }, + { + "fid": 3, + "name": "invitationTicket", + "type": 11 + }, + { + "fid": 4, + "name": "memberMids", + "map": 10 + }, + { + "fid": 5, + "name": "inviteeMids", + "map": 10 + }, + { + "fid": 6, + "name": "addFriendDisabled", + "type": 2 + }, + { + "fid": 7, + "name": "ticketDisabled", + "type": 2 + } + ], + "PeerExtra": [], + "GetFollowersRequest": [ + { + "fid": 1, + "name": "followMid", + "struct": "FollowMid" + }, + { + "fid": 2, + "name": "cursor", + "type": 11 + } + ], + "GetFollowersResponse": [ + { + "fid": 1, + "name": "profiles", + "list": "FollowProfile" + }, + { + "fid": 2, + "name": "cursor", + "type": 11 + }, + { + "fid": 3, + "name": "followingCount", + "type": 10 + }, + { + "fid": 4, + "name": "followerCount", + "type": 10 + } + ], + "FollowProfile": [ + { + "fid": 1, + "name": "followMid", + "struct": "FollowMid" + }, + { + "fid": 2, + "name": "displayName", + "type": 11 + }, + { + "fid": 3, + "name": "picturePath", + "type": 11 + }, + { + "fid": 4, + "name": "following", + "type": 2 + }, + { + "fid": 5, + "name": "allowFollow", + "type": 2 + }, + { + "fid": 6, + "name": "followBuddyDetail", + "struct": "FollowBuddyDetail" + } + ], + "FollowBuddyDetail": [ + { + "fid": 1, + "name": "iconType", + "type": 8 + } + ], + "GetFollowingsRequest": [ + { + "fid": 1, + "name": "followMid", + "struct": "FollowMid" + }, + { + "fid": 2, + "name": "cursor", + "type": 11 + } + ], + "GetFollowingsResponse": [ + { + "fid": 1, + "name": "profiles", + "list": "FollowProfile" + }, + { + "fid": 2, + "name": "cursor", + "type": 11 + }, + { + "fid": 3, + "name": "followingCount", + "type": 10 + }, + { + "fid": 4, + "name": "followerCount", + "type": 10 + } + ], + "GetE2EEKeyBackupCertificatesRequest": [], + "GetE2EEKeyBackupCertificatesResponse": [ + { + "fid": 1, + "name": "urlHashList", + "list": 11 + } + ], + "DeleteOtherFromChatRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "chatMid", + "type": 11 + }, + { + "fid": 3, + "name": "targetUserMids", + "set": 11 + } + ], + "DeleteOtherFromChatResponse": [], + "InviteIntoChatRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "chatMid", + "type": 11 + }, + { + "fid": 3, + "name": "targetUserMids", + "set": 11 + } + ], + "InviteIntoChatResponse": [], + "CancelChatInvitationRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "chatMid", + "type": 11 + }, + { + "fid": 3, + "name": "targetUserMids", + "set": 11 + } + ], + "CancelChatInvitationResponse": [], + "DeleteSelfFromChatRequest": [ + { + "fid": 1, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 2, + "name": "chatMid", + "type": 11 + }, + { + "fid": 3, + "name": "lastSeenMessageDeliveredTime", + "type": 10 + }, + { + "fid": 4, + "name": "lastSeenMessageId", + "type": 11 + }, + { + "fid": 5, + "name": "lastMessageDeliveredTime", + "type": 10 + }, + { + "fid": 6, + "name": "lastMessageId", + "type": 11 + } + ], + "DeleteSelfFromChatResponse": [], + "FindChatByTicketRequest": [ + { + "fid": 1, + "name": "ticketId", + "type": 11 + } + ], + "FindChatByTicketResponse": [ + { + "fid": 1, + "name": "chat", + "struct": "Chat" + } + ], + "RefreshAccessTokenRequest": [ + { + "fid": 1, + "name": "refreshToken", + "type": 11 + } + ], + "RefreshAccessTokenResponse": [ + { + "fid": 1, + "name": "accessToken", + "type": 11 + }, + { + "fid": 2, + "name": "durationUntilRefreshInSec", + "type": 10 + }, + { + "fid": 3, + "name": "retryPolicy", + "struct": "RetryPolicy" + }, + { + "fid": 4, + "name": "tokenIssueTimeEpochSec", + "type": 10 + }, + { + "fid": 5, + "name": "refreshToken", + "type": 11 + } + ], + "RetryPolicy": [ + { + "fid": 1, + "name": "initialDelayInMillis", + "type": 10 + }, + { + "fid": 2, + "name": "maxDelayInMillis", + "type": 10 + }, + { + "fid": 3, + "name": "multiplier", + "type": 4 + }, + { + "fid": 4, + "name": "jitterRate", + "type": 4 + } + ], + "GetPreviousMessagesV2Request": [ + { + "fid": 1, + "name": "messageBoxId", + "type": 11 + }, + { + "fid": 2, + "name": "endMessageId", + "struct": "MessageBoxV2MessageId" + }, + { + "fid": 3, + "name": "messagesCount", + "type": 8 + }, + { + "fid": 4, + "name": "withReadCount", + "type": 2 + }, + { + "fid": 5, + "name": "receivedOnly", + "type": 2 + } + ], + "SyncResponse": [ + { + "fid": 1, + "name": "operationResponse", + "struct": "OperationResponse" + }, + { + "fid": 2, + "name": "fullSyncResponse", + "struct": "FullSyncResponse" + }, + { + "fid": 3, + "name": "partialFullSyncResponse", + "struct": "PartialFullSyncResponse" + } + ], + "OperationResponse": [ + { + "fid": 1, + "name": "operations", + "list": "Operation" + }, + { + "fid": 2, + "name": "hasMoreOps", + "type": 2 + }, + { + "fid": 3, + "name": "globalEvents", + "struct": "TGlobalEvents" + }, + { + "fid": 4, + "name": "individualEvents", + "struct": "TIndividualEvents" + } + ], + "FullSyncResponse": [ + { + "fid": 1, + "name": "reasons", + "set": "SyncTriggerReason" + }, + { + "fid": 2, + "name": "nextRevision", + "type": 10 + } + ], + "PartialFullSyncResponse": [ + { + "fid": 1, + "name": "targetCategories", + "map": 10 + } + ], + "TGlobalEvents": [ + { + "fid": 1, + "name": "events", + "map": "GlobalEvent" + }, + { + "fid": 2, + "name": "lastRevision", + "type": 10 + } + ], + "TIndividualEvents": [ + { + "fid": 1, + "name": "events", + "set": "NotificationStatus" + }, + { + "fid": 2, + "name": "lastRevision", + "type": 10 + } + ], + "DetermineMediaMessageFlowResponse": [ + { + "fid": 1, + "name": "flowMap", + "map": "MediaMessageFlow" + }, + { + "fid": 2, + "name": "cacheTtlMillis", + "type": 10 + } + ], + "ChatRoomAnnouncementContentMetadata": [ + { + "fid": 1, + "name": "replace", + "type": 11 + }, + { + "fid": 2, + "name": "sticonOwnership", + "type": 11 + }, + { + "fid": 3, + "name": "postNotificationMetadata", + "type": 11 + } + ], + "DisasterInfo": [ + { + "fid": 1, + "name": "disasterId", + "type": 11 + }, + { + "fid": 2, + "name": "title", + "type": 11 + }, + { + "fid": 3, + "name": "region", + "type": 11 + }, + { + "fid": 4, + "name": "disasterDescription", + "type": 11 + }, + { + "fid": 5, + "name": "seeMoreUrl", + "type": 11 + }, + { + "fid": 7, + "name": "status", + "type": 8 + } + ], + "GetDisasterCasesRequest": [], + "GetDisasterCasesResponse": [ + { + "fid": 1, + "name": "disasters", + "list": "DisasterInfo" + }, + { + "fid": 2, + "name": "messageTemplate", + "list": 11 + }, + { + "fid": 3, + "name": "ttlInMillis", + "type": 10 + } + ], + "SquareMessageState": { + "1": "SENT", + "2": "DELETED", + "3": "FORBIDDEN", + "4": "UNSENT" + }, + "SquareMessageReaction": [ + { + "fid": 1, + "name": "type", + "struct": "MessageReactionType" + }, + { + "fid": 2, + "name": "reactor", + "struct": "SquareMember" + }, + { + "fid": 3, + "name": "createdAt", + "type": 10 + }, + { + "fid": 4, + "name": "updatedAt", + "type": 10 + } + ], + "SquareMessageReactionStatus": [ + { + "fid": 1, + "name": "totalCount", + "type": 8 + }, + { + "fid": 2, + "name": "countByReactionType", + "map": 8 + }, + { + "fid": 3, + "name": "myReaction", + "struct": "SquareMessageReaction" + } + ], + "SquareEventMutateMessage": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMessage", + "struct": "SquareMessage" + }, + { + "fid": 3, + "name": "reqSeq", + "type": 8 + }, + { + "fid": 4, + "name": "senderDisplayName", + "type": 11 + } + ], + "SquareEmblem": { + "1": "SUPER", + "2": "OFFICIAL" + }, + "SquareJoinMethodType": { + "0": "NONE", + "1": "APPROVAL", + "2": "CODE" + }, + "ApprovalValue": [ + { + "fid": 1, + "name": "message", + "type": 11 + } + ], + "CodeValue": [ + { + "fid": 1, + "name": "code", + "type": 11 + } + ], + "SquareJoinMethodValue": [ + { + "fid": 1, + "name": "approvalValue", + "struct": "ApprovalValue" + }, + { + "fid": 2, + "name": "codeValue", + "struct": "CodeValue" + } + ], + "SquareJoinMethod": [ + { + "fid": 1, + "name": "type", + "struct": "SquareJoinMethodType" + }, + { + "fid": 2, + "name": "value", + "struct": "SquareJoinMethodValue" + } + ], + "MessageVisibility": [ + { + "fid": 1, + "name": "showJoinMessage", + "type": 2 + }, + { + "fid": 2, + "name": "showLeaveMessage", + "type": 2 + }, + { + "fid": 3, + "name": "showKickoutMessage", + "type": 2 + } + ], + "SquareEventNotifiedUpdateSquareChatMaxMemberCount": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "maxMemberCount", + "type": 8 + }, + { + "fid": 3, + "name": "editor", + "struct": "SquareMember" + } + ], + "SquareEventNotifiedAddBot": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMember", + "struct": "SquareMember" + }, + { + "fid": 3, + "name": "botMid", + "type": 11 + }, + { + "fid": 4, + "name": "botDisplayName", + "type": 11 + } + ], + "SquareEventNotifiedRemoveBot": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareMember", + "struct": "SquareMember" + }, + { + "fid": 3, + "name": "botMid", + "type": 11 + }, + { + "fid": 4, + "name": "botDisplayName", + "type": 11 + } + ], + "SquareEventNotifiedUpdateReadonlyChat": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "readonly", + "type": 2 + } + ], + "MessageStatusType": {}, + "MessageStatusContents": [ + { + "fid": 1, + "name": "messageReactionStatus", + "struct": "SquareMessageReactionStatus" + } + ], + "SquareMessageStatus": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "globalMessageId", + "type": 11 + }, + { + "fid": 3, + "name": "type", + "struct": "MessageStatusType" + }, + { + "fid": 4, + "name": "contents", + "struct": "MessageStatusContents" + }, + { + "fid": 5, + "name": "publishedAt", + "type": 10 + } + ], + "SquareEventNotifiedUpdateMessageStatus": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "messageId", + "type": 11 + }, + { + "fid": 3, + "name": "messageStatus", + "struct": "SquareMessageStatus" + } + ], + "UrlButton": [ + { + "fid": 1, + "name": "text", + "type": 11 + }, + { + "fid": 2, + "name": "url", + "type": 11 + } + ], + "TextButton": [ + { + "fid": 1, + "name": "text", + "type": 11 + } + ], + "OkButton": [ + { + "fid": 1, + "name": "text", + "type": 11 + } + ], + "ButtonContent": [ + { + "fid": 1, + "name": "urlButton", + "struct": "UrlButton" + }, + { + "fid": 2, + "name": "textButton", + "struct": "TextButton" + }, + { + "fid": 3, + "name": "okButton", + "struct": "OkButton" + } + ], + "SquareEventChatPopup": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "popupId", + "type": 10 + }, + { + "fid": 3, + "name": "flexJson", + "type": 11 + }, + { + "fid": 4, + "name": "button", + "struct": "ButtonContent" + } + ], + "SquareEventNotifiedSystemMessage": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "text", + "type": 11 + } + ], + "NotifiedMessageType": { + "1": "MENTION", + "2": "REPLY" + }, + "SquareChatFeatureControlState": { + "1": "DISABLED", + "2": "ENABLED" + }, + "SquareChatFeature": [ + { + "fid": 1, + "name": "controlState", + "struct": "SquareChatFeatureControlState" + }, + { + "fid": 2, + "name": "booleanValue", + "struct": "BooleanState" + } + ], + "SquareChatFeatureSet": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "revision", + "type": 10 + }, + { + "fid": 11, + "name": "disableUpdateMaxChatMemberCount", + "struct": "SquareChatFeature" + }, + { + "fid": 12, + "name": "disableMarkAsReadEvent", + "struct": "SquareChatFeature" + } + ], + "SquareEventNotifiedUpdateSquareChatFeatureSet": [ + { + "fid": 1, + "name": "squareChatFeatureSet", + "struct": "SquareChatFeatureSet" + } + ], + "SquareEventNotifiedUpdateSquareNoteStatus": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "noteStatus", + "struct": "NoteStatus" + } + ], + "SquareEventNotifiedUpdateSquareChatAnnouncement": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "announcementSeq", + "type": 10 + } + ], + "SquareEventNotificationPostAnnouncement": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareName", + "type": 11 + }, + { + "fid": 3, + "name": "squareProfileImageObsHash", + "type": 11 + }, + { + "fid": 4, + "name": "actionUri", + "type": 11 + } + ], + "NotificationPostType": { + "2": "POST_MENTION", + "3": "POST_LIKE", + "4": "POST_COMMENT", + "5": "POST_COMMENT_MENTION", + "6": "POST_COMMENT_LIKE", + "7": "POST_RELAY_JOIN" + }, + "SquareEventNotificationPost": [ + { + "fid": 1, + "name": "squareMid", + "type": 11 + }, + { + "fid": 2, + "name": "notificationPostType", + "struct": "NotificationPostType" + }, + { + "fid": 3, + "name": "thumbnailObsHash", + "type": 11 + }, + { + "fid": 4, + "name": "text", + "type": 11 + }, + { + "fid": 5, + "name": "actionUri", + "type": 11 + } + ], + "SquareEventNotificationNewChatMember": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareChatName", + "type": 11 + } + ], + "SquareEventNotificationMessageReaction": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "messageId", + "type": 11 + }, + { + "fid": 3, + "name": "squareChatName", + "type": 11 + }, + { + "fid": 4, + "name": "reactorName", + "type": 11 + }, + { + "fid": 5, + "name": "thumbnailObsHash", + "type": 11 + }, + { + "fid": 6, + "name": "messageText", + "type": 11 + }, + { + "fid": 7, + "name": "type", + "struct": "MessageReactionType" + } + ], + "UnsendMessageResponse": [ + { + "fid": 1, + "name": "unsentMessage", + "struct": "SquareMessage" + } + ], + "GetSquareEmidResponse": [ + { + "fid": 1, + "name": "squareEmid", + "type": 11 + } + ], + "GetSquareMembersBySquareResponse": [ + { + "fid": 1, + "name": "members", + "list": "SquareMember" + } + ], + "ManualRepairResponse": [ + { + "fid": 1, + "name": "events", + "list": "SquareEvent" + }, + { + "fid": 2, + "name": "syncToken", + "type": 11 + }, + { + "fid": 3, + "name": "continuationToken", + "type": 11 + } + ], + "InviteIntoSquareChatResponse": [ + { + "fid": 1, + "name": "inviteeMids", + "list": 11 + } + ], + "ReactToMessageResponse": [ + { + "fid": 1, + "name": "reaction", + "struct": "SquareMessageReaction" + }, + { + "fid": 2, + "name": "status", + "struct": "SquareMessageReactionStatus" + } + ], + "GetSquareChatFeatureSetResponse": [ + { + "fid": 1, + "name": "squareChatFeatureSet", + "struct": "SquareChatFeatureSet" + } + ], + "SyncSquareMembersResponse": [ + { + "fid": 1, + "name": "updatedSquareMembers", + "list": "SquareMember" + } + ], + "SquareChatThreadState": { + "1": "ACTIVE", + "2": "INACTIVE" + }, + "SquareChatThread": [ + { + "fid": 1, + "name": "squareChatThreadMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 3, + "name": "squareMid", + "type": 11 + }, + { + "fid": 4, + "name": "messageId", + "type": 11 + }, + { + "fid": 5, + "name": "state", + "struct": "SquareChatThreadState" + } + ], + "GetJoinedSquareChatThreadsResponse": [ + { + "fid": 1, + "name": "squareChatThreads", + "list": "SquareChatThread" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + } + ], + "CreateSquareChatThreadResponse": [ + { + "fid": 1, + "name": "squareChatThread", + "struct": "SquareChatThread" + } + ], + "SquareChatThreadeMembershipState": { + "1": "ACTIVATED", + "2": "DEACTIVATED" + }, + "SquareChatThreadMember": [ + { + "fid": 1, + "name": "squareMemberMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareChatThreadMid", + "type": 11 + }, + { + "fid": 3, + "name": "revision", + "type": 10 + }, + { + "fid": 4, + "name": "membershipState", + "struct": "SquareChatThreadeMembershipState" + } + ], + "GetSquareChatThreadResponse": [ + { + "fid": 1, + "name": "squareChatThread", + "struct": "SquareChatThread" + }, + { + "fid": 2, + "name": "mySquareChatThreadMember", + "struct": "SquareChatThreadMember" + } + ], + "JoinSquareChatThreadResponse": [ + { + "fid": 1, + "name": "squareChatThread", + "struct": "SquareChatThread" + } + ], + "AcceptSpeakersResponse": [], + "AcceptToChangeRoleResponse": [], + "AcceptToListenResponse": [], + "AcceptToSpeakResponse": [], + "CancelToSpeakResponse": [], + "EndLiveTalkResponse": [], + "LiveTalkEventType": { + "1": "NOTIFIED_UPDATE_LIVE_TALK_TITLE", + "2": "NOTIFIED_UPDATE_LIVE_TALK_SPEAKER_SETTING", + "3": "NOTIFIED_UPDATE_LIVE_TALK_ANNOUNCEMENT", + "4": "NOTIFIED_UPDATE_SQUARE_MEMBER_ROLE", + "5": "NOTIFIED_UPDATE_LIVE_TALK_ALLOW_REQUEST_TO_SPEAK" + }, + "LiveTalkEventNotifiedUpdateLiveTalkTitle": [ + { + "fid": 1, + "name": "title", + "type": 11 + } + ], + "LiveTalkSpeakerSetting": { + "1": "LIMITED_SPEAKERS", + "2": "ALL_AS_SPEAKERS" + }, + "LiveTalkEventNotifiedUpdateLiveTalkSpeakerSetting": [ + { + "fid": 1, + "name": "speakerSetting", + "struct": "LiveTalkSpeakerSetting" + } + ], + "LiveTalkEventNotifiedUpdateLiveTalkAnnouncement": [ + { + "fid": 1, + "name": "announcement", + "type": 11 + } + ], + "LiveTalkEventNotifiedUpdateSquareMemberRole": [ + { + "fid": 1, + "name": "squareMemberMid", + "type": 11 + }, + { + "fid": 2, + "name": "role", + "struct": "SquareMemberRole" + } + ], + "LiveTalkEventNotifiedUpdateLiveTalkAllowRequestToSpeak": [ + { + "fid": 1, + "name": "allowRequestToSpeak", + "type": 2 + } + ], + "LiveTalkEventPayload": [ + { + "fid": 1, + "name": "notifiedUpdateLiveTalkTitle", + "struct": "LiveTalkEventNotifiedUpdateLiveTalkTitle" + }, + { + "fid": 2, + "name": "notifiedUpdateLiveTalkSpeakerSetting", + "struct": "LiveTalkEventNotifiedUpdateLiveTalkSpeakerSetting" + }, + { + "fid": 3, + "name": "notifiedUpdateLiveTalkAnnouncement", + "struct": "LiveTalkEventNotifiedUpdateLiveTalkAnnouncement" + }, + { + "fid": 4, + "name": "notifiedUpdateSquareMemberRole", + "struct": "LiveTalkEventNotifiedUpdateSquareMemberRole" + }, + { + "fid": 5, + "name": "notifiedUpdateLiveTalkAllowRequestToSpeak", + "struct": "LiveTalkEventNotifiedUpdateLiveTalkAllowRequestToSpeak" + } + ], + "LiveTalkEvent": [ + { + "fid": 1, + "name": "type", + "struct": "LiveTalkEventType" + }, + { + "fid": 2, + "name": "payload", + "struct": "LiveTalkEventPayload" + }, + { + "fid": 3, + "name": "syncToken", + "type": 11 + } + ], + "FetchLiveTalkEventsResponse": [ + { + "fid": 1, + "name": "events", + "list": "LiveTalkEvent" + }, + { + "fid": 2, + "name": "syncToken", + "type": 11 + }, + { + "fid": 3, + "name": "hasMore", + "type": 2 + } + ], + "LiveTalkType": { + "1": "PUBLIC", + "2": "PRIVATE" + }, + "LiveTalk": [ + { + "fid": 1, + "name": "squareChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "sessionId", + "type": 11 + }, + { + "fid": 3, + "name": "title", + "type": 11 + }, + { + "fid": 4, + "name": "type", + "struct": "LiveTalkType" + }, + { + "fid": 5, + "name": "speakerSetting", + "struct": "LiveTalkSpeakerSetting" + }, + { + "fid": 6, + "name": "allowRequestToSpeak", + "type": 2 + }, + { + "fid": 7, + "name": "announcement", + "type": 11 + }, + { + "fid": 8, + "name": "participantCount", + "type": 8 + }, + { + "fid": 9, + "name": "revision", + "type": 10 + }, + { + "fid": 10, + "name": "startedAt", + "type": 10 + } + ], + "FindLiveTalkByInvitationTicketResponse": [ + { + "fid": 1, + "name": "chatInvitationTicket", + "type": 11 + }, + { + "fid": 2, + "name": "liveTalk", + "struct": "LiveTalk" + }, + { + "fid": 3, + "name": "chat", + "struct": "SquareChat" + }, + { + "fid": 4, + "name": "squareMember", + "struct": "SquareMember" + }, + { + "fid": 5, + "name": "chatMembershipState", + "struct": "SquareChatMembershipState" + } + ], + "ForceEndLiveTalkResponse": [], + "LiveTalkSpeaker": [ + { + "fid": 1, + "name": "displayName", + "type": 11 + }, + { + "fid": 2, + "name": "profileImageObsHash", + "type": 11 + }, + { + "fid": 3, + "name": "role", + "struct": "SquareMemberRole" + } + ], + "GetLiveTalkInfoForNonMemberResponse": [ + { + "fid": 1, + "name": "chatName", + "type": 11 + }, + { + "fid": 2, + "name": "liveTalk", + "struct": "LiveTalk" + }, + { + "fid": 3, + "name": "speakers", + "list": "LiveTalkSpeaker" + }, + { + "fid": 4, + "name": "chatInvitationUrl", + "type": 11 + } + ], + "GetLiveTalkInvitationUrlResponse": [ + { + "fid": 1, + "name": "invitationUrl", + "type": 11 + } + ], + "GetLiveTalkSpeakersForNonMemberResponse": [ + { + "fid": 1, + "name": "speakers", + "list": "LiveTalkSpeaker" + } + ], + "GetSquareInfoByChatMidResponse": [ + { + "fid": 1, + "name": "defaultChatMid", + "type": 11 + }, + { + "fid": 2, + "name": "squareName", + "type": 11 + }, + { + "fid": 3, + "name": "squareDesc", + "type": 11 + } + ], + "InviteToChangeRoleResponse": [], + "InviteToListenResponse": [], + "InviteToLiveTalkResponse": [], + "InviteToSpeakResponse": [ + { + "fid": 1, + "name": "inviteRequestId", + "type": 11 + } + ], + "JoinLiveTalkResponse": [ + { + "fid": 1, + "name": "hostMemberMid", + "type": 11 + }, + { + "fid": 2, + "name": "memberSessionId", + "type": 11 + }, + { + "fid": 3, + "name": "token", + "type": 11 + }, + { + "fid": 4, + "name": "proto", + "type": 11 + }, + { + "fid": 5, + "name": "voipAddress", + "type": 11 + }, + { + "fid": 6, + "name": "voipAddress6", + "type": 11 + }, + { + "fid": 7, + "name": "voipUdpPort", + "type": 8 + }, + { + "fid": 8, + "name": "voipTcpPort", + "type": 8 + }, + { + "fid": 9, + "name": "fromZone", + "type": 11 + }, + { + "fid": 10, + "name": "commParam", + "type": 11 + }, + { + "fid": 11, + "name": "orionAddress", + "type": 11 + }, + { + "fid": 12, + "name": "polarisAddress", + "type": 11 + }, + { + "fid": 13, + "name": "polarisZone", + "type": 11 + }, + { + "fid": 14, + "name": "polarisUdpPort", + "type": 8 + } + ], + "KickOutLiveTalkParticipantsResponse": [], + "RejectSpeakersResponse": [], + "RejectToSpeakResponse": [], + "ReportLiveTalkResponse": [], + "ReportLiveTalkSpeakerResponse": [], + "RequestToListenResponse": [], + "RequestToSpeakResponse": [], + "StartLiveTalkResponse": [ + { + "fid": 1, + "name": "liveTalk", + "struct": "LiveTalk" + } + ], + "UpdateLiveTalkAttrsResponse": [], + "AcquireLiveTalkResponse": [ + { + "fid": 1, + "name": "liveTalk", + "struct": "LiveTalk" + } + ], + "CreateQrCodeForSecureResponse": [ + { + "fid": 1, + "name": "callbackUrl", + "type": 11 + }, + { + "fid": 2, + "name": "longPollingMaxCount", + "type": 8 + }, + { + "fid": 3, + "name": "longPollingIntervalSec", + "type": 8 + }, + { + "fid": 4, + "name": "nonce", + "type": 11 + } + ], + "RefreshApiRetryPolicy": [ + { + "fid": 1, + "name": "initialDelayInMillis", + "type": 10 + }, + { + "fid": 2, + "name": "maxDelayInMillis", + "type": 10 + }, + { + "fid": 3, + "name": "multiplier", + "type": 4 + }, + { + "fid": 4, + "name": "jitterRate", + "type": 4 + } + ], + "TokenV3IssueResult": [ + { + "fid": 1, + "name": "accessToken", + "type": 11 + }, + { + "fid": 2, + "name": "refreshToken", + "type": 11 + }, + { + "fid": 3, + "name": "durationUntilRefreshInSec", + "type": 10 + }, + { + "fid": 4, + "name": "refreshApiRetryPolicy", + "struct": "RefreshApiRetryPolicy" + }, + { + "fid": 5, + "name": "loginSessionId", + "type": 11 + }, + { + "fid": 6, + "name": "tokenIssueTimeEpochSec", + "type": 10 + } + ], + "QrCodeLoginV2Response": [ + { + "fid": 1, + "name": "certificate", + "type": 11 + }, + { + "fid": 2, + "name": "accessTokenV2", + "type": 11 + }, + { + "fid": 3, + "name": "tokenV3IssueResult", + "struct": "TokenV3IssueResult" + }, + { + "fid": 4, + "name": "mid", + "type": 11 + }, + { + "fid": 9, + "name": "lastBindTimestamp", + "type": 10 + }, + { + "fid": 10, + "name": "metaData", + "map": 11 + } + ], + "UserType": { + "1": "USER", + "2": "BOT" + }, + "RichString": [ + { + "fid": 1, + "name": "content", + "type": 11 + }, + { + "fid": 2, + "name": "meta", + "map": 11 + } + ], + "TargetProfileDetail": [ + { + "fid": 1, + "name": "snapshotTimeMillis", + "type": 10 + }, + { + "fid": 2, + "name": "profileName", + "type": 11 + }, + { + "fid": 3, + "name": "picturePath", + "type": 11 + }, + { + "fid": 4, + "name": "statusMessage", + "struct": "RichString" + }, + { + "fid": 5, + "name": "musicProfile", + "type": 11 + }, + { + "fid": 6, + "name": "videoProfile", + "type": 11 + }, + { + "fid": 7, + "name": "avatarProfile", + "struct": "AvatarProfile" + }, + { + "fid": 8, + "name": "pictureSource", + "struct": "PictureSource" + }, + { + "fid": 9, + "name": "pictureStatus", + "type": 11 + } + ], + "UserFriendDetail": [ + { + "fid": 1, + "name": "createdTime", + "type": 10 + }, + { + "fid": 3, + "name": "overriddenName", + "type": 11 + }, + { + "fid": 4, + "name": "favoriteTime", + "type": 10 + }, + { + "fid": 6, + "name": "hidden", + "type": 2 + }, + { + "fid": 7, + "name": "ringtone", + "type": 11 + }, + { + "fid": 8, + "name": "ringbackTone", + "type": 11 + } + ], + "BotFriendDetail": [ + { + "fid": 1, + "name": "createdTime", + "type": 10 + }, + { + "fid": 4, + "name": "favoriteTime", + "type": 10 + }, + { + "fid": 6, + "name": "hidden", + "type": 2 + } + ], + "NotFriend": [], + "FriendDetail": [ + { + "fid": 1, + "name": "user", + "struct": "UserFriendDetail" + }, + { + "fid": 2, + "name": "bot", + "struct": "BotFriendDetail" + }, + { + "fid": 3, + "name": "notFriend", + "struct": "NotFriend" + } + ], + "UserBlockDetail": [ + { + "fid": 3, + "name": "deletedFromBlockList", + "type": 2 + } + ], + "BotBlockDetail": [ + { + "fid": 3, + "name": "deletedFromBlockList", + "type": 2 + } + ], + "NotBlocked": [], + "BlockDetail": [ + { + "fid": 1, + "name": "user", + "struct": "UserBlockDetail" + }, + { + "fid": 2, + "name": "bot", + "struct": "BotBlockDetail" + }, + { + "fid": 3, + "name": "notBlocked", + "struct": "NotBlocked" + } + ], + "RecommendationReasonSharedChat": [ + { + "fid": 1, + "name": "chatMid", + "type": 11 + } + ], + "RecommendationReasonReverseFriendByUserId": [], + "RecommendationReasonReverseFriendByQRCode": [], + "RecommendationReasonReverseFriendByPhone": [], + "RecommendationReason": [ + { + "fid": 1, + "name": "sharedChat", + "struct": "RecommendationReasonSharedChat" + }, + { + "fid": 2, + "name": "reverseFriendByUserId", + "struct": "RecommendationReasonReverseFriendByUserId" + }, + { + "fid": 3, + "name": "reverseFriendByQrCode", + "struct": "RecommendationReasonReverseFriendByQRCode" + }, + { + "fid": 4, + "name": "reverseFriendByPhone", + "struct": "RecommendationReasonReverseFriendByPhone" + } + ], + "Recommended": [ + { + "fid": 1, + "name": "createdTime", + "type": 10 + }, + { + "fid": 2, + "name": "reasons", + "list": "RecommendationReason" + }, + { + "fid": 4, + "name": "hidden", + "type": 2 + } + ], + "NotRecommended": [], + "RecommendationDetail": [ + { + "fid": 1, + "name": "recommendationDetail", + "struct": "Recommended" + }, + { + "fid": 2, + "name": "notRecommended", + "struct": "NotRecommended" + } + ], + "NotificationSetting": [ + { + "fid": 1, + "name": "mute", + "type": 2 + } + ], + "NotificationSettingEntry": [ + { + "fid": 1, + "name": "notificationSetting", + "struct": "NotificationSetting" + } + ], + "GetContactV3Response": [ + { + "fid": 1, + "name": "targetUserMid", + "type": 11 + }, + { + "fid": 2, + "name": "userType", + "struct": "UserType" + }, + { + "fid": 3, + "name": "targetProfileDetail", + "struct": "TargetProfileDetail" + }, + { + "fid": 4, + "name": "friendDetail", + "struct": "FriendDetail" + }, + { + "fid": 5, + "name": "blockDetail", + "struct": "BlockDetail" + }, + { + "fid": 6, + "name": "recommendationDetail", + "struct": "RecommendationDetail" + }, + { + "fid": 7, + "name": "notificationSettingEntry", + "struct": "NotificationSettingEntry" + } + ], + "GetContactsV3Response": [ + { + "fid": 1, + "name": "responses", + "list": "GetContactV3Response" + } + ], + "AddFriendByMidResponse": [], + "GetContactCalendarEventResponse": [ + { + "fid": 1, + "name": "targetUserMid", + "type": 11 + }, + { + "fid": 2, + "name": "userType", + "struct": "UserType" + }, + { + "fid": 3, + "name": "contactCalendarEvents", + "struct": "ContactCalendarEvents" + }, + { + "fid": 4, + "name": "snapshotTimeMillis", + "type": 10 + } + ], + "GetContactCalendarEventsResponse": [ + { + "fid": 1, + "name": "responses", + "list": "GetContactCalendarEventResponse" + } + ], + "ProductType": { + "1": "STICKER", + "2": "THEME", + "3": "STICON" + }, + "ThemeResourceType": { + "1": "STATIC", + "2": "ANIMATION" + }, + "SticonResourceType": { + "1": "STATIC", + "2": "ANIMATION" + }, + "ImageTextStatus": { + "0": "OK", + "1": "PRODUCT_UNSUPPORTED", + "2": "TEXT_NOT_SPECIFIED", + "3": "TEXT_STYLE_UNAVAILABLE", + "4": "CHARACTER_COUNT_LIMIT_EXCEEDED", + "5": "CONTAINS_INVALID_WORD" + }, + "SubType": { + "0": "GENERAL", + "1": "CREATORS", + "2": "STICON" + }, + "StickerSize": { + "0": "NORMAL", + "1": "BIG" + }, + "PopupLayer": { + "0": "FOREGROUND", + "1": "BACKGROUND" + }, + "ProductSalesState": { + "0": "ON_SALE", + "1": "OUTDATED_VERSION", + "2": "NOT_ON_SALE" + }, + "PromotionType": { + "0": "NONE", + "1": "CARRIER", + "2": "BUDDY", + "3": "INSTALL", + "4": "MISSION", + "5": "MUSTBUY" + }, + "PromotionMissionType": { + "1": "DEFAULT", + "2": "VIEW_VIDEO" + }, + "BrandType": { + "1": "PREMIUM", + "2": "VERIFIED", + "3": "UNVERIFIED" + }, + "EditorsPickShowcaseType": { + "0": "STATIC", + "1": "POPULAR", + "2": "NEW_RELEASE" + }, + "Locale": [ + { + "fid": 1, + "name": "language", + "type": 11 + }, + { + "fid": 2, + "name": "country", + "type": 11 + } + ], + "GetProductRequest": [ + { + "fid": 1, + "name": "productType", + "struct": "ProductType" + }, + { + "fid": 2, + "name": "productId", + "type": 11 + }, + { + "fid": 3, + "name": "carrierCode", + "type": 11 + }, + { + "fid": 4, + "name": "saveBrowsingHistory", + "type": 2 + } + ], + "GetProductResponse": [ + { + "fid": 1, + "name": "productDetail", + "struct": "ProductDetail" + } + ], + "ProductDetail": [ + { + "fid": 1, + "name": "id", + "type": 11 + }, + { + "fid": 2, + "name": "billingItemId", + "type": 11 + }, + { + "fid": 3, + "name": "type", + "type": 11 + }, + { + "fid": 4, + "name": "subtype", + "struct": "SubType" + }, + { + "fid": 5, + "name": "billingCpId", + "type": 11 + }, + { + "fid": 11, + "name": "name", + "type": 11 + }, + { + "fid": 12, + "name": "author", + "type": 11 + }, + { + "fid": 13, + "name": "details", + "type": 11 + }, + { + "fid": 14, + "name": "copyright", + "type": 11 + }, + { + "fid": 15, + "name": "notice", + "type": 11 + }, + { + "fid": 16, + "name": "promotionInfo", + "struct": "PromotionInfo" + }, + { + "fid": 21, + "name": "latestVersion", + "type": 10 + }, + { + "fid": 22, + "name": "latestVersionString", + "type": 11 + }, + { + "fid": 23, + "name": "version", + "type": 10 + }, + { + "fid": 24, + "name": "versionString", + "type": 11 + }, + { + "fid": 25, + "name": "applicationVersionRange", + "struct": "ApplicationVersionRange" + }, + { + "fid": 31, + "name": "owned", + "type": 2 + }, + { + "fid": 32, + "name": "grantedByDefault", + "type": 2 + }, + { + "fid": 41, + "name": "validFor", + "type": 8 + }, + { + "fid": 42, + "name": "validUntil", + "type": 10 + }, + { + "fid": 51, + "name": "onSale", + "type": 2 + }, + { + "fid": 52, + "name": "salesFlag", + "set": 11 + }, + { + "fid": 53, + "name": "availableForPresent", + "type": 2 + }, + { + "fid": 54, + "name": "availableForMyself", + "type": 2 + }, + { + "fid": 61, + "name": "priceTier", + "type": 8 + }, + { + "fid": 62, + "name": "price", + "struct": "Price" + }, + { + "fid": 63, + "name": "priceInLineCoin", + "type": 11 + }, + { + "fid": 64, + "name": "localizedPrice", + "struct": "Price" + }, + { + "fid": 91, + "name": "images" + }, + { + "fid": 92, + "name": "attributes", + "map": 11 + }, + { + "fid": 93, + "name": "authorId", + "type": 11 + }, + { + "fid": 94, + "name": "stickerResourceType", + "struct": "StickerResourceType" + }, + { + "fid": 95, + "name": "productProperty", + "struct": "ProductProperty" + }, + { + "fid": 96, + "name": "productSalesState", + "struct": "ProductSalesState" + }, + { + "fid": 97, + "name": "installedTime", + "type": 10 + }, + { + "fid": 101, + "name": "wishProperty", + "struct": "ProductWishProperty" + }, + { + "fid": 102, + "name": "subscriptionProperty", + "struct": "ProductSubscriptionProperty" + }, + { + "fid": 103, + "name": "productPromotionProperty", + "struct": "ProductPromotionProperty" + }, + { + "fid": 104, + "name": "availableInCountry", + "type": 2 + }, + { + "fid": 105, + "name": "editorsPickBanners", + "list": "EditorsPickBannerForClient" + }, + { + "fid": 106, + "name": "ableToBeGivenAsPresent", + "type": 2 + }, + { + "fid": 107, + "name": "madeWithStickerMaker", + "type": 2 + }, + { + "fid": 108, + "name": "customDownloadButtonLabel", + "type": 11 + } + ], + "ApplicationVersionRange": [ + { + "fid": 1, + "name": "lowerBound", + "type": 11 + }, + { + "fid": 2, + "name": "lowerBoundInclusive", + "type": 2 + }, + { + "fid": 3, + "name": "upperBound", + "type": 11 + }, + { + "fid": 4, + "name": "upperBoundInclusive", + "type": 2 + } + ], + "EditorsPickBannerForClient": [ + { + "fid": 1, + "name": "id", + "type": 10 + }, + { + "fid": 2, + "name": "endPageBannerImageUrl", + "type": 11 + }, + { + "fid": 3, + "name": "defaulteditorsPickShowcaseType", + "struct": "EditorsPickShowcaseType" + }, + { + "fid": 4, + "name": "showNewBadge", + "type": 2 + }, + { + "fid": 5, + "name": "name", + "type": 11 + }, + { + "fid": 6, + "name": "description", + "type": 11 + } + ], + "Price": [ + { + "fid": 1, + "name": "currency", + "type": 11 + }, + { + "fid": 2, + "name": "amount", + "type": 11 + }, + { + "fid": 3, + "name": "priceString", + "type": 11 + } + ], + "ProductProperty": [ + { + "fid": 1, + "name": "stickerProperty", + "struct": "StickerProperty" + }, + { + "fid": 2, + "name": "themeProperty", + "struct": "ThemeProperty" + }, + { + "fid": 3, + "name": "sticonProperty", + "struct": "SticonProperty" + } + ], + "StickerProperty": [ + { + "fid": 1, + "name": "hasAnimation", + "type": 2 + }, + { + "fid": 2, + "name": "hasSound", + "type": 2 + }, + { + "fid": 3, + "name": "hasPopup", + "type": 2 + }, + { + "fid": 4, + "name": "stickerResourceType", + "struct": "StickerResourceType" + }, + { + "fid": 5, + "name": "stickerOptions", + "type": 11 + }, + { + "fid": 6, + "name": "compactStickerOptions", + "type": 8 + }, + { + "fid": 7, + "name": "stickerHash", + "type": 11 + }, + { + "fid": 9, + "name": "stickerIds", + "list": 11 + }, + { + "fid": 10, + "name": "nameTextProperty", + "struct": "ImageTextProperty" + }, + { + "fid": 11, + "name": "availableForPhotoEdit", + "type": 2 + }, + { + "fid": 12, + "name": "stickerDefaultTexts", + "map": 11 + }, + { + "fid": 13, + "name": "stickerSize", + "struct": "StickerSize" + }, + { + "fid": 14, + "name": "popupLayer", + "struct": "PopupLayer" + }, + { + "fid": 15, + "name": "cpdProduct", + "type": 2 + }, + { + "fid": 16, + "name": "availableForCombinationSticker", + "type": 2 + } + ], + "ThemeProperty": [ + { + "fid": 1, + "name": "thumbnail", + "type": 11 + }, + { + "fid": 2, + "name": "themeResourceType", + "struct": "ThemeResourceType" + } + ], + "SticonProperty": [ + { + "fid": 2, + "name": "sticonIds", + "list": 11 + }, + { + "fid": 3, + "name": "availableForPhotoEdit", + "type": 2 + }, + { + "fid": 4, + "name": "sticonResourceType", + "struct": "SticonResourceType" + }, + { + "fid": 5, + "name": "endPageMainImages" + } + ], + "ImageTextProperty": [ + { + "fid": 1, + "name": "status", + "struct": "ImageTextStatus" + }, + { + "fid": 2, + "name": "plaintext", + "type": 11 + }, + { + "fid": 3, + "name": "nameTextMaxCharacterCount", + "type": 8 + }, + { + "fid": 4, + "name": "encryptedText", + "type": 11 + } + ], + "LpPromotionProperty": [ + { + "fid": 1, + "name": "landingPageUrl", + "type": 11 + }, + { + "fid": 2, + "name": "label", + "type": 11 + }, + { + "fid": 3, + "name": "buttonLabel", + "type": 11 + } + ], + "ProductWishProperty": [ + { + "fid": 1, + "name": "totalCount", + "type": 10 + } + ], + "ProductSubscriptionProperty": [ + { + "fid": 1, + "name": "availableForSubscribe", + "type": 2 + }, + { + "fid": 2, + "name": "subscriptionAvailability", + "type": 8 + } + ], + "ProductPromotionProperty": [ + { + "fid": 1, + "name": "lpPromotionProperty", + "struct": "LpPromotionProperty" + } + ], + "PromotionDetail": [ + { + "fid": 1, + "name": "promotionBuddyInfo", + "struct": "PromotionBuddyInfo" + }, + { + "fid": 2, + "name": "promotionInstallInfo", + "struct": "PromotionInstallInfo" + }, + { + "fid": 3, + "name": "promotionMissionInfo", + "struct": "PromotionMissionInfo" + } + ], + "PromotionInfo": [ + { + "fid": 1, + "name": "promotionType", + "struct": "PromotionType" + }, + { + "fid": 2, + "name": "promotionDetail", + "struct": "PromotionDetail" + }, + { + "fid": 51, + "name": "buddyInfo", + "struct": "PromotionBuddyInfo" + } + ], + "PromotionBuddyInfo": [ + { + "fid": 1, + "name": "buddyMid", + "type": 11 + }, + { + "fid": 2, + "name": "promotionBuddyDetail", + "struct": "PromotionBuddyDetail" + }, + { + "fid": 3, + "name": "showBanner", + "type": 2 + } + ], + "PromotionInstallInfo": [ + { + "fid": 1, + "name": "downloadUrl", + "type": 11 + }, + { + "fid": 2, + "name": "customUrlSchema", + "type": 11 + } + ], + "PromotionMissionInfo": [ + { + "fid": 1, + "name": "promotionMissionType", + "struct": "PromotionMissionType" + }, + { + "fid": 2, + "name": "missionCompleted", + "type": 2 + }, + { + "fid": 3, + "name": "downloadUrl", + "type": 11 + }, + { + "fid": 4, + "name": "customUrlSchema", + "type": 11 + }, + { + "fid": 5, + "name": "oaMid", + "type": 11 + } + ], + "PromotionBuddyDetail": [ + { + "fid": 1, + "name": "searchId", + "type": 11 + }, + { + "fid": 2, + "name": "contactStatus", + "struct": "ContactStatus" + }, + { + "fid": 3, + "name": "name", + "type": 11 + }, + { + "fid": 4, + "name": "pictureUrl", + "type": 11 + }, + { + "fid": 5, + "name": "statusMessage", + "type": 11 + }, + { + "fid": 6, + "name": "brandType", + "struct": "BrandType" + } + ], + "PurchaseOrder": [ + { + "fid": 1, + "name": "shopId", + "type": 11 + }, + { + "fid": 2, + "name": "productId", + "type": 11 + }, + { + "fid": 5, + "name": "recipientMid", + "type": 11 + }, + { + "fid": 11, + "name": "price", + "struct": "Price" + }, + { + "fid": 12, + "name": "enableLinePointAutoExchange", + "type": 2 + }, + { + "fid": 21, + "name": "locale", + "struct": "Locale" + }, + { + "fid": 31, + "name": "presentAttributes", + "map": 11 + } + ], + "PurchaseOrderResponse": [ + { + "fid": 1, + "name": "orderId", + "type": 11 + }, + { + "fid": 11, + "name": "attributes", + "map": 11 + }, + { + "fid": 12, + "name": "billingConfirmUrl", + "type": 11 + } + ], + "PurchaseRecordList": [ + { + "fid": 1, + "name": "purchaseRecords", + "list": "PurchaseRecord" + }, + { + "fid": 2, + "name": "offset", + "type": 8 + }, + { + "fid": 3, + "name": "totalSize", + "type": 8 + } + ], + "PurchaseRecord": [ + { + "fid": 1, + "name": "productDetail", + "struct": "ProductDetail" + }, + { + "fid": 11, + "name": "purchasedTime", + "type": 10 + }, + { + "fid": 21, + "name": "giver", + "type": 11 + }, + { + "fid": 22, + "name": "recipient", + "type": 11 + }, + { + "fid": 31, + "name": "purchasedPrice", + "struct": "Price" + } + ], + "DetailedProductList": [ + { + "fid": 1, + "name": "productList", + "list": "ProductDetail" + }, + { + "fid": 2, + "name": "offset", + "type": 8 + }, + { + "fid": 3, + "name": "totalSize", + "type": 8 + } + ], + "CreateCombinationStickerResponse": [ + { + "fid": 1, + "name": "id", + "type": 11 + } + ], + "ProductAvailability": { + "0": "PURCHASE_ONLY", + "1": "PURCHASE_OR_SUBSCRIPTION", + "2": "SUBSCRIPTION_ONLY" + }, + "ProductSearchSummary": [ + { + "fid": 1, + "name": "id", + "type": 11 + }, + { + "fid": 2, + "name": "type", + "struct": "ProductType" + }, + { + "fid": 3, + "name": "name", + "type": 11 + }, + { + "fid": 4, + "name": "author", + "type": 11 + }, + { + "fid": 5, + "name": "promotionInfo", + "struct": "PromotionInfo" + }, + { + "fid": 6, + "name": "version", + "type": 10 + }, + { + "fid": 7, + "name": "newFlag", + "type": 2 + }, + { + "fid": 8, + "name": "priceTier", + "type": 8 + }, + { + "fid": 9, + "name": "priceInLineCoin", + "type": 11 + }, + { + "fid": 10, + "name": "property", + "struct": "ProductProperty" + }, + { + "fid": 11, + "name": "subType", + "struct": "SubType" + }, + { + "fid": 12, + "name": "onSale", + "type": 2 + }, + { + "fid": 13, + "name": "availableForPresent", + "type": 2 + }, + { + "fid": 14, + "name": "availableForPurchase", + "type": 2 + }, + { + "fid": 15, + "name": "validDays", + "type": 8 + }, + { + "fid": 16, + "name": "authorId", + "type": 11 + }, + { + "fid": 17, + "name": "bargainFlag", + "type": 2 + }, + { + "fid": 18, + "name": "copyright", + "type": 11 + }, + { + "fid": 19, + "name": "availability", + "struct": "ProductAvailability" + }, + { + "fid": 20, + "name": "interactionEventParameter", + "type": 11 + }, + { + "fid": 21, + "name": "editorsPickIds", + "set": 10 + } + ], + "DemographicGenderType": { + "0": "ALL", + "1": "MALE", + "2": "FEMALE" + }, + "DemographicAgeType": { + "0": "ALL", + "1": "AGE_0_19", + "2": "AGE_20_29", + "3": "AGE_30_39", + "4": "AGE_40_INF", + "5": "AGE_40_49", + "6": "AGE_50_INF" + }, + "ShowcaseType": { + "0": "POPULAR", + "1": "NEW_RELEASE", + "2": "EVENT", + "3": "RECOMMENDED", + "4": "POPULAR_WEEKLY", + "5": "POPULAR_MONTHLY", + "6": "POPULAR_RECENTLY_PUBLISHED", + "7": "BUDDY", + "8": "EXTRA_EVENT", + "9": "BROWSING_HISTORY", + "10": "POPULAR_TOTAL_SALES", + "11": "NEW_SUBSCRIPTION", + "12": "POPULAR_SUBSCRIPTION_30D", + "13": "CPD_STICKER", + "14": "POPULAR_WITH_FREE" + }, + "DemographicType": [ + { + "fid": 1, + "name": "demographicGenderType", + "struct": "DemographicGenderType" + }, + { + "fid": 2, + "name": "demographicAgeType", + "struct": "DemographicAgeType" + }, + { + "fid": 3, + "name": "defaultOrder", + "type": 2 + } + ], + "ShowcaseV3": [ + { + "fid": 1, + "name": "productList", + "list": "ProductSearchSummary" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "totalSize", + "type": 10 + }, + { + "fid": 4, + "name": "showcaseType", + "struct": "ShowcaseType" + }, + { + "fid": 5, + "name": "productType", + "struct": "ProductType" + }, + { + "fid": 6, + "name": "subType", + "struct": "SubType" + }, + { + "fid": 7, + "name": "demographicType", + "struct": "DemographicType" + } + ], + "StickerSummary": [ + { + "fid": 1, + "name": "stickerIdRanges", + "list": "StickerIdRange" + }, + { + "fid": 2, + "name": "suggestVersion", + "type": 10 + }, + { + "fid": 3, + "name": "stickerHash", + "type": 11 + }, + { + "fid": 4, + "name": "defaultDisplayOnKeyboard", + "type": 2 + }, + { + "fid": 5, + "name": "stickerResourceType", + "struct": "StickerResourceType" + }, + { + "fid": 6, + "name": "nameTextProperty", + "struct": "ImageTextProperty" + }, + { + "fid": 7, + "name": "availableForPhotoEdit", + "type": 2 + }, + { + "fid": 8, + "name": "popupLayer", + "struct": "PopupLayer" + }, + { + "fid": 9, + "name": "stickerSize", + "struct": "StickerSize" + }, + { + "fid": 10, + "name": "availableForCombinationSticker", + "type": 2 + } + ], + "ThemeSummary": [ + { + "fid": 1, + "name": "imagePath", + "type": 11 + }, + { + "fid": 2, + "name": "version", + "type": 10 + }, + { + "fid": 3, + "name": "versionString", + "type": 11 + } + ], + "SticonSummary": [ + { + "fid": 1, + "name": "suggestVersion", + "type": 10 + }, + { + "fid": 2, + "name": "availableForPhotoEdit", + "type": 2 + }, + { + "fid": 3, + "name": "sticonResourceType", + "struct": "SticonResourceType" + } + ], + "ProductTypeSummary": [ + { + "fid": 1, + "name": "stickerSummary", + "struct": "StickerSummary" + }, + { + "fid": 2, + "name": "themeSummary", + "struct": "ThemeSummary" + }, + { + "fid": 3, + "name": "sticonSummary", + "struct": "SticonSummary" + } + ], + "ProductSummary": [ + { + "fid": 1, + "name": "id", + "type": 11 + }, + { + "fid": 11, + "name": "name", + "type": 11 + }, + { + "fid": 21, + "name": "latestVersion", + "type": 10 + }, + { + "fid": 25, + "name": "applicationVersionRange", + "struct": "ApplicationVersionRange" + }, + { + "fid": 32, + "name": "grantedByDefault", + "type": 2 + }, + { + "fid": 92, + "name": "attributes", + "map": 11 + }, + { + "fid": 93, + "name": "productTypeSummary", + "struct": "ProductTypeSummary" + }, + { + "fid": 94, + "name": "validUntil", + "type": 10 + }, + { + "fid": 95, + "name": "validFor", + "type": 8 + }, + { + "fid": 96, + "name": "installedTime", + "type": 10 + }, + { + "fid": 97, + "name": "availability", + "struct": "ProductAvailability" + }, + { + "fid": 98, + "name": "authorId", + "type": 11 + }, + { + "fid": 99, + "name": "canAutoDownload", + "type": 2 + }, + { + "fid": 100, + "name": "promotionInfo", + "struct": "PromotionInfo" + } + ], + "ProductSummaryList": [ + { + "fid": 1, + "name": "productList", + "list": "ProductSummary" + }, + { + "fid": 2, + "name": "offset", + "type": 8 + }, + { + "fid": 3, + "name": "totalSize", + "type": 8 + } + ], + "ProductValidationScheme": [ + { + "fid": 10, + "name": "key", + "type": 11 + }, + { + "fid": 11, + "name": "offset", + "type": 10 + }, + { + "fid": 12, + "name": "size", + "type": 10 + } + ], + "ProductValidationResult": [ + { + "fid": 1, + "name": "validated", + "type": 2 + } + ], + "ShopUpdates": [ + { + "fid": 1, + "name": "shopId", + "type": 11 + }, + { + "fid": 11, + "name": "latestUpdateTime", + "type": 10 + } + ], + "SearchProductsV2Response": [ + { + "fid": 1, + "name": "results", + "list": "ProductSearchSummary" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "totalSize", + "type": 10 + } + ], + "EditorsPickBanner": [ + { + "fid": 1, + "name": "id", + "type": 10 + }, + { + "fid": 2, + "name": "imageUrl", + "type": 11 + }, + { + "fid": 3, + "name": "homeBannerImageUrl", + "type": 11 + }, + { + "fid": 4, + "name": "showcaseBannerImageUrl", + "type": 11 + }, + { + "fid": 5, + "name": "enableEditorsPickShowcaseTypes", + "list": "EditorsPickShowcaseType" + }, + { + "fid": 6, + "name": "defaulteditorsPickShowcaseType", + "struct": "EditorsPickShowcaseType" + }, + { + "fid": 7, + "name": "homeBannerV2ImageUrl", + "type": 11 + }, + { + "fid": 8, + "name": "name", + "type": 11 + }, + { + "fid": 9, + "name": "containsProducts", + "type": 2 + }, + { + "fid": 10, + "name": "displayPeriodBegin", + "type": 10 + }, + { + "fid": 11, + "name": "description", + "type": 11 + }, + { + "fid": 12, + "name": "showNewBadge", + "type": 2 + } + ], + "AuthorForShowcase": [ + { + "fid": 1, + "name": "authorId", + "type": 10 + }, + { + "fid": 2, + "name": "productList", + "list": "ProductSearchSummary" + }, + { + "fid": 3, + "name": "productTotalSize", + "type": 10 + } + ], + "ImageSearchSummary": [ + { + "fid": 1, + "name": "imageId", + "type": 11 + }, + { + "fid": 2, + "name": "product", + "struct": "ProductSearchSummary" + } + ], + "KeywordImageList": [ + { + "fid": 1, + "name": "tagId", + "type": 11 + }, + { + "fid": 2, + "name": "keyword", + "type": 11 + }, + { + "fid": 3, + "name": "imageList", + "list": "ImageSearchSummary" + } + ], + "URLItem": [ + { + "fid": 1, + "name": "title", + "type": 11 + }, + { + "fid": 2, + "name": "imageUrl", + "type": 11 + }, + { + "fid": 3, + "name": "url", + "type": 11 + } + ], + "EditorsPickContent": [ + { + "fid": 1, + "name": "urlItem", + "struct": "URLItem" + }, + { + "fid": 2, + "name": "productDetail", + "struct": "ProductDetail" + } + ], + "EditorsPickContentType": { + "1": "STICKER", + "2": "URL", + "3": "THEME", + "4": "EMOJI" + }, + "EditorsPick": [ + { + "fid": 1, + "name": "contentType", + "struct": "EditorsPickContentType" + }, + { + "fid": 2, + "name": "editorsPickContent", + "struct": "EditorsPickContent" + } + ], + "EditorsPickTab": [ + { + "fid": 1, + "name": "editorsPickId", + "type": 10 + }, + { + "fid": 2, + "name": "name", + "type": 11 + }, + { + "fid": 3, + "name": "showcaseType", + "struct": "ShowcaseType" + } + ], + "EditorsPickShowcase": [ + { + "fid": 1, + "name": "id", + "type": 10 + }, + { + "fid": 2, + "name": "name", + "type": 11 + }, + { + "fid": 3, + "name": "banner", + "struct": "EditorsPickBanner" + }, + { + "fid": 4, + "name": "editorsPicks", + "list": "EditorsPick" + }, + { + "fid": 5, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 6, + "name": "totalSize", + "type": 8 + }, + { + "fid": 7, + "name": "description", + "type": 11 + }, + { + "fid": 8, + "name": "type", + "struct": "EditorsPickShowcaseType" + }, + { + "fid": 9, + "name": "tabs", + "list": "EditorsPickTab" + } + ], + "TagType": { + "0": "UNKNOWN", + "1": "CHARACTER", + "2": "TASTE" + }, + "Tag": [ + { + "fid": 1, + "name": "id", + "type": 10 + }, + { + "fid": 11, + "name": "name", + "type": 11 + }, + { + "fid": 12, + "name": "tagType", + "struct": "TagType" + }, + { + "fid": 13, + "name": "productCount", + "type": 8 + }, + { + "fid": 14, + "name": "thumbnailUrl", + "type": 11 + } + ], + "CategoryProductList": [ + { + "fid": 1, + "name": "category", + "struct": "Category" + }, + { + "fid": 2, + "name": "productList", + "struct": "ProductList" + } + ], + "AggregatedHomeV2Response": [ + { + "fid": 1, + "name": "showcases", + "list": "ShowcaseV3" + }, + { + "fid": 2, + "name": "editorsPickBanners", + "list": "EditorsPickBanner" + }, + { + "fid": 3, + "name": "authorList", + "list": "AuthorForShowcase" + }, + { + "fid": 4, + "name": "keywordStickerList", + "list": "KeywordImageList" + }, + { + "fid": 5, + "name": "detailedEditorsPick", + "struct": "EditorsPickShowcase" + }, + { + "fid": 6, + "name": "detailedCategoryList", + "list": "CategoryProductList" + }, + { + "fid": 7, + "name": "categoryList", + "list": "Category" + }, + { + "fid": 8, + "name": "tagList", + "list": "Tag" + } + ], + "CategoryType": { + "1": "GENERAL_CATEGORY", + "2": "CREATORS_TAG" + }, + "AggregatedCategory": [ + { + "fid": 1, + "name": "id", + "type": 10 + }, + { + "fid": 2, + "name": "categoryType", + "struct": "CategoryType" + }, + { + "fid": 3, + "name": "name", + "type": 11 + }, + { + "fid": 4, + "name": "productCount", + "type": 8 + }, + { + "fid": 5, + "name": "thumbnailUrl", + "type": 11 + } + ], + "ListContentData": [ + { + "fid": 1, + "name": "showcase", + "struct": "ShowcaseV3" + }, + { + "fid": 2, + "name": "editorsPickBanners", + "list": "EditorsPickBanner" + }, + { + "fid": 3, + "name": "categories", + "list": "AggregatedCategory" + } + ], + "ListContent": [ + { + "fid": 1, + "name": "contentData", + "struct": "ListContentData" + }, + { + "fid": 2, + "name": "localizedTitle", + "type": 11 + }, + { + "fid": 3, + "name": "tsKey", + "type": 11 + }, + { + "fid": 4, + "name": "moreLinkFragment", + "type": 11 + } + ], + "AggregatedHomeNativeResponse": [ + { + "fid": 1, + "name": "listContents", + "list": "ListContent" + } + ], + "DynamicHomeNativeResponse": [ + { + "fid": 1, + "name": "listContents", + "list": "ListContent" + } + ], + "TagsProductList": [ + { + "fid": 1, + "name": "tasteTag", + "struct": "Tag" + }, + { + "fid": 2, + "name": "characterTag", + "struct": "Tag" + }, + { + "fid": 3, + "name": "products", + "list": "ProductSearchSummary" + } + ], + "AggregatedPremiumHomeResponse": [ + { + "fid": 1, + "name": "showcases", + "list": "ShowcaseV3" + }, + { + "fid": 2, + "name": "editorsPickBanners", + "list": "EditorsPickBanner" + }, + { + "fid": 3, + "name": "popularCreator", + "struct": "AuthorForShowcase" + }, + { + "fid": 4, + "name": "featuredCategory", + "struct": "TagsProductList" + }, + { + "fid": 5, + "name": "categoryList", + "list": "TagsProductList" + }, + { + "fid": 6, + "name": "browsingHistory", + "struct": "ShowcaseV3" + }, + { + "fid": 7, + "name": "subscriptionSlotHistory", + "struct": "ShowcaseV3" + } + ], + "AggregatedShowcaseV4": [ + { + "fid": 1, + "name": "showcases", + "list": "ShowcaseV3" + } + ], + "GetRecommendationResponse": [ + { + "fid": 1, + "name": "results", + "list": "ProductSearchSummary" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "totalSize", + "type": 10 + } + ], + "AuthorListResponse": [ + { + "fid": 1, + "name": "authorList", + "list": "AuthorForShowcase" + }, + { + "fid": 2, + "name": "totalSize", + "type": 10 + }, + { + "fid": 3, + "name": "continuationToken", + "type": 11 + } + ], + "ProductResourceType": [ + { + "fid": 1, + "name": "stickerResourceType", + "struct": "StickerResourceType" + }, + { + "fid": 2, + "name": "themeResourceType", + "struct": "ThemeResourceType" + }, + { + "fid": 3, + "name": "sticonResourceType", + "struct": "SticonResourceType" + } + ], + "LatestProductByAuthorItem": [ + { + "fid": 1, + "name": "productId", + "type": 11 + }, + { + "fid": 2, + "name": "displayName", + "type": 11 + }, + { + "fid": 3, + "name": "version", + "type": 10 + }, + { + "fid": 4, + "name": "newFlag", + "type": 2 + }, + { + "fid": 5, + "name": "productResourceType", + "struct": "ProductResourceType" + }, + { + "fid": 6, + "name": "popupLayer", + "struct": "PopupLayer" + } + ], + "LatestProductsByAuthorResponse": [ + { + "fid": 1, + "name": "authorId", + "type": 10 + }, + { + "fid": 2, + "name": "author", + "type": 11 + }, + { + "fid": 3, + "name": "items", + "list": "LatestProductByAuthorItem" + } + ], + "GetExperimentsResponse": [ + { + "fid": 1, + "name": "variables", + "map": 11 + } + ], + "ProductSummaryForAutoSuggest": [ + { + "fid": 1, + "name": "id", + "type": 11 + }, + { + "fid": 2, + "name": "version", + "type": 10 + }, + { + "fid": 3, + "name": "name", + "type": 11 + }, + { + "fid": 4, + "name": "stickerResourceType", + "struct": "StickerResourceType" + }, + { + "fid": 5, + "name": "suggestVersion", + "type": 10 + }, + { + "fid": 6, + "name": "popupLayer", + "struct": "PopupLayer" + }, + { + "fid": 7, + "name": "type", + "struct": "ProductType" + }, + { + "fid": 8, + "name": "resourceType", + "struct": "ProductResourceType" + }, + { + "fid": 9, + "name": "stickerSize", + "struct": "StickerSize" + } + ], + "AutoSuggestionShowcaseResponse": [ + { + "fid": 1, + "name": "productList", + "list": "ProductSummaryForAutoSuggest" + }, + { + "fid": 2, + "name": "totalSize", + "type": 10 + } + ], + "SuggestResource": [ + { + "fid": 1, + "name": "dataUrl", + "type": 11 + }, + { + "fid": 2, + "name": "version", + "type": 10 + }, + { + "fid": 3, + "name": "updatedTime", + "type": 10 + } + ], + "SuggestDictionarySetting": [ + { + "fid": 1, + "name": "language", + "type": 11 + }, + { + "fid": 2, + "name": "name", + "type": 11 + }, + { + "fid": 3, + "name": "preload", + "type": 2 + }, + { + "fid": 4, + "name": "suggestResource", + "struct": "SuggestResource" + }, + { + "fid": 5, + "name": "patch", + "map": 11 + }, + { + "fid": 6, + "name": "suggestTagResource", + "struct": "SuggestResource" + }, + { + "fid": 7, + "name": "tagPatch", + "map": 11 + }, + { + "fid": 8, + "name": "corpusResource", + "struct": "SuggestResource" + } + ], + "GetSuggestDictionarySettingResponse": [ + { + "fid": 1, + "name": "results", + "list": "SuggestDictionarySetting" + } + ], + "GetRecommendOaResponse": [ + { + "fid": 1, + "name": "buddyMids", + "list": 11 + } + ], + "GetSuggestResourcesResponse": [ + { + "fid": 1, + "name": "suggestResources", + "map": "SuggestResource" + } + ], + "GetSuggestResourcesV2Response": [ + { + "fid": 1, + "name": "suggestResources", + "map": "SuggestResource" + } + ], + "GetTagClusterFileResponse": [ + { + "fid": 1, + "name": "path", + "type": 11 + }, + { + "fid": 2, + "name": "updatedTimeMillis", + "type": 10 + } + ], + "GetResourceFileReponse": [ + { + "fid": 1, + "name": "tagClusterFileResponse", + "struct": "GetTagClusterFileResponse" + } + ], + "BrowsingHistory": [ + { + "fid": 1, + "name": "productSearchSummary", + "struct": "ProductSearchSummary" + }, + { + "fid": 2, + "name": "browsingTime", + "type": 10 + } + ], + "GetBrowsingHistoryResponse": [ + { + "fid": 1, + "name": "browsingHistory", + "list": "BrowsingHistory" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "totalSize", + "type": 8 + } + ], + "DeleteAllBrowsingHistoryResponse": [], + "SticonProductMapping": [ + { + "fid": 1, + "name": "productId", + "type": 11 + }, + { + "fid": 2, + "name": "oldProductId", + "type": 11 + }, + { + "fid": 3, + "name": "newToOldSticonIdMapping", + "map": 11 + }, + { + "fid": 4, + "name": "oldPackageVersion", + "type": 8 + }, + { + "fid": 5, + "name": "oldMetaVersion", + "type": 8 + }, + { + "fid": 6, + "name": "stickerPackageId", + "type": 10 + }, + { + "fid": 7, + "name": "stickerPackageVersion", + "type": 8 + }, + { + "fid": 8, + "name": "stickerIds", + "map": 11 + } + ], + "GetOldSticonMappingResponse": [ + { + "fid": 1, + "name": "sticonProductMappings", + "list": "SticonProductMapping" + }, + { + "fid": 2, + "name": "updatedTimeMillis", + "type": 10 + }, + { + "fid": 3, + "name": "updated", + "type": 2 + } + ], + "SimilarImageShowcase": [ + { + "fid": 1, + "name": "chosenImage", + "struct": "ImageSearchSummary" + }, + { + "fid": 2, + "name": "similarImageList", + "list": "ImageSearchSummary" + }, + { + "fid": 3, + "name": "continuationToken", + "type": 11 + } + ], + "CustomizeImageTextResponse": [ + { + "fid": 1, + "name": "nameTextProperty", + "struct": "ImageTextProperty" + } + ], + "SubscriptionPlanAvailability": { + "0": "AVAILABLE", + "1": "DIFFERENT_STORE", + "2": "NOT_STUDENT", + "3": "ALREADY_PURCHASED" + }, + "SubscriptionServiceType": { + "1": "STICKERS_PREMIUM" + }, + "SubscriptionPlanTarget": { + "1": "GENERAL", + "2": "STUDENT" + }, + "SubscriptionPlanType": { + "1": "MONTHLY", + "2": "YEARLY" + }, + "SubscriptionPlanTier": { + "1": "BASIC", + "2": "DELUXE" + }, + "SubscriptionSlotModificationResult": { + "0": "OK", + "1": "UNKNOWN", + "2": "NO_SUBSCRIPTION", + "3": "EXISTS", + "4": "NOT_FOUND", + "5": "EXCEEDS_LIMIT", + "6": "NOT_AVAILABLE" + }, + "SubscriptionBillingResult": { + "0": "OK", + "1": "UNKNOWN", + "2": "NOT_SUPPORTED", + "3": "NO_SUBSCRIPTION", + "4": "SUBSCRIPTION_EXISTS", + "5": "NOT_AVAILABLE", + "6": "CONFLICT", + "7": "OUTDATED_VERSION", + "8": "NO_STUDENT_INFORMATION", + "9": "ACCOUNT_HOLD", + "10": "RETRY_STATE" + }, + "SubscriptionCampaignType": { + "1": "MISSION", + "2": "FREE_TRIAL" + }, + "SubscriptionSortType": { + "1": "DATE_ASC", + "2": "DATE_DESC" + }, + "StartBundleSubscriptionResult": { + "0": "OK", + "1": "UNKNOWN", + "2": "INVALID_PARAMETER", + "3": "NOT_ELIGIBLE", + "4": "CONFLICT", + "5": "ACCOUNT_HOLD", + "6": "RETRY_STATE" + }, + "StopBundleSubscriptionResult": { + "0": "OK", + "1": "INVALID_PARAMETER", + "2": "NOT_FOUND", + "3": "NOT_SUPPORTED", + "4": "CONFLICT", + "5": "NOT_ELIGIBLE" + }, + "GetSubscriptionCouponCodeResult": { + "0": "OK", + "1": "UNKNOWN", + "2": "NOT_SUPPORTED", + "3": "NOT_AVAILABLE", + "4": "NOT_APPLICABLE" + }, + "GetFriendStatusWithPremiumOaResult": { + "0": "FRIEND", + "1": "BLOCKED", + "2": "NOT_FRIEND", + "3": "ERROR" + }, + "SubscriptionCouponCampaignStatus": { + "0": "OK", + "1": "UNKNOWN", + "2": "NOT_SUPPORTED", + "3": "NOT_ACTIVE", + "4": "NOT_APPLICABLE" + }, + "AcceptSubscriptionAgreementResult": { + "0": "OK", + "1": "UNKNOWN", + "2": "NOT_SUPPORTED", + "3": "NO_SUBSCRIPTION" + }, + "StoreCode": { + "0": "GOOGLE", + "1": "APPLE", + "2": "WEBSTORE", + "3": "LINEMO", + "4": "LINE_MUSIC", + "5": "LYP", + "6": "TW_CHT", + "7": "FREEMIUM" + }, + "SubscriptionPlan": [ + { + "fid": 1, + "name": "billingItemId", + "type": 11 + }, + { + "fid": 2, + "name": "subscriptionService", + "struct": "SubscriptionServiceType" + }, + { + "fid": 3, + "name": "target", + "struct": "SubscriptionPlanTarget" + }, + { + "fid": 4, + "name": "type", + "struct": "SubscriptionPlanType" + }, + { + "fid": 5, + "name": "period", + "type": 11 + }, + { + "fid": 6, + "name": "freeTrial", + "type": 11 + }, + { + "fid": 7, + "name": "localizedName", + "type": 11 + }, + { + "fid": 8, + "name": "price", + "struct": "Price" + }, + { + "fid": 9, + "name": "availability", + "struct": "SubscriptionPlanAvailability" + }, + { + "fid": 10, + "name": "cpId", + "type": 11 + }, + { + "fid": 11, + "name": "nameKey", + "type": 11 + }, + { + "fid": 12, + "name": "tier", + "struct": "SubscriptionPlanTier" + } + ], + "GetSubscriptionPlansResponse": [ + { + "fid": 1, + "name": "plans", + "list": "SubscriptionPlan" + } + ], + "SubscriptionStatus": [ + { + "fid": 1, + "name": "billingItemId", + "type": 11 + }, + { + "fid": 2, + "name": "subscriptionService", + "struct": "SubscriptionServiceType" + }, + { + "fid": 3, + "name": "period", + "type": 11 + }, + { + "fid": 4, + "name": "localizedName", + "type": 11 + }, + { + "fid": 5, + "name": "freeTrial", + "type": 2 + }, + { + "fid": 6, + "name": "expired", + "type": 2 + }, + { + "fid": 7, + "name": "validUntil", + "type": 10 + }, + { + "fid": 8, + "name": "maxSlotCount", + "type": 8 + }, + { + "fid": 9, + "name": "target", + "struct": "SubscriptionPlanTarget" + }, + { + "fid": 10, + "name": "type", + "struct": "SubscriptionPlanType" + }, + { + "fid": 11, + "name": "storeCode", + "struct": "StoreCode" + }, + { + "fid": 12, + "name": "nameKey", + "type": 11 + }, + { + "fid": 13, + "name": "tier", + "struct": "SubscriptionPlanTier" + }, + { + "fid": 14, + "name": "accountHold", + "type": 2 + }, + { + "fid": 15, + "name": "maxSlotCountsByProductType", + "map": 8 + }, + { + "fid": 16, + "name": "agreementAccepted", + "type": 2 + } + ], + "GetSubscriptionStatusResponse": [ + { + "fid": 1, + "name": "subscriptions", + "map": "SubscriptionStatus" + }, + { + "fid": 2, + "name": "hasValidStudentInformation", + "type": 2 + }, + { + "fid": 3, + "name": "otherOwnedSubscriptions" + } + ], + "GetProductSummariesInSubscriptionSlotsResponse": [ + { + "fid": 1, + "name": "products", + "list": "ProductSummary" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "totalSize", + "type": 10 + }, + { + "fid": 4, + "name": "maxSlotCount", + "type": 8 + } + ], + "AddProductToSubscriptionSlotResponse": [ + { + "fid": 1, + "name": "result", + "struct": "SubscriptionSlotModificationResult" + } + ], + "AddThemeToSubscriptionSlotResponse": [ + { + "fid": 1, + "name": "result", + "struct": "SubscriptionSlotModificationResult" + } + ], + "RemoveProductFromSubscriptionSlotResponse": [ + { + "fid": 1, + "name": "result", + "struct": "SubscriptionSlotModificationResult" + } + ], + "PurchaseSubscriptionResponse": [ + { + "fid": 1, + "name": "result", + "struct": "SubscriptionBillingResult" + }, + { + "fid": 2, + "name": "orderId", + "type": 11 + }, + { + "fid": 3, + "name": "confirmUrl", + "type": 11 + } + ], + "ChangeSubscriptionResponse": [ + { + "fid": 1, + "name": "result", + "struct": "SubscriptionBillingResult" + }, + { + "fid": 2, + "name": "orderId", + "type": 11 + }, + { + "fid": 3, + "name": "confirmUrl", + "type": 11 + } + ], + "RestoreSubscriptionResponse": [ + { + "fid": 1, + "name": "result", + "struct": "SubscriptionBillingResult" + }, + { + "fid": 2, + "name": "orderId", + "type": 11 + }, + { + "fid": 3, + "name": "confirmUrl", + "type": 11 + } + ], + "GetProductsByTagsV2Response": [ + { + "fid": 1, + "name": "results", + "list": "ProductSearchSummary" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "totalSize", + "type": 10 + } + ], + "StudentInformation": [ + { + "fid": 1, + "name": "schoolName", + "type": 11 + }, + { + "fid": 2, + "name": "graduationDate", + "type": 11 + } + ], + "GetStudentInformationResponse": [ + { + "fid": 1, + "name": "studentInformation", + "struct": "StudentInformation" + }, + { + "fid": 2, + "name": "isValid", + "type": 2 + } + ], + "SaveStudentInformationResponse": [], + "PurchasedSubscription": [ + { + "fid": 1, + "name": "orderId", + "type": 11 + }, + { + "fid": 2, + "name": "subscriptionService", + "struct": "SubscriptionServiceType" + }, + { + "fid": 3, + "name": "billingItemId", + "type": 11 + }, + { + "fid": 4, + "name": "type", + "struct": "SubscriptionPlanType" + }, + { + "fid": 5, + "name": "localizedName", + "type": 11 + }, + { + "fid": 6, + "name": "purchasedTime", + "type": 10 + }, + { + "fid": 7, + "name": "validUntil", + "type": 10 + }, + { + "fid": 8, + "name": "price", + "struct": "Price" + }, + { + "fid": 9, + "name": "nameKey", + "type": 11 + }, + { + "fid": 10, + "name": "tier", + "struct": "SubscriptionPlanTier" + } + ], + "GetPurchasedSubscriptionsResponse": [ + { + "fid": 1, + "name": "subscriptions", + "list": "PurchasedSubscription" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "totalSize", + "type": 10 + } + ], + "FindRestorablePlanResponse": [ + { + "fid": 1, + "name": "result", + "struct": "SubscriptionBillingResult" + }, + { + "fid": 2, + "name": "billingItemId", + "type": 11 + }, + { + "fid": 3, + "name": "storeOrderId", + "type": 11 + }, + { + "fid": 4, + "name": "originalStoreOrderId", + "type": 11 + }, + { + "fid": 5, + "name": "orderId", + "type": 11 + }, + { + "fid": 6, + "name": "mid", + "type": 11 + } + ], + "SubscriptionMissionCampaign": [ + { + "fid": 1, + "name": "productType", + "struct": "ProductType" + }, + { + "fid": 2, + "name": "productId", + "type": 11 + } + ], + "SubscriptionCampaignPayload": [ + { + "fid": 1, + "name": "mission", + "struct": "SubscriptionMissionCampaign" + } + ], + "SubscriptionCampaign": [ + { + "fid": 1, + "name": "campaignId", + "type": 11 + }, + { + "fid": 2, + "name": "fromInclusive", + "type": 10 + }, + { + "fid": 3, + "name": "toExclusive", + "type": 10 + }, + { + "fid": 4, + "name": "type", + "struct": "SubscriptionCampaignType" + }, + { + "fid": 5, + "name": "payload", + "struct": "SubscriptionCampaignPayload" + } + ], + "GetSubscriptionCampaignsResponse": [ + { + "fid": 1, + "name": "campaigns", + "list": "SubscriptionCampaign" + } + ], + "GetSubscriptionRecommendationsResponse": [ + { + "fid": 1, + "name": "products", + "list": "ProductSearchSummary" + } + ], + "InteractionEventResponse": [ + { + "fid": 1, + "name": "responseStatus", + "type": 8 + } + ], + "LibraExperiment": [ + { + "fid": 1, + "name": "experimentId", + "type": 11 + }, + { + "fid": 2, + "name": "groupId", + "type": 11 + } + ], + "GetExperimentsV2Response": [ + { + "fid": 1, + "name": "experiments", + "map": "LibraExperiment" + } + ], + "BirthdayGiftAssociationVerifyTokenStatus": { + "0": "VALID", + "1": "INVALID" + }, + "BirthdayGiftAssociationVerifyResponse": [ + { + "fid": 1, + "name": "tokenStatus", + "struct": "BirthdayGiftAssociationVerifyTokenStatus" + }, + { + "fid": 2, + "name": "recipientUserMid", + "type": 11 + } + ], + "SubscriptionSlotHistory": [ + { + "fid": 1, + "name": "product", + "struct": "ProductSearchSummary" + }, + { + "fid": 2, + "name": "addedTime", + "type": 10 + }, + { + "fid": 3, + "name": "removedTime", + "type": 10 + } + ], + "GetSubscriptionSlotHistoryResponse": [ + { + "fid": 1, + "name": "history", + "list": "SubscriptionSlotHistory" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "totalSize", + "type": 10 + } + ], + "PopupDisplaySettings": [ + { + "fid": 1, + "name": "pages", + "set": 8 + }, + { + "fid": 2, + "name": "editorsPickIds", + "set": 11 + } + ], + "PopupPage": [ + { + "fid": 1, + "name": "imageUrl", + "type": 11 + }, + { + "fid": 2, + "name": "title", + "type": 11 + }, + { + "fid": 3, + "name": "body", + "type": 11 + } + ], + "PopupActionButton": [ + { + "fid": 1, + "name": "label", + "type": 11 + }, + { + "fid": 2, + "name": "actionUrl", + "type": 11 + }, + { + "fid": 3, + "name": "textColorCode", + "type": 11 + }, + { + "fid": 4, + "name": "backgroundColorCode", + "type": 11 + } + ], + "PopupDismissButton": [ + { + "fid": 1, + "name": "label", + "type": 11 + }, + { + "fid": 2, + "name": "textColorCode", + "type": 11 + }, + { + "fid": 3, + "name": "backgroundColorCode", + "type": 11 + } + ], + "PopupContent": [ + { + "fid": 1, + "name": "pages", + "list": "PopupPage" + }, + { + "fid": 2, + "name": "actionButton", + "struct": "PopupActionButton" + }, + { + "fid": 3, + "name": "dismissButton", + "struct": "PopupDismissButton" + } + ], + "PopupDesignTemplate": { + "0": "FIXED" + }, + "PopupDisplayCount": { + "0": "ONCE" + }, + "PopupVisualType": { + "0": "BASIC", + "1": "FULLSCREEN" + }, + "ShopPopup": [ + { + "fid": 1, + "name": "popupId", + "type": 11 + }, + { + "fid": 2, + "name": "displaySettings", + "struct": "PopupDisplaySettings" + }, + { + "fid": 3, + "name": "displayCount", + "struct": "PopupDisplayCount" + }, + { + "fid": 4, + "name": "content", + "struct": "PopupContent" + }, + { + "fid": 5, + "name": "displayPriority", + "type": 8 + }, + { + "fid": 6, + "name": "visualType", + "struct": "PopupVisualType" + }, + { + "fid": 7, + "name": "displayIntervalInDays", + "type": 8 + } + ], + "GetPopupsResponse": [ + { + "fid": 1, + "name": "popups", + "list": "ShopPopup" + } + ], + "GetSubscriptionSlotStatusResponse": [ + { + "fid": 1, + "name": "productIdsInSlots", + "set": 11 + }, + { + "fid": 2, + "name": "usedSlotCount", + "type": 8 + }, + { + "fid": 3, + "name": "maxSlotCount", + "type": 8 + } + ], + "GetProductKeyboardListResponse": [ + { + "fid": 1, + "name": "productType", + "struct": "ProductType" + }, + { + "fid": 2, + "name": "keyboardProductIds", + "list": 11 + } + ], + "GetMusicSubscriptionStatusResponse": [ + { + "fid": 1, + "name": "validUntil", + "type": 10 + }, + { + "fid": 2, + "name": "expired", + "type": 2 + }, + { + "fid": 3, + "name": "isStickersPremiumEnabled", + "type": 2 + } + ], + "StartBundleSubscriptionResponse": [ + { + "fid": 1, + "name": "result", + "struct": "StartBundleSubscriptionResult" + } + ], + "StopBundleSubscriptionResponse": [ + { + "fid": 1, + "name": "result", + "struct": "StopBundleSubscriptionResult" + } + ], + "GetSubscriptionCouponCodeResponse": [ + { + "fid": 1, + "name": "result", + "struct": "GetSubscriptionCouponCodeResult" + }, + { + "fid": 2, + "name": "couponCode", + "type": 11 + } + ], + "GetSubscriptionCouponCampaignResponse": [ + { + "fid": 1, + "name": "status", + "struct": "SubscriptionCouponCampaignStatus" + } + ], + "PopupModel": [ + { + "fid": 1, + "name": "popupId", + "type": 11 + }, + { + "fid": 2, + "name": "active", + "type": 2 + } + ], + "GetPopupDisplayStatusResponse": [ + { + "fid": 1, + "name": "popups", + "map": "PopupModel" + } + ], + "GetFilteredProductsResponse": [ + { + "fid": 1, + "name": "results", + "list": "ProductSearchSummary" + }, + { + "fid": 2, + "name": "continuationToken", + "type": 11 + }, + { + "fid": 3, + "name": "totalSize", + "type": 10 + } + ], + "GetProductLatestVersionForUserResponse": [ + { + "fid": 1, + "name": "latestVersion", + "type": 10 + }, + { + "fid": 2, + "name": "latestVersionString", + "type": 11 + } + ], + "GetSubscriptionAgreementStatusResponse": [ + { + "fid": 1, + "name": "accepted", + "type": 2 + } + ], + "AcceptSubscriptionAgreementResponse": [ + { + "fid": 1, + "name": "result", + "struct": "AcceptSubscriptionAgreementResult" + } + ], + "ShouldShowWelcomeStickerBannerResponse": [ + { + "fid": 1, + "name": "shouldShowBanner", + "type": 2 + } + ], + "StickerDisplayData": [ + { + "fid": 1, + "name": "stickerHash", + "type": 11 + }, + { + "fid": 2, + "name": "stickerResourceType", + "struct": "StickerResourceType" + }, + { + "fid": 3, + "name": "nameTextProperty", + "struct": "ImageTextProperty" + }, + { + "fid": 4, + "name": "popupLayer", + "struct": "PopupLayer" + }, + { + "fid": 5, + "name": "stickerSize", + "struct": "StickerSize" + }, + { + "fid": 6, + "name": "productAvailability", + "struct": "ProductAvailability" + }, + { + "fid": 7, + "name": "height", + "type": 8 + }, + { + "fid": 8, + "name": "width", + "type": 8 + }, + { + "fid": 9, + "name": "version", + "type": 10 + }, + { + "fid": 10, + "name": "availableForCombinationSticker", + "type": 2 + } + ], + "DisplayData": [ + { + "fid": 1, + "name": "stickerSummary", + "struct": "StickerDisplayData" + } + ], + "CollectionItem": [ + { + "fid": 1, + "name": "itemId", + "type": 11 + }, + { + "fid": 2, + "name": "productId", + "type": 11 + }, + { + "fid": 3, + "name": "displayData", + "struct": "DisplayData" + }, + { + "fid": 4, + "name": "sortId", + "type": 8 + } + ], + "Collection": [ + { + "fid": 1, + "name": "collectionId", + "type": 11 + }, + { + "fid": 2, + "name": "items", + "list": "CollectionItem" + }, + { + "fid": 3, + "name": "productType", + "struct": "ProductType" + }, + { + "fid": 4, + "name": "createdTimeMillis", + "type": 10 + }, + { + "fid": 5, + "name": "updatedTimeMillis", + "type": 10 + } + ], + "GetUserCollectionsResponse": [ + { + "fid": 1, + "name": "collections", + "list": "Collection" + }, + { + "fid": 2, + "name": "updated", + "type": 2 + } + ], + "CreateCollectionForUserResponse": [ + { + "fid": 1, + "name": "collection", + "struct": "Collection" + } + ], + "AddItemToCollectionResponse": [], + "RemoveItemFromCollectionResponse": [], + "IsProductForCollectionsResponse": [ + { + "fid": 1, + "name": "isAvailable", + "type": 2 + } + ] +} \ No newline at end of file diff --git a/site/tmp/voom.css b/site/res/voom.css similarity index 100% rename from site/tmp/voom.css rename to site/res/voom.css diff --git a/site/script.js b/site/script.js deleted file mode 100644 index 23fb38f..0000000 --- a/site/script.js +++ /dev/null @@ -1,287 +0,0 @@ -class LineTCompactSocket { - constructor(gwPath, authToken, device, resolve, extraH) { - this.socket = {}; - this.socketInfo = {}; - let appVer, sysName, sysVer, UA, appName; - sysVer = "12.1.4"; - switch (device) { - case "DESKTOPWIN": - appVer = "7.16.1.3000"; - sysName = "WINDOWS"; - sysVer = "10.0.0-NT-x64"; - break; - case "DESKTOPMAC": - appVer = "7.16.1.3000"; - sysName = "MAC"; - break; - case "CHROMEOS": - appVer = "3.0.3"; - sysName = "Chrome_OS"; - sysVer = "1"; - break; - case "ANDROID": - appVer = "13.4.1"; - sysName = "Android OS"; - break; - case "IOS": - appVer = "13.3.0"; - sysName = "iOS"; - break; - case "IOSIPAD": - appVer = "13.3.0"; - sysName = "iOS"; - break; - case "WATCHOS": - appVer = "13.3.0"; - sysName = "Watch OS"; - break; - case "WEAROS": - appVer = "13.4.1"; - sysName = "Wear OS"; - break; - default: - return new Error("device name is wrong"); - break; - } - appName = device + "\t" + appVer + "\t" + sysName + "\t" + sysVer; - UA = "Line/" + appVer; - let account = { path: gwPath, auth: authToken, ua: UA, type: appName }; - if (extraH) { - account["ex"] = JSON.stringify(extraH); - } - //this.socket.post = new WebSocket("wss://line-selfbot.deno.dev/post?" + new URLSearchParams(account).toString()) - this.socket.post = new WebSocket("ws://localhost:8000/post?" + new URLSearchParams(account).toString()); - this.socket.post.onopen = (e) => { - try { - resolve(this); - } catch (e) { - } - this.socketInfo.post = { status: "open", waitFunc: {} }; - }; - this.socket.post.onclose = (e) => { - this.socketInfo.post.status = false; - }; - this.socket.post.onmessage = null; - this.socket.post.onclose = (e) => { - this.socketInfo.post = { status: false }; - }; - } - closeSocket() { - try { - this.socket.post.close(); - } catch (e) { - } - } - post(data) { - return new Promise((resolve, reject) => { - data.id = Date.now(); - this.send(this.socket.post, this.socketInfo.post.waitFunc, data, resolve); - }); - } - postr(data) { - return new Promise((resolve, reject) => { - data.id = Date.now(); - this.sendr(this.socket.post, this.socketInfo.post.waitFunc, data, resolve); - }); - } - postAndCheckResponse(data) { - return new Promise((resolve, reject) => { - this.post(data).then((r) => { - if (r.err) { - throw new Error(r.err); - } else { - resolve(r); - } - }); - }); - } - sendr(socket, FuncMap, data, returnFunc) { - if (socket.readyState === socket.OPEN) { - socket.send(JSON.stringify(data)); - FuncMap[data.id] = (e) => { - returnFunc(e.data); - }; - socket.onmessage = (e) => { - try { - let j = new Uint8Array(e.data); - let id = 0; - for (let index = 0; index < j[2]; index++) { - const element = j[3 + index]; - id += element * (0xff ** index); - } - FuncMap[id](j.slice(3 + j[2])); - delete FuncMap[id]; - } catch (error) { - try { - let j = JSON.parse(e.data); - FuncMap[j.id](e); - delete FuncMap[j.id]; - } catch (e) {} - } - }; - } else throw new Error("socket not open"); - } - - async postParseThrift(data) { - let reqJson, resJson; - reqJson = data; - resJson = JSON.parse(await this.postAndCheckResponse(reqJson)); - return resJson; - } - async postRRequestAndGetRResponse(data, isBuf = false) { - let request = { value: data, type: 5 }; - if (isBuf) { - request.name = "b64"; - request.value = btoa([...data].map((n) => String.fromCharCode(n)).join("")); - } - let response = await this.postr(request); - return response; - } - async postCHRRequestAndGetResponse(data, methodName) { - let request = { value: data, name: methodName, type: 3 }; - let response = await this.postParseThrift(request); - return response.value; - } - async postRequestAndGetResponse(data, methodName) { - let request = { value: data, name: methodName, type: 1 }; - let response = await this.postParseThrift(request); - return response.value; - } - async postRequestAndGetContinueResponse(data, methodName) { - let responseList = []; - let addKeys = []; - let noAddKeys = []; - let request = { value: data, name: methodName, type: 1 }; - let response = await this.postParseThrift(request); - responseList.push(response.value); - while (response.value.continuationToken) { - request.value.continuationToken = response.value.continuationToken; - request.value.syncToken = response.value.syncToken; - response = await this.postParseThrift(request); - responseList.push(response.value); - } - Object.keys(responseList[0]).forEach((e) => { - if ((typeof responseList[0][e]) == "object") { - addKeys.push(e); - } else { - noAddKeys.push(e); - } - }); - let returnjson = {}; - responseList.forEach((e) => { - noAddKeys.forEach((f) => { - returnjson[f] = e[f]; - }); - addKeys.forEach((g) => { - if (e[g].forEach) { - if (returnjson[g]) { - returnjson[g] = [...returnjson[g], ...e[g]]; - } else { - returnjson[g] = e[g]; - } - } else { - if (returnjson[g]) { - returnjson[g] = { ...returnjson[g], ...e[g] }; - } else { - returnjson[g] = e[g]; - } - } - }); - }); - return returnjson; - } - send(socket, FuncMap, data, returnFunc) { - if (socket.readyState === socket.OPEN) { - socket.send(JSON.stringify(data)); - FuncMap[data.id] = (e) => { - returnFunc(e.data); - }; - socket.onmessage = (e) => { - try { - let j = JSON.parse(e.data); - FuncMap[j.id](e); - delete FuncMap[j.id]; - } catch (error) { - try { - let j = new Uint8Array(e.data); - let id = 0; - for (let index = 0; index < j[2]; index++) { - const element = j[3 + index]; - id += element * (0xff ** index); - } - FuncMap[id](j.slice(3 + j[2])); - delete FuncMap[id]; - } catch (error) { - } - } - }; - } else throw new Error("socket not open"); - } -} - -class LineSquareClient { - constructor(authToken, device, resolve) { - this.SQ1 = new LineTCompactSocket("/SQ1", authToken, device, resolve); - } - async findSquareByInvitationTicket(ticket) { - let v = { invitationTicket: ticket }; - let n = "findSquareByInvitationTicket"; - return await this.SQ1.postRequestAndGetResponse(v, n); - } - async getJoinedSquares() { - let v = { limit: 100 }; - let n = "getJoinedSquares"; - return await this.SQ1.postRequestAndGetContinueResponse(v, n); - } - async searchSquareMembers(squareMid, searchOption = {}) { - let v = { - squareMid: squareMid, - searchOption: searchOption, - limit: 200, - }; - let n = "searchSquareMembers"; - return await this.SQ1.postRequestAndGetContinueResponse(v, n); - } - async getBannedMembers(squareMid) { - return await this.searchSquareMembers(squareMid, { "membershipState": 6 }); - } - async sendTxtMessage(squareChatMid, text, contentMetadata = {}, reqSeq = 1) { - let v = { - reqSeq: reqSeq, - squareChatMid: squareChatMid, - squareMessage: { - message: { - to: squareChatMid, - contentType: 0, - text: text, - contentMetadata: contentMetadata, - }, - }, - }; - let n = "sendMessage"; - return await this.SQ1.postRequestAndGetResponse(v, n); - } - async fetchMyEvents(syncToken) { - let v = { - syncToken: syncToken, - limit: 200, - }; - if (!v.syncToken) { - delete v.syncToken; - } - let n = "fetchMyEvents"; - return await this.SQ1.postRequestAndGetContinueResponse(v, n); - } - async fetchSquareChatEvents(squareChatMid, syncToken) { - let v = { - squareChatMid: squareChatMid, - limit: 200, - }; - if (syncToken) { - v.syncToken = syncToken; - } - let n = "fetchSquareChatEvents"; - return await Account.postRequestAndGetResponse(v, n); - } -} -//export {LineSquareClient,LineTCompactSocket} diff --git a/site/scripti.js b/site/scripti.js deleted file mode 100644 index 1ad7896..0000000 --- a/site/scripti.js +++ /dev/null @@ -1,418 +0,0 @@ -var DEVICE; - -async function LoginMP(mail, pw, dev, cert) { - DEVICE = dev; - let rsaKey = await getRSAKeyInfo(); - let keynm = rsaKey[1]; - let nvalue = rsaKey[2]; - let evalue = rsaKey[3]; - let sessionKey = rsaKey[4]; - let certificate = cert; - let _req = await genReq( - sessionKey, - mail, - pw, - nvalue, - evalue, - ); - let secret = _req.other.secret; - let pincode = _req.other.pincode; - let res = await loginV2( - keynm, - _req.encData, - _req.secret, - "Remote1919", - certificate, - null, - "LoginZ", - ); - if (!res[1]) { - let verifier = res[3]; - console.log("Enter Pincode: " + pincode); - let e2eeInfo = await checkLoginV2PinCode(verifier)["metadata"]; - let blablabao = await genEncDevSec(e2eeInfo, secret); - let e2eeLogin = await confirmE2EELogin(verifier, blablabao); - res = await loginV2( - keynm, - _req.encData, - _req.secret, - "Remote1919", - certificate, - e2eeLogin, - "LoginZ", - ); - return [res[1], res[2]]; - } - return [res[1]]; -} - -const mkSoc = (path, tok, dev, ex) => { - return new Promise((resolve, reject) => { - new LineTCompactSocket(path, tok, dev, resolve, ex); - }); -}; - -const getRSAKeyInfo = async () => { - const params = [ - [8, 2, 1], - ]; - var soc = await mkSoc("/api/v3/TalkService.do", 0, DEVICE); - const res = await soc.postCHRRequestAndGetResponse(params, "getRSAKeyInfo"); - soc.closeSocket(); - return res; -}; - -const genReq = async ( - sessionKey, - email, - pw, - nvalue, - evalue, -) => { - let res = await fetch( - "https://v-linelogin.vercel.app/genReq/?arg=" + - enc(JSON.stringify({ - sessionKey: sessionKey, - email: email, - pw: pw, - nvalue: nvalue, - evalue: evalue, - })), - ); - return await res.json(); -}; - -const genEncDevSec = async (e2eeInfo, secret) => { - e2eeInfo["secret"] = secret; - let res = await fetch( - "https://v-linelogin.vercel.app/genEncDevSec/?" + - new URLSearchParams({ arg: (JSON.stringify(e2eeInfo)) }).toString(), - ); - return await res.text(); -}; - -const loginV2 = async ( - keynm, - encData, - secret, - deviceName = "Chrome", - cert = null, - verifier = null, - calledName = "loginV2", -) => { - let loginType = 2; - if (!secret) loginType = 0; - if (verifier) loginType = 1; - const params = [ - [ - 12, - 2, - [ - [8, 1, loginType], - [8, 2, 1], - [11, 3, keynm], - [11, 4, encData], - [2, 5, 0], - [11, 6, ""], - [11, 7, deviceName], - [11, 8, cert], - [11, 9, verifier], - [11, 10, secret], - [8, 11, 1], - [11, 12, "System Product Name"], - ], - ], - ]; - var soc = await mkSoc("/api/v3p/rs", 0, DEVICE); - const res = await soc.postCHRRequestAndGetResponse(params, calledName); - soc.closeSocket(); - return res; -}; - -const checkLoginV2PinCode = async (accessSession) => { - var soc = await mkSoc("/LF1", 0, DEVICE, { "x-lhm": "GET", "x-line-access": accessSession }); - const res = await soc.postRRequestAndGetRResponse(""); - soc.closeSocket(); - return JSON.parse(new TextDecoder().decode(res))["result"]; -}; - -const confirmE2EELogin = async (verifier, deviceSecret) => { - const params = [ - [11, 1, verifier], - [11, 2, deviceSecret], - ]; - var soc = await mkSoc("/api/v3p/rs", 0, DEVICE); - const res = await soc.postCHRRequestAndGetResponse(params, "confirmE2EELogin"); - soc.closeSocket(); - return res; -}; -class LineTCompactSocket { - constructor(gwPath, authToken, device, resolve, extraH) { - this.socket = {}; - this.socketInfo = {}; - let appVer, sysName, sysVer, UA, appName; - sysVer = "12.1.4"; - switch (device) { - case "DESKTOPWIN": - appVer = "7.16.1.3000"; - sysName = "WINDOWS"; - sysVer = "10.0.0-NT-x64"; - break; - case "DESKTOPMAC": - appVer = "7.16.1.3000"; - sysName = "MAC"; - break; - case "CHROMEOS": - appVer = "3.0.3"; - sysName = "Chrome_OS"; - sysVer = "1"; - break; - case "ANDROID": - appVer = "13.4.1"; - sysName = "Android OS"; - break; - case "IOS": - appVer = "13.3.0"; - sysName = "iOS"; - break; - case "IOSIPAD": - appVer = "13.3.0"; - sysName = "iOS"; - break; - case "WATCHOS": - appVer = "13.3.0"; - sysName = "Watch OS"; - break; - case "WEAROS": - appVer = "13.4.1"; - sysName = "Wear OS"; - break; - default: - return new Error("device name is wrong"); - break; - } - appName = device + "\t" + appVer + "\t" + sysName + "\t" + sysVer; - UA = "Line/" + appVer; - let account = { path: gwPath, auth: authToken, ua: UA, type: appName }; - if (extraH) { - account["ex"] = JSON.stringify(extraH); - } - //this.socket.post = new WebSocket("wss://line-selfbot.deno.dev/post?" + new URLSearchParams(account).toString()) - this.socket.post = new WebSocket("ws://localhost:8000/post?" + new URLSearchParams(account).toString()); - this.socket.post.onopen = (e) => { - try { - resolve(this); - } catch (e) { - } - this.socketInfo.post = { status: "open", waitFunc: {} }; - }; - this.socket.post.onclose = (e) => { - this.socketInfo.post.status = false; - }; - this.socket.post.onmessage = null; - this.socket.post.onclose = (e) => { - this.socketInfo.post = { status: false }; - }; - } - closeSocket() { - try { - this.socket.post.close(); - } catch (e) { - } - } - post(data) { - return new Promise((resolve, reject) => { - data.id = Date.now(); - this.send(this.socket.post, this.socketInfo.post.waitFunc, data, resolve); - }); - } - postr(data) { - return new Promise((resolve, reject) => { - data.id = Date.now(); - this.sendr(this.socket.post, this.socketInfo.post.waitFunc, data, resolve); - }); - } - postAndCheckResponse(data) { - return new Promise((resolve, reject) => { - this.post(data).then((r) => { - if (r.err) { - throw new Error(r.err); - } else { - resolve(r); - } - }); - }); - } - sendr(socket, FuncMap, data, returnFunc) { - if (socket.readyState === socket.OPEN) { - socket.send(JSON.stringify(data)); - FuncMap[data.id] = (e) => { - returnFunc(e.data); - }; - socket.onmessage = (e) => { - try { - let j = new Uint8Array(e.data); - let id = 0; - for (let index = 0; index < j[2]; index++) { - const element = j[3 + index]; - id += element * (0xff ** index); - } - FuncMap[id](j.slice(3 + j[2])); - delete FuncMap[id]; - } catch (error) { - } - }; - } else throw new Error("socket not open"); - } - - async postParseThrift(data) { - let reqJson, resJson; - reqJson = data; - resJson = JSON.parse(await this.postAndCheckResponse(reqJson)); - return resJson; - } - async postRRequestAndGetRResponse(data, isBuf = false) { - let request = { value: data, type: 5 }; - if (isBuf) { - request.name = "b64"; - request.value = btoa([...data].map((n) => String.fromCharCode(n)).join("")); - } - let response = await this.postr(request); - return response; - } - async postCHRRequestAndGetResponse(data, methodName) { - let request = { value: data, name: methodName, type: 3 }; - let response = await this.postParseThrift(request); - return response.value; - } - async postRequestAndGetResponse(data, methodName) { - let request = { value: data, name: methodName, type: 1 }; - let response = await this.postParseThrift(request); - return response.value; - } - async postRequestAndGetContinueResponse(data, methodName) { - let responseList = []; - let addKeys = []; - let noAddKeys = []; - let request = { value: data, name: methodName, type: 1 }; - let response = await this.postParseThrift(request); - responseList.push(response.value); - while (response.value.continuationToken) { - request.value.continuationToken = response.value.continuationToken; - request.value.syncToken = response.value.syncToken; - response = await this.postParseThrift(request); - responseList.push(response.value); - } - Object.keys(responseList[0]).forEach((e) => { - if ((typeof responseList[0][e]) == "object") { - addKeys.push(e); - } else { - noAddKeys.push(e); - } - }); - let returnjson = {}; - responseList.forEach((e) => { - noAddKeys.forEach((f) => { - returnjson[f] = e[f]; - }); - addKeys.forEach((g) => { - if (e[g].forEach) { - if (returnjson[g]) { - returnjson[g] = [...returnjson[g], ...e[g]]; - } else { - returnjson[g] = e[g]; - } - } else { - if (returnjson[g]) { - returnjson[g] = { ...returnjson[g], ...e[g] }; - } else { - returnjson[g] = e[g]; - } - } - }); - }); - return returnjson; - } - send(socket, FuncMap, data, returnFunc) { - if (socket.readyState === socket.OPEN) { - socket.send(JSON.stringify(data)); - FuncMap[data.id] = (e) => { - returnFunc(e.data); - }; - socket.onmessage = (e) => { - try { - let j = JSON.parse(e.data); - FuncMap[j.id](e); - delete FuncMap[j.id]; - } catch (error) { - } - }; - } else throw new Error("socket not open"); - } -} - -class LineSquareClient { - constructor(authToken, device, resolve) { - this.SQ1 = new LineTCompactSocket("/SQ1", authToken, device, resolve); - } - async findSquareByInvitationTicket(ticket) { - let v = { invitationTicket: ticket }; - let n = "findSquareByInvitationTicket"; - return await this.SQ1.postRequestAndGetResponse(v, n); - } - async getJoinedSquares() { - let v = { limit: 100 }; - let n = "getJoinedSquares"; - return await this.SQ1.postRequestAndGetContinueResponse(v, n); - } - async searchSquareMembers(squareMid, searchOption = {}) { - let v = { - squareMid: squareMid, - searchOption: searchOption, - limit: 200, - }; - let n = "searchSquareMembers"; - return await this.SQ1.postRequestAndGetContinueResponse(v, n); - } - async getBannedMembers(squareMid) { - return await this.searchSquareMembers(squareMid, { "membershipState": 6 }); - } - async sendTxtMessage(squareChatMid, text, contentMetadata = {}, reqSeq = 1) { - let v = { - reqSeq: reqSeq, - squareChatMid: squareChatMid, - squareMessage: { - message: { - to: squareChatMid, - contentType: 0, - text: text, - contentMetadata: contentMetadata, - }, - }, - }; - let n = "sendMessage"; - return await this.SQ1.postRequestAndGetResponse(v, n); - } - async fetchMyEvents(syncToken) { - let v = { - syncToken: syncToken, - limit: 200, - }; - if (!v.syncToken) { - delete v.syncToken; - } - let n = "fetchMyEvents"; - return await this.SQ1.postRequestAndGetContinueResponse(v, n); - } - async fetchSquareChatEvents(squareChatMid, syncToken) { - let v = { - squareChatMid: squareChatMid, - limit: 200, - }; - if (syncToken) { - v.syncToken = syncToken; - } - let n = "fetchSquareChatEvents"; - return await Account.postRequestAndGetResponse(v, n); - } -} diff --git a/site/site.md b/site/site.md index 3d17b7a..da41e98 100644 --- a/site/site.md +++ b/site/site.md @@ -1 +1 @@ -Site HTML +#### Site HTML diff --git a/site/strint.js b/site/strint.js deleted file mode 100644 index 799f09a..0000000 --- a/site/strint.js +++ /dev/null @@ -1,51 +0,0 @@ -(() => { - function string_to_utf8_hex_string(text) { - var bytes1 = string_to_utf8_bytes(text); - var hex_str1 = bytes_to_hex_string(bytes1); - return hex_str1; - } - function string_to_utf8_bytes(text) { - var result = []; - if (text == null) return result; - for (var i = 0; i < text.length; i++) { - var c = text.charCodeAt(i); - if (c <= 0x7f) result.push(c); - else if (c <= 0x07ff) { - result.push(((c >> 6) & 0x1F) | 0xC0); - result.push((c & 0x3F) | 0x80); - } else { - result.push(((c >> 12) & 0x0F) | 0xE0); - result.push(((c >> 6) & 0x3F) | 0x80); - result.push((c & 0x3F) | 0x80); - } - } - return result; - } - function byte_to_hex(byte_num) { - var digits = byte_num.toString(16); - if (byte_num < 16) return "0" + digits; - return digits; - } - function bytes_to_hex_string(bytes) { - var result = ""; - for (var i = 0; i < bytes.length; i++) result += byte_to_hex(bytes[i]); - return result; - } - function hex_to_byte(hex_str) { - return parseInt(hex_str, 16); - } - function hex_string_to_bytes(hex_str) { - var result = []; - for (var i = 0; i < hex_str.length; i += 2) result.push(hex_to_byte(hex_str.substr(i, 2))); - return result; - } - function enc(str) { - let int = BigInt("0x" + string_to_utf8_hex_string(str)); - int = int * 334n; - return base64encode(hex_string_to_bytes(int.toString(16))); - } - function base64encode(data) { - return btoa([...data].map((n) => String.fromCharCode(n)).join("")); - } - window.enc = enc; -})(); diff --git a/site/thriftrw-node/README.md b/site/thriftrw-node/README.md deleted file mode 100644 index 2fd9982..0000000 --- a/site/thriftrw-node/README.md +++ /dev/null @@ -1 +0,0 @@ -https://github.com/thriftrw/thriftrw-node diff --git a/site/tmp/Xquery.js b/site/tmp/Xquery.js deleted file mode 100644 index 90ba85d..0000000 --- a/site/tmp/Xquery.js +++ /dev/null @@ -1,310 +0,0 @@ -/** - * @Copyright @amex2189 | @EdamAme-x / Free - * https://github.com/EdamAme-x/XueryJS - */ -"use strict"; - -const Tags = [ - "a", - "abbr", - "address", - "area", - "article", - "aside", - "audio", - "b", - "base", - "bdi", - "bdo", - "blockquote", - "body", - "br", - "button", - "canvas", - "caption", - "cite", - "code", - "col", - "colgroup", - "data", - "datalist", - "dd", - "del", - "details", - "dfn", - "dialog", - "div", - "dl", - "dt", - "em", - "embed", - "fieldset", - "figcaption", - "figure", - "footer", - "form", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "head", - "header", - "hr", - "html", - "i", - "iframe", - "img", - "input", - "ins", - "kbd", - "label", - "legend", - "li", - "link", - "main", - "map", - "mark", - "meta", - "meter", - "nav", - "noscript", - "object", - "ol", - "optgroup", - "option", - "output", - "p", - "param", - "picture", - "pre", - "progress", - "q", - "rp", - "rt", - "ruby", - "s", - "samp", - "script", - "section", - "select", - "small", - "source", - "span", - "strong", - "style", - "sub", - "summary", - "sup", - "table", - "tbody", - "td", - "template", - "textarea", - "tfoot", - "th", - "thead", - "time", - "title", - "tr", - "track", - "u", - "ul", - "var", - "video", - "wbr", - "applet", - "basefont", - "big", - "blink", - "center", - "command", - "content", - "dir", - "element", - "font", - "frame", - "frameset", - "image", - "isindex", - "keygen", - "listing", - "marquee", - "menu", - "menuitem", - "multicol", - "nextid", - "nobr", - "noembed", - "noframes", - "plaintext", - "shadow", - "spacer", - "strike", - "tt", - "xmp", - "acronym", - "bgsound", - "dir", - "frameset", - "noframes", - "tt", - "video", - "audio", - "button", - "details", - "dialog", - "summary", - "template", - "figcaption", - "mark", - "wbr", - "svg", - "g", - "path", - "defs", - "clipPath", - "circle", -]; -//globalThis.X = {}; - -for (let e = 0; e < Tags.length; e++) { - globalThis[Tags[e]] = (t, ...i) => { - let r = document.createElement(Tags[e]); - if ( - Tags[e] == "g" || Tags[e] == "path" || Tags[e] == "svg" || Tags[e] == "defs" || Tags[e] == "clipPath" || - Tags[e] == "circle" - ) { - r = document.createElementNS("http://www.w3.org/2000/svg", Tags[e]); - } - if (t) { - for (let n in t) { - if ("raw" === n) { - r.innerHTML = t[n]; - continue; - } - if ("style" === n && "object" == typeof t[n]) { for (let o in t[n]) r.style[o] = t[n][o]; } - if ("$" === n.slice("")[0]) { - let x = (...arg) => { - t[n](r, ...arg); - }; - r.addEventListener(n.slice(1), x); - continue; - } - r.setAttribute(n, t[n]); - } - } - for (let a = 0; a < i.length; a++) { - "string" == typeof i[a] || "number" == typeof i[a] || "boolean" == typeof i[a] || void 0 === i[a] || - null === i[a] - ? r.appendChild(document.createTextNode(i[a])) - : r.appendChild(i[a]); - } - return r; - }; -} -globalThis.$ = (t) => { - let i = document.querySelectorAll(t); - if (0 === i.length) { - return { - in() { - throw Error("Element not found"); - }, - }; - } - let r = {}; - for (let n = 0; n < i.length; n++) { - r[n] = { - in(...t) { - for (; i[n].firstChild;) i[n].removeChild(i[n].firstChild); - if (!t) { - i[n].innerHTML = ""; - return; - } - t.forEach((e) => { - i[n].appendChild(e); - }); - }, - out: i[n], - outX() { - return genX(i[n]); - }, - }, - r.in = r[0].in, - r.out = r[0].out, - r.length = i.length; - } - return r; -}; - -function genX(elm) { - function ToStr(str = "") { - return str.replaceAll("\n", "\\n").replaceAll("\t", "\\t").replaceAll('"', '\\"'); - } - if (!elm.localName) { - if (!elm.data) { - return; - } - let txt = elm.data.replaceAll(" ", "").replaceAll("\n", ""); - if (txt == "") { - return; - } - return '"' + ToStr(elm.data) + '"'; - } - if (elm.localName.indexOf("-") != -1) { - let prms = ""; - elm.shadowRoot.childNodes.forEach((e) => { - let g = genX(e); - if (g) { - prms += g + ","; - } - }); - return prms; - } - let ops = {}; - let prms = []; - let innerText; - let nochild = false; - try { - let opsN = elm.getAttributeNames(); - for (const i in opsN) { - let tmp = elm.getAttribute(opsN[i]); - if ("string" == typeof tmp || "number" == typeof tmp || "boolean" == typeof tmp) { - ops[opsN[i]] = tmp; - } - } - } catch (error) { - console.log(elm); - } - - if (elm.childNodes.length == 0) { - innerText = elm.innerText; - } else if (elm.innerHTML.indexOf("<") == -1) { - innerText = elm.innerText; - nochild = true; - } - - if (innerText) { - prms.push('"' + ToStr(innerText) + '"'); - } - if (!nochild) { - let child = [...elm.childNodes]; - child.forEach((e) => { - let g = genX(e); - if (g) { - prms.push(g); - } - }); - } - - let prmsTxt = ""; - prms.forEach((e) => { - prmsTxt += `${e}, -`; - }); - return `${elm.localName}( -${JSON.stringify(ops, null, 1)}, -${prms} -)`; -} diff --git a/site/tmp/escape.js b/site/tmp/escape.js deleted file mode 100644 index 495ecb4..0000000 --- a/site/tmp/escape.js +++ /dev/null @@ -1,74 +0,0 @@ -/*! - * escape-html - * Copyright(c) 2012-2013 TJ Holowaychuk - * Copyright(c) 2015 Andreas Lubbe - * Copyright(c) 2015 Tiancheng "Timothy" Gu - * MIT Licensed - */ - -"use strict"; - -/** - * Module variables. - * @private - */ - -var matchHtmlRegExp = /["'&<>]/; - -/** - * Module exports. - * @public - */ - -/** - * Escape special characters in the given string of html. - * - * @param {string} string The string to escape for inserting into HTML - * @return {string} - * @public - */ - -function escapeHtml(string) { - var str = "" + string; - var match = matchHtmlRegExp.exec(str); - - if (!match) { - return str; - } - - var escape; - var html = ""; - var index = 0; - var lastIndex = 0; - - for (index = match.index; index < str.length; index++) { - switch (str.charCodeAt(index)) { - case 34: // " - escape = """; - break; - case 38: // & - escape = "&"; - break; - case 39: // ' - escape = "'"; - break; - case 60: // < - escape = "<"; - break; - case 62: // > - escape = ">"; - break; - default: - continue; - } - - if (lastIndex !== index) { - html += str.substring(lastIndex, index); - } - - lastIndex = index + 1; - html += escape; - } - - return lastIndex !== index ? html + str.substring(lastIndex, index) : html; -} diff --git a/site/tmp/index.html b/site/tmp/index.html deleted file mode 100644 index d980d54..0000000 --- a/site/tmp/index.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - - - LINE - - - - - - - -
      -
      -
      -
      -
        -
      • -
      • -
        25
        -
      • -
      • -
      • -
      • - -
      -
        -
      • -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
      -
        -
      • -
      • -
      -
      -
      -
      -
      -
      - - - - -
      -
      -
        -
        -
        - - - - - - - - \ No newline at end of file diff --git a/site/tmp/lineChrome.html b/site/tmp/lineChrome.html deleted file mode 100644 index 1343fb3..0000000 --- a/site/tmp/lineChrome.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - - LINE - - - - - - - -
        -
        -
        -
        -
          -
        • -
        • -
          25
          -
        • -
        • -
        • -
        • - -
        -
          -
        • -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
        -
          -
        • -
        • -
        -
        -
        -
        -
        -
        - - - - -
        -
        -
          -
          -
          - - - - - \ No newline at end of file diff --git a/site/tmp/localforage.min.js b/site/tmp/localforage.min.js deleted file mode 100644 index 71a653e..0000000 --- a/site/tmp/localforage.min.js +++ /dev/null @@ -1,1657 +0,0 @@ -/*! - localForage -- Offline Storage, Improved - Version 1.10.0 - https://localforage.github.io/localForage - (c) 2013-2017 Mozilla, Apache License 2.0 -*/ -!function (a) { - if ("object" == typeof exports && "undefined" != typeof module) module.exports = a(); - else if ("function" == typeof define && define.amd) define([], a); - else { - var b; - b = "undefined" != typeof window - ? window - : "undefined" != typeof global - ? global - : "undefined" != typeof self - ? self - : this, b.localforage = a(); - } -}(function () { - return function a(b, c, d) { - function e(g, h) { - if (!c[g]) { - if (!b[g]) { - var i = "function" == typeof require && require; - if (!h && i) return i(g, !0); - if (f) return f(g, !0); - var j = new Error("Cannot find module '" + g + "'"); - throw j.code = "MODULE_NOT_FOUND", j; - } - var k = c[g] = { exports: {} }; - b[g][0].call( - k.exports, - function (a) { - var c = b[g][1][a]; - return e(c || a); - }, - k, - k.exports, - a, - b, - c, - d, - ); - } - return c[g].exports; - } - for (var f = "function" == typeof require && require, g = 0; g < d.length; g++) e(d[g]); - return e; - }( - { - 1: [function (a, b, c) { - (function (a) { - "use strict"; - function c() { - k = !0; - for (var a, b, c = l.length; c;) { - for (b = l, l = [], a = -1; ++a < c;) b[a](); - c = l.length; - } - k = !1; - } - function d(a) { - 1 !== l.push(a) || k || e(); - } - var e, f = a.MutationObserver || a.WebKitMutationObserver; - if (f) { - var g = 0, h = new f(c), i = a.document.createTextNode(""); - h.observe(i, { characterData: !0 }), - e = function () { - i.data = g = ++g % 2; - }; - } else if (a.setImmediate || void 0 === a.MessageChannel) { - e = "document" in a && "onreadystatechange" in a.document.createElement("script") - ? function () { - var b = a.document.createElement("script"); - b.onreadystatechange = function () { - c(), b.onreadystatechange = null, b.parentNode.removeChild(b), b = null; - }, a.document.documentElement.appendChild(b); - } - : function () { - setTimeout(c, 0); - }; - } else { - var j = new a.MessageChannel(); - j.port1.onmessage = c, - e = function () { - j.port2.postMessage(0); - }; - } - var k, l = []; - b.exports = d; - }).call( - this, - "undefined" != typeof global - ? global - : "undefined" != typeof self - ? self - : "undefined" != typeof window - ? window - : {}, - ); - }, {}], - 2: [function (a, b, c) { - "use strict"; - function d() {} - function e(a) { - if ("function" != typeof a) { - throw new TypeError("resolver must be a function"); - } - this.state = s, this.queue = [], this.outcome = void 0, a !== d && i(this, a); - } - function f(a, b, c) { - this.promise = a, - "function" == typeof b && (this.onFulfilled = b, this.callFulfilled = this.otherCallFulfilled), - "function" == typeof c && (this.onRejected = c, this.callRejected = this.otherCallRejected); - } - function g(a, b, c) { - o(function () { - var d; - try { - d = b(c); - } catch (b) { - return p.reject(a, b); - } - d === a ? p.reject(a, new TypeError("Cannot resolve promise with itself")) : p.resolve(a, d); - }); - } - function h(a) { - var b = a && a.then; - if (a && ("object" == typeof a || "function" == typeof a) && "function" == typeof b) { - return function () { - b.apply(a, arguments); - }; - } - } - function i(a, b) { - function c(b) { - f || (f = !0, p.reject(a, b)); - } - function d(b) { - f || (f = !0, p.resolve(a, b)); - } - function e() { - b(d, c); - } - var f = !1, g = j(e); - "error" === g.status && c(g.value); - } - function j(a, b) { - var c = {}; - try { - c.value = a(b), c.status = "success"; - } catch (a) { - c.status = "error", c.value = a; - } - return c; - } - function k(a) { - return a instanceof this ? a : p.resolve(new this(d), a); - } - function l(a) { - var b = new this(d); - return p.reject(b, a); - } - function m(a) { - function b(a, b) { - function d(a) { - g[b] = a, ++h !== e || f || (f = !0, p.resolve(j, g)); - } - c.resolve(a).then(d, function (a) { - f || (f = !0, p.reject(j, a)); - }); - } - var c = this; - if ("[object Array]" !== Object.prototype.toString.call(a)) { - return this.reject(new TypeError("must be an array")); - } - var e = a.length, f = !1; - if (!e) return this.resolve([]); - for (var g = new Array(e), h = 0, i = -1, j = new this(d); ++i < e;) b(a[i], i); - return j; - } - function n(a) { - function b(a) { - c.resolve(a).then(function (a) { - f || (f = !0, p.resolve(h, a)); - }, function (a) { - f || (f = !0, p.reject(h, a)); - }); - } - var c = this; - if ("[object Array]" !== Object.prototype.toString.call(a)) { - return this.reject(new TypeError("must be an array")); - } - var e = a.length, f = !1; - if (!e) return this.resolve([]); - for (var g = -1, h = new this(d); ++g < e;) b(a[g]); - return h; - } - var o = a(1), p = {}, q = ["REJECTED"], r = ["FULFILLED"], s = ["PENDING"]; - b.exports = e, - e.prototype.catch = function (a) { - return this.then(null, a); - }, - e.prototype.then = function (a, b) { - if ( - "function" != typeof a && this.state === r || "function" != typeof b && this.state === q - ) return this; - var c = new this.constructor(d); - if (this.state !== s) g(c, this.state === r ? a : b, this.outcome); - else this.queue.push(new f(c, a, b)); - return c; - }, - f.prototype.callFulfilled = function (a) { - p.resolve(this.promise, a); - }, - f.prototype.otherCallFulfilled = function (a) { - g(this.promise, this.onFulfilled, a); - }, - f.prototype.callRejected = function (a) { - p.reject(this.promise, a); - }, - f.prototype.otherCallRejected = function (a) { - g(this.promise, this.onRejected, a); - }, - p.resolve = function (a, b) { - var c = j(h, b); - if ("error" === c.status) return p.reject(a, c.value); - var d = c.value; - if (d) i(a, d); - else { - a.state = r, a.outcome = b; - for (var e = -1, f = a.queue.length; ++e < f;) a.queue[e].callFulfilled(b); - } - return a; - }, - p.reject = function (a, b) { - a.state = q, a.outcome = b; - for (var c = -1, d = a.queue.length; ++c < d;) a.queue[c].callRejected(b); - return a; - }, - e.resolve = k, - e.reject = l, - e.all = m, - e.race = n; - }, { 1: 1 }], - 3: [function (a, b, c) { - (function (b) { - "use strict"; - "function" != typeof b.Promise && (b.Promise = a(2)); - }).call( - this, - "undefined" != typeof global - ? global - : "undefined" != typeof self - ? self - : "undefined" != typeof window - ? window - : {}, - ); - }, { 2: 2 }], - 4: [function (a, b, c) { - "use strict"; - function d(a, b) { - if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function"); - } - function e() { - try { - if ("undefined" != typeof indexedDB) return indexedDB; - if ("undefined" != typeof webkitIndexedDB) return webkitIndexedDB; - if ("undefined" != typeof mozIndexedDB) return mozIndexedDB; - if ("undefined" != typeof OIndexedDB) return OIndexedDB; - if ("undefined" != typeof msIndexedDB) return msIndexedDB; - } catch (a) { - return; - } - } - function f() { - try { - if (!ua || !ua.open) return !1; - var a = "undefined" != typeof openDatabase && - /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && - !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform), - b = "function" == typeof fetch && -1 !== fetch.toString().indexOf("[native code"); - return (!a || b) && "undefined" != typeof indexedDB && "undefined" != typeof IDBKeyRange; - } catch (a) { - return !1; - } - } - function g(a, b) { - a = a || [], b = b || {}; - try { - return new Blob(a, b); - } catch (f) { - if ("TypeError" !== f.name) throw f; - for ( - var c = "undefined" != typeof BlobBuilder - ? BlobBuilder - : "undefined" != typeof MSBlobBuilder - ? MSBlobBuilder - : "undefined" != typeof MozBlobBuilder - ? MozBlobBuilder - : WebKitBlobBuilder, - d = new c(), - e = 0; - e < a.length; - e += 1 - ) d.append(a[e]); - return d.getBlob(b.type); - } - } - function h(a, b) { - b && a.then(function (a) { - b(null, a); - }, function (a) { - b(a); - }); - } - function i(a, b, c) { - "function" == typeof b && a.then(b), "function" == typeof c && a.catch(c); - } - function j(a) { - return "string" != typeof a && - (console.warn(a + " used as a key, but it is not a string."), a = String(a)), - a; - } - function k() { - if (arguments.length && "function" == typeof arguments[arguments.length - 1]) { - return arguments[arguments.length - 1]; - } - } - function l(a) { - for (var b = a.length, c = new ArrayBuffer(b), d = new Uint8Array(c), e = 0; e < b; e++) { - d[e] = a.charCodeAt(e); - } - return c; - } - function m(a) { - return new va(function (b) { - var c = a.transaction(wa, Ba), d = g([""]); - c.objectStore(wa).put(d, "key"), - c.onabort = function (a) { - a.preventDefault(), a.stopPropagation(), b(!1); - }, - c.oncomplete = function () { - var a = navigator.userAgent.match(/Chrome\/(\d+)/), - c = navigator.userAgent.match(/Edge\//); - b(c || !a || parseInt(a[1], 10) >= 43); - }; - }).catch(function () { - return !1; - }); - } - function n(a) { - return "boolean" == typeof xa ? va.resolve(xa) : m(a).then(function (a) { - return xa = a; - }); - } - function o(a) { - var b = ya[a.name], c = {}; - c.promise = new va(function (a, b) { - c.resolve = a, c.reject = b; - }), - b.deferredOperations.push(c), - b.dbReady - ? b.dbReady = b.dbReady.then(function () { - return c.promise; - }) - : b.dbReady = c.promise; - } - function p(a) { - var b = ya[a.name], c = b.deferredOperations.pop(); - if (c) return c.resolve(), c.promise; - } - function q(a, b) { - var c = ya[a.name], d = c.deferredOperations.pop(); - if (d) return d.reject(b), d.promise; - } - function r(a, b) { - return new va(function (c, d) { - if (ya[a.name] = ya[a.name] || B(), a.db) { - if (!b) return c(a.db); - o(a), a.db.close(); - } - var e = [a.name]; - b && e.push(a.version); - var f = ua.open.apply(ua, e); - b && (f.onupgradeneeded = function (b) { - var c = f.result; - try { - c.createObjectStore(a.storeName), b.oldVersion <= 1 && c.createObjectStore(wa); - } catch (c) { - if ("ConstraintError" !== c.name) throw c; - console.warn( - 'The database "' + a.name + '" has been upgraded from version ' + b.oldVersion + - " to version " + b.newVersion + ', but the storage "' + a.storeName + - '" already exists.', - ); - } - }), - f.onerror = function (a) { - a.preventDefault(), d(f.error); - }, - f.onsuccess = function () { - var b = f.result; - b.onversionchange = function (a) { - a.target.close(); - }, - c(b), - p(a); - }; - }); - } - function s(a) { - return r(a, !1); - } - function t(a) { - return r(a, !0); - } - function u(a, b) { - if (!a.db) return !0; - var c = !a.db.objectStoreNames.contains(a.storeName), - d = a.version < a.db.version, - e = a.version > a.db.version; - if ( - d && - (a.version !== b && - console.warn( - 'The database "' + a.name + "\" can't be downgraded from version " + a.db.version + - " to version " + a.version + ".", - ), - a.version = a.db.version), e || c - ) { - if (c) { - var f = a.db.version + 1; - f > a.version && (a.version = f); - } - return !0; - } - return !1; - } - function v(a) { - return new va(function (b, c) { - var d = new FileReader(); - d.onerror = c, - d.onloadend = function (c) { - var d = btoa(c.target.result || ""); - b({ __local_forage_encoded_blob: !0, data: d, type: a.type }); - }, - d.readAsBinaryString(a); - }); - } - function w(a) { - return g([l(atob(a.data))], { type: a.type }); - } - function x(a) { - return a && a.__local_forage_encoded_blob; - } - function y(a) { - var b = this, - c = b._initReady().then(function () { - var a = ya[b._dbInfo.name]; - if (a && a.dbReady) return a.dbReady; - }); - return i(c, a, a), c; - } - function z(a) { - o(a); - for (var b = ya[a.name], c = b.forages, d = 0; d < c.length; d++) { - var e = c[d]; - e._dbInfo.db && (e._dbInfo.db.close(), e._dbInfo.db = null); - } - return a.db = null, - s(a).then(function (b) { - return a.db = b, u(a) ? t(a) : b; - }).then(function (d) { - a.db = b.db = d; - for (var e = 0; e < c.length; e++) c[e]._dbInfo.db = d; - }).catch(function (b) { - throw q(a, b), b; - }); - } - function A(a, b, c, d) { - void 0 === d && (d = 1); - try { - var e = a.db.transaction(a.storeName, b); - c(null, e); - } catch (e) { - if (d > 0 && (!a.db || "InvalidStateError" === e.name || "NotFoundError" === e.name)) { - return va.resolve().then(function () { - if ( - !a.db || - "NotFoundError" === e.name && !a.db.objectStoreNames.contains(a.storeName) && - a.version <= a.db.version - ) return a.db && (a.version = a.db.version + 1), t(a); - }).then(function () { - return z(a).then(function () { - A(a, b, c, d - 1); - }); - }).catch(c); - } - c(e); - } - } - function B() { - return { forages: [], db: null, dbReady: null, deferredOperations: [] }; - } - function C(a) { - function b() { - return va.resolve(); - } - var c = this, d = { db: null }; - if (a) { for (var e in a) d[e] = a[e]; } - var f = ya[d.name]; - f || (f = B(), ya[d.name] = f), - f.forages.push(c), - c._initReady || (c._initReady = c.ready, c.ready = y); - for (var g = [], h = 0; h < f.forages.length; h++) { - var i = f.forages[h]; - i !== c && g.push(i._initReady().catch(b)); - } - var j = f.forages.slice(0); - return va.all(g).then(function () { - return d.db = f.db, s(d); - }).then(function (a) { - return d.db = a, u(d, c._defaultConfig.version) ? t(d) : a; - }).then(function (a) { - d.db = f.db = a, c._dbInfo = d; - for (var b = 0; b < j.length; b++) { - var e = j[b]; - e !== c && (e._dbInfo.db = d.db, e._dbInfo.version = d.version); - } - }); - } - function D(a, b) { - var c = this; - a = j(a); - var d = new va(function (b, d) { - c.ready().then(function () { - A(c._dbInfo, Aa, function (e, f) { - if (e) return d(e); - try { - var g = f.objectStore(c._dbInfo.storeName), h = g.get(a); - h.onsuccess = function () { - var a = h.result; - void 0 === a && (a = null), x(a) && (a = w(a)), b(a); - }, - h.onerror = function () { - d(h.error); - }; - } catch (a) { - d(a); - } - }); - }).catch(d); - }); - return h(d, b), d; - } - function E(a, b) { - var c = this, - d = new va(function (b, d) { - c.ready().then(function () { - A(c._dbInfo, Aa, function (e, f) { - if (e) return d(e); - try { - var g = f.objectStore(c._dbInfo.storeName), h = g.openCursor(), i = 1; - h.onsuccess = function () { - var c = h.result; - if (c) { - var d = c.value; - x(d) && (d = w(d)); - var e = a(d, c.key, i++); - void 0 !== e ? b(e) : c.continue(); - } else b(); - }, - h.onerror = function () { - d(h.error); - }; - } catch (a) { - d(a); - } - }); - }).catch(d); - }); - return h(d, b), d; - } - function F(a, b, c) { - var d = this; - a = j(a); - var e = new va(function (c, e) { - var f; - d.ready().then(function () { - return f = d._dbInfo, - "[object Blob]" === za.call(b) - ? n(f.db).then(function (a) { - return a ? b : v(b); - }) - : b; - }).then(function (b) { - A(d._dbInfo, Ba, function (f, g) { - if (f) return e(f); - try { - var h = g.objectStore(d._dbInfo.storeName); - null === b && (b = void 0); - var i = h.put(b, a); - g.oncomplete = function () { - void 0 === b && (b = null), c(b); - }, - g.onabort = g.onerror = function () { - var a = i.error ? i.error : i.transaction.error; - e(a); - }; - } catch (a) { - e(a); - } - }); - }).catch(e); - }); - return h(e, c), e; - } - function G(a, b) { - var c = this; - a = j(a); - var d = new va(function (b, d) { - c.ready().then(function () { - A(c._dbInfo, Ba, function (e, f) { - if (e) return d(e); - try { - var g = f.objectStore(c._dbInfo.storeName), h = g.delete(a); - f.oncomplete = function () { - b(); - }, - f.onerror = function () { - d(h.error); - }, - f.onabort = function () { - var a = h.error ? h.error : h.transaction.error; - d(a); - }; - } catch (a) { - d(a); - } - }); - }).catch(d); - }); - return h(d, b), d; - } - function H(a) { - var b = this, - c = new va(function (a, c) { - b.ready().then(function () { - A(b._dbInfo, Ba, function (d, e) { - if (d) return c(d); - try { - var f = e.objectStore(b._dbInfo.storeName), g = f.clear(); - e.oncomplete = function () { - a(); - }, - e.onabort = e.onerror = function () { - var a = g.error ? g.error : g.transaction.error; - c(a); - }; - } catch (a) { - c(a); - } - }); - }).catch(c); - }); - return h(c, a), c; - } - function I(a) { - var b = this, - c = new va(function (a, c) { - b.ready().then(function () { - A(b._dbInfo, Aa, function (d, e) { - if (d) return c(d); - try { - var f = e.objectStore(b._dbInfo.storeName), g = f.count(); - g.onsuccess = function () { - a(g.result); - }, - g.onerror = function () { - c(g.error); - }; - } catch (a) { - c(a); - } - }); - }).catch(c); - }); - return h(c, a), c; - } - function J(a, b) { - var c = this, - d = new va(function (b, d) { - if (a < 0) return void b(null); - c.ready().then(function () { - A(c._dbInfo, Aa, function (e, f) { - if (e) return d(e); - try { - var g = f.objectStore(c._dbInfo.storeName), h = !1, i = g.openKeyCursor(); - i.onsuccess = function () { - var c = i.result; - if (!c) return void b(null); - 0 === a ? b(c.key) : h ? b(c.key) : (h = !0, c.advance(a)); - }, - i.onerror = function () { - d(i.error); - }; - } catch (a) { - d(a); - } - }); - }).catch(d); - }); - return h(d, b), d; - } - function K(a) { - var b = this, - c = new va(function (a, c) { - b.ready().then(function () { - A(b._dbInfo, Aa, function (d, e) { - if (d) return c(d); - try { - var f = e.objectStore(b._dbInfo.storeName), g = f.openKeyCursor(), h = []; - g.onsuccess = function () { - var b = g.result; - if (!b) return void a(h); - h.push(b.key), b.continue(); - }, - g.onerror = function () { - c(g.error); - }; - } catch (a) { - c(a); - } - }); - }).catch(c); - }); - return h(c, a), c; - } - function L(a, b) { - b = k.apply(this, arguments); - var c = this.config(); - a = "function" != typeof a && a || {}, - a.name || (a.name = a.name || c.name, a.storeName = a.storeName || c.storeName); - var d, e = this; - if (a.name) { - var f = a.name === c.name && e._dbInfo.db, - g = f ? va.resolve(e._dbInfo.db) : s(a).then(function (b) { - var c = ya[a.name], d = c.forages; - c.db = b; - for (var e = 0; e < d.length; e++) d[e]._dbInfo.db = b; - return b; - }); - d = a.storeName - ? g.then(function (b) { - if (b.objectStoreNames.contains(a.storeName)) { - var c = b.version + 1; - o(a); - var d = ya[a.name], e = d.forages; - b.close(); - for (var f = 0; f < e.length; f++) { - var g = e[f]; - g._dbInfo.db = null, g._dbInfo.version = c; - } - return new va(function (b, d) { - var e = ua.open(a.name, c); - e.onerror = function (a) { - e.result.close(), d(a); - }, - e.onupgradeneeded = function () { - e.result.deleteObjectStore(a.storeName); - }, - e.onsuccess = function () { - var a = e.result; - a.close(), b(a); - }; - }).then(function (a) { - d.db = a; - for (var b = 0; b < e.length; b++) { - var c = e[b]; - c._dbInfo.db = a, p(c._dbInfo); - } - }).catch(function (b) { - throw (q(a, b) || va.resolve()).catch(function () {}), b; - }); - } - }) - : g.then(function (b) { - o(a); - var c = ya[a.name], d = c.forages; - b.close(); - for (var e = 0; e < d.length; e++) d[e]._dbInfo.db = null; - return new va(function (b, c) { - var d = ua.deleteDatabase(a.name); - d.onerror = function () { - var a = d.result; - a && a.close(), c(d.error); - }, - d.onblocked = function () { - console.warn( - 'dropInstance blocked for database "' + a.name + - '" until all open connections are closed', - ); - }, - d.onsuccess = function () { - var a = d.result; - a && a.close(), b(a); - }; - }).then(function (a) { - c.db = a; - for (var b = 0; b < d.length; b++) p(d[b]._dbInfo); - }).catch(function (b) { - throw (q(a, b) || va.resolve()).catch(function () {}), b; - }); - }); - } else d = va.reject("Invalid arguments"); - return h(d, b), d; - } - function M() { - return "function" == typeof openDatabase; - } - function N(a) { - var b, c, d, e, f, g = .75 * a.length, h = a.length, i = 0; - "=" === a[a.length - 1] && (g--, "=" === a[a.length - 2] && g--); - var j = new ArrayBuffer(g), k = new Uint8Array(j); - for (b = 0; b < h; b += 4) { - c = Da.indexOf(a[b]), - d = Da.indexOf(a[b + 1]), - e = Da.indexOf(a[b + 2]), - f = Da.indexOf(a[b + 3]), - k[i++] = c << 2 | d >> 4, - k[i++] = (15 & d) << 4 | e >> 2, - k[i++] = (3 & e) << 6 | 63 & f; - } - return j; - } - function O(a) { - var b, c = new Uint8Array(a), d = ""; - for (b = 0; b < c.length; b += 3) { - d += Da[c[b] >> 2], - d += Da[(3 & c[b]) << 4 | c[b + 1] >> 4], - d += Da[(15 & c[b + 1]) << 2 | c[b + 2] >> 6], - d += Da[63 & c[b + 2]]; - } - return c.length % 3 == 2 - ? d = d.substring(0, d.length - 1) + "=" - : c.length % 3 == 1 && (d = d.substring(0, d.length - 2) + "=="), - d; - } - function P(a, b) { - var c = ""; - if ( - a && (c = Ua.call(a)), - a && - ("[object ArrayBuffer]" === c || a.buffer && "[object ArrayBuffer]" === Ua.call(a.buffer)) - ) { - var d, e = Ga; - a instanceof ArrayBuffer - ? (d = a, e += Ia) - : (d = a.buffer, - "[object Int8Array]" === c - ? e += Ka - : "[object Uint8Array]" === c - ? e += La - : "[object Uint8ClampedArray]" === c - ? e += Ma - : "[object Int16Array]" === c - ? e += Na - : "[object Uint16Array]" === c - ? e += Pa - : "[object Int32Array]" === c - ? e += Oa - : "[object Uint32Array]" === c - ? e += Qa - : "[object Float32Array]" === c - ? e += Ra - : "[object Float64Array]" === c - ? e += Sa - : b(new Error("Failed to get type for BinaryArray"))), b(e + O(d)); - } else if ("[object Blob]" === c) { - var f = new FileReader(); - f.onload = function () { - var c = Ea + a.type + "~" + O(this.result); - b(Ga + Ja + c); - }, f.readAsArrayBuffer(a); - } else {try { - b(JSON.stringify(a)); - } catch (c) { - console.error("Couldn't convert value into a JSON string: ", a), b(null, c); - }} - } - function Q(a) { - if (a.substring(0, Ha) !== Ga) return JSON.parse(a); - var b, c = a.substring(Ta), d = a.substring(Ha, Ta); - if (d === Ja && Fa.test(c)) { - var e = c.match(Fa); - b = e[1], c = c.substring(e[0].length); - } - var f = N(c); - switch (d) { - case Ia: - return f; - case Ja: - return g([f], { type: b }); - case Ka: - return new Int8Array(f); - case La: - return new Uint8Array(f); - case Ma: - return new Uint8ClampedArray(f); - case Na: - return new Int16Array(f); - case Pa: - return new Uint16Array(f); - case Oa: - return new Int32Array(f); - case Qa: - return new Uint32Array(f); - case Ra: - return new Float32Array(f); - case Sa: - return new Float64Array(f); - default: - throw new Error("Unkown type: " + d); - } - } - function R(a, b, c, d) { - a.executeSql( - "CREATE TABLE IF NOT EXISTS " + b.storeName + " (id INTEGER PRIMARY KEY, key unique, value)", - [], - c, - d, - ); - } - function S(a) { - var b = this, c = { db: null }; - if (a) { for (var d in a) c[d] = "string" != typeof a[d] ? a[d].toString() : a[d]; } - var e = new va(function (a, d) { - try { - c.db = openDatabase(c.name, String(c.version), c.description, c.size); - } catch (a) { - return d(a); - } - c.db.transaction(function (e) { - R(e, c, function () { - b._dbInfo = c, a(); - }, function (a, b) { - d(b); - }); - }, d); - }); - return c.serializer = Va, e; - } - function T(a, b, c, d, e, f) { - a.executeSql(c, d, e, function (a, g) { - g.code === g.SYNTAX_ERR - ? a.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?", [ - b.storeName, - ], function (a, h) { - h.rows.length ? f(a, g) : R(a, b, function () { - a.executeSql(c, d, e, f); - }, f); - }, f) - : f(a, g); - }, f); - } - function U(a, b) { - var c = this; - a = j(a); - var d = new va(function (b, d) { - c.ready().then(function () { - var e = c._dbInfo; - e.db.transaction(function (c) { - T( - c, - e, - "SELECT * FROM " + e.storeName + " WHERE key = ? LIMIT 1", - [a], - function (a, c) { - var d = c.rows.length ? c.rows.item(0).value : null; - d && (d = e.serializer.deserialize(d)), b(d); - }, - function (a, b) { - d(b); - }, - ); - }); - }).catch(d); - }); - return h(d, b), d; - } - function V(a, b) { - var c = this, - d = new va(function (b, d) { - c.ready().then(function () { - var e = c._dbInfo; - e.db.transaction(function (c) { - T(c, e, "SELECT * FROM " + e.storeName, [], function (c, d) { - for (var f = d.rows, g = f.length, h = 0; h < g; h++) { - var i = f.item(h), j = i.value; - if ( - j && (j = e.serializer.deserialize(j)), - void 0 !== (j = a(j, i.key, h + 1)) - ) return void b(j); - } - b(); - }, function (a, b) { - d(b); - }); - }); - }).catch(d); - }); - return h(d, b), d; - } - function W(a, b, c, d) { - var e = this; - a = j(a); - var f = new va(function (f, g) { - e.ready().then(function () { - void 0 === b && (b = null); - var h = b, i = e._dbInfo; - i.serializer.serialize(b, function (b, j) { - j ? g(j) : i.db.transaction(function (c) { - T(c, i, "INSERT OR REPLACE INTO " + i.storeName + " (key, value) VALUES (?, ?)", [ - a, - b, - ], function () { - f(h); - }, function (a, b) { - g(b); - }); - }, function (b) { - if (b.code === b.QUOTA_ERR) { - if (d > 0) return void f(W.apply(e, [a, h, c, d - 1])); - g(b); - } - }); - }); - }).catch(g); - }); - return h(f, c), f; - } - function X(a, b, c) { - return W.apply(this, [a, b, c, 1]); - } - function Y(a, b) { - var c = this; - a = j(a); - var d = new va(function (b, d) { - c.ready().then(function () { - var e = c._dbInfo; - e.db.transaction(function (c) { - T(c, e, "DELETE FROM " + e.storeName + " WHERE key = ?", [a], function () { - b(); - }, function (a, b) { - d(b); - }); - }); - }).catch(d); - }); - return h(d, b), d; - } - function Z(a) { - var b = this, - c = new va(function (a, c) { - b.ready().then(function () { - var d = b._dbInfo; - d.db.transaction(function (b) { - T(b, d, "DELETE FROM " + d.storeName, [], function () { - a(); - }, function (a, b) { - c(b); - }); - }); - }).catch(c); - }); - return h(c, a), c; - } - function $(a) { - var b = this, - c = new va(function (a, c) { - b.ready().then(function () { - var d = b._dbInfo; - d.db.transaction(function (b) { - T(b, d, "SELECT COUNT(key) as c FROM " + d.storeName, [], function (b, c) { - var d = c.rows.item(0).c; - a(d); - }, function (a, b) { - c(b); - }); - }); - }).catch(c); - }); - return h(c, a), c; - } - function _(a, b) { - var c = this, - d = new va(function (b, d) { - c.ready().then(function () { - var e = c._dbInfo; - e.db.transaction(function (c) { - T( - c, - e, - "SELECT key FROM " + e.storeName + " WHERE id = ? LIMIT 1", - [a + 1], - function (a, c) { - var d = c.rows.length ? c.rows.item(0).key : null; - b(d); - }, - function (a, b) { - d(b); - }, - ); - }); - }).catch(d); - }); - return h(d, b), d; - } - function aa(a) { - var b = this, - c = new va(function (a, c) { - b.ready().then(function () { - var d = b._dbInfo; - d.db.transaction(function (b) { - T(b, d, "SELECT key FROM " + d.storeName, [], function (b, c) { - for (var d = [], e = 0; e < c.rows.length; e++) d.push(c.rows.item(e).key); - a(d); - }, function (a, b) { - c(b); - }); - }); - }).catch(c); - }); - return h(c, a), c; - } - function ba(a) { - return new va(function (b, c) { - a.transaction(function (d) { - d.executeSql( - "SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'", - [], - function (c, d) { - for (var e = [], f = 0; f < d.rows.length; f++) e.push(d.rows.item(f).name); - b({ db: a, storeNames: e }); - }, - function (a, b) { - c(b); - }, - ); - }, function (a) { - c(a); - }); - }); - } - function ca(a, b) { - b = k.apply(this, arguments); - var c = this.config(); - a = "function" != typeof a && a || {}, - a.name || (a.name = a.name || c.name, a.storeName = a.storeName || c.storeName); - var d, e = this; - return d = a.name - ? new va(function (b) { - var d; - d = a.name === c.name ? e._dbInfo.db : openDatabase(a.name, "", "", 0), - b(a.storeName ? { db: d, storeNames: [a.storeName] } : ba(d)); - }).then(function (a) { - return new va(function (b, c) { - a.db.transaction(function (d) { - function e(a) { - return new va(function (b, c) { - d.executeSql("DROP TABLE IF EXISTS " + a, [], function () { - b(); - }, function (a, b) { - c(b); - }); - }); - } - for (var f = [], g = 0, h = a.storeNames.length; g < h; g++) { - f.push(e(a.storeNames[g])); - } - va.all(f).then(function () { - b(); - }).catch(function (a) { - c(a); - }); - }, function (a) { - c(a); - }); - }); - }) - : va.reject("Invalid arguments"), - h(d, b), - d; - } - function da() { - try { - return "undefined" != typeof localStorage && "setItem" in localStorage && - !!localStorage.setItem; - } catch (a) { - return !1; - } - } - function ea(a, b) { - var c = a.name + "/"; - return a.storeName !== b.storeName && (c += a.storeName + "/"), c; - } - function fa() { - var a = "_localforage_support_test"; - try { - return localStorage.setItem(a, !0), localStorage.removeItem(a), !1; - } catch (a) { - return !0; - } - } - function ga() { - return !fa() || localStorage.length > 0; - } - function ha(a) { - var b = this, c = {}; - if (a) { for (var d in a) c[d] = a[d]; } - return c.keyPrefix = ea(a, b._defaultConfig), - ga() ? (b._dbInfo = c, c.serializer = Va, va.resolve()) : va.reject(); - } - function ia(a) { - var b = this, - c = b.ready().then(function () { - for (var a = b._dbInfo.keyPrefix, c = localStorage.length - 1; c >= 0; c--) { - var d = localStorage.key(c); - 0 === d.indexOf(a) && localStorage.removeItem(d); - } - }); - return h(c, a), c; - } - function ja(a, b) { - var c = this; - a = j(a); - var d = c.ready().then(function () { - var b = c._dbInfo, d = localStorage.getItem(b.keyPrefix + a); - return d && (d = b.serializer.deserialize(d)), d; - }); - return h(d, b), d; - } - function ka(a, b) { - var c = this, - d = c.ready().then(function () { - for ( - var b = c._dbInfo, d = b.keyPrefix, e = d.length, f = localStorage.length, g = 1, h = 0; - h < f; - h++ - ) { - var i = localStorage.key(h); - if (0 === i.indexOf(d)) { - var j = localStorage.getItem(i); - if ( - j && (j = b.serializer.deserialize(j)), - void 0 !== (j = a(j, i.substring(e), g++)) - ) return j; - } - } - }); - return h(d, b), d; - } - function la(a, b) { - var c = this, - d = c.ready().then(function () { - var b, d = c._dbInfo; - try { - b = localStorage.key(a); - } catch (a) { - b = null; - } - return b && (b = b.substring(d.keyPrefix.length)), b; - }); - return h(d, b), d; - } - function ma(a) { - var b = this, - c = b.ready().then(function () { - for (var a = b._dbInfo, c = localStorage.length, d = [], e = 0; e < c; e++) { - var f = localStorage.key(e); - 0 === f.indexOf(a.keyPrefix) && d.push(f.substring(a.keyPrefix.length)); - } - return d; - }); - return h(c, a), c; - } - function na(a) { - var b = this, - c = b.keys().then(function (a) { - return a.length; - }); - return h(c, a), c; - } - function oa(a, b) { - var c = this; - a = j(a); - var d = c.ready().then(function () { - var b = c._dbInfo; - localStorage.removeItem(b.keyPrefix + a); - }); - return h(d, b), d; - } - function pa(a, b, c) { - var d = this; - a = j(a); - var e = d.ready().then(function () { - void 0 === b && (b = null); - var c = b; - return new va(function (e, f) { - var g = d._dbInfo; - g.serializer.serialize(b, function (b, d) { - if (d) f(d); - else {try { - localStorage.setItem(g.keyPrefix + a, b), e(c); - } catch (a) { - "QuotaExceededError" !== a.name && "NS_ERROR_DOM_QUOTA_REACHED" !== a.name || - f(a), f(a); - }} - }); - }); - }); - return h(e, c), e; - } - function qa(a, b) { - if (b = k.apply(this, arguments), a = "function" != typeof a && a || {}, !a.name) { - var c = this.config(); - a.name = a.name || c.name, a.storeName = a.storeName || c.storeName; - } - var d, e = this; - return d = a.name - ? new va(function (b) { - b(a.storeName ? ea(a, e._defaultConfig) : a.name + "/"); - }).then(function (a) { - for (var b = localStorage.length - 1; b >= 0; b--) { - var c = localStorage.key(b); - 0 === c.indexOf(a) && localStorage.removeItem(c); - } - }) - : va.reject("Invalid arguments"), - h(d, b), - d; - } - function ra(a, b) { - a[b] = function () { - var c = arguments; - return a.ready().then(function () { - return a[b].apply(a, c); - }); - }; - } - function sa() { - for (var a = 1; a < arguments.length; a++) { - var b = arguments[a]; - if (b) { - for (var c in b) { - b.hasOwnProperty(c) && - ($a(b[c]) ? arguments[0][c] = b[c].slice() : arguments[0][c] = b[c]); - } - } - } - return arguments[0]; - } - var ta = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator - ? function (a) { - return typeof a; - } - : function (a) { - return a && "function" == typeof Symbol && a.constructor === Symbol && - a !== Symbol.prototype - ? "symbol" - : typeof a; - }, - ua = e(); - "undefined" == typeof Promise && a(3); - var va = Promise, - wa = "local-forage-detect-blob-support", - xa = void 0, - ya = {}, - za = Object.prototype.toString, - Aa = "readonly", - Ba = "readwrite", - Ca = { - _driver: "asyncStorage", - _initStorage: C, - _support: f(), - iterate: E, - getItem: D, - setItem: F, - removeItem: G, - clear: H, - length: I, - key: J, - keys: K, - dropInstance: L, - }, - Da = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", - Ea = "~~local_forage_type~", - Fa = /^~~local_forage_type~([^~]+)~/, - Ga = "__lfsc__:", - Ha = Ga.length, - Ia = "arbf", - Ja = "blob", - Ka = "si08", - La = "ui08", - Ma = "uic8", - Na = "si16", - Oa = "si32", - Pa = "ur16", - Qa = "ui32", - Ra = "fl32", - Sa = "fl64", - Ta = Ha + Ia.length, - Ua = Object.prototype.toString, - Va = { serialize: P, deserialize: Q, stringToBuffer: N, bufferToString: O }, - Wa = { - _driver: "webSQLStorage", - _initStorage: S, - _support: M(), - iterate: V, - getItem: U, - setItem: X, - removeItem: Y, - clear: Z, - length: $, - key: _, - keys: aa, - dropInstance: ca, - }, - Xa = { - _driver: "localStorageWrapper", - _initStorage: ha, - _support: da(), - iterate: ka, - getItem: ja, - setItem: pa, - removeItem: oa, - clear: ia, - length: na, - key: la, - keys: ma, - dropInstance: qa, - }, - Ya = function (a, b) { - return a === b || "number" == typeof a && "number" == typeof b && isNaN(a) && isNaN(b); - }, - Za = function (a, b) { - for (var c = a.length, d = 0; d < c;) { - if (Ya(a[d], b)) return !0; - d++; - } - return !1; - }, - $a = Array.isArray || function (a) { - return "[object Array]" === Object.prototype.toString.call(a); - }, - _a = {}, - ab = {}, - bb = { INDEXEDDB: Ca, WEBSQL: Wa, LOCALSTORAGE: Xa }, - cb = [bb.INDEXEDDB._driver, bb.WEBSQL._driver, bb.LOCALSTORAGE._driver], - db = ["dropInstance"], - eb = ["clear", "getItem", "iterate", "key", "keys", "length", "removeItem", "setItem"].concat(db), - fb = { - description: "", - driver: cb.slice(), - name: "localforage", - size: 4980736, - storeName: "keyvaluepairs", - version: 1, - }, - gb = function () { - function a(b) { - d(this, a); - for (var c in bb) { - if (bb.hasOwnProperty(c)) { - var e = bb[c], f = e._driver; - this[c] = f, _a[f] || this.defineDriver(e); - } - } - this._defaultConfig = sa({}, fb), - this._config = sa({}, this._defaultConfig, b), - this._driverSet = null, - this._initDriver = null, - this._ready = !1, - this._dbInfo = null, - this._wrapLibraryMethodsWithReady(), - this.setDriver(this._config.driver).catch(function () {}); - } - return a.prototype.config = function (a) { - if ("object" === (void 0 === a ? "undefined" : ta(a))) { - if (this._ready) { - return new Error( - "Can't call config() after localforage has been used.", - ); - } - for (var b in a) { - if ( - "storeName" === b && (a[b] = a[b].replace(/\W/g, "_")), - "version" === b && "number" != typeof a[b] - ) return new Error("Database version must be a number."); - this._config[b] = a[b]; - } - return !("driver" in a && a.driver) || this.setDriver(this._config.driver); - } - return "string" == typeof a ? this._config[a] : this._config; - }, - a.prototype.defineDriver = function (a, b, c) { - var d = new va(function (b, c) { - try { - var d = a._driver, - e = new Error( - "Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver", - ); - if (!a._driver) return void c(e); - for (var f = eb.concat("_initStorage"), g = 0, i = f.length; g < i; g++) { - var j = f[g]; - if ((!Za(db, j) || a[j]) && "function" != typeof a[j]) return void c(e); - } - (function () { - for ( - var b = function (a) { - return function () { - var b = new Error( - "Method " + a + - " is not implemented by the current driver", - ), - c = va.reject(b); - return h(c, arguments[arguments.length - 1]), c; - }; - }, - c = 0, - d = db.length; - c < d; - c++ - ) { - var e = db[c]; - a[e] || (a[e] = b(e)); - } - })(); - var k = function (c) { - _a[d] && console.info("Redefining LocalForage driver: " + d), - _a[d] = a, - ab[d] = c, - b(); - }; - "_support" in a - ? a._support && "function" == typeof a._support - ? a._support().then(k, c) - : k(!!a._support) - : k(!0); - } catch (a) { - c(a); - } - }); - return i(d, b, c), d; - }, - a.prototype.driver = function () { - return this._driver || null; - }, - a.prototype.getDriver = function (a, b, c) { - var d = _a[a] ? va.resolve(_a[a]) : va.reject(new Error("Driver not found.")); - return i(d, b, c), d; - }, - a.prototype.getSerializer = function (a) { - var b = va.resolve(Va); - return i(b, a), b; - }, - a.prototype.ready = function (a) { - var b = this, - c = b._driverSet.then(function () { - return null === b._ready && (b._ready = b._initDriver()), b._ready; - }); - return i(c, a, a), c; - }, - a.prototype.setDriver = function (a, b, c) { - function d() { - g._config.driver = g.driver(); - } - function e(a) { - return g._extend(a), d(), g._ready = g._initStorage(g._config), g._ready; - } - function f(a) { - return function () { - function b() { - for (; c < a.length;) { - var f = a[c]; - return c++, - g._dbInfo = null, - g._ready = null, - g.getDriver(f).then(e).catch(b); - } - d(); - var h = new Error("No available storage method found."); - return g._driverSet = va.reject(h), g._driverSet; - } - var c = 0; - return b(); - }; - } - var g = this; - $a(a) || (a = [a]); - var h = this._getSupportedDrivers(a), - j = null !== this._driverSet - ? this._driverSet.catch(function () { - return va.resolve(); - }) - : va.resolve(); - return this._driverSet = j.then(function () { - var a = h[0]; - return g._dbInfo = null, - g._ready = null, - g.getDriver(a).then(function (a) { - g._driver = a._driver, - d(), - g._wrapLibraryMethodsWithReady(), - g._initDriver = f(h); - }); - }).catch(function () { - d(); - var a = new Error("No available storage method found."); - return g._driverSet = va.reject(a), g._driverSet; - }), - i(this._driverSet, b, c), - this._driverSet; - }, - a.prototype.supports = function (a) { - return !!ab[a]; - }, - a.prototype._extend = function (a) { - sa(this, a); - }, - a.prototype._getSupportedDrivers = function (a) { - for (var b = [], c = 0, d = a.length; c < d; c++) { - var e = a[c]; - this.supports(e) && b.push(e); - } - return b; - }, - a.prototype._wrapLibraryMethodsWithReady = function () { - for (var a = 0, b = eb.length; a < b; a++) ra(this, eb[a]); - }, - a.prototype.createInstance = function (b) { - return new a(b); - }, - a; - }(), - hb = new gb(); - b.exports = hb; - }, { 3: 3 }], - }, - {}, - [4], - )(4); -}); diff --git a/site/tmp/newMsgUl.js b/site/tmp/newMsgUl.js deleted file mode 100644 index 67a0d19..0000000 --- a/site/tmp/newMsgUl.js +++ /dev/null @@ -1,28 +0,0 @@ -div( - { - "class": "newMessage-module__new_message__7AimN ", - }, - button( - { - "type": "button", - "class": "newMessage-module__button_new_message__4lxeN", - }, - strong( - { - "class": "newMessage-module__name__i7cy-", - }, - pre( - {}, - "user", - ), - ), - p( - { - "class": "newMessage-module__description__Bp-zX", - }, - span( - {}, - ), - ), - ), -); diff --git a/site/tmp/overUI.js b/site/tmp/overUI.js deleted file mode 100644 index ea40bfe..0000000 --- a/site/tmp/overUI.js +++ /dev/null @@ -1,434 +0,0 @@ -// #modal-root > div -//profile -div( - { - "class": "profileModal-module__modal__QRrnT ", - "role": "dialog", - "aria-labelledby": "profile modal", - "style": "position: absolute; z-index: 28; left: 40%; top: 40%; height: fit-content; background-color: #fff;", - }, - div( - { - "class": "profileModal-module__content__qKTEy", - }, - div( - { - "class": "profileModal-module__info_area__VRAIt", - }, - div( - { - "class": "profileImage-module__thumbnail_wrap__0bK7m ", - "data-mid": "UWFbyqkZaWy8RbxqKUd2J_jPG-YLeoKRlwwlqlGZqnGA", - "data-profile-image": "true", - "style": "border-radius: 50%;cursor: default;margin: 30% 0 0 0;", - }, - div( - { - "class": "profileImage-module__thumbnail_area__nqIpB", - }, - span( - { - "class": "profileImage-module__thumbnail__Q6OsR", - }, - img( - { - "src": "", - "class": "", - "loading": "lazy", - "alt": "", - "draggable": "false", - }, - ), - ), - ), - ), - div( - { - "class": "profileModal-module__name_box__vJfbr", - }, - button( - { - "class": "editButton-module__button_edit__GA02s ", - "type": "button", - "aria-pressed": "false", - "data-ellipsis": "1", - }, - span( - { - "class": "editButton-module__name__uQ-y5", - }, - pre( - {}, - span( - {}, - "大島 聡太郎", - ), - ), - ), - i( - { - "class": "icon editButton-module__icon__rQo8u", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "5.0", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "M20.0996 19.2397v1.3H3.9176v-1.3h16.182ZM14.9654 3.4603l3.133 3.134-11.063 11.065h-3.135v-3.133l11.065-11.066Z", - }, - ), - ), - ), - ), - ), - form( - { - "class": "editInput-module__edit_box__ygtSs", - }, - label( - { - "class": "editInput-module__label_text__5j1Nn", - }, - input( - { - "type": "text", - "class": "editInput-module__input_text__X58rV ", - "placeholder": "大島 聡太郎", - "maxlength": "20", - "value": "大島 聡太郎", - }, - ), - span( - { - "class": "editInput-module__count__GpSgr", - }, - "(6/20)", - ), - ), - button( - { - "type": "submit", - "class": "editInput-module__button_confirm__r46cQ", - "aria-label": "confirm button", - }, - i( - { - "class": "icon editInput-module__icon__UT9Fu", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "5.0", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "m10 18.561-7.707-7.707L3.707 9.44 10 15.732 20.293 5.439l1.414 1.415z", - }, - ), - ), - ), - ), - ), - button( - { - "type": "button", - "class": "editInput-module__button_cancel__A7CNA", - "aria-label": "cancel button", - }, - i( - { - "class": "icon editInput-module__icon__UT9Fu", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "5.0", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "m19.008 6.406-1.414-1.414L12 10.586 6.405 4.992 4.991 6.406 10.586 12l-5.595 5.594 1.414 1.415L12 13.414l5.594 5.595 1.414-1.415L13.414 12z", - }, - ), - ), - ), - ), - ), - ), - ), - div( - { - "class": "profileModal-module__description_box__Jb6O2", - }, - p( - { - "class": "profileModal-module__description__hSNDU", - "data-tooltip": "87f15f9f-0c36-4796-bf4e-f74d9f10fef5", - }, - ), - ), - ), - div( - { - "class": "profileModal-module__action_area__gN4d-", - }, - button( - { - "type": "button", - "class": "profileModal-module__button_action__SmB4T", - "aria-label": "chat", - "data-tooltip": "トーク", - }, - i( - { - "class": "icon profileModal-module__icon__ryFCf", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "5.0", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "M11.9997 3.257c5.156 0 9.35 3.685 9.35 8.215 0 4.53-4.194 8.216-9.35 8.216-1.289 0-2.543-.232-3.732-.69l-2.846 1.657a.6473.6473 0 0 1-.327.088.649.649 0 0 1-.64-.765l.552-3.061c-1.523-1.506-2.357-3.426-2.357-5.445 0-4.53 4.195-8.215 9.35-8.215Zm3.783 7.227c-.546 0-.989.442-.989.988s.443.989.989.989.988-.443.988-.989-.442-.988-.988-.988Zm-3.783 0c-.546 0-.988.442-.988.988s.442.989.988.989.989-.443.989-.989-.443-.988-.989-.988Zm-3.782 0c-.546 0-.989.442-.989.988s.443.989.989.989c.545 0 .988-.443.988-.989s-.443-.988-.988-.988Z", - }, - ), - ), - ), - ), - ), - button( - { - "type": "button", - "class": "profileModal-module__button_action__SmB4T", - "aria-label": "home", - "data-tooltip": "ホーム", - }, - i( - { - "class": "icon profileModal-module__icon__ryFCf", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "5.0", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "m12.3875 3.927-.001-.001-.386-.297-.387.297c0 .001 0 .001-.001.001L2 11.3194l.775 1.0084 2.4839-1.9103v8.8298c0 .6195.5033 1.1237 1.1228 1.1237h5.1302V16.437h.9772v3.9341h5.1292c.6195 0 1.1228-.5042 1.1228-1.1237v-8.8298l2.484 1.9103L22 11.3194 12.3875 3.927Z", - }, - ), - ), - ), - ), - ), - ), - ), -); -//msgUI -div( - { - "style": "position: absolute; z-index: 28; left: 575px; top: 335px;", - }, - div( - { - "class": "actionPopoverLayout-module__popover_wrap__Eob7j ", - "style": "left: auto; opacity: 1; right: 0px;", - }, - ul( - { - "class": "actionPopoverList-module__action_list__tJDFe", - }, - li( - { - "class": "actionPopoverListItem-module__action_item__sCl2u", - }, - button( - { - "type": "button", - "class": "actionPopoverListItem-module__button_action__mHl56", - "aria-haspopup": "false", - "aria-expanded": "true", - }, - "リプライ", - ), - ), - li( - { - "class": "actionPopoverListItem-module__action_item__sCl2u", - }, - button( - { - "type": "button", - "class": "actionPopoverListItem-module__button_action__mHl56", - "aria-haspopup": "false", - "aria-expanded": "true", - }, - "コピー", - ), - ), - li( - { - "class": "actionPopoverListItem-module__action_item__sCl2u", - }, - button( - { - "type": "button", - "class": "actionPopoverListItem-module__button_action__mHl56", - "aria-haspopup": "false", - "aria-expanded": "true", - }, - "転送", - ), - ), - ), - ul( - { - "class": "actionPopoverList-module__action_list__tJDFe", - }, - li( - { - "class": "actionPopoverListItem-module__action_item__sCl2u", - }, - button( - { - "type": "button", - "class": "actionPopoverListItem-module__button_action__mHl56", - "aria-haspopup": "false", - "aria-expanded": "true", - }, - "通報", - ), - ), - ), - ), -); - -// group :UI -div( - { - "style": "position: absolute; z-index: 28; left: 766px; top: 69.4167px;", - }, - div( - { - "class": "actionPopoverLayout-module__popover_wrap__Eob7j ", - "style": "left: auto; opacity: 1; right: 27px;", - }, - ul( - { - "class": "actionPopoverList-module__action_list__tJDFe", - }, - li( - { - "class": "actionPopoverListItem-module__action_item__sCl2u", - }, - button( - { - "type": "button", - "class": "actionPopoverListItem-module__button_action__mHl56", - "aria-haspopup": "false", - "aria-expanded": "true", - }, - "通知オフ", - ), - ), - li( - { - "class": "actionPopoverListItem-module__action_item__sCl2u", - }, - button( - { - "type": "button", - "class": "actionPopoverListItem-module__button_action__mHl56", - "aria-haspopup": "false", - "aria-expanded": "true", - }, - "招待", - ), - ), - ), - ul( - { - "class": "actionPopoverList-module__action_list__tJDFe", - }, - li( - { - "class": "actionPopoverListItem-module__action_item__sCl2u", - }, - button( - { - "type": "button", - "class": "actionPopoverListItem-module__button_action__mHl56", - "aria-haspopup": "false", - "aria-expanded": "true", - }, - "グループを編集", - ), - ), - li( - { - "class": "actionPopoverListItem-module__action_item__sCl2u", - }, - button( - { - "type": "button", - "class": "actionPopoverListItem-module__button_action__mHl56", - "aria-haspopup": "false", - "aria-expanded": "true", - }, - "通報", - ), - ), - li( - { - "class": "actionPopoverListItem-module__action_item__sCl2u", - }, - button( - { - "type": "button", - "class": "actionPopoverListItem-module__button_action__mHl56", - "aria-haspopup": "false", - "aria-expanded": "true", - }, - "グループ退会", - ), - ), - ), - ), -); diff --git a/site/tmp/reportUI.js b/site/tmp/reportUI.js deleted file mode 100644 index 2cd31b2..0000000 --- a/site/tmp/reportUI.js +++ /dev/null @@ -1,219 +0,0 @@ -div( - { - "id": "root", - "style": "min-width: 264px; min-height: 442px;", - }, - div( - { - "class": "reportPopup-module__popup__gOoi- ", - }, - div( - { - "class": "reportPopup-module__header__tvDLL", - }, - strong( - { - "class": "reportPopup-module__title__aWBrs", - }, - "通報", - ), - ), - div( - { - "class": "reportPopup-module__contents__ym78g", - }, - div( - { - "class": "reportPopup-module__select_box__330HE", - }, - p( - { - "class": "reportPopup-module__description__SZQas", - }, - "通報する理由を選択してください", - ), - ul( - {}, - li( - {}, - div( - { - "class": "radio-module__radio_wrap__AaS4a", - }, - label( - { - "class": "radio-module__radio_label__sDfDn", - }, - input( - { - "type": "radio", - "class": "blind radio-module__radio_input__xqGP8 ", - "name": "report_reason", - "value": "スパム / 宣伝目的", - "checked": "", - }, - ), - i( - { - "class": "radio-module__icon__17T16", - }, - ), - span( - { - "class": "radio-module__text__CEMXA", - }, - "スパム / 宣伝目的", - ), - ), - ), - ), - li( - {}, - div( - { - "class": "radio-module__radio_wrap__AaS4a", - }, - label( - { - "class": "radio-module__radio_label__sDfDn", - }, - input( - { - "type": "radio", - "class": "blind radio-module__radio_input__xqGP8 ", - "name": "report_reason", - "value": "性的いやがらせ / 出会い目的", - }, - ), - i( - { - "class": "radio-module__icon__17T16", - }, - ), - span( - { - "class": "radio-module__text__CEMXA", - }, - "性的いやがらせ / 出会い目的", - ), - ), - ), - ), - li( - {}, - div( - { - "class": "radio-module__radio_wrap__AaS4a", - }, - label( - { - "class": "radio-module__radio_label__sDfDn", - }, - input( - { - "type": "radio", - "class": "blind radio-module__radio_input__xqGP8 ", - "name": "report_reason", - "value": "迷惑行為", - }, - ), - i( - { - "class": "radio-module__icon__17T16", - }, - ), - span( - { - "class": "radio-module__text__CEMXA", - }, - "迷惑行為", - ), - ), - ), - ), - li( - {}, - div( - { - "class": "radio-module__radio_wrap__AaS4a", - }, - label( - { - "class": "radio-module__radio_label__sDfDn", - }, - input( - { - "type": "radio", - "class": "blind radio-module__radio_input__xqGP8 ", - "name": "report_reason", - "value": "その他", - }, - ), - i( - { - "class": "radio-module__icon__17T16", - }, - ), - span( - { - "class": "radio-module__text__CEMXA", - }, - "その他", - ), - ), - ), - ), - ), - ), - pre( - { - "class": "reportPopup-module__description__SZQas", - }, - "通報するとLINEに以下の情報が送信され、通報内容の確認・対応や不正利用防止ツールの開発を含む不正利用防止のために利用されます。\nまた、上記目的の達成に必要な範囲で以下の情報を業務委託先に共有することがあります。\n\n■送信される情報:\n最近送受信した10件のトークメッセージ、グループの情報(表示名/グループの画像/あなたをグループに招待したユーザーの情報等)、通報者の情報(表示名/プロフィール画像等)", - ), - ), - div( - { - "class": "reportPopup-module__footer__8dbYz", - }, - div( - { - "class": "reportPopup-module__button_group__Aw3yL", - }, - button( - { - "class": "reportPopup-module__button_cancel__-9EqR button-module__button__NBD6v ", - "type": "button", - "data-shape": "contained", - }, - span( - { - "class": "button-module__text__sF0fb", - }, - "キャンセル", - ), - ), - button( - { - "class": "reportPopup-module__button_confirm__epFlj button-module__button__NBD6v ", - "type": "button", - "data-shape": "contained", - "data-color": "primary", - }, - span( - { - "class": "button-module__text__sF0fb", - }, - "同意して送信", - ), - ), - ), - ), - ), - ul( - { - "class": "ToastContainer-module__toast-list__QAniw", - "style": "z-index: 100;", - }, - ), -); diff --git a/site/tmp/script.js b/site/tmp/script.js deleted file mode 100644 index 6a7074b..0000000 --- a/site/tmp/script.js +++ /dev/null @@ -1,363 +0,0 @@ -class LineTCompactSocket { - constructor(gwPath, authToken, device, resolve, extraH) { - this.socket = {}; - this.socketInfo = {}; - let appVer, sysName, sysVer, UA, appName; - sysVer = "12.1.4"; - switch (device) { - case "DESKTOPWIN": - appVer = "7.16.1.3000"; - sysName = "WINDOWS"; - sysVer = "10.0.0-NT-x64"; - break; - case "DESKTOPMAC": - appVer = "7.16.1.3000"; - sysName = "MAC"; - break; - case "CHROMEOS": - appVer = "3.0.3"; - sysName = "Chrome_OS"; - sysVer = "1"; - break; - case "ANDROID": - appVer = "13.4.1"; - sysName = "Android OS"; - break; - case "IOS": - appVer = "13.3.0"; - sysName = "iOS"; - break; - case "IOSIPAD": - appVer = "13.3.0"; - sysName = "iOS"; - break; - case "WATCHOS": - appVer = "13.3.0"; - sysName = "Watch OS"; - break; - case "WEAROS": - appVer = "13.4.1"; - sysName = "Wear OS"; - break; - default: - throw new Error("deviceName is wrong"); - break; - } - appName = device + "\t" + appVer + "\t" + sysName + "\t" + sysVer; - UA = "Line/" + appVer; - this.config = { - ua: UA, - appName: appName, - }; - let account = { path: gwPath, auth: authToken, ua: UA, type: appName }; - if (extraH) { - account["ex"] = JSON.stringify(extraH); - } - this.wsURL = "ws" + location.protocol.replace(":", "").replace("http", "") + "://" + location.host + "/post?" + - new URLSearchParams(account).toString(); - this.socket.post = new WebSocket(this.wsURL); - this.socket.post.onopen = (e) => { - try { - resolve(this); - } catch (e) { - } - this.socketInfo.post = { status: "open", waitFunc: {} }; - }; - this.socket.post.onclose = (e) => { - this.socketInfo.post.status = false; - }; - this.socket.post.onmessage = null; - this.socket.post.onclose = (e) => { - this.socketInfo.post = { status: false }; - }; - } - closeSocket() { - try { - this.socket.post.close(); - } catch (e) { - } - } - reOpenSocket(resolve) { - this.closeSocket(); - this.socket.post = new WebSocket(this.wsURL); - this.socket.post.onopen = (e) => { - try { - resolve(this); - } catch (e) { - } - this.socketInfo.post = { status: "open", waitFunc: {} }; - }; - this.socket.post.onclose = (e) => { - this.socketInfo.post.status = false; - }; - this.socket.post.onmessage = null; - this.socket.post.onclose = (e) => { - this.socketInfo.post = { status: false }; - }; - } - post(data) { - return new Promise((resolve, reject) => { - data.id = Date.now(); - this.send(this.socket.post, this.socketInfo.post.waitFunc, data, resolve); - }); - } - postr(data) { - return new Promise((resolve, reject) => { - data.id = Date.now(); - this.sendr(this.socket.post, this.socketInfo.post.waitFunc, data, resolve); - }); - } - postAndCheckResponse(data) { - return new Promise((resolve, reject) => { - this.post(data).then((r) => { - if (r.err) { - throw new Error(r.err); - } else { - resolve(r); - } - }); - }); - } - - async postParseThrift(data) { - let reqJson, resJson; - reqJson = data; - resJson = JSON.parse(await this.postAndCheckResponse(reqJson)); - if (reqJson.err) { - throw new Error("Server Error : " + reqJson.err); - } - return resJson; - } - async postCHRRequestAndGetResponse(data, methodName) { - let request = { value: data, name: methodName, type: 3 }; - let response = await this.postParseThrift(request); - return response.value; - } - async postRequestAndGetResponse(data, methodName) { - let request = { value: data, name: methodName, type: 1 }; - let response = await this.postParseThrift(request); - return response.value; - } - async postRequestAndGetContinueResponse(data, methodName) { - let responseList = []; - let addKeys = []; - let noAddKeys = []; - let request = { value: data, name: methodName, type: 1 }; - let response = await this.postParseThrift(request); - responseList.push(response.value); - while (response.value.continuationToken) { - request.value.continuationToken = response.value.continuationToken; - request.value.syncToken = response.value.syncToken; - response = await this.postParseThrift(request); - responseList.push(response.value); - } - Object.keys(responseList[0]).forEach((e) => { - if ((typeof responseList[0][e]) == "object") { - addKeys.push(e); - } else { - noAddKeys.push(e); - } - }); - let returnjson = {}; - responseList.forEach((e) => { - noAddKeys.forEach((f) => { - returnjson[f] = e[f]; - }); - addKeys.forEach((g) => { - if (e[g].forEach) { - if (returnjson[g]) { - returnjson[g] = [...returnjson[g], ...e[g]]; - } else { - returnjson[g] = e[g]; - } - } else { - if (returnjson[g]) { - returnjson[g] = { ...returnjson[g], ...e[g] }; - } else { - returnjson[g] = e[g]; - } - } - }); - }); - return returnjson; - } - send(socket, FuncMap, data, returnFunc) { - if (socket.readyState === socket.OPEN) { - socket.send(JSON.stringify(data)); - FuncMap[data.id] = (e) => { - returnFunc(e.data); - }; - socket.onmessage = (e) => { - try { - let j = JSON.parse(e.data); - FuncMap[j.id](e); - delete FuncMap[j.id]; - } catch (error) { - try { - let j = new Uint8Array(e.data); - let id = 0; - for (let index = 0; index < j[2]; index++) { - const element = j[3 + index]; - id += element * (0xff ** index); - } - FuncMap[id](j.slice(3 + j[2])); - delete FuncMap[id]; - } catch (error) { - } - } - }; - } else throw new Error("socket not open"); - } -} - -class LineSquareClient { - constructor(authToken, device, resolve) { - this.S4 = new LineTCompactSocket("/S4", authToken, device, () => { - setTimeout(async () => { - const res = await this.S4.postCHRRequestAndGetResponse([], "getProfile"); - this.mid = res[1]; - this.name = res[20]; - try { - resolve(); - } catch (error) { - } - }, 200); - }); - this.SQ1 = new LineTCompactSocket("/SQ1", authToken, device); - this.authToken = authToken; - this.deviceName = device; - } - async findSquareByInvitationTicket(ticket) { - let v = { invitationTicket: ticket }; - let n = "findSquareByInvitationTicket"; - return await this.SQ1.postRequestAndGetResponse(v, n); - } - async getJoinedSquares() { - let v = { limit: 100 }; - let n = "getJoinedSquares"; - return await this.SQ1.postRequestAndGetContinueResponse(v, n); - } - async searchSquareMembers(squareMid, searchOption = {}) { - let v = { - squareMid: squareMid, - searchOption: searchOption, - limit: 200, - }; - let n = "searchSquareMembers"; - return await this.SQ1.postRequestAndGetContinueResponse(v, n); - } - async getBannedMembers(squareMid) { - return await this.searchSquareMembers(squareMid, { "membershipState": 6 }); - } - async sendTxtMessage(squareChatMid, text, contentMetadata = {}, reqSeq = 1) { - let v = { - reqSeq: reqSeq, - squareChatMid: squareChatMid, - squareMessage: { - message: { - to: squareChatMid, - contentType: 0, - text: text, - contentMetadata: contentMetadata, - }, - }, - }; - let n = "sendMessage"; - return await this.SQ1.postRequestAndGetResponse(v, n); - } - async fetchMyEvents(syncToken) { - let v = { - syncToken: syncToken, - limit: 200, - }; - if (!v.syncToken) { - delete v.syncToken; - } - let n = "fetchMyEvents"; - return await this.SQ1.postRequestAndGetContinueResponse(v, n); - } - async fetchSquareChatEvents(squareChatMid, syncToken) { - let v = { - squareChatMid: squareChatMid, - limit: 90, - }; - if (syncToken) { - v.syncToken = syncToken; - } - let n = "fetchSquareChatEvents"; - return await this.SQ1.postRequestAndGetResponse(v, n); - } - async getSquareMember(mid) { - return await this.SQ1.postCHRRequestAndGetResponse([12, 1, [11, 2, mid]], "getSquareMember"); - } - async getSquareChatMembers(mid) { - let v = { - squareChatMid: mid, - limit: 200, - }; - let n = "getSquareChatMembers"; - return await this.SQ1.postRequestAndGetContinueResponse(v, n); - } - async getJoinedSquareChats() { - let syncToken = - (Number((await this.SQ1.postRequestAndGetResponse({ limit: 10 }, "fetchMyEvents")).syncToken) - 1000) - .toString(); - let data = await this.SQ1.postRequestAndGetResponse({ limit: 1000, syncToken: syncToken }, "fetchMyEvents"); - let chats = new Set(); - data.events.forEach((e) => { - if (e.type == 29) { - chats.add(e.payload.notificationMessage.squareChatMid); - } - }); - let joinedChats = []; - for (let e of chats) { - let ch = await this.SQ1.postRequestAndGetResponse({ squareChatMid: e }, "getSquareChat"); - if (ch.squareChatMember) { - joinedChats.push(ch); - } - } - joinedChats.sort((a, b) => { - return b.squareChatStatus.lastMessage.message.createdTime - - a.squareChatStatus.lastMessage.message.createdTime; - }); - return joinedChats; - } - async getSquareChat(mid) { - return await this.SQ1.postRequestAndGetResponse({ squareChatMid: mid }, "getSquareChat"); - } - - async proxyFetch(url, headers = {}, method = "GET", body = null) { - let requrl = new URL(url); - let reqhost = btoa(requrl.protocol + requrl.host).replace("=", ""); - let reqpath = requrl.pathname + requrl.search; - return await fetch(location.origin + "/proxy/" + reqhost + "/path" + reqpath, { - headers: headers, - method: method, - body: body, - }); - } - async sleep() { - this.S4.closeSocket(); - this.SQ1.closeSocket(); - } - async wake() { - this.S4.reOpenSocket(); - this.SQ1.reOpenSocket(); - } - timeout(f, t) { - return new Promise((resolve, reject) => { - let time = true; - f().then((res) => { - resolve(res); - time = false; - }); - setTimeout(() => { - reject("Time Out"); - if (time) { - notify("リクエストがタイムアウトしました", "#fff", "red"); - } - }, t); - }); - } -} -//export {LineSquareClient,LineTCompactSocket} diff --git a/site/tmp/tmp.html b/site/tmp/tmp.html deleted file mode 100644 index c6282f2..0000000 --- a/site/tmp/tmp.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - LINE - - - - - - -
          -
          -
          -
          - -
          -
          - - - - - - - - - - - - - \ No newline at end of file diff --git a/site/tmp/tmp.js b/site/tmp/tmp.js deleted file mode 100644 index 81d75f4..0000000 --- a/site/tmp/tmp.js +++ /dev/null @@ -1,252 +0,0 @@ -let eventTemplate = { - undefined: { - "createdTime": 1712477065625, - "payload": { - "receiveMessage": { - "squareChatMid": "m3df38438ef13539f38b951d58ba30929", - "squareMessage": { - "message": { - "_from": "p2a281f8efd6632add0ffa868a36eac35", - "to": "m3df38438ef13539f38b951d58ba30929", - "toType": 4, - "id": "502722166333374818", - "createdTime": 1712477065625, - "deliveredTime": 1712477065625, - "text": "あ", - "contentMetadata": { - "NOTIFICATION_DISABLED": "null", - "app_extension_type": "null", - "PREVIEW_URL_ENABLED": "true", - "app_version_code": "140420286", - }, - }, - "fromType": 5, - "squareMessageRevision": 1, - }, - }, - }, - "syncToken": - "CgABAAAAAAAAACAKAAIAAAAAAAAADAoAAwAAAAAAAAAUCgAEAAAAAAAAAAUKAAUAAAAAAAAAAgoABgAAAAAAAAAACgAHAAABjreV9PcMAAgIAAEAAAAAAAwACQ0AAQsKAAAAAAAKAAoAAAAAAAAAAAA=", - }, - 1: { - "createdTime": 1712476885873, - "type": 1, - "payload": { - "sendMessage": { - "squareChatMid": "m3df38438ef13539f38b951d58ba30929", - "squareMessage": { - "message": { - "_from": "p84edcedb2ef04bb3add55b2c0f0101e5", - "to": "m3df38438ef13539f38b951d58ba30929", - "toType": 4, - "id": "502721864997798226", - "createdTime": 1712476885873, - "deliveredTime": 1712476885873, - "text": "あ", - "contentMetadata": { - "NOTIFICATION_DISABLED": "null", - "app_extension_type": "null", - "PREVIEW_URL_ENABLED": "true", - "app_version_code": "140420286", - }, - }, - "fromType": 5, - "squareMessageRevision": 1, - }, - "reqSeq": -1, - }, - }, - "syncToken": - "CgABAAAAAAAAABwKAAIAAAAAAAAACwoAAwAAAAAAAAAFCgAEAAAAAAAAAAUKAAUAAAAAAAAAAgoABgAAAAAAAAAACgAHAAABjreTboIMAAgIAAEAAAAAAAwACQ0AAQsKAAAAAAAKAAoAAAAAAAAAAAA=", - }, - 2: { - "createdTime": 1700778236872, - "type": 2, - "payload": { - "notifiedJoinSquareChat": { - "squareChatMid": "m3df38438ef13539f38b951d58ba30929", - "joinedMember": { - "squareMemberMid": "p5a5132d6ccf8433e2264f9669a3372d1", - "squareMid": "s38d1f33723b7a7c04b30408bed4a7211", - "displayName": "見物", - "profileImageObsHash": - "0hfp6ASj3sOV8LOCpn1pJGCDRuZHF6XCJaYx1oeCpoY28kCysOZQwhMCs6ZTslC3kMYFZxPiZoZW0gCysJ", - "ableToReceiveMessage": true, - "membershipState": 7, - "role": 2, - "revision": 4, - "preference": { - "favoriteTimestamp": 18446744073709552000, - "notiForNewJoinRequest": true, - }, - }, - }, - }, - "syncToken": - "CgABAAAAAAAAAAEKAAIAAAAAAAAAAAoAAwAAAAAAAAAACgAEAAAAAAAAAAAKAAUAAAAAAAAAAAoABgAAAAAAAAAADAAICAABAAAAAAAMAAkNAAELCgAAAAAACgAKAAAAAAAAAAAA", - }, - 4: { - "createdTime": 1712469113807, - "type": 4, - "payload": { - "notifiedLeaveSquareChat": { - "squareChatMid": "m877c95891929586ad3e90984db54e746", - "squareMemberMid": "p215d008221ac8a21eab6362260949157", - "sayGoodbye": true, - "squareMember": { - "squareMemberMid": "p215d008221ac8a21eab6362260949157", - "squareMid": "sf1630c98f02cd380409ee17582d3d03d", - "displayName": "長野マン", - "ableToReceiveMessage": true, - "membershipState": 4, - "role": 10, - "revision": 2, - "preference": { - "favoriteTimestamp": 18446744073709552000, - "notiForNewJoinRequest": true, - }, - }, - }, - }, - "syncToken": - "CgABAAAAAAABHR0KAAIAAAAAAAAqyAoAAwAAAAAAAAAACgAEAAAAAAAAAAAKAAUAAAAAAAAAAAoABgAAAAAAABGBDAAICAABAAAAAAAMAAkNAAELCgAAAAAACgAKAAAAAAAAAAAA", - }, - 5: { - "createdTime": 0, - "type": 5, - "payload": { - "notifiedDestroyMessage": { - "squareChatMid": "m3df38438ef13539f38b951d58ba30929", - "messageId": "502717230191215097", - }, - }, - "syncToken": - "CgABAAAAAAAAABEKAAIAAAAAAAAAAQoAAwAAAAAAAAAFCgAEAAAAAAAAAAQKAAUAAAAAAAAAAAoABgAAAAAAAAAACgAHAAABjrdyUkUMAAgIAAEAAAAAAAwACQ0AAQsKAAAAAAAKAAoAAAAAAAAAAAA=", - }, - 19: { - "createdTime": 1712477801027, - "type": 19, - "payload": { - "notifiedKickoutFromSquare": { - "squareChatMid": "m3df38438ef13539f38b951d58ba30929", - "kickees": [ - { - "squareMemberMid": "pc26e137584b426f862957ecc28df6eac", - "squareMid": "s38d1f33723b7a7c04b30408bed4a7211", - "displayName": "あ", - "ableToReceiveMessage": true, - "membershipState": 6, - "role": 10, - "revision": 2, - }, - ], - "by": { - "squareMemberMid": "p84edcedb2ef04bb3add55b2c0f0101e5", - "squareMid": "s38d1f33723b7a7c04b30408bed4a7211", - "displayName": "test", - "profileImageObsHash": - "0hkT4bVyeTNHsJGydD1DtLLDZNaVV4fy9-YT5lXCUePh52fyZ-NiksHClIOUl0fiYpMS54Ty1Ma0slKycp", - "ableToReceiveMessage": true, - "membershipState": 2, - "role": 1, - "revision": 3, - }, - }, - }, - "syncToken": - "CgABAAAAAAAAACoKAAIAAAAAAAAADAoAAwAAAAAAAAAfCgAEAAAAAAAAAAcKAAUAAAAAAAAAAgoABgAAAAAAAAAACgAHAAABjrehkwAMAAgIAAEAAAAAAAwACQ0AAQsKAAAAAAAKAAoAAAAAAAAAAAA=", - }, - 30: { - "createdTime": 1712474206555, - "type": 30, - "payload": { - "notifiedUpdateSquareChatProfileName": { - "squareChatMid": "m3df38438ef13539f38b951d58ba30929", - "editor": { - "squareMemberMid": "p84edcedb2ef04bb3add55b2c0f0101e5", - "squareMid": "s38d1f33723b7a7c04b30408bed4a7211", - "displayName": "ででででで", - "profileImageObsHash": - "0hkT4bVyeTNHsJGydD1DtLLDZNaVV4fy9-YT5lXCUePh52fyZ-NiksHClIOUl0fiYpMS54Ty1Ma0slKycp", - "ableToReceiveMessage": true, - "membershipState": 2, - "role": 1, - "revision": 2, - "preference": { - "favoriteTimestamp": 18446744073709552000, - "notiForNewJoinRequest": true, - }, - }, - "updatedChatName": "あい", - }, - }, - "syncToken": - "CgABAAAAAAAAAAsKAAIAAAAAAAAAAAoAAwAAAAAAAAAACgAEAAAAAAAAAAAKAAUAAAAAAAAAAAoABgAAAAAAAAAADAAICAABAAAAAAAMAAkNAAELCgAAAAAACgAKAAAAAAAAAAAA", - }, - 31: { - "createdTime": 1712474465001, - "type": 31, - "payload": { - "notifiedUpdateSquareChatProfileImage": { - "squareChatMid": "m3df38438ef13539f38b951d58ba30929", - "editor": { - "squareMemberMid": "p84edcedb2ef04bb3add55b2c0f0101e5", - "squareMid": "s38d1f33723b7a7c04b30408bed4a7211", - "displayName": "ででででで", - "profileImageObsHash": - "0hkT4bVyeTNHsJGydD1DtLLDZNaVV4fy9-YT5lXCUePh52fyZ-NiksHClIOUl0fiYpMS54Ty1Ma0slKycp", - "ableToReceiveMessage": true, - "membershipState": 2, - "role": 1, - "revision": 2, - "preference": { - "favoriteTimestamp": 18446744073709552000, - "notiForNewJoinRequest": true, - }, - }, - }, - }, - "syncToken": - "CgABAAAAAAAAAAwKAAIAAAAAAAAAAAoAAwAAAAAAAAAFCgAEAAAAAAAAAAQKAAUAAAAAAAAAAAoABgAAAAAAAAAACgAHAAABjrduWW0MAAgIAAEAAAAAAAwACQ0AAQsKAAAAAAAKAAoAAAAAAAAAAAA=", - }, - 41: { //torikeshi - "createdTime": 1712476065446, - "type": 41, - "payload": { - "41": { - "1": "m3df38438ef13539f38b951d58ba30929", - "2": { - "1": { - "1": "p84edcedb2ef04bb3add55b2c0f0101e5", - "2": "m3df38438ef13539f38b951d58ba30929", - "3": 4, - "4": "502720483964223505", - "5": 1712476062685, - "6": 1712476062685, - "18": { - "NOTIFICATION_DISABLED": "null", - "app_extension_type": "null", - "PREVIEW_URL_ENABLED": "true", - "app_version_code": "140420286", - "UNSENT": "true", - }, - }, - }, - "9": [], - }, - }, - }, - 49: { //other - "createdTime": 1712476483151, - "type": 49, - "payload": { - "47": { - "1": "m3df38438ef13539f38b951d58ba30929", - "2": "設定が変更されたため、オープンチャットのプロフィールと検索結果に最新メッセージが表示されなくなります。なお、設定が反映されるまで時間がかかる場合があります。", - }, - }, - "syncToken": - "CgABAAAAAAAAABsKAAIAAAAAAAAACwoAAwAAAAAAAAAFCgAEAAAAAAAAAAUKAAUAAAAAAAAAAgoABgAAAAAAAAAACgAHAAABjreKrWQMAAgIAAEAAAAAAAwACQ0AAQsKAAAAAAAKAAoAAAAAAAAAAAA=", - }, -}; -eventTemplate[1].payload.sendMessage.squareMessage.message; diff --git a/site/tmp/type.js b/site/tmp/type.js deleted file mode 100644 index 3d24b1e..0000000 --- a/site/tmp/type.js +++ /dev/null @@ -1,7798 +0,0 @@ -// -// Autogenerated by Thrift Compiler (0.19.0) -// -// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -// -"use strict"; -window.lineType = {}; -lineType.ApplicationType = { - "IOS": 16, - "IOS_RC": 17, - "IOS_BETA": 18, - "IOS_ALPHA": 19, - "ANDROID": 32, - "ANDROID_RC": 33, - "ANDROID_BETA": 34, - "ANDROID_ALPHA": 35, - "WAP": 48, - "WAP_RC": 49, - "WAP_BETA": 50, - "WAP_ALPHA": 51, - "BOT": 64, - "BOT_RC": 65, - "BOT_BETA": 66, - "BOT_ALPHA": 67, - "WEB": 80, - "WEB_RC": 81, - "WEB_BETA": 82, - "WEB_ALPHA": 83, - "DESKTOPWIN": 96, - "DESKTOPWIN_RC": 97, - "DESKTOPWIN_BETA": 98, - "DESKTOPWIN_ALPHA": 99, - "DESKTOPMAC": 112, - "DESKTOPMAC_RC": 113, - "DESKTOPMAC_BETA": 114, - "DESKTOPMAC_ALPHA": 115, - "CHANNELGW": 128, - "CHANNELGW_RC": 129, - "CHANNELGW_BETA": 130, - "CHANNELGW_ALPHA": 131, - "CHANNELCP": 144, - "CHANNELCP_RC": 145, - "CHANNELCP_BETA": 146, - "CHANNELCP_ALPHA": 147, - "WINPHONE": 160, - "WINPHONE_RC": 161, - "WINPHONE_BETA": 162, - "WINPHONE_ALPHA": 163, - "BLACKBERRY": 176, - "BLACKBERRY_RC": 177, - "BLACKBERRY_BETA": 178, - "BLACKBERRY_ALPHA": 179, - "WINMETRO": 192, - "WINMETRO_RC": 193, - "WINMETRO_BETA": 194, - "WINMETRO_ALPHA": 195, - "S40": 208, - "S40_RC": 209, - "S40_BETA": 210, - "S40_ALPHA": 211, - "CHRONO": 224, - "CHRONO_RC": 225, - "CHRONO_BETA": 226, - "CHRONO_ALPHA": 227, - "TIZEN": 256, - "TIZEN_RC": 257, - "TIZEN_BETA": 258, - "TIZEN_ALPHA": 259, - "VIRTUAL": 272, - "FIREFOXOS": 288, - "FIREFOXOS_RC": 289, - "FIREFOXOS_BETA": 290, - "FIREFOXOS_ALPHA": 291, - "IOSIPAD": 304, - "IOSIPAD_RC": 305, - "IOSIPAD_BETA": 306, - "IOSIPAD_ALPHA": 307, - "BIZIOS": 320, - "BIZIOS_RC": 321, - "BIZIOS_BETA": 322, - "BIZIOS_ALPHA": 323, - "BIZANDROID": 336, - "BIZANDROID_RC": 337, - "BIZANDROID_BETA": 338, - "BIZANDROID_ALPHA": 339, - "BIZBOT": 352, - "BIZBOT_RC": 353, - "BIZBOT_BETA": 354, - "BIZBOT_ALPHA": 355, - "CHROMEOS": 368, - "CHROMEOS_RC": 369, - "CHROMEOS_BETA": 370, - "CHROMEOS_ALPHA": 371, - "ANDROIDLITE": 384, - "ANDROIDLITE_RC": 385, - "ANDROIDLITE_BETA": 386, - "ANDROIDLITE_ALPHA": 387, - "WIN10": 400, - "WIN10_RC": 401, - "WIN10_BETA": 402, - "WIN10_ALPHA": 403, - "BIZWEB": 416, - "BIZWEB_RC": 417, - "BIZWEB_BETA": 418, - "BIZWEB_ALPHA": 419, - "DUMMYPRIMARY": 432, - "DUMMYPRIMARY_RC": 433, - "DUMMYPRIMARY_BETA": 434, - "DUMMYPRIMARY_ALPHA": 435, - "SQUARE": 448, - "SQUARE_RC": 449, - "SQUARE_BETA": 450, - "SQUARE_ALPHA": 451, - "INTERNAL": 464, - "INTERNAL_RC": 465, - "INTERNAL_BETA": 466, - "INTERNAL_ALPHA": 467, - "CLOVAFRIENDS": 480, - "CLOVAFRIENDS_RC": 481, - "CLOVAFRIENDS_BETA": 482, - "CLOVAFRIENDS_ALPHA": 483, -}; -lineType.ExtendedProfileAttribute = {}; -lineType.PrivacyLevelType = { "PUBLIC": 0, "PRIVATE": 1 }; -lineType.PaidCallerIdStatus = { - "NOT_SPECIFIED": 0, - "VALID": 1, - "VERIFICATION_REQUIRED": 2, - "NOT_PERMITTED": 3, - "LIMIT_EXCEEDED": 4, - "LIMIT_EXCEEDED_AND_VERIFICATION_REQUIRED": 5, -}; -lineType.PaidCallProductType = { "COIN": 0, "CREDIT": 1, "MONTHLY": 2 }; -lineType.PaidCallType = { "OUT": 0, "IN": 1, "TOLLFREE": 2, "RECORD": 3, "AD": 4, "CS": 5 }; -lineType.BotType = { "RESERVED": 0, "OFFICIAL": 1, "LINE_AT_0": 2, "LINE_AT": 3 }; -lineType.BuddyOnAirLabel = { "ON_AIR": 0, "LIVE": 1 }; -lineType.BuddyBannerLinkType = { - "BUDDY_BANNER_LINK_HIDDEN": 0, - "BUDDY_BANNER_LINK_MID": 1, - "BUDDY_BANNER_LINK_URL": 2, -}; -lineType.BuddyOnAirType = { "NORMAL": 0, "LIVE": 1, "VOIP": 2 }; -lineType.Diff = { "ADDED": 0, "UPDATED": 1, "REMOVED": 2 }; -lineType.ReportType = { "ADVERTISING": 1, "GENDER_HARASSMENT": 2, "HARASSMENT": 3, "OTHER": 4 }; -lineType.SyncTriggerReason = { "OTHER": 0, "REVISION_GAP_TOO_LARGE": 1, "OPERATION_EXPIRED": 2 }; -lineType.ReportCategory = { "PUSH_NORMAL_PLAIN": 0, "PUSH_NORMAL_E2EE": 1, "PUSH_VOIP_PLAIN": 2, "PUSH_VOIP_E2EE": 3 }; -lineType.BuddyResultState = { - "ACCEPTED": 1, - "SUCCEEDED": 2, - "FAILED": 3, - "CANCELLED": 4, - "NOTIFY_FAILED": 5, - "STORING": 11, - "UPLOADING": 21, - "NOTIFYING": 31, - "REMOVING_SUBSCRIPTION": 41, - "UNREGISTERING_ACCOUNT": 42, - "NOTIFYING_LEAVE_CHAT": 43, -}; -lineType.BuddySearchRequestSource = { "NA": 0, "FRIEND_VIEW": 1, "OFFICIAL_ACCOUNT_VIEW": 2 }; -lineType.CarrierCode = { - "NOT_SPECIFIED": 0, - "JP_DOCOMO": 1, - "JP_AU": 2, - "JP_SOFTBANK": 3, - "JP_DOCOMO_LINE": 4, - "KR_SKT": 17, - "KR_KT": 18, - "KR_LGT": 19, -}; -lineType.ChannelConfiguration = { "MESSAGE": 0, "MESSAGE_NOTIFICATION": 1, "NOTIFICATION_CENTER": 2 }; -lineType.ChannelPermission = { "PROFILE": 0, "FRIENDS": 1, "GROUP": 2 }; -lineType.ChannelFeatureLicense = { - "BLE_LCS_API_USABLE": 26, - "PROHIBIT_MINIMIZE_CHANNEL_BROWSER": 27, - "ALLOW_IOS_WEBKIT": 28, -}; -lineType.ChannelErrorCode = { - "ILLEGAL_ARGUMENT": 0, - "INTERNAL_ERROR": 1, - "CONNECTION_ERROR": 2, - "AUTHENTICATIONI_FAILED": 3, - "NEED_PERMISSION_APPROVAL": 4, - "COIN_NOT_USABLE": 5, - "WEBVIEW_NOT_ALLOWED": 6, -}; -lineType.ChannelSyncType = { "SYNC": 0, "REMOVE": 1, "REMOVE_ALL": 2 }; -lineType.LoginType = { "ID_CREDENTIAL": 0, "QRCODE": 1, "ID_CREDENTIAL_WITH_E2EE": 2 }; -lineType.ContactAttribute = { - "CONTACT_ATTRIBUTE_CAPABLE_VOICE_CALL": 1, - "CONTACT_ATTRIBUTE_CAPABLE_VIDEO_CALL": 2, - "CONTACT_ATTRIBUTE_CAPABLE_MY_HOME": 16, - "CONTACT_ATTRIBUTE_CAPABLE_BUDDY": 32, -}; -lineType.ContactCategory = { "NORMAL": 0, "RECOMMEND": 1 }; -lineType.ContactRelation = { "ONEWAY": 0, "BOTH": 1, "NOT_REGISTERED": 2 }; -lineType.AsymmetricKeyAlgorithm = { "ASYMMETRIC_KEY_ALGORITHM_RSA": 1, "ASYMMETRIC_KEY_ALGORITHM_ECDH": 2 }; -lineType.ContactSetting = { - "CONTACT_SETTING_NOTIFICATION_DISABLE": 1, - "CONTACT_SETTING_DISPLAY_NAME_OVERRIDE": 2, - "CONTACT_SETTING_CONTACT_HIDE": 4, - "CONTACT_SETTING_FAVORITE": 8, - "CONTACT_SETTING_DELETE": 16, -}; -lineType.ContactStatus = { - "UNSPECIFIED": 0, - "FRIEND": 1, - "FRIEND_BLOCKED": 2, - "RECOMMEND": 3, - "RECOMMEND_BLOCKED": 4, - "DELETED": 5, - "DELETED_BLOCKED": 6, -}; -lineType.ContactType = { - "MID": 0, - "PHONE": 1, - "EMAIL": 2, - "USERID": 3, - "PROXIMITY": 4, - "GROUP": 5, - "USER": 6, - "QRCODE": 7, - "PROMOTION_BOT": 8, - "CONTACT_MESSAGE": 9, - "FRIEND_REQUEST": 10, - "REPAIR": 128, - "FACEBOOK": 2305, - "SINA": 2306, - "RENREN": 2307, - "FEIXIN": 2308, - "BBM": 2309, - "BEACON": 11, -}; -lineType.GroupPreferenceAttribute = { "INVITATION_TICKET": 1, "FAVORITE_TIMESTAMP": 2 }; -lineType.ContentType = { - "NONE": 0, - "IMAGE": 1, - "VIDEO": 2, - "AUDIO": 3, - "HTML": 4, - "PDF": 5, - "CALL": 6, - "STICKER": 7, - "PRESENCE": 8, - "GIFT": 9, - "GROUPBOARD": 10, - "APPLINK": 11, - "LINK": 12, - "CONTACT": 13, - "FILE": 14, - "LOCATION": 15, - "POSTNOTIFICATION": 16, - "RICH": 17, - "CHATEVENT": 18, - "MUSIC": 19, - "PAYMENT": 20, - "EXTIMAGE": 21, -}; -lineType.MessageRelationType = { "FORWARD": 0, "AUTO_REPLY": 1, "SUBORDINATE": 2 }; -lineType.CustomMode = { - "PROMOTION_FRIENDS_INVITE": 1, - "CAPABILITY_SERVER_SIDE_SMS": 2, - "LINE_CLIENT_ANALYTICS_CONFIGURATION": 3, -}; -lineType.RoomAttribute = { "ALL": 255, "NOTIFICATION_SETTING": 1 }; -lineType.UserStatus = { "NORMAL": 0, "UNBOUND": 1, "UNREGISTERED": 2 }; -lineType.EmailConfirmationStatus = { "NOT_SPECIFIED": 0, "NOT_YET": 1, "DONE": 3, "NEED_ENFORCED_INPUT": 4 }; -lineType.AccountMigrationPincodeType = { "NOT_APPLICABLE": 0, "NOT_SET": 1, "SET": 2, "NEED_ENFORCED_INPUT": 3 }; -lineType.AccountMigrationCheckType = { "SKIP": 0, "PINCODE": 1, "SECURITY_CENTER": 2 }; -lineType.SecurityCenterSettingsType = { "NOT_APPLICABLE": 0, "NOT_SET": 1, "SET": 2, "NEED_ENFORCED_INPUT": 3 }; -lineType.EmailConfirmationType = { "SERVER_SIDE_EMAIL": 0, "CLIENT_SIDE_EMAIL": 1 }; -lineType.SquareChatAnnouncementType = { "TEXT_MESSAGE": 0 }; -lineType.SquareChatAttribute = { "NAME": 2, "SQUARE_CHAT_IMAGE": 3, "STATE": 4 }; -lineType.SquareMemberAttribute = { - "DISPLAY_NAME": 1, - "PROFILE_IMAGE": 2, - "ABLE_TO_RECEIVE_MESSAGE": 3, - "MEMBERSHIP_STATE": 5, - "ROLE": 6, - "PREFERENCE": 7, -}; -lineType.SquareMemberRelationAttribute = { "BLOCKED": 1 }; -lineType.SquarePreferenceAttribute = { "FAVORITE": 1, "NOTI_FOR_NEW_JOIN_REQUEST": 2 }; -lineType.SquareState = { "ALIVE": 0, "DELETED": 1, "SUSPENDED": 2 }; -lineType.CommitMessageResultCode = { "DELIVERED": 0, "DELIVERY_SKIPPED": 1, "DELIVERY_RESTRICTED": 2 }; -lineType.ErrorCode = { - "ILLEGAL_ARGUMENT": 0, - "AUTHENTICATION_FAILED": 1, - "DB_FAILED": 2, - "INVALID_STATE": 3, - "EXCESSIVE_ACCESS": 4, - "NOT_FOUND": 5, - "INVALID_MID": 9, - "NOT_A_MEMBER": 10, - "INVALID_LENGTH": 6, - "NOT_AVAILABLE_USER": 7, - "NOT_AUTHORIZED_DEVICE": 8, - "NOT_AUTHORIZED_SESSION": 14, - "INCOMPATIBLE_APP_VERSION": 11, - "NOT_READY": 12, - "NOT_AVAILABLE_SESSION": 13, - "SYSTEM_ERROR": 15, - "NO_AVAILABLE_VERIFICATION_METHOD": 16, - "NOT_AUTHENTICATED": 17, - "INVALID_IDENTITY_CREDENTIAL": 18, - "NOT_AVAILABLE_IDENTITY_IDENTIFIER": 19, - "INTERNAL_ERROR": 20, - "NO_SUCH_IDENTITY_IDENFIER": 21, - "DEACTIVATED_ACCOUNT_BOUND_TO_THIS_IDENTITY": 22, - "ILLEGAL_IDENTITY_CREDENTIAL": 23, - "UNKNOWN_CHANNEL": 24, - "NO_SUCH_MESSAGE_BOX": 25, - "NOT_AVAILABLE_MESSAGE_BOX": 26, - "CHANNEL_DOES_NOT_MATCH": 27, - "NOT_YOUR_MESSAGE": 28, - "MESSAGE_DEFINED_ERROR": 29, - "USER_CANNOT_ACCEPT_PRESENTS": 30, - "USER_NOT_STICKER_OWNER": 32, - "MAINTENANCE_ERROR": 33, - "ACCOUNT_NOT_MATCHED": 34, - "ABUSE_BLOCK": 35, - "NOT_FRIEND": 36, - "NOT_ALLOWED_CALL": 37, - "BLOCK_FRIEND": 38, - "INCOMPATIBLE_VOIP_VERSION": 39, - "INVALID_SNS_ACCESS_TOKEN": 40, - "EXTERNAL_SERVICE_NOT_AVAILABLE": 41, - "NOT_ALLOWED_ADD_CONTACT": 42, - "NOT_CERTIFICATED": 43, - "NOT_ALLOWED_SECONDARY_DEVICE": 44, - "INVALID_PIN_CODE": 45, - "NOT_FOUND_IDENTITY_CREDENTIAL": 46, - "EXCEED_FILE_MAX_SIZE": 47, - "EXCEED_DAILY_QUOTA": 48, - "NOT_SUPPORT_SEND_FILE": 49, - "MUST_UPGRADE": 50, - "NOT_AVAILABLE_PIN_CODE_SESSION": 51, - "EXPIRED_REVISION": 52, - "NOT_YET_PHONE_NUMBER": 54, - "BAD_CALL_NUMBER": 55, - "UNAVAILABLE_CALL_NUMBER": 56, - "NOT_SUPPORT_CALL_SERVICE": 57, - "CONGESTION_CONTROL": 58, - "NO_BALANCE": 59, - "NOT_PERMITTED_CALLER_ID": 60, - "NO_CALLER_ID_LIMIT_EXCEEDED": 61, - "CALLER_ID_VERIFICATION_REQUIRED": 62, - "NO_CALLER_ID_LIMIT_EXCEEDED_AND_VERIFICATION_REQUIRED": 63, - "MESSAGE_NOT_FOUND": 64, - "INVALID_ACCOUNT_MIGRATION_PINCODE_FORMAT": 65, - "ACCOUNT_MIGRATION_PINCODE_NOT_MATCHED": 66, - "ACCOUNT_MIGRATION_PINCODE_BLOCKED": 67, - "INVALID_PASSWORD_FORMAT": 69, - "FEATURE_RESTRICTED": 70, - "MESSAGE_NOT_DESTRUCTIBLE": 71, - "PAID_CALL_REDEEM_FAILED": 72, - "PREVENTED_JOIN_BY_TICKET": 73, - "SEND_MESSAGE_NOT_PERMITTED_FROM_LINE_AT": 75, - "SEND_MESSAGE_NOT_PERMITTED_WHILE_AUTO_REPLY": 76, - "SECURITY_CENTER_NOT_VERIFIED": 77, - "SECURITY_CENTER_BLOCKED_BY_SETTING": 78, - "SECURITY_CENTER_BLOCKED": 79, - "TALK_PROXY_EXCEPTION": 80, - "E2EE_INVALID_PROTOCOL": 81, - "E2EE_RETRY_ENCRYPT": 82, - "E2EE_UPDATE_SENDER_KEY": 83, - "E2EE_UPDATE_RECEIVER_KEY": 84, - "E2EE_INVALID_ARGUMENT": 85, - "E2EE_INVALID_VERSION": 86, - "E2EE_SENDER_DISABLED": 87, - "E2EE_RECEIVER_DISABLED": 88, - "E2EE_SENDER_NOT_ALLOWED": 89, - "E2EE_RECEIVER_NOT_ALLOWED": 90, - "E2EE_RESEND_FAIL": 91, - "E2EE_RESEND_OK": 92, - "HITOKOTO_BACKUP_NO_AVAILABLE_DATA": 93, - "E2EE_UPDATE_PRIMARY_DEVICE": 94, - "SUCCESS": 95, - "CANCEL": 96, - "E2EE_PRIMARY_NOT_SUPPORT": 97, - "E2EE_RETRY_PLAIN": 98, - "E2EE_RECREATE_GROUP_KEY": 99, - "E2EE_GROUP_TOO_MANY_MEMBERS": 100, - "SERVER_BUSY": 101, - "NOT_ALLOWED_ADD_FOLLOW": 102, - "INCOMING_FRIEND_REQUEST_LIMIT": 103, - "OUTGOING_FRIEND_REQUEST_LIMIT": 104, - "OUTGOING_FRIEND_REQUEST_QUOTA": 105, - "DUPLICATED": 106, - "BANNED": 107, -}; -lineType.FeatureType = { "OBS_VIDEO": 1, "OBS_GENERAL": 2 }; -lineType.GroupAttribute = { - "NAME": 1, - "PICTURE_STATUS": 2, - "ALL": 255, - "PREVENTED_JOIN_BY_TICKET": 4, - "NOTIFICATION_SETTING": 8, -}; -lineType.IdentityProvider = { "UNKNOWN": 0, "LINE": 1, "NAVER_KR": 2, "LINE_PHONE": 3 }; -lineType.LoginResultType = { "SUCCESS": 1, "REQUIRE_QRCODE": 2, "REQUIRE_DEVICE_CONFIRM": 3, "REQUIRE_SMS_CONFIRM": 4 }; -lineType.MessageOperationType = { - "SEND_MESSAGE": 1, - "RECEIVE_MESSAGE": 2, - "READ_MESSAGE": 3, - "NOTIFIED_READ_MESSAGE": 4, - "NOTIFIED_JOIN_CHAT": 5, - "FAILED_SEND_MESSAGE": 6, - "SEND_CONTENT": 7, - "SEND_CONTENT_RECEIPT": 8, - "SEND_CHAT_REMOVED": 9, - "REMOVE_ALL_MESSAGES": 10, -}; -lineType.MIDType = { "USER": 0, "ROOM": 1, "GROUP": 2, "SQUARE": 3, "SQUARE_CHAT": 4, "SQUARE_MEMBER": 5, "BOT": 6 }; -lineType.ServiceCode = { "UNKNOWN": 0, "TALK": 1, "SQUARE": 2 }; -lineType.FriendRequestDirection = { "INCOMING": 1, "OUTGOING": 2 }; -lineType.FriendRequestMethod = { "TIMELINE": 1, "NEARBY": 2, "SQUARE": 3 }; -lineType.FriendRequestStatus = { "NONE": 0, "AVAILABLE": 1, "ALREADY_REQUESTED": 2, "UNAVAILABLE": 3 }; -lineType.ModificationType = { "ADD": 0, "REMOVE": 1, "MODIFY": 2 }; -lineType.NotificationItemFetchMode = { "ALL": 0, "APPEND": 1 }; -lineType.NotificationQueueType = { "GLOBAL": 1, "MESSAGE": 2, "PRIMARY": 3 }; -lineType.GroupCallMediaType = { "AUDIO": 1, "VIDEO": 2 }; -lineType.PersonalInfo = { "EMAIL": 0, "PHONE": 1, "BIRTHDAY": 2, "RAW_BIRTHDAY": 3 }; -lineType.NotificationStatus = { - "NOTIFICATION_ITEM_EXIST": 1, - "TIMELINE_ITEM_EXIST": 2, - "NOTE_GROUP_NEW_ITEM_EXIST": 4, - "TIMELINE_BUDDYGROUP_CHANGED": 8, - "NOTE_ONE_TO_ONE_NEW_ITEM_EXIST": 16, - "ALBUM_ITEM_EXIST": 32, - "TIMELINE_ITEM_DELETED": 64, - "OTOGROUP_ITEM_EXIST": 128, - "GROUPHOME_NEW_ITEM_EXIST": 256, - "GROUPHOME_HIDDEN_ITEM_CHANGED": 512, - "NOTIFICATION_ITEM_CHANGED": 1024, - "BEAD_ITEM_HIDE": 2048, - "BEAD_ITEM_SHOW": 4096, -}; -lineType.NotificationType = { - "APPLE_APNS": 1, - "GOOGLE_C2DM": 2, - "NHN_NNI": 3, - "SKT_AOM": 4, - "MS_MPNS": 5, - "RIM_BIS": 6, - "GOOGLE_GCM": 7, - "NOKIA_NNAPI": 8, - "TIZEN": 9, - "LINE_BOT": 17, - "LINE_WAP": 18, - "APPLE_APNS_VOIP": 19, - "MS_WNS": 20, - "GOOGLE_FCM": 21, -}; -lineType.OpStatus = { "NORMAL": 0, "ALERT_DISABLED": 1, "ALWAYS": 2 }; -lineType.OpType = { - "END_OF_OPERATION": 0, - "UPDATE_PROFILE": 1, - "UPDATE_SETTINGS": 36, - "NOTIFIED_UPDATE_PROFILE": 2, - "REGISTER_USERID": 3, - "ADD_CONTACT": 4, - "NOTIFIED_ADD_CONTACT": 5, - "BLOCK_CONTACT": 6, - "UNBLOCK_CONTACT": 7, - "NOTIFIED_RECOMMEND_CONTACT": 8, - "CREATE_GROUP": 9, - "UPDATE_GROUP": 10, - "NOTIFIED_UPDATE_GROUP": 11, - "INVITE_INTO_GROUP": 12, - "NOTIFIED_INVITE_INTO_GROUP": 13, - "CANCEL_INVITATION_GROUP": 31, - "NOTIFIED_CANCEL_INVITATION_GROUP": 32, - "LEAVE_GROUP": 14, - "NOTIFIED_LEAVE_GROUP": 15, - "ACCEPT_GROUP_INVITATION": 16, - "NOTIFIED_ACCEPT_GROUP_INVITATION": 17, - "REJECT_GROUP_INVITATION": 34, - "NOTIFIED_REJECT_GROUP_INVITATION": 35, - "KICKOUT_FROM_GROUP": 18, - "NOTIFIED_KICKOUT_FROM_GROUP": 19, - "CREATE_ROOM": 20, - "INVITE_INTO_ROOM": 21, - "NOTIFIED_INVITE_INTO_ROOM": 22, - "LEAVE_ROOM": 23, - "NOTIFIED_LEAVE_ROOM": 24, - "SEND_MESSAGE": 25, - "RECEIVE_MESSAGE": 26, - "SEND_MESSAGE_RECEIPT": 27, - "RECEIVE_MESSAGE_RECEIPT": 28, - "SEND_CONTENT_RECEIPT": 29, - "RECEIVE_ANNOUNCEMENT": 30, - "NOTIFIED_UNREGISTER_USER": 33, - "INVITE_VIA_EMAIL": 38, - "NOTIFIED_REGISTER_USER": 37, - "NOTIFIED_REQUEST_RECOVERY": 39, - "SEND_CHAT_CHECKED": 40, - "SEND_CHAT_REMOVED": 41, - "NOTIFIED_FORCE_SYNC": 42, - "SEND_CONTENT": 43, - "SEND_MESSAGE_MYHOME": 44, - "NOTIFIED_UPDATE_CONTENT_PREVIEW": 45, - "REMOVE_ALL_MESSAGES": 46, - "NOTIFIED_UPDATE_PURCHASES": 47, - "DUMMY": 48, - "UPDATE_CONTACT": 49, - "NOTIFIED_RECEIVED_CALL": 50, - "CANCEL_CALL": 51, - "NOTIFIED_REDIRECT": 52, - "NOTIFIED_CHANNEL_SYNC": 53, - "FAILED_SEND_MESSAGE": 54, - "NOTIFIED_READ_MESSAGE": 55, - "FAILED_EMAIL_CONFIRMATION": 56, - "NOTIFIED_CHAT_CONTENT": 58, - "NOTIFIED_PUSH_NOTICENTER_ITEM": 59, - "NOTIFIED_JOIN_CHAT": 60, - "NOTIFIED_LEAVE_CHAT": 61, - "NOTIFIED_TYPING": 62, - "FRIEND_REQUEST_ACCEPTED": 63, - "DESTROY_MESSAGE": 64, - "NOTIFIED_DESTROY_MESSAGE": 65, - "UPDATE_PUBLICKEYCHAIN": 66, - "NOTIFIED_UPDATE_PUBLICKEYCHAIN": 67, - "NOTIFIED_BLOCK_CONTACT": 68, - "NOTIFIED_UNBLOCK_CONTACT": 69, - "UPDATE_GROUPPREFERENCE": 70, - "NOTIFIED_PAYMENT_EVENT": 71, - "REGISTER_E2EE_PUBLICKEY": 72, - "NOTIFIED_E2EE_KEY_EXCHANGE_REQ": 73, - "NOTIFIED_E2EE_KEY_EXCHANGE_RESP": 74, - "NOTIFIED_E2EE_MESSAGE_RESEND_REQ": 75, - "NOTIFIED_E2EE_MESSAGE_RESEND_RESP": 76, - "NOTIFIED_E2EE_KEY_UPDATE": 77, - "NOTIFIED_BUDDY_UPDATE_PROFILE": 78, - "NOTIFIED_UPDATE_LINEAT_TABS": 79, - "UPDATE_ROOM": 80, - "NOTIFIED_BEACON_DETECTED": 81, - "UPDATE_EXTENDED_PROFILE": 82, - "ADD_FOLLOW": 83, - "NOTIFIED_ADD_FOLLOW": 84, - "DELETE_FOLLOW": 85, - "NOTIFIED_DELETE_FOLLOW": 86, - "UPDATE_TIMELINE_SETTINGS": 87, - "NOTIFIED_FRIEND_REQUEST": 88, - "UPDATE_RINGBACK_TONE": 89, - "NOTIFIED_POSTBACK": 90, - "RECEIVE_READ_WATERMARK": 91, - "NOTIFIED_MESSAGE_DELIVERED": 92, - "NOTIFIED_UPDATE_CHAT_BAR": 93, - "NOTIFIED_CHATAPP_INSTALLED": 94, - "NOTIFIED_CHATAPP_UPDATED": 95, - "NOTIFIED_CHATAPP_NEW_MARK": 96, - "NOTIFIED_CHATAPP_DELETED": 97, - "NOTIFIED_CHATAPP_SYNC": 98, - "NOTIFIED_UPDATE_MESSAGE": 99, -}; -lineType.PayloadType = { "PAYLOAD_BUY": 101, "PAYLOAD_CS": 111, "PAYLOAD_BONUS": 121, "PAYLOAD_EVENT": 131 }; -lineType.PaymentPgType = { "PAYMENT_PG_NONE": 0, "PAYMENT_PG_AU": 1, "PAYMENT_PG_AL": 2 }; -lineType.PaymentType = { "PAYMENT_APPLE": 1, "PAYMENT_GOOGLE": 2 }; -lineType.ProductBannerLinkType = { - "BANNER_LINK_NONE": 0, - "BANNER_LINK_ITEM": 1, - "BANNER_LINK_URL": 2, - "BANNER_LINK_CATEGORY": 3, -}; -lineType.ProductEventType = { - "NO_EVENT": 0, - "CARRIER_ANY": 65537, - "BUDDY_ANY": 131073, - "INSTALL_IOS": 196609, - "INSTALL_ANDROID": 196610, - "MISSION_ANY": 262145, - "MUSTBUY_ANY": 327681, -}; -lineType.StickerResourceType = { - "STATIC": 1, - "ANIMATION": 2, - "SOUND": 3, - "ANIMATION_SOUND": 4, - "POPUP": 5, - "POPUP_SOUND": 6, -}; -lineType.PlaceSearchProvider = { "GOOGLE": 0, "BAIDU": 1 }; -lineType.PointErrorCode = { - "REQUEST_DUPLICATION": 3001, - "INVALID_PARAMETER": 3002, - "NOT_ENOUGH_BALANCE": 3003, - "AUTHENTICATION_FAIL": 3004, - "API_ACCESS_FORBIDDEN": 3005, - "MEMBER_ACCOUNT_NOT_FOUND": 3006, - "SERVICE_ACCOUNT_NOT_FOUND": 3007, - "TRANSACTION_NOT_FOUND": 3008, - "ALREADY_REVERSED_TRANSACTION": 3009, - "MESSAGE_NOT_READABLE": 3010, - "HTTP_REQUEST_METHOD_NOT_SUPPORTED": 3011, - "HTTP_MEDIA_TYPE_NOT_SUPPORTED": 3012, - "NOT_ALLOWED_TO_DEPOSIT": 3013, - "NOT_ALLOWED_TO_PAY": 3014, - "TRANSACTION_ACCESS_FORBIDDEN": 3015, - "INVALID_SERVICE_CONFIGURATION": 4001, - "DCS_COMMUNICATION_FAIL": 5004, - "UPDATE_BALANCE_FAIL": 5007, - "SYSTEM_ERROR": 5999, - "SYSTEM_MAINTENANCE": 5888, -}; -lineType.ProfileAttribute = { - "ALL": 511, - "EMAIL": 1, - "DISPLAY_NAME": 2, - "PHONETIC_NAME": 4, - "PICTURE": 8, - "STATUS_MESSAGE": 16, - "ALLOW_SEARCH_BY_USERID": 32, - "ALLOW_SEARCH_BY_EMAIL": 64, - "BUDDY_STATUS": 128, - "MUSIC_PROFILE": 256, -}; -lineType.PublicType = { "HIDDEN": 0, "PUBLIC": 1000 }; -lineType.RedirectType = { "NONE": 0, "EXPIRE_SECOND": 1 }; -lineType.RegistrationType = { - "PHONE": 0, - "EMAIL_WAP": 1, - "FACEBOOK": 2305, - "SINA": 2306, - "RENREN": 2307, - "FEIXIN": 2308, -}; -lineType.ChatRoomAnnouncementType = { "MESSAGE": 0, "NOTE": 1 }; -lineType.SettingsAttribute = { - "ALL": 2147483647, - "NOTIFICATION_ENABLE": 1, - "NOTIFICATION_MUTE_EXPIRATION": 2, - "NOTIFICATION_NEW_MESSAGE": 4, - "NOTIFICATION_GROUP_INVITATION": 8, - "NOTIFICATION_SHOW_MESSAGE": 16, - "NOTIFICATION_INCOMING_CALL": 32, - "NOTIFICATION_SOUND_MESSAGE": 256, - "NOTIFICATION_SOUND_GROUP": 512, - "NOTIFICATION_DISABLED_WITH_SUB": 65536, - "NOTIFICATION_PAYMENT": 131072, - "PRIVACY_SYNC_CONTACTS": 64, - "PRIVACY_SEARCH_BY_PHONE_NUMBER": 128, - "PRIVACY_SEARCH_BY_USERID": 8192, - "PRIVACY_SEARCH_BY_EMAIL": 16384, - "PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN": 2097152, - "PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME": 8388608, - "PRIVACY_ALLOW_FRIEND_REQUEST": 1073741824, - "PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND": 33554432, - "PRIVACY_AGREE_USE_LINECOIN_TO_PAIDCALL": 67108864, - "PRIVACY_AGREE_USE_PAIDCALL": 134217728, - "CONTACT_MY_TICKET": 1024, - "IDENTITY_PROVIDER": 2048, - "IDENTITY_IDENTIFIER": 4096, - "SNS_ACCOUNT": 524288, - "PHONE_REGISTRATION": 1048576, - "PREFERENCE_LOCALE": 32768, - "CUSTOM_MODE": 4194304, - "EMAIL_CONFIRMATION_STATUS": 16777216, - "ACCOUNT_MIGRATION_PINCODE": 268435456, - "ENFORCED_INPUT_ACCOUNT_MIGRATION_PINCODE": 536870912, - "SECURITY_CENTER_SETTINGS": 262144, -}; -lineType.SettingsAttributeEx = { - "NOTIFICATION_ENABLE": 0, - "NOTIFICATION_MUTE_EXPIRATION": 1, - "NOTIFICATION_NEW_MESSAGE": 2, - "NOTIFICATION_GROUP_INVITATION": 3, - "NOTIFICATION_SHOW_MESSAGE": 4, - "NOTIFICATION_INCOMING_CALL": 5, - "NOTIFICATION_SOUND_MESSAGE": 8, - "NOTIFICATION_SOUND_GROUP": 9, - "NOTIFICATION_DISABLED_WITH_SUB": 16, - "NOTIFICATION_PAYMENT": 17, - "NOTIFICATION_MENTION": 40, - "NOTIFICATION_THUMBNAIL": 45, - "PRIVACY_SYNC_CONTACTS": 6, - "PRIVACY_SEARCH_BY_PHONE_NUMBER": 7, - "PRIVACY_SEARCH_BY_USERID": 13, - "PRIVACY_SEARCH_BY_EMAIL": 14, - "PRIVACY_ALLOW_SECONDARY_DEVICE_LOGIN": 21, - "PRIVACY_PROFILE_IMAGE_POST_TO_MYHOME": 23, - "PRIVACY_PROFILE_MUSIC_POST_TO_MYHOME": 35, - "PRIVACY_ALLOW_FRIEND_REQUEST": 30, - "PRIVACY_RECV_MESSAGES_FROM_NOT_FRIEND": 25, - "PRIVACY_AGREE_USE_LINECOIN_TO_PAIDCALL": 26, - "PRIVACY_AGREE_USE_PAIDCALL": 27, - "CONTACT_MY_TICKET": 10, - "IDENTITY_PROVIDER": 11, - "IDENTITY_IDENTIFIER": 12, - "SNS_ACCOUNT": 19, - "PHONE_REGISTRATION": 20, - "PREFERENCE_LOCALE": 15, - "CUSTOM_MODE": 22, - "EMAIL_CONFIRMATION_STATUS": 24, - "ACCOUNT_MIGRATION_PINCODE": 28, - "ENFORCED_INPUT_ACCOUNT_MIGRATION_PINCODE": 29, - "SECURITY_CENTER_SETTINGS": 18, - "E2EE_ENABLE": 33, - "ENABLE_SOUND_TO_TEXT": 47, - "HITOKOTO_BACKUP_REQUESTED": 34, - "CONTACT_ALLOW_FOLLOWING": 36, - "PRIVACY_ALLOW_NEARBY": 37, - "AGREEMENT_NEARBY": 38, - "AGREEMENT_SQUARE": 39, - "ALLOW_UNREGISTRATION_SECONDARY_DEVICE": 41, - "AGREEMENT_BOT_USE": 42, - "AGREEMENT_SHAKE_FUNCTION": 43, - "AGREEMENT_MOBILE_CONTACT_NAME": 44, - "AGREEMENT_SOUND_TO_TEXT": 46, -}; -lineType.SnsIdType = { "FACEBOOK": 1, "SINA": 2, "RENREN": 3, "FEIXIN": 4, "BBM": 5 }; -lineType.SpammerReason = { "OTHER": 0, "ADVERTISING": 1, "GENDER_HARASSMENT": 2, "HARASSMENT": 3 }; -lineType.SyncActionType = { "SYNC": 0, "REPORT": 1 }; -lineType.SpotCategory = { - "UNKNOWN": 0, - "GOURMET": 1, - "BEAUTY": 2, - "TRAVEL": 3, - "SHOPPING": 4, - "ENTERTAINMENT": 5, - "SPORTS": 6, - "TRANSPORT": 7, - "LIFE": 8, - "HOSPITAL": 9, - "FINANCE": 10, - "EDUCATION": 11, - "OTHER": 12, - "ALL": 10000, -}; -lineType.SyncCategory = { - "PROFILE": 0, - "SETTINGS": 1, - "OPS": 2, - "CONTACT": 3, - "RECOMMEND": 4, - "BLOCK": 5, - "GROUP": 6, - "ROOM": 7, - "NOTIFICATION": 8, - "ADDRESS_BOOK": 9, -}; -lineType.TMessageBoxStatus = { "ACTIVATED": 1, "UNREAD": 2 }; -lineType.UniversalNotificationServiceErrorCode = { - "INTERNAL_ERROR": 0, - "INVALID_KEY": 1, - "ILLEGAL_ARGUMENT": 2, - "TOO_MANY_REQUEST": 3, - "AUTHENTICATION_FAILED": 4, - "NO_WRITE_PERMISSION": 5, -}; -lineType.UnregistrationReason = { - "UNREGISTRATION_REASON_UNREGISTER_USER": 1, - "UNREGISTRATION_REASON_UNBIND_DEVICE": 2, -}; -lineType.UserAgeType = { "OVER": 1, "UNDER": 2, "UNDEFINED": 3 }; -lineType.VerificationMethod = { - "NO_AVAILABLE": 0, - "PIN_VIA_SMS": 1, - "CALLERID_INDIGO": 2, - "PIN_VIA_TTS": 4, - "SKIP": 10, -}; -lineType.VerificationResult = { - "FAILED": 0, - "OK_NOT_REGISTERED_YET": 1, - "OK_REGISTERED_WITH_SAME_DEVICE": 2, - "OK_REGISTERED_WITH_ANOTHER_DEVICE": 3, -}; -lineType.WapInvitationType = { "REGISTRATION": 1, "CHAT": 2 }; -lineType.MediaType = { "AUDIO": 1, "VIDEO": 2 }; -lineType.SQErrorCode = { - "UNKNOWN": 0, - "ILLEGAL_ARGUMENT": 400, - "AUTHENTICATION_FAILURE": 401, - "FORBIDDEN": 403, - "NOT_FOUND": 404, - "REVISION_MISMATCH": 409, - "PRECONDITION_FAILED": 410, - "INTERNAL_ERROR": 500, - "NOT_IMPLEMENTED": 501, - "TRY_AGAIN_LATER": 505, -}; -lineType.SquareEventType = { - "RECEIVE_MESSAGE": 0, - "SEND_MESSAGE": 1, - "NOTIFIED_JOIN_SQUARE_CHAT": 2, - "NOTIFIED_INVITE_INTO_SQUARE_CHAT": 3, - "NOTIFIED_LEAVE_SQUARE_CHAT": 4, - "NOTIFIED_DESTROY_MESSAGE": 5, - "NOTIFIED_MARK_AS_READ": 6, - "NOTIFIED_UPDATE_SQUARE_MEMBER_PROFILE": 7, - "NOTIFIED_KICKOUT_FROM_SQUARE": 19, - "NOTIFIED_SHUTDOWN_SQUARE": 18, - "NOTIFIED_DELETE_SQUARE_CHAT": 20, - "NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_NAME": 30, - "NOTIFIED_UPDATE_SQUARE_CHAT_PROFILE_IMAGE": 31, - "NOTIFIED_UPDATE_SQUARE_CHAT_ANNOUNCEMENT": 37, - "NOTIFIED_ADD_BOT": 33, - "NOTIFIED_REMOVE_BOT": 34, - "NOTIFIED_UPDATE_SQUARE": 8, - "NOTIFIED_UPDATE_SQUARE_STATUS": 9, - "NOTIFIED_UPDATE_SQUARE_AUTHORITY": 10, - "NOTIFIED_UPDATE_SQUARE_MEMBER": 11, - "NOTIFIED_UPDATE_SQUARE_CHAT": 12, - "NOTIFIED_UPDATE_SQUARE_CHAT_STATUS": 13, - "NOTIFIED_UPDATE_SQUARE_CHAT_MEMBER": 14, - "NOTIFIED_CREATE_SQUARE_MEMBER": 15, - "NOTIFIED_CREATE_SQUARE_CHAT_MEMBER": 16, - "NOTIFIED_UPDATE_SQUARE_MEMBER_RELATION": 17, - "NOTIFIED_UPDATE_SQUARE_FEATURE_SET": 32, - "NOTIFIED_UPDATE_SQUARE_NOTE_STATUS": 36, - "NOTIFICATION_JOIN_REQUEST": 21, - "NOTIFICATION_JOINED": 22, - "NOTIFICATION_PROMOTED_COADMIN": 23, - "NOTIFICATION_PROMOTED_ADMIN": 24, - "NOTIFICATION_DEMOTED_MEMBER": 25, - "NOTIFICATION_KICKED_OUT": 26, - "NOTIFICATION_SQUARE_DELETE": 27, - "NOTIFICATION_SQUARE_CHAT_DELETE": 28, - "NOTIFICATION_MESSAGE": 29, -}; -lineType.SquareMemberRelationState = { "NONE": 1, "BLOCKED": 2 }; -lineType.SquareFeatureControlState = { "DISABLED": 1, "ENABLED": 2 }; -lineType.BooleanState = { "NONE": 0, "OFF": 1, "ON": 2 }; -lineType.SquareType = { "CLOSED": 0, "OPEN": 1 }; -lineType.SquareChatType = { "OPEN": 1, "SECRET": 2, "ONE_ON_ONE": 3, "SQUARE_DEFAULT": 4 }; -lineType.SquareErrorCode = { - "UNKNOWN": 0, - "INTERNAL_ERROR": 500, - "NOT_IMPLEMENTED": 501, - "TRY_AGAIN_LATER": 503, - "MAINTENANCE": 505, - "ILLEGAL_ARGUMENT": 400, - "AUTHENTICATION_FAILURE": 401, - "FORBIDDEN": 403, - "NOT_FOUND": 404, - "REVISION_MISMATCH": 409, - "PRECONDITION_FAILED": 410, -}; -lineType.SquareChatState = { "ALIVE": 0, "DELETED": 1, "SUSPENDED": 2 }; -lineType.SquareFeatureSetAttribute = { "CREATING_SECRET_SQUARE_CHAT": 1, "INVITING_INTO_OPEN_SQUARE_CHAT": 2 }; -lineType.SquareMembershipState = { - "JOIN_REQUESTED": 1, - "JOINED": 2, - "REJECTED": 3, - "LEFT": 4, - "KICK_OUT": 5, - "BANNED": 6, - "DELETED": 7, -}; -lineType.SquareChatMemberAttribute = { "MEMBERSHIP_STATE": 4, "NOTIFICATION_MESSAGE": 6 }; -lineType.SquareMemberRole = { "ADMIN": 1, "CO_ADMIN": 2, "MEMBER": 10 }; -lineType.PreconditionFailedExtraInfo = { "DUPLICATED_DISPLAY_NAME": 0 }; -lineType.SquareChatMembershipState = { "JOINED": 1, "LEFT": 2 }; -lineType.FetchDirection = { "FORWARD": 1, "BACKWARD": 2 }; -lineType.SquareAttribute = { - "NAME": 1, - "WELCOME_MESSAGE": 2, - "PROFILE_IMAGE": 3, - "DESCRIPTION": 4, - "SEARCHABLE": 6, - "CATEGORY": 7, - "INVITATION_URL": 8, - "ABLE_TO_USE_INVITATION_URL": 9, - "STATE": 10, -}; -lineType.SquareAuthorityAttribute = { - "UPDATE_SQUARE_PROFILE": 1, - "INVITE_NEW_MEMBER": 2, - "APPROVE_JOIN_REQUEST": 3, - "CREATE_POST": 4, - "CREATE_OPEN_SQUARE_CHAT": 5, - "DELETE_SQUARE_CHAT_OR_POST": 6, - "REMOVE_SQUARE_MEMBER": 7, - "GRANT_ROLE": 8, - "ENABLE_INVITATION_TICKET": 9, - "CREATE_CHAT_ANNOUNCEMENT": 10, -}; -lineType.SquareEventStatus = { "NORMAL": 1, "ALERT_DISABLED": 2 }; -lineType.SuggestDictionaryIncrementStatus = { - "SUCCESS": 0, - "INVALID_REVISION": 1, - "TOO_LARGE_DATA": 2, - "SCHEME_CHANGED": 3, - "RETRY": 4, - "FAIL": 5, - "TOO_OLD_DATA": 6, -}; - -var Thrift = {}; -Thrift.copyList = (args = [], clas) => { - let rt = []; - args.forEach((e, i) => { - if (clas[0]) { - rt[i] = new clas(e); - } else { - rt[i] = e; - } - }); - return rt; -}; -Thrift.copyMap = (args = {}, clas) => { - let rt = {}; - for (const k in args) { - if (clas[0]) { - rt[k] = new clas(args[k]); - } else { - rt[k] = args[k]; - } - } - return rt; -}; - -Thrift.bin2int = (args = []) => { - let rt = 0; - args.forEach((e, i) => { - rt = rt * (0xff); - rt += e; - }); - return rt; -}; -Thrift.getValue = (name, k) => { - for (const key in lineType[name]) { - const element = lineType[name][key]; - if (element == k) { - return key; - } - } -}; - -lineType.Location = class { - constructor(args) { - this.title = null; - this.address = null; - this.latitude = null; - this.longitude = null; - this.phone = null; - if (args) { - if (args.title !== undefined && args.title !== null) { - this.title = args.title; - } - if (args.address !== undefined && args.address !== null) { - this.address = args.address; - } - if (args.latitude !== undefined && args.latitude !== null) { - this.latitude = args.latitude; - } - if (args.longitude !== undefined && args.longitude !== null) { - this.longitude = args.longitude; - } - if (args.phone !== undefined && args.phone !== null) { - this.phone = args.phone; - } - } - } -}; -lineType.MessageBoxV2MessageId = class { - constructor(args) { - this.deliveredTime = null; - this.messageId = null; - if (args) { - if (args.deliveredTime !== undefined && args.deliveredTime !== null) { - this.deliveredTime = args.deliveredTime; - } - if (args.messageId !== undefined && args.messageId !== null) { - this.messageId = args.messageId; - } - } - } -}; -lineType.MessageCommitResult = class { - constructor(args) { - this.requestId = null; - this.state = null; - this.messageStoreRequestId = null; - this.messageIds = null; - this.receiverCount = null; - this.successCount = null; - this.failCount = null; - this.blockCount = null; - this.unregisteredCount = null; - this.unrelatedCount = null; - this.errorDescription = null; - if (args) { - if (args.requestId !== undefined && args.requestId !== null) { - this.requestId = args.requestId; - } - if (args.state !== undefined && args.state !== null) { - this.state = args.state; - } - if (args.messageStoreRequestId !== undefined && args.messageStoreRequestId !== null) { - this.messageStoreRequestId = args.messageStoreRequestId; - } - if (args.messageIds !== undefined && args.messageIds !== null) { - this.messageIds = Thrift.copyList(args.messageIds, [null]); - } - if (args.receiverCount !== undefined && args.receiverCount !== null) { - this.receiverCount = args.receiverCount; - } - if (args.successCount !== undefined && args.successCount !== null) { - this.successCount = args.successCount; - } - if (args.failCount !== undefined && args.failCount !== null) { - this.failCount = args.failCount; - } - if (args.blockCount !== undefined && args.blockCount !== null) { - this.blockCount = args.blockCount; - } - if (args.unregisteredCount !== undefined && args.unregisteredCount !== null) { - this.unregisteredCount = args.unregisteredCount; - } - if (args.unrelatedCount !== undefined && args.unrelatedCount !== null) { - this.unrelatedCount = args.unrelatedCount; - } - if (args.errorDescription !== undefined && args.errorDescription !== null) { - this.errorDescription = args.errorDescription; - } - } - } -}; -lineType.CallHost = class { - constructor(args) { - this.host = null; - this.port = null; - this.zone = null; - if (args) { - if (args.host !== undefined && args.host !== null) { - this.host = args.host; - } - if (args.port !== undefined && args.port !== null) { - this.port = args.port; - } - if (args.zone !== undefined && args.zone !== null) { - this.zone = args.zone; - } - } - } -}; -lineType.AgeCheckDocomoResult = class { - constructor(args) { - this.authUrl = null; - this.userAgeType = null; - if (args) { - if (args.authUrl !== undefined && args.authUrl !== null) { - this.authUrl = args.authUrl; - } - if (args.userAgeType !== undefined && args.userAgeType !== null) { - this.userAgeType = args.userAgeType; - } - } - } -}; -lineType.AgeCheckRequestResult = class { - constructor(args) { - this.authUrl = null; - this.sessionId = null; - if (args) { - if (args.authUrl !== undefined && args.authUrl !== null) { - this.authUrl = args.authUrl; - } - if (args.sessionId !== undefined && args.sessionId !== null) { - this.sessionId = args.sessionId; - } - } - } -}; -lineType.TextMessageAnnouncementContents = class { - constructor(args) { - this.messageId = null; - this.text = null; - this.senderSquareMemberMid = null; - this.createdAt = null; - if (args) { - if (args.messageId !== undefined && args.messageId !== null) { - this.messageId = args.messageId; - } - if (args.text !== undefined && args.text !== null) { - this.text = args.text; - } - if (args.senderSquareMemberMid !== undefined && args.senderSquareMemberMid !== null) { - this.senderSquareMemberMid = args.senderSquareMemberMid; - } - if (args.createdAt !== undefined && args.createdAt !== null) { - this.createdAt = args.createdAt; - } - } - } -}; -lineType.SquareChatAnnouncementContents = class { - constructor(args) { - this.textMessageAnnouncementContents = null; - if (args) { - if (args.textMessageAnnouncementContents !== undefined && args.textMessageAnnouncementContents !== null) { - this.textMessageAnnouncementContents = new lineType.TextMessageAnnouncementContents( - args.textMessageAnnouncementContents, - ); - } - } - } -}; -lineType.SquareChatAnnouncement = class { - constructor(args) { - this.announcementSeq = null; - this.type = null; - this.contents = null; - if (args) { - if (args.announcementSeq !== undefined && args.announcementSeq !== null) { - this.announcementSeq = args.announcementSeq; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.contents !== undefined && args.contents !== null) { - this.contents = new lineType.SquareChatAnnouncementContents(args.contents); - } - } - } -}; -lineType.Announcement = class { - constructor(args) { - this.index = null; - this.forceUpdate = null; - this.title = null; - this.text = null; - this.createdTime = null; - this.pictureUrl = null; - this.thumbnailUrl = null; - if (args) { - if (args.index !== undefined && args.index !== null) { - this.index = args.index; - } - if (args.forceUpdate !== undefined && args.forceUpdate !== null) { - this.forceUpdate = args.forceUpdate; - } - if (args.title !== undefined && args.title !== null) { - this.title = args.title; - } - if (args.text !== undefined && args.text !== null) { - this.text = args.text; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.pictureUrl !== undefined && args.pictureUrl !== null) { - this.pictureUrl = args.pictureUrl; - } - if (args.thumbnailUrl !== undefined && args.thumbnailUrl !== null) { - this.thumbnailUrl = args.thumbnailUrl; - } - } - } -}; -lineType.ChannelProvider = class { - constructor(args) { - this.name = null; - if (args) { - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - } - } -}; -lineType.E2EEPublicKey = class { - constructor(args) { - this.version = null; - this.keyId = null; - this.keyData = null; - this.createdTime = null; - if (args) { - if (args.version !== undefined && args.version !== null) { - this.version = args.version; - } - if (args.keyId !== undefined && args.keyId !== null) { - this.keyId = args.keyId; - } - if (args.keyData !== undefined && args.keyData !== null) { - this.keyData = args.keyData; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - } - } -}; -lineType.ChannelDomain = class { - constructor(args) { - this.host = null; - this.removed = null; - if (args) { - if (args.host !== undefined && args.host !== null) { - this.host = args.host; - } - if (args.removed !== undefined && args.removed !== null) { - this.removed = args.removed; - } - } - } -}; -lineType.E2EENegotiationResult = class { - constructor(args) { - this.allowedTypes = null; - this.publicKey = null; - if (args) { - if (args.allowedTypes !== undefined && args.allowedTypes !== null) { - this.allowedTypes = Thrift.copyList(args.allowedTypes, [null]); - } - if (args.publicKey !== undefined && args.publicKey !== null) { - this.publicKey = new lineType.E2EEPublicKey(args.publicKey); - } - } - } -}; -lineType.OTPResult = class { - constructor(args) { - this.otpId = null; - this.otp = null; - if (args) { - if (args.otpId !== undefined && args.otpId !== null) { - this.otpId = args.otpId; - } - if (args.otp !== undefined && args.otp !== null) { - this.otp = args.otp; - } - } - } -}; -lineType.Square = class { - constructor(args) { - this.mid = null; - this.name = null; - this.welcomeMessage = null; - this.profileImageObsHash = null; - this.desc = null; - this.searchable = null; - this.type = null; - this.categoryID = null; - this.invitationURL = null; - this.revision = null; - this.ableToUseInvitationTicket = null; - this.state = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - if (args.welcomeMessage !== undefined && args.welcomeMessage !== null) { - this.welcomeMessage = args.welcomeMessage; - } - if (args.profileImageObsHash !== undefined && args.profileImageObsHash !== null) { - this.profileImageObsHash = args.profileImageObsHash; - } - if (args.desc !== undefined && args.desc !== null) { - this.desc = args.desc; - } - if (args.searchable !== undefined && args.searchable !== null) { - this.searchable = args.searchable; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.categoryID !== undefined && args.categoryID !== null) { - this.categoryID = args.categoryID; - } - if (args.invitationURL !== undefined && args.invitationURL !== null) { - this.invitationURL = args.invitationURL; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.ableToUseInvitationTicket !== undefined && args.ableToUseInvitationTicket !== null) { - this.ableToUseInvitationTicket = args.ableToUseInvitationTicket; - } - if (args.state !== undefined && args.state !== null) { - this.state = args.state; - } - } - } -}; -lineType.SquareAuthority = class { - constructor(args) { - this.squareMid = null; - this.updateSquareProfile = null; - this.inviteNewMember = null; - this.approveJoinRequest = null; - this.createPost = null; - this.createOpenSquareChat = null; - this.deleteSquareChatOrPost = null; - this.removeSquareMember = null; - this.grantRole = null; - this.enableInvitationTicket = null; - this.revision = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.updateSquareProfile !== undefined && args.updateSquareProfile !== null) { - this.updateSquareProfile = args.updateSquareProfile; - } - if (args.inviteNewMember !== undefined && args.inviteNewMember !== null) { - this.inviteNewMember = args.inviteNewMember; - } - if (args.approveJoinRequest !== undefined && args.approveJoinRequest !== null) { - this.approveJoinRequest = args.approveJoinRequest; - } - if (args.createPost !== undefined && args.createPost !== null) { - this.createPost = args.createPost; - } - if (args.createOpenSquareChat !== undefined && args.createOpenSquareChat !== null) { - this.createOpenSquareChat = args.createOpenSquareChat; - } - if (args.deleteSquareChatOrPost !== undefined && args.deleteSquareChatOrPost !== null) { - this.deleteSquareChatOrPost = args.deleteSquareChatOrPost; - } - if (args.removeSquareMember !== undefined && args.removeSquareMember !== null) { - this.removeSquareMember = args.removeSquareMember; - } - if (args.grantRole !== undefined && args.grantRole !== null) { - this.grantRole = args.grantRole; - } - if (args.enableInvitationTicket !== undefined && args.enableInvitationTicket !== null) { - this.enableInvitationTicket = args.enableInvitationTicket; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - } - } -}; -lineType.SquarePreference = class { - constructor(args) { - this.favoriteTimestamp = null; - this.notiForNewJoinRequest = null; - if (args) { - if (args.favoriteTimestamp !== undefined && args.favoriteTimestamp !== null) { - this.favoriteTimestamp = args.favoriteTimestamp; - } - if (args.notiForNewJoinRequest !== undefined && args.notiForNewJoinRequest !== null) { - this.notiForNewJoinRequest = args.notiForNewJoinRequest; - } - } - } -}; -lineType.SquareMember = class { - constructor(args) { - this.squareMemberMid = null; - this.squareMid = null; - this.displayName = null; - this.profileImageObsHash = null; - this.ableToReceiveMessage = null; - this.membershipState = null; - this.role = null; - this.revision = null; - this.preference = null; - this.joinMessage = null; - if (args) { - if (args.squareMemberMid !== undefined && args.squareMemberMid !== null) { - this.squareMemberMid = args.squareMemberMid; - } - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.displayName !== undefined && args.displayName !== null) { - this.displayName = args.displayName; - } - if (args.profileImageObsHash !== undefined && args.profileImageObsHash !== null) { - this.profileImageObsHash = args.profileImageObsHash; - } - if (args.ableToReceiveMessage !== undefined && args.ableToReceiveMessage !== null) { - this.ableToReceiveMessage = args.ableToReceiveMessage; - } - if (args.membershipState !== undefined && args.membershipState !== null) { - this.membershipState = Thrift.getValue("SquareMembershipState", args.membershipState); - } - if (args.role !== undefined && args.role !== null) { - this.role = Thrift.getValue("SquareMemberRole", args.role); - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.preference !== undefined && args.preference !== null) { - this.preference = new lineType.SquarePreference(args.preference); - } - if (args.joinMessage !== undefined && args.joinMessage !== null) { - this.joinMessage = args.joinMessage; - } - } - } -}; -lineType.SquareMemberRelation = class { - constructor(args) { - this.state = null; - this.revision = null; - if (args) { - if (args.state !== undefined && args.state !== null) { - this.state = args.state; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - } - } -}; -lineType.SquareFeature = class { - constructor(args) { - this.controlState = null; - this.booleanValue = null; - if (args) { - if (args.controlState !== undefined && args.controlState !== null) { - this.controlState = args.controlState; - } - if (args.booleanValue !== undefined && args.booleanValue !== null) { - this.booleanValue = args.booleanValue; - } - } - } -}; -lineType.SquareFeatureSet = class { - constructor(args) { - this.squareMid = null; - this.revision = null; - this.creatingSecretSquareChat = null; - this.invitingIntoOpenSquareChat = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.creatingSecretSquareChat !== undefined && args.creatingSecretSquareChat !== null) { - this.creatingSecretSquareChat = new lineType.SquareFeature(args.creatingSecretSquareChat); - } - if (args.invitingIntoOpenSquareChat !== undefined && args.invitingIntoOpenSquareChat !== null) { - this.invitingIntoOpenSquareChat = new lineType.SquareFeature(args.invitingIntoOpenSquareChat); - } - } - } -}; -lineType.SquareStatus = class { - constructor(args) { - this.memberCount = null; - this.joinRequestCount = null; - this.lastJoinRequestAt = null; - this.openChatCount = null; - if (args) { - if (args.memberCount !== undefined && args.memberCount !== null) { - this.memberCount = args.memberCount; - } - if (args.joinRequestCount !== undefined && args.joinRequestCount !== null) { - this.joinRequestCount = args.joinRequestCount; - } - if (args.lastJoinRequestAt !== undefined && args.lastJoinRequestAt !== null) { - this.lastJoinRequestAt = args.lastJoinRequestAt; - } - if (args.openChatCount !== undefined && args.openChatCount !== null) { - this.openChatCount = args.openChatCount; - } - } - } -}; -lineType.SquareChat = class { - constructor(args) { - this.squareChatMid = null; - this.squareMid = null; - this.type = null; - this.name = null; - this.chatImageObsHash = null; - this.squareChatRevision = null; - this.maxMemberCount = null; - this.state = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - if (args.chatImageObsHash !== undefined && args.chatImageObsHash !== null) { - this.chatImageObsHash = args.chatImageObsHash; - } - if (args.squareChatRevision !== undefined && args.squareChatRevision !== null) { - this.squareChatRevision = args.squareChatRevision; - } - if (args.maxMemberCount !== undefined && args.maxMemberCount !== null) { - this.maxMemberCount = args.maxMemberCount; - } - if (args.state !== undefined && args.state !== null) { - this.state = args.state; - } - } - } -}; -lineType.NoteStatus = class { - constructor(args) { - this.noteCount = null; - this.latestCreatedAt = null; - if (args) { - if (args.noteCount !== undefined && args.noteCount !== null) { - this.noteCount = args.noteCount; - } - if (args.latestCreatedAt !== undefined && args.latestCreatedAt !== null) { - this.latestCreatedAt = args.latestCreatedAt; - } - } - } -}; -lineType.SquareInfo = class { - constructor(args) { - this.square = null; - this.squareStatus = null; - this.squareNoteStatus = null; - if (args) { - if (args.square !== undefined && args.square !== null) { - this.square = new lineType.Square(args.square); - } - if (args.squareStatus !== undefined && args.squareStatus !== null) { - this.squareStatus = new lineType.SquareStatus(args.squareStatus); - } - if (args.squareNoteStatus !== undefined && args.squareNoteStatus !== null) { - this.squareNoteStatus = new lineType.NoteStatus(args.squareNoteStatus); - } - } - } -}; -lineType.BotUseInfo = class { - constructor(args) { - this.botUseAgreementAccepted = null; - this.botInFriends = null; - this.primaryApplication = null; - this.locale = null; - if (args) { - if (args.botUseAgreementAccepted !== undefined && args.botUseAgreementAccepted !== null) { - this.botUseAgreementAccepted = args.botUseAgreementAccepted; - } - if (args.botInFriends !== undefined && args.botInFriends !== null) { - this.botInFriends = args.botInFriends; - } - if (args.primaryApplication !== undefined && args.primaryApplication !== null) { - this.primaryApplication = args.primaryApplication; - } - if (args.locale !== undefined && args.locale !== null) { - this.locale = args.locale; - } - } - } -}; -lineType.PaidCallAdCountry = class { - constructor(args) { - this.countryCode = null; - this.rateDivision = null; - if (args) { - if (args.countryCode !== undefined && args.countryCode !== null) { - this.countryCode = args.countryCode; - } - if (args.rateDivision !== undefined && args.rateDivision !== null) { - this.rateDivision = args.rateDivision; - } - } - } -}; -lineType.PaidCallAdResult = class { - constructor(args) { - this.adRemains = null; - if (args) { - if (args.adRemains !== undefined && args.adRemains !== null) { - this.adRemains = args.adRemains; - } - } - } -}; -lineType.PaidCallBalance = class { - constructor(args) { - this.productType = null; - this.productName = null; - this.unit = null; - this.limitedPaidBalance = null; - this.limitedFreeBalance = null; - this.unlimitedPaidBalance = null; - this.unlimitedFreeBalance = null; - this.startTime = null; - this.endTime = null; - this.autopayEnabled = null; - if (args) { - if (args.productType !== undefined && args.productType !== null) { - this.productType = args.productType; - } - if (args.productName !== undefined && args.productName !== null) { - this.productName = args.productName; - } - if (args.unit !== undefined && args.unit !== null) { - this.unit = args.unit; - } - if (args.limitedPaidBalance !== undefined && args.limitedPaidBalance !== null) { - this.limitedPaidBalance = args.limitedPaidBalance; - } - if (args.limitedFreeBalance !== undefined && args.limitedFreeBalance !== null) { - this.limitedFreeBalance = args.limitedFreeBalance; - } - if (args.unlimitedPaidBalance !== undefined && args.unlimitedPaidBalance !== null) { - this.unlimitedPaidBalance = args.unlimitedPaidBalance; - } - if (args.unlimitedFreeBalance !== undefined && args.unlimitedFreeBalance !== null) { - this.unlimitedFreeBalance = args.unlimitedFreeBalance; - } - if (args.startTime !== undefined && args.startTime !== null) { - this.startTime = args.startTime; - } - if (args.endTime !== undefined && args.endTime !== null) { - this.endTime = args.endTime; - } - if (args.autopayEnabled !== undefined && args.autopayEnabled !== null) { - this.autopayEnabled = args.autopayEnabled; - } - } - } -}; -lineType.PaidCallCurrencyExchangeRate = class { - constructor(args) { - this.currencyCode = null; - this.currencyName = null; - this.currencySign = null; - this.preferred = null; - this.coinRate = null; - this.creditRate = null; - if (args) { - if (args.currencyCode !== undefined && args.currencyCode !== null) { - this.currencyCode = args.currencyCode; - } - if (args.currencyName !== undefined && args.currencyName !== null) { - this.currencyName = args.currencyName; - } - if (args.currencySign !== undefined && args.currencySign !== null) { - this.currencySign = args.currencySign; - } - if (args.preferred !== undefined && args.preferred !== null) { - this.preferred = args.preferred; - } - if (args.coinRate !== undefined && args.coinRate !== null) { - this.coinRate = args.coinRate; - } - if (args.creditRate !== undefined && args.creditRate !== null) { - this.creditRate = args.creditRate; - } - } - } -}; -lineType.ExtendedProfileBirthday = class { - constructor(args) { - this.year = null; - this.yearPrivacyLevelType = null; - this.yearEnabled = null; - this.day = null; - this.dayPrivacyLevelType = null; - this.dayEnabled = null; - if (args) { - if (args.year !== undefined && args.year !== null) { - this.year = args.year; - } - if (args.yearPrivacyLevelType !== undefined && args.yearPrivacyLevelType !== null) { - this.yearPrivacyLevelType = args.yearPrivacyLevelType; - } - if (args.yearEnabled !== undefined && args.yearEnabled !== null) { - this.yearEnabled = args.yearEnabled; - } - if (args.day !== undefined && args.day !== null) { - this.day = args.day; - } - if (args.dayPrivacyLevelType !== undefined && args.dayPrivacyLevelType !== null) { - this.dayPrivacyLevelType = args.dayPrivacyLevelType; - } - if (args.dayEnabled !== undefined && args.dayEnabled !== null) { - this.dayEnabled = args.dayEnabled; - } - } - } -}; -lineType.ExtendedProfile = class { - constructor(args) { - this.birthday = null; - if (args) { - if (args.birthday !== undefined && args.birthday !== null) { - this.birthday = new lineType.ExtendedProfileBirthday(args.birthday); - } - } - } -}; -lineType.PaidCallDialing = class { - constructor(args) { - this.type = null; - this.dialedNumber = null; - this.serviceDomain = null; - this.productType = null; - this.productName = null; - this.multipleProduct = null; - this.callerIdStatus = null; - this.balance = null; - this.unit = null; - this.rate = null; - this.displayCode = null; - this.calledNumber = null; - this.calleeNationalNumber = null; - this.calleeCallingCode = null; - this.rateDivision = null; - this.adMaxMin = null; - this.adRemains = null; - this.adSessionId = null; - if (args) { - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.dialedNumber !== undefined && args.dialedNumber !== null) { - this.dialedNumber = args.dialedNumber; - } - if (args.serviceDomain !== undefined && args.serviceDomain !== null) { - this.serviceDomain = args.serviceDomain; - } - if (args.productType !== undefined && args.productType !== null) { - this.productType = args.productType; - } - if (args.productName !== undefined && args.productName !== null) { - this.productName = args.productName; - } - if (args.multipleProduct !== undefined && args.multipleProduct !== null) { - this.multipleProduct = args.multipleProduct; - } - if (args.callerIdStatus !== undefined && args.callerIdStatus !== null) { - this.callerIdStatus = args.callerIdStatus; - } - if (args.balance !== undefined && args.balance !== null) { - this.balance = args.balance; - } - if (args.unit !== undefined && args.unit !== null) { - this.unit = args.unit; - } - if (args.rate !== undefined && args.rate !== null) { - this.rate = args.rate; - } - if (args.displayCode !== undefined && args.displayCode !== null) { - this.displayCode = args.displayCode; - } - if (args.calledNumber !== undefined && args.calledNumber !== null) { - this.calledNumber = args.calledNumber; - } - if (args.calleeNationalNumber !== undefined && args.calleeNationalNumber !== null) { - this.calleeNationalNumber = args.calleeNationalNumber; - } - if (args.calleeCallingCode !== undefined && args.calleeCallingCode !== null) { - this.calleeCallingCode = args.calleeCallingCode; - } - if (args.rateDivision !== undefined && args.rateDivision !== null) { - this.rateDivision = args.rateDivision; - } - if (args.adMaxMin !== undefined && args.adMaxMin !== null) { - this.adMaxMin = args.adMaxMin; - } - if (args.adRemains !== undefined && args.adRemains !== null) { - this.adRemains = args.adRemains; - } - if (args.adSessionId !== undefined && args.adSessionId !== null) { - this.adSessionId = args.adSessionId; - } - } - } -}; -lineType.SpotItem = class { - constructor(args) { - this.name = null; - this.phone = null; - this.category = null; - this.mid = null; - this.countryAreaCode = null; - this.freePhoneCallable = null; - if (args) { - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - if (args.phone !== undefined && args.phone !== null) { - this.phone = args.phone; - } - if (args.category !== undefined && args.category !== null) { - this.category = args.category; - } - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.countryAreaCode !== undefined && args.countryAreaCode !== null) { - this.countryAreaCode = args.countryAreaCode; - } - if (args.freePhoneCallable !== undefined && args.freePhoneCallable !== null) { - this.freePhoneCallable = args.freePhoneCallable; - } - } - } -}; -lineType.SpotNearbyItem = class { - constructor(args) { - this.spotItem = null; - this.location = null; - if (args) { - if (args.spotItem !== undefined && args.spotItem !== null) { - this.spotItem = new lineType.SpotItem(args.spotItem); - } - if (args.location !== undefined && args.location !== null) { - this.location = new lineType.Location(args.location); - } - } - } -}; -lineType.SpotNearbyResponse = class { - constructor(args) { - this.spotNearbyItems = null; - if (args) { - if (args.spotNearbyItems !== undefined && args.spotNearbyItems !== null) { - this.spotNearbyItems = Thrift.copyList(args.spotNearbyItems, [lineType.SpotNearbyItem]); - } - } - } -}; -lineType.SpotPhoneNumberResponse = class { - constructor(args) { - this.spotItems = null; - if (args) { - if (args.spotItems !== undefined && args.spotItems !== null) { - this.spotItems = Thrift.copyList(args.spotItems, [lineType.SpotItem]); - } - } - } -}; -lineType.PaidCallHistory = class { - constructor(args) { - this.seq = null; - this.type = null; - this.dialedNumber = null; - this.calledNumber = null; - this.toMid = null; - this.toName = null; - this.setupTime = null; - this.startTime = null; - this.endTime = null; - this.duration = null; - this.terminate = null; - this.productType = null; - this.charge = null; - this.unit = null; - this.result = null; - if (args) { - if (args.seq !== undefined && args.seq !== null) { - this.seq = args.seq; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.dialedNumber !== undefined && args.dialedNumber !== null) { - this.dialedNumber = args.dialedNumber; - } - if (args.calledNumber !== undefined && args.calledNumber !== null) { - this.calledNumber = args.calledNumber; - } - if (args.toMid !== undefined && args.toMid !== null) { - this.toMid = args.toMid; - } - if (args.toName !== undefined && args.toName !== null) { - this.toName = args.toName; - } - if (args.setupTime !== undefined && args.setupTime !== null) { - this.setupTime = args.setupTime; - } - if (args.startTime !== undefined && args.startTime !== null) { - this.startTime = args.startTime; - } - if (args.endTime !== undefined && args.endTime !== null) { - this.endTime = args.endTime; - } - if (args.duration !== undefined && args.duration !== null) { - this.duration = args.duration; - } - if (args.terminate !== undefined && args.terminate !== null) { - this.terminate = args.terminate; - } - if (args.productType !== undefined && args.productType !== null) { - this.productType = args.productType; - } - if (args.charge !== undefined && args.charge !== null) { - this.charge = args.charge; - } - if (args.unit !== undefined && args.unit !== null) { - this.unit = args.unit; - } - if (args.result !== undefined && args.result !== null) { - this.result = args.result; - } - } - } -}; -lineType.PaidCallHistoryResult = class { - constructor(args) { - this.historys = null; - this.hasNext = null; - if (args) { - if (args.historys !== undefined && args.historys !== null) { - this.historys = Thrift.copyList(args.historys, [lineType.PaidCallHistory]); - } - if (args.hasNext !== undefined && args.hasNext !== null) { - this.hasNext = args.hasNext; - } - } - } -}; -lineType.PaidCallMetadataResult = class { - constructor(args) { - this.currencyExchangeRates = null; - this.recommendedCountryCodes = null; - this.adCountries = null; - if (args) { - if (args.currencyExchangeRates !== undefined && args.currencyExchangeRates !== null) { - this.currencyExchangeRates = Thrift.copyList(args.currencyExchangeRates, [ - lineType.PaidCallCurrencyExchangeRate, - ]); - } - if (args.recommendedCountryCodes !== undefined && args.recommendedCountryCodes !== null) { - this.recommendedCountryCodes = Thrift.copyList(args.recommendedCountryCodes, [null]); - } - if (args.adCountries !== undefined && args.adCountries !== null) { - this.adCountries = Thrift.copyList(args.adCountries, [lineType.PaidCallAdCountry]); - } - } - } -}; -lineType.PaidCallRedeemResult = class { - constructor(args) { - this.eventName = null; - this.eventAmount = null; - if (args) { - if (args.eventName !== undefined && args.eventName !== null) { - this.eventName = args.eventName; - } - if (args.eventAmount !== undefined && args.eventAmount !== null) { - this.eventAmount = args.eventAmount; - } - } - } -}; -lineType.PaidCallResponse = class { - constructor(args) { - this.host = null; - this.dialing = null; - this.token = null; - this.spotItems = null; - if (args) { - if (args.host !== undefined && args.host !== null) { - this.host = new lineType.CallHost(args.host); - } - if (args.dialing !== undefined && args.dialing !== null) { - this.dialing = new lineType.PaidCallDialing(args.dialing); - } - if (args.token !== undefined && args.token !== null) { - this.token = args.token; - } - if (args.spotItems !== undefined && args.spotItems !== null) { - this.spotItems = Thrift.copyList(args.spotItems, [lineType.SpotItem]); - } - } - } -}; -lineType.PaidCallUserRate = class { - constructor(args) { - this.countryCode = null; - this.rate = null; - this.rateDivision = null; - this.rateName = null; - if (args) { - if (args.countryCode !== undefined && args.countryCode !== null) { - this.countryCode = args.countryCode; - } - if (args.rate !== undefined && args.rate !== null) { - this.rate = args.rate; - } - if (args.rateDivision !== undefined && args.rateDivision !== null) { - this.rateDivision = args.rateDivision; - } - if (args.rateName !== undefined && args.rateName !== null) { - this.rateName = args.rateName; - } - } - } -}; -lineType.ChannelInfo = class { - constructor(args) { - this.channelId = null; - this.name = null; - this.entryPageUrl = null; - this.descriptionText = null; - this.provider = null; - this.publicType = null; - this.iconImage = null; - this.permissions = null; - this.iconThumbnailImage = null; - this.channelConfigurations = null; - this.lcsAllApiUsable = null; - this.allowedPermissions = null; - this.channelDomains = null; - this.updatedTimestamp = null; - if (args) { - if (args.channelId !== undefined && args.channelId !== null) { - this.channelId = args.channelId; - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - if (args.entryPageUrl !== undefined && args.entryPageUrl !== null) { - this.entryPageUrl = args.entryPageUrl; - } - if (args.descriptionText !== undefined && args.descriptionText !== null) { - this.descriptionText = args.descriptionText; - } - if (args.provider !== undefined && args.provider !== null) { - this.provider = new lineType.ChannelProvider(args.provider); - } - if (args.publicType !== undefined && args.publicType !== null) { - this.publicType = args.publicType; - } - if (args.iconImage !== undefined && args.iconImage !== null) { - this.iconImage = args.iconImage; - } - if (args.permissions !== undefined && args.permissions !== null) { - this.permissions = Thrift.copyList(args.permissions, [null]); - } - if (args.iconThumbnailImage !== undefined && args.iconThumbnailImage !== null) { - this.iconThumbnailImage = args.iconThumbnailImage; - } - if (args.channelConfigurations !== undefined && args.channelConfigurations !== null) { - this.channelConfigurations = Thrift.copyList(args.channelConfigurations, [null]); - } - if (args.lcsAllApiUsable !== undefined && args.lcsAllApiUsable !== null) { - this.lcsAllApiUsable = args.lcsAllApiUsable; - } - if (args.allowedPermissions !== undefined && args.allowedPermissions !== null) { - this.allowedPermissions = Thrift.copyList(args.allowedPermissions, [null]); - } - if (args.channelDomains !== undefined && args.channelDomains !== null) { - this.channelDomains = Thrift.copyList(args.channelDomains, [lineType.ChannelDomain]); - } - if (args.updatedTimestamp !== undefined && args.updatedTimestamp !== null) { - this.updatedTimestamp = args.updatedTimestamp; - } - } - } -}; -lineType.ApprovedChannelInfo = class { - constructor(args) { - this.channelInfo = null; - this.approvedAt = null; - if (args) { - if (args.channelInfo !== undefined && args.channelInfo !== null) { - this.channelInfo = new lineType.ChannelInfo(args.channelInfo); - } - if (args.approvedAt !== undefined && args.approvedAt !== null) { - this.approvedAt = args.approvedAt; - } - } - } -}; -lineType.ApprovedChannelInfos = class { - constructor(args) { - this.approvedChannelInfos = null; - this.revision = null; - if (args) { - if (args.approvedChannelInfos !== undefined && args.approvedChannelInfos !== null) { - this.approvedChannelInfos = Thrift.copyList(args.approvedChannelInfos, [lineType.ApprovedChannelInfo]); - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - } - } -}; -lineType.AuthQrcode = class { - constructor(args) { - this.qrcode = null; - this.verifier = null; - this.callbackUrl = null; - if (args) { - if (args.qrcode !== undefined && args.qrcode !== null) { - this.qrcode = args.qrcode; - } - if (args.verifier !== undefined && args.verifier !== null) { - this.verifier = args.verifier; - } - if (args.callbackUrl !== undefined && args.callbackUrl !== null) { - this.callbackUrl = args.callbackUrl; - } - } - } -}; -lineType.AnalyticsInfo = class { - constructor(args) { - this.gaSamplingRate = null; - this.tmid = null; - if (args) { - if (args.gaSamplingRate !== undefined && args.gaSamplingRate !== null) { - this.gaSamplingRate = args.gaSamplingRate; - } - if (args.tmid !== undefined && args.tmid !== null) { - this.tmid = args.tmid; - } - } - } -}; -lineType.ContactTransition = class { - constructor(args) { - this.ownerMid = null; - this.targetMid = null; - this.previousStatus = null; - this.resultStatus = null; - if (args) { - if (args.ownerMid !== undefined && args.ownerMid !== null) { - this.ownerMid = args.ownerMid; - } - if (args.targetMid !== undefined && args.targetMid !== null) { - this.targetMid = args.targetMid; - } - if (args.previousStatus !== undefined && args.previousStatus !== null) { - this.previousStatus = args.previousStatus; - } - if (args.resultStatus !== undefined && args.resultStatus !== null) { - this.resultStatus = args.resultStatus; - } - } - } -}; -lineType.UserTicketResponse = class { - constructor(args) { - this.mid = null; - this.userTicket = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.userTicket !== undefined && args.userTicket !== null) { - this.userTicket = args.userTicket; - } - } - } -}; -lineType.BuddyBanner = class { - constructor(args) { - this.buddyBannerLinkType = null; - this.buddyBannerLink = null; - this.buddyBannerImageUrl = null; - if (args) { - if (args.buddyBannerLinkType !== undefined && args.buddyBannerLinkType !== null) { - this.buddyBannerLinkType = args.buddyBannerLinkType; - } - if (args.buddyBannerLink !== undefined && args.buddyBannerLink !== null) { - this.buddyBannerLink = args.buddyBannerLink; - } - if (args.buddyBannerImageUrl !== undefined && args.buddyBannerImageUrl !== null) { - this.buddyBannerImageUrl = args.buddyBannerImageUrl; - } - } - } -}; -lineType.BuddyDetail = class { - constructor(args) { - this.mid = null; - this.memberCount = null; - this.onAir = null; - this.businessAccount = null; - this.addable = null; - this.acceptableContenlineType = null; - this.capableMyhome = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.memberCount !== undefined && args.memberCount !== null) { - this.memberCount = args.memberCount; - } - if (args.onAir !== undefined && args.onAir !== null) { - this.onAir = args.onAir; - } - if (args.businessAccount !== undefined && args.businessAccount !== null) { - this.businessAccount = args.businessAccount; - } - if (args.addable !== undefined && args.addable !== null) { - this.addable = args.addable; - } - if (args.acceptableContenlineType !== undefined && args.acceptableContenlineType !== null) { - this.acceptableContenlineType = Thrift.copyList(args.acceptableContenlineType, [null]); - } - if (args.capableMyhome !== undefined && args.capableMyhome !== null) { - this.capableMyhome = args.capableMyhome; - } - } - } -}; -lineType.Contact = class { - constructor(args) { - this.mid = null; - this.createdTime = null; - this.type = null; - this.status = null; - this.relation = null; - this.displayName = null; - this.phoneticName = null; - this.pictureStatus = null; - this.thumbnailUrl = null; - this.statusMessage = null; - this.displayNameOverridden = null; - this.favoriteTime = null; - this.capableVoiceCall = null; - this.capableVideoCall = null; - this.capableMyhome = null; - this.capableBuddy = null; - this.attributes = null; - this.settings = null; - this.picturePath = null; - this.recommendParams = null; - this.friendRequestStatus = null; - this.musicProfile = null; - this.videoProfile = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.status !== undefined && args.status !== null) { - this.status = args.status; - } - if (args.relation !== undefined && args.relation !== null) { - this.relation = args.relation; - } - if (args.displayName !== undefined && args.displayName !== null) { - this.displayName = args.displayName; - } - if (args.phoneticName !== undefined && args.phoneticName !== null) { - this.phoneticName = args.phoneticName; - } - if (args.pictureStatus !== undefined && args.pictureStatus !== null) { - this.pictureStatus = args.pictureStatus; - } - if (args.thumbnailUrl !== undefined && args.thumbnailUrl !== null) { - this.thumbnailUrl = args.thumbnailUrl; - } - if (args.statusMessage !== undefined && args.statusMessage !== null) { - this.statusMessage = args.statusMessage; - } - if (args.displayNameOverridden !== undefined && args.displayNameOverridden !== null) { - this.displayNameOverridden = args.displayNameOverridden; - } - if (args.favoriteTime !== undefined && args.favoriteTime !== null) { - this.favoriteTime = args.favoriteTime; - } - if (args.capableVoiceCall !== undefined && args.capableVoiceCall !== null) { - this.capableVoiceCall = args.capableVoiceCall; - } - if (args.capableVideoCall !== undefined && args.capableVideoCall !== null) { - this.capableVideoCall = args.capableVideoCall; - } - if (args.capableMyhome !== undefined && args.capableMyhome !== null) { - this.capableMyhome = args.capableMyhome; - } - if (args.capableBuddy !== undefined && args.capableBuddy !== null) { - this.capableBuddy = args.capableBuddy; - } - if (args.attributes !== undefined && args.attributes !== null) { - this.attributes = args.attributes; - } - if (args.settings !== undefined && args.settings !== null) { - this.settings = args.settings; - } - if (args.picturePath !== undefined && args.picturePath !== null) { - this.picturePath = args.picturePath; - } - if (args.recommendParams !== undefined && args.recommendParams !== null) { - this.recommendParams = args.recommendParams; - } - if (args.friendRequestStatus !== undefined && args.friendRequestStatus !== null) { - this.friendRequestStatus = args.friendRequestStatus; - } - if (args.musicProfile !== undefined && args.musicProfile !== null) { - this.musicProfile = args.musicProfile; - } - if (args.videoProfile !== undefined && args.videoProfile !== null) { - this.videoProfile = args.videoProfile; - } - } - } -}; -lineType.BuddyList = class { - constructor(args) { - this.classification = null; - this.displayName = null; - this.totalBuddyCount = null; - this.popularContacts = null; - if (args) { - if (args.classification !== undefined && args.classification !== null) { - this.classification = args.classification; - } - if (args.displayName !== undefined && args.displayName !== null) { - this.displayName = args.displayName; - } - if (args.totalBuddyCount !== undefined && args.totalBuddyCount !== null) { - this.totalBuddyCount = args.totalBuddyCount; - } - if (args.popularContacts !== undefined && args.popularContacts !== null) { - this.popularContacts = Thrift.copyList(args.popularContacts, [lineType.Contact]); - } - } - } -}; -lineType.RegisterWithPhoneNumberResult = class { - constructor(args) { - this.authToken = null; - this.recommendEmailRegistration = null; - this.certificate = null; - if (args) { - if (args.authToken !== undefined && args.authToken !== null) { - this.authToken = args.authToken; - } - if (args.recommendEmailRegistration !== undefined && args.recommendEmailRegistration !== null) { - this.recommendEmailRegistration = args.recommendEmailRegistration; - } - if (args.certificate !== undefined && args.certificate !== null) { - this.certificate = args.certificate; - } - } - } -}; -lineType.BuddyMessageRequest = class { - constructor(args) { - this.contentType = null; - this.text = null; - this.location = null; - this.content = null; - this.contentMetadata = null; - if (args) { - if (args.contentType !== undefined && args.contentType !== null) { - this.contentType = args.contentType; - } - if (args.text !== undefined && args.text !== null) { - this.text = args.text; - } - if (args.location !== undefined && args.location !== null) { - this.location = new lineType.Location(args.location); - } - if (args.content !== undefined && args.content !== null) { - this.content = args.content; - } - if (args.contentMetadata !== undefined && args.contentMetadata !== null) { - this.contentMetadata = Thrift.copyMap(args.contentMetadata, [null]); - } - } - } -}; -lineType.BuddyOnAirUrls = class { - constructor(args) { - this.hls = null; - this.smoothStreaming = null; - if (args) { - if (args.hls !== undefined && args.hls !== null) { - this.hls = Thrift.copyMap(args.hls, [null]); - } - if (args.smoothStreaming !== undefined && args.smoothStreaming !== null) { - this.smoothStreaming = Thrift.copyMap(args.smoothStreaming, [null]); - } - } - } -}; -lineType.BuddyOnAir = class { - constructor(args) { - this.mid = null; - this.freshnessLifetime = null; - this.onAirId = null; - this.onAir = null; - this.text = null; - this.viewerCount = null; - this.targetCount = null; - this.onAirType = null; - this.onAirUrls = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.freshnessLifetime !== undefined && args.freshnessLifetime !== null) { - this.freshnessLifetime = args.freshnessLifetime; - } - if (args.onAirId !== undefined && args.onAirId !== null) { - this.onAirId = args.onAirId; - } - if (args.onAir !== undefined && args.onAir !== null) { - this.onAir = args.onAir; - } - if (args.text !== undefined && args.text !== null) { - this.text = args.text; - } - if (args.viewerCount !== undefined && args.viewerCount !== null) { - this.viewerCount = args.viewerCount; - } - if (args.targetCount !== undefined && args.targetCount !== null) { - this.targetCount = args.targetCount; - } - if (args.onAirType !== undefined && args.onAirType !== null) { - this.onAirType = args.onAirType; - } - if (args.onAirUrls !== undefined && args.onAirUrls !== null) { - this.onAirUrls = new lineType.BuddyOnAirUrls(args.onAirUrls); - } - } - } -}; -lineType.BuddyProfile = class { - constructor(args) { - this.buddyId = null; - this.mid = null; - this.searchId = null; - this.displayName = null; - this.statusMessage = null; - this.contactCount = null; - if (args) { - if (args.buddyId !== undefined && args.buddyId !== null) { - this.buddyId = args.buddyId; - } - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.searchId !== undefined && args.searchId !== null) { - this.searchId = args.searchId; - } - if (args.displayName !== undefined && args.displayName !== null) { - this.displayName = args.displayName; - } - if (args.statusMessage !== undefined && args.statusMessage !== null) { - this.statusMessage = args.statusMessage; - } - if (args.contactCount !== undefined && args.contactCount !== null) { - this.contactCount = args.contactCount; - } - } - } -}; -lineType.CommitMessageResult = class { - constructor(args) { - this.message = null; - this.code = null; - this.reason = null; - this.successCount = null; - this.failCount = null; - this.unregisterCount = null; - this.blockCount = null; - if (args) { - if (args.message !== undefined && args.message !== null) { - this.message = new lineType.Message(args.message); - } - if (args.code !== undefined && args.code !== null) { - this.code = args.code; - } - if (args.reason !== undefined && args.reason !== null) { - this.reason = args.reason; - } - if (args.successCount !== undefined && args.successCount !== null) { - this.successCount = args.successCount; - } - if (args.failCount !== undefined && args.failCount !== null) { - this.failCount = args.failCount; - } - if (args.unregisterCount !== undefined && args.unregisterCount !== null) { - this.unregisterCount = args.unregisterCount; - } - if (args.blockCount !== undefined && args.blockCount !== null) { - this.blockCount = args.blockCount; - } - } - } -}; -lineType.BuddySearchResult = class { - constructor(args) { - this.mid = null; - this.displayName = null; - this.pictureStatus = null; - this.picturePath = null; - this.statusMessage = null; - this.businessAccount = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.displayName !== undefined && args.displayName !== null) { - this.displayName = args.displayName; - } - if (args.pictureStatus !== undefined && args.pictureStatus !== null) { - this.pictureStatus = args.pictureStatus; - } - if (args.picturePath !== undefined && args.picturePath !== null) { - this.picturePath = args.picturePath; - } - if (args.statusMessage !== undefined && args.statusMessage !== null) { - this.statusMessage = args.statusMessage; - } - if (args.businessAccount !== undefined && args.businessAccount !== null) { - this.businessAccount = args.businessAccount; - } - } - } -}; -lineType.SyncParamMid = class { - constructor(args) { - this.mid = null; - this.diff = null; - this.revision = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.diff !== undefined && args.diff !== null) { - this.diff = args.diff; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - } - } -}; -lineType.SIMInfo = class { - constructor(args) { - this.phoneNumber = null; - this.countryCode = null; - if (args) { - if (args.phoneNumber !== undefined && args.phoneNumber !== null) { - this.phoneNumber = args.phoneNumber; - } - if (args.countryCode !== undefined && args.countryCode !== null) { - this.countryCode = args.countryCode; - } - } - } -}; -lineType.SyncParamContact = class { - constructor(args) { - this.syncParamMid = null; - this.contactStatus = null; - if (args) { - if (args.syncParamMid !== undefined && args.syncParamMid !== null) { - this.syncParamMid = new lineType.SyncParamMid(args.syncParamMid); - } - if (args.contactStatus !== undefined && args.contactStatus !== null) { - this.contactStatus = args.contactStatus; - } - } - } -}; -lineType.ChannelDomains = class { - constructor(args) { - this.channelDomains = null; - this.revision = null; - if (args) { - if (args.channelDomains !== undefined && args.channelDomains !== null) { - this.channelDomains = Thrift.copyList(args.channelDomains, [lineType.ChannelDomain]); - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - } - } -}; -lineType.ProductCategory = class { - constructor(args) { - this.productCategoryId = null; - this.title = null; - this.productCount = null; - this.newFlag = null; - if (args) { - if (args.productCategoryId !== undefined && args.productCategoryId !== null) { - this.productCategoryId = args.productCategoryId; - } - if (args.title !== undefined && args.title !== null) { - this.title = args.title; - } - if (args.productCount !== undefined && args.productCount !== null) { - this.productCount = args.productCount; - } - if (args.newFlag !== undefined && args.newFlag !== null) { - this.newFlag = args.newFlag; - } - } - } -}; -lineType.ChannelInfos = class { - constructor(args) { - this.channelInfos = null; - this.revision = null; - if (args) { - if (args.channelInfos !== undefined && args.channelInfos !== null) { - this.channelInfos = Thrift.copyList(args.channelInfos, [lineType.ChannelInfo]); - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - } - } -}; -lineType.ChannelNotificationSetting = class { - constructor(args) { - this.channelId = null; - this.name = null; - this.notificationReceivable = null; - this.messageReceivable = null; - this.showDefault = null; - if (args) { - if (args.channelId !== undefined && args.channelId !== null) { - this.channelId = args.channelId; - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - if (args.notificationReceivable !== undefined && args.notificationReceivable !== null) { - this.notificationReceivable = args.notificationReceivable; - } - if (args.messageReceivable !== undefined && args.messageReceivable !== null) { - this.messageReceivable = args.messageReceivable; - } - if (args.showDefault !== undefined && args.showDefault !== null) { - this.showDefault = args.showDefault; - } - } - } -}; -lineType.ChannelSyncDatas = class { - constructor(args) { - this.channelInfos = null; - this.channelDomains = null; - this.revision = null; - this.expires = null; - if (args) { - if (args.channelInfos !== undefined && args.channelInfos !== null) { - this.channelInfos = Thrift.copyList(args.channelInfos, [lineType.ChannelInfo]); - } - if (args.channelDomains !== undefined && args.channelDomains !== null) { - this.channelDomains = Thrift.copyList(args.channelDomains, [lineType.ChannelDomain]); - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.expires !== undefined && args.expires !== null) { - this.expires = args.expires; - } - } - } -}; -lineType.NotiCenterEventData = class { - constructor(args) { - this.id = null; - this.to = null; - this.from_ = null; - this.toChannel = null; - this.fromChannel = null; - this.eventType = null; - this.createdTime = null; - this.operationRevision = null; - this.content = null; - this.push = null; - if (args) { - if (args.id !== undefined && args.id !== null) { - this.id = args.id; - } - if (args.to !== undefined && args.to !== null) { - this.to = args.to; - } - if (args.from_ !== undefined && args.from_ !== null) { - this.from_ = args.from_; - } - if (args.toChannel !== undefined && args.toChannel !== null) { - this.toChannel = args.toChannel; - } - if (args.fromChannel !== undefined && args.fromChannel !== null) { - this.fromChannel = args.fromChannel; - } - if (args.eventType !== undefined && args.eventType !== null) { - this.eventType = args.eventType; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.operationRevision !== undefined && args.operationRevision !== null) { - this.operationRevision = args.operationRevision; - } - if (args.content !== undefined && args.content !== null) { - this.content = Thrift.copyMap(args.content, [null]); - } - if (args.push !== undefined && args.push !== null) { - this.push = Thrift.copyMap(args.push, [null]); - } - } - } -}; -lineType.ChannelToken = class { - constructor(args) { - this.token = null; - this.obsToken = null; - this.expiration = null; - this.refreshToken = null; - this.channelAccessToken = null; - if (args) { - if (args.token !== undefined && args.token !== null) { - this.token = args.token; - } - if (args.obsToken !== undefined && args.obsToken !== null) { - this.obsToken = args.obsToken; - } - if (args.expiration !== undefined && args.expiration !== null) { - this.expiration = args.expiration; - } - if (args.refreshToken !== undefined && args.refreshToken !== null) { - this.refreshToken = args.refreshToken; - } - if (args.channelAccessToken !== undefined && args.channelAccessToken !== null) { - this.channelAccessToken = args.channelAccessToken; - } - } - } -}; -lineType.ChannelSettings = class { - constructor(args) { - this.unapprovedMessageReceivable = null; - if (args) { - if (args.unapprovedMessageReceivable !== undefined && args.unapprovedMessageReceivable !== null) { - this.unapprovedMessageReceivable = args.unapprovedMessageReceivable; - } - } - } -}; -lineType.ChannelIdWithLastUpdated = class { - constructor(args) { - this.channelId = null; - this.lastUpdated = null; - if (args) { - if (args.channelId !== undefined && args.channelId !== null) { - this.channelId = args.channelId; - } - if (args.lastUpdated !== undefined && args.lastUpdated !== null) { - this.lastUpdated = args.lastUpdated; - } - } - } -}; -lineType.Coin = class { - constructor(args) { - this.freeCoinBalance = null; - this.payedCoinBalance = null; - this.totalCoinBalance = null; - this.rewardCoinBalance = null; - if (args) { - if (args.freeCoinBalance !== undefined && args.freeCoinBalance !== null) { - this.freeCoinBalance = args.freeCoinBalance; - } - if (args.payedCoinBalance !== undefined && args.payedCoinBalance !== null) { - this.payedCoinBalance = args.payedCoinBalance; - } - if (args.totalCoinBalance !== undefined && args.totalCoinBalance !== null) { - this.totalCoinBalance = args.totalCoinBalance; - } - if (args.rewardCoinBalance !== undefined && args.rewardCoinBalance !== null) { - this.rewardCoinBalance = args.rewardCoinBalance; - } - } - } -}; -lineType.CoinPayLoad = class { - constructor(args) { - this.payCoin = null; - this.freeCoin = null; - this.type = null; - this.rewardCoin = null; - if (args) { - if (args.payCoin !== undefined && args.payCoin !== null) { - this.payCoin = args.payCoin; - } - if (args.freeCoin !== undefined && args.freeCoin !== null) { - this.freeCoin = args.freeCoin; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.rewardCoin !== undefined && args.rewardCoin !== null) { - this.rewardCoin = args.rewardCoin; - } - } - } -}; -lineType.CoinHistory = class { - constructor(args) { - this.payDate = null; - this.coinBalance = null; - this.coin = null; - this.price = null; - this.title = null; - this.refund = null; - this.paySeq = null; - this.currency = null; - this.currencySign = null; - this.displayPrice = null; - this.payload = null; - this.channelId = null; - if (args) { - if (args.payDate !== undefined && args.payDate !== null) { - this.payDate = args.payDate; - } - if (args.coinBalance !== undefined && args.coinBalance !== null) { - this.coinBalance = args.coinBalance; - } - if (args.coin !== undefined && args.coin !== null) { - this.coin = args.coin; - } - if (args.price !== undefined && args.price !== null) { - this.price = args.price; - } - if (args.title !== undefined && args.title !== null) { - this.title = args.title; - } - if (args.refund !== undefined && args.refund !== null) { - this.refund = args.refund; - } - if (args.paySeq !== undefined && args.paySeq !== null) { - this.paySeq = args.paySeq; - } - if (args.currency !== undefined && args.currency !== null) { - this.currency = args.currency; - } - if (args.currencySign !== undefined && args.currencySign !== null) { - this.currencySign = args.currencySign; - } - if (args.displayPrice !== undefined && args.displayPrice !== null) { - this.displayPrice = args.displayPrice; - } - if (args.payload !== undefined && args.payload !== null) { - this.payload = new lineType.CoinPayLoad(args.payload); - } - if (args.channelId !== undefined && args.channelId !== null) { - this.channelId = args.channelId; - } - } - } -}; -lineType.CoinHistoryCondition = class { - constructor(args) { - this.start = null; - this.size = null; - this.language = null; - this.eddt = null; - this.appStoreCode = null; - if (args) { - if (args.start !== undefined && args.start !== null) { - this.start = args.start; - } - if (args.size !== undefined && args.size !== null) { - this.size = args.size; - } - if (args.language !== undefined && args.language !== null) { - this.language = args.language; - } - if (args.eddt !== undefined && args.eddt !== null) { - this.eddt = args.eddt; - } - if (args.appStoreCode !== undefined && args.appStoreCode !== null) { - this.appStoreCode = args.appStoreCode; - } - } - } -}; -lineType.CoinHistoryResult = class { - constructor(args) { - this.historys = null; - this.balance = null; - this.hasNext = null; - if (args) { - if (args.historys !== undefined && args.historys !== null) { - this.historys = Thrift.copyList(args.historys, [lineType.CoinHistory]); - } - if (args.balance !== undefined && args.balance !== null) { - this.balance = new lineType.Coin(args.balance); - } - if (args.hasNext !== undefined && args.hasNext !== null) { - this.hasNext = args.hasNext; - } - } - } -}; -lineType.CoinProductItem = class { - constructor(args) { - this.itemId = null; - this.coin = null; - this.freeCoin = null; - this.currency = null; - this.price = null; - this.displayPrice = null; - this.name = null; - this.desc = null; - if (args) { - if (args.itemId !== undefined && args.itemId !== null) { - this.itemId = args.itemId; - } - if (args.coin !== undefined && args.coin !== null) { - this.coin = args.coin; - } - if (args.freeCoin !== undefined && args.freeCoin !== null) { - this.freeCoin = args.freeCoin; - } - if (args.currency !== undefined && args.currency !== null) { - this.currency = args.currency; - } - if (args.price !== undefined && args.price !== null) { - this.price = args.price; - } - if (args.displayPrice !== undefined && args.displayPrice !== null) { - this.displayPrice = args.displayPrice; - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - if (args.desc !== undefined && args.desc !== null) { - this.desc = args.desc; - } - } - } -}; -lineType.CoinPurchaseConfirm = class { - constructor(args) { - this.orderId = null; - this.appStoreCode = null; - this.receipt = null; - this.signature = null; - this.seller = null; - this.requestType = null; - this.ignoreReceipt = null; - if (args) { - if (args.orderId !== undefined && args.orderId !== null) { - this.orderId = args.orderId; - } - if (args.appStoreCode !== undefined && args.appStoreCode !== null) { - this.appStoreCode = args.appStoreCode; - } - if (args.receipt !== undefined && args.receipt !== null) { - this.receipt = args.receipt; - } - if (args.signature !== undefined && args.signature !== null) { - this.signature = args.signature; - } - if (args.seller !== undefined && args.seller !== null) { - this.seller = args.seller; - } - if (args.requestType !== undefined && args.requestType !== null) { - this.requestType = args.requestType; - } - if (args.ignoreReceipt !== undefined && args.ignoreReceipt !== null) { - this.ignoreReceipt = args.ignoreReceipt; - } - } - } -}; -lineType.CoinPurchaseReservation = class { - constructor(args) { - this.productId = null; - this.country = null; - this.currency = null; - this.price = null; - this.appStoreCode = null; - this.language = null; - this.pgCode = null; - this.redirectUrl = null; - if (args) { - if (args.productId !== undefined && args.productId !== null) { - this.productId = args.productId; - } - if (args.country !== undefined && args.country !== null) { - this.country = args.country; - } - if (args.currency !== undefined && args.currency !== null) { - this.currency = args.currency; - } - if (args.price !== undefined && args.price !== null) { - this.price = args.price; - } - if (args.appStoreCode !== undefined && args.appStoreCode !== null) { - this.appStoreCode = args.appStoreCode; - } - if (args.language !== undefined && args.language !== null) { - this.language = args.language; - } - if (args.pgCode !== undefined && args.pgCode !== null) { - this.pgCode = args.pgCode; - } - if (args.redirectUrl !== undefined && args.redirectUrl !== null) { - this.redirectUrl = args.redirectUrl; - } - } - } -}; -lineType.CoinUseReservationItem = class { - constructor(args) { - this.itemId = null; - this.itemName = null; - this.amount = null; - if (args) { - if (args.itemId !== undefined && args.itemId !== null) { - this.itemId = args.itemId; - } - if (args.itemName !== undefined && args.itemName !== null) { - this.itemName = args.itemName; - } - if (args.amount !== undefined && args.amount !== null) { - this.amount = args.amount; - } - } - } -}; -lineType.CoinUseReservation = class { - constructor(args) { - this.channelId = null; - this.shopOrderId = null; - this.appStoreCode = null; - this.items = null; - this.country = null; - if (args) { - if (args.channelId !== undefined && args.channelId !== null) { - this.channelId = args.channelId; - } - if (args.shopOrderId !== undefined && args.shopOrderId !== null) { - this.shopOrderId = args.shopOrderId; - } - if (args.appStoreCode !== undefined && args.appStoreCode !== null) { - this.appStoreCode = args.appStoreCode; - } - if (args.items !== undefined && args.items !== null) { - this.items = Thrift.copyList(args.items, [lineType.CoinUseReservationItem]); - } - if (args.country !== undefined && args.country !== null) { - this.country = args.country; - } - } - } -}; -lineType.CompactContact = class { - constructor(args) { - this.mid = null; - this.createdTime = null; - this.modifiedTime = null; - this.status = null; - this.settings = null; - this.displayNameOverridden = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.modifiedTime !== undefined && args.modifiedTime !== null) { - this.modifiedTime = args.modifiedTime; - } - if (args.status !== undefined && args.status !== null) { - this.status = args.status; - } - if (args.settings !== undefined && args.settings !== null) { - this.settings = args.settings; - } - if (args.displayNameOverridden !== undefined && args.displayNameOverridden !== null) { - this.displayNameOverridden = args.displayNameOverridden; - } - } - } -}; -lineType.ContactModification = class { - constructor(args) { - this.type = null; - this.luid = null; - this.phones = null; - this.emails = null; - this.userids = null; - if (args) { - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.luid !== undefined && args.luid !== null) { - this.luid = args.luid; - } - if (args.phones !== undefined && args.phones !== null) { - this.phones = Thrift.copyList(args.phones, [null]); - } - if (args.emails !== undefined && args.emails !== null) { - this.emails = Thrift.copyList(args.emails, [null]); - } - if (args.userids !== undefined && args.userids !== null) { - this.userids = Thrift.copyList(args.userids, [null]); - } - } - } -}; -lineType.ContactRegistration = class { - constructor(args) { - this.contact = null; - this.luid = null; - this.contactType = null; - this.contactKey = null; - if (args) { - if (args.contact !== undefined && args.contact !== null) { - this.contact = new lineType.Contact(args.contact); - } - if (args.luid !== undefined && args.luid !== null) { - this.luid = args.luid; - } - if (args.contactType !== undefined && args.contactType !== null) { - this.contactType = args.contactType; - } - if (args.contactKey !== undefined && args.contactKey !== null) { - this.contactKey = args.contactKey; - } - } - } -}; -lineType.ContactReport = class { - constructor(args) { - this.mid = null; - this.exists = null; - this.contact = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.exists !== undefined && args.exists !== null) { - this.exists = args.exists; - } - if (args.contact !== undefined && args.contact !== null) { - this.contact = new lineType.Contact(args.contact); - } - } - } -}; -lineType.ContactReportResult = class { - constructor(args) { - this.mid = null; - this.exists = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.exists !== undefined && args.exists !== null) { - this.exists = args.exists; - } - } - } -}; -lineType.DeviceInfo = class { - constructor(args) { - this.deviceName = null; - this.systemName = null; - this.systemVersion = null; - this.model = null; - this.carrierCode = null; - this.carrierName = null; - this.applicationType = null; - if (args) { - if (args.deviceName !== undefined && args.deviceName !== null) { - this.deviceName = args.deviceName; - } - if (args.systemName !== undefined && args.systemName !== null) { - this.systemName = args.systemName; - } - if (args.systemVersion !== undefined && args.systemVersion !== null) { - this.systemVersion = args.systemVersion; - } - if (args.model !== undefined && args.model !== null) { - this.model = args.model; - } - if (args.carrierCode !== undefined && args.carrierCode !== null) { - this.carrierCode = args.carrierCode; - } - if (args.carrierName !== undefined && args.carrierName !== null) { - this.carrierName = args.carrierName; - } - if (args.applicationType !== undefined && args.applicationType !== null) { - this.applicationType = args.applicationType; - } - } - } -}; -lineType.EmailConfirmation = class { - constructor(args) { - this.usePasswordSet = null; - this.email = null; - this.password = null; - this.ignoreDuplication = null; - if (args) { - if (args.usePasswordSet !== undefined && args.usePasswordSet !== null) { - this.usePasswordSet = args.usePasswordSet; - } - if (args.email !== undefined && args.email !== null) { - this.email = args.email; - } - if (args.password !== undefined && args.password !== null) { - this.password = args.password; - } - if (args.ignoreDuplication !== undefined && args.ignoreDuplication !== null) { - this.ignoreDuplication = args.ignoreDuplication; - } - } - } -}; -lineType.EmailConfirmationSession = class { - constructor(args) { - this.emailConfirmationType = null; - this.verifier = null; - this.targetEmail = null; - if (args) { - if (args.emailConfirmationType !== undefined && args.emailConfirmationType !== null) { - this.emailConfirmationType = args.emailConfirmationType; - } - if (args.verifier !== undefined && args.verifier !== null) { - this.verifier = args.verifier; - } - if (args.targetEmail !== undefined && args.targetEmail !== null) { - this.targetEmail = args.targetEmail; - } - } - } -}; -lineType.FriendChannelMatrix = class { - constructor(args) { - this.channelId = null; - this.representMid = null; - this.count = null; - this.point = null; - if (args) { - if (args.channelId !== undefined && args.channelId !== null) { - this.channelId = args.channelId; - } - if (args.representMid !== undefined && args.representMid !== null) { - this.representMid = args.representMid; - } - if (args.count !== undefined && args.count !== null) { - this.count = args.count; - } - if (args.point !== undefined && args.point !== null) { - this.point = args.point; - } - } - } -}; -lineType.FriendChannelMatricesResponse = class { - constructor(args) { - this.expires = null; - this.matrices = null; - if (args) { - if (args.expires !== undefined && args.expires !== null) { - this.expires = args.expires; - } - if (args.matrices !== undefined && args.matrices !== null) { - this.matrices = Thrift.copyList(args.matrices, [lineType.FriendChannelMatrix]); - } - } - } -}; -lineType.FriendRequest = class { - constructor(args) { - this.eMid = null; - this.mid = null; - this.direction = null; - this.method = null; - this.param = null; - this.timestamp = null; - this.seqId = null; - this.displayName = null; - this.picturePath = null; - this.pictureStatus = null; - if (args) { - if (args.eMid !== undefined && args.eMid !== null) { - this.eMid = args.eMid; - } - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.direction !== undefined && args.direction !== null) { - this.direction = args.direction; - } - if (args.method !== undefined && args.method !== null) { - this.method = args.method; - } - if (args.param !== undefined && args.param !== null) { - this.param = args.param; - } - if (args.timestamp !== undefined && args.timestamp !== null) { - this.timestamp = args.timestamp; - } - if (args.seqId !== undefined && args.seqId !== null) { - this.seqId = args.seqId; - } - if (args.displayName !== undefined && args.displayName !== null) { - this.displayName = args.displayName; - } - if (args.picturePath !== undefined && args.picturePath !== null) { - this.picturePath = args.picturePath; - } - if (args.pictureStatus !== undefined && args.pictureStatus !== null) { - this.pictureStatus = args.pictureStatus; - } - } - } -}; -lineType.FriendRequestsInfo = class { - constructor(args) { - this.totalIncomingCount = null; - this.totalOutgoingCount = null; - this.recentIncomings = null; - this.recentOutgoings = null; - this.totalIncomingLimit = null; - this.totalOutgoingLimit = null; - if (args) { - if (args.totalIncomingCount !== undefined && args.totalIncomingCount !== null) { - this.totalIncomingCount = args.totalIncomingCount; - } - if (args.totalOutgoingCount !== undefined && args.totalOutgoingCount !== null) { - this.totalOutgoingCount = args.totalOutgoingCount; - } - if (args.recentIncomings !== undefined && args.recentIncomings !== null) { - this.recentIncomings = Thrift.copyList(args.recentIncomings, [lineType.FriendRequest]); - } - if (args.recentOutgoings !== undefined && args.recentOutgoings !== null) { - this.recentOutgoings = Thrift.copyList(args.recentOutgoings, [lineType.FriendRequest]); - } - if (args.totalIncomingLimit !== undefined && args.totalIncomingLimit !== null) { - this.totalIncomingLimit = args.totalIncomingLimit; - } - if (args.totalOutgoingLimit !== undefined && args.totalOutgoingLimit !== null) { - this.totalOutgoingLimit = args.totalOutgoingLimit; - } - } - } -}; -lineType.Geolocation = class { - constructor(args) { - this.longitude = null; - this.latitude = null; - if (args) { - if (args.longitude !== undefined && args.longitude !== null) { - this.longitude = args.longitude; - } - if (args.latitude !== undefined && args.latitude !== null) { - this.latitude = args.latitude; - } - } - } -}; -lineType.NotificationTarget = class { - constructor(args) { - this.applicationType = null; - this.applicationVersion = null; - this.region = null; - if (args) { - if (args.applicationType !== undefined && args.applicationType !== null) { - this.applicationType = args.applicationType; - } - if (args.applicationVersion !== undefined && args.applicationVersion !== null) { - this.applicationVersion = args.applicationVersion; - } - if (args.region !== undefined && args.region !== null) { - this.region = args.region; - } - } - } -}; -lineType.GlobalEvent = class { - constructor(args) { - this.key = null; - this.targets = null; - this.createdTime = null; - this.data = null; - this.maxDelay = null; - if (args) { - if (args.key !== undefined && args.key !== null) { - this.key = args.key; - } - if (args.targets !== undefined && args.targets !== null) { - this.targets = Thrift.copyList(args.targets, [lineType.NotificationTarget]); - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.data !== undefined && args.data !== null) { - this.data = args.data; - } - if (args.maxDelay !== undefined && args.maxDelay !== null) { - this.maxDelay = args.maxDelay; - } - } - } -}; -lineType.GroupPreference = class { - constructor(args) { - this.invitationTicket = null; - this.favoriteTimestamp = null; - if (args) { - if (args.invitationTicket !== undefined && args.invitationTicket !== null) { - this.invitationTicket = args.invitationTicket; - } - if (args.favoriteTimestamp !== undefined && args.favoriteTimestamp !== null) { - this.favoriteTimestamp = args.favoriteTimestamp; - } - } - } -}; -lineType.Group = class { - constructor(args) { - this.id = null; - this.createdTime = null; - this.name = null; - this.pictureStatus = null; - this.preventedJoinByTicket = null; - this.groupPreference = null; - this.members = null; - this.creator = null; - this.invitee = null; - this.notificationDisabled = null; - if (args) { - if (args.id !== undefined && args.id !== null) { - this.id = args.id; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - if (args.pictureStatus !== undefined && args.pictureStatus !== null) { - this.pictureStatus = args.pictureStatus; - } - if (args.preventedJoinByTicket !== undefined && args.preventedJoinByTicket !== null) { - this.preventedJoinByTicket = args.preventedJoinByTicket; - } - if (args.groupPreference !== undefined && args.groupPreference !== null) { - this.groupPreference = new lineType.GroupPreference(args.groupPreference); - } - if (args.members !== undefined && args.members !== null) { - this.members = Thrift.copyList(args.members, [lineType.Contact]); - } - if (args.creator !== undefined && args.creator !== null) { - this.creator = new lineType.Contact(args.creator); - } - if (args.invitee !== undefined && args.invitee !== null) { - this.invitee = Thrift.copyList(args.invitee, [lineType.Contact]); - } - if (args.notificationDisabled !== undefined && args.notificationDisabled !== null) { - this.notificationDisabled = args.notificationDisabled; - } - } - } -}; -lineType.IdentityCredential = class { - constructor(args) { - this.provider = null; - this.identifier = null; - this.password = null; - if (args) { - if (args.provider !== undefined && args.provider !== null) { - this.provider = args.provider; - } - if (args.identifier !== undefined && args.identifier !== null) { - this.identifier = args.identifier; - } - if (args.password !== undefined && args.password !== null) { - this.password = args.password; - } - } - } -}; -lineType.LastReadMessageId = class { - constructor(args) { - this.mid = null; - this.lastReadMessageId = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.lastReadMessageId !== undefined && args.lastReadMessageId !== null) { - this.lastReadMessageId = args.lastReadMessageId; - } - } - } -}; -lineType.LastReadMessageIds = class { - constructor(args) { - this.chatId = null; - this.lastReadMessageIds = null; - if (args) { - if (args.chatId !== undefined && args.chatId !== null) { - this.chatId = args.chatId; - } - if (args.lastReadMessageIds !== undefined && args.lastReadMessageIds !== null) { - this.lastReadMessageIds = Thrift.copyList(args.lastReadMessageIds, [lineType.LastReadMessageId]); - } - } - } -}; -lineType.VerificationSessionData = class { - constructor(args) { - this.sessionId = null; - this.method = null; - this.callback = null; - this.normalizedPhone = null; - this.countryCode = null; - this.nationalSignificantNumber = null; - this.availableVerificationMethods = null; - if (args) { - if (args.sessionId !== undefined && args.sessionId !== null) { - this.sessionId = args.sessionId; - } - if (args.method !== undefined && args.method !== null) { - this.method = args.method; - } - if (args.callback !== undefined && args.callback !== null) { - this.callback = args.callback; - } - if (args.normalizedPhone !== undefined && args.normalizedPhone !== null) { - this.normalizedPhone = args.normalizedPhone; - } - if (args.countryCode !== undefined && args.countryCode !== null) { - this.countryCode = args.countryCode; - } - if (args.nationalSignificantNumber !== undefined && args.nationalSignificantNumber !== null) { - this.nationalSignificantNumber = args.nationalSignificantNumber; - } - if (args.availableVerificationMethods !== undefined && args.availableVerificationMethods !== null) { - this.availableVerificationMethods = Thrift.copyList(args.availableVerificationMethods, [null]); - } - } - } -}; -lineType.LoginResult = class { - constructor(args) { - this.authToken = null; - this.certificate = null; - this.verifier = null; - this.pinCode = null; - this.type = null; - this.lastPrimaryBindTime = null; - this.displayMessage = null; - this.sessionForSMSConfirm = null; - if (args) { - if (args.authToken !== undefined && args.authToken !== null) { - this.authToken = args.authToken; - } - if (args.certificate !== undefined && args.certificate !== null) { - this.certificate = args.certificate; - } - if (args.verifier !== undefined && args.verifier !== null) { - this.verifier = args.verifier; - } - if (args.pinCode !== undefined && args.pinCode !== null) { - this.pinCode = args.pinCode; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.lastPrimaryBindTime !== undefined && args.lastPrimaryBindTime !== null) { - this.lastPrimaryBindTime = args.lastPrimaryBindTime; - } - if (args.displayMessage !== undefined && args.displayMessage !== null) { - this.displayMessage = args.displayMessage; - } - if (args.sessionForSMSConfirm !== undefined && args.sessionForSMSConfirm !== null) { - this.sessionForSMSConfirm = new lineType.VerificationSessionData(args.sessionForSMSConfirm); - } - } - } -}; -lineType.LoginRequest = class { - constructor(args) { - this.type = null; - this.identityProvider = null; - this.identifier = null; - this.password = null; - this.keepLoggedIn = null; - this.accessLocation = null; - this.systemName = null; - this.certificate = null; - this.verifier = null; - this.secret = null; - this.e2eeVersion = null; - if (args) { - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.identityProvider !== undefined && args.identityProvider !== null) { - this.identityProvider = args.identityProvider; - } - if (args.identifier !== undefined && args.identifier !== null) { - this.identifier = args.identifier; - } - if (args.password !== undefined && args.password !== null) { - this.password = args.password; - } - if (args.keepLoggedIn !== undefined && args.keepLoggedIn !== null) { - this.keepLoggedIn = args.keepLoggedIn; - } - if (args.accessLocation !== undefined && args.accessLocation !== null) { - this.accessLocation = args.accessLocation; - } - if (args.systemName !== undefined && args.systemName !== null) { - this.systemName = args.systemName; - } - if (args.certificate !== undefined && args.certificate !== null) { - this.certificate = args.certificate; - } - if (args.verifier !== undefined && args.verifier !== null) { - this.verifier = args.verifier; - } - if (args.secret !== undefined && args.secret !== null) { - this.secret = args.secret; - } - if (args.e2eeVersion !== undefined && args.e2eeVersion !== null) { - this.e2eeVersion = args.e2eeVersion; - } - } - } -}; -lineType.LoginSession = class { - constructor(args) { - this.tokenKey = null; - this.expirationTime = null; - this.applicationType = null; - this.systemName = null; - this.accessLocation = null; - if (args) { - if (args.tokenKey !== undefined && args.tokenKey !== null) { - this.tokenKey = args.tokenKey; - } - if (args.expirationTime !== undefined && args.expirationTime !== null) { - this.expirationTime = args.expirationTime; - } - if (args.applicationType !== undefined && args.applicationType !== null) { - this.applicationType = args.applicationType; - } - if (args.systemName !== undefined && args.systemName !== null) { - this.systemName = args.systemName; - } - if (args.accessLocation !== undefined && args.accessLocation !== null) { - this.accessLocation = args.accessLocation; - } - } - } -}; -lineType.Message = class { - constructor(args) { - this._from = null; - this.to = null; - this.toType = null; - this.id = null; - this.createdTime = null; - this.deliveredTime = null; - this.text = null; - this.location = null; - this.hasContent = null; - this.contentType = null; - this.contentPreview = null; - this.contentMetadata = {}; - this.sessionId = null; - this.chunks = null; - this.relatedMessageId = null; - this.messageRelationType = null; - this.readCount = null; - this.relatedMessageServiceCode = null; - if (args) { - if (args._from !== undefined && args._from !== null) { - this._from = args._from; - } - if (args.to !== undefined && args.to !== null) { - this.to = args.to; - } - if (args.toType !== undefined && args.toType !== null) { - this.toType = args.toType; - } - if (args.id !== undefined && args.id !== null) { - this.id = args.id; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - if (typeof args.createdTime == "object") { - this.createdTime = Thrift.bin2int(args.createdTime.buffer); - } else { - this.createdTime = args.createdTime; - } - } - if (args.deliveredTime !== undefined && args.deliveredTime !== null) { - if (typeof args.deliveredTime == "object") { - this.deliveredTime = Thrift.bin2int(args.deliveredTime.buffer); - } else { - this.deliveredTime = args.deliveredTime; - } - } - if (args.text !== undefined && args.text !== null) { - this.text = args.text; - } - if (args.location !== undefined && args.location !== null) { - this.location = new lineType.Location(args.location); - } - if (args.hasContent !== undefined && args.hasContent !== null) { - this.hasContent = args.hasContent; - } - if (args.contentType !== undefined && args.contentType !== null) { - this.contentType = args.contentType; - } else { - this.contentType = 0; - } - if (args.contentPreview !== undefined && args.contentPreview !== null) { - this.contentPreview = args.contentPreview; - } - if (args.contentMetadata !== undefined && args.contentMetadata !== null) { - this.contentMetadata = Thrift.copyMap(args.contentMetadata, [null]); - } - if (args.sessionId !== undefined && args.sessionId !== null) { - this.sessionId = args.sessionId; - } - if (args.chunks !== undefined && args.chunks !== null) { - this.chunks = Thrift.copyList(args.chunks, [null]); - } - if (args.relatedMessageId !== undefined && args.relatedMessageId !== null) { - this.relatedMessageId = args.relatedMessageId; - } - if (args.messageRelationType !== undefined && args.messageRelationType !== null) { - this.messageRelationType = args.messageRelationType; - } - if (args.readCount !== undefined && args.readCount !== null) { - this.readCount = args.readCount; - } - if (args.relatedMessageServiceCode !== undefined && args.relatedMessageServiceCode !== null) { - this.relatedMessageServiceCode = args.relatedMessageServiceCode; - } - } - } -}; -lineType.SquareMessage = class { - constructor(args) { - this.message = null; - this.fromType = null; - this.squareMessageRevision = null; - if (args) { - if (args.message !== undefined && args.message !== null) { - this.message = new lineType.Message(args.message); - } - if (args.fromType !== undefined && args.fromType !== null) { - this.fromType = args.fromType; - } - if (args.squareMessageRevision !== undefined && args.squareMessageRevision !== null) { - this.squareMessageRevision = args.squareMessageRevision; - } - } - } -}; -lineType.SquareChatStatusWithoutMessage = class { - constructor(args) { - this.memberCount = null; - this.unreadMessageCount = null; - if (args) { - if (args.memberCount !== undefined && args.memberCount !== null) { - this.memberCount = args.memberCount; - } - if (args.unreadMessageCount !== undefined && args.unreadMessageCount !== null) { - this.unreadMessageCount = args.unreadMessageCount; - } - } - } -}; -lineType.SquareChatStatus = class { - constructor(args) { - this.lastMessage = null; - this.senderDisplayName = null; - this.otherStatus = null; - if (args) { - if (args.lastMessage !== undefined && args.lastMessage !== null) { - this.lastMessage = new lineType.SquareMessage(args.lastMessage); - } - if (args.senderDisplayName !== undefined && args.senderDisplayName !== null) { - this.senderDisplayName = args.senderDisplayName; - } - if (args.otherStatus !== undefined && args.otherStatus !== null) { - this.otherStatus = new lineType.SquareChatStatusWithoutMessage(args.otherStatus); - } - } - } -}; -lineType.SquareChatMember = class { - constructor(args) { - this.squareMemberMid = null; - this.squareChatMid = null; - this.revision = null; - this.membershipState = null; - this.notificationForMessage = null; - if (args) { - if (args.squareMemberMid !== undefined && args.squareMemberMid !== null) { - this.squareMemberMid = args.squareMemberMid; - } - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.membershipState !== undefined && args.membershipState !== null) { - this.membershipState = args.membershipState; - } - if (args.notificationForMessage !== undefined && args.notificationForMessage !== null) { - this.notificationForMessage = args.notificationForMessage; - } - } - } -}; -lineType.MessageOperation = class { - constructor(args) { - this.revision = null; - this.createdTime = null; - this.type = null; - this.reqSeq = null; - this.status = null; - this.param1 = null; - this.param2 = null; - this.param3 = null; - this.message = null; - if (args) { - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.reqSeq !== undefined && args.reqSeq !== null) { - this.reqSeq = args.reqSeq; - } - if (args.status !== undefined && args.status !== null) { - this.status = args.status; - } - if (args.param1 !== undefined && args.param1 !== null) { - this.param1 = args.param1; - } - if (args.param2 !== undefined && args.param2 !== null) { - this.param2 = args.param2; - } - if (args.param3 !== undefined && args.param3 !== null) { - this.param3 = args.param3; - } - if (args.message !== undefined && args.message !== null) { - this.message = new lineType.Message(args.message); - } - } - } -}; -lineType.MessageOperations = class { - constructor(args) { - this.operations = null; - this.endFlag = null; - if (args) { - if (args.operations !== undefined && args.operations !== null) { - this.operations = Thrift.copyList(args.operations, [lineType.MessageOperation]); - } - if (args.endFlag !== undefined && args.endFlag !== null) { - this.endFlag = args.endFlag; - } - } - } -}; -lineType.MessageStoreResult = class { - constructor(args) { - this.requestId = null; - this.messageIds = null; - if (args) { - if (args.requestId !== undefined && args.requestId !== null) { - this.requestId = args.requestId; - } - if (args.messageIds !== undefined && args.messageIds !== null) { - this.messageIds = Thrift.copyList(args.messageIds, [null]); - } - } - } -}; -lineType.MetaProfile = class { - constructor(args) { - this.createTime = null; - this.regionCode = null; - this.identities = null; - if (args) { - if (args.createTime !== undefined && args.createTime !== null) { - this.createTime = args.createTime; - } - if (args.regionCode !== undefined && args.regionCode !== null) { - this.regionCode = args.regionCode; - } - if (args.identities !== undefined && args.identities !== null) { - this.identities = Thrift.copyMap(args.identities, [null]); - } - } - } -}; -lineType.NotificationItem = class { - constructor(args) { - this.id = null; - this._from = null; - this.to = null; - this.fromChannel = null; - this.toChannel = null; - this.revision = null; - this.createdTime = null; - this.content = null; - if (args) { - if (args.id !== undefined && args.id !== null) { - this.id = args.id; - } - if (args._from !== undefined && args._from !== null) { - this._from = args._from; - } - if (args.to !== undefined && args.to !== null) { - this.to = args.to; - } - if (args.fromChannel !== undefined && args.fromChannel !== null) { - this.fromChannel = args.fromChannel; - } - if (args.toChannel !== undefined && args.toChannel !== null) { - this.toChannel = args.toChannel; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.content !== undefined && args.content !== null) { - this.content = Thrift.copyMap(args.content, [null]); - } - } - } -}; -lineType.NotificationFetchResult = class { - constructor(args) { - this.fetchMode = null; - this.itemList = null; - if (args) { - if (args.fetchMode !== undefined && args.fetchMode !== null) { - this.fetchMode = args.fetchMode; - } - if (args.itemList !== undefined && args.itemList !== null) { - this.itemList = Thrift.copyList(args.itemList, [lineType.NotificationItem]); - } - } - } -}; -lineType.Operation = class { - constructor(args) { - this.revision = null; - this.createdTime = null; - this.type = null; - this.reqSeq = null; - this.checksum = null; - this.status = null; - this.param1 = null; - this.param2 = null; - this.param3 = null; - this.message = null; - if (args) { - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.reqSeq !== undefined && args.reqSeq !== null) { - this.reqSeq = args.reqSeq; - } - if (args.checksum !== undefined && args.checksum !== null) { - this.checksum = args.checksum; - } - if (args.status !== undefined && args.status !== null) { - this.status = args.status; - } - if (args.param1 !== undefined && args.param1 !== null) { - this.param1 = args.param1; - } - if (args.param2 !== undefined && args.param2 !== null) { - this.param2 = args.param2; - } - if (args.param3 !== undefined && args.param3 !== null) { - this.param3 = args.param3; - } - if (args.message !== undefined && args.message !== null) { - this.message = new lineType.Message(args.message); - } - } - } -}; -lineType.PaymentReservation = class { - constructor(args) { - this.receiverMid = null; - this.productId = null; - this.language = null; - this.location = null; - this.currency = null; - this.price = null; - this.appStoreCode = null; - this.messageText = null; - this.messageTemplate = null; - this.packageId = null; - if (args) { - if (args.receiverMid !== undefined && args.receiverMid !== null) { - this.receiverMid = args.receiverMid; - } - if (args.productId !== undefined && args.productId !== null) { - this.productId = args.productId; - } - if (args.language !== undefined && args.language !== null) { - this.language = args.language; - } - if (args.location !== undefined && args.location !== null) { - this.location = args.location; - } - if (args.currency !== undefined && args.currency !== null) { - this.currency = args.currency; - } - if (args.price !== undefined && args.price !== null) { - this.price = args.price; - } - if (args.appStoreCode !== undefined && args.appStoreCode !== null) { - this.appStoreCode = args.appStoreCode; - } - if (args.messageText !== undefined && args.messageText !== null) { - this.messageText = args.messageText; - } - if (args.messageTemplate !== undefined && args.messageTemplate !== null) { - this.messageTemplate = args.messageTemplate; - } - if (args.packageId !== undefined && args.packageId !== null) { - this.packageId = args.packageId; - } - } - } -}; -lineType.PaymentReservationResult = class { - constructor(args) { - this.orderId = null; - this.confirmUrl = null; - this.extras = null; - if (args) { - if (args.orderId !== undefined && args.orderId !== null) { - this.orderId = args.orderId; - } - if (args.confirmUrl !== undefined && args.confirmUrl !== null) { - this.confirmUrl = args.confirmUrl; - } - if (args.extras !== undefined && args.extras !== null) { - this.extras = Thrift.copyMap(args.extras, [null]); - } - } - } -}; -lineType.Product = class { - constructor(args) { - this.productId = null; - this.packageId = null; - this.version = null; - this.authorName = null; - this.onSale = null; - this.validDays = null; - this.saleType = null; - this.copyright = null; - this.title = null; - this.descriptionText = null; - this.shopOrderId = null; - this.fromMid = null; - this.toMid = null; - this.validUntil = null; - this.priceTier = null; - this.price = null; - this.currency = null; - this.currencySymbol = null; - this.paymentType = null; - this.createDate = null; - this.ownFlag = null; - this.eventType = null; - this.urlSchema = null; - this.downloadUrl = null; - this.buddyMid = null; - this.publishSince = null; - this.newFlag = null; - this.missionFlag = null; - this.categories = null; - this.missionButtonText = null; - this.missionShortDescription = null; - this.authorId = null; - this.grantedByDefault = null; - this.displayOrder = null; - this.availableForPresent = null; - this.availableForMyself = null; - this.hasAnimation = null; - this.hasSound = null; - this.recommendationsEnabled = null; - this.stickerResourceType = null; - if (args) { - if (args.productId !== undefined && args.productId !== null) { - this.productId = args.productId; - } - if (args.packageId !== undefined && args.packageId !== null) { - this.packageId = args.packageId; - } - if (args.version !== undefined && args.version !== null) { - this.version = args.version; - } - if (args.authorName !== undefined && args.authorName !== null) { - this.authorName = args.authorName; - } - if (args.onSale !== undefined && args.onSale !== null) { - this.onSale = args.onSale; - } - if (args.validDays !== undefined && args.validDays !== null) { - this.validDays = args.validDays; - } - if (args.saleType !== undefined && args.saleType !== null) { - this.saleType = args.saleType; - } - if (args.copyright !== undefined && args.copyright !== null) { - this.copyright = args.copyright; - } - if (args.title !== undefined && args.title !== null) { - this.title = args.title; - } - if (args.descriptionText !== undefined && args.descriptionText !== null) { - this.descriptionText = args.descriptionText; - } - if (args.shopOrderId !== undefined && args.shopOrderId !== null) { - this.shopOrderId = args.shopOrderId; - } - if (args.fromMid !== undefined && args.fromMid !== null) { - this.fromMid = args.fromMid; - } - if (args.toMid !== undefined && args.toMid !== null) { - this.toMid = args.toMid; - } - if (args.validUntil !== undefined && args.validUntil !== null) { - this.validUntil = args.validUntil; - } - if (args.priceTier !== undefined && args.priceTier !== null) { - this.priceTier = args.priceTier; - } - if (args.price !== undefined && args.price !== null) { - this.price = args.price; - } - if (args.currency !== undefined && args.currency !== null) { - this.currency = args.currency; - } - if (args.currencySymbol !== undefined && args.currencySymbol !== null) { - this.currencySymbol = args.currencySymbol; - } - if (args.paymentType !== undefined && args.paymentType !== null) { - this.paymentType = args.paymentType; - } - if (args.createDate !== undefined && args.createDate !== null) { - this.createDate = args.createDate; - } - if (args.ownFlag !== undefined && args.ownFlag !== null) { - this.ownFlag = args.ownFlag; - } - if (args.eventType !== undefined && args.eventType !== null) { - this.eventType = args.eventType; - } - if (args.urlSchema !== undefined && args.urlSchema !== null) { - this.urlSchema = args.urlSchema; - } - if (args.downloadUrl !== undefined && args.downloadUrl !== null) { - this.downloadUrl = args.downloadUrl; - } - if (args.buddyMid !== undefined && args.buddyMid !== null) { - this.buddyMid = args.buddyMid; - } - if (args.publishSince !== undefined && args.publishSince !== null) { - this.publishSince = args.publishSince; - } - if (args.newFlag !== undefined && args.newFlag !== null) { - this.newFlag = args.newFlag; - } - if (args.missionFlag !== undefined && args.missionFlag !== null) { - this.missionFlag = args.missionFlag; - } - if (args.categories !== undefined && args.categories !== null) { - this.categories = Thrift.copyList(args.categories, [lineType.ProductCategory]); - } - if (args.missionButtonText !== undefined && args.missionButtonText !== null) { - this.missionButtonText = args.missionButtonText; - } - if (args.missionShortDescription !== undefined && args.missionShortDescription !== null) { - this.missionShortDescription = args.missionShortDescription; - } - if (args.authorId !== undefined && args.authorId !== null) { - this.authorId = args.authorId; - } - if (args.grantedByDefault !== undefined && args.grantedByDefault !== null) { - this.grantedByDefault = args.grantedByDefault; - } - if (args.displayOrder !== undefined && args.displayOrder !== null) { - this.displayOrder = args.displayOrder; - } - if (args.availableForPresent !== undefined && args.availableForPresent !== null) { - this.availableForPresent = args.availableForPresent; - } - if (args.availableForMyself !== undefined && args.availableForMyself !== null) { - this.availableForMyself = args.availableForMyself; - } - if (args.hasAnimation !== undefined && args.hasAnimation !== null) { - this.hasAnimation = args.hasAnimation; - } - if (args.hasSound !== undefined && args.hasSound !== null) { - this.hasSound = args.hasSound; - } - if (args.recommendationsEnabled !== undefined && args.recommendationsEnabled !== null) { - this.recommendationsEnabled = args.recommendationsEnabled; - } - if (args.stickerResourceType !== undefined && args.stickerResourceType !== null) { - this.stickerResourceType = args.stickerResourceType; - } - } - } -}; -lineType.ProductList = class { - constructor(args) { - this.hasNext = null; - this.bannerSequence = null; - this.bannerTargetType = null; - this.bannerTargetPath = null; - this.productList = null; - this.bannerLang = null; - if (args) { - if (args.hasNext !== undefined && args.hasNext !== null) { - this.hasNext = args.hasNext; - } - if (args.bannerSequence !== undefined && args.bannerSequence !== null) { - this.bannerSequence = args.bannerSequence; - } - if (args.bannerTargetType !== undefined && args.bannerTargetType !== null) { - this.bannerTargetType = args.bannerTargetType; - } - if (args.bannerTargetPath !== undefined && args.bannerTargetPath !== null) { - this.bannerTargetPath = args.bannerTargetPath; - } - if (args.productList !== undefined && args.productList !== null) { - this.productList = Thrift.copyList(args.productList, [lineType.Product]); - } - if (args.bannerLang !== undefined && args.bannerLang !== null) { - this.bannerLang = args.bannerLang; - } - } - } -}; -lineType.StickerIdRange = class { - constructor(args) { - this.start = null; - this.size = null; - if (args) { - if (args.start !== undefined && args.start !== null) { - this.start = args.start; - } - if (args.size !== undefined && args.size !== null) { - this.size = args.size; - } - } - } -}; -lineType.ProductSimple = class { - constructor(args) { - this.productId = null; - this.packageId = null; - this.version = null; - this.onSale = null; - this.validUntil = null; - this.stickerIdRanges = null; - this.grantedByDefault = null; - this.displayOrder = null; - if (args) { - if (args.productId !== undefined && args.productId !== null) { - this.productId = args.productId; - } - if (args.packageId !== undefined && args.packageId !== null) { - this.packageId = args.packageId; - } - if (args.version !== undefined && args.version !== null) { - this.version = args.version; - } - if (args.onSale !== undefined && args.onSale !== null) { - this.onSale = args.onSale; - } - if (args.validUntil !== undefined && args.validUntil !== null) { - this.validUntil = args.validUntil; - } - if (args.stickerIdRanges !== undefined && args.stickerIdRanges !== null) { - this.stickerIdRanges = Thrift.copyList(args.stickerIdRanges, [lineType.StickerIdRange]); - } - if (args.grantedByDefault !== undefined && args.grantedByDefault !== null) { - this.grantedByDefault = args.grantedByDefault; - } - if (args.displayOrder !== undefined && args.displayOrder !== null) { - this.displayOrder = args.displayOrder; - } - } - } -}; -lineType.ProductSimpleList = class { - constructor(args) { - this.hasNext = null; - this.reinvokeHour = null; - this.lastVersionSeq = null; - this.productList = null; - this.recentNewReleaseDate = null; - this.recentEventReleaseDate = null; - if (args) { - if (args.hasNext !== undefined && args.hasNext !== null) { - this.hasNext = args.hasNext; - } - if (args.reinvokeHour !== undefined && args.reinvokeHour !== null) { - this.reinvokeHour = args.reinvokeHour; - } - if (args.lastVersionSeq !== undefined && args.lastVersionSeq !== null) { - this.lastVersionSeq = args.lastVersionSeq; - } - if (args.productList !== undefined && args.productList !== null) { - this.productList = Thrift.copyList(args.productList, [lineType.ProductSimple]); - } - if (args.recentNewReleaseDate !== undefined && args.recentNewReleaseDate !== null) { - this.recentNewReleaseDate = args.recentNewReleaseDate; - } - if (args.recentEventReleaseDate !== undefined && args.recentEventReleaseDate !== null) { - this.recentEventReleaseDate = args.recentEventReleaseDate; - } - } - } -}; -lineType.Profile = class { - constructor(args) { - this.mid = null; - this.userid = null; - this.phone = null; - this.email = null; - this.regionCode = null; - this.displayName = null; - this.phoneticName = null; - this.pictureStatus = null; - this.thumbnailUrl = null; - this.statusMessage = null; - this.allowSearchByUserid = null; - this.allowSearchByEmail = null; - this.picturePath = null; - this.musicProfile = null; - this.videoProfile = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.userid !== undefined && args.userid !== null) { - this.userid = args.userid; - } - if (args.phone !== undefined && args.phone !== null) { - this.phone = args.phone; - } - if (args.email !== undefined && args.email !== null) { - this.email = args.email; - } - if (args.regionCode !== undefined && args.regionCode !== null) { - this.regionCode = args.regionCode; - } - if (args.displayName !== undefined && args.displayName !== null) { - this.displayName = args.displayName; - } - if (args.phoneticName !== undefined && args.phoneticName !== null) { - this.phoneticName = args.phoneticName; - } - if (args.pictureStatus !== undefined && args.pictureStatus !== null) { - this.pictureStatus = args.pictureStatus; - } - if (args.thumbnailUrl !== undefined && args.thumbnailUrl !== null) { - this.thumbnailUrl = args.thumbnailUrl; - } - if (args.statusMessage !== undefined && args.statusMessage !== null) { - this.statusMessage = args.statusMessage; - } - if (args.allowSearchByUserid !== undefined && args.allowSearchByUserid !== null) { - this.allowSearchByUserid = args.allowSearchByUserid; - } - if (args.allowSearchByEmail !== undefined && args.allowSearchByEmail !== null) { - this.allowSearchByEmail = args.allowSearchByEmail; - } - if (args.picturePath !== undefined && args.picturePath !== null) { - this.picturePath = args.picturePath; - } - if (args.musicProfile !== undefined && args.musicProfile !== null) { - this.musicProfile = args.musicProfile; - } - if (args.videoProfile !== undefined && args.videoProfile !== null) { - this.videoProfile = args.videoProfile; - } - } - } -}; -lineType.ProximityMatchCandidateResult = class { - constructor(args) { - this.users = null; - this.buddies = null; - if (args) { - if (args.users !== undefined && args.users !== null) { - this.users = Thrift.copyList(args.users, [lineType.Contact]); - } - if (args.buddies !== undefined && args.buddies !== null) { - this.buddies = Thrift.copyList(args.buddies, [lineType.Contact]); - } - } - } -}; -lineType.RegisterWithSnsIdResult = class { - constructor(args) { - this.authToken = null; - this.userCreated = null; - if (args) { - if (args.authToken !== undefined && args.authToken !== null) { - this.authToken = args.authToken; - } - if (args.userCreated !== undefined && args.userCreated !== null) { - this.userCreated = args.userCreated; - } - } - } -}; -lineType.RequestTokenResponse = class { - constructor(args) { - this.requestToken = null; - this.returnUrl = null; - if (args) { - if (args.requestToken !== undefined && args.requestToken !== null) { - this.requestToken = args.requestToken; - } - if (args.returnUrl !== undefined && args.returnUrl !== null) { - this.returnUrl = args.returnUrl; - } - } - } -}; -lineType.Room = class { - constructor(args) { - this.mid = null; - this.createdTime = null; - this.contacts = null; - this.notificationDisabled = null; - this.memberMids = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.contacts !== undefined && args.contacts !== null) { - this.contacts = Thrift.copyList(args.contacts, [lineType.Contact]); - } - if (args.notificationDisabled !== undefined && args.notificationDisabled !== null) { - this.notificationDisabled = args.notificationDisabled; - } - if (args.memberMids !== undefined && args.memberMids !== null) { - this.memberMids = Thrift.copyList(args.memberMids, [null]); - } - } - } -}; -lineType.SuggestDictionary = class { - constructor(args) { - this.language = null; - this.name = null; - if (args) { - if (args.language !== undefined && args.language !== null) { - this.language = args.language; - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - } - } -}; -lineType.SuggestItemDictionaryIncrement = class { - constructor(args) { - this.status = null; - this.revision = null; - this.scheme = null; - this.data = null; - if (args) { - if (args.status !== undefined && args.status !== null) { - this.status = args.status; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.scheme !== undefined && args.scheme !== null) { - this.scheme = args.scheme; - } - if (args.data !== undefined && args.data !== null) { - this.data = args.data; - } - } - } -}; -lineType.SuggestTagDictionaryIncrement = class { - constructor(args) { - this.status = null; - this.language = null; - this.revision = null; - this.scheme = null; - this.data = null; - if (args) { - if (args.status !== undefined && args.status !== null) { - this.status = args.status; - } - if (args.language !== undefined && args.language !== null) { - this.language = args.language; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.scheme !== undefined && args.scheme !== null) { - this.scheme = args.scheme; - } - if (args.data !== undefined && args.data !== null) { - this.data = args.data; - } - } - } -}; -lineType.SuggestDictionaryIncrements = class { - constructor(args) { - this.itemIncrement = null; - this.tagIncrements = null; - if (args) { - if (args.itemIncrement !== undefined && args.itemIncrement !== null) { - this.itemIncrement = new lineType.SuggestItemDictionaryIncrement(args.itemIncrement); - } - if (args.tagIncrements !== undefined && args.tagIncrements !== null) { - this.tagIncrements = Thrift.copyList(args.tagIncrements, [lineType.SuggestTagDictionaryIncrement]); - } - } - } -}; -lineType.SuggestItemDictionaryRevision = class { - constructor(args) { - this.revision = null; - this.scheme = null; - if (args) { - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.scheme !== undefined && args.scheme !== null) { - this.scheme = args.scheme; - } - } - } -}; -lineType.SuggestTagDictionaryRevision = class { - constructor(args) { - this.language = null; - this.revision = null; - this.scheme = null; - if (args) { - if (args.language !== undefined && args.language !== null) { - this.language = args.language; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.scheme !== undefined && args.scheme !== null) { - this.scheme = args.scheme; - } - } - } -}; -lineType.SuggestDictionaryRevisions = class { - constructor(args) { - this.itemRevision = null; - this.tagRevisions = null; - if (args) { - if (args.itemRevision !== undefined && args.itemRevision !== null) { - this.itemRevision = new lineType.SuggestItemDictionaryRevision(args.itemRevision); - } - if (args.tagRevisions !== undefined && args.tagRevisions !== null) { - this.tagRevisions = Thrift.copyList(args.tagRevisions, [lineType.SuggestTagDictionaryRevision]); - } - } - } -}; -lineType.SuggestDictionarySettings = class { - constructor(args) { - this.revision = null; - this.newRevision = null; - this.dictionaries = null; - this.preloadedDictionaries = null; - if (args) { - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.newRevision !== undefined && args.newRevision !== null) { - this.newRevision = args.newRevision; - } - if (args.dictionaries !== undefined && args.dictionaries !== null) { - this.dictionaries = Thrift.copyList(args.dictionaries, [lineType.SuggestDictionary]); - } - if (args.preloadedDictionaries !== undefined && args.preloadedDictionaries !== null) { - this.preloadedDictionaries = Thrift.copyList(args.preloadedDictionaries, [null]); - } - } - } -}; -lineType.PhoneInfoForChannel = class { - constructor(args) { - this.mid = null; - this.normalizedPhoneNumber = null; - this.allowedToSearchByPhoneNumber = null; - this.allowedToReceiveMessageFromNonFriend = null; - this.region = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.normalizedPhoneNumber !== undefined && args.normalizedPhoneNumber !== null) { - this.normalizedPhoneNumber = args.normalizedPhoneNumber; - } - if (args.allowedToSearchByPhoneNumber !== undefined && args.allowedToSearchByPhoneNumber !== null) { - this.allowedToSearchByPhoneNumber = args.allowedToSearchByPhoneNumber; - } - if ( - args.allowedToReceiveMessageFromNonFriend !== undefined && - args.allowedToReceiveMessageFromNonFriend !== null - ) { - this.allowedToReceiveMessageFromNonFriend = args.allowedToReceiveMessageFromNonFriend; - } - if (args.region !== undefined && args.region !== null) { - this.region = args.region; - } - } - } -}; -lineType.PhoneVerificationResult = class { - constructor(args) { - this.verificationResult = null; - this.accountMigrationCheckType = null; - this.recommendAddFriends = null; - if (args) { - if (args.verificationResult !== undefined && args.verificationResult !== null) { - this.verificationResult = args.verificationResult; - } - if (args.accountMigrationCheckType !== undefined && args.accountMigrationCheckType !== null) { - this.accountMigrationCheckType = args.accountMigrationCheckType; - } - if (args.recommendAddFriends !== undefined && args.recommendAddFriends !== null) { - this.recommendAddFriends = args.recommendAddFriends; - } - } - } -}; -lineType.PlaceSearchInfo = class { - constructor(args) { - this.name = null; - this.address = null; - this.latitude = null; - this.longitude = null; - if (args) { - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - if (args.address !== undefined && args.address !== null) { - this.address = args.address; - } - if (args.latitude !== undefined && args.latitude !== null) { - this.latitude = args.latitude; - } - if (args.longitude !== undefined && args.longitude !== null) { - this.longitude = args.longitude; - } - } - } -}; -lineType.RSAKey = class { - constructor(args) { - this.keynm = null; - this.nvalue = null; - this.evalue = null; - this.sessionKey = null; - if (args) { - if (args.keynm !== undefined && args.keynm !== null) { - this.keynm = args.keynm; - } - if (args.nvalue !== undefined && args.nvalue !== null) { - this.nvalue = args.nvalue; - } - if (args.evalue !== undefined && args.evalue !== null) { - this.evalue = args.evalue; - } - if (args.sessionKey !== undefined && args.sessionKey !== null) { - this.sessionKey = args.sessionKey; - } - } - } -}; -lineType.SecurityCenterResult = class { - constructor(args) { - this.uri = null; - this.token = null; - this.cookiePath = null; - this.skip = null; - if (args) { - if (args.uri !== undefined && args.uri !== null) { - this.uri = args.uri; - } - if (args.token !== undefined && args.token !== null) { - this.token = args.token; - } - if (args.cookiePath !== undefined && args.cookiePath !== null) { - this.cookiePath = args.cookiePath; - } - if (args.skip !== undefined && args.skip !== null) { - this.skip = args.skip; - } - } - } -}; -lineType.SendBuddyMessageResult = class { - constructor(args) { - this.requestId = null; - this.state = null; - this.messageId = null; - this.eventNo = null; - this.receiverCount = null; - this.successCount = null; - this.failCount = null; - this.cancelCount = null; - this.blockCount = null; - this.unregisterCount = null; - this.timestamp = null; - this.message = null; - if (args) { - if (args.requestId !== undefined && args.requestId !== null) { - this.requestId = args.requestId; - } - if (args.state !== undefined && args.state !== null) { - this.state = args.state; - } - if (args.messageId !== undefined && args.messageId !== null) { - this.messageId = args.messageId; - } - if (args.eventNo !== undefined && args.eventNo !== null) { - this.eventNo = args.eventNo; - } - if (args.receiverCount !== undefined && args.receiverCount !== null) { - this.receiverCount = args.receiverCount; - } - if (args.successCount !== undefined && args.successCount !== null) { - this.successCount = args.successCount; - } - if (args.failCount !== undefined && args.failCount !== null) { - this.failCount = args.failCount; - } - if (args.cancelCount !== undefined && args.cancelCount !== null) { - this.cancelCount = args.cancelCount; - } - if (args.blockCount !== undefined && args.blockCount !== null) { - this.blockCount = args.blockCount; - } - if (args.unregisterCount !== undefined && args.unregisterCount !== null) { - this.unregisterCount = args.unregisterCount; - } - if (args.timestamp !== undefined && args.timestamp !== null) { - this.timestamp = args.timestamp; - } - if (args.message !== undefined && args.message !== null) { - this.message = args.message; - } - } - } -}; -lineType.SetBuddyOnAirResult = class { - constructor(args) { - this.requestId = null; - this.state = null; - this.eventNo = null; - this.receiverCount = null; - this.successCount = null; - this.failCount = null; - this.cancelCount = null; - this.unregisterCount = null; - this.timestamp = null; - this.message = null; - if (args) { - if (args.requestId !== undefined && args.requestId !== null) { - this.requestId = args.requestId; - } - if (args.state !== undefined && args.state !== null) { - this.state = args.state; - } - if (args.eventNo !== undefined && args.eventNo !== null) { - this.eventNo = args.eventNo; - } - if (args.receiverCount !== undefined && args.receiverCount !== null) { - this.receiverCount = args.receiverCount; - } - if (args.successCount !== undefined && args.successCount !== null) { - this.successCount = args.successCount; - } - if (args.failCount !== undefined && args.failCount !== null) { - this.failCount = args.failCount; - } - if (args.cancelCount !== undefined && args.cancelCount !== null) { - this.cancelCount = args.cancelCount; - } - if (args.unregisterCount !== undefined && args.unregisterCount !== null) { - this.unregisterCount = args.unregisterCount; - } - if (args.timestamp !== undefined && args.timestamp !== null) { - this.timestamp = args.timestamp; - } - if (args.message !== undefined && args.message !== null) { - this.message = args.message; - } - } - } -}; -lineType.Settings = class { - constructor(args) { - this.notificationEnable = null; - this.notificationMuteExpiration = null; - this.notificationNewMessage = null; - this.notificationGroupInvitation = null; - this.notificationShowMessage = null; - this.notificationIncomingCall = null; - this.notificationSoundMessage = null; - this.notificationSoundGroup = null; - this.notificationDisabledWithSub = null; - this.privacySyncContacts = null; - this.privacySearchByPhoneNumber = null; - this.privacySearchByUserid = null; - this.privacySearchByEmail = null; - this.privacyAllowSecondaryDeviceLogin = null; - this.privacyProfileImagePostToMyhome = null; - this.privacyReceiveMessagesFromNotFriend = null; - this.contactMyTicket = null; - this.identityProvider = null; - this.identityIdentifier = null; - this.snsAccounts = null; - this.phoneRegistration = null; - this.emailConfirmationStatus = null; - this.preferenceLocale = null; - this.customModes = null; - this.e2eeEnable = null; - this.hitokotoBackupRequested = null; - this.privacyProfileMusicPostToMyhome = null; - this.privacyAllowNearby = null; - this.agreementNearbyTime = null; - this.agreementSquareTime = null; - this.notificationMention = null; - this.botUseAgreementAcceptedAt = null; - if (args) { - if (args.notificationEnable !== undefined && args.notificationEnable !== null) { - this.notificationEnable = args.notificationEnable; - } - if (args.notificationMuteExpiration !== undefined && args.notificationMuteExpiration !== null) { - this.notificationMuteExpiration = args.notificationMuteExpiration; - } - if (args.notificationNewMessage !== undefined && args.notificationNewMessage !== null) { - this.notificationNewMessage = args.notificationNewMessage; - } - if (args.notificationGroupInvitation !== undefined && args.notificationGroupInvitation !== null) { - this.notificationGroupInvitation = args.notificationGroupInvitation; - } - if (args.notificationShowMessage !== undefined && args.notificationShowMessage !== null) { - this.notificationShowMessage = args.notificationShowMessage; - } - if (args.notificationIncomingCall !== undefined && args.notificationIncomingCall !== null) { - this.notificationIncomingCall = args.notificationIncomingCall; - } - if (args.notificationSoundMessage !== undefined && args.notificationSoundMessage !== null) { - this.notificationSoundMessage = args.notificationSoundMessage; - } - if (args.notificationSoundGroup !== undefined && args.notificationSoundGroup !== null) { - this.notificationSoundGroup = args.notificationSoundGroup; - } - if (args.notificationDisabledWithSub !== undefined && args.notificationDisabledWithSub !== null) { - this.notificationDisabledWithSub = args.notificationDisabledWithSub; - } - if (args.privacySyncContacts !== undefined && args.privacySyncContacts !== null) { - this.privacySyncContacts = args.privacySyncContacts; - } - if (args.privacySearchByPhoneNumber !== undefined && args.privacySearchByPhoneNumber !== null) { - this.privacySearchByPhoneNumber = args.privacySearchByPhoneNumber; - } - if (args.privacySearchByUserid !== undefined && args.privacySearchByUserid !== null) { - this.privacySearchByUserid = args.privacySearchByUserid; - } - if (args.privacySearchByEmail !== undefined && args.privacySearchByEmail !== null) { - this.privacySearchByEmail = args.privacySearchByEmail; - } - if (args.privacyAllowSecondaryDeviceLogin !== undefined && args.privacyAllowSecondaryDeviceLogin !== null) { - this.privacyAllowSecondaryDeviceLogin = args.privacyAllowSecondaryDeviceLogin; - } - if (args.privacyProfileImagePostToMyhome !== undefined && args.privacyProfileImagePostToMyhome !== null) { - this.privacyProfileImagePostToMyhome = args.privacyProfileImagePostToMyhome; - } - if ( - args.privacyReceiveMessagesFromNotFriend !== undefined && - args.privacyReceiveMessagesFromNotFriend !== null - ) { - this.privacyReceiveMessagesFromNotFriend = args.privacyReceiveMessagesFromNotFriend; - } - if (args.contactMyTicket !== undefined && args.contactMyTicket !== null) { - this.contactMyTicket = args.contactMyTicket; - } - if (args.identityProvider !== undefined && args.identityProvider !== null) { - this.identityProvider = args.identityProvider; - } - if (args.identityIdentifier !== undefined && args.identityIdentifier !== null) { - this.identityIdentifier = args.identityIdentifier; - } - if (args.snsAccounts !== undefined && args.snsAccounts !== null) { - this.snsAccounts = Thrift.copyMap(args.snsAccounts, [null]); - } - if (args.phoneRegistration !== undefined && args.phoneRegistration !== null) { - this.phoneRegistration = args.phoneRegistration; - } - if (args.emailConfirmationStatus !== undefined && args.emailConfirmationStatus !== null) { - this.emailConfirmationStatus = args.emailConfirmationStatus; - } - if (args.preferenceLocale !== undefined && args.preferenceLocale !== null) { - this.preferenceLocale = args.preferenceLocale; - } - if (args.customModes !== undefined && args.customModes !== null) { - this.customModes = Thrift.copyMap(args.customModes, [null]); - } - if (args.e2eeEnable !== undefined && args.e2eeEnable !== null) { - this.e2eeEnable = args.e2eeEnable; - } - if (args.hitokotoBackupRequested !== undefined && args.hitokotoBackupRequested !== null) { - this.hitokotoBackupRequested = args.hitokotoBackupRequested; - } - if (args.privacyProfileMusicPostToMyhome !== undefined && args.privacyProfileMusicPostToMyhome !== null) { - this.privacyProfileMusicPostToMyhome = args.privacyProfileMusicPostToMyhome; - } - if (args.privacyAllowNearby !== undefined && args.privacyAllowNearby !== null) { - this.privacyAllowNearby = args.privacyAllowNearby; - } - if (args.agreementNearbyTime !== undefined && args.agreementNearbyTime !== null) { - this.agreementNearbyTime = args.agreementNearbyTime; - } - if (args.agreementSquareTime !== undefined && args.agreementSquareTime !== null) { - this.agreementSquareTime = args.agreementSquareTime; - } - if (args.notificationMention !== undefined && args.notificationMention !== null) { - this.notificationMention = args.notificationMention; - } - if (args.botUseAgreementAcceptedAt !== undefined && args.botUseAgreementAcceptedAt !== null) { - this.botUseAgreementAcceptedAt = args.botUseAgreementAcceptedAt; - } - } - } -}; -lineType.SimpleChannelClient = class { - constructor(args) { - this.applicationType = null; - this.applicationVersion = null; - this.locale = null; - if (args) { - if (args.applicationType !== undefined && args.applicationType !== null) { - this.applicationType = args.applicationType; - } - if (args.applicationVersion !== undefined && args.applicationVersion !== null) { - this.applicationVersion = args.applicationVersion; - } - if (args.locale !== undefined && args.locale !== null) { - this.locale = args.locale; - } - } - } -}; -lineType.SimpleChannelContact = class { - constructor(args) { - this.mid = null; - this.displayName = null; - this.pictureStatus = null; - this.picturePath = null; - this.statusMessage = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.displayName !== undefined && args.displayName !== null) { - this.displayName = args.displayName; - } - if (args.pictureStatus !== undefined && args.pictureStatus !== null) { - this.pictureStatus = args.pictureStatus; - } - if (args.picturePath !== undefined && args.picturePath !== null) { - this.picturePath = args.picturePath; - } - if (args.statusMessage !== undefined && args.statusMessage !== null) { - this.statusMessage = args.statusMessage; - } - } - } -}; -lineType.SnsFriend = class { - constructor(args) { - this.snsUserId = null; - this.snsUserName = null; - this.snsIdType = null; - if (args) { - if (args.snsUserId !== undefined && args.snsUserId !== null) { - this.snsUserId = args.snsUserId; - } - if (args.snsUserName !== undefined && args.snsUserName !== null) { - this.snsUserName = args.snsUserName; - } - if (args.snsIdType !== undefined && args.snsIdType !== null) { - this.snsIdType = args.snsIdType; - } - } - } -}; -lineType.SnsFriendContactRegistration = class { - constructor(args) { - this.contact = null; - this.snsIdType = null; - this.snsUserId = null; - if (args) { - if (args.contact !== undefined && args.contact !== null) { - this.contact = new lineType.Contact(args.contact); - } - if (args.snsIdType !== undefined && args.snsIdType !== null) { - this.snsIdType = args.snsIdType; - } - if (args.snsUserId !== undefined && args.snsUserId !== null) { - this.snsUserId = args.snsUserId; - } - } - } -}; -lineType.SnsFriendModification = class { - constructor(args) { - this.type = null; - this.snsFriend = null; - if (args) { - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.snsFriend !== undefined && args.snsFriend !== null) { - this.snsFriend = new lineType.SnsFriend(args.snsFriend); - } - } - } -}; -lineType.SnsFriends = class { - constructor(args) { - this.snsFriends = null; - this.hasMore = null; - if (args) { - if (args.snsFriends !== undefined && args.snsFriends !== null) { - this.snsFriends = Thrift.copyList(args.snsFriends, [lineType.SnsFriend]); - } - if (args.hasMore !== undefined && args.hasMore !== null) { - this.hasMore = args.hasMore; - } - } - } -}; -lineType.SnsIdUserStatus = class { - constructor(args) { - this.userExisting = null; - this.phoneNumberRegistered = null; - this.sameDevice = null; - if (args) { - if (args.userExisting !== undefined && args.userExisting !== null) { - this.userExisting = args.userExisting; - } - if (args.phoneNumberRegistered !== undefined && args.phoneNumberRegistered !== null) { - this.phoneNumberRegistered = args.phoneNumberRegistered; - } - if (args.sameDevice !== undefined && args.sameDevice !== null) { - this.sameDevice = args.sameDevice; - } - } - } -}; -lineType.SnsProfile = class { - constructor(args) { - this.snsUserId = null; - this.snsUserName = null; - this.email = null; - this.thumbnailUrl = null; - if (args) { - if (args.snsUserId !== undefined && args.snsUserId !== null) { - this.snsUserId = args.snsUserId; - } - if (args.snsUserName !== undefined && args.snsUserName !== null) { - this.snsUserName = args.snsUserName; - } - if (args.email !== undefined && args.email !== null) { - this.email = args.email; - } - if (args.thumbnailUrl !== undefined && args.thumbnailUrl !== null) { - this.thumbnailUrl = args.thumbnailUrl; - } - } - } -}; -lineType.SystemConfiguration = class { - constructor(args) { - this.endpoint = null; - this.endpointSsl = null; - this.updateUrl = null; - this.c2dmAccount = null; - this.nniServer = null; - if (args) { - if (args.endpoint !== undefined && args.endpoint !== null) { - this.endpoint = args.endpoint; - } - if (args.endpointSsl !== undefined && args.endpointSsl !== null) { - this.endpointSsl = args.endpointSsl; - } - if (args.updateUrl !== undefined && args.updateUrl !== null) { - this.updateUrl = args.updateUrl; - } - if (args.c2dmAccount !== undefined && args.c2dmAccount !== null) { - this.c2dmAccount = args.c2dmAccount; - } - if (args.nniServer !== undefined && args.nniServer !== null) { - this.nniServer = args.nniServer; - } - } - } -}; -lineType.Ticket = class { - constructor(args) { - this.id = null; - this.expirationTime = null; - this.maxUseCount = null; - if (args) { - if (args.id !== undefined && args.id !== null) { - this.id = args.id; - } - if (args.expirationTime !== undefined && args.expirationTime !== null) { - this.expirationTime = args.expirationTime; - } - if (args.maxUseCount !== undefined && args.maxUseCount !== null) { - this.maxUseCount = args.maxUseCount; - } - } - } -}; -lineType.TMessageBox = class { - constructor(args) { - this.id = null; - this.channelId = null; - this.lastSeq = null; - this.unreadCount = null; - this.lastModifiedTime = null; - this.status = null; - this.midType = null; - this.lastMessages = null; - if (args) { - if (args.id !== undefined && args.id !== null) { - this.id = args.id; - } - if (args.channelId !== undefined && args.channelId !== null) { - this.channelId = args.channelId; - } - if (args.lastSeq !== undefined && args.lastSeq !== null) { - this.lastSeq = args.lastSeq; - } - if (args.unreadCount !== undefined && args.unreadCount !== null) { - this.unreadCount = args.unreadCount; - } - if (args.lastModifiedTime !== undefined && args.lastModifiedTime !== null) { - this.lastModifiedTime = args.lastModifiedTime; - } - if (args.status !== undefined && args.status !== null) { - this.status = args.status; - } - if (args.midType !== undefined && args.midType !== null) { - this.midType = args.midType; - } - if (args.lastMessages !== undefined && args.lastMessages !== null) { - this.lastMessages = Thrift.copyList(args.lastMessages, [lineType.Message]); - } - } - } -}; -lineType.TMessageBoxWrapUp = class { - constructor(args) { - this.messageBox = null; - this.name = null; - this.contacts = null; - this.pictureRevision = null; - if (args) { - if (args.messageBox !== undefined && args.messageBox !== null) { - this.messageBox = new lineType.TMessageBox(args.messageBox); - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - if (args.contacts !== undefined && args.contacts !== null) { - this.contacts = Thrift.copyList(args.contacts, [lineType.Contact]); - } - if (args.pictureRevision !== undefined && args.pictureRevision !== null) { - this.pictureRevision = args.pictureRevision; - } - } - } -}; -lineType.TMessageBoxWrapUpResponse = class { - constructor(args) { - this.messageBoxWrapUpList = null; - this.totalSize = null; - if (args) { - if (args.messageBoxWrapUpList !== undefined && args.messageBoxWrapUpList !== null) { - this.messageBoxWrapUpList = Thrift.copyList(args.messageBoxWrapUpList, [lineType.TMessageBoxWrapUp]); - } - if (args.totalSize !== undefined && args.totalSize !== null) { - this.totalSize = args.totalSize; - } - } - } -}; -lineType.TMessageReadRangeEntry = class { - constructor(args) { - this.startMessageId = null; - this.endMessageId = null; - this.startTime = null; - this.endTime = null; - if (args) { - if (args.startMessageId !== undefined && args.startMessageId !== null) { - this.startMessageId = args.startMessageId; - } - if (args.endMessageId !== undefined && args.endMessageId !== null) { - this.endMessageId = args.endMessageId; - } - if (args.startTime !== undefined && args.startTime !== null) { - this.startTime = args.startTime; - } - if (args.endTime !== undefined && args.endTime !== null) { - this.endTime = args.endTime; - } - } - } -}; -lineType.TMessageReadRange = class { - constructor(args) { - this.chatId = null; - this.ranges = null; - if (args) { - if (args.chatId !== undefined && args.chatId !== null) { - this.chatId = args.chatId; - } - if (args.ranges !== undefined && args.ranges !== null) { - this.ranges = Thrift.copyMap(args.ranges, [Thrift.copyList, lineType.TMessageReadRangeEntry]); - } - } - } -}; -lineType.ChatRoomAnnouncementContents = class { - constructor(args) { - this.displayFields = null; - this.text = null; - this.link = null; - this.thumbnail = null; - if (args) { - if (args.displayFields !== undefined && args.displayFields !== null) { - this.displayFields = args.displayFields; - } - if (args.text !== undefined && args.text !== null) { - this.text = args.text; - } - if (args.link !== undefined && args.link !== null) { - this.link = args.link; - } - if (args.thumbnail !== undefined && args.thumbnail !== null) { - this.thumbnail = args.thumbnail; - } - } - } -}; -lineType.ChatRoomAnnouncement = class { - constructor(args) { - this.announcementSeq = null; - this.type = null; - this.contents = null; - this.creatorMid = null; - this.createdTime = null; - if (args) { - if (args.announcementSeq !== undefined && args.announcementSeq !== null) { - this.announcementSeq = args.announcementSeq; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.contents !== undefined && args.contents !== null) { - this.contents = new lineType.ChatRoomAnnouncementContents(args.contents); - } - if (args.creatorMid !== undefined && args.creatorMid !== null) { - this.creatorMid = args.creatorMid; - } - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - } - } -}; -lineType.ErrorExtraInfo = class { - constructor(args) { - this.preconditionFailedExtraInfo = null; - if (args) { - if (args.preconditionFailedExtraInfo !== undefined && args.preconditionFailedExtraInfo !== null) { - this.preconditionFailedExtraInfo = args.preconditionFailedExtraInfo; - } - } - } -}; -lineType.SyncRelations = class { - constructor(args) { - this.syncAll = null; - this.syncParamContact = null; - this.syncParamMid = null; - if (args) { - if (args.syncAll !== undefined && args.syncAll !== null) { - this.syncAll = args.syncAll; - } - if (args.syncParamContact !== undefined && args.syncParamContact !== null) { - this.syncParamContact = Thrift.copyList(args.syncParamContact, [lineType.SyncParamContact]); - } - if (args.syncParamMid !== undefined && args.syncParamMid !== null) { - this.syncParamMid = Thrift.copyList(args.syncParamMid, [lineType.SyncParamMid]); - } - } - } -}; -lineType.SyncScope = class { - constructor(args) { - this.syncProfile = null; - this.syncSettings = null; - this.syncSticker = null; - this.syncThemeShop = null; - this.contact = null; - this.group = null; - this.room = null; - this.chat = null; - if (args) { - if (args.syncProfile !== undefined && args.syncProfile !== null) { - this.syncProfile = args.syncProfile; - } - if (args.syncSettings !== undefined && args.syncSettings !== null) { - this.syncSettings = args.syncSettings; - } - if (args.syncSticker !== undefined && args.syncSticker !== null) { - this.syncSticker = args.syncSticker; - } - if (args.syncThemeShop !== undefined && args.syncThemeShop !== null) { - this.syncThemeShop = args.syncThemeShop; - } - if (args.contact !== undefined && args.contact !== null) { - this.contact = new lineType.SyncRelations(args.contact); - } - if (args.group !== undefined && args.group !== null) { - this.group = new lineType.SyncRelations(args.group); - } - if (args.room !== undefined && args.room !== null) { - this.room = new lineType.SyncRelations(args.room); - } - if (args.chat !== undefined && args.chat !== null) { - this.chat = new lineType.SyncRelations(args.chat); - } - } - } -}; -lineType.JoinSquareResponse = class { - constructor(args) { - this.square = null; - this.squareAuthority = null; - this.squareStatus = null; - this.squareMember = null; - this.squareFeatureSet = null; - this.noteStatus = null; - if (args) { - if (args.square !== undefined && args.square !== null) { - this.square = new lineType.Square(args.square); - } - if (args.squareAuthority !== undefined && args.squareAuthority !== null) { - this.squareAuthority = new lineType.SquareAuthority(args.squareAuthority); - } - if (args.squareStatus !== undefined && args.squareStatus !== null) { - this.squareStatus = new lineType.SquareStatus(args.squareStatus); - } - if (args.squareMember !== undefined && args.squareMember !== null) { - this.squareMember = new lineType.SquareMember(args.squareMember); - } - if (args.squareFeatureSet !== undefined && args.squareFeatureSet !== null) { - this.squareFeatureSet = new lineType.SquareFeatureSet(args.squareFeatureSet); - } - if (args.noteStatus !== undefined && args.noteStatus !== null) { - this.noteStatus = new lineType.NoteStatus(args.noteStatus); - } - } - } -}; -lineType.JoinSquareRequest = class { - constructor(args) { - this.squareMid = null; - this.member = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.member !== undefined && args.member !== null) { - this.member = new lineType.SquareMember(args.member); - } - } - } -}; -lineType.JoinSquareChatResponse = class { - constructor(args) { - this.squareChat = null; - this.squareChatStatus = null; - this.squareChatMember = null; - if (args) { - if (args.squareChat !== undefined && args.squareChat !== null) { - this.squareChat = new lineType.SquareChat(args.squareChat); - } - if (args.squareChatStatus !== undefined && args.squareChatStatus !== null) { - this.squareChatStatus = new lineType.SquareChatStatus(args.squareChatStatus); - } - if (args.squareChatMember !== undefined && args.squareChatMember !== null) { - this.squareChatMember = new lineType.SquareChatMember(args.squareChatMember); - } - } - } -}; -lineType.JoinSquareChatRequest = class { - constructor(args) { - this.squareChatMid = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - } - } -}; -lineType.SendMessageResponse = class { - constructor(args) { - this.createdSquareMessage = null; - if (args) { - if (args.createdSquareMessage !== undefined && args.createdSquareMessage !== null) { - this.createdSquareMessage = new lineType.SquareMessage(args.createdSquareMessage); - } - } - } -}; -lineType.SendMessageRequest = class { - constructor(args) { - this.reqSeq = null; - this.squareChatMid = null; - this.squareMessage = null; - if (args) { - if (args.reqSeq !== undefined && args.reqSeq !== null) { - this.reqSeq = args.reqSeq; - } - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareMessage !== undefined && args.squareMessage !== null) { - this.squareMessage = new lineType.SquareMessage(args.squareMessage); - } - } - } -}; -lineType.MarkAsReadRequest = class { - constructor(args) { - this.squareChatMid = null; - this.messageId = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.messageId !== undefined && args.messageId !== null) { - this.messageId = args.messageId; - } - } - } -}; -lineType.MarkAsReadResponse = class { - constructor(args) {} -}; -lineType.SubscriptionState = class { - constructor(args) { - this.subscriptionId = null; - this.ttlMillis = null; - if (args) { - if (args.subscriptionId !== undefined && args.subscriptionId !== null) { - this.subscriptionId = args.subscriptionId; - } - if (args.ttlMillis !== undefined && args.ttlMillis !== null) { - this.ttlMillis = args.ttlMillis; - } - } - } -}; -lineType.ApproveSquareMembersResponse = class { - constructor(args) { - this.approvedMembers = null; - this.status = null; - if (args) { - if (args.approvedMembers !== undefined && args.approvedMembers !== null) { - this.approvedMembers = Thrift.copyList(args.approvedMembers, [lineType.SquareMember]); - } - if (args.status !== undefined && args.status !== null) { - this.status = new lineType.SquareStatus(args.status); - } - } - } -}; -lineType.ApproveSquareMembersRequest = class { - constructor(args) { - this.squareMid = null; - this.requestedMemberMids = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.requestedMemberMids !== undefined && args.requestedMemberMids !== null) { - this.requestedMemberMids = Thrift.copyList(args.requestedMemberMids, [null]); - } - } - } -}; -lineType.CreateSquareChatResponse = class { - constructor(args) { - this.squareChat = null; - this.squareChatStatus = null; - this.squareChatMember = null; - if (args) { - if (args.squareChat !== undefined && args.squareChat !== null) { - this.squareChat = new lineType.SquareChat(args.squareChat); - } - if (args.squareChatStatus !== undefined && args.squareChatStatus !== null) { - this.squareChatStatus = new lineType.SquareChatStatus(args.squareChatStatus); - } - if (args.squareChatMember !== undefined && args.squareChatMember !== null) { - this.squareChatMember = new lineType.SquareChatMember(args.squareChatMember); - } - } - } -}; -lineType.CreateSquareChatRequest = class { - constructor(args) { - this.reqSeq = null; - this.squareChat = null; - this.squareMemberMids = null; - if (args) { - if (args.reqSeq !== undefined && args.reqSeq !== null) { - this.reqSeq = args.reqSeq; - } - if (args.squareChat !== undefined && args.squareChat !== null) { - this.squareChat = new lineType.SquareChat(args.squareChat); - } - if (args.squareMemberMids !== undefined && args.squareMemberMids !== null) { - this.squareMemberMids = Thrift.copyList(args.squareMemberMids, [null]); - } - } - } -}; -lineType.CreateSquareResponse = class { - constructor(args) { - this.square = null; - this.creator = null; - this.authority = null; - this.status = null; - if (args) { - if (args.square !== undefined && args.square !== null) { - this.square = new lineType.Square(args.square); - } - if (args.creator !== undefined && args.creator !== null) { - this.creator = new lineType.SquareMember(args.creator); - } - if (args.authority !== undefined && args.authority !== null) { - this.authority = new lineType.SquareAuthority(args.authority); - } - if (args.status !== undefined && args.status !== null) { - this.status = new lineType.SquareStatus(args.status); - } - } - } -}; -lineType.CreateSquareRequest = class { - constructor(args) { - this.reqSeq = null; - this.square = null; - this.creator = null; - if (args) { - if (args.reqSeq !== undefined && args.reqSeq !== null) { - this.reqSeq = args.reqSeq; - } - if (args.square !== undefined && args.square !== null) { - this.square = new lineType.Square(args.square); - } - if (args.creator !== undefined && args.creator !== null) { - this.creator = new lineType.SquareMember(args.creator); - } - } - } -}; -lineType.DeleteSquareResponse = class { - constructor(args) {} -}; -lineType.DeleteSquareRequest = class { - constructor(args) { - this.mid = null; - this.revision = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - } - } -}; -lineType.DestroyMessageResponse = class { - constructor(args) {} -}; -lineType.DestroyMessageRequest = class { - constructor(args) { - this.squareChatMid = null; - this.messageId = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.messageId !== undefined && args.messageId !== null) { - this.messageId = args.messageId; - } - } - } -}; -lineType.GetSquareChatMembersRequest = class { - constructor(args) { - this.squareChatMid = null; - this.continuationToken = null; - this.limit = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.limit !== undefined && args.limit !== null) { - this.limit = args.limit; - } - } - } -}; -lineType.GetSquareChatMembersResponse = class { - constructor(args) { - this.squareChatMembers = null; - this.continuationToken = null; - if (args) { - if (args.squareChatMembers !== undefined && args.squareChatMembers !== null) { - this.squareChatMembers = Thrift.copyList(args.squareChatMembers, [lineType.SquareMember]); - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - } - } -}; -lineType.GetSquareChatStatusRequest = class { - constructor(args) { - this.squareChatMid = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - } - } -}; -lineType.GetSquareChatStatusResponse = class { - constructor(args) { - this.chatStatus = null; - if (args) { - if (args.chatStatus !== undefined && args.chatStatus !== null) { - this.chatStatus = new lineType.SquareChatStatus(args.chatStatus); - } - } - } -}; -lineType.GetSquareChatRequest = class { - constructor(args) { - this.squareChatMid = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - } - } -}; -lineType.GetSquareChatResponse = class { - constructor(args) { - this.squareChat = null; - this.squareChatMember = null; - this.squareChatStatus = null; - if (args) { - if (args.squareChat !== undefined && args.squareChat !== null) { - this.squareChat = new lineType.SquareChat(args.squareChat); - } - if (args.squareChatMember !== undefined && args.squareChatMember !== null) { - this.squareChatMember = new lineType.SquareChatMember(args.squareChatMember); - } - if (args.squareChatStatus !== undefined && args.squareChatStatus !== null) { - this.squareChatStatus = new lineType.SquareChatStatus(args.squareChatStatus); - } - } - } -}; -lineType.GetSquareAuthorityRequest = class { - constructor(args) { - this.squareMid = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - } - } -}; -lineType.GetSquareAuthorityResponse = class { - constructor(args) { - this.authority = null; - if (args) { - if (args.authority !== undefined && args.authority !== null) { - this.authority = new lineType.SquareAuthority(args.authority); - } - } - } -}; -lineType.GetJoinedSquaresRequest = class { - constructor(args) { - this.continuationToken = null; - this.limit = null; - if (args) { - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.limit !== undefined && args.limit !== null) { - this.limit = args.limit; - } - } - } -}; -lineType.GetJoinedSquaresResponse = class { - constructor(args) { - this.squares = null; - this.members = null; - this.authorities = null; - this.statuses = null; - this.continuationToken = null; - this.noteStatuses = null; - if (args) { - if (args.squares !== undefined && args.squares !== null) { - this.squares = Thrift.copyList(args.squares, [lineType.Square]); - } - if (args.members !== undefined && args.members !== null) { - this.members = Thrift.copyMap(args.members, [lineType.SquareMember]); - } - if (args.authorities !== undefined && args.authorities !== null) { - this.authorities = Thrift.copyMap(args.authorities, [lineType.SquareAuthority]); - } - if (args.statuses !== undefined && args.statuses !== null) { - this.statuses = Thrift.copyMap(args.statuses, [lineType.SquareStatus]); - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.noteStatuses !== undefined && args.noteStatuses !== null) { - this.noteStatuses = Thrift.copyMap(args.noteStatuses, [lineType.NoteStatus]); - } - } - } -}; -lineType.GetJoinableSquareChatsRequest = class { - constructor(args) { - this.squareMid = null; - this.continuationToken = null; - this.limit = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.limit !== undefined && args.limit !== null) { - this.limit = args.limit; - } - } - } -}; -lineType.GetJoinableSquareChatsResponse = class { - constructor(args) { - this.squareChats = null; - this.continuationToken = null; - this.totalSquareChatCount = null; - this.squareChatStatuses = null; - if (args) { - if (args.squareChats !== undefined && args.squareChats !== null) { - this.squareChats = Thrift.copyList(args.squareChats, [lineType.SquareChat]); - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.totalSquareChatCount !== undefined && args.totalSquareChatCount !== null) { - this.totalSquareChatCount = args.totalSquareChatCount; - } - if (args.squareChatStatuses !== undefined && args.squareChatStatuses !== null) { - this.squareChatStatuses = Thrift.copyMap(args.squareChatStatuses, [lineType.SquareChatStatus]); - } - } - } -}; -lineType.GetInvitationTicketUrlRequest = class { - constructor(args) { - this.mid = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - } - } -}; -lineType.GetInvitationTicketUrlResponse = class { - constructor(args) { - this.invitationURL = null; - if (args) { - if (args.invitationURL !== undefined && args.invitationURL !== null) { - this.invitationURL = args.invitationURL; - } - } - } -}; -lineType.LeaveSquareRequest = class { - constructor(args) { - this.squareMid = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - } - } -}; -lineType.LeaveSquareResponse = class { - constructor(args) {} -}; -lineType.LeaveSquareChatRequest = class { - constructor(args) { - this.squareChatMid = null; - this.sayGoodbye = null; - this.squareChatMemberRevision = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.sayGoodbye !== undefined && args.sayGoodbye !== null) { - this.sayGoodbye = args.sayGoodbye; - } - if (args.squareChatMemberRevision !== undefined && args.squareChatMemberRevision !== null) { - this.squareChatMemberRevision = args.squareChatMemberRevision; - } - } - } -}; -lineType.LeaveSquareChatResponse = class { - constructor(args) {} -}; -lineType.SquareMemberSearchOption = class { - constructor(args) { - this.membershipState = null; - this.memberRoles = null; - this.displayName = null; - this.ableToReceiveMessage = null; - this.ableToReceiveFriendRequest = null; - this.chatMidToExcludeMembers = null; - this.includingMe = null; - if (args) { - if (args.membershipState !== undefined && args.membershipState !== null) { - this.membershipState = args.membershipState; - } - if (args.memberRoles !== undefined && args.memberRoles !== null) { - this.memberRoles = Thrift.copyList(args.memberRoles, [null]); - } - if (args.displayName !== undefined && args.displayName !== null) { - this.displayName = args.displayName; - } - if (args.ableToReceiveMessage !== undefined && args.ableToReceiveMessage !== null) { - this.ableToReceiveMessage = args.ableToReceiveMessage; - } - if (args.ableToReceiveFriendRequest !== undefined && args.ableToReceiveFriendRequest !== null) { - this.ableToReceiveFriendRequest = args.ableToReceiveFriendRequest; - } - if (args.chatMidToExcludeMembers !== undefined && args.chatMidToExcludeMembers !== null) { - this.chatMidToExcludeMembers = args.chatMidToExcludeMembers; - } - if (args.includingMe !== undefined && args.includingMe !== null) { - this.includingMe = args.includingMe; - } - } - } -}; -lineType.SearchSquareMembersRequest = class { - constructor(args) { - this.squareMid = null; - this.searchOption = null; - this.continuationToken = null; - this.limit = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.searchOption !== undefined && args.searchOption !== null) { - this.searchOption = new lineType.SquareMemberSearchOption(args.searchOption); - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.limit !== undefined && args.limit !== null) { - this.limit = args.limit; - } - } - } -}; -lineType.SearchSquareMembersResponse = class { - constructor(args) { - this.members = null; - this.revision = null; - this.continuationToken = null; - this.totalCount = null; - if (args) { - if (args.members !== undefined && args.members !== null) { - this.members = Thrift.copyList(args.members, [lineType.SquareMember]); - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.totalCount !== undefined && args.totalCount !== null) { - this.totalCount = args.totalCount; - } - } - } -}; -lineType.FindSquareByInvitationTicketRequest = class { - constructor(args) { - this.invitationTicket = null; - if (args) { - if (args.invitationTicket !== undefined && args.invitationTicket !== null) { - this.invitationTicket = args.invitationTicket; - } - } - } -}; -lineType.FindSquareByInvitationTicketResponse = class { - constructor(args) { - this.square = null; - this.myMembership = null; - this.squareAuthority = null; - this.squareStatus = null; - if (args) { - if (args.square !== undefined && args.square !== null) { - this.square = new lineType.Square(args.square); - } - if (args.myMembership !== undefined && args.myMembership !== null) { - this.myMembership = new lineType.SquareMember(args.myMembership); - } - if (args.squareAuthority !== undefined && args.squareAuthority !== null) { - this.squareAuthority = new lineType.SquareAuthority(args.squareAuthority); - } - if (args.squareStatus !== undefined && args.squareStatus !== null) { - this.squareStatus = new lineType.SquareStatus(args.squareStatus); - } - } - } -}; -lineType.SquareEventReceiveMessage = class { - constructor(args) { - this.squareChatMid = null; - this.squareMessage = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareMessage !== undefined && args.squareMessage !== null) { - this.squareMessage = new lineType.SquareMessage(args.squareMessage); - } - } - } -}; -lineType.SquareEventSendMessage = class { - constructor(args) { - this.squareChatMid = null; - this.squareMessage = null; - this.reqSeq = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareMessage !== undefined && args.squareMessage !== null) { - this.squareMessage = new lineType.SquareMessage(args.squareMessage); - } - if (args.reqSeq !== undefined && args.reqSeq !== null) { - this.reqSeq = args.reqSeq; - } - } - } -}; -lineType.SquareEventNotifiedJoinSquareChat = class { - constructor(args) { - this.squareChatMid = null; - this.joinedMember = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.joinedMember !== undefined && args.joinedMember !== null) { - this.joinedMember = new lineType.SquareMember(args.joinedMember); - } - } - } -}; -lineType.SquareEventNotifiedInviteIntoSquareChat = class { - constructor(args) { - this.squareChatMid = null; - this.invitees = null; - this.invitor = null; - this.invitorRelation = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.invitees !== undefined && args.invitees !== null) { - this.invitees = Thrift.copyList(args.invitees, [lineType.SquareMember]); - } - if (args.invitor !== undefined && args.invitor !== null) { - this.invitor = new lineType.SquareMember(args.invitor); - } - if (args.invitorRelation !== undefined && args.invitorRelation !== null) { - this.invitorRelation = new lineType.SquareMemberRelation(args.invitorRelation); - } - } - } -}; -lineType.SquareEventNotifiedLeaveSquareChat = class { - constructor(args) { - this.squareChatMid = null; - this.squareMemberMid = null; - this.sayGoodbye = null; - this.squareMember = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareMemberMid !== undefined && args.squareMemberMid !== null) { - this.squareMemberMid = args.squareMemberMid; - } - if (args.sayGoodbye !== undefined && args.sayGoodbye !== null) { - this.sayGoodbye = args.sayGoodbye; - } - if (args.squareMember !== undefined && args.squareMember !== null) { - this.squareMember = new lineType.SquareMember(args.squareMember); - } - } - } -}; -lineType.SquareEventNotifiedDestroyMessage = class { - constructor(args) { - this.squareChatMid = null; - this.messageId = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.messageId !== undefined && args.messageId !== null) { - this.messageId = args.messageId; - } - } - } -}; -lineType.SquareEventNotifiedMarkAsRead = class { - constructor(args) { - this.squareChatMid = null; - this.sMemberMid = null; - this.messageId = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.sMemberMid !== undefined && args.sMemberMid !== null) { - this.sMemberMid = args.sMemberMid; - } - if (args.messageId !== undefined && args.messageId !== null) { - this.messageId = args.messageId; - } - } - } -}; -lineType.SquareEventNotifiedUpdateSquareMemberProfile = class { - constructor(args) { - this.squareChatMid = null; - this.squareMember = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareMember !== undefined && args.squareMember !== null) { - this.squareMember = new lineType.SquareMember(args.squareMember); - } - } - } -}; -lineType.SquareEventNotifiedKickoutFromSquare = class { - constructor(args) { - this.squareChatMid = null; - this.kickees = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.kickees !== undefined && args.kickees !== null) { - this.kickees = Thrift.copyList(args.kickees, [lineType.SquareMember]); - } - } - } -}; -lineType.SquareEventNotifiedShutdownSquare = class { - constructor(args) { - this.squareChatMid = null; - this.square = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.square !== undefined && args.square !== null) { - this.square = new lineType.Square(args.square); - } - } - } -}; -lineType.SquareEventNotifiedDeleteSquareChat = class { - constructor(args) { - this.squareChat = null; - if (args) { - if (args.squareChat !== undefined && args.squareChat !== null) { - this.squareChat = new lineType.SquareChat(args.squareChat); - } - } - } -}; -lineType.SquareEventNotifiedUpdateSquareChatProfileName = class { - constructor(args) { - this.squareChatMid = null; - this.editor = null; - this.updatedChatName = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.editor !== undefined && args.editor !== null) { - this.editor = new lineType.SquareMember(args.editor); - } - if (args.updatedChatName !== undefined && args.updatedChatName !== null) { - this.updatedChatName = args.updatedChatName; - } - } - } -}; -lineType.SquareEventNotifiedUpdateSquareChatProfileImage = class { - constructor(args) { - this.squareChatMid = null; - this.editor = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.editor !== undefined && args.editor !== null) { - this.editor = new lineType.SquareMember(args.editor); - } - } - } -}; -lineType.SquareEventNotifiedUpdateSquareChatStatus = class { - constructor(args) { - this.squareChatMid = null; - this.statusWithoutMessage = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.statusWithoutMessage !== undefined && args.statusWithoutMessage !== null) { - this.statusWithoutMessage = new lineType.SquareChatStatusWithoutMessage(args.statusWithoutMessage); - } - } - } -}; -lineType.SquareEventNotifiedUpdateSquareStatus = class { - constructor(args) { - this.squareMid = null; - this.squareStatus = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.squareStatus !== undefined && args.squareStatus !== null) { - this.squareStatus = new lineType.SquareStatus(args.squareStatus); - } - } - } -}; -lineType.SquareEventNotifiedCreateSquareMember = class { - constructor(args) { - this.square = null; - this.squareAuthority = null; - this.squareStatus = null; - this.squareMember = null; - this.squareFeatureSet = null; - if (args) { - if (args.square !== undefined && args.square !== null) { - this.square = new lineType.Square(args.square); - } - if (args.squareAuthority !== undefined && args.squareAuthority !== null) { - this.squareAuthority = new lineType.SquareAuthority(args.squareAuthority); - } - if (args.squareStatus !== undefined && args.squareStatus !== null) { - this.squareStatus = new lineType.SquareStatus(args.squareStatus); - } - if (args.squareMember !== undefined && args.squareMember !== null) { - this.squareMember = new lineType.SquareMember(args.squareMember); - } - if (args.squareFeatureSet !== undefined && args.squareFeatureSet !== null) { - this.squareFeatureSet = new lineType.SquareFeatureSet(args.squareFeatureSet); - } - } - } -}; -lineType.SquareEventNotifiedCreateSquareChatMember = class { - constructor(args) { - this.squareChatMid = null; - this.squareMemberMid = null; - this.squareChatMember = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareMemberMid !== undefined && args.squareMemberMid !== null) { - this.squareMemberMid = args.squareMemberMid; - } - if (args.squareChatMember !== undefined && args.squareChatMember !== null) { - this.squareChatMember = new lineType.SquareChatMember(args.squareChatMember); - } - } - } -}; -lineType.SquareEventNotifiedUpdateSquareMemberRelation = class { - constructor(args) { - this.squareMid = null; - this.myMemberMid = null; - this.targetSquareMemberMid = null; - this.squareMemberRelation = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.myMemberMid !== undefined && args.myMemberMid !== null) { - this.myMemberMid = args.myMemberMid; - } - if (args.targetSquareMemberMid !== undefined && args.targetSquareMemberMid !== null) { - this.targetSquareMemberMid = args.targetSquareMemberMid; - } - if (args.squareMemberRelation !== undefined && args.squareMemberRelation !== null) { - this.squareMemberRelation = new lineType.SquareMemberRelation(args.squareMemberRelation); - } - } - } -}; -lineType.SquareEventNotifiedUpdateSquare = class { - constructor(args) { - this.squareMid = null; - this.square = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.square !== undefined && args.square !== null) { - this.square = new lineType.Square(args.square); - } - } - } -}; -lineType.SquareEventNotifiedUpdateSquareMember = class { - constructor(args) { - this.squareMid = null; - this.squareMemberMid = null; - this.squareMember = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.squareMemberMid !== undefined && args.squareMemberMid !== null) { - this.squareMemberMid = args.squareMemberMid; - } - if (args.squareMember !== undefined && args.squareMember !== null) { - this.squareMember = new lineType.SquareMember(args.squareMember); - } - } - } -}; -lineType.SquareEventNotifiedUpdateSquareChat = class { - constructor(args) { - this.squareMid = null; - this.squareChatMid = null; - this.squareChat = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareChat !== undefined && args.squareChat !== null) { - this.squareChat = new lineType.SquareChat(args.squareChat); - } - } - } -}; -lineType.SquareEventNotificationJoinRequest = class { - constructor(args) { - this.squareMid = null; - this.squareName = null; - this.requestMemberName = null; - this.profileImageObsHash = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.squareName !== undefined && args.squareName !== null) { - this.squareName = args.squareName; - } - if (args.requestMemberName !== undefined && args.requestMemberName !== null) { - this.requestMemberName = args.requestMemberName; - } - if (args.profileImageObsHash !== undefined && args.profileImageObsHash !== null) { - this.profileImageObsHash = args.profileImageObsHash; - } - } - } -}; -lineType.SquareEventNotificationMemberUpdate = class { - constructor(args) { - this.squareMid = null; - this.squareName = null; - this.profileImageObsHash = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.squareName !== undefined && args.squareName !== null) { - this.squareName = args.squareName; - } - if (args.profileImageObsHash !== undefined && args.profileImageObsHash !== null) { - this.profileImageObsHash = args.profileImageObsHash; - } - } - } -}; -lineType.SquareEventNotificationSquareDelete = class { - constructor(args) { - this.squareMid = null; - this.squareName = null; - this.profileImageObsHash = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.squareName !== undefined && args.squareName !== null) { - this.squareName = args.squareName; - } - if (args.profileImageObsHash !== undefined && args.profileImageObsHash !== null) { - this.profileImageObsHash = args.profileImageObsHash; - } - } - } -}; -lineType.SquareEventNotificationSquareChatDelete = class { - constructor(args) { - this.squareChatMid = null; - this.squareChatName = null; - this.profileImageObsHash = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareChatName !== undefined && args.squareChatName !== null) { - this.squareChatName = args.squareChatName; - } - if (args.profileImageObsHash !== undefined && args.profileImageObsHash !== null) { - this.profileImageObsHash = args.profileImageObsHash; - } - } - } -}; -lineType.SquareEventNotificationMessage = class { - constructor(args) { - this.squareChatMid = null; - this.squareMessage = null; - this.senderDisplayName = null; - this.unreadCount = null; - this.requiredToFetchChatEvents = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareMessage !== undefined && args.squareMessage !== null) { - this.squareMessage = new lineType.SquareMessage(args.squareMessage); - } - if (args.senderDisplayName !== undefined && args.senderDisplayName !== null) { - this.senderDisplayName = args.senderDisplayName; - } - if (args.unreadCount !== undefined && args.unreadCount !== null) { - this.unreadCount = args.unreadCount; - } - if (args.requiredToFetchChatEvents !== undefined && args.requiredToFetchChatEvents !== null) { - this.requiredToFetchChatEvents = args.requiredToFetchChatEvents; - } - } - } -}; -lineType.SquareEventNotifiedUpdateSquareChatMember = class { - constructor(args) { - this.squareChatMid = null; - this.squareMemberMid = null; - this.squareChatMember = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareMemberMid !== undefined && args.squareMemberMid !== null) { - this.squareMemberMid = args.squareMemberMid; - } - if (args.squareChatMember !== undefined && args.squareChatMember !== null) { - this.squareChatMember = new lineType.SquareChatMember(args.squareChatMember); - } - } - } -}; -lineType.SquareEventNotifiedUpdateSquareAuthority = class { - constructor(args) { - this.squareMid = null; - this.squareAuthority = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.squareAuthority !== undefined && args.squareAuthority !== null) { - this.squareAuthority = new lineType.SquareAuthority(args.squareAuthority); - } - } - } -}; -lineType.SquareEventNotifiedUpdateSquareFeatureSet = class { - constructor(args) { - this.squareFeatureSet = null; - if (args) { - if (args.squareFeatureSet !== undefined && args.squareFeatureSet !== null) { - this.squareFeatureSet = new lineType.SquareFeatureSet(args.squareFeatureSet); - } - } - } -}; -lineType.SquareEventPayload = class { - constructor(args) { - this.receiveMessage = null; - this.sendMessage = null; - this.notifiedJoinSquareChat = null; - this.notifiedInviteIntoSquareChat = null; - this.notifiedLeaveSquareChat = null; - this.notifiedDestroyMessage = null; - this.notifiedMarkAsRead = null; - this.notifiedUpdateSquareMemberProfile = null; - this.notifiedKickoutFromSquare = null; - this.notifiedShutdownSquare = null; - this.notifiedDeleteSquareChat = null; - this.notifiedUpdateSquareChatProfileName = null; - this.notifiedUpdateSquareChatProfileImage = null; - this.notifiedUpdateSquareStatus = null; - this.notifiedUpdateSquareChatStatus = null; - this.notifiedCreateSquareMember = null; - this.notifiedCreateSquareChatMember = null; - this.notifiedUpdateSquareMemberRelation = null; - this.notifiedUpdateSquare = null; - this.notifiedUpdateSquareMember = null; - this.notifiedUpdateSquareChat = null; - this.notificationJoinRequest = null; - this.notificationJoined = null; - this.notificationPromoteCoadmin = null; - this.notificationPromoteAdmin = null; - this.notificationDemoteMember = null; - this.notificationKickedOut = null; - this.notificationSquareDelete = null; - this.notificationSquareChatDelete = null; - this.notificationMessage = null; - this.notifiedUpdateSquareChatMember = null; - this.notifiedUpdateSquareAuthority = null; - this.notifiedUpdateSquareFeatureSet = null; - if (args) { - if (args.receiveMessage !== undefined && args.receiveMessage !== null) { - this.receiveMessage = new lineType.SquareEventReceiveMessage(args.receiveMessage); - } - if (args.sendMessage !== undefined && args.sendMessage !== null) { - this.sendMessage = new lineType.SquareEventSendMessage(args.sendMessage); - } - if (args.notifiedJoinSquareChat !== undefined && args.notifiedJoinSquareChat !== null) { - this.notifiedJoinSquareChat = new lineType.SquareEventNotifiedJoinSquareChat( - args.notifiedJoinSquareChat, - ); - } - if (args.notifiedInviteIntoSquareChat !== undefined && args.notifiedInviteIntoSquareChat !== null) { - this.notifiedInviteIntoSquareChat = new lineType.SquareEventNotifiedInviteIntoSquareChat( - args.notifiedInviteIntoSquareChat, - ); - } - if (args.notifiedLeaveSquareChat !== undefined && args.notifiedLeaveSquareChat !== null) { - this.notifiedLeaveSquareChat = new lineType.SquareEventNotifiedLeaveSquareChat( - args.notifiedLeaveSquareChat, - ); - } - if (args.notifiedDestroyMessage !== undefined && args.notifiedDestroyMessage !== null) { - this.notifiedDestroyMessage = new lineType.SquareEventNotifiedDestroyMessage( - args.notifiedDestroyMessage, - ); - } - if (args.notifiedMarkAsRead !== undefined && args.notifiedMarkAsRead !== null) { - this.notifiedMarkAsRead = new lineType.SquareEventNotifiedMarkAsRead(args.notifiedMarkAsRead); - } - if ( - args.notifiedUpdateSquareMemberProfile !== undefined && args.notifiedUpdateSquareMemberProfile !== null - ) { - this.notifiedUpdateSquareMemberProfile = new lineType.SquareEventNotifiedUpdateSquareMemberProfile( - args.notifiedUpdateSquareMemberProfile, - ); - } - if (args.notifiedKickoutFromSquare !== undefined && args.notifiedKickoutFromSquare !== null) { - this.notifiedKickoutFromSquare = new lineType.SquareEventNotifiedKickoutFromSquare( - args.notifiedKickoutFromSquare, - ); - } - if (args.notifiedShutdownSquare !== undefined && args.notifiedShutdownSquare !== null) { - this.notifiedShutdownSquare = new lineType.SquareEventNotifiedShutdownSquare( - args.notifiedShutdownSquare, - ); - } - if (args.notifiedDeleteSquareChat !== undefined && args.notifiedDeleteSquareChat !== null) { - this.notifiedDeleteSquareChat = new lineType.SquareEventNotifiedDeleteSquareChat( - args.notifiedDeleteSquareChat, - ); - } - if ( - args.notifiedUpdateSquareChatProfileName !== undefined && - args.notifiedUpdateSquareChatProfileName !== null - ) { - this.notifiedUpdateSquareChatProfileName = new lineType.SquareEventNotifiedUpdateSquareChatProfileName( - args.notifiedUpdateSquareChatProfileName, - ); - } - if ( - args.notifiedUpdateSquareChatProfileImage !== undefined && - args.notifiedUpdateSquareChatProfileImage !== null - ) { - this.notifiedUpdateSquareChatProfileImage = new lineType - .SquareEventNotifiedUpdateSquareChatProfileImage(args.notifiedUpdateSquareChatProfileImage); - } - if (args.notifiedUpdateSquareStatus !== undefined && args.notifiedUpdateSquareStatus !== null) { - this.notifiedUpdateSquareStatus = new lineType.SquareEventNotifiedUpdateSquareStatus( - args.notifiedUpdateSquareStatus, - ); - } - if (args.notifiedUpdateSquareChatStatus !== undefined && args.notifiedUpdateSquareChatStatus !== null) { - this.notifiedUpdateSquareChatStatus = new lineType.SquareEventNotifiedUpdateSquareChatStatus( - args.notifiedUpdateSquareChatStatus, - ); - } - if (args.notifiedCreateSquareMember !== undefined && args.notifiedCreateSquareMember !== null) { - this.notifiedCreateSquareMember = new lineType.SquareEventNotifiedCreateSquareMember( - args.notifiedCreateSquareMember, - ); - } - if (args.notifiedCreateSquareChatMember !== undefined && args.notifiedCreateSquareChatMember !== null) { - this.notifiedCreateSquareChatMember = new lineType.SquareEventNotifiedCreateSquareChatMember( - args.notifiedCreateSquareChatMember, - ); - } - if ( - args.notifiedUpdateSquareMemberRelation !== undefined && - args.notifiedUpdateSquareMemberRelation !== null - ) { - this.notifiedUpdateSquareMemberRelation = new lineType.SquareEventNotifiedUpdateSquareMemberRelation( - args.notifiedUpdateSquareMemberRelation, - ); - } - if (args.notifiedUpdateSquare !== undefined && args.notifiedUpdateSquare !== null) { - this.notifiedUpdateSquare = new lineType.SquareEventNotifiedUpdateSquare(args.notifiedUpdateSquare); - } - if (args.notifiedUpdateSquareMember !== undefined && args.notifiedUpdateSquareMember !== null) { - this.notifiedUpdateSquareMember = new lineType.SquareEventNotifiedUpdateSquareMember( - args.notifiedUpdateSquareMember, - ); - } - if (args.notifiedUpdateSquareChat !== undefined && args.notifiedUpdateSquareChat !== null) { - this.notifiedUpdateSquareChat = new lineType.SquareEventNotifiedUpdateSquareChat( - args.notifiedUpdateSquareChat, - ); - } - if (args.notificationJoinRequest !== undefined && args.notificationJoinRequest !== null) { - this.notificationJoinRequest = new lineType.SquareEventNotificationJoinRequest( - args.notificationJoinRequest, - ); - } - if (args.notificationJoined !== undefined && args.notificationJoined !== null) { - this.notificationJoined = new lineType.SquareEventNotificationMemberUpdate(args.notificationJoined); - } - if (args.notificationPromoteCoadmin !== undefined && args.notificationPromoteCoadmin !== null) { - this.notificationPromoteCoadmin = new lineType.SquareEventNotificationMemberUpdate( - args.notificationPromoteCoadmin, - ); - } - if (args.notificationPromoteAdmin !== undefined && args.notificationPromoteAdmin !== null) { - this.notificationPromoteAdmin = new lineType.SquareEventNotificationMemberUpdate( - args.notificationPromoteAdmin, - ); - } - if (args.notificationDemoteMember !== undefined && args.notificationDemoteMember !== null) { - this.notificationDemoteMember = new lineType.SquareEventNotificationMemberUpdate( - args.notificationDemoteMember, - ); - } - if (args.notificationKickedOut !== undefined && args.notificationKickedOut !== null) { - this.notificationKickedOut = new lineType.SquareEventNotificationMemberUpdate( - args.notificationKickedOut, - ); - } - if (args.notificationSquareDelete !== undefined && args.notificationSquareDelete !== null) { - this.notificationSquareDelete = new lineType.SquareEventNotificationSquareDelete( - args.notificationSquareDelete, - ); - } - if (args.notificationSquareChatDelete !== undefined && args.notificationSquareChatDelete !== null) { - this.notificationSquareChatDelete = new lineType.SquareEventNotificationSquareChatDelete( - args.notificationSquareChatDelete, - ); - } - if (args.notificationMessage !== undefined && args.notificationMessage !== null) { - this.notificationMessage = new lineType.SquareEventNotificationMessage(args.notificationMessage); - } - if (args.notifiedUpdateSquareChatMember !== undefined && args.notifiedUpdateSquareChatMember !== null) { - this.notifiedUpdateSquareChatMember = new lineType.SquareEventNotifiedUpdateSquareChatMember( - args.notifiedUpdateSquareChatMember, - ); - } - if (args.notifiedUpdateSquareAuthority !== undefined && args.notifiedUpdateSquareAuthority !== null) { - this.notifiedUpdateSquareAuthority = new lineType.SquareEventNotifiedUpdateSquareAuthority( - args.notifiedUpdateSquareAuthority, - ); - } - if (args.notifiedUpdateSquareFeatureSet !== undefined && args.notifiedUpdateSquareFeatureSet !== null) { - this.notifiedUpdateSquareFeatureSet = new lineType.SquareEventNotifiedUpdateSquareFeatureSet( - args.notifiedUpdateSquareFeatureSet, - ); - } - } - } -}; -lineType.SquareEvent = class { - constructor(args) { - this.createdTime = null; - this.type = 0; - this.payload = null; - this.syncToken = null; - this.eventStatus = null; - if (args) { - if (args.createdTime !== undefined && args.createdTime !== null) { - this.createdTime = args.createdTime; - } - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.payload !== undefined && args.payload !== null) { - this.payload = new lineType.SquareEventPayload(args.payload); - } - if (args.syncToken !== undefined && args.syncToken !== null) { - this.syncToken = args.syncToken; - } - if (args.eventStatus !== undefined && args.eventStatus !== null) { - this.eventStatus = args.eventStatus; - } - } - } -}; -lineType.FetchMyEventsRequest = class { - constructor(args) { - this.subscriptionId = null; - this.syncToken = null; - this.limit = null; - this.continuationToken = null; - if (args) { - if (args.subscriptionId !== undefined && args.subscriptionId !== null) { - this.subscriptionId = args.subscriptionId; - } - if (args.syncToken !== undefined && args.syncToken !== null) { - this.syncToken = args.syncToken; - } - if (args.limit !== undefined && args.limit !== null) { - this.limit = args.limit; - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - } - } -}; -lineType.FetchMyEventsResponse = class { - constructor(args) { - this.subscription = null; - this.events = null; - this.syncToken = null; - this.continuationToken = null; - if (args) { - if (args.subscription !== undefined && args.subscription !== null) { - this.subscription = new lineType.SubscriptionState(args.subscription); - } - if (args.events !== undefined && args.events !== null) { - this.events = Thrift.copyList(args.events, [lineType.SquareEvent]); - } - if (args.syncToken !== undefined && args.syncToken !== null) { - this.syncToken = args.syncToken; - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - } - } -}; -lineType.FetchSquareChatEventsRequest = class { - constructor(args) { - this.subscriptionId = null; - this.squareChatMid = null; - this.syncToken = null; - this.limit = null; - this.direction = null; - if (args) { - if (args.subscriptionId !== undefined && args.subscriptionId !== null) { - this.subscriptionId = args.subscriptionId; - } - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.syncToken !== undefined && args.syncToken !== null) { - this.syncToken = args.syncToken; - } - if (args.limit !== undefined && args.limit !== null) { - this.limit = args.limit; - } - if (args.direction !== undefined && args.direction !== null) { - this.direction = args.direction; - } - } - } -}; -lineType.FetchSquareChatEventsResponse = class { - constructor(args) { - this.subscription = null; - this.events = null; - this.syncToken = null; - this.continuationToken = null; - if (args) { - if (args.subscription !== undefined && args.subscription !== null) { - this.subscription = new lineType.SubscriptionState(args.subscription); - } - if (args.events !== undefined && args.events !== null) { - this.events = Thrift.copyList(args.events, [lineType.SquareEvent]); - } - if (args.syncToken !== undefined && args.syncToken !== null) { - this.syncToken = args.syncToken; - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - } - } -}; -lineType.InviteToSquareRequest = class { - constructor(args) { - this.squareMid = null; - this.invitees = null; - this.squareChatMid = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.invitees !== undefined && args.invitees !== null) { - this.invitees = Thrift.copyList(args.invitees, [null]); - } - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - } - } -}; -lineType.InviteToSquareResponse = class { - constructor(args) {} -}; -lineType.InviteToSquareChatRequest = class { - constructor(args) { - this.inviteeMids = null; - this.squareChatMid = null; - if (args) { - if (args.inviteeMids !== undefined && args.inviteeMids !== null) { - this.inviteeMids = Thrift.copyList(args.inviteeMids, [null]); - } - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - } - } -}; -lineType.InviteToSquareChatResponse = class { - constructor(args) { - this.inviteeMids = null; - if (args) { - if (args.inviteeMids !== undefined && args.inviteeMids !== null) { - this.inviteeMids = Thrift.copyList(args.inviteeMids, [null]); - } - } - } -}; -lineType.GetSquareMemberRequest = class { - constructor(args) { - this.squareMemberMid = null; - if (args) { - if (args.squareMemberMid !== undefined && args.squareMemberMid !== null) { - this.squareMemberMid = args.squareMemberMid; - } - } - } -}; -lineType.GetSquareMemberResponse = class { - constructor(args) { - this.squareMember = null; - this.relation = null; - this.oneOnOneChatMid = null; - if (args) { - if (args.squareMember !== undefined && args.squareMember !== null) { - this.squareMember = new lineType.SquareMember(args.squareMember); - } - if (args.relation !== undefined && args.relation !== null) { - this.relation = new lineType.SquareMemberRelation(args.relation); - } - if (args.oneOnOneChatMid !== undefined && args.oneOnOneChatMid !== null) { - this.oneOnOneChatMid = args.oneOnOneChatMid; - } - } - } -}; -lineType.GetSquareMembersRequest = class { - constructor(args) { - this.mids = null; - if (args) { - if (args.mids !== undefined && args.mids !== null) { - this.mids = Thrift.copyList(args.mids, [null]); - } - } - } -}; -lineType.GetSquareMembersResponse = class { - constructor(args) { - this.members = null; - if (args) { - if (args.members !== undefined && args.members !== null) { - this.members = new lineType.SquareMember(args.members); - } - } - } -}; -lineType.GetSquareMemberRelationsRequest = class { - constructor(args) { - this.state = null; - this.continuationToken = null; - this.limit = null; - if (args) { - if (args.state !== undefined && args.state !== null) { - this.state = args.state; - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.limit !== undefined && args.limit !== null) { - this.limit = args.limit; - } - } - } -}; -lineType.GetSquareMemberRelationsResponse = class { - constructor(args) { - this.squareMembers = null; - this.relations = null; - this.continuationToken = null; - if (args) { - if (args.squareMembers !== undefined && args.squareMembers !== null) { - this.squareMembers = Thrift.copyList(args.squareMembers, [lineType.SquareMember]); - } - if (args.relations !== undefined && args.relations !== null) { - this.relations = Thrift.copyMap(args.relations, [lineType.SquareMemberRelation]); - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - } - } -}; -lineType.GetSquareMemberRelationRequest = class { - constructor(args) { - this.squareMid = null; - this.targetSquareMemberMid = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.targetSquareMemberMid !== undefined && args.targetSquareMemberMid !== null) { - this.targetSquareMemberMid = args.targetSquareMemberMid; - } - } - } -}; -lineType.GetSquareMemberRelationResponse = class { - constructor(args) { - this.squareMid = null; - this.targetSquareMemberMid = null; - this.relation = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.targetSquareMemberMid !== undefined && args.targetSquareMemberMid !== null) { - this.targetSquareMemberMid = args.targetSquareMemberMid; - } - if (args.relation !== undefined && args.relation !== null) { - this.relation = new lineType.SquareMemberRelation(args.relation); - } - } - } -}; -lineType.Category = class { - constructor(args) { - this.id = null; - this.name = null; - if (args) { - if (args.id !== undefined && args.id !== null) { - this.id = args.id; - } - if (args.name !== undefined && args.name !== null) { - this.name = args.name; - } - } - } -}; -lineType.GetSquareCategoriesRequest = class { - constructor(args) {} -}; -lineType.GetSquareCategoriesResponse = class { - constructor(args) { - this.categoryList = null; - if (args) { - if (args.categoryList !== undefined && args.categoryList !== null) { - this.categoryList = Thrift.copyList(args.categoryList, [lineType.Category]); - } - } - } -}; -lineType.UpdateSquareRequest = class { - constructor(args) { - this.updatedAttrs = null; - this.square = null; - if (args) { - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.square !== undefined && args.square !== null) { - this.square = new lineType.Square(args.square); - } - } - } -}; -lineType.UpdateSquareResponse = class { - constructor(args) { - this.updatedAttrs = null; - this.square = null; - if (args) { - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.square !== undefined && args.square !== null) { - this.square = new lineType.Square(args.square); - } - } - } -}; -lineType.SearchSquaresRequest = class { - constructor(args) { - this.query = null; - this.continuationToken = null; - this.limit = null; - if (args) { - if (args.query !== undefined && args.query !== null) { - this.query = args.query; - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.limit !== undefined && args.limit !== null) { - this.limit = args.limit; - } - } - } -}; -lineType.SearchSquaresResponse = class { - constructor(args) { - this.squares = null; - this.squareStatuses = null; - this.myMemberships = null; - this.continuationToken = null; - this.noteStatuses = null; - if (args) { - if (args.squares !== undefined && args.squares !== null) { - this.squares = Thrift.copyList(args.squares, [lineType.Square]); - } - if (args.squareStatuses !== undefined && args.squareStatuses !== null) { - this.squareStatuses = Thrift.copyMap(args.squareStatuses, [lineType.SquareStatus]); - } - if (args.myMemberships !== undefined && args.myMemberships !== null) { - this.myMemberships = Thrift.copyMap(args.myMemberships, [lineType.SquareMember]); - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.noteStatuses !== undefined && args.noteStatuses !== null) { - this.noteStatuses = Thrift.copyMap(args.noteStatuses, [lineType.NoteStatus]); - } - } - } -}; -lineType.GetSquareFeatureSetRequest = class { - constructor(args) { - this.squareMid = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - } - } -}; -lineType.GetSquareFeatureSetResponse = class { - constructor(args) { - this.squareFeatureSet = null; - if (args) { - if (args.squareFeatureSet !== undefined && args.squareFeatureSet !== null) { - this.squareFeatureSet = new lineType.SquareFeatureSet(args.squareFeatureSet); - } - } - } -}; -lineType.UpdateSquareFeatureSetRequest = class { - constructor(args) { - this.updateAttributes = null; - this.squareFeatureSet = null; - if (args) { - if (args.updateAttributes !== undefined && args.updateAttributes !== null) { - this.updateAttributes = Thrift.copyList(args.updateAttributes, [null]); - } - if (args.squareFeatureSet !== undefined && args.squareFeatureSet !== null) { - this.squareFeatureSet = new lineType.SquareFeatureSet(args.squareFeatureSet); - } - } - } -}; -lineType.UpdateSquareFeatureSetResponse = class { - constructor(args) { - this.updateAttributes = null; - this.squareFeatureSet = null; - if (args) { - if (args.updateAttributes !== undefined && args.updateAttributes !== null) { - this.updateAttributes = Thrift.copyList(args.updateAttributes, [null]); - } - if (args.squareFeatureSet !== undefined && args.squareFeatureSet !== null) { - this.squareFeatureSet = new lineType.SquareFeatureSet(args.squareFeatureSet); - } - } - } -}; -lineType.UpdateSquareMemberRequest = class { - constructor(args) { - this.updatedAttrs = null; - this.updatedPreferenceAttrs = null; - this.squareMember = null; - if (args) { - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.updatedPreferenceAttrs !== undefined && args.updatedPreferenceAttrs !== null) { - this.updatedPreferenceAttrs = Thrift.copyList(args.updatedPreferenceAttrs, [null]); - } - if (args.squareMember !== undefined && args.squareMember !== null) { - this.squareMember = new lineType.SquareMember(args.squareMember); - } - } - } -}; -lineType.UpdateSquareMemberResponse = class { - constructor(args) { - this.updatedAttrs = null; - this.squareMember = null; - this.updatedPreferenceAttrs = null; - if (args) { - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.squareMember !== undefined && args.squareMember !== null) { - this.squareMember = new lineType.SquareMember(args.squareMember); - } - if (args.updatedPreferenceAttrs !== undefined && args.updatedPreferenceAttrs !== null) { - this.updatedPreferenceAttrs = Thrift.copyList(args.updatedPreferenceAttrs, [null]); - } - } - } -}; -lineType.UpdateSquareMembersRequest = class { - constructor(args) { - this.updatedAttrs = null; - this.members = null; - if (args) { - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.members !== undefined && args.members !== null) { - this.members = Thrift.copyList(args.members, [lineType.SquareMember]); - } - } - } -}; -lineType.UpdateSquareMembersResponse = class { - constructor(args) { - this.updatedAttrs = null; - this.editor = null; - this.members = null; - if (args) { - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.editor !== undefined && args.editor !== null) { - this.editor = new lineType.SquareMember(args.editor); - } - if (args.members !== undefined && args.members !== null) { - this.members = Thrift.copyMap(args.members, [lineType.SquareMember]); - } - } - } -}; -lineType.RejectSquareMembersRequest = class { - constructor(args) { - this.squareMid = null; - this.requestedMemberMids = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.requestedMemberMids !== undefined && args.requestedMemberMids !== null) { - this.requestedMemberMids = Thrift.copyList(args.requestedMemberMids, [null]); - } - } - } -}; -lineType.RejectSquareMembersResponse = class { - constructor(args) { - this.rejectedMembers = null; - this.status = null; - if (args) { - if (args.rejectedMembers !== undefined && args.rejectedMembers !== null) { - this.rejectedMembers = Thrift.copyList(args.rejectedMembers, [lineType.SquareMember]); - } - if (args.status !== undefined && args.status !== null) { - this.status = new lineType.SquareStatus(args.status); - } - } - } -}; -lineType.RemoveSubscriptionsRequest = class { - constructor(args) { - this.unsubscriptions = null; - if (args) { - if (args.unsubscriptions !== undefined && args.unsubscriptions !== null) { - this.unsubscriptions = Thrift.copyList(args.unsubscriptions, [null]); - } - } - } -}; -lineType.RemoveSubscriptionsResponse = class { - constructor(args) {} -}; -lineType.RefreshSubscriptionsRequest = class { - constructor(args) { - this.subscriptions = null; - if (args) { - if (args.subscriptions !== undefined && args.subscriptions !== null) { - this.subscriptions = Thrift.copyList(args.subscriptions, [null]); - } - } - } -}; -lineType.RefreshSubscriptionsResponse = class { - constructor(args) { - this.ttlMillis = null; - this.subscriptionStates = null; - if (args) { - if (args.ttlMillis !== undefined && args.ttlMillis !== null) { - this.ttlMillis = args.ttlMillis; - } - if (args.subscriptionStates !== undefined && args.subscriptionStates !== null) { - this.subscriptionStates = Thrift.copyMap(args.subscriptionStates, [lineType.SubscriptionState]); - } - } - } -}; -lineType.UpdateSquareChatRequest = class { - constructor(args) { - this.updatedAttrs = null; - this.squareChat = null; - if (args) { - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.squareChat !== undefined && args.squareChat !== null) { - this.squareChat = new lineType.SquareChat(args.squareChat); - } - } - } -}; -lineType.UpdateSquareChatResponse = class { - constructor(args) { - this.updatedAttrs = null; - this.squareChat = null; - if (args) { - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.squareChat !== undefined && args.squareChat !== null) { - this.squareChat = new lineType.SquareChat(args.squareChat); - } - } - } -}; -lineType.DeleteSquareChatRequest = class { - constructor(args) { - this.squareChatMid = null; - this.revision = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.revision !== undefined && args.revision !== null) { - this.revision = args.revision; - } - } - } -}; -lineType.DeleteSquareChatResponse = class { - constructor(args) {} -}; -lineType.UpdateSquareChatMemberRequest = class { - constructor(args) { - this.updatedAttrs = null; - this.chatMember = null; - if (args) { - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.chatMember !== undefined && args.chatMember !== null) { - this.chatMember = new lineType.SquareChatMember(args.chatMember); - } - } - } -}; -lineType.UpdateSquareChatMemberResponse = class { - constructor(args) { - this.updatedChatMember = null; - if (args) { - if (args.updatedChatMember !== undefined && args.updatedChatMember !== null) { - this.updatedChatMember = new lineType.SquareChatMember(args.updatedChatMember); - } - } - } -}; -lineType.UpdateSquareAuthorityRequest = class { - constructor(args) { - this.updateAttributes = null; - this.authority = null; - if (args) { - if (args.updateAttributes !== undefined && args.updateAttributes !== null) { - this.updateAttributes = Thrift.copyList(args.updateAttributes, [null]); - } - if (args.authority !== undefined && args.authority !== null) { - this.authority = new lineType.SquareAuthority(args.authority); - } - } - } -}; -lineType.UpdateSquareAuthorityResponse = class { - constructor(args) { - this.updatdAttributes = null; - this.authority = null; - if (args) { - if (args.updatdAttributes !== undefined && args.updatdAttributes !== null) { - this.updatdAttributes = Thrift.copyList(args.updatdAttributes, [null]); - } - if (args.authority !== undefined && args.authority !== null) { - this.authority = new lineType.SquareAuthority(args.authority); - } - } - } -}; -lineType.UpdateSquareMemberRelationRequest = class { - constructor(args) { - this.squareMid = null; - this.targetSquareMemberMid = null; - this.updatedAttrs = null; - this.relation = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.targetSquareMemberMid !== undefined && args.targetSquareMemberMid !== null) { - this.targetSquareMemberMid = args.targetSquareMemberMid; - } - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.relation !== undefined && args.relation !== null) { - this.relation = new lineType.SquareMemberRelation(args.relation); - } - } - } -}; -lineType.UpdateSquareMemberRelationResponse = class { - constructor(args) { - this.squareMid = null; - this.targetSquareMemberMid = null; - this.updatedAttrs = null; - this.relation = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.targetSquareMemberMid !== undefined && args.targetSquareMemberMid !== null) { - this.targetSquareMemberMid = args.targetSquareMemberMid; - } - if (args.updatedAttrs !== undefined && args.updatedAttrs !== null) { - this.updatedAttrs = Thrift.copyList(args.updatedAttrs, [null]); - } - if (args.relation !== undefined && args.relation !== null) { - this.relation = new lineType.SquareMemberRelation(args.relation); - } - } - } -}; -lineType.ReportSquareRequest = class { - constructor(args) { - this.squareMid = null; - this.reportType = null; - this.otherReason = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.reportType !== undefined && args.reportType !== null) { - this.reportType = args.reportType; - } - if (args.otherReason !== undefined && args.otherReason !== null) { - this.otherReason = args.otherReason; - } - } - } -}; -lineType.ReportSquareResponse = class { - constructor(args) {} -}; -lineType.ReportSquareChatRequest = class { - constructor(args) { - this.squareMid = null; - this.squareChatMid = null; - this.reportType = null; - this.otherReason = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.reportType !== undefined && args.reportType !== null) { - this.reportType = args.reportType; - } - if (args.otherReason !== undefined && args.otherReason !== null) { - this.otherReason = args.otherReason; - } - } - } -}; -lineType.ReportSquareChatResponse = class { - constructor(args) {} -}; -lineType.ReportSquareMessageRequest = class { - constructor(args) { - this.squareMid = null; - this.squareChatMid = null; - this.squareMessageId = null; - this.reportType = null; - this.otherReason = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareMessageId !== undefined && args.squareMessageId !== null) { - this.squareMessageId = args.squareMessageId; - } - if (args.reportType !== undefined && args.reportType !== null) { - this.reportType = args.reportType; - } - if (args.otherReason !== undefined && args.otherReason !== null) { - this.otherReason = args.otherReason; - } - } - } -}; -lineType.ReportSquareMessageResponse = class { - constructor(args) {} -}; -lineType.ReportSquareMemberRequest = class { - constructor(args) { - this.squareMemberMid = null; - this.reportType = null; - this.otherReason = null; - this.squareChatMid = null; - if (args) { - if (args.squareMemberMid !== undefined && args.squareMemberMid !== null) { - this.squareMemberMid = args.squareMemberMid; - } - if (args.reportType !== undefined && args.reportType !== null) { - this.reportType = args.reportType; - } - if (args.otherReason !== undefined && args.otherReason !== null) { - this.otherReason = args.otherReason; - } - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - } - } -}; -lineType.ReportSquareMemberResponse = class { - constructor(args) {} -}; -lineType.GetSquareRequest = class { - constructor(args) { - this.mid = null; - if (args) { - if (args.mid !== undefined && args.mid !== null) { - this.mid = args.mid; - } - } - } -}; -lineType.GetSquareResponse = class { - constructor(args) { - this.square = null; - this.myMembership = null; - this.squareAuthority = null; - this.squareStatus = null; - this.squareFeatureSet = null; - this.noteStatus = null; - if (args) { - if (args.square !== undefined && args.square !== null) { - this.square = new lineType.Square(args.square); - } - if (args.myMembership !== undefined && args.myMembership !== null) { - this.myMembership = new lineType.SquareMember(args.myMembership); - } - if (args.squareAuthority !== undefined && args.squareAuthority !== null) { - this.squareAuthority = new lineType.SquareAuthority(args.squareAuthority); - } - if (args.squareStatus !== undefined && args.squareStatus !== null) { - this.squareStatus = new lineType.SquareStatus(args.squareStatus); - } - if (args.squareFeatureSet !== undefined && args.squareFeatureSet !== null) { - this.squareFeatureSet = new lineType.SquareFeatureSet(args.squareFeatureSet); - } - if (args.noteStatus !== undefined && args.noteStatus !== null) { - this.noteStatus = new lineType.NoteStatus(args.noteStatus); - } - } - } -}; -lineType.GetSquareStatusRequest = class { - constructor(args) { - this.squareMid = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - } - } -}; -lineType.GetSquareStatusResponse = class { - constructor(args) { - this.squareStatus = null; - if (args) { - if (args.squareStatus !== undefined && args.squareStatus !== null) { - this.squareStatus = new lineType.SquareStatus(args.squareStatus); - } - } - } -}; -lineType.GetNoteStatusRequest = class { - constructor(args) { - this.squareMid = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - } - } -}; -lineType.GetNoteStatusResponse = class { - constructor(args) { - this.squareMid = null; - this.status = null; - if (args) { - if (args.squareMid !== undefined && args.squareMid !== null) { - this.squareMid = args.squareMid; - } - if (args.status !== undefined && args.status !== null) { - this.status = new lineType.NoteStatus(args.status); - } - } - } -}; -lineType.CreateSquareChatAnnouncementRequest = class { - constructor(args) { - this.reqSeq = null; - this.squareChatMid = null; - this.squareChatAnnouncement = null; - if (args) { - if (args.reqSeq !== undefined && args.reqSeq !== null) { - this.reqSeq = args.reqSeq; - } - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.squareChatAnnouncement !== undefined && args.squareChatAnnouncement !== null) { - this.squareChatAnnouncement = new lineType.SquareChatAnnouncement(args.squareChatAnnouncement); - } - } - } -}; -lineType.CreateSquareChatAnnouncementResponse = class { - constructor(args) { - this.announcement = null; - if (args) { - if (args.announcement !== undefined && args.announcement !== null) { - this.announcement = new lineType.SquareChatAnnouncement(args.announcement); - } - } - } -}; -lineType.DeleteSquareChatAnnouncementRequest = class { - constructor(args) { - this.squareChatMid = null; - this.announcementSeq = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - if (args.announcementSeq !== undefined && args.announcementSeq !== null) { - this.announcementSeq = args.announcementSeq; - } - } - } -}; -lineType.DeleteSquareChatAnnouncementResponse = class { - constructor(args) {} -}; -lineType.GetSquareChatAnnouncementsRequest = class { - constructor(args) { - this.squareChatMid = null; - if (args) { - if (args.squareChatMid !== undefined && args.squareChatMid !== null) { - this.squareChatMid = args.squareChatMid; - } - } - } -}; -lineType.GetSquareChatAnnouncementsResponse = class { - constructor(args) { - this.announcements = null; - if (args) { - if (args.announcements !== undefined && args.announcements !== null) { - this.announcements = Thrift.copyList(args.announcements, [lineType.SquareChatAnnouncement]); - } - } - } -}; -lineType.GetJoinedSquareChatsRequest = class { - constructor(args) { - this.continuationToken = null; - this.limit = null; - if (args) { - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - if (args.limit !== undefined && args.limit !== null) { - this.limit = args.limit; - } - } - } -}; -lineType.GetJoinedSquareChatsResponse = class { - constructor(args) { - this.chats = null; - this.chatMembers = null; - this.statuses = null; - this.continuationToken = null; - if (args) { - if (args.chats !== undefined && args.chats !== null) { - this.chats = Thrift.copyList(args.chats, [lineType.SquareChat]); - } - if (args.chatMembers !== undefined && args.chatMembers !== null) { - this.chatMembers = Thrift.copyMap(args.chatMembers, [lineType.SquareChatMember]); - } - if (args.statuses !== undefined && args.statuses !== null) { - this.statuses = Thrift.copyMap(args.statuses, [lineType.SquareChatStatus]); - } - if (args.continuationToken !== undefined && args.continuationToken !== null) { - this.continuationToken = args.continuationToken; - } - } - } -}; -lineType.TalkException = function (args) { - Thrift.TException.call(this, "TalkException"); - this.name = "TalkException"; - this.code = null; - this.reason = null; - this.parameterMap = null; - if (args) { - if (args.code !== undefined && args.code !== null) { - this.code = args.code; - } - if (args.reason !== undefined && args.reason !== null) { - this.reason = args.reason; - } - if (args.parameterMap !== undefined && args.parameterMap !== null) { - this.parameterMap = Thrift.copyMap(args.parameterMap, [null]); - } - } -}; -lineType.UserAuthStatus = class { - constructor(args) { - this.phoneNumberRegistered = null; - this.registeredSnsIdTypes = null; - if (args) { - if (args.phoneNumberRegistered !== undefined && args.phoneNumberRegistered !== null) { - this.phoneNumberRegistered = args.phoneNumberRegistered; - } - if (args.registeredSnsIdTypes !== undefined && args.registeredSnsIdTypes !== null) { - this.registeredSnsIdTypes = Thrift.copyList(args.registeredSnsIdTypes, [null]); - } - } - } -}; -lineType.WapInvitation = class { - constructor(args) { - this.type = null; - this.inviteeEmail = null; - this.inviterMid = null; - this.roomMid = null; - if (args) { - if (args.type !== undefined && args.type !== null) { - this.type = args.type; - } - if (args.inviteeEmail !== undefined && args.inviteeEmail !== null) { - this.inviteeEmail = args.inviteeEmail; - } - if (args.inviterMid !== undefined && args.inviterMid !== null) { - this.inviterMid = args.inviterMid; - } - if (args.roomMid !== undefined && args.roomMid !== null) { - this.roomMid = args.roomMid; - } - } - } -}; -lineType.GroupCall = class { - constructor(args) { - this.online = null; - this.chatMid = null; - this.hostMids = null; - this.memberMids = null; - this.started = null; - this.mediaType = null; - if (args) { - if (args.online !== undefined && args.online !== null) { - this.online = args.online; - } - if (args.chatMid !== undefined && args.chatMid !== null) { - this.chatMid = args.chatMid; - } - if (args.hostMids !== undefined && args.hostMids !== null) { - this.hostMids = args.hostMids; - } - if (args.memberMids !== undefined && args.memberMids !== null) { - this.memberMids = Thrift.copyList(args.memberMids, [null]); - } - if (args.started !== undefined && args.started !== null) { - this.started = args.started; - } - if (args.mediaType !== undefined && args.mediaType !== null) { - this.mediaType = args.mediaType; - } - } - } -}; -lineType.GroupCallRoute = class { - constructor(args) { - this.token = null; - this.cscf = null; - this.mix = null; - if (args) { - if (args.token !== undefined && args.token !== null) { - this.token = args.token; - } - if (args.cscf !== undefined && args.cscf !== null) { - this.cscf = new lineType.CallHost(args.cscf); - } - if (args.mix !== undefined && args.mix !== null) { - this.mix = new lineType.CallHost(args.mix); - } - } - } -}; diff --git a/site/tmp/voomUI.js b/site/tmp/voomUI.js deleted file mode 100644 index 01deacc..0000000 --- a/site/tmp/voomUI.js +++ /dev/null @@ -1,587 +0,0 @@ -const voom = (elm, data) => { - elm.appendChild(article( - { - "class": "generalPostLayout_feed_post__9CnYc", - "data-mid": data.mid, - "data-rmid": data.rmid, - "data-id": data.id, - }, - div( - { - "class": "postHeaderLayout_post_header__jc8wg", - }, - div( - { - "class": "writerInfoLayout_writer_info_wrap__IV9NI", - "$click": (...arg) => { - buttonEvent("voom-profile", arg); - }, - }, - a( - { - "class": "profileLayout_thumbnail_wrap__tAvs2", - }, - span( - { - "class": "userProfileThumbnail_thumbnail__PANhF", - "style": "width: 100%; height: 100%;", - }, - img( - { - "src": data.icon, - "class": "userProfileThumbnail_image__A5Afu", - "width": "64", - "height": "64", - }, - ), - ), - ), - span( - { - "class": "linkText_text_area__eG4IS", - }, - a( - { - "class": "linkText_link__pMHBf", - }, - strong( - { - "class": "linkText_text__QJFNU", - }, - data.name, - ), - ), - ), - ), - div( - { - "class": "postButtonLayout_post_button_wrap__hbU8V", - }, - div( - { - "class": "postMenuLayout_post_menu_wrap__LXysY", - }, - button( - { - "type": "button", - "class": "postMenuLayout_button_menu__A5gwf", - }, - i( - { - "class": "postMenuLayout_icon_menu__SawF4", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "15.0", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "M12 10.5c-.829 0-1.5.671-1.5 1.5s.671 1.5 1.5 1.5 1.5-.671 1.5-1.5-.671-1.5-1.5-1.5Zm0-2.9722c.829 0 1.5-.671 1.5-1.5 0-.828-.671-1.5-1.5-1.5s-1.5.672-1.5 1.5c0 .829.671 1.5 1.5 1.5Zm0 8.9444c-.829 0-1.5.671-1.5 1.5 0 .311.094.599.256.838.054.08.116.155.183.223.272.271.647.439 1.061.439.414 0 .789-.168 1.061-.439.067-.068.129-.143.183-.223.162-.239.256-.527.256-.838 0-.829-.671-1.5-1.5-1.5Z", - }, - ), - ), - ), - span( - { - "class": "blind", - }, - "Menu", - ), - ), - ), - ), - ), - ), - div( - { - "class": "postContentLayout_post_content__bYnAD", - "style": "--full-viewer-text-bottom: 24px; --full-viewer-inner-height: 54px;", - }, - div( - { - "class": "viewer_trigger", - }, - div( - {}, - div( - { - "class": "voomEditor-layout", - }, - div( - {}, - div( - { - "class": "media_layout type_single", - }, - div( - { - "class": "media_inner", - "style": "padding-top: 100%;", - }, - div( - { - "role": "button", - "tabindex": "0", - "class": "media_box_layout", - }, - div( - { - "class": "media_item type_viewer", - }, - img( - { - "src": data.img, - "class": "media_image", - "alt": "", - "style": "object-position: 50% 50%;", - }, - ), - ), - ), - ), - ), - ), - div( - { - "class": "post_text post_text_margin", - }, - div( - { - "class": "text_layout", - }, - div( - { - "class": "text_area", - }, - div( - { - "class": "text_inner", - }, - div( - { - "class": "text_viewer page_feed", - }, - pre( - {}, - data.text, - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - section( - { - "class": "reactionLayout_reaction_group__B1CXz", - }, - div( - { - "class": "likeButtonLayout_like_button_wrap__qJwig", - }, - button( - { - "type": "button", - "class": "likeButton_button_like__WwN6d", - "id": "", - "$click": (...arg) => { - buttonEvent("voom-like", arg); - }, - }, - i( - { - "class": "likeButton_icon___PUSz", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "15.0", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "M8.6233 13.1151a.65.65 0 0 1 .8882.237c.4976.8597 1.4261 1.4359 2.4887 1.4359 1.0626 0 1.9911-.5762 2.4887-1.4359a.65.65 0 0 1 1.1252.6512c-.7206 1.2449-2.0689 2.0847-3.6139 2.0847s-2.8932-.8398-3.6138-2.0847a.65.65 0 0 1 .237-.8882ZM14.7773 9.2964c-.5522 0-1 .4477-1 1s.4478 1 1 1c.5523 0 1-.4477 1-1s-.4477-1-1-1Zm-5.5546 0c-.5523 0-1 .4477-1 1s.4477 1 1 1c.5522 0 1-.4477 1-1s-.4478-1-1-1Z", - }, - ), - path( - { - "d": "M12 4.05c-4.3907 0-7.95 3.5593-7.95 7.95 0 4.3907 3.5593 7.95 7.95 7.95 4.3907 0 7.95-3.5593 7.95-7.95 0-4.3907-3.5593-7.95-7.95-7.95ZM2.75 12c0-5.1086 4.1414-9.25 9.25-9.25s9.25 4.1414 9.25 9.25-4.1414 9.25-9.25 9.25S2.75 17.1086 2.75 12Z", - }, - ), - ), - ), - ), - span( - { - "class": "blind", - }, - "Like", - ), - ), - ), - button( - { - "type": "button", - "class": "commentButton_button_comment__gjMIk", - "id": "", - "$click": (...arg) => { - buttonEvent("voom-comment", arg); - }, - }, - i( - { - "class": "commentButton_icon__2elZ8", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "15.0", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "M5.412 5.412C7.1288 3.695 9.4172 2.75 11.839 2.75s4.7102.945 6.4272 2.662c2.8754 2.8753 3.4863 7.2297 1.5648 10.7585l1.2894 4.136a.65.65 0 0 1-.8108.815l-4.1492-1.2705a9.1125 9.1125 0 0 1-4.332 1.0983c-2.4226 0-4.7002-.9455-6.4166-2.6619C3.6946 16.5701 2.75 14.2816 2.75 11.8497c0-2.4332.9454-4.71 2.6604-6.4363l.0015-.0015Zm.92.9184C4.8575 7.8148 4.05 9.7626 4.05 11.8497c0 2.0886.8087 4.046 2.2812 5.5185 1.4733 1.4734 3.4206 2.2811 5.4973 2.2811 1.3838 0 2.7393-.3703 3.9296-1.063a.6504.6504 0 0 1 .5173-.0598l3.2376.9915-1.0066-3.2289a.6499.6499 0 0 1 .0597-.5221c1.7939-3.0613 1.3074-6.9094-1.219-9.4358-1.4728-1.4728-3.4304-2.2812-5.508-2.2812-2.0773 0-4.0345.8081-5.5072 2.2804Z", - }, - ), - path( - { - "d": "M15.5501 11.05c-.5235 0-.95.4265-.95.95 0 .5234.4265.95.95.95.5234 0 .95-.4266.95-.95 0-.5235-.4266-.95-.95-.95Zm-3.5503 0c-.5235 0-.95.4265-.95.95 0 .5234.4265.95.95.95.5234 0 .95-.4266.95-.95 0-.5235-.4169-.95-.95-.95Zm-3.5996 0c-.5235 0-.95.4265-.95.95 0 .5234.4265.95.95.95s.95-.4266.95-.95c0-.5235-.4265-.95-.95-.95Z", - }, - ), - ), - ), - ), - span( - { - "class": "commentButton_count__rX03b", - }, - data.comment, - ), - span( - { - "class": "blind", - }, - "Comment", - ), - ), - div( - { - "class": "shareButton_share_button_wrap__3ksAj", - }, - button( - { - "type": "button", - "class": "shareButton_button_share__a21_m", - "id": "", - }, - i( - { - "class": "shareButton_icon__6Sa8Y", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "15.0", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "M4.4263 19.0055v-7.967h1.3V18.85h12.5461v-7.8115h1.3v7.967c0 .6321-.5124 1.1445-1.1445 1.1445H5.5708c-.6321 0-1.1445-.5124-1.1445-1.1445Zm7.5731-15.4009 4.1008 3.885-.894.9438-3.2068-3.038-3.2069 3.038-.894-.9438 4.1009-3.885Z", - }, - ), - path( - { - "d": "m11.3457 14.4995.0071-10 1.3.001-.0071 10-1.3-.001Z", - }, - ), - ), - ), - ), - span( - { - "class": "shareButton_count___ItWD", - }, - "", - ), - span( - { - "class": "blind", - }, - "Share", - ), - ), - ), - ), - div( - { - "class": "commentList_comment_list__6XUED", - }, - ), - div( - { - "class": "postFooter_post_footer__V0Dfl", - }, - i( - { - "class": "iconPrivacy_icon_privacy__X1zsb", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "15.0", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "M21.25 12c0-5.1-4.15-9.25-9.25-9.25S2.75 6.9 2.75 12 6.9 21.25 12 21.25h.06c5.07-.04 9.19-4.17 9.19-9.25ZM10.33 4.23c-.03.22-.12.46-.39.53-.43.12-.65.05-.88-.14.41-.16.83-.3 1.27-.39ZM4.05 12c0-.84.14-1.66.38-2.42.31.53.64 1.04.98 1.5.89 1.2 2.09 1.86 3.16 2.43.03.02.07.03.1.04.37.13.74.35 1 .6.04.06.09.1.14.14.12.14.2.27.21.39.02.18.01.36 0 .55-.01.35-.03.75.1 1.16.13.42.39.72.6.96.13.15.25.28.31.42.16.33.24.73.25 1.2 0 .38 0 .68.02.95-4.06-.36-7.25-3.77-7.25-7.91V12Zm10.08 7.65c0-.05.01-.1.02-.11.1-.29.33-.88.34-.92.11-.34.33-.99.49-1.26.08-.14.21-.29.34-.44.2-.22.42-.47.58-.8.2-.42.44-1.47.22-1.96-.36-1.34-1.87-1.61-2.7-1.55 0 0-1.25.07-1.77.09-.33.01-.64.17-.93.31-.05.02-.11.05-.16.08-.13-.25-.33-.57-.82-.95-.21-.16-.41-.25-.58-.32-.2-.09-.26-.12-.3-.18 0-.09.02-.24.03-.29.03-.07.32-.16.45-.19l.1-.03c.17-.05.22-.04.26-.01.74.8 1.68.1 2.04-.17.19-.14.31-.34.34-.57.06-.42-.2-.75-.43-1.05a.6257.6257 0 0 1-.09-.12c.17-.11.42-.22.57-.29.41-.18.76-.33.89-.71.14-.39-.04-.71-.21-.91.42-.43 1.18-1.22.81-2.47-.1-.26-.25-.49-.41-.7 2.39.37 4.43 1.8 5.62 3.8-.08 0-.16.02-.21.03h-.03c-.85.21-1.57.89-1.97 1.65-.4.76-.56 1.78.02 2.63.5.74 1.32 1.04 1.92 1.22.1.03.55.15.94.25l.23.06c-.65 2.84-2.83 5.09-5.61 5.87l.01.01Z", - }, - ), - ), - ), - span( - { - "class": "blind", - }, - "Public", - ), - ), - span( - { - "class": "postFooter_time__dTT6T", - "id": "dateTime", - }, - data.time, - ), - ), - div( - { - "class": "commentWriter_comment_writer__KKGfj", - }, - div( - { - "class": "commentWriter_thumbnail_wrap__Sg3o0", - }, - span( - { - "class": "userProfileThumbnail_thumbnail__PANhF", - "style": "width: 100%; height: 100%;", - }, - img( - { - "src": "", - "class": "userProfileThumbnail_image__A5Afu", - "width": "64", - "height": "64", - }, - ), - ), - ), - div( - { - "class": "commentWriter_writer_wrap__yJMVg", - }, - div( - { - "class": "commentWriter_writer_area__71gGR", - }, - div( - { - "class": "voomEditor-layout", - }, - div( - { - "class": "comment_writer_layout", - }, - div( - { - "class": "comment_content", - "data-name": "comment_content", - }, - div( - { - "class": "voomEditor-layout", - }, - div( - { - "class": "post_writer_text_card", - }, - div( - { - "class": "text_layout animation_0", - }, - div( - { - "class": "text_area", - }, - div( - { - "class": "text_inner", - }, - label( - { - "class": "text_editor", - }, - textarea( - { - "class": "input_text", - "placeholder": "コメントしてみよう", - "maxlength": "1000", - "data-feedid": "1168769285681398053", - }, - ), - span( - { - "class": "label_text", - "aria-hidden": "true", - }, - "コメントしてみよう", - ), - ), - div( - { - "class": "text_viewer page_editor", - }, - ), - ), - ), - ), - ), - ), - ), - div( - { - "class": "comment_tool_group", - }, - label( - { - "class": "tool_button", - "title": "写真を追加", - }, - input( - { - "type": "file", - "class": "blind", - "accept": "image/*", - }, - ), - i( - { - "class": "icon_photo", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "15.0", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "M15.5519 8.5134c-.5769 0-1.0446.4678-1.0446 1.0447 0 .577.4677 1.0447 1.0446 1.0447s1.0446-.4677 1.0446-1.0447c0-.5769-.4677-1.0447-1.0446-1.0447ZM8.6929 10.2734l8.5795 8.5796a.6498.6498 0 0 1 0 .9192.6498.6498 0 0 1-.9192 0l-7.6603-7.6604-4.4334 4.4335a.65.65 0 1 1-.9192-.9192l5.3526-5.3527Z", - }, - ), - path( - { - "d": "M4.4499 5.3375v13.3251h15.1V5.3375h-15.1Zm-1.3-.15c0-.6353.515-1.15 1.15-1.15h15.4c.635 0 1.15.5147 1.15 1.15v13.6251c0 .6353-.515 1.15-1.15 1.15h-15.4c-.635 0-1.15-.5149-1.15-1.15V5.1875Z", - }, - ), - ), - ), - ), - span( - { - "class": "blind", - }, - "photo", - ), - ), - button( - { - "type": "button", - "class": "tool_button", - "title": "スタンプを追加", - }, - i( - { - "class": "icon_sticker", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "15.0", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "M8.6233 13.1151a.65.65 0 0 1 .8882.237c.4976.8597 1.4261 1.4359 2.4887 1.4359 1.0626 0 1.9911-.5762 2.4887-1.4359a.65.65 0 0 1 1.1252.6512c-.7206 1.2449-2.0689 2.0847-3.6139 2.0847s-2.8932-.8398-3.6138-2.0847a.65.65 0 0 1 .237-.8882ZM14.7773 9.2964c-.5522 0-1 .4477-1 1s.4478 1 1 1c.5523 0 1-.4477 1-1s-.4477-1-1-1Zm-5.5546 0c-.5523 0-1 .4477-1 1s.4477 1 1 1c.5522 0 1-.4477 1-1s-.4478-1-1-1Z", - }, - ), - path( - { - "d": "M12 4.05c-4.3907 0-7.95 3.5593-7.95 7.95 0 4.3907 3.5593 7.95 7.95 7.95 4.3907 0 7.95-3.5593 7.95-7.95 0-4.3907-3.5593-7.95-7.95-7.95ZM2.75 12c0-5.1086 4.1414-9.25 9.25-9.25s9.25 4.1414 9.25 9.25-4.1414 9.25-9.25 9.25S2.75 17.1086 2.75 12Z", - }, - ), - ), - ), - ), - span( - { - "class": "blind", - }, - "sticker", - ), - ), - ), - ), - ), - ), - ), - ), - )); -}; diff --git a/site/tmp/x3.js b/site/tmp/x3.js deleted file mode 100644 index c774ab3..0000000 --- a/site/tmp/x3.js +++ /dev/null @@ -1,654 +0,0 @@ -runLINE = () => { - $("body").in( - div( - { "style": "display: none;", "id": "hide" }, - "hidden DIV", - ), - noscript( - {}, - "You need to enable JavaScript to run this app.", - ), - div( - { - "id": "root", - "$click": () => { - document.querySelector("#modal-root").innerHTML = ""; - }, - }, - div( - { - "class": "app", - }, - div( - { - "class": "pageLayout-module__wrap__h-oSt", - }, - div( - { - "class": "gnb-module__gnb__01tnB ", - }, - ul( - { - "class": "gnb-module__nav_list__wRO2S", - }, - li( - { - "class": "gnb-module__nav_list_item__tbnc4", - }, - button( - { - "type": "button", - "class": "gnb-module__button_action__aTdj7", - "aria-label": "Friend", - "aria-current": "false", - "data-tooltip": "友だち", - "$click": (...arg) => { - buttonEvent("openProfile", arg); - }, - }, - i( - { - "class": "icon gnb-module__icon__RvjKM", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "5.0", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "M19.394 16.513s-3.866-2.369-4.816-2.969c-.086-.055-.316-.2-.296-.694.014-.348.151-.712.271-.902.185-.291.395-.702.639-1.183.124-.244.258-.507.404-.782.339-.184.729-.559.866-1.493.078-.531-.07-.945-.223-1.214C16.175 4.555 14.45 2.669 12 2.669c-2.439 0-4.16 1.869-4.236 4.602-.154.269-.304.685-.226 1.22.138.941.535 1.314.866 1.49.145.276.28.54.404.784.244.481.454.892.639 1.183.12.19.257.554.271.902.02.494-.21.639-.297.694-.949.6-4.815 2.969-4.83 2.979a2.7233 2.7233 0 0 0-1.241 2.29v2.518h17.3v-2.518c0-.928-.464-1.784-1.256-2.3", - }, - ), - ), - ), - ), - ), - ), - li( - { - "class": "gnb-module__nav_list_item__tbnc4", - }, - button( - { - "type": "button", - "class": "gnb-module__button_action__aTdj7", - "aria-label": "Chat", - "aria-current": "true", - "data-tooltip": "トーク", - "$click": (...arg) => { - buttonEvent("openTalk", arg); - }, - }, - i( - { - "class": "icon gnb-module__icon__RvjKM", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "5.0", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "M12.1 3.078c5.194 0 8.549 2.979 8.549 7.591 0 4.185-3.405 7.59-7.591 7.59l-2.289.01c-1.346 0-2.132.993-2.555 1.826l-.418.827-.635-.676c-1.423-1.516-3.81-4.616-3.81-8.343 0-5.361 3.434-8.825 8.749-8.825Zm-3.724 7.155a.9.9 0 1 0 .0001 1.8001.9.9 0 0 0-.0001-1.8001Zm3.538 0a.9.9 0 1 0 .0001 1.8001.9.9 0 0 0-.0001-1.8001Zm3.538 0a.9.9 0 1 0 .0001 1.8001.9.9 0 0 0-.0001-1.8001Z", - }, - ), - ), - ), - ), - ), - div( - { - "class": "gnb-module__badge__nU45a badge-module__badge__Eh36I ", - }, - "25", - ), - ), - li( - { - "class": "gnb-module__nav_list_item__tbnc4", - }, - button( - { - "type": "button", - "class": "gnb-module__button_action__aTdj7", - "aria-label": "Voom", - "aria-current": "false", - "data-tooltip": "LINE VOOM", - "$click": (...arg) => { - buttonEvent("openVoom", arg); - }, - }, - i( - { - "class": "icon gnb-module__icon__RvjKM", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "7.3", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "m19.088 15.33-9.068 5.149a3.907 3.907 0 0 1-5.86-3.329v-1.62a3.1 3.1 0 0 1 1.579-2.69l4.351-2.47a.728.728 0 0 0 .367-.63.736.736 0 0 0-.149-.44.756.756 0 0 0-.963-.18L5.7 11.19a1.023 1.023 0 0 1-1.54-.87V6.851a3.908 3.908 0 0 1 5.86-3.33l9.068 5.149a3.816 3.816 0 0 1 0 6.66z", - }, - ), - ), - ), - ), - ), - ), - li( - { - "class": "gnb-module__nav_list_item__tbnc4", - }, - button( - { - "type": "button", - "class": "gnb-module__button_action__aTdj7", - "aria-label": "Voom", - "aria-current": "false", - "data-tooltip": "LINE Openchat", - "$click": (...arg) => { - buttonEvent("openSquare", arg); - }, - }, - i( - { - "class": "icon gnb-module__icon__RvjKM", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "7.3", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "M19.7 19.982V9.018c0-2.606-2.163-4.718-4.832-4.718H9.132C6.463 4.3 4.3 6.412 4.3 9.018v5.6c0 2.605 2.163 4.717 4.832 4.717h5.908", - "stroke": "#707991", - "stroke-width": "3", - "style": "color: #202a43;", - }, - ), - ), - ), - ), - ), - ), - li( - { - "class": "gnb-module__nav_list_item__tbnc4", - }, - button( - { - "type": "button", - "class": "gnb-module__button_action__aTdj7", - "aria-label": "Voom", - "aria-current": "false", - "data-tooltip": "Console", - "$click": (...arg) => { - buttonEvent("openConsole", arg); - }, - }, - i( - { - "class": "icon gg-terminal", - }, - ), - ), - ), - ), - ul( - { - "class": "gnb-module__nav_bottom_list__t-ASJ", - }, - li( - { - "class": "gnb-module__nav_list_item__tbnc4", - }, - button( - { - "type": "button", - "class": "gnb-module__button_action__aTdj7", - "aria-label": "Popover more actions", - "data-tooltip": "設定", - "$click": (...arg) => { - buttonEvent("openSettings", arg); - }, - }, - i( - { - "class": "icon gnb-module__icon__RvjKM", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "5.0", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "M12 10.5c.829 0 1.5.671 1.5 1.5s-.671 1.5-1.5 1.5-1.5-.671-1.5-1.5.671-1.5 1.5-1.5Zm5.9722 0c.828 0 1.5.671 1.5 1.5s-.672 1.5-1.5 1.5c-.829 0-1.5-.671-1.5-1.5s.671-1.5 1.5-1.5Zm-11.9444-.0003c.208 0 .405.042.584.118.18.076.341.186.477.322.272.271.439.646.439 1.06 0 .414-.167.789-.439 1.061-.136.136-.297.245-.477.322-.179.075-.376.117-.584.117-.828 0-1.5-.671-1.5-1.5 0-.828.672-1.5 1.5-1.5Z", - }, - ), - ), - ), - ), - ), - ), - ), - ), - div( - { - "class": "chatlist-module__tab__xaUJd folderTab-module__tab__YXsQR", - }, - div( - { - "class": "folderTab-module__tab_list__hjBJ2", - "role": "tablist", - }, - button( - { - "class": "folderTab-module__tab_item__7dbuI", - "role": "tab", - "data-state": "", - "data-folder-id": "ALL", - "aria-selected": "false", - }, - span( - { - "class": "folderTab-module__text__0saah", - }, - "すべて", - ), - ), - button( - { - "class": "folderTab-module__tab_item__7dbuI", - "role": "tab", - "data-state": "", - "data-folder-id": "FRIENDS", - "aria-selected": "false", - }, - span( - { - "class": "folderTab-module__text__0saah", - }, - "友だち", - ), - ), - button( - { - "class": "folderTab-module__tab_item__7dbuI", - "role": "tab", - "data-state": "", - "data-folder-id": "GROUP", - "aria-selected": "true", - }, - span( - { - "class": "folderTab-module__text__0saah", - }, - "グループ", - ), - ), - ), - ), - div( - { - "class": "chatlist-module__chatlist_wrap__KtTpq", - }, - div( - { - "class": "chatlist-module__search_box__enOMX searchInput-module__input_box__vp6NF", - }, - label( - { - "class": "searchInput-module__label__40CWI", - }, - i( - { - "class": "icon searchInput-module__icon_search__amOMA", - }, - svg( - { - "xmlns": "http://www.w3.org/2000/svg", - "width": "24", - "height": "24", - "viewBox": "0 0 24 24", - }, - g( - { - "fill": "none", - "fill-rule": "evenodd", - }, - g( - {}, - g( - {}, - g( - {}, - g( - {}, - g( - {}, - path( - { - "d": "M0 0H20V20H0z", - "transform": - "translate(-261.000000, -95.000000) translate(181.000000, 54.000000) translate(74.000000, 34.000000) translate(6.000000, 7.000000) translate(2.000000, 2.000000)", - }, - ), - g( - { - "stroke": "#B7B7B7", - "stroke-width": "1.5", - "transform": - "translate(-261.000000, -95.000000) translate(181.000000, 54.000000) translate(74.000000, 34.000000) translate(6.000000, 7.000000) translate(2.000000, 2.000000) translate(4.000000, 4.000000)", - }, - circle( - { - "cx": "4.5", - "cy": "4.5", - "r": "4.5", - "fill-rule": "nonzero", - }, - ), - path( - { - "stroke-linecap": "square", - "d": "M8 8L11 11", - }, - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - input( - { - "class": "searchInput-module__input__ekGp7 ", - "placeholder": "トークルーム検索", - "maxlength": "20", - "value": "", - }, - ), - button( - { - "type": "button", - "class": "searchInput-module__button_reset__l2-td", - "aria-label": "reset", - }, - i( - { - "class": "icon searchInput-module__icon_reset__bPtuX", - }, - svg( - { - "xmlns": "http://www.w3.org/2000/svg", - "width": "24", - "height": "24", - "viewBox": "0 0 24 24", - }, - g( - { - "fill": "none", - "fill-rule": "evenodd", - }, - g( - {}, - g( - {}, - g( - {}, - g( - {}, - path( - { - "d": "M0 0H24V24H0z", - "transform": - "translate(-1216.000000, -227.000000) translate(928.000000, 162.000000) translate(14.000000, 58.000000) translate(274.000000, 7.000000)", - }, - ), - path( - { - "fill": "#C8C8C8", - "d": "M12 5c3.866 0 7 3.134 7 7s-3.134 7-7 7-7-3.134-7-7 3.134-7 7-7zm2.413 3.5L12 10.912 9.587 8.5 8.5 9.587 10.912 12 8.5 14.413 9.587 15.5 12 13.087l2.413 2.413 1.087-1.087L13.087 12 15.5 9.587 14.413 8.5z", - "transform": - "translate(-1216.000000, -227.000000) translate(928.000000, 162.000000) translate(14.000000, 58.000000) translate(274.000000, 7.000000)", - }, - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - div( - { - "class": "chatlist-module__chatlist__qruAE", - }, - div( - { - "class": "chatlist-module__chatlist_inner__YtvQB", - "style": "position: relative; overflow: hidden;", - }, - div( - { - "style": "position: absolute; width: 100%; height: 100%; overflow: scroll;", - }, - div( - { - "style": - "position: relative; height: auto; width: 100%; overflow: overlay; will-change: transform; direction: ltr;", - }, - ), - ), - ), - ), - div( - { - "class": - "chatlist-module__create_chat_button__lADKP createChatButton-module__popover_wrap__CxRuU ", - "aria-hidden": "false", - "data-tooltip": "トークルームを作成", - }, - button( - { - "type": "button", - "class": "createChatButton-module__button_create__-BK-p", - "aria-haspopup": "true", - "aria-expanded": "false", - "aria-labelledby": "create action list popover", - }, - i( - { - "class": "icon createChatButton-module__icon_create__pLEwQ", - }, - img({ - src: "https://static.line-scdn.net/Openchat-Real/edge/img/apng/icon-nav-create.png", - alt: "", - }), - ), - ), - div( - { - "class": "createChatButton-module__popover_content__DG6zk", - }, - ul( - { - "class": "createChatButton-module__action_list__zZqLv", - }, - li( - { - "class": "createChatButton-module__action_list_item__I1EVN", - }, - button( - { - "class": "createChatButton-module__link__1CoG2", - }, - i( - { - "class": "icon", - }, - svg( - { - "xmlns": "http://www.w3.org/2000/svg", - "width": "18", - "height": "18", - "viewBox": "0 0 18 18", - }, - path( - { - "fill": "#303030", - "stroke": "#303030", - "stroke-width": "0.4", - "d": "M9.246 2.218c4.155 0 6.84 2.384 6.84 6.073-.004 3.352-2.72 6.069-6.073 6.072h0l-1.831.008c-.908.049-1.704.619-2.044 1.461h0l-.335.662-.508-.54C4.157 14.74 2.247 12.26 2.247 9.277c0-4.289 2.747-7.06 7-7.06zm0 1.04c-3.731 0-5.96 2.25-5.96 6.02 0 2.299 1.38 4.336 2.31 5.447.577-.864 1.544-1.387 2.583-1.394h0l1.832-.008c2.778-.002 5.031-2.253 5.035-5.032 0-3.104-2.223-5.033-5.8-5.033zm-.148 4.685c.397 0 .72.322.72.72 0 .397-.323.72-.72.72-.398 0-.72-.323-.72-.72 0-.398.322-.72.72-.72zm-2.83 0c.397 0 .72.322.72.72 0 .397-.323.72-.72.72-.399 0-.72-.323-.72-.72 0-.398.321-.72.72-.72zm5.66 0c.398 0 .72.322.72.72 0 .397-.322.72-.72.72-.397 0-.72-.323-.72-.72 0-.398.323-.72.72-.72z", - }, - ), - ), - ), - span( - { - "class": "createChatButton-module__text__ji4iL", - }, - "トーク", - ), - ), - ), - li( - { - "class": "createChatButton-module__action_list_item__I1EVN", - }, - button( - { - "class": "createChatButton-module__link__1CoG2", - }, - i( - { - "class": "icon", - }, - svg( - { - "xmlns": "http://www.w3.org/2000/svg", - "width": "18", - "height": "18", - "viewBox": "0 0 18 18", - }, - path( - { - "fill": "#303030", - "stroke": "#303030", - "stroke-width": "0.4", - "d": "M10.665 2.082c.864.004 1.69.353 2.296.969.605.616.94 1.449.927 2.313.149.267.204.577.158.88-.04.474-.267.913-.63 1.222-.307.566-.528.927-.72 1.231-.112.176-.154.538.017.658.312.218 1.994 1.376 2.964 2.043.575.396.919 1.049.918 1.747h0v2.175h-2.25v-1.04h1.21v-1.135c0-.355-.175-.688-.468-.89-.972-.669-2.657-1.83-2.97-2.048-.616-.51-.745-1.403-.3-2.066.224-.355.437-.709.743-1.279h0l.07-.13.128-.074c.032-.018.195-.133.26-.565.014-.092-.008-.187-.063-.263h0l-.106-.139v-.174c.082-1.134-.7-2.149-1.817-2.358-.21-.384-.48-.733-.797-1.035.142-.023.286-.037.43-.042zm-4.955.44c1.006-.587 2.251-.586 3.257.003 1.005.59 1.614 1.675 1.592 2.84.148.268.203.577.157.879-.04.474-.266.912-.628 1.22-.315.58-.533.937-.722 1.234-.111.175-.153.537.018.657.293.206 1.8 1.242 2.785 1.92h0l.179.123c.575.396.918 1.05.918 1.747h0v2.175H1.405v-2.36c0-.582.286-1.127.765-1.456h0l.203-.14c.977-.673 2.607-1.794 2.914-2.009.17-.12.129-.482.018-.657-.193-.305-.414-.666-.721-1.232-.363-.308-.589-.747-.63-1.221-.046-.304.01-.616.16-.884-.02-1.166.59-2.25 1.596-2.838zm2.787.933c-.703-.439-1.594-.444-2.302-.013S5.083 4.667 5.15 5.493h0v.174l-.105.163c-.055.076-.077.172-.061.265.063.43.226.545.258.563h0l.128.074.07.13c.306.57.519.924.744 1.28.444.663.314 1.555-.3 2.065-.308.215-1.942 1.34-2.92 2.014h0l-.205.14c-.197.136-.314.36-.314.599h0v1.32h9.78v-1.135c0-.355-.174-.688-.466-.89h0l-.18-.123c-.988-.68-2.498-1.72-2.791-1.925-.623-.506-.753-1.404-.301-2.065.19-.3.412-.663.744-1.28h0l.07-.129.126-.074c.16-.145.254-.35.26-.565.016-.093-.007-.188-.062-.264h0L9.52 5.69v-.174c.076-.826-.32-1.623-1.023-2.062z", - }, - ), - ), - ), - span( - { - "class": "createChatButton-module__text__ji4iL", - }, - "グループ", - ), - ), - ), - ), - ), - ), - ), - div({}), - div( - { - "class": "notificationStateToast-module__notification_toast__b7WP7 ", - "data-visible": "false", - }, - i( - { - "class": "icon notificationStateToast-module__icon__hvseN", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "7.0", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "M13.38 3.18 8.376 7.845H2.66a.65.65 0 0 0-.66.639v7.032l.006.094a.654.654 0 0 0 .654.545l5.716-.001 5.004 4.666c.419.391 1.119.103 1.119-.46V3.64c0-.563-.699-.851-1.119-.46zm-.203 1.965v13.711l-4.076-3.8-.078-.063a.68.68 0 0 0-.38-.117H3.319V9.124h5.324c.17 0 .333-.064.458-.179l4.076-3.8zm4.569 3.943a4.185 4.185 0 0 0-.725-.57l-.702 1.09.175.118A2.793 2.793 0 0 1 16.818 14c-.153.15-.32.281-.498.392l.701 1.09.192-.127c.19-.133.368-.28.533-.443a4.068 4.068 0 0 0 0-5.824zM18.638 6c.45.28.87.61 1.248.983h.002a7.008 7.008 0 0 1 0 10.034c-.306.3-.635.57-.984.809L18.64 18l-.704-1.09c.37-.23.712-.5 1.023-.805a5.735 5.735 0 0 0 0-8.21 5.874 5.874 0 0 0-.753-.626l-.27-.179.701-1.09z", - }, - ), - ), - ), - ), - span( - { - "class": "notificationStateToast-module__text__PGuSE", - }, - ), - ), - ), - ul( - { - "class": "ToastContainer-module__toast-list__QAniw", - "style": "z-index: 100;", - }, - ), - ), - ), - div( - { - "id": "modal-root", - }, - ), - ); -}; diff --git a/site/tmp/xUI.js b/site/tmp/xUI.js deleted file mode 100644 index 19a1a45..0000000 --- a/site/tmp/xUI.js +++ /dev/null @@ -1,2794 +0,0 @@ -window.version = "v 0.0.0"; -window.versionCode = 0; -if (localStorage.getItem("auth")) { - document.getElementById("auth").value = localStorage.getItem("auth"); -} -if (localStorage.getItem("device")) { - document.getElementById("device").value = localStorage.getItem("device"); -} -async function runnnn() { - window.Line = new LineSquareClient( - document.getElementById("auth").value, - document.getElementById("device").value, - () => { - setTimeout(async () => { - let rooms = await UserCashe.getItem(Line.mid + ":chatsList"); - if (!rooms) { - rooms = await Line.getJoinedSquareChats(); - await buildChatButton(rooms); - } else { - await buildChatButtonC(rooms); - } - }, 200); - }, - ); - localStorage.setItem("auth", document.getElementById("auth").value); - localStorage.setItem("device", document.getElementById("device").value); - runLINE(); -} -var chatData = { //チャットリストのデータを入れる - chatList: [], -}; -var blobUrl = {}; -function createObjectURL(prot, blob) { - if (blobUrl[prot]) { - return blobUrl[prot]; - } - blobUrl[prot] = URL.createObjectURL(blob); - return blobUrl[prot]; -} -async function updateChat() { - if (roomData.roomMid) { - let isTooLate = false; - let data = await Line.timeout(() => Line.fetchSquareChatEvents(roomData.roomMid, roomData.syncToken), 2100); - if (!data) { - setTimeout(() => { - isTooLate = true; - updateChat(); - }, 2000); - return; - } - if (isTooLate) { - return; - } - if (data.syncToken && !Number(data.syncToken)) { - roomData.syncToken = data.syncToken; - } - - let events = []; - let reading = []; - for (let i = 0; i < data.events.length; i++) { - const e = data.events[i]; - if ( - e.type == 1 || e.type == undefined || e.type == 2 || e.type == 4 || e.type == 5 || e.type == 30 || - e.type == 31 || e.type == 41 || e.type == 49 || e.type == 6 - ) { - events.push(e); - } else if (e.type == 7) { - await refreshProfile(e.payload.notifiedUpdateSquareMemberProfile.squareMember.squareMemberMid); - } - } - /* - let readingTxt = "浮上中: " - reading.forEach(e => { - readingTxt += e.name + " " - }) - genNewMessage({ - text: readingTxt, - by: "", - call: () => { notify(readingTxt, "#fff", "#333") } - })*/ - await append2Talk(events, roomData.roomMid, roomData.setting.viewMkRead); - setTimeout(() => { - isTooLate = true; - updateChat(); - }, 2000); - } else { - } -} - -async function initTalk(mid) { - let res = await Line.timeout(() => Line.fetchSquareChatEvents(mid), 2100); - roomData.syncToken = res.syncToken; - await append2Talk(res.events, mid, false); -} - -async function append2Talk(events, mid, withEvent) { - let htmls = []; - for (let index = 0; index < events.length; index++) { - const e = events[index]; - if (e.type == undefined && e.payload) { - roomData.messageView.dataList.push(e.payload.receiveMessage.squareMessage.message); - htmls.push((await Message2Elm(e.payload.receiveMessage.squareMessage.message))[0]); - } else if (e.type == 1) { - roomData.messageView.dataList.push(e.payload.sendMessage.squareMessage.message); - htmls.push((await Message2Elm(e.payload.sendMessage.squareMessage.message))[0]); - } else if (e.type == 2) { - let date = new Date(e.createdTime); - date = date.getMonth() + 1 + "/" + date.getDate() + " " + date.toLocaleTimeString().substring(0, 5); - htmls.push(genSysMsg({ - event: { - timeStr: date, - arg: e.payload, - text: (await getProfile(e.payload.notifiedJoinSquareChat.joinedMember.squareMemberMid)).name + - " がトークに参加しました", - }, - })); - } else if (e.type == 4) { - let date = new Date(e.createdTime); - date = date.getMonth() + 1 + "/" + date.getDate() + " " + date.toLocaleTimeString().substring(0, 5); - htmls.push(genSysMsg({ - event: { - timeStr: date, - arg: e.payload, - text: (await getProfile(e.payload.notifiedLeaveSquareChat.squareMember.squareMemberMid)).name + - " がトークを退出しました", - }, - })); - } else if (e.type == 5) { - htmls.push(genSysMsg({ - event: { - timeStr: "", - onclick: async () => { - let res = await getMsgById(e.payload.notifiedDestroyMessage.messageId, true); - if (res) { - res.scrollIntoView(); - res.focus(); - } - }, - text: "メッセージが削除されました", - }, - })); - } else if (e.type == 6 && withEvent) { - htmls.push(genSysMsg({ - event: { - timeStr: "", - arg: e.payload, - text: (await getProfile(e.payload.notifiedMarkAsRead.sMemberMid)).name + "が既読しました", - }, - })); - } else if (e.type == 19) { - let date = new Date(e.createdTime); - date = date.getMonth() + 1 + "/" + date.getDate() + " " + date.toLocaleTimeString().substring(0, 5); - htmls.push(genSysMsg({ - event: { - timeStr: date, - arg: e.payload, - text: (await getProfile(e.payload.notifiedKickoutFromSquare.by.squareMemberMid)).name + " が " + - e.payload.notifiedKickoutFromSquare.kickees[0].displayName + - " をこのトークから強制退会させました", - }, - })); - } else if (e.type == 30) { - let date = new Date(e.createdTime); - date = date.getMonth() + 1 + "/" + date.getDate() + " " + date.toLocaleTimeString().substring(0, 5); - htmls.push(genSysMsg({ - event: { - timeStr: date, - arg: e.payload, - text: - (await getProfile(e.payload.notifiedUpdateSquareChatProfileName.editor.squareMemberMid)).name + - "がこのトークの名前を " + e.payload.notifiedUpdateSquareChatProfileName.updatedChatName + - " に変更しました", - }, - })); - } else if (e.type == 31) { - let date = new Date(e.createdTime); - date = date.getMonth() + 1 + "/" + date.getDate() + " " + date.toLocaleTimeString().substring(0, 5); - htmls.push(genSysMsg({ - event: { - timeStr: date, - arg: e.payload, - text: - (await getProfile(e.payload.notifiedUpdateSquareChatProfileImage.editor.squareMemberMid)).name + - "がこのトークの背景画像を変更しました", - }, - })); - } else if (e.type == 41) { - let date = new Date(e.createdTime); - date = date.getMonth() + 1 + "/" + date.getDate() + " " + date.toLocaleTimeString().substring(0, 5); - htmls.push(genSysMsg({ - event: { - timeStr: date, - onclick: async () => { - let res = await getMsgById(e.payload[41][2][1][4], true); - if (res) { - res.scrollIntoView(); - res.focus(); - } - }, - text: "メッセージが送信取り消しされました", - }, - })); - } else if (e.type == 49) { - let date = new Date(e.createdTime); - date = date.getMonth() + 1 + "/" + date.getDate() + " " + date.toLocaleTimeString().substring(0, 5); - htmls.push(genSysMsg({ - event: { - timeStr: date, - arg: e.payload, - text: e.payload[47][2], - }, - })); - } - if (mid != roomData.roomMid) { - return; - } - } - for (let index = 0; index < htmls.length; index++) { - const dom = htmls[index]; - roomData.messageView.elmList.prepend(dom); - if (roomData.followLatest) { - dom.scrollIntoView(); - } - observer.observe(dom); - } - return; -} - -function genNewMessage(data) { - roomData.notifyMsg.innerHTML = ""; - roomData.notifyMsg.appendChild(div( - { - "class": "newMessage-module__new_message__7AimN ", - }, - button( - { - "type": "button", - "class": "newMessage-module__button_new_message__4lxeN", - "$click": (...arg) => { - data.call(arg); - }, - }, - strong( - { - "class": "newMessage-module__name__i7cy-", - }, - pre( - {}, - data.by, - ), - ), - p( - { - "class": "newMessage-module__description__Bp-zX", - }, - span( - {}, - data.text, - ), - ), - ), - )); -} - -var defaltIMG = - "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAEYCAYAAACHjumMAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABGKADAAQAAAABAAABGAAAAADGOxDpAAAUVklEQVR4Ae2daVNbORaGhQ0Ewp6tl6qZ//+vej7MdHcSSAIJJCy2R68J1Vmwde4i6+r4URWV4OUszxGvZV1daeOP/9zOAg0CEIBABgKjDDYxCQEIQGBOAIGhI0AAAtkIIDDZ0GIYAhBAYOgDEIBANgIITDa0GIYABBAY+gAEIJCNAAKTDS2GIQABBIY+AAEIZCOAwGRDi2EIQACBoQ9AAALZCCAw2dBiGAIQQGDoAxCAQDYCCEw2tBiGAAQQGPoABCCQjQACkw0thiEAAQSGPgABCGQjgMBkQ4thCEAAgaEPQAAC2QggMNnQYhgCEEBg6AMQgEA2AghMNrQYhgAEEBj6AAQgkI0AApMNLYYhAAEEhj4AAQhkI4DAZEOLYQhAAIGhD0AAAtkIIDDZ0GIYAhBAYOgDEIBANgIITDa0GIYABBAY+gAEIJCNAAKTDS2GIQABBIY+AAEIZCOAwGRDi2EIQACBoQ9AAALZCCAw2dBiGAIQQGDoAxCAQDYCCEw2tBiGAAQQGPoABCCQjQACkw0thiEAAQSGPgABCGQjgMBkQ4thCEAAgaEPQAAC2QggMNnQYhgCEEBg6AMQgEA2AghMNrQYhgAEEBj6AAQgkI0AApMNLYYhAAEEhj4AAQhkI4DAZEOLYQhAAIGhD0AAAtkIIDDZ0GIYAhBAYOgDEIBANgIITDa0GIYABBAY+gAEIJCNAAKTDS2GIQABBIY+AAEIZCOAwGRDi2EIQACBoQ9AAALZCCAw2dBiGAIQQGDoAxCAQDYCCEw2tBiGAAQQGPoABCCQjQACkw0thiEAAQSGPgABCGQjgMBkQ4thCEAAgaEPQAAC2QggMNnQYhgCEEBg6AMQgEA2AghMNrQYhgAEEBj6AAQgkI0AApMNLYYhAAEEhj4AAQhkI4DAZEOLYQhAAIGhD0AAAtkIIDDZ0GIYAhBAYOgDEIBANgIITDa0GIYABBAY+gAEIJCNwGY2yxiunsA4fvxsbsWfzY0w2ghh4+vH0WwawnQWwt3dLNzdhjCJv9Mg8BgBBOYxKmv62GbsDbu7G2F3ZyM8iT9jqYqhTaLaXH+Zhc/6+RxF587wJl6yFgQQmLUo8+IkN6KG7O1thP39Udh5YhOUH61JiJ4+1c/9M1+uZ+HTp2m4vJyFWRzp0NaXAAKzprWXsBzsb4Sjo1EYj9sJyyJ0EqqdJ+NwcjwL5+fT8PETQrOIlffHERjvFX4kv5349efF89F8buWRp3t7SML17Nk4HB7OwunZNHyJX6Fo60UAgVmveofnUVgO4tehVTZNEv/6yziOZKbhLAoNbX0IIDBrUmt9JXr1ahQncFcrLt/ilbBpIvnNmylzM9+Ccfz/cr3NMdShpTYeh/Dbr+Oi4vLARAKnWBQTzT8BBMZ5jbfiOhb9QW9v9zuR2wWbYlFMio3mmwBfkRzXVwvlNPfR9irRLF5j1pqWu8ksTOK/k8k9LI0+xrHnbMZJXH3l2dD3r4ZN8zK/xNj++nPCQr2G7Gp6OQJTU7UaxvriZfNL0BIVXe25uoo/cdHcg6gsci2xeRoX52kdjK5ONREbCZRifP2aid9FfGt/HIGpvYIL4j+O61uaTuheXk7D+/fTOGJZYPSRhyVAWuein80oNicno7hwz/7NWzEeH4XwIa6XofkjgMD4q+l8JHF0ZP/acnMzC2fvJuH6uhsMCdPb02m4+DgNz+P6F+u8j2L9ch1/WCfTrQADfLf9o2aAwRPSzwQ0HfLyxcj8VeXq8zT89Xd3cfk2EgmVbMq2pelr1X3MllfzmpoIIDA1VcsQ68FBvEnRuPRf9wvlWpOie5BkWz4sTTErdpovAgiMo3rqz/Pw0FZS/eFr+X7uJh9WkVHsSEzuiqzWvq03rjYmvLUksB9HALoyk2q3t5pzyS8uD3HIl3ymmmJXDjQ/BBAYP7UMR4bRiy5Dvz2drHSpvr4u3ftMi4wlB0clc58KAuOkxNrTRYvXUu38fBZublKv6v95+ZTvVFMOyoXmgwAC46OOYS8udEu1adx5TpeQSzX5VgypZsklZYPnh0EAgRlGHTpFoUvTO3E1bap9iovhpuX0Ze5bMaSacmlx90HKLM8XIIDAFIDet0st0R8l/iI193J+UVBdviatGBTLsqZclBOtfgIITP01DE8Me+lexzmQ1H1Fq0ChGCxzQJacVhEvProRQGC68RvEuy2bdQ9pGb5OH0g1S04pGzxfngACU74GnSPY2k6bGJLAWGKx5JTOmleUJoDAlK5AR/86uih1fpHmPK7jUSJDaYolNQ+jnIzHMg0lLeJ4hAAC8wiUmh7SyYupprucE/OqKRO9Pq9YLFtCWHLrNTCM9U4Agekd6WoNpkYvimYaBWZozRKTJbeh5UU83xNAYL7nUd1vD+dFLwtcR7sOrVlisuQ2tLyI53sCCMz3PKr7zXK1xTJaWHXilpgsua06bvw1I4DANOM1qFdrbd1+PP411Uqu3l0UmyUm5ZZYP7jIPI8PhAACM5BCtAlDm22PHF9qUW7KkVYvAQSm3tqZVvDq5kId2Tq0ppgsNz6yondolWsWDwLTjNegXm05uOziYhY3expU2PNgFNPFx/TksyXH4WVHRA8EEJgHEhX+a9l717rxdon0r67SIytLjiVix6eNAAJj4zTIVw3w6nPvnNYhx96hDcggAjOgYjQNZWb467OeTdTUdx+vt8RmybGPWLCRhwACk4frSqxa5laGvJbEEpslx5XAxkkrAghMK2zDeNONYad+nRk9GmCVFZNiSzVLjikbPF+OwAC7XjkYtXm2bHugtSTWs5JWmb9isqzhseS4yrjx1YwAAtOM16BefXcXwu1d+lLv0eFGPNIkPVpYVXLWeJSbcqTVSwCBqbd288g/GU4J0NnPJyfj+fnPpdPVGdSKRTGlmiW3lA2eL0sAgSnLv7P3j/OTAtKjGDnSnMe2Yfe7zkEtMCDflnkXvf1+BbItrwXueHgABBCYARShSwi6adByFIh8zEcyx+VKfhJ9W0YuirX0ESuKgdadQLne1j12LHwl8OF8GucqbJ/2u7ujYLk83Ddc+ZRvS1MuyolWPwFbxevP03UGGsW8eavzpm0ic3Ky+rJbfSoH5WLZzsF1UZ0kt/qe5gTc0NLQWUOnp+lDzRS37lC2zoX0kad8We6KlrgoB8u5SX3EhY38BBCY/IxX5uHyahbexj9QS9N8yKqa1ZdiVw40PwRW18v8MBt0JlfxD9RyRMnWlhbgpS8Vd01WPuQr1RSzYqf5IoDA+KrnPJv3722jmOOjURiP8wGQbfmwNGvMFlu8ZjgEbNUfTrxEYiDwRaOBz2mR0VJ969cXg9ufXiLbltsBFKtipvkjgMD4q+k8I40ILFeV9vY0Ads/BNmU7VRTjIxeUpTqfR6Bqbd2SyPXNgeWBXha+PbsWf/fk2TTsqhOMbIlw9JSVv0kAlN1+ZYH//7DNFgOOHuyvWE6/mS5t3+e1XEjsplqik0x0vwSQGD81na+WO2D8Q/YOhlrwWW1pdhYUGchWu9rEJh6a2eK/GPcuf/mJj2BurnZzyhGoxfZSjXFpNhovgkgML7rO8/u7N3ElOWeYYe5lCGrDWtMKX88P2wCCMyw69NLdNfXccL3Mj3XsbPT7ahWbfEiG6mmWBQTzT8BBMZ/jecZar4jddlaV30s9wwtQqb3pq4cKQbrvNAiPzxeDwEEpp5adYpUW09a9rfd3GzvxvJexcA2mO0Z1/ZOBKa2inWI98ZwhOzmOP0VZ1EIlvdaYlhkn8frI4DA1Fez1hFbDpufhfZXdizvtcTQOkHeODgCCMzgSpIvIMtdzR30JVjea4ohHwIsr5gAArNi4KXcaX7k6W76689th2NCLO9VDJa5mlKc8NsvAQSmX56DtKY/6t9+HZvubLYsyluUpOW9urtasVjEbpEfHq+HQIdrBvUkua6R6njWZ89GYX/P9jmizba7XOHRe2UjtZJ3HCeSX70az9fmvHvH7QKe+6et53km4DS33Thq+f33sVlchOGj4RC3FK4mNiR8ilGx0nwSQGCc1VWjlhfPR+GXOEKwXDZ+SL+vg86aHAQn34pRsSrm+O2J5owAAuOooPNRy29x1LLfvKx9fVXR3dHvjFt2foteMTOa+ZaIj/8374k+8naVhe4Bev4wajHcyfxj8pfx3qBPl+3Xv/xoT5tIyWbTprkbjWaUi3Ki1U+ASd7Ka6ibC/X1IjWxuijNj5+m4eysuRgssvfwuI4giftJhYMWoym9ZzfmdRrjstze8OCTf4dHYOOP/9z299E1vPzcRqRP+GfxhMaDg3aD0PleuPEGyIuLvOXXsSXa/Dt1E+SiQmnSWF+54j2StAoJIDAVFq3rqEVnEJ2eTVa2F+7Wliaex63v1Nalb0YzFXbUGDICU1HdNGrRGc+HHUYt2irhPPOoZRHSoziaOe4wmrmIo5n70xIWeeDxoRFAYIZWkQXx7MS9Vp6/GIWtFpO4MrnqUcuCNOIpj91GM7dxNHMW53c4R2kR4WE9jsAMqx4/RTMftcRP/YOD9GZOP705PjDf4Ok8jlrOhzWJcXQURzPx1Mc2czPKSfv56kQC5mYeq/pwHkNghlOLnyLR4WWau2h7B7LuDXp7urq5lp8SSDyg0czLF+OwbTji5DFTt/H6hOaS2H7zMTrDeAyBGUYdvouij1GLRiwf4silhqaRjEY0jGZqqFazGBGYZryyv7qPUYs+1W9usofaq4Pt7fvRGqOZXrEWN4bAFC/BfQBauHo8v0LU/pNcV4dq31BbV5l0tantaOYizs180LqZgdR13cNAYAbQA57o0zvORXSZa6lx1LIIfS+jmTj3dF3ZKG4Rj5ofR2AKV0+rXLXatfUndhy1eD3fGTaFO2cP7hGYHiC2MTEeh/mmS5ZD4h+zf6MrKPFTura5lsdyWfbYfDSjK01b7e5+vI5X0t68mYSJ7XDLZaHwXAsCCEwLaF3fosuz8/1aWiya0xqQdZtn6Do/pVsNXkeRuTUc29K1trz/ewIIzPc8sv+m+4hevYybK7XYXWnd1310ucKmDbXevOXu7Owd/AcH7W7F/cEIv9oIaDf9NuIyH7VcTMOff633ojItqBODi8hCTJo0CbrYc6JBE2rdX4vAdGdotqBVuU1HLhq1/P16wpYFXylLV7R9g5iITZMm9qoBbXUEEJgVsdbaDn09sjZGLctJtR3NqAaqBW01BBCYFXDWsFwLyKxNn8yvX7PRUorXw2hGrJqMZlQLviql6PbzvL3X9+NvLa0cHtrvGtYWlppnYDsCe1cRKzETO0vTmiPVhJafAJQzM9aNi/t7tiH5+/eT+f64DecvM2dQh3kx097CYmhpqolqQ8tLAIHJy3e+ebVlYld7z5baaS4zgpWaF0PL4W+qiTYWp+UlgMDk5Ws6tVALwdqcJZQ59GrNi6WYphonSqYIdX8egenOcKkFy/YDOkeIr0VLMTZ6UizFNNUstUnZ4PnlBBCY5Xw6P6vbAlLt8so2OZmyw/P/ELAwtdTmH4v8rw0BBKYNtQbvSc2/aL0L98g0AGp8qZimVvumamN0xcuWEEBglsDp+pQOok81neVMy0PAwtZSozzRrYdVw5/AeoAolSVzL/nIwzYfW6tlBMZKitdBAAKNCSAwjZHxBghAwEoAgbGS4nUQgEBjAghMY2S8AQIQsBJAYKykeB0EINCYAALTGBlvgAAErAQQGCspXgcBCDQmgMA0RsYbIAABK4G41xqtNAFWk5auAP5zEUBgcpE12t2MZyP9+1+UwYiLl1VGgK9IlRWMcCFQEwEEpqZqESsEKiOAwFRWMMKFQE0EEJiaqkWsEKiMAAJTWcEIFwI1EUBgaqoWsUKgMgIITGUFI1wI1ESABRiZq2U5PiNzCJiHQDECCExG9NoT9r//s500mDEMTEOgGAG+IhVDj2MI+CeAwPivMRlCoBgBBKYYehxDwD8BBMZ/jckQAsUIIDDF0OMYAv4JIDD+a0yGEChGAIEphh7HEPBPAIHxX2MyhEAxAghMMfQ4hoB/AgiM/xqTIQSKEUBgiqHHMQT8E0Bg/NeYDCFQjAACUww9jiHgnwAC47/GZAiBYgQQmGLocQwB/wQQGP81JkMIFCOAwBRDj2MI+CeAwPivMRlCoBgBBKYYehxDwD8BBMZ/jckQAsUIIDDF0OMYAv4JIDD+a0yGEChGAIEphh7HEPBPAIHxX2MyhEAxAghMMfQ4hoB/AgiM/xqTIQSKEUBgiqHHMQT8E0Bg/NeYDCFQjAACUww9jiHgnwAC47/GZAiBYgQQmGLocQwB/wQQGP81JkMIFCOAwBRDj2MI+CeAwPivMRlCoBgBBKYYehxDwD8BBMZ/jckQAsUIIDDF0OMYAv4JIDD+a0yGEChGAIEphh7HEPBPAIHxX2MyhEAxAghMMfQ4hoB/AgiM/xqTIQSKEUBgiqHHMQT8E0Bg/NeYDCFQjAACUww9jiHgnwAC47/GZAiBYgQQmGLocQwB/wQQGP81JkMIFCOAwBRDj2MI+CeAwPivMRlCoBgBBKYYehxDwD8BBMZ/jckQAsUIIDDF0OMYAv4JIDD+a0yGEChGAIEphh7HEPBPAIHxX2MyhEAxAghMMfQ4hoB/AgiM/xqTIQSKEUBgiqHHMQT8E0Bg/NeYDCFQjAACUww9jiHgnwAC47/GZAiBYgQQmGLocQwB/wQQGP81JkMIFCOAwBRDj2MI+CeAwPivMRlCoBgBBKYYehxDwD8BBMZ/jckQAsUIIDDF0OMYAv4JIDD+a0yGEChGAIEphh7HEPBPAIHxX2MyhEAxAghMMfQ4hoB/AgiM/xqTIQSKEUBgiqHHMQT8E0Bg/NeYDCFQjAACUww9jiHgnwAC47/GZAiBYgQQmGLocQwB/wQQGP81JkMIFCOAwBRDj2MI+CeAwPivMRlCoBgBBKYYehxDwD8BBMZ/jckQAsUI/B/m95a6zS3tegAAAABJRU5ErkJggg=="; -async function chatMembersList(mid) { - notify("Loading...", "#FFF", "#333"); - let member = (await Line.getSquareChatMembers(mid)).squareChatMembers; - let members = []; - for (let i = 0; i < member.length; i++) { - const e = member[i]; - let data = { - mid: e.squareMemberMid, - name: e.displayName, - }; - if (e.profileImageObsHash) { - data.img = await getObsUrl(e.profileImageObsHash + "/preview"); - } - if (!data.img) { - data.img = defaltIMG; - } - members.push(data); - } - let data = { - mid: mid, - members: members, - }; - $("#root > div > div > div:nth-child(4)").in(genMemberList(data)); -} - -function genMemberList(data) { - function memberButton(data, index) { - return div( - { - "class": "friendlistItem-module__item__1tuZn ", - "data-mid": data.mid, - "style": "position: absolute; left: 0px; top: " + (index * 57 + 20) + "px; height: 57px; width: 100%;", - "$click": (...arg) => { - buttonEvent("openProfileM", arg); - }, - }, - div( - { - "class": "profileImage-module__thumbnail_wrap__0bK7m ", - "data-mid": data.mid, - "data-profile-image": "true", - "style": "width: 43px; height: 43px; border-radius: 50%;", - }, - button( - { - "type": "button", - "class": "profileImage-module__button_profile__GqKue", - }, - div( - { - "class": "profileImage-module__thumbnail_area__nqIpB", - }, - span( - { - "class": "profileImage-module__thumbnail__Q6OsR", - }, - img( - { - "src": data.img, - "class": "", - "loading": "lazy", - "alt": "", - "draggable": "false", - }, - ), - ), - ), - ), - ), - div( - { - "class": "friendlistItem-module__info__89Stz", - }, - strong( - { - "class": "friendlistItem-module__name_box__fUKhX", - "role": "", - }, - span( - { - "class": "friendlistItem-module__text__YxSko", - }, - pre( - {}, - span( - {}, - data.name, - ), - ), - ), - ), - ), - ); - } - let members = []; - data.members.forEach((e, i) => { - members.push(memberButton(e, i)); - }); - return div( - { - "class": "memberPopup-module__popup__KtCXP ", - "style": "min-width:300;", - }, - div( - { - "class": "memberPopup-module__contents__7scEN", - }, - div( - { - "class": "friendlist-module__list_wrap__IeJXY", - "data-type": "invite", - }, - div( - { - "class": "searchInput-module__input_box__vp6NF", - }, - label( - { - "class": "searchInput-module__label__40CWI", - }, - i( - { - "class": "icon searchInput-module__icon_search__amOMA", - }, - svg( - { - "xmlns": "http://www.w3.org/2000/svg", - "width": "24", - "height": "24", - "viewBox": "0 0 24 24", - }, - g( - { - "fill": "none", - "fill-rule": "evenodd", - }, - g( - {}, - g( - {}, - g( - {}, - g( - {}, - g( - {}, - path( - { - "d": "M0 0H20V20H0z", - "transform": - "translate(-261.000000, -95.000000) translate(181.000000, 54.000000) translate(74.000000, 34.000000) translate(6.000000, 7.000000) translate(2.000000, 2.000000)", - }, - ), - g( - { - "stroke": "#B7B7B7", - "stroke-width": "1.5", - "transform": - "translate(-261.000000, -95.000000) translate(181.000000, 54.000000) translate(74.000000, 34.000000) translate(6.000000, 7.000000) translate(2.000000, 2.000000) translate(4.000000, 4.000000)", - }, - circle( - { - "cx": "4.5", - "cy": "4.5", - "r": "4.5", - "fill-rule": "nonzero", - }, - ), - path( - { - "stroke-linecap": "square", - "d": "M8 8L11 11", - }, - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - input( - { - "class": "searchInput-module__input__ekGp7 ", - "placeholder": "名前で検索", - "maxlength": "20", - "data-chatmid": data.mid, - "value": "", - "$input": (...arg) => { - buttonEvent("searchMember", arg); - }, - }, - ), - button( - { - "type": "button", - "class": "searchInput-module__button_reset__l2-td", - "aria-label": "reset", - "$click": (...arg) => {}, - }, - i( - { - "class": "icon searchInput-module__icon_reset__bPtuX", - }, - svg( - { - "xmlns": "http://www.w3.org/2000/svg", - "width": "24", - "height": "24", - "viewBox": "0 0 24 24", - }, - g( - { - "fill": "none", - "fill-rule": "evenodd", - }, - g( - {}, - g( - {}, - g( - {}, - g( - {}, - path( - { - "d": "M0 0H24V24H0z", - "transform": - "translate(-1216.000000, -227.000000) translate(928.000000, 162.000000) translate(14.000000, 58.000000) translate(274.000000, 7.000000)", - }, - ), - path( - { - "fill": "#C8C8C8", - "d": "M12 5c3.866 0 7 3.134 7 7s-3.134 7-7 7-7-3.134-7-7 3.134-7 7-7zm2.413 3.5L12 10.912 9.587 8.5 8.5 9.587 10.912 12 8.5 14.413 9.587 15.5 12 13.087l2.413 2.413 1.087-1.087L13.087 12 15.5 9.587 14.413 8.5z", - "transform": - "translate(-1216.000000, -227.000000) translate(928.000000, 162.000000) translate(14.000000, 58.000000) translate(274.000000, 7.000000)", - }, - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - div( - { - "class": "friendlist-module__list__Z-8nt", - }, - div( - { - "class": "friendlist-module__inner__d3xFH", - "style": "position: relative; overflow: hidden;", - }, - div( - { - "style": "position: absolute; width: 100%; height: 100%;", - }, - div( - { - "style": - "position: relative; height: 558px; width: 100%; overflow: overlay; will-change: transform; direction: ltr;", - }, - div( - { - "style": "height: " + (data.members.length * 57 + 60) + "px; width: 100%;", - }, - div( - { - "class": "categoryLayout-module__category_wrap__31191 ", - "style": - "position: absolute; left: 0px; top: 0px; height: 20px; width: 100%;", - }, - button( - { - "class": "categoryLayout-module__button_category__nqIZM", - "aria-expanded": "true", - }, - span( - { - "class": "categoryLayout-module__title__iV725", - }, - span( - { - "class": "categoryLayout-module__text__crUcb", - }, - "メンバー", - ), - span( - { - "class": "categoryLayout-module__count__8h25Q", - }, - data.members.length, - ), - ), - i( - { - "class": "icon categoryLayout-module__icon_arrow__kdyor", - }, - svg( - { - "xmlns": "http://www.w3.org/2000/svg", - "width": "20", - "height": "20", - "viewBox": "0 0 20 20", - }, - g( - { - "fill": "none", - "fill-rule": "evenodd", - }, - path( - { - "d": "M0 0H20V20H0z", - }, - ), - path( - { - "fill-rule": "nonzero", - "stroke": "#C8C8C8", - "stroke-linecap": "square", - "stroke-width": "1.4", - "d": "M7 11L7 5 13 5", - "transform": "rotate(-135 10 8)", - }, - ), - ), - ), - ), - ), - ), - ...members, - ), - ), - ), - ), - ), - ), - ), - ); -} -async function memberPopup(pid) { - let data = await refreshProfile(pid); - let data2 = await getProfile(pid, true); - data.desc = JSON.stringify(data2, null, 2); - let member = genProfilePopup(data); - $("#modal-root").in(member); - member.scrollIntoView(); -} -function genProfilePopup(data) { - return div( - { - "class": "profileModal-module__modal__QRrnT ", - "role": "dialog", - "aria-labelledby": "profile modal", - "style": "position: absolute;z-index: 28;left: 0px;top: 0px;width: 100%;height: 100%;text-align: center;", - }, - div( - { - "class": "profileModal-module__content__qKTEy", - "style": - "width: 300px;height: 400px;margin-right: auto;margin-left: auto;margin-top: 100;border: solid;background-color: #fff;border-color: black;", - }, - button({ - "type": "button", - "style": "margin-right: auto;font-size: 18px;margin-left: 10px;margin-top: 10px;", - "$click": () => { - document.querySelector("#modal-root").innerHTML = ""; - }, - }, "X"), - div( - { - "class": "profileModal-module__info_area__VRAIt", - "style": "height:100px", - }, - div( - { - "class": "profileImage-module__thumbnail_wrap__0bK7m ", - "data-mid": data.mid, - "data-profile-image": "true", - "style": "border-radius: 50%;cursor: default;margin: 0 0 0 0;", - }, - div( - { - "class": "profileImage-module__thumbnail_area__nqIpB", - "$click": (...arg) => { - buttonEvent("openProfileImg", arg); - }, - }, - span( - { - "class": "profileImage-module__thumbnail__Q6OsR", - }, - img( - { - "src": data.img, - "class": "", - "loading": "lazy", - "alt": "", - "draggable": "false", - }, - ), - ), - ), - ), - div( - { - "class": "profileModal-module__name_box__vJfbr", - }, - button( - { - "class": "editButton-module__button_edit__GA02s ", - "type": "button", - "aria-pressed": "false", - "data-ellipsis": "1", - }, - span( - { - "class": "editButton-module__name__uQ-y5", - }, - pre( - {}, - span( - {}, - data.name, - ), - ), - ), - ), - ), - div( - { - "class": "profileModal-module__description_box__Jb6O2", - "style": "max-height:300;", - }, - pre( - { - "class": "profileModal-module__description__hSNDU", - "data-tooltip": "87f15f9f-0c36-4796-bf4e-f74d9f10fef5", - "style": "text-align: left;user-select:text;", - }, - data.desc, - ), - ), - ), - div( - { - "class": "profileModal-module__action_area__gN4d-", - "data-mid": data.mid, - }, - button( - { - "type": "button", - "class": "profileModal-module__button_action__SmB4T", - "$click": (...arg) => { - buttonEvent("reportMember", arg); - }, - }, - "通報", - ), - button( - { - "type": "button", - "class": "profileModal-module__button_action__SmB4T", - "$click": (...arg) => { - buttonEvent("kickoutMember", arg); - }, - }, - "強制退会", - ), - ), - ), - ); -} - -function genTxtPopup(data) { - $("#modal-root").out.appendChild(div( - { - "class": "profileModal-module__modal__QRrnT ", - "role": "dialog", - "aria-labelledby": "profile modal", - "style": "position: absolute;z-index: 28;left: 0px;top: 0px;width: 100%;height: 100%;text-align: center;", - }, - div( - { - "class": "profileModal-module__content__qKTEy", - "style": - "width: 300px;height: 400px;margin-right: auto;margin-left: auto;margin-top: 100;border: solid;background-color: #fff;border-color: black;", - }, - button({ - "type": "button", - "style": "margin-right: auto;font-size: 18px;margin-left: 10px;margin-top: 10px;", - "$click": () => { - document.querySelector("#modal-root").innerHTML = ""; - }, - }, "X"), - div( - { - "class": "profileModal-module__info_area__VRAIt", - "style": "height:100px", - }, - div( - { - "class": "profileModal-module__name_box__vJfbr", - }, - span( - { - "class": "editButton-module__name__uQ-y5", - }, - pre( - {}, - span( - {}, - data.name, - ), - ), - ), - ), - div( - { - "class": "profileModal-module__description_box__Jb6O2", - "style": "max-height:300;", - }, - pre( - { - "class": "profileModal-module__description__hSNDU", - "data-tooltip": "87f15f9f-0c36-4796-bf4e-f74d9f10fef5", - "style": "text-align: left;user-select:text;", - }, - data.desc, - ), - ), - ), - ), - )); - console.log(data); -} - -function notify(text, color, bcolor, time = 5000) { - let noti = li( - {}, - div( - { - style: "background-color:" + bcolor + ";border-radius: 17.5px;user-select:text;", - "$click": () => { - $("#root > div > ul").out.innerHTML = ""; - }, - }, - pre( - { - style: "font-size:20px;padding:5px;color:" + color + ";", - }, - text, - ), - ), - ); - $("#root > div > ul").out.appendChild(noti); - setTimeout(() => { - $("#root > div > ul").out.removeChild(noti); - }, time); -} - -async function buildChatButton(squareChatResponseList = []) { //[getSquareChatResponse]からチャットリストのボタンを生成追加 - function list(inElm) { - return div({ style: "height: " + 71 * squareChatResponseList.length + "px; width: 100%;" }, ...inElm); - } - let elms = []; - for (let index = 0; index < squareChatResponseList.length; index++) { - const element = squareChatResponseList[index]; - let elm = await squareChat2chatButton(element, index); - observer.observe(elm); - elms.push(elm); - } - let res = list(elms); - $("#root > div > div > div.chatlist-module__chatlist_wrap__KtTpq > div.chatlist-module__chatlist__qruAE > div > div > div") - .in(res); - setInterval(() => { - try { - fetchEventUpdate(); - //更新開始 - } catch (error) { - } - }, 2000); - return res; -} -async function buildChatButtonC(dataList = []) { //dataListからチャットリストのボタンを生成追加 - function list(inElm) { - return div({ style: "height: " + 71 * dataList.length + "px; width: 100%;" }, ...inElm); - } - let elms = []; - for (let index = 0; index < dataList.length; index++) { - const element = await Line.getSquareChat(dataList[index]); - let elm = await squareChat2chatButton(element); - if (!elm) { - continue; - } - observer.observe(elm); - elms.push(elm); - } - let res = list(elms); - $("#root > div > div > div.chatlist-module__chatlist_wrap__KtTpq > div.chatlist-module__chatlist__qruAE > div > div > div") - .in(res); - setInterval(() => { - try { - fetchEventUpdate(); //更新開始 - } catch (error) { - } - }, 2000); - return res; -} -function fetchEventUpdate() { //fetchMyEvents fetchSquareChatEvents から表示を更新 - if (Line.SQ1.socket.post.readyState !== Line.SQ1.socket.post.OPEN) { - Line.SQ1.reOpenSocket(); - notify("Network Error", "#fff", "#f00"); - return; - } - let mids = []; - chatData.chatList.forEach((e, i) => { - let is1 = true; - mids.forEach((f) => { - if (e.mid == f) { - is1 = false; - } - }); - if (is1) { - mids.push(e.mid); - } else { - chatData.chatList.splice(i, 1); - } - }); - - UserCashe.setItem(Line.mid + ":chatsList", mids); - //myEvent - (async () => { - function list(inElm) { - return div({ style: "height: " + 71 * inElm.length + "px; width: 100%;" }, ...inElm); - } - let elms = []; - if (!chatData.syncToken) { - chatData.syncToken = (await Line.fetchMyEvents()).syncToken; - } - let res = await Line.timeout(() => Line.fetchMyEvents(chatData.syncToken), 3500); - chatData.syncToken = res.syncToken; - res.events.forEach(async (e) => { - let chat; - switch (e.type) { - case 29: - chat = await getChatdata(e.payload.notificationMessage.squareChatMid); - let date = e.payload.notificationMessage.squareMessage.message.deliveredTime; - date = new Date(date); - date = date.getMonth() + 1 + "/" + date.getDate(); - chat.timeInt = e.payload.notificationMessage.squareMessage.message.deliveredTime; - if (e.payload.notificationMessage.squareMessage.message.text) { - chat.lastText = e.payload.notificationMessage.squareMessage.message.text; - } - - if (e.payload.notificationMessage.unreadCount) { - let unread = e.payload.notificationMessage.unreadCount; - chat.unread = span({ class: "chatlistItem-module__message_count__FRt4s" }, unread); - } else { - chat.unread = ""; - } - break; - case 13: - chat = await getChatdata(e.payload.notifiedUpdateSquareChatStatus.squareChatMid); - chat.member = e.payload.notifiedUpdateSquareChatStatus.statusWithoutMessage.memberCount; - if (e.payload.notifiedUpdateSquareChatStatus.statusWithoutMessage.unreadCount) { - let unread = e.payload.notifiedUpdateSquareChatStatus.statusWithoutMessage.unreadCount; - chat.unread = span({ class: "chatlistItem-module__message_count__FRt4s" }, unread); - } else { - chat.unread = ""; - } - default: - break; - } - }); - chatData.chatList.sort((a, b) => { - return b.timeInt - a.timeInt; - }); - chatData.chatList.forEach((e, i) => { - e.index = i; - elms.push(genChatButton(e)); - }); - let elm = list(elms); - $("#root > div > div > div.chatlist-module__chatlist_wrap__KtTpq > div.chatlist-module__chatlist__qruAE > div > div > div") - .in(elm); - - async function getChatdata(id) { - for (let index = 0; index < chatData.chatList.length; index++) { - const e = chatData.chatList[index]; - if (e.mid == id) { - return e; - } - } - let chat = await Line.getSquareChat(id); - await squareChat2chatButton(chat, 0); - return await getChatdata(id); - } - })(); -} - -async function squareChat2chatButton(squareChatResponse, index) { //getSquareChatと上からの順番からボタンを生成 - let lastText = ""; - let date = ""; - let unread = ""; - if (!squareChatResponse.squareChatStatus) { - return; - } - if (squareChatResponse.squareChatStatus.lastMessage) { - date = new Date(squareChatResponse.squareChatStatus.lastMessage.message.createdTime); - date = date.getMonth() + 1 + "/" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes(); - if (squareChatResponse.squareChatStatus.lastMessage.message.text) { - lastText = squareChatResponse.squareChatStatus.lastMessage.message.text; - } - } - if (squareChatResponse.squareChatStatus.otherStatus.unreadMessageCount) { - unread = squareChatResponse.squareChatStatus.otherStatus.unreadMessageCount; - unread = span({ class: "chatlistItem-module__message_count__FRt4s" }, unread); - } - let data = { - mid: squareChatResponse.squareChat.squareChatMid, - name: squareChatResponse.squareChat.name, - member: squareChatResponse.squareChatStatus.otherStatus.memberCount, - img: await getObsUrl(squareChatResponse.squareChat.chatImageObsHash), - index: index, - date: date, - timeInt: squareChatResponse.squareChatStatus.lastMessage - ? squareChatResponse.squareChatStatus.lastMessage.message.createdTime - : 0, - lastText: lastText, - unread: unread, - }; - chatData.chatList.push(data); - return genChatButton(data); -} - -function genChatButton(data) { //html生成部分 - return div( - { - "class": "chatlistItem-module__chatlist_item__MOwxh ", - "aria-selected": "false", - "aria-busy": "false", - "aria-current": "true", - "data-mid": data.mid, - "style": "position: absolute; left: 0px; top: " + data.index * 71 + "px; height: 71px; width: 100%;", - }, - div( - { - "class": "profileImage-module__thumbnail_wrap__0bK7m ", - "data-mid": data.mid, - "data-profile-image": "true", - "style": "width: 53px; height: 53px; border-radius: 50%;", - }, - button( - { - "type": "button", - "class": "profileImage-module__button_profile__GqKue", - }, - div( - { - "class": "profileImage-module__thumbnail_area__nqIpB", - }, - span( - { - "class": "profileImage-module__thumbnail__Q6OsR", - }, - img( - { - "src": data.img, - "class": "", - "loading": "lazy", - "alt": "", - "draggable": "false", - }, - ), - ), - ), - ), - ), - div( - { - "class": "chatlistItem-module__info__nHGhi", - }, - strong( - { - "class": "chatlistItem-module__title_box__aDNJD", - }, - span( - { - "class": "chatlistItem-module__text__daDD3", - }, - pre( - {}, - span( - {}, - data.name, - ), - ), - ), - span( - { - "class": "chatlistItem-module__member_count__MbL2c", - }, - "(" + data.member + ")", - ), - ), - time( - { - "datetime": "Tue Mar 26 2024 14:20:07 GMT+0900 (日本標準時)", - "class": "chatlistItem-module__date__tG-MV", - }, - data.date, - ), - div( - { - "class": "chatlistItem-module__description__JH3NE", - }, - p( - { - "class": "chatlistItem-module__text__daDD3", - }, - span( - { - "data-message-id": "500966165850882385", - }, - data.lastText, - ), - ), - ), - data.unread, - ), - button( - { - "role": "link", - "type": "button", - "aria-label": "Go chatroom", - "class": "chatlistItem-module__button_chatlist_item__pcmtA", - "$click": (...arg) => { - buttonEvent("goChat", arg); - }, - }, - ), - ); -} - -var roomData = { //chat - messageView: { - dataList: [], - elmList: [], - }, - mymid: null, - roomMid: null, - followLatest: false, - setting: {}, -}; - -var URLcashe = localforage.createInstance({ - name: "URLcashe", -}); -var MDataCashe = localforage.createInstance({ - name: "MDataCashe", -}); -var ThriftCashe = localforage.createInstance({ - name: "ThriftCashe", -}); -var UserCashe = localforage.createInstance({ - name: "UserCashe", -}); -async function getMDataUrl(id) { - let url = "https://obs-jp.line-apps.com/r/g2/m/" + id; - let data = await MDataCashe.getItem(url); - if (data) { - return createObjectURL(url, data); - } else { - let res; - try { - res = await Line.proxyFetch(url, { - "x-line-access": Line.authToken, - "x-line-application": Line.SQ1.config.appName, - }); - } catch (error) { - } - if (!res || !res.ok) { - console.error("Error response at " + url); - return ""; - } - data = await res.blob(); - MDataCashe.setItem(url, data); - return createObjectURL(url, data); - } -} -async function getMPDataUrl(id) { - let url = "https://obs-jp.line-apps.com/r/g2/m/" + id + "/preview"; - let data = await MDataCashe.getItem(url); - if (data) { - return createObjectURL(url, data); - } else { - let res; - try { - res = await Line.proxyFetch(url, { - "x-line-access": Line.authToken, - "x-line-application": Line.SQ1.config.appName, - }); - } catch (error) { - } - if (!res || !res.ok) { - console.error("Error response at " + url); - return ""; - } - data = await res.blob(); - MDataCashe.setItem(url, data); - return createObjectURL(url, data); - } -} -async function getMsgById(id, isElm) { - let data = { txt: "このメッセージはありません" }; - if (isElm) { - for (let index = 0; index < roomData.messageView.elmList.childNodes.length; index++) { - const e = roomData.messageView.elmList.childNodes[index]; - if (e.dataset.id == id) { - return e; - } - } - return null; - } - for (let index = 0; index < roomData.messageView.dataList.length; index++) { - const e = roomData.messageView.dataList[index]; - if (e.id == id) { - if (e.text) { - data.txt = e.text; - data.profile = await getProfile(e._from); - } else { - data.txt = ""; - data.profile = await getProfile(e._from); - } - return data; - } - } - - if (!data.profile) { - data.profile = { img: defaltIMG, mid: "", name: "" }; - } - return data; -} -async function getObsUrl(obs) { - let url = "https://obs.line-scdn.net/" + obs; - let data = await URLcashe.getItem(url); - if (data) { - return createObjectURL(url, data); - } else { - let res; - try { - res = await fetch(url); - } catch (error) { - } - if (!res || !res.ok) { - console.error("Error response at " + url); - res = await fetch(defaltIMG); - } - data = await res.blob(); - URLcashe.setItem(url, data); - return createObjectURL(url, data); - } -} -async function getSquareChatHistory(mid) { - let prot = "squareChatHistory:" + mid; - let data = await ThriftCashe.getItem(prot); - if (data) { - return data; - } else { - return null; - } -} -async function setSquareChatHistory(mid, sync, history = []) { - let prot = "squareChatHistory:" + mid; - let data = await getSquareChatHistory(mid); - if (data) { - data = { - syncToken: sync, - history: [...data.history, ...history], - }; - } else { - data = { - syncToken: sync, - history: history, - }; - } - await ThriftCashe.setItem(prot, data); -} -async function refreshProfile(mid) { - let prot = "squareMember:" + mid; - await ThriftCashe.removeItem(prot); - return await getProfile(mid); -} -async function getProfile(mid, raw) { - if (mid.substring(0, 1) == "v") { - return { - name: "Auto-reply", - img: await getObsUrl( - "0hC0fMBLdfHB9bNA6h2cdjSGViQTEgRwUNJkwRLXxnSyp0DAxBNFVRfncwQykhAFJPY1YDK3g2RngkUAw/preview", - ), - mid: mid, - }; - } - let prot = "squareMember:" + mid; - let data = await ThriftCashe.getItem(prot); - if (data) { - } else { - let res = (await Line.getSquareMember(mid))[1]; - if (res.length == 1) { - console.error("Error response at " + prot); - return ""; - } - let member = new lineType.SquareMember({ - squareMemberMid: res[1], - squareMid: res[2], - displayName: res[3], - profileImageObsHash: res[4], - ableToReceiveMessage: res[5], - membershipState: res[7], - role: res[8], - revision: res[9], - }); - data = member; - ThriftCashe.setItem(prot, data); - } - if (raw) { - return data; - } - let img = defaltIMG; - if (data.profileImageObsHash) { - img = await getObsUrl(data.profileImageObsHash + "/preview"); - } - return { name: data.displayName, img: img, mid: data.squareMemberMid }; -} -async function getStkDataUrl(id) { - let url = "https://stickershop.line-scdn.net/stickershop/v1/sticker/" + id + "/android/sticker.png"; - let data = await URLcashe.getItem(url); - if (data) { - return URL.createObjectURL(data); - } else { - let res; - try { - res = await fetch(url); - } catch (error) { - } - if (!res || !res.ok) { - console.error("Error response at " + url); - return ""; - } - data = await res.blob(); - URLcashe.setItem(url, data); - return URL.createObjectURL(data); - } -} -async function buttonEvent(n, arg, add) { - if (n == "goChat") { - if (roomData.roomMid == arg[0].parentElement.dataset.mid) { - notify("すでに開いています", "red", "#fff"); - return; - } - notify("Loading...", "#000", "#fff"); - roomData.roomMid = arg[0].parentElement.dataset.mid; - await squareChat2chatroom(await Line.getSquareChat(arg[0].parentElement.dataset.mid)); - await initTalk(arg[0].parentElement.dataset.mid); - updateChat(); - return; - } - if (n == "send") { - if (roomData.command) { - cRequest(arg[0].parentElement.parentElement.childNodes[0].childNodes[0].value); - cResponse(await runCommand(" " + arg[0].parentElement.parentElement.childNodes[0].childNodes[0].value)); - } - if (arg[0].parentElement.parentElement.childNodes[0].childNodes[0].value.substring(0, 4) == "$cmd") { - notify( - await runCommand(arg[0].parentElement.parentElement.childNodes[0].childNodes[0].value.substring(4)), - "#fff", - "#222", - 7000, - ); - return; - } - Line.sendTxtMessage(roomData.roomMid, arg[0].parentElement.parentElement.childNodes[0].childNodes[0].value); - arg[0].parentElement.parentElement.childNodes[0].childNodes[0].value = ""; - return; - } - if (n == "viewReply") { - let res = await getMsgById(arg[0].parentElement.dataset.messageId, true); - if (res) { - res.scrollIntoView(); - } - return; - } - if (n == "chatScroll") { - var scroll = arg[0].scrollTop; - if (scroll > -1) { - arg[0].parentElement.childNodes[1].dataset.hidden = "true"; - roomData.followLatest = true; - } else { - roomData.followLatest = false; - arg[0].parentElement.childNodes[1].dataset.hidden = "false"; - } - return; - } - if (n == "chatDown") { - roomData.followLatest = true; - arg[0].parentElement.childNodes[2].scrollTop = 0; - return; - } - if (n == "openProfileM") { - memberPopup(arg[0].dataset.mid); - return; - } - if (n == "openProfile") { - memberPopup(arg[0].parentElement.dataset.mid); - return; - } - if (n == "closeChat") { - roomData.roomMid = null; - $("#root > div > div > div:nth-child(4)").out.innerHTML = ""; - return; - } - if (n == "memberView") { - roomData.roomMid = null; - chatMembersList(arg[0].parentElement.parentElement.parentElement.parentElement.dataset.mid); - return; - } - if (n == "imgMsgView") { - notify("画像を読み込み中...", "#fff", "green"); - open( - await getMDataUrl(arg[0].parentElement.parentElement.dataset.messageId), - "image", - "popup,width=400,height=400", - ); - return; - } - if (n == "videoMsgView") { - notify("動画を読み込み中...", "#fff", "green"); - open( - await getMDataUrl(arg[0].parentElement.parentElement.dataset.messageId), - "video", - "popup,width=400,height=400", - ); - return; - } - if (n == "stkView") { - open("https://store.line.me/stickershop/product/" + arg[0].dataset.stkPkgId); - return; - } - if (n == "openProfileImg") { - open( - "https://obs.line-scdn.net/" + - (await getProfile(arg[0].parentElement.dataset.mid, true)).profileImageObsHash, - "image", - "popup,width=400,height=400", - ); - return; - } - if (n == "openConsole") { - consoleRoom(); - return; - } - if (n == "msgAction") { - genTxtPopup({ name: "Message Data", desc: JSON.stringify(add, null, 2) }); - return; - } - if (n == "eventView") { - genTxtPopup({ name: "Event Data", desc: JSON.stringify(add, null, 2) }); - return; - } - if (n == "msgInput") { - return; - } - console.log(n, arg); -} -async function runCommand(command) { - console.log(command); - command = command.split(" "); - switch (command[1]) { - case "viewRead": - if (command[2] == "true") { - roomData.setting.viewMkRead = true; - return "viewMkRead : true"; - } else { - roomData.setting.viewMkRead = false; - return "viewMkRead : false"; - } - case "allkick": - return "👿"; - case "silent": - return `${command[2]} : mode = Silent`; - case "nosilent": - return `${command[2]} : mode = Normal`; - case "status": - return `OpenChat-Web-Client : ${window.version} / ${window.versionCode} -User-Name : ${Line.name} -User-Mid : ${Line.mid} -User-Device : ${Line.deviceName} -SquareChatMid : ${roomData.commandMid ? roomData.commandMid : roomData.roomMid} -MySquareMemberMid : ${roomData.mymid}`; - case "cd": - roomData.commandMid = command[2]; - roomData.mymid = null; - return `SquareChatMid : ${roomData.commandMid}`; - default: - return "unknown command : " + command[1]; - } -} -function consoleRoom() { - let data = { - mymid: roomData.mymid, - mid: roomData.roomMid, - name: "Console", - member: version, - img: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBoRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAMAAAExAAIAAAARAAAATgAAAAAAAJOjAAAD6AAAk6MAAAPocGFpbnQubmV0IDUuMC4xMwAA/+ICKElDQ19QUk9GSUxFAAEBAAACGAAAAAAEMAAAbW50clJHQiBYWVogAAAAAAAAAAAAAAAAYWNzcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAPbWAAEAAAAA0y0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJZGVzYwAAAPAAAAB0clhZWgAAAWQAAAAUZ1hZWgAAAXgAAAAUYlhZWgAAAYwAAAAUclRSQwAAAaAAAAAoZ1RSQwAAAaAAAAAoYlRSQwAAAaAAAAAod3RwdAAAAcgAAAAUY3BydAAAAdwAAAA8bWx1YwAAAAAAAAABAAAADGVuVVMAAABYAAAAHABzAFIARwBCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9wYXJhAAAAAAAEAAAAAmZmAADypwAADVkAABPQAAAKWwAAAAAAAAAAWFlaIAAAAAAAAPbWAAEAAAAA0y1tbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADb/2wBDAAIBAQEBAQIBAQECAgICAgQDAgICAgUEBAMEBgUGBgYFBgYGBwkIBgcJBwYGCAsICQoKCgoKBggLDAsKDAkKCgr/2wBDAQICAgICAgUDAwUKBwYHCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgr/wAARCAABAAEDARIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+f+igD//Z", - inputName: "コマンド ", - }; - let res = genChatroom(data); - $("#root > div > div > div:nth-child(4)").in(res); - if (!roomData.commandMid) { - roomData.commandMid = roomData.roomMid; - } - roomData.command = true; - roomData.roomMid = null; - data = { - isSelected: false, - timeInt: new Date().getTime(), - timeStr: new Date() - .toLocaleTimeString() - .substring(0, 5), - profile: { img: defaltIMG, name: "console", mid: "vconsole" }, - mid: "vconsole", - msgId: new Date().getTime(), - contentType: 0, - direction: "", //reverse - msgGroup: "item", - text: `chatCommand -OpenChat-Web-Client : ${window.version} / ${window.versionCode} -User-Name : ${Line.name} -User-Mid : ${Line.mid} -User-Device : ${Line.deviceName} -SquareChatMid : ${roomData.commandMid} -MySquareMemberMid : ${roomData.mymid}`, - }; - appendMsgByData(data); -} -function cResponse(text) { - data = { - isSelected: false, - timeInt: new Date().getTime(), - timeStr: new Date() - .toLocaleTimeString() - .substring(0, 5), - profile: { img: defaltIMG, name: "console", mid: "vconsole" }, - mid: "vconsole", - msgId: new Date().getTime(), - contentType: 0, - direction: "", //reverse - msgGroup: "item", - text: text, - }; - appendMsgByData(data); -} -function cRequest(text) { - data = { - isSelected: false, - timeInt: new Date().getTime(), - timeStr: new Date() - .toLocaleTimeString() - .substring(0, 5), - profile: { img: defaltIMG, name: "console", mid: "vconsole" }, - mid: "vconsole", - msgId: new Date().getTime(), - contentType: 0, - direction: "reverse", // - msgGroup: "item", - text: text, - }; - appendMsgByData(data); -} -function appendMsgByData(data) { - let dom = genMsg(data); - roomData.messageView.elmList.prepend(dom); - if (roomData.followLatest) { - dom.scrollIntoView(); - } - observer.observe(dom); -} -async function squareChat2chatroom(squareChatResponse) { - roomData.messageView.dataList = []; - roomData.commandMid = null; - roomData.command = false; - roomData.roomMid = squareChatResponse.squareChat.squareChatMid; - let data = { - mymid: squareChatResponse.squareChatMember.squareMemberMid, - mid: squareChatResponse.squareChat.squareChatMid, - name: squareChatResponse.squareChat.name, - member: squareChatResponse.squareChatStatus.otherStatus.memberCount, - img: await getObsUrl(squareChatResponse.squareChat.chatImageObsHash), - inputName: (await getProfile(squareChatResponse.squareChatMember.squareMemberMid)).name + "として", - }; - let res = genChatroom(data); - $("#root > div > div > div:nth-child(4)").in(res); - return res; -} -function genChatroom(data) { - let mlist = div( - { - "class": "message_list", - "role": "log", - "data-mymid": data.mymid, - "$scroll": (...arg) => { - buttonEvent("chatScroll", arg); - }, - "style": "background-color:rgba(0,0,0,0.2)", - }, - ); - roomData.mymid = data.mymid; - roomData.messageView.elmList = mlist; - let notifyMsg = div({}); - roomData.notifyMsg = notifyMsg; - return div( - { - "class": "chatroom-module__chatroom__eVUaK ", - "data-mid": data.mid, - "data-font-size": "normal", - "data-is-dropzone": "true", - }, - div( - { - "class": "chatroomHeader-module__header__ihDT2", - }, - div( - { - "class": "chatroomHeader-module__inner__0P5fp", - }, - div( - { - "class": "chatroomHeader-module__info__2my0W", - }, - button( - { - "type": "button", - "class": "chatroomHeader-module__button_name__US7lb", - "aria-controls": "member_popup", - "aria-haspopup": "false", - "aria-expanded": "false", - "$click": (...arg) => { - buttonEvent("memberView", arg); - }, - }, - strong( - { - "class": "chatroomHeader-module__name__t-K11", - }, - pre( - {}, - span( - {}, - data.name, - ), - ), - ), - span( - { - "class": "chatroomHeader-module__member_count__s6hqu", - }, - "(" + data.member + ")", - ), - ), - button( - { - "class": "chatroomHeader-module__button_alarm__dBqwP", - "data-tooltip": "通知オフ", - "$click": (...arg) => { - buttonEvent("chatNotiDisable", arg); - }, - }, - i( - { - "class": "icon chatroomHeader-module__icon_alarm__tgjw2", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "7.0", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "m8.377 7.845 5.004-4.665c.419-.391 1.119-.103 1.119.46v16.72c0 .563-.699.851-1.119.46l-5.004-4.665H2.661a.654.654 0 0 1-.654-.545L2 15.515v-7.03a.65.65 0 0 1 .661-.64h5.716zm9.37 1.243a4.185 4.185 0 0 0-.725-.57l-.702 1.09.175.118A2.793 2.793 0 0 1 16.819 14c-.153.15-.32.281-.498.392l.701 1.09.192-.127c.19-.133.368-.28.533-.443a4.068 4.068 0 0 0 0-5.824zM18.637 6c.452.28.87.61 1.25.983a7.008 7.008 0 0 1 0 10.034c-.305.3-.634.57-.983.809L18.64 18l-.704-1.09c.37-.23.712-.5 1.023-.805a5.735 5.735 0 0 0 0-8.21 5.874 5.874 0 0 0-.753-.626l-.27-.179.701-1.09z", - }, - ), - ), - ), - ), - ), - button( - { - "class": "chatroomHeader-module__button_popup__tcF1V", - "data-tooltip": "閉じる", - "$click": (...arg) => { - buttonEvent("closeChat", arg); - }, - }, - "X", - ), - ), - div( - { - "class": "chatroomHeader-module__action_group__k8w1P", - }, - button( - { - "type": "button", - "aria-label": "more button", - "data-tooltip": "ノート", - "class": "chatroomHeader-module__button_more__9rz-2", - "aria-haspopup": "true", - "$click": (...arg) => { - buttonEvent("noteView", arg); - }, - }, - i( - { - "class": "icon chatroomHeader-module__icon_more__Q8OVO", - }, - svg( - { - "xmlns": "http://www.w3.org/2000/svg", - "height": "2em", - "fill": "#fff", - "viewBox": "0 0 20 20", - }, - g( - { - "stroke": "#000", - "stroke-width": "1.5", - }, - path( - { - "d": "M3.75 4c0-.69.56-1.25 1.25-1.25h13c.69 0 1.25.56 1.25 1.25v14.004c0 .69-.56 1.25-1.25 1.25H5c-.69 0-1.25-.56-1.25-1.25V4zM8.523 8.026h5.954M8.523 10.979h5.954M8.523 13.979h5.954", - }, - ), - ), - defs( - {}, - clipPath( - { - "id": "bcclip0_1_5447", - }, - path( - { - "fill": "currentColor", - "transform": "translate(3 2)", - "d": "M0 0h17v18H0z", - }, - ), - ), - ), - ), - ), - ), - button( - { - "type": "button", - "aria-label": "more button", - "class": "chatroomHeader-module__button_more__9rz-2", - "aria-haspopup": "true", - "$click": (...arg) => { - buttonEvent("chatAction", arg); - }, - }, - i( - { - "class": "icon chatroomHeader-module__icon_more__Q8OVO", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "5.0", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "M12 16.4722c.829 0 1.5.671 1.5 1.5 0 .311-.094.599-.256.838-.054.08-.116.155-.183.223a1.499 1.499 0 0 1-1.061.439c-.414 0-.789-.168-1.061-.439a1.5739 1.5739 0 0 1-.183-.223 1.487 1.487 0 0 1-.256-.838c0-.829.671-1.5 1.5-1.5ZM12 10.5c.829 0 1.5.671 1.5 1.5s-.671 1.5-1.5 1.5-1.5-.671-1.5-1.5.671-1.5 1.5-1.5Zm0-5.9722c.829 0 1.5.672 1.5 1.5 0 .829-.671 1.5-1.5 1.5s-1.5-.671-1.5-1.5c0-.828.671-1.5 1.5-1.5Z", - }, - ), - ), - ), - ), - ), - ), - ), - ), - div( - { - "class": "chatroomContent-module__content_area__gK6db ", - "style": "background-image:url(" + data.img + - ");background-size: 100% auto;background-position: center;height:50vh;", - }, - ul( - { - "class": "ToastContainer-module__toast-list__QAniw", - "style": "z-index: 100;", - }, - ), - button( - { - "type": "button", - "aria-label": "Scroll down", - "class": "scrollDownButton-module__button_scroll_down__-XrLT", - "data-hidden": "true", - "$click": (...arg) => { - buttonEvent("chatDown", arg); - }, - }, - i( - { - "class": "icon scrollDownButton-module__icon_arrow__6We-I", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "5.0", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "m13 3.6245-.0002 13.046 5.7122-5.4163 1.3762 1.4512L12 20.3754l-8.0882-7.67 1.3762-1.4512 5.7118 5.4163L11 3.6245h2Z", - }, - ), - ), - ), - ), - ), - mlist, - notifyMsg, - ), - div( - { - "class": "chatroomEditor-module__editor_area__1UsgR", - }, - div( - { - "data-is-empty": "true", - "class": "text chatroomEditor-module__textarea__yKTlH", - spellcheck: "false", - autofocus: "", - maxlength: "10000", - placeholder: "メッセージを入力", - }, - textarea( - { - "part": "input", - "class": "input ", - "placeholder": data.inputName + "メッセージを入力", - "maxlength": "10000", - "autofocus": "", - "style": - 'max-width: 100%; min-width: 100%;max-height:150%;--inherited-font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", helvetica, "Hiragino Sans", arial, "MS PGothic", sans-serif; --webfont-family: F2607980855;', - "$input": (...arg) => { - buttonEvent("msgInput", arg); - }, - }, - ), - div( - { - "class": "cover", - "part": "cover", - "style": - '--inherited-font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", helvetica, "Hiragino Sans", arial, "MS PGothic", sans-serif; --webfont-family: F2607980855;', - }, - ), - ), - div( - { - "class": "actionGroup-module__action_box__-HA8N ", - }, - button( - { - "type": "button", - "aria-label": "Send file", - "class": "actionGroup-module__button_action__VwNgx", - "data-type": "file", - "data-tooltip": "ファイル送信", - "data-tooltip-placement": "top-start", - "$click": (...arg) => { - buttonEvent("sendFile", arg); - }, - }, - i( - { - "class": "icon", - }, - svg( - { - "width": "24", - "height": "24", - "viewBox": "0 0 24 24", - "fill": "none", - "xmlns": "http://www.w3.org/2000/svg", - }, - path( - { - "d": "M11.479 4.971c1.664-1.925 4.658-2.24 6.686-.702.988.749 1.603 1.823 1.73 3.021a4.32 4.32 0 0 1-.908 3.123l-.156.19-8.75 10.125-1.1-.834 8.78-10.158c.566-.655.828-1.47.74-2.3A3.009 3.009 0 0 0 17.3 5.341c-1.382-1.049-3.414-.88-4.615.352l-.134.147-6.762 7.828a1.86 1.86 0 0 0-.458 1.421c.054.513.316.971.744 1.295a2.16 2.16 0 0 0 1.54.418 2.17 2.17 0 0 0 1.296-.597l.123-.131 6.763-7.83a.707.707 0 0 0-.109-1.042.885.885 0 0 0-1.098.046l-.078.078-5.367 6.213-1.043-.954 5.34-6.128a2.316 2.316 0 0 1 3.113-.326 2.034 2.034 0 0 1 .415 2.854l-.102.127-6.763 7.83a3.579 3.579 0 0 1-2.348 1.21 3.578 3.578 0 0 1-2.55-.696 3.192 3.192 0 0 1-1.269-2.22 3.176 3.176 0 0 1 .638-2.26l.142-.176 6.762-7.829z", - "fill": "#303030", - }, - ), - ), - ), - ), - button( - { - "type": "button", - "aria-label": "Select sticker", - "class": "actionGroup-module__button_action__VwNgx", - "data-type": "sticker", - "data-tooltip": "スタンプ", - "data-tooltip-placement": "top-end", - "$click": (...arg) => { - buttonEvent("sendStk", arg); - }, - }, - i( - { - "class": "icon", - }, - svg( - { - "width": "24", - "height": "24", - "viewBox": "0 0 24 24", - "fill": "none", - "xmlns": "http://www.w3.org/2000/svg", - }, - g( - { - "opacity": "0.01", - "fill": "#fff", - }, - path( - { - "d": "M0 0h24v24H0z", - }, - ), - path( - { - "opacity": "0.7", - "d": "M2 2h20v20H2z", - }, - ), - ), - path( - { - "d": "M14.843 13.17a.624.624 0 0 0-.853.228 2.76 2.76 0 0 1-4.78 0 .624.624 0 1 0-1.08.625 4.008 4.008 0 0 0 6.94 0 .624.624 0 0 0-.227-.852z", - "fill": "#303030", - }, - ), - circle( - { - "cx": "14.266", - "cy": "10.464", - "r": "0.96", - "fill": "#303030", - }, - ), - circle( - { - "cx": "8.934", - "cy": "10.464", - "r": "0.96", - "fill": "#303030", - }, - ), - path( - { - "fill-rule": "evenodd", - "clip-rule": "evenodd", - "d": "M11.6 3.22a8.88 8.88 0 1 0 8.88 8.88 8.89 8.89 0 0 0-8.88-8.88zm0 16.512a7.632 7.632 0 1 1 7.632-7.632 7.64 7.64 0 0 1-7.632 7.632z", - "fill": "#303030", - }, - ), - path( - { - "d": "M11.6 3.22v-.1.1zm8.88 8.88h.1-.1zm-8.88 7.632v.1-.1zm7.632-7.632h.1-.1zM11.6 3.12a8.98 8.98 0 0 0-8.98 8.98h.2a8.78 8.78 0 0 1 8.78-8.78v-.2zM2.62 12.1a8.98 8.98 0 0 0 8.98 8.98v-.2a8.78 8.78 0 0 1-8.78-8.78h-.2zm8.98 8.98a8.98 8.98 0 0 0 8.98-8.98h-.2a8.78 8.78 0 0 1-8.78 8.78v.2zm8.98-8.98a8.99 8.99 0 0 0-8.98-8.98v.2a8.79 8.79 0 0 1 8.78 8.78h.2zm-8.98 7.532a7.532 7.532 0 0 1-6.96-4.649l-.184.077a7.732 7.732 0 0 0 7.144 4.772v-.2zm-6.96-4.649a7.532 7.532 0 0 1 1.633-8.209l-.142-.141a7.732 7.732 0 0 0-1.675 8.427l.185-.077zm1.633-8.209a7.532 7.532 0 0 1 8.209-1.633l.076-.185a7.732 7.732 0 0 0-8.427 1.677l.142.141zm8.209-1.633a7.532 7.532 0 0 1 4.65 6.959h.2a7.732 7.732 0 0 0-4.774-7.144l-.076.185zm4.65 6.959a7.54 7.54 0 0 1-7.532 7.532v.2a7.74 7.74 0 0 0 7.731-7.732h-.2z", - "fill": "#303030", - }, - ), - ), - ), - ), - button( - { - "type": "button", - "aria-label": "Select sticker", - "class": "actionGroup-module__button_action__VwNgx", - "data-type": "send", - "data-tooltip": "送信", - "data-tooltip-placement": "top-end", - "$click": (...arg) => { - buttonEvent("send", arg); - }, - }, - i( - { - "class": "icon", - "style": "color:#007aff;", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "15.0", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "m20.1864 11.0044-15.477-7.736a1.1091 1.1091 0 0 0-1.165.105c-.338.254-.503.671-.427 1.087l1.274 7.04h8.108v1h-8.119l-1.263 7.039c-.076.417.089.833.427 1.087.198.148.432.224.667.224.169 0 .34-.039.499-.118l15.476-7.737c.379-.19.614-.571.614-.995 0-.425-.235-.806-.614-.996Z", - }, - ), - ), - ), - ), - ), - ), - ), - ); -} - -const observer = new IntersectionObserver((entries) => { - for (const e of entries) { - if (e.isIntersecting) { - e.target.setAttribute("style", ""); - } else { - e.target.setAttribute("style", "visibility:hidden;"); - } - } -}); - -var fileMenu = ""; - -async function Message2Elm(message) { - let date = new Date(message.deliveredTime); - let data = { - isSelected: false, - timeInt: message.deliveredTime, - timeStr: date.getHours() + ":" + date.getMinutes(), - profile: await getProfile(message._from), - mid: message._from, - msgId: message.id, - rId: message.relatedMessageId, - contentType: message.contentType, - direction: "", - msgGroup: "", - }; - - if (data.mid == roomData.mymid) { - data.direction = "reverse"; - } - if (data.rId && (message.relatedMessageServiceCode == 2) && (message.messageRelationType == 3)) { - data.reply = await getMsgById(data.rId); - } - let add; - - if (message.contentMetadata && message.contentMetadata.UNSENT == "true") { - return [genSysMsg({ - event: { - timeStr: data.timeStr, - arg: message, - text: data.profile.name + "が送信取り消ししたメッセージ", - }, - })]; - } - - switch (message.contentType) { - case 0: //t - add = { - text: [message.text], - emoji: message.contentMetadata ? message.contentMetadata.REPLACE : null, - mention: message.contentMetadata ? message.contentMetadata.MENTION : null, - }; - data = { ...data, ...add }; - break; - case undefined: //t - add = { - text: [message.text], - emoji: message.contentMetadata ? message.contentMetadata.REPLACE : null, - mention: message.contentMetadata ? message.contentMetadata.MENTION : null, - }; - data = { ...data, ...add }; - break; - case 1: //i - add = { - data: { - preview: await getMPDataUrl(message.id), - }, - }; - data = { ...data, ...add }; - break; - case 2: //v - add = { - data: { - preview: await getMPDataUrl(message.id), - }, - }; - data = { ...data, ...add }; - break; - case 3: //a - add = { - data: await getMDataUrl(message.id), - }; - data = { ...data, ...add }; - break; - case 7: //st - add = { - img: await getStkDataUrl(message.contentMetadata.STKID), - stkId: message.contentMetadata.STKID, - stkPId: message.contentMetadata.STKPKGID, - }; - data = { ...data, ...add }; - break; - case 14: //fi - break; - case 16: //note - add = { - text: message.text, - url: message.contentMetadata.postEndUrl, - createBy: message.contentMetadata.officialName, - }; - data = { ...data, ...add }; - break; - break; - case 22: //fl - add = { - text: message.contentMetadata.ALT_TEXT, - flex: message.contentMetadata.FLEX_JSON, - }; - data = { ...data, ...add }; - break; - default: - break; - } - - return [genMsg(data, message), data, genMsg]; //elm data func -} - -function genSysMsg(data, raw) { - if (data.date) { - return div( - { - "class": "messageDate-module__date_wrap__I4ily ", - "data-selected": "false", - }, - time( - { - "class": "messageDate-module__date__pDnK3", - }, - data.date, - ), - ); - } else if (data.event) { - return div( - { - "class": "systemMessage-module__message__yIiOJ ", - "data-flexible": "true", - "data-selected": "false", - "data-timestamp": data.event.timeStr, - "$click": (data.event.arg - ? (...arg) => { - setTimeout(() => - genTxtPopup({ name: "Event Data", desc: JSON.stringify(data.event.arg, null, 2) }) - ); - } - : data.event.onclick), - }, - div( - { - "class": "systemMessage-module__text__7T3Lj", - }, - pre( - {}, - time( - { - "class": "systemMessage-module__date__o1LDL", - "style": "color:#fff;", - }, - data.event.timeStr, - ), - span( - { "style": "color:#fff;" }, - data.event.text, - ), - ), - ), - ); - } -} -function genMsg(data = {}, raw) { - return div( - { - "class": "message-module__message__7odk3 messageLayout-module__message__YVDhk ", - "data-selected": data.isSelected, - "data-timestamp": data.timeInt, - "data-message-content-prefix": data.timeStr + " " + data.profile.name, - "data-mid": data.mid, - "data-group": data.msgGroup, - "data-direction": data.direction, - "data-id": data.msgId, - }, - div( - { - "class": "thumbnail profileImage-module__thumbnail_wrap__0bK7m ", - "data-mid": data.mid, - "data-profile-image": "true", - "style": "border-radius: 50%;", - }, - button( - { - "type": "button", - "class": "profileImage-module__button_profile__GqKue", - "$click": (...arg) => { - buttonEvent("openProfile", arg); - }, - }, - div( - { - "class": "profileImage-module__thumbnail_area__nqIpB", - }, - span( - { - "class": "profileImage-module__thumbnail__Q6OsR", - }, - img( - { - "src": data.profile.img, - "class": "", - "loading": "lazy", - "alt": "", - "draggable": "false", - }, - ), - ), - ), - ), - ), - pre( - { - "class": "username-module__username__vGQGj", - "style": "color:#fff;", - }, - fuchi(data.profile.name), - ), - div( - { - "class": "messageLayout-module__content__PGz66", - }, - div( - { - "class": "message-module__content__OuUCi", - }, - div( - { - "class": "message-module__content_inner__j-iko", - }, - msgMain(data, raw), - div( - { - "class": "metaInfo-module__meta__F2Lfn ", - }, - span( - { - "class": "metaInfo-module__read_count__8-U6j", - }, - ), - time( - { - "class": "metaInfo-module__send_time__-3Q6-", - "style": "color:#fff;", - }, - fuchi(data.timeStr), - ), - ), - ), - ), - div( - { - "class": "reactionBubblelist-module__reaction_bubble_list__eV9o2 ", - }, - ), - fileMenu, - ), - "‌", - ); -} -function msgMain(data, raw) { - fileMenu = ""; - switch (data.contentType) { - case 0: //txt - if (data.reply) { - return replyBox(data, textMsg(data)); - } else { - return textMsg(data); - } - break; - case undefined: //txt - if (data.reply) { - return replyBox(data, textMsg(data)); - } else { - return textMsg(data); - } - break; - case 1: //img - return imgMsg(data); - case 2: //video - return videoMsg(data); - case 3: //audio - return audioMsg(data); - case 7: //sticker - return stickerMsg(data); - case 14: //file - break; - case 16: //note - return noteMessage(data); - case 22: //flex - return flexMsg(data); - default: - break; - } - function noteMessage(data) { - if (!data.text) { - data.text = ""; - } - let text = ["ノート\n", data.text, "\n", a({ href: data.url }, "ノートを見る")]; - return div( - { - "class": "textMessageContent-module__content_wrap__238E1 ", - "data-message-id": data.msgId, - "$contextmenu": (...arg) => { - buttonEvent("msgAction", arg, raw); - }, - "data-direction": data.direction, - }, - pre( - { - "class": "textMessageContent-module__text__EFwEN", - }, - span( - { - "data-message-content": "", - "data-is-message-text": "true", - }, - ...text, - ), - ), - ); - } - function textMsg(data) { - if (!data.text) { - data.text = [""]; - } - if (data.mention) { - let mention = JSON.parse(data.mention); - let txt = []; - let otxt = data.text[0]; - mention.MENTIONEES.forEach((e, i, l) => { - let oE; - if (l[i - 1]) { - oE = Number(l[i - 1].E); - } else { - oE = 0; - } - - if (i == (l.length - 1)) { - txt.push(otxt.substring(oE, Number(e.S))); - txt.push(strong( - { - "class": "mention", - "data-mid": e.M, - "$click": (...arg) => { - buttonEvent("openProfileM", arg); - }, - }, - otxt.substring(Number(e.S), Number(e.E)), - )); - txt.push(otxt.substring(Number(e.E))); - } else { - txt.push(otxt.substring(oE, Number(e.S))); - txt.push(strong( - { - "class": "mention", - "data-mid": e.M, - "$click": (...arg) => { - buttonEvent("openProfileM", arg); - }, - }, - otxt.substring(Number(e.S), Number(e.E)), - )); - } - }); - data.text = txt; - } else if (data.emoji) { - let emoji = JSON.parse(data.emoji); - let txt = []; - let otxt = data.text[0]; - emoji.sticon.resources.forEach((e, i, l) => { - let oE; - if (l[i - 1]) { - oE = l[i - 1].E; - } else { - oE = 0; - } - - if (i == (l.length - 1)) { - txt.push(otxt.substring(oE, e.S)); - txt.push(span( - { - "class": "emoji-wrap", - "data-tooltip": "", - "data-tooltip-is-html": "true", - "data-tooltip-is-preserved": "true", - "data-emoji": e.productId + ":" + e.sticonId, - "$click": (...arg) => { - buttonEvent("emojiView", arg); - }, - }, - img( - { - "src": - `https://stickershop.line-scdn.net/sticonshop/v1/sticon/${e.productId}/android/${e.sticonId}.png`, - "class": "emoji", - "alt": "(emoji)", - "loading": "lazy", - }, - ), - )); - txt.push(otxt.substring(e.E)); - } else { - txt.push(otxt.substring(oE, e.S)); - txt.push(span( - { - "class": "emoji-wrap", - "data-tooltip": "", - "data-tooltip-is-html": "true", - "data-tooltip-is-preserved": "true", - "data-emoji": e.productId + ":" + e.sticonId, - "$click": (...arg) => { - buttonEvent("emojiView", arg); - }, - }, - img( - { - "src": - `https://stickershop.line-scdn.net/sticonshop/v1/sticon/${e.productId}/android/${e.sticonId}.png`, - "class": "emoji", - "alt": "(emoji)", - "loading": "lazy", - }, - ), - )); - } - }); - data.text = txt; - } - return div( - { - "class": "textMessageContent-module__content_wrap__238E1 ", - "data-message-id": data.msgId, - "$contextmenu": (...arg) => { - buttonEvent("msgAction", arg, raw); - }, - "data-direction": data.direction, - }, - pre( - { - "class": "textMessageContent-module__text__EFwEN", - "style": "max-height: 500px;overflow-y: auto;", - }, - span( - { - "data-message-content": "", - "data-is-message-text": "true", - }, - ...data.text, - ), - ), - ); - } - - function replyBox(data, index) { - return div( - { - "class": "replyMessageContent-module__content_wrap__D0K-5 ", - "data-type": "", - "data-content-type": "", - "data-message-id": data.rId, - }, - button( - { - "type": "button", - "class": "replyMessageContent-module__button_move__Jo33w", - "aria-label": "See in chat", - "$click": (...arg) => { - buttonEvent("viewReply", arg); - }, - }, - div( - { - "class": "replyMessageContent-module__message__0FNkK messageLayout-module__message__YVDhk ", - }, - div( - { - "class": "thumbnail profileImage-module__thumbnail_wrap__0bK7m ", - "data-mid": data.reply.profile.mid, - "data-profile-image": "true", - "style": "border-radius: 50%; cursor: default;", - }, - div( - { - "class": "profileImage-module__thumbnail_area__nqIpB", - }, - span( - { - "class": "profileImage-module__thumbnail__Q6OsR", - }, - img( - { - "src": data.reply.profile.img, - "class": "", - "loading": "lazy", - "alt": "", - "draggable": "false", - }, - ), - ), - ), - ), - pre( - { - "class": "username-module__username__vGQGj", - }, - span( - {}, - data.reply.profile.name, - ), - ), - div( - { - "class": "messageLayout-module__content__PGz66", - }, - p( - { - "class": "replyMessageContent-module__text__0T50-", - }, - span( - {}, - data.reply.txt, - ), - ), - ), - "‌", - ), - ), - index, - ); - } - function imgMsg(data) { - return div( - { - "class": "imageMessageContent-module__content_wrap__bT-Si ", - "data-type": "", - }, - div( - { - "class": "imageMessageContent-module__image_group__ZOeAa", - }, - div( - { - "class": "imageMessageContent-module__item__fJDih ", - "data-message-id": data.msgId, - }, - div( - { - "class": "imageMessageContent-module__thumbnail__z4GO8", - }, - button( - { - "type": "button", - "class": "imageMessageContent-module__button_view__4y-jN", - "aria-label": "Show image", - "data-index": "0", - "$click": (...arg) => { - buttonEvent("imgMsgView", arg); - }, - }, - img( - { - "alt": "", - "src": data.data.preview, - "class": "", - "loading": "lazy", - "draggable": "false", - }, - ), - ), - ), - ), - ), - ); - } - function videoMsg(data) { - return div( - { - "class": "videoMessageContent-module__content_wrap__ffvJq ", - "data-message-id": data.msgId, - }, - div( - { - "class": "videoMessageContent-module__thumbnail__Va9Ie", - }, - button( - { - "type": "button", - "class": "videoMessageContent-module__button_view__qMX7E", - "aria-label": "view video", - "$click": (...arg) => { - buttonEvent("videoMsgView", arg); - }, - }, - img( - { - "alt": "", - "src": data.data.preview, - "class": "", - "loading": "lazy", - "draggable": "false", - }, - ), - div( - { - "class": "videoMessageContent-module__info__j528-", - }, - i( - { - "class": "icon videoMessageContent-module__icon_play__N7WFP", - }, - svg( - { - "height": "1em", - "fill": "currentColor", - "viewBox": "0 0 20 20", - "xmlns": "http://www.w3.org/2000/svg", - "data-laicon-version": "10.0", - }, - g( - { - "transform": "translate(-2 -2)", - }, - path( - { - "d": "M18.105 11.437a.665.665 0 0 1 0 1.126L7.412 19.29a.665.665 0 0 1-1.02-.563V5.274a.665.665 0 0 1 1.02-.563l10.693 6.726z", - }, - ), - ), - ), - ), - ), - ), - ), - ); - } - function audioMsg(data) { - return div( - { - "class": "textMessageContent-module__content_wrap__238E1 ", - "data-message-id": data.msgId, - }, - audio( - { - controls: "", - src: data.data, - }, - ), - ); - } - function stickerMsg(data) { - return div( - { - "class": "stickerMessageContent-module__content_wrap__BGfk- ", - "data-message-id": data.msgId, - }, - button( - { - "type": "button", - "class": "stickerMessageContent-module__button_view__rTOx0", - "aria-label": "view sticker", - "data-stkPkgId": data.stkPId, - "$click": (...arg) => { - buttonEvent("stkView", arg); - }, - }, - div( - { - "class": "stickerMessageContent-module__thumbnail__eMXOS", - }, - div( - { - "class": "sticker", - }, - img( - { - "src": data.img, - "alt": "[スタンプ]", - "loading": "lazy", - "draggable": "false", - "class": "", - "width": "170", - "height": "149.33333333333334", - "data-is-owned": "false", - "data-is-effect-sticker": "false", - }, - ), - ), - ), - ), - ); - } - function flexMsg(data) { - let flex = JSON.parse(data.flex); - let html = - '
          '; - html += flex2html("hide", { "type": "flex", "altText": "Flex Message", "contents": flex }) + - "
          "; - document.getElementById("hide").innerHTML = ""; - let ifr = iframe( - { - "frameborder": "0", - "title": "", - "style": "width:100%;height:100%;", - "data-message-id": "501557461296873730", - "srcdoc": html, - }, - ); - setTimeout(() => { - ifr.setAttribute( - "style", - "width:" + (ifr.contentWindow.document.documentElement.offsetWidth + 1) + "px;height:" + - (ifr.contentWindow.document.documentElement.offsetHeight + 11) + "px;", - ); - }, 2000); - - return div( - { - "class": "iframeMessage-module__iframe_wrap__PUSyZ", - }, - ifr, - ); - } - function fileM() { - fileMenu = div( - { - "class": "message-module__action_group__c8hSm actionGroup-module__action_group__sGYDY", - }, - button( - { - "type": "button", - "class": "actionGroup-module__button_action__Cu9RJ", - "$click": (...arg) => { - buttonEvent("dlFile", arg); - }, - }, - span( - { - "class": "actionGroup-module__text__OBOQx", - }, - fuchi("保存"), - ), - ), - ); - } -} - -function fuchi(txt) { - return span( - { style: "color:#fff;" }, - txt, - ); -} -/*setInterval(()=>{ - let a=Date.now() - setTimeout(()=>{ - let b=Date.now() - if ((b-a)>80) { - location.reload() - } - },10) - debugger; - -},500)*/ diff --git a/tmpReq.bin b/tmpReq.bin deleted file mode 100644 index a281676..0000000 Binary files a/tmpReq.bin and /dev/null differ diff --git a/tmpRes.bin b/tmpRes.bin deleted file mode 100644 index c867b25..0000000 Binary files a/tmpRes.bin and /dev/null differ