localsbnb-mcp-server 1.0.15 → 1.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.md +32 -8
  2. package/dist/auth/apiKeyManager.js +1 -1
  3. package/dist/auth/credentialsStore.js +1 -0
  4. package/dist/auth/handshakeTickets.js +1 -0
  5. package/dist/auth/hudsonToken.js +1 -0
  6. package/dist/auth/index.js +1 -1
  7. package/dist/auth/openSystemBrowser.js +1 -0
  8. package/dist/auth/permissionChecker.js +1 -1
  9. package/dist/client/cacheManager.js +1 -1
  10. package/dist/client/httpClient.js +1 -1
  11. package/dist/client/index.js +1 -1
  12. package/dist/client/retryHandler.js +1 -1
  13. package/dist/config/index.js +1 -1
  14. package/dist/config/tools.js +1 -1
  15. package/dist/index.js +1 -1
  16. package/dist/package.json +4 -3
  17. package/dist/region/api.js +1 -1
  18. package/dist/region/dates.js +1 -1
  19. package/dist/region/i18n.js +1 -1
  20. package/dist/region/index.js +1 -1
  21. package/dist/region/money.js +1 -1
  22. package/dist/region/resolve.js +1 -1
  23. package/dist/region/timezone.js +1 -1
  24. package/dist/region/toolDescriptions.js +1 -1
  25. package/dist/region/types.js +1 -1
  26. package/dist/run.cjs +0 -0
  27. package/dist/server.js +1 -1
  28. package/dist/start.mjs +1 -1
  29. package/dist/tools/auth/handshake.js +1 -0
  30. package/dist/tools/auth/onboarding.js +1 -0
  31. package/dist/tools/finance/index.js +1 -1
  32. package/dist/tools/finance/queryOperationalDataV2.js +1 -1
  33. package/dist/tools/orders/getOrderDetailsV2.js +1 -1
  34. package/dist/tools/orders/index.js +1 -1
  35. package/dist/tools/orders/ordersGetShared.js +1 -1
  36. package/dist/tools/orders/queryInHouseOrders.js +1 -1
  37. package/dist/tools/orders/queryOrdersByDateRange.js +1 -1
  38. package/dist/tools/orders/queryPreArrivalOrders.js +1 -1
  39. package/dist/tools/orders/queryPreDepartureOrders.js +1 -1
  40. package/dist/tools/orders/queryTodayOrders.js +1 -1
  41. package/dist/tools/overseas/channelConnectionFlow.js +1 -0
  42. package/dist/tools/overseas/channelConnectionSnapshot.js +1 -0
  43. package/dist/tools/overseas/channels.js +1 -0
  44. package/dist/tools/overseas/finance.js +1 -1
  45. package/dist/tools/overseas/index.js +1 -1
  46. package/dist/tools/overseas/mutationPreview.js +1 -0
  47. package/dist/tools/overseas/operationTools.js +1 -0
  48. package/dist/tools/overseas/operations.js +1 -0
  49. package/dist/tools/overseas/orders.js +1 -1
  50. package/dist/tools/overseas/prices.js +1 -1
  51. package/dist/tools/overseas/rooms.js +1 -1
  52. package/dist/tools/overseas/writes.js +1 -1
  53. package/dist/tools/rooms/index.js +1 -1
  54. package/dist/tools/rooms/queryRoomPrices.js +1 -1
  55. package/dist/tools/rooms/queryRoomStatusNew.js +1 -1
  56. package/dist/tools/rooms/queryTodayRoomStatus.js +1 -1
  57. package/dist/types/index.js +1 -1
  58. package/dist/utils/desensitize.js +1 -1
  59. package/dist/utils/errorHandler.js +1 -1
  60. package/dist/utils/index.js +1 -1
  61. package/dist/utils/logger.js +1 -1
  62. package/dist/utils/price.js +1 -1
  63. package/dist/utils/shanghaiDate.js +1 -1
  64. package/docs/readme/assets/localsbnb-channels.png +0 -0
  65. package/docs/readme/assets/localsbnb-ops.png +0 -0
  66. package/mcp.bootstrap.sample.json +10 -0
  67. package/package.json +4 -3
package/README.md CHANGED
@@ -78,7 +78,16 @@ Compare channels in one breath. No four logins.
78
78
 
79
79
  **15:00, housekeeper in the corridor**
80
80
  “Which rooms are empty and clean right now?”
81
- She does not need your password. You look, you tell her.
81
+ “Mark 302 dirty.” / “Mark the sea-view room clean.” *(overseas store)*
82
+ She does not need your password. You look, you tell her — or you change the clean status in the same chat.
83
+
84
+ **16:20, a walk-in guest**
85
+ “Create a manual booking for Zhang, check in tonight, check out Sunday, one adult.” *(overseas store)*
86
+ You see the quote first. You confirm. Then the order exists.
87
+
88
+ **17:05, weekend pricing**
89
+ “Set this Airbnb rate to 100 for Friday and Saturday — show me first.” *(overseas store)*
90
+ Preview the dates and amount. You say yes. Then the calendar updates.
82
91
 
83
92
  **18:00, owner group chat**
84
93
  “How did we do this week? Occupancy, average price, revenue.”
@@ -99,15 +108,25 @@ You decide whether to raise the weekend or leave it — with the week in front o
99
108
  **First day of a new staff member**
100
109
  They do not learn menus. They learn three sentences: *today’s arrivals, today’s rooms, this week’s numbers.*
101
110
 
102
- ### Handle the stay — overseas LocalsBnb stores only
111
+ ### Open the store & connect channels — overseas LocalsBnb stores only
112
+
113
+ New host? You can **register or sign in in the chat** — email, code, password — without hunting through another install wizard.
114
+
115
+ Already live? Say **“Connect Airbnb”** or **“Connect Booking / Trip / Agoda.”** LocalsBnb opens the browser page (phone or desktop). You finish the channel steps there. Come back and say **“Done.”** The AI checks the link — it does not ask you to paste property IDs.
103
116
 
104
- You can ask the AI to **check in, check out, extend, or change a room**.
117
+ ![Say connect. Finish in the browser. Say Done — AI verifies the channel.](docs/readme/assets/localsbnb-channels.png)
105
118
 
106
- It will never do it quietly. You always see the guest and the dates first. You say “that’s the one.” Only then it goes through.
119
+ ### Handle the stay & run the calendar — overseas LocalsBnb stores only
120
+
121
+ You can ask the AI to **check in, check out, extend, change a room, create a manual order, update channel rates, close or open rooms, and set dirty / clean**.
122
+
123
+ It will never do writes quietly. You always see the guest, dates, amounts, or clean status first. You say “that’s the one.” Only then it goes through.
124
+
125
+ ![Account, order, rates, clean status — always preview, then you confirm.](docs/readme/assets/localsbnb-ops.png)
107
126
 
108
127
  ![The AI shows the booking first. You confirm. Then it happens.](docs/readme/assets/localsbnb-confirm.png)
109
128
 
110
- **If your store is in China:** you can ask all the “what’s going on” questions. **Check-in, check-out, extend, and room change are not available in China yet.** Cancel, change the listed price, or sync a calendar — still do that in LocalsBnb.
129
+ **If your store is in China:** you can ask all the “what’s going on” questions. **Check-in, check-out, extend, room change, channel connect, manual order, rate edits, and clean-status writes are not available in China yet.** Cancel or sync a calendar — still do that in LocalsBnb.
111
130
 
112
131
  ---
113
132
 
@@ -159,9 +178,14 @@ Hate config? Tell the AI itself:
159
178
  - “Show today’s rooms.”
160
179
  - “Airbnb prices this week.”
161
180
  - “How is this week going?”
162
- - “Check Maria in — show me the booking first.” *(overseas)*
163
-
164
- Answers follow the **language of the property** in LocalsBnb. You do not pick English or Japanese again here.
181
+ - “Help me sign up for LocalsBnb.” / “Sign me in.” *(overseas)*
182
+ - “Connect Airbnb.” / “Connect Booking.” — then “Done.” *(overseas)*
183
+ - “Check Maria in — show me the booking first.” *(overseas)*
184
+ - “Create a booking for Zhang, tonight to Sunday.” *(overseas)*
185
+ - “Change this rate for Friday–Saturday — preview first.” *(overseas)*
186
+ - “Mark room 302 dirty.” / “Mark it clean.” *(overseas)*
187
+
188
+ Answers follow the **language of the property** in LocalsBnb. You do not pick English or Japanese again here. Channel pages work on **phone or desktop** browsers.
165
189
 
166
190
  ---
167
191
 
@@ -1 +1 @@
1
- function _0x5dc4(){const _0xe2033a=['getAPIKey','238prMPQH','length','860874oNTMCx','36VLbtYE','hasScope','env','HUDSON_ACCESS_TOKEN','loadFromConfig','API\x20key\x20set','11647580OnrdoI','API\x20key\x20loaded\x20from\x20config','38xrrtir','setAPIKey','Hudson\x20credentials\x20set','setHudsonCredentials','41458TpCcet','info','split','trim','1935130ljKCzt','hasAPIKey','APP_SECRET\x20or\x20APP_ID\x20not\x20found\x20in\x20environment\x20variables','136984FPWQzg','warn','scopes','172701cDVjUx','hudsonAccessToken','3041253Kfknyk','isConfigured','APP_ID\x20not\x20configured.\x20Please\x20set\x20APP_ID\x20environment\x20variable.','getScopes','campId','getHudsonAccessToken','apiKey','isHudsonConfigured','API\x20key\x20not\x20found\x20in\x20environment\x20variables','APP_SECRET','APP_SECRET\x20not\x20configured.\x20Please\x20set\x20APP_SECRET\x20environment\x20variable.'];_0x5dc4=function(){return _0xe2033a;};return _0x5dc4();}(function(_0x180a87,_0x4acd82){const _0x4f564f=_0x180a87();while(!![]){try{const _0x18175c=parseInt(_0x33be(0x203))/0x1*(parseInt(_0x33be(0x1e0))/0x2)+-parseInt(_0x33be(0x1ea))/0x3*(-parseInt(_0x33be(0x1fb))/0x4)+parseInt(_0x33be(0x1e4))/0x5+parseInt(_0x33be(0x1fa))/0x6+-parseInt(_0x33be(0x1f8))/0x7*(parseInt(_0x33be(0x1e7))/0x8)+parseInt(_0x33be(0x1ec))/0x9+-parseInt(_0x33be(0x201))/0xa;if(_0x18175c===_0x4acd82)break;else _0x4f564f['push'](_0x4f564f['shift']());}catch(_0x355e45){_0x4f564f['push'](_0x4f564f['shift']());}}}(_0x5dc4,0x68517));function _0x33be(_0x38151c,_0x5390ac){const _0x5dc4f5=_0x5dc4();return _0x33be=function(_0x33bee4,_0xc0ec65){_0x33bee4=_0x33bee4-0x1e0;let _0x475685=_0x5dc4f5[_0x33bee4];return _0x475685;},_0x33be(_0x38151c,_0x5390ac);}import{logger}from'../utils/logger.js';export class APIKeyManager{[_0x33be(0x1f2)]=null;['scopes']=[];['hudsonAccessToken']=null;[_0x33be(0x1f0)]=null;['loadFromEnv'](){this[_0x33be(0x1f2)]=process[_0x33be(0x1fd)]['LUKEYUN_API_KEY']||null;const _0x3f7d28=process[_0x33be(0x1fd)]['LUKEYUN_API_SCOPES'];this[_0x33be(0x1e9)]=_0x3f7d28?_0x3f7d28[_0x33be(0x1e2)](',')['map'](_0x2f8a82=>_0x2f8a82[_0x33be(0x1e3)]()):[],this['hudsonAccessToken']=process['env'][_0x33be(0x1f5)]||process[_0x33be(0x1fd)][_0x33be(0x1fe)]||null,this[_0x33be(0x1f0)]=process[_0x33be(0x1fd)]['APP_ID']||process['env']['CAMP_ID']||null,!this['apiKey']?logger['warn'](_0x33be(0x1f4)):logger[_0x33be(0x1e1)]('API\x20key\x20loaded\x20from\x20environment',{'hasScopes':this[_0x33be(0x1e9)]['length']>0x0}),!this[_0x33be(0x1eb)]||!this[_0x33be(0x1f0)]?logger[_0x33be(0x1e8)](_0x33be(0x1e6)):logger[_0x33be(0x1e1)]('Hudson\x20credentials\x20loaded\x20from\x20environment');}[_0x33be(0x1ff)](_0x191edc){this[_0x33be(0x1f2)]=_0x191edc[_0x33be(0x1f2)]||null,this[_0x33be(0x1e9)]=_0x191edc[_0x33be(0x1e9)]||[],this[_0x33be(0x1eb)]=_0x191edc[_0x33be(0x1eb)]||null,this[_0x33be(0x1f0)]=_0x191edc[_0x33be(0x1f0)]||null,this['apiKey']&&logger[_0x33be(0x1e1)](_0x33be(0x202),{'hasScopes':this['scopes'][_0x33be(0x1f9)]>0x0}),this['hudsonAccessToken']&&this[_0x33be(0x1f0)]&&logger[_0x33be(0x1e1)]('Hudson\x20credentials\x20loaded\x20from\x20config');}[_0x33be(0x204)](_0x213f45,_0x42f823){this[_0x33be(0x1f2)]=_0x213f45,this[_0x33be(0x1e9)]=_0x42f823||[],logger[_0x33be(0x1e1)](_0x33be(0x200),{'hasScopes':this[_0x33be(0x1e9)][_0x33be(0x1f9)]>0x0});}[_0x33be(0x206)](_0x47f25d,_0x36c12a){this[_0x33be(0x1eb)]=_0x47f25d,this[_0x33be(0x1f0)]=_0x36c12a,logger['info'](_0x33be(0x205));}[_0x33be(0x1f7)](){return this[_0x33be(0x1f2)]||'';}[_0x33be(0x1e5)](){return this['apiKey']!==null&&this['apiKey']!=='';}[_0x33be(0x1fc)](_0x275b18){if(this[_0x33be(0x1e9)]['includes']('*'))return!![];return this['scopes']['includes'](_0x275b18);}[_0x33be(0x1ef)](){return[...this[_0x33be(0x1e9)]];}[_0x33be(0x1ed)](){return this[_0x33be(0x1f2)]!==null;}[_0x33be(0x1f3)](){return this[_0x33be(0x1eb)]!==null&&this[_0x33be(0x1f0)]!==null;}[_0x33be(0x1f1)](){if(!this[_0x33be(0x1eb)])throw new Error(_0x33be(0x1f6));return this['hudsonAccessToken'];}['getCampId'](){if(!this[_0x33be(0x1f0)])throw new Error(_0x33be(0x1ee));return this[_0x33be(0x1f0)];}}
1
+ (function(_0x1cc421,_0x180e66){const _0x1b05d7=_0x1cc421();while(!![]){try{const _0x2505bf=parseInt(_0x3e2d(0x8c))/0x1*(parseInt(_0x3e2d(0xa8))/0x2)+-parseInt(_0x3e2d(0x91))/0x3+parseInt(_0x3e2d(0x9a))/0x4+parseInt(_0x3e2d(0xac))/0x5+-parseInt(_0x3e2d(0x98))/0x6*(parseInt(_0x3e2d(0x96))/0x7)+-parseInt(_0x3e2d(0x9d))/0x8+-parseInt(_0x3e2d(0xae))/0x9*(-parseInt(_0x3e2d(0x94))/0xa);if(_0x2505bf===_0x180e66)break;else _0x1b05d7['push'](_0x1b05d7['shift']());}catch(_0x588b36){_0x1b05d7['push'](_0x1b05d7['shift']());}}}(_0xdc69,0x766cf));function _0x3e2d(_0xda8416,_0x457eae){const _0xdc6973=_0xdc69();return _0x3e2d=function(_0x3e2d3f,_0x52dcd8){_0x3e2d3f=_0x3e2d3f-0x8c;let _0x59b517=_0xdc6973[_0x3e2d3f];return _0x59b517;},_0x3e2d(_0xda8416,_0x457eae);}import{logger}from'../utils/logger.js';import{readStoredCredentials}from'./credentialsStore.js';export class APIKeyManager{['apiKey']=null;[_0x3e2d(0x8d)]=[];[_0x3e2d(0x9f)]=null;[_0x3e2d(0xa9)]=null;['loadFromEnv'](){this[_0x3e2d(0x97)]=process[_0x3e2d(0x9e)][_0x3e2d(0x8f)]||null;const _0x7bd8e5=process[_0x3e2d(0x9e)]['LUKEYUN_API_SCOPES'];this[_0x3e2d(0x8d)]=_0x7bd8e5?_0x7bd8e5[_0x3e2d(0xaf)](',')['map'](_0x499bd9=>_0x499bd9[_0x3e2d(0x95)]()):[],this[_0x3e2d(0x9f)]=process[_0x3e2d(0x9e)][_0x3e2d(0xa2)]||process[_0x3e2d(0x9e)]['HUDSON_ACCESS_TOKEN']||null,this[_0x3e2d(0xa9)]=process[_0x3e2d(0x9e)][_0x3e2d(0xa4)]||process[_0x3e2d(0x9e)]['CAMP_ID']||null;!this[_0x3e2d(0x97)]?logger['warn'](_0x3e2d(0x8e)):logger[_0x3e2d(0x92)]('API\x20key\x20loaded\x20from\x20environment',{'hasScopes':this[_0x3e2d(0x8d)][_0x3e2d(0x90)]>0x0});if(this[_0x3e2d(0x9f)]&&this[_0x3e2d(0xa9)]){logger['info']('Hudson\x20credentials\x20loaded\x20from\x20environment');return;}if(!this[_0x3e2d(0x9f)]&&!this[_0x3e2d(0xa9)]){const _0x57b922=readStoredCredentials();if(_0x57b922){this['hudsonAccessToken']=_0x57b922[_0x3e2d(0xab)],this[_0x3e2d(0xa9)]=_0x57b922['campId'],logger[_0x3e2d(0x92)](_0x3e2d(0xa5));return;}}logger['warn']('APP_SECRET\x20or\x20APP_ID\x20not\x20found;\x20starting\x20in\x20bootstrap\x20auth\x20mode');}['loadFromConfig'](_0x16eca5){this[_0x3e2d(0x97)]=_0x16eca5[_0x3e2d(0x97)]||null,this[_0x3e2d(0x8d)]=_0x16eca5[_0x3e2d(0x8d)]||[],this[_0x3e2d(0x9f)]=_0x16eca5[_0x3e2d(0x9f)]||null,this[_0x3e2d(0xa9)]=_0x16eca5[_0x3e2d(0xa9)]||null,this[_0x3e2d(0x97)]&&logger['info'](_0x3e2d(0xa1),{'hasScopes':this[_0x3e2d(0x8d)][_0x3e2d(0x90)]>0x0}),this[_0x3e2d(0x9f)]&&this[_0x3e2d(0xa9)]&&logger[_0x3e2d(0x92)]('Hudson\x20credentials\x20loaded\x20from\x20config');}['setAPIKey'](_0x10163c,_0x508ce0){this['apiKey']=_0x10163c,this[_0x3e2d(0x8d)]=_0x508ce0||[],logger[_0x3e2d(0x92)]('API\x20key\x20set',{'hasScopes':this[_0x3e2d(0x8d)][_0x3e2d(0x90)]>0x0});}[_0x3e2d(0xa3)](_0x179f4b,_0x4a8b24){this['hudsonAccessToken']=_0x179f4b,this[_0x3e2d(0xa9)]=_0x4a8b24,logger[_0x3e2d(0x92)](_0x3e2d(0xad));}[_0x3e2d(0xa6)](){return this[_0x3e2d(0x97)]||'';}['hasAPIKey'](){return this[_0x3e2d(0x97)]!==null&&this[_0x3e2d(0x97)]!=='';}['hasScope'](_0x16a1c2){if(this[_0x3e2d(0x8d)][_0x3e2d(0x99)]('*'))return!![];return this['scopes'][_0x3e2d(0x99)](_0x16a1c2);}[_0x3e2d(0xa7)](){return[...this[_0x3e2d(0x8d)]];}['isConfigured'](){return this[_0x3e2d(0x97)]!==null;}[_0x3e2d(0x9c)](){return this['hudsonAccessToken']!==null&&this[_0x3e2d(0xa9)]!==null;}[_0x3e2d(0xa0)](){if(!this[_0x3e2d(0x9f)])throw new Error(_0x3e2d(0x93));return this[_0x3e2d(0x9f)];}[_0x3e2d(0xaa)](){if(!this['campId'])throw new Error(_0x3e2d(0x9b));return this[_0x3e2d(0xa9)];}}function _0xdc69(){const _0x56b843=['info','APP_SECRET\x20not\x20configured.\x20Please\x20set\x20APP_SECRET\x20environment\x20variable.','50MuJdpn','trim','5287891fcdAwi','apiKey','6tbRXXq','includes','3859652XmnHZE','APP_ID\x20not\x20configured.\x20Please\x20set\x20APP_ID\x20environment\x20variable.','isHudsonConfigured','4579544LfQFjV','env','hudsonAccessToken','getHudsonAccessToken','API\x20key\x20loaded\x20from\x20config','APP_SECRET','setHudsonCredentials','APP_ID','Hudson\x20credentials\x20loaded\x20from\x20local\x20credentials\x20file','getAPIKey','getScopes','170HkkqXT','campId','getCampId','accessToken','3357945hOpDvm','Hudson\x20credentials\x20set','1317510IVkvFq','split','3167CUkKpb','scopes','API\x20key\x20not\x20found\x20in\x20environment\x20variables','LUKEYUN_API_KEY','length','2474160DegYeb'];_0xdc69=function(){return _0x56b843;};return _0xdc69();}
@@ -0,0 +1 @@
1
+ (function(_0x4f66ed,_0x6c88eb){const _0x7b03c9=_0x4f66ed();while(!![]){try{const _0x266476=-parseInt(_0x4a09(0xe6))/0x1+-parseInt(_0x4a09(0xde))/0x2+-parseInt(_0x4a09(0xc7))/0x3*(parseInt(_0x4a09(0xcf))/0x4)+parseInt(_0x4a09(0xe8))/0x5+parseInt(_0x4a09(0xdb))/0x6+parseInt(_0x4a09(0xd0))/0x7+-parseInt(_0x4a09(0xd5))/0x8;if(_0x266476===_0x6c88eb)break;else _0x7b03c9['push'](_0x7b03c9['shift']());}catch(_0x2b03f8){_0x7b03c9['push'](_0x7b03c9['shift']());}}}(_0x2463,0x1dbf5));function _0x2463(){const _0x475c6e=['48vgTtoK','Saved\x20LocalsBnb\x20credentials\x20to\x20file','campId','parse','trim','Failed\x20to\x20read\x20LocalsBnb\x20credentials\x20file','code','message','7872woyQAV','1339072QlhJbW','Ignored\x20incomplete\x20LocalsBnb\x20credentials\x20file','Cannot\x20persist\x20LocalsBnb\x20credentials\x20without\x20accessToken\x20and\x20campId','updatedAt','credentials.json','206200WsBtNM','stringify','info','dirname','warn','toISOString','662064XkPJPX','isArray','join','244018CqgCYS','.localsbnb','accessToken','utf8','.tmp','Loaded\x20LocalsBnb\x20credentials\x20from\x20file','homedir','LOCALSBNB_CREDENTIALS_PATH','16237gmPway','pid','78570xxBsdq','env'];_0x2463=function(){return _0x475c6e;};return _0x2463();}import{chmodSync,mkdirSync,readFileSync,renameSync,writeFileSync}from'fs';function _0x4a09(_0x3a3785,_0x828006){const _0x246354=_0x2463();return _0x4a09=function(_0x4a09da,_0x521944){_0x4a09da=_0x4a09da-0xc7;let _0x37608f=_0x246354[_0x4a09da];return _0x37608f;},_0x4a09(_0x3a3785,_0x828006);}import _0x3aab83 from'os';import _0x1890b5 from'path';import{logger}from'../utils/logger.js';export const CREDENTIALS_FILE_VERSION=0x1;export function defaultCredentialsPath(){const _0x3b5586=(process[_0x4a09(0xe9)][_0x4a09(0xe5)]||'')[_0x4a09(0xcb)]();if(_0x3b5586)return _0x3b5586;return _0x1890b5[_0x4a09(0xdd)](_0x3aab83[_0x4a09(0xe4)](),_0x4a09(0xdf),_0x4a09(0xd4));}function isRecord(_0x1a21f6){return _0x1a21f6!=null&&typeof _0x1a21f6==='object'&&!Array[_0x4a09(0xdc)](_0x1a21f6);}export function parseStoredCredentials(_0x19cdae){if(!isRecord(_0x19cdae))return null;const _0x2fafb2=String(_0x19cdae['accessToken']??'')[_0x4a09(0xcb)](),_0x39bfa5=String(_0x19cdae[_0x4a09(0xc9)]??'')[_0x4a09(0xcb)]();if(!_0x2fafb2||!_0x39bfa5)return null;const _0x221e57=Number(_0x19cdae['version']??CREDENTIALS_FILE_VERSION),_0x3ea919=String(_0x19cdae[_0x4a09(0xd3)]??'')[_0x4a09(0xcb)]()||new Date()[_0x4a09(0xda)]();return{'version':Number['isFinite'](_0x221e57)?_0x221e57:CREDENTIALS_FILE_VERSION,'accessToken':_0x2fafb2,'campId':_0x39bfa5,'updatedAt':_0x3ea919};}export function readStoredCredentials(_0xa430f5=defaultCredentialsPath()){try{const _0x331187=readFileSync(_0xa430f5,_0x4a09(0xe1)),_0x34a99a=parseStoredCredentials(JSON[_0x4a09(0xca)](_0x331187));if(!_0x34a99a)return logger[_0x4a09(0xd9)](_0x4a09(0xd1)),null;return logger['info'](_0x4a09(0xe3)),_0x34a99a;}catch(_0x53d310){const _0x498f3a=_0x53d310[_0x4a09(0xcd)];return _0x498f3a!=='ENOENT'&&logger[_0x4a09(0xd9)](_0x4a09(0xcc),{'error':_0x53d310 instanceof Error?_0x53d310[_0x4a09(0xce)]:String(_0x53d310)}),null;}}export function writeStoredCredentials(_0x2118ea,_0x4493ab=defaultCredentialsPath()){const _0x4d8ae9={'version':CREDENTIALS_FILE_VERSION,'accessToken':_0x2118ea['accessToken']['trim'](),'campId':_0x2118ea[_0x4a09(0xc9)][_0x4a09(0xcb)](),'updatedAt':_0x2118ea[_0x4a09(0xd3)]||new Date()[_0x4a09(0xda)]()};if(!_0x4d8ae9[_0x4a09(0xe0)]||!_0x4d8ae9[_0x4a09(0xc9)])throw new Error(_0x4a09(0xd2));const _0x47d7f0=_0x1890b5[_0x4a09(0xd8)](_0x4493ab);mkdirSync(_0x47d7f0,{'recursive':!![],'mode':0x1c0});try{chmodSync(_0x47d7f0,0x1c0);}catch{}const _0x2c1592=_0x4493ab+'.'+process[_0x4a09(0xe7)]+_0x4a09(0xe2);writeFileSync(_0x2c1592,JSON[_0x4a09(0xd6)](_0x4d8ae9,null,0x2)+'\x0a',{'encoding':_0x4a09(0xe1),'mode':0x180}),renameSync(_0x2c1592,_0x4493ab);try{chmodSync(_0x4493ab,0x180);}catch{}return logger[_0x4a09(0xd7)](_0x4a09(0xc8)),_0x4d8ae9;}
@@ -0,0 +1 @@
1
+ (function(_0x3e074a,_0x3640ce){const _0x5316f6=_0x3e074a();while(!![]){try{const _0x362dd0=-parseInt(_0x31cc(0x1b5))/0x1+-parseInt(_0x31cc(0x1ac))/0x2*(parseInt(_0x31cc(0x1a6))/0x3)+-parseInt(_0x31cc(0x1c1))/0x4+parseInt(_0x31cc(0x1b1))/0x5*(parseInt(_0x31cc(0x1c0))/0x6)+-parseInt(_0x31cc(0x1bc))/0x7*(-parseInt(_0x31cc(0x1b3))/0x8)+parseInt(_0x31cc(0x1bf))/0x9*(parseInt(_0x31cc(0x1ba))/0xa)+parseInt(_0x31cc(0x1be))/0xb;if(_0x362dd0===_0x3640ce)break;else _0x5316f6['push'](_0x5316f6['shift']());}catch(_0x14111a){_0x5316f6['push'](_0x5316f6['shift']());}}}(_0x80f2,0x195d6));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import _0x3c434c from'os';import _0x522818 from'path';import{logger}from'../utils/logger.js';export const HANDSHAKE_TTL_MS=0x19*0x3c*0x3e8;function storePath(){const _0x145e13=(process['env'][_0x31cc(0x1a7)]||'')[_0x31cc(0x1b7)]();if(_0x145e13)return _0x145e13;return _0x522818[_0x31cc(0x1ab)](_0x3c434c[_0x31cc(0x1aa)](),_0x31cc(0x1bb),_0x31cc(0x1af));}function _0x31cc(_0x5e00bb,_0x3f2e58){const _0x80f260=_0x80f2();return _0x31cc=function(_0x31ccae,_0x111c7e){_0x31ccae=_0x31ccae-0x1a5;let _0x5bebd8=_0x80f260[_0x31ccae];return _0x5bebd8;},_0x31cc(_0x5e00bb,_0x3f2e58);}function readMap(){const _0x391428=storePath();if(!existsSync(_0x391428))return{};try{return JSON[_0x31cc(0x1b8)](readFileSync(_0x391428,'utf8'));}catch{return{};}}function writeMap(_0x190a1d){const _0x109944=storePath();mkdirSync(_0x522818[_0x31cc(0x1ad)](_0x109944),{'recursive':!![]}),writeFileSync(_0x109944,JSON[_0x31cc(0x1ae)](_0x190a1d,null,0x2)+'\x0a',{'encoding':_0x31cc(0x1bd),'mode':0x180});}export function saveLocalHandshakeTicket(_0x4b0662){const _0x11548e=readMap(),_0x4332b1=Date[_0x31cc(0x1a5)]();for(const [_0x5a76e4,_0x3f5b11]of Object[_0x31cc(0x1a8)](_0x11548e)){if(!_0x3f5b11||_0x3f5b11[_0x31cc(0x1c2)]<_0x4332b1)delete _0x11548e[_0x5a76e4];}_0x11548e[_0x4b0662[_0x31cc(0x1b6)]]=_0x4b0662,writeMap(_0x11548e),logger['info'](_0x31cc(0x1b4));}export function readLocalHandshakeTicket(_0x132219){const _0x2cf60a=readMap()[String(_0x132219||'')[_0x31cc(0x1b7)]()];if(!_0x2cf60a)return null;if(_0x2cf60a[_0x31cc(0x1c2)]<Date[_0x31cc(0x1a5)]())return null;return _0x2cf60a;}export function readLatestLocalHandshakeTicket(_0x5d0da9){return Object[_0x31cc(0x1b2)](readMap())[_0x31cc(0x1a9)](_0x447b5b=>_0x447b5b?.['sessionScope']===_0x5d0da9&&_0x447b5b[_0x31cc(0x1c2)]>Date['now']())[_0x31cc(0x1b0)]((_0x2a2251,_0x453ae8)=>_0x453ae8[_0x31cc(0x1b9)]-_0x2a2251[_0x31cc(0x1b9)])[0x0]??null;}function _0x80f2(){const _0x4710be=['427KJvxtO','utf8','2781911vidgYQ','9lFaAvS','162hMRSMv','241244LLzZdK','expiresAt','now','585921iTdDlt','LOCALSBNB_HANDSHAKE_STORE','entries','filter','homedir','join','2PiOkNQ','dirname','stringify','handshakes.json','sort','20660qhAFPy','values','5704NRpylI','Saved\x20Airbnb\x20handshake\x20ticket','131487BhnjId','ticketId','trim','parse','createdAt','830410fSnFoj','.localsbnb'];_0x80f2=function(){return _0x4710be;};return _0x80f2();}
@@ -0,0 +1 @@
1
+ function _0x4ea8(){const _0x12b399=['length','split','180EldbYR','1029985zRjUsp','349679tHZTjG','trim','9486UwjvTv','1630ZmvGEK','3397856NryhJb','replace','3402irfrwk','1862bEXPdJ','89313ovodLn','10312fBwJDQ','2aTbZqh','264PDIFMs'];_0x4ea8=function(){return _0x12b399;};return _0x4ea8();}function _0x52b5(_0x4bacad,_0x330da0){const _0x4ea82a=_0x4ea8();return _0x52b5=function(_0x52b5d0,_0x9e1854){_0x52b5d0=_0x52b5d0-0x1d8;let _0x276f87=_0x4ea82a[_0x52b5d0];return _0x276f87;},_0x52b5(_0x4bacad,_0x330da0);}(function(_0x16a63a,_0x4bc537){const _0x505b2c=_0x16a63a();while(!![]){try{const _0x4588f3=parseInt(_0x52b5(0x1e7))/0x1*(-parseInt(_0x52b5(0x1d9))/0x2)+parseInt(_0x52b5(0x1da))/0x3*(parseInt(_0x52b5(0x1d8))/0x4)+-parseInt(_0x52b5(0x1de))/0x5+parseInt(_0x52b5(0x1e1))/0x6*(parseInt(_0x52b5(0x1e6))/0x7)+-parseInt(_0x52b5(0x1e3))/0x8+-parseInt(_0x52b5(0x1e5))/0x9*(parseInt(_0x52b5(0x1e2))/0xa)+-parseInt(_0x52b5(0x1df))/0xb*(-parseInt(_0x52b5(0x1dd))/0xc);if(_0x4588f3===_0x4bc537)break;else _0x505b2c['push'](_0x505b2c['shift']());}catch(_0x443d34){_0x505b2c['push'](_0x505b2c['shift']());}}}(_0x4ea8,0x53a3d));export function looksLikeJwt(_0x9a419b){const _0x1afcf1=_0x9a419b[_0x52b5(0x1e0)]()[_0x52b5(0x1dc)]('.');return _0x1afcf1['length']===0x3&&_0x1afcf1['every'](_0xa6a953=>_0xa6a953[_0x52b5(0x1db)]>0x0);}export function formatHudsonAccessTokenHeader(_0x5cdb20){const _0x11146f=_0x5cdb20[_0x52b5(0x1e0)]()[_0x52b5(0x1e4)](/^Bearer\s+/i,'')[_0x52b5(0x1e0)]();if(!_0x11146f)return'';return looksLikeJwt(_0x11146f)?'Bearer\x20'+_0x11146f:_0x11146f;}
@@ -1 +1 @@
1
- function _0x3424(_0x106de7,_0x5d0ce0){var _0x34bf3d=_0x34bf();return _0x3424=function(_0x342486,_0x2ce5bf){_0x342486=_0x342486-0xb9;var _0x8e4d55=_0x34bf3d[_0x342486];return _0x8e4d55;},_0x3424(_0x106de7,_0x5d0ce0);}(function(_0xcda05,_0x5c7b5a){var _0x28195f=_0xcda05();while(!![]){try{var _0x458136=-parseInt(_0x3424(0xbf))/0x1+-parseInt(_0x3424(0xc3))/0x2*(parseInt(_0x3424(0xc2))/0x3)+-parseInt(_0x3424(0xbd))/0x4*(-parseInt(_0x3424(0xbe))/0x5)+parseInt(_0x3424(0xbc))/0x6*(-parseInt(_0x3424(0xba))/0x7)+parseInt(_0x3424(0xb9))/0x8+parseInt(_0x3424(0xbb))/0x9*(parseInt(_0x3424(0xc0))/0xa)+parseInt(_0x3424(0xc1))/0xb;if(_0x458136===_0x5c7b5a)break;else _0x28195f['push'](_0x28195f['shift']());}catch(_0x424a26){_0x28195f['push'](_0x28195f['shift']());}}}(_0x34bf,0x9d52f));function _0x34bf(){var _0x3cefd8=['4476DzlZZw','3365ITLloB','218104tmmVGp','4620zzpgFb','12170125DJcXYO','2643531jOYqwZ','2HxHWKs','4994224hMmfHX','43694ZNlClH','6498IxCeMi','1032zbUCUz'];_0x34bf=function(){return _0x3cefd8;};return _0x34bf();}export{APIKeyManager}from'./apiKeyManager.js';export{PermissionChecker}from'./permissionChecker.js';
1
+ (function(_0x6cc6bd,_0x151a37){var _0x4a1b32=_0x6cc6bd();while(!![]){try{var _0x37d330=parseInt(_0x385c(0x143))/0x1*(-parseInt(_0x385c(0x14c))/0x2)+-parseInt(_0x385c(0x145))/0x3+-parseInt(_0x385c(0x148))/0x4*(-parseInt(_0x385c(0x14b))/0x5)+-parseInt(_0x385c(0x149))/0x6+-parseInt(_0x385c(0x146))/0x7*(parseInt(_0x385c(0x14d))/0x8)+-parseInt(_0x385c(0x14a))/0x9*(-parseInt(_0x385c(0x144))/0xa)+parseInt(_0x385c(0x147))/0xb;if(_0x37d330===_0x151a37)break;else _0x4a1b32['push'](_0x4a1b32['shift']());}catch(_0x4c3b8b){_0x4a1b32['push'](_0x4a1b32['shift']());}}}(_0x654e,0x94ac4));export{APIKeyManager}from'./apiKeyManager.js';function _0x654e(){var _0x5a3c5c=['16937492biZpJU','154532dOwOEg','2890902InkPsV','4054446lNBHcS','40YcYNgW','2037556KhVoIc','256BCHdqn','1ZFBKXG','20XXOMSz','1040187DZdhrz','64211glhfzP'];_0x654e=function(){return _0x5a3c5c;};return _0x654e();}function _0x385c(_0x421873,_0x24170d){var _0x654e71=_0x654e();return _0x385c=function(_0x385c76,_0x330813){_0x385c76=_0x385c76-0x143;var _0xcbac02=_0x654e71[_0x385c76];return _0xcbac02;},_0x385c(_0x421873,_0x24170d);}export{PermissionChecker}from'./permissionChecker.js';export{defaultCredentialsPath,readStoredCredentials,writeStoredCredentials}from'./credentialsStore.js';
@@ -0,0 +1 @@
1
+ (function(_0x5a37a4,_0x530158){const _0x320ec6=_0x5a37a4();while(!![]){try{const _0x17c6c3=-parseInt(_0x1cc4(0x17c))/0x1*(-parseInt(_0x1cc4(0x185))/0x2)+-parseInt(_0x1cc4(0x183))/0x3+parseInt(_0x1cc4(0x18f))/0x4+parseInt(_0x1cc4(0x186))/0x5*(-parseInt(_0x1cc4(0x17a))/0x6)+-parseInt(_0x1cc4(0x174))/0x7+-parseInt(_0x1cc4(0x18c))/0x8*(-parseInt(_0x1cc4(0x176))/0x9)+-parseInt(_0x1cc4(0x18e))/0xa*(-parseInt(_0x1cc4(0x187))/0xb);if(_0x17c6c3===_0x530158)break;else _0x320ec6['push'](_0x320ec6['shift']());}catch(_0xfe9888){_0x320ec6['push'](_0x320ec6['shift']());}}}(_0x3c61,0xe2b2c));import{spawn}from'child_process';const OPEN_TIMEOUT_MS=0x9c4;function _0x3c61(){const _0x4d7d93=['8mTeWQC','8530VafnQj','22ZdbQyJ','open','spawn_error','spawn_failed','error','10776488OPkVXI','exit','2930670OwHDdK','5973152wJaQaG','xdg-open','disabled','2639679kMIgvX','unref','9CALJKy','http:','once','exit_','6060RNDCGr','env','315682RpFUWn','trim','ignore','win32','platform','cmd','timeout','4981494dvFUsR','message'];_0x3c61=function(){return _0x4d7d93;};return _0x3c61();}function _0x1cc4(_0x20f972,_0x221976){const _0x3c61b1=_0x3c61();return _0x1cc4=function(_0x1cc45d,_0x332b48){_0x1cc45d=_0x1cc45d-0x172;let _0x517a5e=_0x3c61b1[_0x1cc45d];return _0x517a5e;},_0x1cc4(_0x20f972,_0x221976);}function isHttpUrl(_0x44c236){try{const _0x398d5b=new URL(_0x44c236);return _0x398d5b['protocol']===_0x1cc4(0x177)||_0x398d5b['protocol']==='https:';}catch{return![];}}function spawnCommand(_0x52f5b3){if(process[_0x1cc4(0x180)]==='darwin')return{'cmd':_0x1cc4(0x188),'args':[_0x52f5b3]};if(process['platform']===_0x1cc4(0x17f))return{'cmd':_0x1cc4(0x181),'args':['/c','start','',_0x52f5b3]};return{'cmd':_0x1cc4(0x172),'args':[_0x52f5b3]};}export async function tryOpenSystemBrowser(_0x245229){if((process[_0x1cc4(0x17b)]['LOCALSBNB_OPEN_BROWSER']||'')[_0x1cc4(0x17d)]()==='0')return{'opened':![],'reason':_0x1cc4(0x173)};const _0x19ff02=String(_0x245229||'')['trim']();if(!isHttpUrl(_0x19ff02))return{'opened':![],'reason':'invalid_url'};const {cmd:_0x4a6084,args:_0x557194}=spawnCommand(_0x19ff02);return new Promise(_0xb8ae05=>{let _0x3335fe=![];const _0x4d2887=_0x1a6c33=>{if(_0x3335fe)return;_0x3335fe=!![],clearTimeout(_0x122ccb),_0xb8ae05(_0x1a6c33);},_0x122ccb=setTimeout(()=>{_0x4d2887({'opened':![],'reason':_0x1cc4(0x182)});},OPEN_TIMEOUT_MS);let _0x2f35c1;try{_0x2f35c1=spawn(_0x4a6084,_0x557194,{'stdio':_0x1cc4(0x17e),'detached':!![]});}catch(_0x3403da){_0x4d2887({'opened':![],'reason':_0x3403da instanceof Error?_0x3403da[_0x1cc4(0x184)]:_0x1cc4(0x18a)});return;}_0x2f35c1[_0x1cc4(0x178)](_0x1cc4(0x18b),_0x3cd488=>{_0x4d2887({'opened':![],'reason':_0x3cd488[_0x1cc4(0x184)]||_0x1cc4(0x189)});}),_0x2f35c1['once'](_0x1cc4(0x18d),_0x3a8f3e=>{if(_0x3a8f3e===0x0||_0x3a8f3e==null){_0x4d2887({'opened':!![],'reason':'opened'});return;}_0x4d2887({'opened':![],'reason':_0x1cc4(0x179)+_0x3a8f3e});}),_0x2f35c1[_0x1cc4(0x175)]();});}
@@ -1 +1 @@
1
- (function(_0x20fb0f,_0x908c6e){const _0x4512aa=_0x20fb0f();while(!![]){try{const _0x2c4ce3=parseInt(_0x28f9(0xd1))/0x1+-parseInt(_0x28f9(0xbb))/0x2*(parseInt(_0x28f9(0xb4))/0x3)+-parseInt(_0x28f9(0xc4))/0x4+-parseInt(_0x28f9(0xc5))/0x5+parseInt(_0x28f9(0xc7))/0x6*(-parseInt(_0x28f9(0xce))/0x7)+parseInt(_0x28f9(0xb9))/0x8+parseInt(_0x28f9(0xcd))/0x9;if(_0x2c4ce3===_0x908c6e)break;else _0x4512aa['push'](_0x4512aa['shift']());}catch(_0x543db6){_0x4512aa['push'](_0x4512aa['shift']());}}}(_0x471a,0x640ef));function _0x471a(){const _0x18e7f2=['getScopes','check_in_order','2295032xLJmwp','95650SVehRO','room_status','804WBTmam','query_pre_arrival_orders','keyManager','debug','room_price','query_operational_data_v2','6215940nKVAsv','40607wuIIMu','hasAPIKey','hasScope','481075bBcDMS','isHudsonConfigured','length','query_room_prices','Permission\x20check\x20passed\x20(Hudson\x20auth\x20only)','45KOGpnT','arrange_room','get_order_details_v2','query_in_house_orders','generic','5193968vuyfAG','query_orders_by_date_range','5456MgRGLI','warn','checkPermission','query_room_status_new','finance','check_out_order','query_today_orders'];_0x471a=function(){return _0x18e7f2;};return _0x471a();}import{MCPError,ErrorCode,getPermissionDeniedMessage}from'../utils/errorHandler.js';import{logger}from'../utils/logger.js';function _0x28f9(_0x4caf13,_0x2e3abd){const _0x471a62=_0x471a();return _0x28f9=function(_0x28f99e,_0x460e39){_0x28f99e=_0x28f99e-0xb1;let _0x44361b=_0x471a62[_0x28f99e];return _0x44361b;},_0x28f9(_0x4caf13,_0x2e3abd);}function toolToPermissionDomain(_0x376ecb){switch(_0x376ecb){case _0x28f9(0xc1):case _0x28f9(0xc8):case _0x28f9(0xb7):case'query_pre_departure_orders':case _0x28f9(0xba):case _0x28f9(0xb6):case _0x28f9(0xc3):case _0x28f9(0xc0):case'extend_order':case _0x28f9(0xb5):return'orders';case _0x28f9(0xcc):return _0x28f9(0xbf);case'query_today_room_status':case _0x28f9(0xbe):return _0x28f9(0xc6);case _0x28f9(0xb2):return _0x28f9(0xcb);default:return _0x28f9(0xb8);}}export class PermissionChecker{[_0x28f9(0xc9)];constructor(_0x270e6c){this[_0x28f9(0xc9)]=_0x270e6c;}[_0x28f9(0xbd)](_0x2f30b2,_0x41ade3){if(_0x41ade3[_0x28f9(0xb1)]===0x0)return;if(!this['keyManager'][_0x28f9(0xcf)]()&&this[_0x28f9(0xc9)][_0x28f9(0xd2)]()){logger['debug'](_0x28f9(0xb3),{'tool':_0x2f30b2,'requiredScopes':_0x41ade3});return;}const _0x14ec96=_0x41ade3['some'](_0x74fb11=>this[_0x28f9(0xc9)][_0x28f9(0xd0)](_0x74fb11));if(!_0x14ec96){const _0x36de38=this['keyManager'][_0x28f9(0xc2)](),_0x83dc55=toolToPermissionDomain(_0x2f30b2);logger[_0x28f9(0xbc)]('Permission\x20denied',{'tool':_0x2f30b2,'required':_0x41ade3,'current':_0x36de38,'domain':_0x83dc55});throw new MCPError(ErrorCode['PERMISSION_DENIED'],getPermissionDeniedMessage(_0x83dc55),{'tool':_0x2f30b2,'requiredScopes':_0x41ade3,'currentScopes':_0x36de38,'domain':_0x83dc55,'source':'路客云AI'});}logger[_0x28f9(0xca)]('Permission\x20check\x20passed',{'tool':_0x2f30b2,'scopes':_0x41ade3});}}
1
+ (function(_0x1f95d1,_0x5bbc09){const _0x509b19=_0x1f95d1();while(!![]){try{const _0x2030f5=parseInt(_0x58c4(0x1fd))/0x1*(-parseInt(_0x58c4(0x1f4))/0x2)+parseInt(_0x58c4(0x1e3))/0x3*(-parseInt(_0x58c4(0x1e4))/0x4)+-parseInt(_0x58c4(0x1f2))/0x5*(-parseInt(_0x58c4(0x1ef))/0x6)+-parseInt(_0x58c4(0x1e9))/0x7*(-parseInt(_0x58c4(0x202))/0x8)+-parseInt(_0x58c4(0x1de))/0x9*(-parseInt(_0x58c4(0x1da))/0xa)+parseInt(_0x58c4(0x1dd))/0xb+-parseInt(_0x58c4(0x1db))/0xc;if(_0x2030f5===_0x5bbc09)break;else _0x509b19['push'](_0x509b19['shift']());}catch(_0x109dac){_0x509b19['push'](_0x509b19['shift']());}}}(_0xae73,0x7dfe9));import{MCPError,ErrorCode,getPermissionDeniedMessage}from'../utils/errorHandler.js';function _0xae73(){const _0x3f61c7=['room_price','44401mtzNQV','checkPermission','create_manual_order','query_room_prices','query_today_room_status','some','621336ByqPhT','close_rooms','hasScope','25pIjDeg','路客云AI','2pqDBFA','Sign\x20in\x20or\x20register\x20with\x20LocalsBnb\x20first\x20(sign_in\x20or\x20send_signup_email_code\x20/\x20complete_sign_up).','hasAPIKey','warn','query_room_status_new','finance','query_pre_departure_orders','open_rooms','generic','66623yJltGn','Permission\x20denied','Permission\x20check\x20passed','query_orders_by_date_range','arrange_room','264tqfAmk','query_pre_arrival_orders','10eoEoae','2983272qjBLvc','PERMISSION_DENIED','4379936NZHYSL','2711169GeImsf','debug','update_channel_prices','isHudsonConfigured','query_operational_data_v2','6CKKaZn','1190428aweBQo','AUTH_REQUIRED','keyManager','query_in_house_orders'];_0xae73=function(){return _0x3f61c7;};return _0xae73();}function _0x58c4(_0x42f9b0,_0x7377c6){const _0xae733c=_0xae73();return _0x58c4=function(_0x58c424,_0x47c841){_0x58c424=_0x58c424-0x1da;let _0x53d3e7=_0xae733c[_0x58c424];return _0x53d3e7;},_0x58c4(_0x42f9b0,_0x7377c6);}import{logger}from'../utils/logger.js';function toolToPermissionDomain(_0x5784cf){switch(_0x5784cf){case'query_today_orders':case _0x58c4(0x203):case _0x58c4(0x1e7):case _0x58c4(0x1fa):case _0x58c4(0x200):case'get_order_details_v2':case'check_in_order':case'check_out_order':case'extend_order':case _0x58c4(0x201):case _0x58c4(0x1eb):return'orders';case _0x58c4(0x1e2):return _0x58c4(0x1f9);case _0x58c4(0x1ed):case _0x58c4(0x1f8):case _0x58c4(0x1f0):case _0x58c4(0x1fb):return'room_status';case _0x58c4(0x1ec):case _0x58c4(0x1e0):return _0x58c4(0x1e8);default:return _0x58c4(0x1fc);}}export class PermissionChecker{[_0x58c4(0x1e6)];constructor(_0x3c9ad4){this[_0x58c4(0x1e6)]=_0x3c9ad4;}[_0x58c4(0x1ea)](_0x4bb1ff,_0x1e382d){if(_0x1e382d['length']===0x0)return;if(!this[_0x58c4(0x1e6)]['hasAPIKey']()&&this[_0x58c4(0x1e6)][_0x58c4(0x1e1)]()){logger[_0x58c4(0x1df)]('Permission\x20check\x20passed\x20(Hudson\x20auth\x20only)',{'tool':_0x4bb1ff,'requiredScopes':_0x1e382d});return;}if(!this[_0x58c4(0x1e6)][_0x58c4(0x1f6)]()&&!this[_0x58c4(0x1e6)][_0x58c4(0x1e1)]())throw new MCPError(ErrorCode[_0x58c4(0x1e5)],_0x58c4(0x1f5));const _0x638e4a=_0x1e382d[_0x58c4(0x1ee)](_0x3a5e30=>this['keyManager'][_0x58c4(0x1f1)](_0x3a5e30));if(!_0x638e4a){const _0x4448cd=this[_0x58c4(0x1e6)]['getScopes'](),_0x33e701=toolToPermissionDomain(_0x4bb1ff);logger[_0x58c4(0x1f7)](_0x58c4(0x1fe),{'tool':_0x4bb1ff,'required':_0x1e382d,'current':_0x4448cd,'domain':_0x33e701});throw new MCPError(ErrorCode[_0x58c4(0x1dc)],getPermissionDeniedMessage(_0x33e701),{'tool':_0x4bb1ff,'requiredScopes':_0x1e382d,'currentScopes':_0x4448cd,'domain':_0x33e701,'source':_0x58c4(0x1f3)});}logger[_0x58c4(0x1df)](_0x58c4(0x1ff),{'tool':_0x4bb1ff,'scopes':_0x1e382d});}}
@@ -1 +1 @@
1
- (function(_0x158d4e,_0x229bae){const _0x434e92=_0x158d4e();while(!![]){try{const _0x122f02=-parseInt(_0x2079(0x12d))/0x1*(parseInt(_0x2079(0x12f))/0x2)+-parseInt(_0x2079(0x13b))/0x3+parseInt(_0x2079(0x13c))/0x4+parseInt(_0x2079(0x130))/0x5*(parseInt(_0x2079(0x13f))/0x6)+-parseInt(_0x2079(0x141))/0x7*(parseInt(_0x2079(0x133))/0x8)+-parseInt(_0x2079(0x135))/0x9+parseInt(_0x2079(0x137))/0xa;if(_0x122f02===_0x229bae)break;else _0x434e92['push'](_0x434e92['shift']());}catch(_0xce4af4){_0x434e92['push'](_0x434e92['shift']());}}}(_0x4ea0,0x2e0f4));import{config}from'../config/index.js';import{logger}from'../utils/logger.js';function _0x2079(_0xb15a6a,_0x281c0c){const _0x4ea074=_0x4ea0();return _0x2079=function(_0x20795f,_0x4f0c4d){_0x20795f=_0x20795f-0x12c;let _0x18eca2=_0x4ea074[_0x20795f];return _0x18eca2;},_0x2079(_0xb15a6a,_0x281c0c);}export class CacheManager{[_0x2079(0x142)]=new Map();[_0x2079(0x132)](_0x3e31f4){if(!config[_0x2079(0x142)][_0x2079(0x147)])return null;const _0x38fdf4=this[_0x2079(0x142)]['get'](_0x3e31f4);if(!_0x38fdf4)return null;if(Date[_0x2079(0x138)]()>_0x38fdf4['expiresAt'])return this[_0x2079(0x142)][_0x2079(0x140)](_0x3e31f4),logger[_0x2079(0x12e)](_0x2079(0x13d),{'key':_0x3e31f4}),null;return logger['debug'](_0x2079(0x12c),{'key':_0x3e31f4}),_0x38fdf4[_0x2079(0x146)];}[_0x2079(0x143)](_0xfbc854,_0x1d875,_0x5aafa5){if(!config['cache'][_0x2079(0x147)])return;const _0x356b7c=_0x5aafa5||config[_0x2079(0x142)][_0x2079(0x13a)];this[_0x2079(0x142)][_0x2079(0x143)](_0xfbc854,{'data':_0x1d875,'expiresAt':Date[_0x2079(0x138)]()+_0x356b7c}),logger[_0x2079(0x12e)](_0x2079(0x13e),{'key':_0xfbc854,'ttl':_0x356b7c});}[_0x2079(0x140)](_0x295478){this['cache'][_0x2079(0x140)](_0x295478),logger[_0x2079(0x12e)]('Cache\x20deleted',{'key':_0x295478});}['clear'](){this[_0x2079(0x142)]['clear'](),logger[_0x2079(0x12e)](_0x2079(0x145));}static[_0x2079(0x144)](_0x337f5a,_0x40fdc5){const _0x58cbb2=Object[_0x2079(0x131)](_0x40fdc5)[_0x2079(0x136)]()['map'](_0x1ad39f=>_0x1ad39f+'='+JSON[_0x2079(0x134)](_0x40fdc5[_0x1ad39f]))[_0x2079(0x139)]('&');return _0x337f5a+':'+_0x58cbb2;}}function _0x4ea0(){const _0x3149ec=['cache','set','generateKey','Cache\x20cleared','data','enabled','Cache\x20hit','580MMxBeF','debug','1106lRTmQY','211495kqQvBp','keys','get','8tqWNsK','stringify','2738574NpRPiI','sort','6596560FGWlic','now','join','ttl','462624RVBByu','1491524FdmqqR','Cache\x20expired','Cache\x20set','24ouqcnl','delete','1636873pFODMj'];_0x4ea0=function(){return _0x3149ec;};return _0x4ea0();}
1
+ function _0x59a4(_0x4403d1,_0x3ea39d){const _0x13fad7=_0x13fa();return _0x59a4=function(_0x59a44c,_0xa81e23){_0x59a44c=_0x59a44c-0x7f;let _0x15a7ad=_0x13fad7[_0x59a44c];return _0x15a7ad;},_0x59a4(_0x4403d1,_0x3ea39d);}(function(_0x1bccc8,_0x126e26){const _0x33e80b=_0x1bccc8();while(!![]){try{const _0x18bab1=-parseInt(_0x59a4(0x83))/0x1*(-parseInt(_0x59a4(0x97))/0x2)+-parseInt(_0x59a4(0x96))/0x3+parseInt(_0x59a4(0x9b))/0x4+parseInt(_0x59a4(0x99))/0x5+parseInt(_0x59a4(0x9a))/0x6+parseInt(_0x59a4(0x80))/0x7+-parseInt(_0x59a4(0x98))/0x8*(parseInt(_0x59a4(0x95))/0x9);if(_0x18bab1===_0x126e26)break;else _0x33e80b['push'](_0x33e80b['shift']());}catch(_0x264d8a){_0x33e80b['push'](_0x33e80b['shift']());}}}(_0x13fa,0xa9b73));import{config}from'../config/index.js';import{logger}from'../utils/logger.js';export class CacheManager{[_0x59a4(0x8e)]=new Map();[_0x59a4(0x8f)](_0x4ca24f){if(!config[_0x59a4(0x8e)][_0x59a4(0x85)])return null;const _0x544061=this[_0x59a4(0x8e)][_0x59a4(0x8f)](_0x4ca24f);if(!_0x544061)return null;if(Date[_0x59a4(0x90)]()>_0x544061[_0x59a4(0x91)])return this[_0x59a4(0x8e)][_0x59a4(0x89)](_0x4ca24f),logger[_0x59a4(0x8b)](_0x59a4(0x81),{'key':_0x4ca24f}),null;return logger[_0x59a4(0x8b)](_0x59a4(0x94),{'key':_0x4ca24f}),_0x544061[_0x59a4(0x86)];}[_0x59a4(0x93)](_0x4b3f90,_0x52ff3e,_0x4530b9){if(!config[_0x59a4(0x8e)]['enabled'])return;const _0x5d6d56=_0x4530b9||config['cache'][_0x59a4(0x7f)];this[_0x59a4(0x8e)]['set'](_0x4b3f90,{'data':_0x52ff3e,'expiresAt':Date['now']()+_0x5d6d56}),logger[_0x59a4(0x8b)](_0x59a4(0x92),{'key':_0x4b3f90,'ttl':_0x5d6d56});}[_0x59a4(0x89)](_0x297bad){this[_0x59a4(0x8e)]['delete'](_0x297bad),logger[_0x59a4(0x8b)]('Cache\x20deleted',{'key':_0x297bad});}[_0x59a4(0x87)](){this['cache'][_0x59a4(0x87)](),logger[_0x59a4(0x8b)](_0x59a4(0x82));}static[_0x59a4(0x84)](_0x5a558d,_0x1feec2){const _0x2b34cc=Object[_0x59a4(0x8a)](_0x1feec2)[_0x59a4(0x8c)]()[_0x59a4(0x88)](_0x2158bc=>_0x2158bc+'='+JSON['stringify'](_0x1feec2[_0x2158bc]))[_0x59a4(0x8d)]('&');return _0x5a558d+':'+_0x2b34cc;}}function _0x13fa(){const _0x5d4d3e=['Cache\x20set','set','Cache\x20hit','1908bykGyc','2725383LtOzay','89382gBIODC','64872wmxUNz','2889305VjcttA','2768334coeWtl','2520644rrWpkO','ttl','2500918sTkzZE','Cache\x20expired','Cache\x20cleared','29mTTHrP','generateKey','enabled','data','clear','map','delete','keys','debug','sort','join','cache','get','now','expiresAt'];_0x13fa=function(){return _0x5d4d3e;};return _0x13fa();}
@@ -1 +1 @@
1
- (function(_0xac86c2,_0x40452d){const _0x28227c=_0xac86c2();while(!![]){try{const _0x4baabc=parseInt(_0x3662(0x150))/0x1+parseInt(_0x3662(0x12e))/0x2+-parseInt(_0x3662(0x168))/0x3+-parseInt(_0x3662(0x13e))/0x4+parseInt(_0x3662(0x144))/0x5*(parseInt(_0x3662(0x12b))/0x6)+-parseInt(_0x3662(0x159))/0x7+parseInt(_0x3662(0x138))/0x8;if(_0x4baabc===_0x40452d)break;else _0x28227c['push'](_0x28227c['shift']());}catch(_0x1e3d9c){_0x28227c['push'](_0x28227c['shift']());}}}(_0x5dc8,0xda837));import _0x16a971 from'axios';import{config}from'../config/index.js';function _0x3662(_0x5419c1,_0x4fe329){const _0x5dc8c3=_0x5dc8();return _0x3662=function(_0x366229,_0x2e634e){_0x366229=_0x366229-0x12a;let _0x482efd=_0x5dc8c3[_0x366229];return _0x482efd;},_0x3662(_0x5419c1,_0x4fe329);}import{logger}from'../utils/logger.js';import{MCPError,ErrorCode}from'../utils/errorHandler.js';import{RetryHandler}from'./retryHandler.js';function _0x5dc8(){const _0x32d6ff=['6KQdEMW','status','setupInterceptors','371128iDHLsz','apiKey','INTERNAL_ERROR','资源不存在','response','api','API\x20error\x20response','generic','code','Request\x20configuration\x20error','16596368WHeUOP','env','reject','路客云AI','headers','请求频率过高,请稍后重试','5219772ZRhvym','API密钥无效或已过期','maxRetries','baseURL','params','权限不足','7922945uliyrd','API\x20response','object','config','handleError','message','entries','retry','execute','data','API错误:','error','194660HfJIop','extraHeaders','url','PERMISSION_DENIED','method','use','API\x20request','retryHandler','timeout','1389227LcWUyv','请求超时,请稍后重试','网络错误,请检查网络连接','API_RATE_LIMIT','debug','client','Bearer\x20','API\x20request\x20timeout','request','Request\x20interceptor\x20error','API_ERROR','请求配置错误','1.0.0','interceptors','API_NOT_FOUND','4922772cGCdIj','delay','hudsonAccessToken','application/json'];_0x5dc8=function(){return _0x32d6ff;};return _0x5dc8();}export class HTTPClient{[_0x3662(0x15e)];['apiKey'];[_0x3662(0x16a)];[_0x3662(0x157)];[_0x3662(0x151)]={};constructor(_0x332327,_0x2f1d36){this[_0x3662(0x12f)]=_0x332327,this[_0x3662(0x16a)]=_0x2f1d36,this[_0x3662(0x157)]=new RetryHandler(config[_0x3662(0x14b)][_0x3662(0x140)],config[_0x3662(0x14b)][_0x3662(0x169)]),this[_0x3662(0x15e)]=_0x16a971['create']({'baseURL':config['api'][_0x3662(0x141)],'timeout':config[_0x3662(0x133)][_0x3662(0x158)],'headers':{'Content-Type':_0x3662(0x12a),'X-Client-Type':'mcp','X-Client-Version':process[_0x3662(0x139)]['npm_package_version']||_0x3662(0x165)}}),this[_0x3662(0x12d)]();}[_0x3662(0x12d)](){this[_0x3662(0x15e)][_0x3662(0x166)][_0x3662(0x161)][_0x3662(0x155)](_0x1ad526=>{this[_0x3662(0x12f)]&&(_0x1ad526[_0x3662(0x13c)]['Authorization']=_0x3662(0x15f)+this[_0x3662(0x12f)]);this[_0x3662(0x16a)]&&(_0x1ad526[_0x3662(0x13c)]['hudson-access-token']=this['hudsonAccessToken']);for(const [_0x2bf731,_0xd8311e]of Object[_0x3662(0x14a)](this[_0x3662(0x151)])){if(_0xd8311e)_0x1ad526[_0x3662(0x13c)][_0x2bf731]=_0xd8311e;}return logger['debug'](_0x3662(0x156),{'method':_0x1ad526[_0x3662(0x154)],'url':_0x1ad526[_0x3662(0x152)],'params':_0x1ad526[_0x3662(0x142)]}),_0x1ad526;},_0x47ae61=>{return logger[_0x3662(0x14f)](_0x3662(0x162),_0x47ae61),Promise[_0x3662(0x13a)](_0x47ae61);}),this[_0x3662(0x15e)][_0x3662(0x166)][_0x3662(0x132)][_0x3662(0x155)](_0x1de4a2=>{return logger[_0x3662(0x15d)](_0x3662(0x145),{'status':_0x1de4a2[_0x3662(0x12c)],'url':_0x1de4a2[_0x3662(0x147)]['url']}),_0x1de4a2;},async _0x333d35=>{return this[_0x3662(0x148)](_0x333d35);});}async[_0x3662(0x148)](_0xa8acb6){if(_0xa8acb6[_0x3662(0x132)]){const _0x1469bf=_0xa8acb6[_0x3662(0x132)][_0x3662(0x12c)],_0x4ca8bb=_0xa8acb6[_0x3662(0x132)]['data'];logger[_0x3662(0x14f)](_0x3662(0x134),{'status':_0x1469bf,'url':_0xa8acb6[_0x3662(0x147)]?.[_0x3662(0x152)],'message':_0x4ca8bb[_0x3662(0x149)]});switch(_0x1469bf){case 0x191:throw new MCPError(ErrorCode['AUTH_INVALID'],_0x3662(0x13f),_0x4ca8bb);case 0x193:throw new MCPError(ErrorCode[_0x3662(0x153)],_0x4ca8bb?.['message']||_0x3662(0x143),{..._0x4ca8bb!=null&&typeof _0x4ca8bb===_0x3662(0x146)?_0x4ca8bb:{},'domain':_0x3662(0x135),'source':_0x3662(0x13b)});case 0x194:throw new MCPError(ErrorCode[_0x3662(0x167)],_0x3662(0x131),_0x4ca8bb);case 0x1ad:throw new MCPError(ErrorCode[_0x3662(0x15c)],_0x3662(0x13d),_0x4ca8bb);case 0x1f4:case 0x1f6:case 0x1f7:case 0x1f8:throw new MCPError(ErrorCode['API_ERROR'],'服务器错误,请稍后重试',_0x4ca8bb);default:throw new MCPError(ErrorCode['API_ERROR'],_0x4ca8bb[_0x3662(0x149)]||_0x3662(0x14e)+_0x1469bf,_0x4ca8bb);}}else{if(_0xa8acb6[_0x3662(0x161)]){logger[_0x3662(0x14f)](_0x3662(0x160),{'url':_0xa8acb6[_0x3662(0x147)]?.[_0x3662(0x152)],'timeout':config[_0x3662(0x133)][_0x3662(0x158)]});if(_0xa8acb6[_0x3662(0x136)]==='ECONNABORTED')throw new MCPError(ErrorCode['API_TIMEOUT'],_0x3662(0x15a));throw new MCPError(ErrorCode[_0x3662(0x163)],_0x3662(0x15b));}else{logger['error'](_0x3662(0x137),_0xa8acb6);throw new MCPError(ErrorCode[_0x3662(0x130)],_0x3662(0x164));}}}['setExtraHeaders'](_0x189dec){this['extraHeaders']={..._0x189dec};}async[_0x3662(0x161)](_0x454448){const _0x43d863={'method':_0x454448['method'],'url':_0x454448[_0x3662(0x152)],'params':_0x454448[_0x3662(0x142)],'data':_0x454448[_0x3662(0x14d)],'headers':_0x454448[_0x3662(0x13c)]};try{const _0x295621=await this[_0x3662(0x157)][_0x3662(0x14c)](()=>this[_0x3662(0x15e)][_0x3662(0x161)](_0x43d863));return _0x295621['data'];}catch(_0x14beb4){throw _0x14beb4;}}}
1
+ (function(_0x420db5,_0x559a91){const _0x2a81ae=_0x420db5();while(!![]){try{const _0x253f99=parseInt(_0x2b96(0x18b))/0x1+-parseInt(_0x2b96(0x186))/0x2*(-parseInt(_0x2b96(0x191))/0x3)+-parseInt(_0x2b96(0x17d))/0x4+parseInt(_0x2b96(0x17f))/0x5+-parseInt(_0x2b96(0x19c))/0x6+-parseInt(_0x2b96(0x17b))/0x7*(-parseInt(_0x2b96(0x194))/0x8)+-parseInt(_0x2b96(0x15f))/0x9*(-parseInt(_0x2b96(0x16b))/0xa);if(_0x253f99===_0x559a91)break;else _0x2a81ae['push'](_0x2a81ae['shift']());}catch(_0x1cb199){_0x2a81ae['push'](_0x2a81ae['shift']());}}}(_0x1711,0x8ec02));import _0x564b9e from'axios';import{formatHudsonAccessTokenHeader}from'../auth/hudsonToken.js';import{config}from'../config/index.js';import{logger}from'../utils/logger.js';import{MCPError,ErrorCode}from'../utils/errorHandler.js';import{RetryHandler}from'./retryHandler.js';function _0x1711(){const _0x5f24fe=['message','AUTH_INVALID','4575944imOjtO','1.0.0','extraHeaders','code','api','mcp','timeout','execute','6572322SgFOFB','client','网络错误,请检查网络连接','create','34767wcbprm','ECONNABORTED','interceptors','use','config','baseURL','API\x20error\x20response','API_RATE_LIMIT','请求超时,请稍后重试','Authorization','setHudsonAccessToken','method','1790ZBlfFi','entries','API\x20response','API_TIMEOUT','API_ERROR','apiKey','npm_package_version','服务器错误,请稍后重试','hudsonAccessToken','status','debug','handleError','setupInterceptors','权限不足','headers','PERMISSION_DENIED','7KOrcBD','Request\x20configuration\x20error','3569832jTTWHN','retryHandler','2506885VgslZM','retry','url','env','error','请求配置错误','trim','8zsKcVw','response','请求频率过高,请稍后重试','request','delay','166728cfmpIB','资源不存在','application/json','data','hudson-access-token','object','480732JSWqSj'];_0x1711=function(){return _0x5f24fe;};return _0x1711();}function _0x2b96(_0x3a4b9f,_0x2059e8){const _0x1711f0=_0x1711();return _0x2b96=function(_0x2b9640,_0x10f513){_0x2b9640=_0x2b9640-0x15d;let _0x55db8d=_0x1711f0[_0x2b9640];return _0x55db8d;},_0x2b96(_0x3a4b9f,_0x2059e8);}export class HTTPClient{[_0x2b96(0x19d)];[_0x2b96(0x170)];[_0x2b96(0x173)];[_0x2b96(0x17e)];['extraHeaders']={};constructor(_0xc4809c,_0x543a74){this[_0x2b96(0x170)]=_0xc4809c,this[_0x2b96(0x173)]=_0x543a74,this[_0x2b96(0x17e)]=new RetryHandler(config[_0x2b96(0x180)]['maxRetries'],config[_0x2b96(0x180)][_0x2b96(0x18a)]),this[_0x2b96(0x19d)]=_0x564b9e[_0x2b96(0x15e)]({'baseURL':config['api'][_0x2b96(0x164)],'timeout':config['api'][_0x2b96(0x19a)],'headers':{'Content-Type':_0x2b96(0x18d),'X-Client-Type':_0x2b96(0x199),'X-Client-Version':process[_0x2b96(0x182)][_0x2b96(0x171)]||_0x2b96(0x195)}}),this[_0x2b96(0x177)]();}[_0x2b96(0x177)](){this[_0x2b96(0x19d)][_0x2b96(0x161)][_0x2b96(0x189)][_0x2b96(0x162)](_0x27afaf=>{this['apiKey']&&(_0x27afaf[_0x2b96(0x179)][_0x2b96(0x168)]='Bearer\x20'+this['apiKey']);this[_0x2b96(0x173)]&&(_0x27afaf[_0x2b96(0x179)][_0x2b96(0x18f)]=formatHudsonAccessTokenHeader(this[_0x2b96(0x173)]));for(const [_0x3f8b45,_0x48c6df]of Object[_0x2b96(0x16c)](this[_0x2b96(0x196)])){if(_0x48c6df)_0x27afaf[_0x2b96(0x179)][_0x3f8b45]=_0x48c6df;}return logger[_0x2b96(0x175)]('API\x20request',{'method':_0x27afaf[_0x2b96(0x16a)],'url':_0x27afaf['url'],'params':_0x27afaf['params']}),_0x27afaf;},_0x1e3eea=>{return logger[_0x2b96(0x183)]('Request\x20interceptor\x20error',_0x1e3eea),Promise['reject'](_0x1e3eea);}),this[_0x2b96(0x19d)][_0x2b96(0x161)][_0x2b96(0x187)][_0x2b96(0x162)](_0x226cf3=>{return logger[_0x2b96(0x175)](_0x2b96(0x16d),{'status':_0x226cf3['status'],'url':_0x226cf3[_0x2b96(0x163)][_0x2b96(0x181)]}),_0x226cf3;},async _0x2f4bed=>{return this[_0x2b96(0x176)](_0x2f4bed);});}async['handleError'](_0x22caf4){if(_0x22caf4[_0x2b96(0x187)]){const _0x5d8a92=_0x22caf4['response'][_0x2b96(0x174)],_0x2855c7=_0x22caf4['response'][_0x2b96(0x18e)];logger['error'](_0x2b96(0x165),{'status':_0x5d8a92,'url':_0x22caf4[_0x2b96(0x163)]?.[_0x2b96(0x181)],'message':_0x2855c7[_0x2b96(0x192)]});switch(_0x5d8a92){case 0x191:throw new MCPError(ErrorCode[_0x2b96(0x193)],'API密钥无效或已过期',_0x2855c7);case 0x193:throw new MCPError(ErrorCode[_0x2b96(0x17a)],_0x2855c7?.['message']||_0x2b96(0x178),{..._0x2855c7!=null&&typeof _0x2855c7===_0x2b96(0x190)?_0x2855c7:{},'domain':'generic','source':'路客云AI'});case 0x194:throw new MCPError(ErrorCode['API_NOT_FOUND'],_0x2b96(0x18c),_0x2855c7);case 0x1ad:throw new MCPError(ErrorCode[_0x2b96(0x166)],_0x2b96(0x188),_0x2855c7);case 0x1f4:case 0x1f6:case 0x1f7:case 0x1f8:throw new MCPError(ErrorCode[_0x2b96(0x16f)],_0x2b96(0x172),_0x2855c7);default:throw new MCPError(ErrorCode[_0x2b96(0x16f)],_0x2855c7['message']||'API错误:'+_0x5d8a92,_0x2855c7);}}else{if(_0x22caf4[_0x2b96(0x189)]){logger[_0x2b96(0x183)]('API\x20request\x20timeout',{'url':_0x22caf4['config']?.['url'],'timeout':config[_0x2b96(0x198)][_0x2b96(0x19a)]});if(_0x22caf4[_0x2b96(0x197)]===_0x2b96(0x160))throw new MCPError(ErrorCode[_0x2b96(0x16e)],_0x2b96(0x167));throw new MCPError(ErrorCode[_0x2b96(0x16f)],_0x2b96(0x15d));}else{logger['error'](_0x2b96(0x17c),_0x22caf4);throw new MCPError(ErrorCode['INTERNAL_ERROR'],_0x2b96(0x184));}}}['setExtraHeaders'](_0x3666df){this[_0x2b96(0x196)]={..._0x3666df};}[_0x2b96(0x169)](_0x4ac3e6){const _0xf7486=String(_0x4ac3e6??'')[_0x2b96(0x185)]();this['hudsonAccessToken']=_0xf7486||undefined;}async[_0x2b96(0x189)](_0x44bca5){const _0x3443c7={'method':_0x44bca5[_0x2b96(0x16a)],'url':_0x44bca5[_0x2b96(0x181)],'params':_0x44bca5['params'],'data':_0x44bca5[_0x2b96(0x18e)],'headers':_0x44bca5['headers']};try{const _0x29611d=_0x44bca5['retry']===![]?await this[_0x2b96(0x19d)][_0x2b96(0x189)](_0x3443c7):await this[_0x2b96(0x17e)][_0x2b96(0x19b)](()=>this[_0x2b96(0x19d)]['request'](_0x3443c7));return _0x29611d[_0x2b96(0x18e)];}catch(_0x298773){throw _0x298773;}}}
@@ -1 +1 @@
1
- (function(_0x33ff88,_0x320713){var _0x2b5775=_0x33ff88();while(!![]){try{var _0x434ea7=-parseInt(_0x2451(0x1c6))/0x1*(-parseInt(_0x2451(0x1c9))/0x2)+parseInt(_0x2451(0x1c4))/0x3+parseInt(_0x2451(0x1c8))/0x4+-parseInt(_0x2451(0x1cc))/0x5*(-parseInt(_0x2451(0x1c7))/0x6)+parseInt(_0x2451(0x1c5))/0x7+parseInt(_0x2451(0x1cd))/0x8*(parseInt(_0x2451(0x1cb))/0x9)+-parseInt(_0x2451(0x1ca))/0xa;if(_0x434ea7===_0x320713)break;else _0x2b5775['push'](_0x2b5775['shift']());}catch(_0x1a969c){_0x2b5775['push'](_0x2b5775['shift']());}}}(_0x2781,0x1bc20));function _0x2451(_0x924e4e,_0x5b05d0){var _0x278181=_0x2781();return _0x2451=function(_0x245189,_0x485606){_0x245189=_0x245189-0x1c4;var _0x5e013e=_0x278181[_0x245189];return _0x5e013e;},_0x2451(_0x924e4e,_0x5b05d0);}export{HTTPClient}from'./httpClient.js';export{RetryHandler}from'./retryHandler.js';function _0x2781(){var _0x3d19e2=['6925PmDctT','16biRYmv','350391gvHrjL','1041201XwsxYB','218641CWwVsd','246qnmnZu','844436KvucVs','2XRJHTo','7197370pxkBQN','366111aJRdnF'];_0x2781=function(){return _0x3d19e2;};return _0x2781();}export{CacheManager}from'./cacheManager.js';
1
+ function _0x4fa7(_0x384414,_0x263a1c){var _0x241d31=_0x241d();return _0x4fa7=function(_0x4fa723,_0x47d051){_0x4fa723=_0x4fa723-0x7d;var _0x19916e=_0x241d31[_0x4fa723];return _0x19916e;},_0x4fa7(_0x384414,_0x263a1c);}(function(_0x23c1ec,_0x1a79a8){var _0x31720e=_0x23c1ec();while(!![]){try{var _0x540518=-parseInt(_0x4fa7(0x85))/0x1+-parseInt(_0x4fa7(0x80))/0x2*(parseInt(_0x4fa7(0x82))/0x3)+-parseInt(_0x4fa7(0x7d))/0x4*(-parseInt(_0x4fa7(0x83))/0x5)+parseInt(_0x4fa7(0x7f))/0x6+-parseInt(_0x4fa7(0x88))/0x7*(-parseInt(_0x4fa7(0x87))/0x8)+parseInt(_0x4fa7(0x81))/0x9*(parseInt(_0x4fa7(0x86))/0xa)+parseInt(_0x4fa7(0x7e))/0xb*(parseInt(_0x4fa7(0x84))/0xc);if(_0x540518===_0x1a79a8)break;else _0x31720e['push'](_0x31720e['shift']());}catch(_0x16f449){_0x31720e['push'](_0x31720e['shift']());}}}(_0x241d,0xcc92e));export{HTTPClient}from'./httpClient.js';function _0x241d(){var _0x531801=['360PAktML','152AZaFQU','255045ppwWYt','3267292dJTtUc','39721GPJcKs','2626746XIvXqW','81298yCeExK','101889ePpdoo','123PwzHbC','10ppIgNB','2364aIjBWJ','1378082FocNEr'];_0x241d=function(){return _0x531801;};return _0x241d();}export{RetryHandler}from'./retryHandler.js';export{CacheManager}from'./cacheManager.js';
@@ -1 +1 @@
1
- function _0x26cb(_0x166a4b,_0x2df567){const _0x2854de=_0x2854();return _0x26cb=function(_0x26cb05,_0x50ccf6){_0x26cb05=_0x26cb05-0xc0;let _0x2da0b5=_0x2854de[_0x26cb05];return _0x2da0b5;},_0x26cb(_0x166a4b,_0x2df567);}(function(_0x2c291e,_0x18b891){const _0x19a1c7=_0x2c291e();while(!![]){try{const _0x2c9bbb=-parseInt(_0x26cb(0xc4))/0x1+-parseInt(_0x26cb(0xd4))/0x2*(parseInt(_0x26cb(0xcf))/0x3)+-parseInt(_0x26cb(0xc5))/0x4+parseInt(_0x26cb(0xd2))/0x5*(-parseInt(_0x26cb(0xd7))/0x6)+parseInt(_0x26cb(0xd6))/0x7*(parseInt(_0x26cb(0xc9))/0x8)+parseInt(_0x26cb(0xca))/0x9*(-parseInt(_0x26cb(0xcb))/0xa)+parseInt(_0x26cb(0xc0))/0xb;if(_0x2c9bbb===_0x18b891)break;else _0x19a1c7['push'](_0x19a1c7['shift']());}catch(_0x1e1bc8){_0x19a1c7['push'](_0x19a1c7['shift']());}}}(_0x2854,0x4941c));import{logger}from'../utils/logger.js';import{AxiosError}from'axios';export class RetryHandler{[_0x26cb(0xd0)];[_0x26cb(0xc2)];constructor(_0x56bc31=0x3,_0x11e80b=0x3e8){this['maxRetries']=_0x56bc31,this[_0x26cb(0xc2)]=_0x11e80b;}async[_0x26cb(0xc8)](_0x21a895){let _0x4bff1f;for(let _0xb219ad=0x0;_0xb219ad<=this[_0x26cb(0xd0)];_0xb219ad++){try{return await _0x21a895();}catch(_0x1a1995){_0x4bff1f=_0x1a1995;if(_0xb219ad===this[_0x26cb(0xd0)])break;if(!this[_0x26cb(0xd5)](_0x1a1995))throw _0x1a1995;const _0x40147f=this[_0x26cb(0xc2)]*Math['pow'](0x2,_0xb219ad);logger[_0x26cb(0xce)](_0x26cb(0xcc)+(_0xb219ad+0x1)+'/'+this[_0x26cb(0xd0)]+')',{'error':_0x1a1995 instanceof Error?_0x1a1995['message']:String(_0x1a1995),'delay':_0x40147f}),await this['sleep'](_0x40147f);}}throw _0x4bff1f;}['isRetryableError'](_0x5f5251){if(_0x5f5251 instanceof AxiosError){if(_0x5f5251[_0x26cb(0xc3)]===_0x26cb(0xc6)||_0x5f5251[_0x26cb(0xc3)]===_0x26cb(0xd3)||_0x5f5251[_0x26cb(0xc3)]===_0x26cb(0xcd))return!![];if(_0x5f5251[_0x26cb(0xc7)]&&_0x5f5251[_0x26cb(0xc7)][_0x26cb(0xc1)]>=0x1f4)return!![];if(_0x5f5251['response']&&_0x5f5251[_0x26cb(0xc7)][_0x26cb(0xc1)]===0x1ad)return!![];}return![];}[_0x26cb(0xd1)](_0x5bee5d){return new Promise(_0x59090c=>setTimeout(_0x59090c,_0x5bee5d));}}function _0x2854(){const _0x570790=['23823xBKitM','1510KBxMFG','Request\x20failed,\x20retrying...\x20(attempt\x20','ECONNABORTED','warn','72051eUbRwp','maxRetries','sleep','5yJvjqb','ETIMEDOUT','22DbloMX','isRetryableError','32795GaDaeO','2480622QWfGPT','20614198WacFJF','status','baseDelay','code','351167VKkSnp','1162820CASvQW','ECONNRESET','response','execute','248ppMBHL'];_0x2854=function(){return _0x570790;};return _0x2854();}
1
+ function _0x1d8e(){const _0x245f51=['2412mkWYLK','136693EIEJjk','isRetryableError','5965872DCGXnq','pow','status','968360sGbSlO','execute','response','Request\x20failed,\x20retrying...\x20(attempt\x20','28mhOdyF','code','4faMSBz','638682UIwbBQ','baseDelay','ECONNABORTED','1972530IXIkME','844045tocXOd','sleep','18584oezQkH','ECONNRESET','maxRetries'];_0x1d8e=function(){return _0x245f51;};return _0x1d8e();}(function(_0xfbec17,_0x1782c4){const _0x6534e3=_0xfbec17();while(!![]){try{const _0x447bb9=parseInt(_0x274e(0xc4))/0x1+-parseInt(_0x274e(0xb9))/0x2*(parseInt(_0x274e(0xba))/0x3)+-parseInt(_0x274e(0xcd))/0x4*(-parseInt(_0x274e(0xbe))/0x5)+parseInt(_0x274e(0xc6))/0x6+-parseInt(_0x274e(0xbd))/0x7+parseInt(_0x274e(0xc0))/0x8*(-parseInt(_0x274e(0xc3))/0x9)+-parseInt(_0x274e(0xc9))/0xa;if(_0x447bb9===_0x1782c4)break;else _0x6534e3['push'](_0x6534e3['shift']());}catch(_0x592397){_0x6534e3['push'](_0x6534e3['shift']());}}}(_0x1d8e,0xd83ba));import{logger}from'../utils/logger.js';import{AxiosError}from'axios';function _0x274e(_0x1d2207,_0x49003e){const _0x1d8e30=_0x1d8e();return _0x274e=function(_0x274ec6,_0x2e036e){_0x274ec6=_0x274ec6-0xb9;let _0x444d6e=_0x1d8e30[_0x274ec6];return _0x444d6e;},_0x274e(_0x1d2207,_0x49003e);}export class RetryHandler{[_0x274e(0xc2)];[_0x274e(0xbb)];constructor(_0x583dc3=0x3,_0x6a563b=0x3e8){this[_0x274e(0xc2)]=_0x583dc3,this[_0x274e(0xbb)]=_0x6a563b;}async[_0x274e(0xca)](_0x5433d7){let _0xbef70f;for(let _0x4790f2=0x0;_0x4790f2<=this['maxRetries'];_0x4790f2++){try{return await _0x5433d7();}catch(_0xd644cd){_0xbef70f=_0xd644cd;if(_0x4790f2===this[_0x274e(0xc2)])break;if(!this[_0x274e(0xc5)](_0xd644cd))throw _0xd644cd;const _0x4a453d=this[_0x274e(0xbb)]*Math[_0x274e(0xc7)](0x2,_0x4790f2);logger['warn'](_0x274e(0xcc)+(_0x4790f2+0x1)+'/'+this[_0x274e(0xc2)]+')',{'error':_0xd644cd instanceof Error?_0xd644cd['message']:String(_0xd644cd),'delay':_0x4a453d}),await this[_0x274e(0xbf)](_0x4a453d);}}throw _0xbef70f;}['isRetryableError'](_0x5f3a35){if(_0x5f3a35 instanceof AxiosError){if(_0x5f3a35[_0x274e(0xce)]===_0x274e(0xc1)||_0x5f3a35[_0x274e(0xce)]==='ETIMEDOUT'||_0x5f3a35[_0x274e(0xce)]===_0x274e(0xbc))return!![];if(_0x5f3a35[_0x274e(0xcb)]&&_0x5f3a35[_0x274e(0xcb)][_0x274e(0xc8)]>=0x1f4)return!![];if(_0x5f3a35[_0x274e(0xcb)]&&_0x5f3a35[_0x274e(0xcb)][_0x274e(0xc8)]===0x1ad)return!![];}return![];}[_0x274e(0xbf)](_0x38948d){return new Promise(_0x2fd1f9=>setTimeout(_0x2fd1f9,_0x38948d));}}
@@ -1 +1 @@
1
- (function(_0x774956,_0x1066a1){const _0x1b5daa=_0x774956();while(!![]){try{const _0x34ee78=parseInt(_0x5634(0x119))/0x1+parseInt(_0x5634(0x12c))/0x2*(parseInt(_0x5634(0x122))/0x3)+-parseInt(_0x5634(0x126))/0x4*(parseInt(_0x5634(0x131))/0x5)+-parseInt(_0x5634(0x11e))/0x6+-parseInt(_0x5634(0x11f))/0x7+-parseInt(_0x5634(0x12b))/0x8*(parseInt(_0x5634(0x11c))/0x9)+parseInt(_0x5634(0x136))/0xa;if(_0x34ee78===_0x1066a1)break;else _0x1b5daa['push'](_0x1b5daa['shift']());}catch(_0xbc6e86){_0x1b5daa['push'](_0x1b5daa['shift']());}}}(_0xd8e4,0x6788a));import _0x4eddca from'dotenv';_0x4eddca[_0x5634(0x128)]();function _0x5634(_0xfc2525,_0x4359db){const _0xd8e4e9=_0xd8e4();return _0x5634=function(_0x56349d,_0x15cc3a){_0x56349d=_0x56349d-0x119;let _0x277226=_0xd8e4e9[_0x56349d];return _0x277226;},_0x5634(_0xfc2525,_0x4359db);}const resolvedEnv=process[_0x5634(0x11b)][_0x5634(0x129)]||_0x5634(0x11a);function _0xd8e4(){const _0x395032=['env','18ivnNGR','CACHE_ENABLED','3158466MESkri','4231640ZSyVVf','https://hudson-prod.localhome.cn','CACHE_TTL','9RFEabW','RETRY_DELAY','json','LOG_FORMAT','346644PMggWz','LOG_LEVEL','config','NODE_ENV','info','2303456kLrknK','346890SDDNiB','MAX_RETRIES','develop','development','LUKEYUN_API_BASE_URL','15Wvparq','3000','300000','PORT','true','15847700ewVNsi','285747aIhyGt','production'];_0xd8e4=function(){return _0x395032;};return _0xd8e4();}function resolveBaseURL(){if(process[_0x5634(0x11b)][_0x5634(0x130)])return process['env'][_0x5634(0x130)];if(resolvedEnv===_0x5634(0x12e)||resolvedEnv===_0x5634(0x12f))return'https://hudson-dev.localhome.cn';return _0x5634(0x120);}export const config={'api':{'baseURL':resolveBaseURL(),'timeout':parseInt(process['env']['API_TIMEOUT']||'30000',0xa)},'server':{'port':parseInt(process[_0x5634(0x11b)][_0x5634(0x134)]||_0x5634(0x132),0xa),'env':resolvedEnv},'cache':{'enabled':process[_0x5634(0x11b)][_0x5634(0x11d)]===_0x5634(0x135),'ttl':parseInt(process[_0x5634(0x11b)][_0x5634(0x121)]||_0x5634(0x133),0xa)},'retry':{'maxRetries':parseInt(process[_0x5634(0x11b)][_0x5634(0x12d)]||'3',0xa),'delay':parseInt(process[_0x5634(0x11b)][_0x5634(0x123)]||'1000',0xa)},'log':{'level':process[_0x5634(0x11b)][_0x5634(0x127)]||_0x5634(0x12a),'format':process['env'][_0x5634(0x125)]||_0x5634(0x124),'toFiles':process[_0x5634(0x11b)]['LOCALSBNB_LOG_TO_FILES']==='1'||process['env']['LOCALSBNB_LOG_TO_FILES']===_0x5634(0x135)}};
1
+ (function(_0x9e33bc,_0x4d0892){const _0x4e3182=_0x9e33bc();while(!![]){try{const _0x5b33bd=-parseInt(_0x3251(0x124))/0x1+-parseInt(_0x3251(0x11a))/0x2+parseInt(_0x3251(0x11e))/0x3+parseInt(_0x3251(0x123))/0x4+-parseInt(_0x3251(0x129))/0x5+-parseInt(_0x3251(0x12a))/0x6+-parseInt(_0x3251(0x118))/0x7*(-parseInt(_0x3251(0x128))/0x8);if(_0x5b33bd===_0x4d0892)break;else _0x4e3182['push'](_0x4e3182['shift']());}catch(_0x140136){_0x4e3182['push'](_0x4e3182['shift']());}}}(_0x425b,0xbd6ee));function _0x3251(_0x3cc581,_0x4360d8){const _0x425bf4=_0x425b();return _0x3251=function(_0x3251dc,_0x2f42fb){_0x3251dc=_0x3251dc-0x115;let _0x4c6f10=_0x425bf4[_0x3251dc];return _0x4c6f10;},_0x3251(_0x3cc581,_0x4360d8);}import _0x5f3a58 from'dotenv';_0x5f3a58['config']();const resolvedEnv=process[_0x3251(0x119)][_0x3251(0x11d)]||_0x3251(0x115);function resolveBaseURL(){if(process[_0x3251(0x119)]['LUKEYUN_API_BASE_URL'])return process[_0x3251(0x119)]['LUKEYUN_API_BASE_URL'];if(resolvedEnv===_0x3251(0x11b)||resolvedEnv==='development')return'https://hudson-dev.localhome.cn';return _0x3251(0x121);}function _0x425b(){const _0x3a8715=['1174533uEecss','CACHE_ENABLED','30000','LOCALSBNB_LOG_TO_FILES','168njzSMe','2674140MbNqYG','908676cGIEnQ','production','CACHE_TTL','true','761383UBFZuQ','env','2176692nFuYdy','develop','LOG_LEVEL','NODE_ENV','4052388ItzhwH','LOG_FORMAT','RETRY_DELAY','https://hudson-prod.localhome.cn','300000','360504nZBJsh'];_0x425b=function(){return _0x3a8715;};return _0x425b();}export const config={'api':{'baseURL':resolveBaseURL(),'timeout':parseInt(process['env']['API_TIMEOUT']||_0x3251(0x126),0xa)},'server':{'port':parseInt(process['env']['PORT']||'3000',0xa),'env':resolvedEnv},'cache':{'enabled':process[_0x3251(0x119)][_0x3251(0x125)]===_0x3251(0x117),'ttl':parseInt(process['env'][_0x3251(0x116)]||_0x3251(0x122),0xa)},'retry':{'maxRetries':parseInt(process[_0x3251(0x119)]['MAX_RETRIES']||'3',0xa),'delay':parseInt(process['env'][_0x3251(0x120)]||'1000',0xa)},'log':{'level':process[_0x3251(0x119)][_0x3251(0x11c)]||'info','format':process[_0x3251(0x119)][_0x3251(0x11f)]||'json','toFiles':process[_0x3251(0x119)][_0x3251(0x127)]==='1'||process[_0x3251(0x119)][_0x3251(0x127)]===_0x3251(0x117)}};
@@ -1 +1 @@
1
- (function(_0x69395b,_0x183121){const _0x53d9b9=_0x69395b();while(!![]){try{const _0xe56167=parseInt(_0x12e1(0x17e))/0x1*(parseInt(_0x12e1(0x184))/0x2)+-parseInt(_0x12e1(0x18c))/0x3+-parseInt(_0x12e1(0x17b))/0x4*(parseInt(_0x12e1(0x18e))/0x5)+parseInt(_0x12e1(0x186))/0x6+-parseInt(_0x12e1(0x16f))/0x7+-parseInt(_0x12e1(0x1ab))/0x8*(-parseInt(_0x12e1(0x177))/0x9)+parseInt(_0x12e1(0x182))/0xa*(parseInt(_0x12e1(0x1a5))/0xb);if(_0xe56167===_0x183121)break;else _0x53d9b9['push'](_0x53d9b9['shift']());}catch(_0x55b5b9){_0x53d9b9['push'](_0x53d9b9['shift']());}}}(_0x2c2f,0xd0cab));function _0x12e1(_0x975907,_0x1ea6ca){const _0x2c2f70=_0x2c2f();return _0x12e1=function(_0x12e17f,_0x42e9d0){_0x12e17f=_0x12e17f-0x156;let _0x1e0c1f=_0x2c2f70[_0x12e17f];return _0x1e0c1f;},_0x12e1(_0x975907,_0x1ea6ca);}import*as _0x1d2ce3 from'../tools/rooms/index.js';import*as _0x1d9861 from'../tools/orders/index.js';import*as _0x2ac91b from'../tools/finance/index.js';import{getOverseasToolDescription}from'../region/index.js';import*as _0x5682b0 from'../tools/overseas/writes.js';import{handleToolError}from'../utils/errorHandler.js';export const toolDefinitions=[{'name':_0x12e1(0x160),'description':_0x12e1(0x15c),'inputSchema':{'type':_0x12e1(0x1aa),'properties':{'date':{'type':'string','format':'date','description':_0x12e1(0x170)},'days':{'type':_0x12e1(0x1b0),'default':0x1e,'minimum':0x1,'description':_0x12e1(0x16d)},'timeRange':{'type':'string','enum':[_0x12e1(0x1a0),'last_week'],'description':'this_week=本周自然周;last_week=上周自然周。与仅按天数的「近30天」不同'},'roomCategoryIds':{'type':'array','items':{'type':_0x12e1(0x1b0)},'description':_0x12e1(0x18a)},'roomCategoryGroupIds':{'type':'array','items':{'type':_0x12e1(0x1b0)},'description':_0x12e1(0x17a)},'channelIds':{'type':'array','items':{'type':'number'},'description':_0x12e1(0x15d)},'searchKey':{'type':_0x12e1(0x18b),'description':_0x12e1(0x159)},'pageNum':{'type':_0x12e1(0x1b0),'default':0x1,'minimum':0x1,'description':_0x12e1(0x15e)},'pageSize':{'type':_0x12e1(0x1b0),'default':0xf,'minimum':0x1,'maximum':0x64,'description':_0x12e1(0x180)}},'required':[]},'handler':_0x1d2ce3[_0x12e1(0x158)],'requiredScopes':[_0x12e1(0x194)]},{'name':'query_today_room_status','description':_0x12e1(0x176),'inputSchema':{'type':_0x12e1(0x1aa),'properties':{'date':{'type':'string','format':_0x12e1(0x1ad),'description':_0x12e1(0x1a6)}},'required':[]},'handler':_0x1d2ce3['queryTodayRoomStatusHandler'],'requiredScopes':[_0x12e1(0x194)]},{'name':_0x12e1(0x195),'description':'查询房价(渠道\x20RP、可配置天数价格)。用户说「本周房价」「上周房价」时必须传\x20timeRange=this_week\x20或\x20last_week(自然周周一至周日,上海时区),不要用「近7天」或默认\x20days=7\x20代替「本周」——否则日期区间错误。用户只说「近一周」「最近7天」且无「本周」字样时,可用\x20date+days(默认从当天起\x207\x20天)。支持关键词:查看房态日历价、房态日历价、日历价、房价、近期房价、本月房间、XXX天房价、今日房价查询、房价查询','inputSchema':{'type':_0x12e1(0x1aa),'properties':{'date':{'type':_0x12e1(0x18b),'format':_0x12e1(0x1ad),'description':_0x12e1(0x164)},'days':{'type':_0x12e1(0x1b0),'default':0x7,'minimum':0x1,'maximum':0x1e,'description':_0x12e1(0x163)},'timeRange':{'type':'string','enum':[_0x12e1(0x1a0),_0x12e1(0x191)],'description':_0x12e1(0x15b)}},'required':[]},'handler':_0x1d2ce3[_0x12e1(0x157)],'requiredScopes':[_0x12e1(0x194)]},{'name':_0x12e1(0x1a2),'description':_0x12e1(0x169),'inputSchema':{'type':_0x12e1(0x1aa),'properties':{'pageNum':{'type':_0x12e1(0x1b0),'default':0x1,'minimum':0x1,'description':_0x12e1(0x15e)},'pageSize':{'type':'number','default':0xa,'minimum':0x1,'maximum':0x32,'description':'每页数量,默认10'},'keyword':{'type':_0x12e1(0x18b),'description':'关键字(可选)'}},'required':[]},'handler':_0x1d9861[_0x12e1(0x171)],'requiredScopes':['orders:read']},{'name':_0x12e1(0x156),'description':_0x12e1(0x178),'inputSchema':{'type':_0x12e1(0x1aa),'properties':{'pageNum':{'type':_0x12e1(0x1b0),'default':0x1,'minimum':0x1,'description':'页码,默认1'},'pageSize':{'type':_0x12e1(0x1b0),'default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x12e1(0x18d)},'keyword':{'type':'string','description':_0x12e1(0x19d)}},'required':[]},'handler':_0x1d9861[_0x12e1(0x181)],'requiredScopes':[_0x12e1(0x1ac)]},{'name':'query_in_house_orders','description':_0x12e1(0x19f),'inputSchema':{'type':_0x12e1(0x1aa),'properties':{'pageNum':{'type':'number','default':0x1,'minimum':0x1,'description':_0x12e1(0x15e)},'pageSize':{'type':_0x12e1(0x1b0),'default':0xa,'minimum':0x1,'maximum':0x32,'description':'每页数量,默认10'},'keyword':{'type':_0x12e1(0x18b),'description':_0x12e1(0x19d)}},'required':[]},'handler':_0x1d9861['queryInHouseOrdersHandler'],'requiredScopes':['orders:read']},{'name':_0x12e1(0x1a4),'description':_0x12e1(0x192),'inputSchema':{'type':'object','properties':{'pageNum':{'type':'number','default':0x1,'minimum':0x1,'description':_0x12e1(0x15e)},'pageSize':{'type':_0x12e1(0x1b0),'default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x12e1(0x18d)},'keyword':{'type':'string','description':'关键字(可选)'}},'required':[]},'handler':_0x1d9861[_0x12e1(0x16e)],'requiredScopes':[_0x12e1(0x1ac)]},{'name':'query_orders_by_date_range','description':_0x12e1(0x183),'inputSchema':{'type':'object','properties':{'startDate':{'type':'string','description':_0x12e1(0x185)},'endDate':{'type':'string','description':_0x12e1(0x19e)},'timeRange':{'type':_0x12e1(0x18b),'enum':[_0x12e1(0x1a0),_0x12e1(0x191)],'description':_0x12e1(0x15a)},'date':{'type':_0x12e1(0x18b),'format':_0x12e1(0x1ad),'description':_0x12e1(0x16b)},'pageNum':{'type':'number','default':0x1,'minimum':0x1,'description':'页码,默认1'},'pageSize':{'type':_0x12e1(0x1b0),'default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x12e1(0x18d)}},'required':[]},'handler':_0x1d9861['queryOrdersByDateRangeHandler'],'requiredScopes':[_0x12e1(0x1ac)]},{'name':_0x12e1(0x1b1),'description':_0x12e1(0x1ae),'inputSchema':{'type':_0x12e1(0x1aa),'properties':{'orderId':{'type':_0x12e1(0x18b),'description':'订单ID'}},'required':[_0x12e1(0x179)]},'handler':_0x1d9861[_0x12e1(0x19c)],'requiredScopes':[_0x12e1(0x1ac)]},{'name':'query_operational_data_v2','description':'查询运营数据:夜审分页、首页实时、经营分析(含入住率\x20OCC、ADR、RevPAR\x20等)。「本周」「本周入住率」「本周经营」「上周收入」等必须按自然周传参:优先传\x20timeRange\x20为\x20this_week\x20或\x20last_week(周一~周日,上海时区);或显式传\x20startDate、endDate\x20为当周起止日。勿仅用单日\x20date\x20代替「本周」——否则经营分析区间错误。单日查询可只传\x20date(或\x20startDate=endDate=同一天)。支持关键词:当前运营情况、今天数据、数据、经营情况、运营数据、本周入住率、本周经营、上周数据等。若可呈现可视化表格则使用表格呈现','inputSchema':{'type':_0x12e1(0x1aa),'properties':{'date':{'type':'string','format':_0x12e1(0x1ad),'description':'锚定日期\x20YYYY-MM-DD:单日统计时即业务日;与\x20timeRange\x20联用时表示「以该日所在周」为本周/上周(默认不传则为上海当天)'},'startDate':{'type':_0x12e1(0x18b),'format':_0x12e1(0x1ad),'description':_0x12e1(0x173)},'endDate':{'type':'string','format':_0x12e1(0x1ad),'description':'自定义统计区间终点,需与\x20startDate\x20同时传'},'timeRange':{'type':_0x12e1(0x18b),'enum':[_0x12e1(0x1a0),'last_week'],'description':_0x12e1(0x165)}},'required':[]},'handler':_0x2ac91b[_0x12e1(0x18f)],'requiredScopes':['finance:read']}];function overseasWriteTools(_0x532c66){const _0x30cfd2=_0x532c66[_0x12e1(0x196)];return[{'name':_0x12e1(0x1a1),'description':getOverseasToolDescription(_0x12e1(0x1a1),_0x30cfd2)||_0x12e1(0x190),'inputSchema':{'type':_0x12e1(0x1aa),'properties':{'orderDetailIds':{'type':'array','items':{'type':_0x12e1(0x18b)},'description':_0x12e1(0x19a)},'orderId':{'type':_0x12e1(0x18b),'description':_0x12e1(0x174)},'confirm':{'type':'boolean','description':_0x12e1(0x168)}},'required':[_0x12e1(0x199)]},'handler':async(_0x1f6494,_0x538ea5)=>{try{return _0x538ea5[_0x12e1(0x17d)]['checkPermission'](_0x12e1(0x1a1),[_0x12e1(0x198)]),await _0x5682b0[_0x12e1(0x189)](_0x1f6494,_0x538ea5);}catch(_0x3a28e1){return handleToolError(_0x3a28e1,_0x538ea5);}},'requiredScopes':[_0x12e1(0x198)]},{'name':'check_out_order','description':getOverseasToolDescription(_0x12e1(0x161),_0x30cfd2)||'Check\x20out\x20a\x20stay','inputSchema':{'type':_0x12e1(0x1aa),'properties':{'orderDetailIds':{'type':'array','items':{'type':_0x12e1(0x18b)},'description':'Stay\x20detail\x20IDs\x20to\x20check\x20out'},'orderId':{'type':_0x12e1(0x18b),'description':_0x12e1(0x174)},'confirm':{'type':'boolean','description':_0x12e1(0x168)}},'required':['orderDetailIds']},'handler':async(_0x24c524,_0x4e574f)=>{try{return _0x4e574f[_0x12e1(0x17d)][_0x12e1(0x166)]('check_out_order',['orders:write']),await _0x5682b0[_0x12e1(0x167)](_0x24c524,_0x4e574f);}catch(_0x3bdc9c){return handleToolError(_0x3bdc9c,_0x4e574f);}},'requiredScopes':['orders:write']},{'name':_0x12e1(0x16a),'description':getOverseasToolDescription(_0x12e1(0x16a),_0x30cfd2)||_0x12e1(0x187),'inputSchema':{'type':_0x12e1(0x1aa),'properties':{'previousOrderId':{'type':'string','description':'Current\x20order\x20ID\x20to\x20extend'},'nights':{'type':_0x12e1(0x1b0),'minimum':0x1,'description':_0x12e1(0x193)},'roomId':{'type':'string','description':_0x12e1(0x1a3)},'paid':{'type':_0x12e1(0x1b0),'description':'Optional\x20amount\x20already\x20paid,\x20in\x20fen'},'calcPayout':{'type':_0x12e1(0x19b),'description':_0x12e1(0x1a9)},'confirm':{'type':_0x12e1(0x19b),'description':'Execute\x20only\x20after\x20the\x20human\x20confirms\x20this\x20exact\x20booking\x20(guest\x20+\x20dates).\x20Omit\x20to\x20preview.\x20Never\x20true\x20on\x20the\x20first\x20lookup.'}},'required':[_0x12e1(0x1af),_0x12e1(0x17c),_0x12e1(0x1a8)]},'handler':async(_0x299794,_0x375a7f)=>{try{return _0x375a7f[_0x12e1(0x17d)][_0x12e1(0x166)]('extend_order',['orders:write']),await _0x5682b0[_0x12e1(0x15f)](_0x299794,_0x375a7f);}catch(_0x47daad){return handleToolError(_0x47daad,_0x375a7f);}},'requiredScopes':['orders:write']},{'name':_0x12e1(0x162),'description':getOverseasToolDescription(_0x12e1(0x162),_0x30cfd2)||_0x12e1(0x172),'inputSchema':{'type':_0x12e1(0x1aa),'properties':{'orderDetailId':{'type':_0x12e1(0x18b),'description':_0x12e1(0x175)},'roomId':{'type':'string','description':'Target\x20room\x20ID'},'orderId':{'type':_0x12e1(0x18b),'description':_0x12e1(0x174)},'confirm':{'type':'boolean','description':_0x12e1(0x168)}},'required':[_0x12e1(0x1a7),_0x12e1(0x1a8)]},'handler':async(_0x324bdb,_0x5d2bb9)=>{try{return _0x5d2bb9[_0x12e1(0x17d)][_0x12e1(0x166)](_0x12e1(0x162),[_0x12e1(0x198)]),await _0x5682b0[_0x12e1(0x17f)](_0x324bdb,_0x5d2bb9);}catch(_0x367ca6){return handleToolError(_0x367ca6,_0x5d2bb9);}},'requiredScopes':['orders:write']}];}export function getActiveToolDefinitions(_0x531561){if(_0x531561[_0x12e1(0x188)]!==_0x12e1(0x16c))return toolDefinitions;const _0x52fbf3=toolDefinitions['map'](_0x978276=>{const _0x40fe69=getOverseasToolDescription(_0x978276[_0x12e1(0x197)],_0x531561[_0x12e1(0x196)]);return _0x40fe69?{..._0x978276,'description':_0x40fe69}:_0x978276;});return[..._0x52fbf3,...overseasWriteTools(_0x531561)];}function _0x2c2f(){const _0x3f6693=['rooms:read','query_room_prices','locale','name','orders:write','orderDetailIds','Stay\x20detail\x20IDs\x20to\x20check\x20in','boolean','getOrderDetailsV2Handler','关键字(可选)','查询结束日期\x20YYYY-MM-DD;与\x20startDate\x20配对','在住订单(今日已入住)。固定调用\x20/orders/get\x20且\x20orderType=10。支持关键词:在住情况、在住订单、今日在住、今日已入住、已入住、今日在住订单。','this_week','check_in_order','query_today_orders','Room\x20ID\x20for\x20the\x20extension','query_pre_departure_orders','1474ItLQCm','日期,格式:YYYY-MM-DD,默认为当天','orderDetailId','roomId','If\x20true,\x20or\x20if\x20paid\x20is\x20omitted,\x20preview\x20calls\x20/bnbOrder/calcPayout.\x20Set\x20false\x20to\x20skip\x20quoting.','object','32msJLsI','orders:read','date','根据订单ID查询订单详情信息。返回中含客人姓名字段,向用户回复时必须说明客人姓名(不得省略)。支持关键词:XXX订单详情、订单详情、订单详情查询、订单详情统计、订单详情分析、订单详情报表、订单详情展示、订单详情可视化、订单详情仪表盘、订单详情报告、订单详情图表、订单详情表格。用户可先通过今日订单获得订单号再查详情','previousOrderId','number','get_order_details_v2','query_pre_arrival_orders','queryRoomPricesHandler','queryRoomStatusNewHandler','模糊搜索:房源编码、房源简称、房源名称(可选)','this_week=本周自然周;last_week=上周自然周。与\x20startDate/endDate\x20二选一','this_week=本周自然周房价;last_week=上周自然周。与「滚动\x207\x20天」不同','按房型日历查询房态、可售与库存等(新接口)。与「房价/渠道价」无关:用户说「查看房态日历价」「房态日历价」指近期/渠道房价时,必须调用\x20query_room_prices,勿选本工具。用户说「本周」「上周」房态日历时必须传\x20timeRange=this_week\x20或\x20last_week(自然周周一至周日,上海时区),勿用「从今天起连续\x2030\x20天」代替本周。','渠道ID列表(可选)','页码,默认1','extendOrderOverseas','query_room_status_new','check_out_order','arrange_room','从\x20date\x20起连续天数;与\x20timeRange\x20互斥(传\x20timeRange\x20时固定为自然周\x207\x20天)','开始日期\x20YYYY-MM-DD,默认当天;与\x20timeRange\x20联用时表示锚定日所在周','this_week=锚定日所在自然周(周一至周日);last_week=上一完整自然周。与\x20startDate/endDate\x20二选一','checkPermission','checkOutOrderOverseas','Execute\x20only\x20after\x20the\x20human\x20confirms\x20this\x20exact\x20booking\x20(guest\x20+\x20dates).\x20Omit\x20to\x20preview.\x20Never\x20true\x20on\x20the\x20first\x20lookup.','今日订单(聚合事件):同时查询预抵(orderType=11)、在住(orderType=10)、预离(orderType=12)三组,并分别返回总数与明细。支持关键词:订单、今日订单情况、待办事项、待办、今日待办、待处理订单情况、订单情况。','extend_order','与\x20timeRange\x20联用时为锚定日(默认上海当天)','overseas','查询天数,默认30天;与\x20timeRange\x20互斥(传\x20timeRange\x20时固定为自然周\x207\x20天)','queryPreDepartureOrdersHandler','11497997oMGVCR','开始日期,格式:YYYY-MM-DD,默认为当天;与\x20timeRange\x20联用时表示锚定日所在周','queryTodayOrdersHandler','Assign\x20or\x20change\x20room','自定义统计区间起点,需与\x20endDate\x20同时传','Optional\x20parent\x20order\x20ID\x20for\x20preview','Stay\x20detail\x20ID','查询今日(或指定日)房态汇总:房间状态、库存与保洁等,不含渠道房价。「查看房态日历价」指房价时请用\x20query_room_prices。支持关键词:今日房态、今日房态查询、今日房态统计、今日房态分析、今日房态报表、今日房态展示、今日房态可视化、今日房态仪表盘、今日房态报告、今日房态图表、今日房态表格、房态查询、房态','214416rlfySK','预抵订单(今日待入住)。固定调用\x20/orders/get\x20且\x20orderType=11。支持关键词:预抵、预抵订单、今日待入住、今日预订订单、今天待入住、剩余待入住、今日预抵。','orderId','房源分组ID列表(可选)','8fxdJLm','nights','permissionChecker','250xDKQQS','arrangeRoomOverseas','每页数量,默认15,最大100','queryPreArrivalOrdersHandler','190540iDDMen','订单查询(日期范围事件)。支持按\x20startDate/endDate\x20或\x20timeRange(this_week/last_week)\x20查询,不与今日订单/预抵/在住/预离混用。支持关键词:订单查询、查询订单、某时间段订单。','9902ZzMemF','查询开始日期\x20YYYY-MM-DD;与\x20endDate\x20配对','6979122Lecvrr','Extend\x20a\x20stay','region','checkInOrderOverseas','房源类型ID列表(可选)','string','4277529lccwWU','每页数量,默认10','2814610DwLMgz','queryOperationalDataV2Handler','Check\x20in\x20a\x20stay','last_week','预离订单(今日待退房)。固定调用\x20/orders/get\x20且\x20orderType=12。支持关键词:预离、预离订单、今日待退房、今日预离订单、今天待退房、剩余待退房、今日预离。','Nights\x20to\x20add\x20(>=1)'];_0x2c2f=function(){return _0x3f6693;};return _0x2c2f();}
1
+ (function(_0x185cea,_0x36c662){const _0x452ce9=_0x185cea();while(!![]){try{const _0x24e5d2=-parseInt(_0x4148(0x9d))/0x1*(-parseInt(_0x4148(0xaa))/0x2)+parseInt(_0x4148(0xad))/0x3+parseInt(_0x4148(0xa5))/0x4+parseInt(_0x4148(0xd0))/0x5+-parseInt(_0x4148(0xdf))/0x6+parseInt(_0x4148(0xaf))/0x7*(parseInt(_0x4148(0xdc))/0x8)+-parseInt(_0x4148(0xc2))/0x9;if(_0x24e5d2===_0x36c662)break;else _0x452ce9['push'](_0x452ce9['shift']());}catch(_0x44253f){_0x452ce9['push'](_0x452ce9['shift']());}}}(_0x4e23,0xceeab));import*as _0x2bf12b from'../tools/rooms/index.js';import*as _0x2ecd0b from'../tools/orders/index.js';import*as _0x91eb25 from'../tools/finance/index.js';function _0x4e23(){const _0x5bfe94=['this_week','queryPreDepartureOrdersHandler','query_pre_departure_orders','查询房价(渠道\x20RP、可配置天数价格)。用户说「本周房价」「上周房价」时必须传\x20timeRange=this_week\x20或\x20last_week(自然周周一至周日,上海时区),不要用「近7天」或默认\x20days=7\x20代替「本周」——否则日期区间错误。用户只说「近一周」「最近7天」且无「本周」字样时,可用\x20date+days(默认从当天起\x207\x20天)。支持关键词:查看房态日历价、房态日历价、日历价、房价、近期房价、本月房间、XXX天房价、今日房价查询、房价查询','orders:write','arrange_room','Optional\x20parent\x20order\x20ID\x20for\x20preview','get_order_details_v2','getOrderDetailsV2Handler','check_out_order','query_pre_arrival_orders','last_week','在住订单(今日已入住)。固定调用\x20/orders/get\x20且\x20orderType=10。支持关键词:在住情况、在住订单、今日在住、今日已入住、已入住、今日在住订单。','Execute\x20only\x20after\x20the\x20human\x20confirms\x20this\x20exact\x20booking\x20(guest\x20+\x20dates).\x20Omit\x20to\x20preview.\x20Never\x20true\x20on\x20the\x20first\x20lookup.','Check\x20out\x20a\x20stay','name','this_week=本周自然周;last_week=上周自然周。与\x20startDate/endDate\x20二选一','32001165Moxlgi','Current\x20order\x20ID\x20to\x20extend','arrangeRoomOverseas','nights','Extend\x20a\x20stay','map','今日订单(聚合事件):同时查询预抵(orderType=11)、在住(orderType=10)、预离(orderType=12)三组,并分别返回总数与明细。支持关键词:订单、今日订单情况、待办事项、待办、今日待办、待处理订单情况、订单情况。','锚定日期\x20YYYY-MM-DD:单日统计时即业务日;与\x20timeRange\x20联用时表示「以该日所在周」为本周/上周(默认不传则为上海当天)','checkPermission','query_room_status_new','Stay\x20detail\x20IDs\x20to\x20check\x20in','从\x20date\x20起连续天数;与\x20timeRange\x20互斥(传\x20timeRange\x20时固定为自然周\x207\x20天)','页码,默认1','queryTodayRoomStatusHandler','5797635AuvjOf','Check\x20in\x20a\x20stay','extend_order','Stay\x20detail\x20IDs\x20to\x20check\x20out','订单ID','query_orders_by_date_range','checkOutOrderOverseas','number','orderId','查询运营数据:夜审分页、首页实时、经营分析(含入住率\x20OCC、ADR、RevPAR\x20等)。「本周」「本周入住率」「本周经营」「上周收入」等必须按自然周传参:优先传\x20timeRange\x20为\x20this_week\x20或\x20last_week(周一~周日,上海时区);或显式传\x20startDate、endDate\x20为当周起止日。勿仅用单日\x20date\x20代替「本周」——否则经营分析区间错误。单日查询可只传\x20date(或\x20startDate=endDate=同一天)。支持关键词:当前运营情况、今天数据、数据、经营情况、运营数据、本周入住率、本周经营、上周数据等。若可呈现可视化表格则使用表格呈现','orders:read','roomId','2684984AJEjdC','预抵订单(今日待入住)。固定调用\x20/orders/get\x20且\x20orderType=11。支持关键词:预抵、预抵订单、今日待入住、今日预订订单、今天待入住、剩余待入住、今日预抵。','Assign\x20or\x20change\x20room','4464294seRHBJ','关键字(可选)','array','orderDetailId','this_week=本周自然周房价;last_week=上周自然周。与「滚动\x207\x20天」不同','每页数量,默认10','date','rooms:read','模糊搜索:房源编码、房源简称、房源名称(可选)','query_today_orders','房源分组ID列表(可选)','If\x20true,\x20or\x20if\x20paid\x20is\x20omitted,\x20preview\x20calls\x20/bnbOrder/calcPayout.\x20Set\x20false\x20to\x20skip\x20quoting.','预离订单(今日待退房)。固定调用\x20/orders/get\x20且\x20orderType=12。支持关键词:预离、预离订单、今日待退房、今日预离订单、今天待退房、剩余待退房、今日预离。','Optional\x20amount\x20already\x20paid,\x20in\x20fen','string','每页数量,默认15,最大100','开始日期,格式:YYYY-MM-DD,默认为当天;与\x20timeRange\x20联用时表示锚定日所在周','checkInOrderOverseas','locale','this_week=锚定日所在自然周(周一至周日);last_week=上一完整自然周。与\x20startDate/endDate\x20二选一','check_in_order','previousOrderId','房源类型ID列表(可选)','326GTxnGr','orderDetailIds','object','permissionChecker','overseas','query_room_prices','渠道ID列表(可选)','extendOrderOverseas','5758224yxqQtU','查询开始日期\x20YYYY-MM-DD;与\x20endDate\x20配对','按房型日历查询房态、可售与库存等(新接口)。与「房价/渠道价」无关:用户说「查看房态日历价」「房态日历价」指近期/渠道房价时,必须调用\x20query_room_prices,勿选本工具。用户说「本周」「上周」房态日历时必须传\x20timeRange=this_week\x20或\x20last_week(自然周周一至周日,上海时区),勿用「从今天起连续\x2030\x20天」代替本周。','finance:read','queryPreArrivalOrdersHandler','3650lRCPBe','Target\x20room\x20ID','自定义统计区间终点,需与\x20startDate\x20同时传','4852827tMqkhC','与\x20timeRange\x20联用时为锚定日(默认上海当天)','7vZfFTr','boolean'];_0x4e23=function(){return _0x5bfe94;};return _0x4e23();}import{getOverseasToolDescription}from'../region/index.js';import*as _0x15e672 from'../tools/overseas/writes.js';import{getAuthToolDefinitions}from'../tools/auth/onboarding.js';import{getHandshakeToolDefinitions}from'../tools/auth/handshake.js';import{getOverseasOperationTools}from'../tools/overseas/operationTools.js';import{handleToolError}from'../utils/errorHandler.js';export const toolDefinitions=[{'name':_0x4148(0xcb),'description':_0x4148(0xa7),'inputSchema':{'type':_0x4148(0x9f),'properties':{'date':{'type':_0x4148(0x94),'format':_0x4148(0xe5),'description':_0x4148(0x96)},'days':{'type':_0x4148(0xd7),'default':0x1e,'minimum':0x1,'description':'查询天数,默认30天;与\x20timeRange\x20互斥(传\x20timeRange\x20时固定为自然周\x207\x20天)'},'timeRange':{'type':_0x4148(0x94),'enum':[_0x4148(0xb1),_0x4148(0xbc)],'description':'this_week=本周自然周;last_week=上周自然周。与仅按天数的「近30天」不同'},'roomCategoryIds':{'type':_0x4148(0xe1),'items':{'type':_0x4148(0xd7)},'description':_0x4148(0x9c)},'roomCategoryGroupIds':{'type':_0x4148(0xe1),'items':{'type':_0x4148(0xd7)},'description':_0x4148(0x90)},'channelIds':{'type':_0x4148(0xe1),'items':{'type':_0x4148(0xd7)},'description':_0x4148(0xa3)},'searchKey':{'type':_0x4148(0x94),'description':_0x4148(0x8e)},'pageNum':{'type':'number','default':0x1,'minimum':0x1,'description':'页码,默认1'},'pageSize':{'type':_0x4148(0xd7),'default':0xf,'minimum':0x1,'maximum':0x64,'description':_0x4148(0x95)}},'required':[]},'handler':_0x2bf12b['queryRoomStatusNewHandler'],'requiredScopes':[_0x4148(0xe6)]},{'name':'query_today_room_status','description':'查询今日(或指定日)房态汇总:房间状态、库存与保洁等,不含渠道房价。「查看房态日历价」指房价时请用\x20query_room_prices。支持关键词:今日房态、今日房态查询、今日房态统计、今日房态分析、今日房态报表、今日房态展示、今日房态可视化、今日房态仪表盘、今日房态报告、今日房态图表、今日房态表格、房态查询、房态','inputSchema':{'type':_0x4148(0x9f),'properties':{'date':{'type':'string','format':_0x4148(0xe5),'description':'日期,格式:YYYY-MM-DD,默认为当天'}},'required':[]},'handler':_0x2bf12b[_0x4148(0xcf)],'requiredScopes':[_0x4148(0xe6)]},{'name':_0x4148(0xa2),'description':_0x4148(0xb4),'inputSchema':{'type':_0x4148(0x9f),'properties':{'date':{'type':_0x4148(0x94),'format':'date','description':'开始日期\x20YYYY-MM-DD,默认当天;与\x20timeRange\x20联用时表示锚定日所在周'},'days':{'type':_0x4148(0xd7),'default':0x7,'minimum':0x1,'maximum':0x1e,'description':_0x4148(0xcd)},'timeRange':{'type':'string','enum':[_0x4148(0xb1),_0x4148(0xbc)],'description':_0x4148(0xe3)}},'required':[]},'handler':_0x2bf12b['queryRoomPricesHandler'],'requiredScopes':[_0x4148(0xe6)]},{'name':_0x4148(0x8f),'description':_0x4148(0xc8),'inputSchema':{'type':'object','properties':{'pageNum':{'type':_0x4148(0xd7),'default':0x1,'minimum':0x1,'description':_0x4148(0xce)},'pageSize':{'type':_0x4148(0xd7),'default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x4148(0xe4)},'keyword':{'type':_0x4148(0x94),'description':_0x4148(0xe0)}},'required':[]},'handler':_0x2ecd0b['queryTodayOrdersHandler'],'requiredScopes':[_0x4148(0xda)]},{'name':_0x4148(0xbb),'description':_0x4148(0xdd),'inputSchema':{'type':'object','properties':{'pageNum':{'type':_0x4148(0xd7),'default':0x1,'minimum':0x1,'description':'页码,默认1'},'pageSize':{'type':_0x4148(0xd7),'default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x4148(0xe4)},'keyword':{'type':_0x4148(0x94),'description':_0x4148(0xe0)}},'required':[]},'handler':_0x2ecd0b[_0x4148(0xa9)],'requiredScopes':[_0x4148(0xda)]},{'name':'query_in_house_orders','description':_0x4148(0xbd),'inputSchema':{'type':_0x4148(0x9f),'properties':{'pageNum':{'type':_0x4148(0xd7),'default':0x1,'minimum':0x1,'description':_0x4148(0xce)},'pageSize':{'type':_0x4148(0xd7),'default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x4148(0xe4)},'keyword':{'type':_0x4148(0x94),'description':_0x4148(0xe0)}},'required':[]},'handler':_0x2ecd0b['queryInHouseOrdersHandler'],'requiredScopes':[_0x4148(0xda)]},{'name':_0x4148(0xb3),'description':_0x4148(0x92),'inputSchema':{'type':_0x4148(0x9f),'properties':{'pageNum':{'type':_0x4148(0xd7),'default':0x1,'minimum':0x1,'description':'页码,默认1'},'pageSize':{'type':_0x4148(0xd7),'default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x4148(0xe4)},'keyword':{'type':_0x4148(0x94),'description':'关键字(可选)'}},'required':[]},'handler':_0x2ecd0b[_0x4148(0xb2)],'requiredScopes':[_0x4148(0xda)]},{'name':_0x4148(0xd5),'description':'订单查询(日期范围事件)。支持按\x20startDate/endDate\x20或\x20timeRange(this_week/last_week)\x20查询,不与今日订单/预抵/在住/预离混用。支持关键词:订单查询、查询订单、某时间段订单。','inputSchema':{'type':_0x4148(0x9f),'properties':{'startDate':{'type':_0x4148(0x94),'description':_0x4148(0xa6)},'endDate':{'type':_0x4148(0x94),'description':'查询结束日期\x20YYYY-MM-DD;与\x20startDate\x20配对'},'timeRange':{'type':'string','enum':[_0x4148(0xb1),_0x4148(0xbc)],'description':_0x4148(0xc1)},'date':{'type':'string','format':_0x4148(0xe5),'description':_0x4148(0xae)},'pageNum':{'type':_0x4148(0xd7),'default':0x1,'minimum':0x1,'description':_0x4148(0xce)},'pageSize':{'type':_0x4148(0xd7),'default':0xa,'minimum':0x1,'maximum':0x32,'description':_0x4148(0xe4)}},'required':[]},'handler':_0x2ecd0b['queryOrdersByDateRangeHandler'],'requiredScopes':[_0x4148(0xda)]},{'name':_0x4148(0xb8),'description':'根据订单ID查询订单详情信息。返回中含客人姓名字段,向用户回复时必须说明客人姓名(不得省略)。支持关键词:XXX订单详情、订单详情、订单详情查询、订单详情统计、订单详情分析、订单详情报表、订单详情展示、订单详情可视化、订单详情仪表盘、订单详情报告、订单详情图表、订单详情表格。用户可先通过今日订单获得订单号再查详情','inputSchema':{'type':_0x4148(0x9f),'properties':{'orderId':{'type':_0x4148(0x94),'description':_0x4148(0xd4)}},'required':[_0x4148(0xd8)]},'handler':_0x2ecd0b[_0x4148(0xb9)],'requiredScopes':[_0x4148(0xda)]},{'name':'query_operational_data_v2','description':_0x4148(0xd9),'inputSchema':{'type':_0x4148(0x9f),'properties':{'date':{'type':'string','format':'date','description':_0x4148(0xc9)},'startDate':{'type':_0x4148(0x94),'format':_0x4148(0xe5),'description':'自定义统计区间起点,需与\x20endDate\x20同时传'},'endDate':{'type':'string','format':'date','description':_0x4148(0xac)},'timeRange':{'type':_0x4148(0x94),'enum':[_0x4148(0xb1),_0x4148(0xbc)],'description':_0x4148(0x99)}},'required':[]},'handler':_0x91eb25['queryOperationalDataV2Handler'],'requiredScopes':[_0x4148(0xa8)]}];function overseasWriteTools(_0x4ac2ac){const _0xa892db=_0x4ac2ac['locale'];return[{'name':'check_in_order','description':getOverseasToolDescription(_0x4148(0x9a),_0xa892db)||_0x4148(0xd1),'inputSchema':{'type':_0x4148(0x9f),'properties':{'orderDetailIds':{'type':_0x4148(0xe1),'items':{'type':'string'},'description':_0x4148(0xcc)},'orderId':{'type':_0x4148(0x94),'description':_0x4148(0xb7)},'confirm':{'type':_0x4148(0xb0),'description':_0x4148(0xbe)}},'required':[_0x4148(0x9e)]},'handler':async(_0xec04f1,_0x5cb097)=>{try{return _0x5cb097[_0x4148(0xa0)][_0x4148(0xca)](_0x4148(0x9a),[_0x4148(0xb5)]),await _0x15e672[_0x4148(0x97)](_0xec04f1,_0x5cb097);}catch(_0x4c1349){return handleToolError(_0x4c1349,_0x5cb097);}},'requiredScopes':[_0x4148(0xb5)]},{'name':'check_out_order','description':getOverseasToolDescription(_0x4148(0xba),_0xa892db)||_0x4148(0xbf),'inputSchema':{'type':_0x4148(0x9f),'properties':{'orderDetailIds':{'type':'array','items':{'type':_0x4148(0x94)},'description':_0x4148(0xd3)},'orderId':{'type':_0x4148(0x94),'description':'Optional\x20parent\x20order\x20ID\x20for\x20preview'},'confirm':{'type':_0x4148(0xb0),'description':_0x4148(0xbe)}},'required':['orderDetailIds']},'handler':async(_0x3d23ba,_0x3f4835)=>{try{return _0x3f4835[_0x4148(0xa0)][_0x4148(0xca)](_0x4148(0xba),[_0x4148(0xb5)]),await _0x15e672[_0x4148(0xd6)](_0x3d23ba,_0x3f4835);}catch(_0x7d4452){return handleToolError(_0x7d4452,_0x3f4835);}},'requiredScopes':[_0x4148(0xb5)]},{'name':_0x4148(0xd2),'description':getOverseasToolDescription(_0x4148(0xd2),_0xa892db)||_0x4148(0xc6),'inputSchema':{'type':'object','properties':{'previousOrderId':{'type':_0x4148(0x94),'description':_0x4148(0xc3)},'nights':{'type':'number','minimum':0x1,'description':'Nights\x20to\x20add\x20(>=1)'},'roomId':{'type':_0x4148(0x94),'description':'Room\x20ID\x20for\x20the\x20extension'},'paid':{'type':_0x4148(0xd7),'description':_0x4148(0x93)},'calcPayout':{'type':_0x4148(0xb0),'description':_0x4148(0x91)},'confirm':{'type':_0x4148(0xb0),'description':_0x4148(0xbe)}},'required':[_0x4148(0x9b),_0x4148(0xc5),_0x4148(0xdb)]},'handler':async(_0xae4863,_0x47467f)=>{try{return _0x47467f['permissionChecker']['checkPermission'](_0x4148(0xd2),[_0x4148(0xb5)]),await _0x15e672[_0x4148(0xa4)](_0xae4863,_0x47467f);}catch(_0x5e0716){return handleToolError(_0x5e0716,_0x47467f);}},'requiredScopes':['orders:write']},{'name':_0x4148(0xb6),'description':getOverseasToolDescription(_0x4148(0xb6),_0xa892db)||_0x4148(0xde),'inputSchema':{'type':_0x4148(0x9f),'properties':{'orderDetailId':{'type':'string','description':'Stay\x20detail\x20ID'},'roomId':{'type':_0x4148(0x94),'description':_0x4148(0xab)},'orderId':{'type':'string','description':_0x4148(0xb7)},'confirm':{'type':_0x4148(0xb0),'description':_0x4148(0xbe)}},'required':[_0x4148(0xe2),_0x4148(0xdb)]},'handler':async(_0x527cb2,_0x941bb2)=>{try{return _0x941bb2[_0x4148(0xa0)][_0x4148(0xca)](_0x4148(0xb6),[_0x4148(0xb5)]),await _0x15e672[_0x4148(0xc4)](_0x527cb2,_0x941bb2);}catch(_0x445053){return handleToolError(_0x445053,_0x941bb2);}},'requiredScopes':[_0x4148(0xb5)]}];}function _0x4148(_0x4ee6a8,_0x13024c){const _0x4e23c0=_0x4e23();return _0x4148=function(_0x4148d0,_0x10ec58){_0x4148d0=_0x4148d0-0x8e;let _0x4ff076=_0x4e23c0[_0x4148d0];return _0x4ff076;},_0x4148(_0x4ee6a8,_0x13024c);}export function getActiveToolDefinitions(_0x2c86fe){const _0x4c174e=getAuthToolDefinitions();if(_0x2c86fe['region']!==_0x4148(0xa1))return[..._0x4c174e,...toolDefinitions];const _0x3a1e=toolDefinitions[_0x4148(0xc7)](_0x581358=>{const _0x4faa47=getOverseasToolDescription(_0x581358[_0x4148(0xc0)],_0x2c86fe[_0x4148(0x98)]);return _0x4faa47?{..._0x581358,'description':_0x4faa47}:_0x581358;});return[..._0x4c174e,..._0x3a1e,...overseasWriteTools(_0x2c86fe),...getHandshakeToolDefinitions(),...getOverseasOperationTools()];}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- (function(_0x197b86,_0x561623){const _0x2dac45=_0x197b86();while(!![]){try{const _0x2ec246=-parseInt(_0x372b(0x17e))/0x1*(-parseInt(_0x372b(0x170))/0x2)+parseInt(_0x372b(0x177))/0x3+-parseInt(_0x372b(0x17c))/0x4+parseInt(_0x372b(0x17b))/0x5+parseInt(_0x372b(0x181))/0x6*(parseInt(_0x372b(0x180))/0x7)+parseInt(_0x372b(0x17a))/0x8*(parseInt(_0x372b(0x171))/0x9)+-parseInt(_0x372b(0x16d))/0xa;if(_0x2ec246===_0x561623)break;else _0x2dac45['push'](_0x2dac45['shift']());}catch(_0x334948){_0x2dac45['push'](_0x2dac45['shift']());}}}(_0x5edc,0x57ad8));function _0x5edc(){const _0x32ea5c=['exit','56AdsnOm','98184KGhfmb','getServer','4261600khmJGb','Uncaught\x20exception','MCP\x20Server\x20connected\x20via\x20StdIO','4lenLJe','117bwlEay','start','error','connect','uncaughtException','Fatal\x20error','326514SDSXel','Unhandled\x20rejection','unhandledRejection','297952yjQzvO','3067700zOkagY','2732480yzhKKF','Failed\x20to\x20start\x20MCP\x20Server','65473zCUGbL'];_0x5edc=function(){return _0x32ea5c;};return _0x5edc();}import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{LukeyunMCPServer}from'./server.js';import{logger}from'./utils/logger.js';async function main(){try{const _0x2b78bb=new LukeyunMCPServer();await _0x2b78bb[_0x372b(0x172)]();const _0x22a7df=new StdioServerTransport();await _0x2b78bb[_0x372b(0x182)]()[_0x372b(0x174)](_0x22a7df),logger['info'](_0x372b(0x16f));}catch(_0x1b8740){logger[_0x372b(0x173)](_0x372b(0x17d),_0x1b8740 instanceof Error?_0x1b8740:new Error(String(_0x1b8740))),process[_0x372b(0x17f)](0x1);}}function _0x372b(_0xca889b,_0x2b09da){const _0x5edc3c=_0x5edc();return _0x372b=function(_0x372bd6,_0x40fbf9){_0x372bd6=_0x372bd6-0x16d;let _0x1361ad=_0x5edc3c[_0x372bd6];return _0x1361ad;},_0x372b(_0xca889b,_0x2b09da);}process['on'](_0x372b(0x175),_0x44defa=>{logger[_0x372b(0x173)](_0x372b(0x16e),_0x44defa),process[_0x372b(0x17f)](0x1);}),process['on'](_0x372b(0x179),_0x5b73fd=>{logger['error'](_0x372b(0x178),new Error(String(_0x5b73fd))),process[_0x372b(0x17f)](0x1);}),main()['catch'](_0x3731c1=>{logger[_0x372b(0x173)](_0x372b(0x176),_0x3731c1 instanceof Error?_0x3731c1:new Error(String(_0x3731c1))),process['exit'](0x1);});
2
+ (function(_0x481e60,_0xc80ec3){const _0x52e14e=_0x481e60();while(!![]){try{const _0x25f91c=-parseInt(_0x48cb(0x142))/0x1+parseInt(_0x48cb(0x144))/0x2*(parseInt(_0x48cb(0x149))/0x3)+-parseInt(_0x48cb(0x13e))/0x4+parseInt(_0x48cb(0x135))/0x5+parseInt(_0x48cb(0x13c))/0x6+-parseInt(_0x48cb(0x13f))/0x7+-parseInt(_0x48cb(0x138))/0x8*(-parseInt(_0x48cb(0x140))/0x9);if(_0x25f91c===_0xc80ec3)break;else _0x52e14e['push'](_0x52e14e['shift']());}catch(_0x17dd9f){_0x52e14e['push'](_0x52e14e['shift']());}}}(_0x1a98,0x4f79a));import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{LukeyunMCPServer}from'./server.js';import{logger}from'./utils/logger.js';async function main(){try{const _0x24bcb9=new LukeyunMCPServer();await _0x24bcb9[_0x48cb(0x143)]();const _0x7087be=new StdioServerTransport();await _0x24bcb9[_0x48cb(0x146)]()['connect'](_0x7087be),logger[_0x48cb(0x136)](_0x48cb(0x148));}catch(_0x44614d){logger[_0x48cb(0x137)](_0x48cb(0x145),_0x44614d instanceof Error?_0x44614d:new Error(String(_0x44614d))),process[_0x48cb(0x13b)](0x1);}}function _0x48cb(_0x53c3d4,_0x4aaae6){const _0x1a98a6=_0x1a98();return _0x48cb=function(_0x48cb11,_0x5a133d){_0x48cb11=_0x48cb11-0x135;let _0x5c1891=_0x1a98a6[_0x48cb11];return _0x5c1891;},_0x48cb(_0x53c3d4,_0x4aaae6);}process['on'](_0x48cb(0x147),_0x40be54=>{logger[_0x48cb(0x137)]('Uncaught\x20exception',_0x40be54),process[_0x48cb(0x13b)](0x1);}),process['on'](_0x48cb(0x13a),_0x1adb08=>{logger['error'](_0x48cb(0x141),new Error(String(_0x1adb08))),process[_0x48cb(0x13b)](0x1);}),main()[_0x48cb(0x13d)](_0x1f7d3d=>{logger[_0x48cb(0x137)](_0x48cb(0x139),_0x1f7d3d instanceof Error?_0x1f7d3d:new Error(String(_0x1f7d3d))),process[_0x48cb(0x13b)](0x1);});function _0x1a98(){const _0x30e1b7=['3KSEcaL','2367810UOeqWO','info','error','8pZNjcS','Fatal\x20error','unhandledRejection','exit','1299750mnZBQq','catch','326224LByFhd','4544302ducBbr','2795886KFffTQ','Unhandled\x20rejection','165274cdEaTA','start','441410HMZYYg','Failed\x20to\x20start\x20MCP\x20Server','getServer','uncaughtException','MCP\x20Server\x20connected\x20via\x20StdIO'];_0x1a98=function(){return _0x30e1b7;};return _0x1a98();}
package/dist/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "localsbnb-mcp-server",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "description": "LocalsBnb MCP Server",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "clean": "node scripts/clean-dist.cjs",
9
- "build": "tsc && cp dist/index.js dist/start.mjs && cp scripts/run-mcp.cjs dist/run.cjs && cp scripts/run-mcp.sh dist/run.sh && cp package.json dist/package.json && chmod +x dist/run.sh dist/start.sh 2>/dev/null || true",
10
- "build:prod": "tsc -p tsconfig.prod.json && cp dist/index.js dist/start.mjs && cp scripts/run-mcp.cjs dist/run.cjs && cp scripts/run-mcp.sh dist/run.sh && cp package.json dist/package.json && node scripts/obfuscate-dist.cjs && chmod +x dist/run.sh 2>/dev/null || true",
9
+ "build": "tsc && cp dist/index.js dist/start.mjs && cp scripts/run-mcp.cjs dist/run.cjs && cp scripts/run-mcp.sh dist/run.sh && cp package.json dist/package.json && chmod +x dist/run.cjs dist/run.sh dist/start.sh 2>/dev/null || true",
10
+ "build:prod": "tsc -p tsconfig.prod.json && cp dist/index.js dist/start.mjs && cp scripts/run-mcp.cjs dist/run.cjs && cp scripts/run-mcp.sh dist/run.sh && cp package.json dist/package.json && node scripts/obfuscate-dist.cjs && chmod +x dist/run.cjs dist/run.sh 2>/dev/null || true",
11
11
  "prebuild": "npm run clean",
12
12
  "prepublishOnly": "npm run clean && npm run build:prod",
13
13
  "dev": "tsx watch src/index.ts",
@@ -62,6 +62,7 @@
62
62
  "dist",
63
63
  "README.md",
64
64
  "mcp.sample.json",
65
+ "mcp.bootstrap.sample.json",
65
66
  "docs/readme/assets"
66
67
  ]
67
68
  }
@@ -1 +1 @@
1
- (function(_0x5c0539,_0xf2b9c7){const _0x22c7c0=_0x5c0539();while(!![]){try{const _0x505932=parseInt(_0x19bd(0xa1))/0x1+parseInt(_0x19bd(0x8e))/0x2+-parseInt(_0x19bd(0x90))/0x3*(-parseInt(_0x19bd(0x94))/0x4)+parseInt(_0x19bd(0xa4))/0x5+-parseInt(_0x19bd(0x99))/0x6+-parseInt(_0x19bd(0x9c))/0x7*(parseInt(_0x19bd(0xa3))/0x8)+-parseInt(_0x19bd(0x93))/0x9*(-parseInt(_0x19bd(0x9e))/0xa);if(_0x505932===_0xf2b9c7)break;else _0x22c7c0['push'](_0x22c7c0['shift']());}catch(_0x505662){_0x22c7c0['push'](_0x22c7c0['shift']());}}}(_0x1766,0xc73d7));function _0x19bd(_0x83b1e3,_0x402c2b){const _0x1766fb=_0x1766();return _0x19bd=function(_0x19bd06,_0xe21b68){_0x19bd06=_0x19bd06-0x8e;let _0x4b55ae=_0x1766fb[_0x19bd06];return _0x4b55ae;},_0x19bd(_0x83b1e3,_0x402c2b);}import{assertApiSuccess}from'../utils/errorHandler.js';function _0x1766(){const _0x870642=['POST','894633lqZclV','length','8wBTSDY','376760urjqYE','1751844MOONdd','object','48YEzGPs','isArray','apiClient','836415OrpXBs','246692smqTos','campId','request','data','list','8624046OTqasp','records','rows','7957999wLMSBD','number','60NQlwGd','map'];_0x1766=function(){return _0x870642;};return _0x1766();}export function requireCampId(_0x437ad2){const _0x34901f=_0x437ad2[_0x19bd(0x95)];if(!_0x34901f)throw new Error('APP_ID\x20not\x20configured.\x20Please\x20set\x20APP_ID\x20environment\x20variable.');return String(_0x34901f);}export async function hudsonPost(_0x2f4216,_0x547c92,_0x5c8daf,_0x24ed31,_0xcf6ccd){const _0xb16980=await _0x2f4216[_0x19bd(0x92)][_0x19bd(0x96)]({'method':_0x19bd(0xa0),'url':_0x547c92,'headers':{'Content-Type':'application/json'},'data':_0x5c8daf});return assertApiSuccess(_0xb16980,_0x24ed31,_0xcf6ccd),_0xb16980[_0x19bd(0x97)];}export function extractPage(_0x127033){if(!_0x127033||typeof _0x127033!==_0x19bd(0x8f))return{'list':[],'total':0x0};const _0x3ec920=_0x127033,_0x3f0c13=_0x3ec920[_0x19bd(0x9a)]??_0x3ec920[_0x19bd(0x98)]??_0x3ec920[_0x19bd(0x9b)]??[],_0x52a76e=Array[_0x19bd(0x91)](_0x3f0c13)?_0x3f0c13:[],_0x2e0348=Number(_0x3ec920['total']??_0x52a76e[_0x19bd(0xa2)])||0x0;return{'list':_0x52a76e,'total':_0x2e0348};}export function toIdList(_0x2366a8){if(Array[_0x19bd(0x91)](_0x2366a8))return _0x2366a8[_0x19bd(0x9f)](_0x5ec056=>typeof _0x5ec056===_0x19bd(0x9d)?_0x5ec056:String(_0x5ec056));if(_0x2366a8==null||_0x2366a8==='')return[];return[typeof _0x2366a8===_0x19bd(0x9d)?_0x2366a8:String(_0x2366a8)];}
1
+ (function(_0x184e51,_0x5b5c2b){const _0x7a8009=_0x184e51();while(!![]){try{const _0x2a637a=parseInt(_0x50c1(0x187))/0x1*(-parseInt(_0x50c1(0x18f))/0x2)+parseInt(_0x50c1(0x18c))/0x3+parseInt(_0x50c1(0x183))/0x4+-parseInt(_0x50c1(0x184))/0x5+parseInt(_0x50c1(0x189))/0x6*(-parseInt(_0x50c1(0x18d))/0x7)+parseInt(_0x50c1(0x18a))/0x8+parseInt(_0x50c1(0x192))/0x9*(parseInt(_0x50c1(0x186))/0xa);if(_0x2a637a===_0x5b5c2b)break;else _0x7a8009['push'](_0x7a8009['shift']());}catch(_0x3ff2cb){_0x7a8009['push'](_0x7a8009['shift']());}}}(_0x3625,0x766fb));import{assertApiSuccess}from'../utils/errorHandler.js';export function requireCampId(_0x459b75){const _0x28a253=_0x459b75['campId'];if(!_0x28a253)throw new Error(_0x50c1(0x182));return String(_0x28a253);}export async function hudsonPost(_0x2bf418,_0x2be3bb,_0x56bd38,_0x4fe696,_0x1d267f){const _0x1201e7=await _0x2bf418['apiClient'][_0x50c1(0x195)]({'method':_0x50c1(0x18e),'url':_0x2be3bb,'headers':{'Content-Type':_0x50c1(0x193)},'data':_0x56bd38});return assertApiSuccess(_0x1201e7,_0x4fe696,_0x1d267f),_0x1201e7[_0x50c1(0x185)];}function _0x3625(){const _0x33ecd2=['68481OaZLjy','application/json','rows','request','APP_ID\x20not\x20configured.\x20Please\x20set\x20APP_ID\x20environment\x20variable.','2930012aqrhYt','468175fhJfhI','data','960LasOgr','440499TlqJqC','list','17694kRdSwT','520728VyhpDP','number','1396377uzEgWZ','1267SYElyq','POST','4zbzKmc','object','isArray'];_0x3625=function(){return _0x33ecd2;};return _0x3625();}function _0x50c1(_0xbb7fc8,_0xcfd508){const _0x36258f=_0x3625();return _0x50c1=function(_0x50c15d,_0x1d8ace){_0x50c15d=_0x50c15d-0x182;let _0x24af31=_0x36258f[_0x50c15d];return _0x24af31;},_0x50c1(_0xbb7fc8,_0xcfd508);}export function extractPage(_0x5e20ed){if(!_0x5e20ed||typeof _0x5e20ed!==_0x50c1(0x190))return{'list':[],'total':0x0};const _0x23a808=_0x5e20ed,_0x1347a4=_0x23a808['records']??_0x23a808[_0x50c1(0x188)]??_0x23a808[_0x50c1(0x194)]??[],_0x46176d=Array[_0x50c1(0x191)](_0x1347a4)?_0x1347a4:[],_0x229d99=Number(_0x23a808['total']??_0x46176d['length'])||0x0;return{'list':_0x46176d,'total':_0x229d99};}export function toIdList(_0x10e369){if(Array[_0x50c1(0x191)](_0x10e369))return _0x10e369['map'](_0xf8fc50=>typeof _0xf8fc50===_0x50c1(0x18b)?_0xf8fc50:String(_0xf8fc50));if(_0x10e369==null||_0x10e369==='')return[];return[typeof _0x10e369==='number'?_0x10e369:String(_0x10e369)];}
@@ -1 +1 @@
1
- (function(_0x45ad3a,_0x1d11fb){const _0x166aab=_0x45ad3a();while(!![]){try{const _0x15fc87=-parseInt(_0x2591(0x136))/0x1+-parseInt(_0x2591(0x159))/0x2+-parseInt(_0x2591(0x13c))/0x3*(-parseInt(_0x2591(0x131))/0x4)+parseInt(_0x2591(0x162))/0x5*(-parseInt(_0x2591(0x135))/0x6)+parseInt(_0x2591(0x149))/0x7+-parseInt(_0x2591(0x133))/0x8*(parseInt(_0x2591(0x13b))/0x9)+parseInt(_0x2591(0x15a))/0xa*(parseInt(_0x2591(0x155))/0xb);if(_0x15fc87===_0x1d11fb)break;else _0x166aab['push'](_0x166aab['shift']());}catch(_0x5c5fb9){_0x166aab['push'](_0x166aab['shift']());}}}(_0x2c9e,0xd59dd));export function getTodayYmd(_0x4c298f){return new Date()['toLocaleDateString']('sv',{'timeZone':_0x4c298f});}export function addDaysYmd(_0x7c8428,_0x4a23ea){const [_0x2c0606,_0x4016df,_0x511b31]=_0x7c8428[_0x2591(0x153)]('-')[_0x2591(0x132)](Number),_0x729a4c=Date['UTC'](_0x2c0606,_0x4016df-0x1,_0x511b31)+_0x4a23ea*0x5265c00;return new Date(_0x729a4c)['toISOString']()[_0x2591(0x14e)](0x0,0xa);}export function getMondayOfWeekContaining(_0x319572){const [_0x55c015,_0x402805,_0x396e17]=_0x319572[_0x2591(0x153)]('-')[_0x2591(0x132)](Number),_0x3aa1e7=new Date(Date[_0x2591(0x143)](_0x55c015,_0x402805-0x1,_0x396e17,0xc,0x0,0x0))[_0x2591(0x15b)](),_0x29c871=(_0x3aa1e7+0x6)%0x7;return addDaysYmd(_0x319572,-_0x29c871);}export function getThisWeekRange(_0x1d7007){const _0x32ac8f=getMondayOfWeekContaining(_0x1d7007);return{'start':_0x32ac8f,'end':addDaysYmd(_0x32ac8f,0x6)};}export function getLastWeekRange(_0x5b143f){const _0x29700a=getMondayOfWeekContaining(_0x5b143f),_0xd1eed6=addDaysYmd(_0x29700a,-0x7);return{'start':_0xd1eed6,'end':addDaysYmd(_0xd1eed6,0x6)};}export function toOverseasDays(_0x2d6e05){return Math[_0x2591(0x145)](Math['min'](_0x2d6e05,0x5b)-0x1,0x0);}export function resolveNaturalWeek(_0x18365e){const _0x160234=_0x18365e[_0x2591(0x15c)]??getTodayYmd(_0x18365e[_0x2591(0x14f)]);if(_0x18365e[_0x2591(0x160)]===_0x2591(0x154)){const _0x4ab453=getThisWeekRange(_0x160234);return{'date':_0x4ab453[_0x2591(0x141)],'days':0x7,'anchor':_0x160234};}if(_0x18365e['timeRange']===_0x2591(0x14a)){const _0x2fe956=getLastWeekRange(_0x160234);return{'date':_0x2fe956['start'],'days':0x7,'anchor':_0x160234};}return{'date':_0x160234,'days':_0x18365e[_0x2591(0x163)],'anchor':_0x160234};}function tzOffsetMs(_0x336528,_0x351898){const _0x1902ea=new Intl[(_0x2591(0x138))](_0x2591(0x13f),{'timeZone':_0x351898,'hour12':![],'year':_0x2591(0x13a),'month':'2-digit','day':_0x2591(0x14c),'hour':'2-digit','minute':_0x2591(0x14c),'second':_0x2591(0x14c)}),_0x168da9=Object['fromEntries'](_0x1902ea['formatToParts'](new Date(_0x336528))[_0x2591(0x132)](_0x7e4983=>[_0x7e4983[_0x2591(0x147)],_0x7e4983[_0x2591(0x151)]])),_0x5181a1=Number(_0x168da9[_0x2591(0x158)])%0x18,_0x14e00e=Date[_0x2591(0x143)](Number(_0x168da9[_0x2591(0x157)]),Number(_0x168da9['month'])-0x1,Number(_0x168da9['day']),_0x5181a1,Number(_0x168da9[_0x2591(0x14b)]),Number(_0x168da9[_0x2591(0x15f)]));return _0x14e00e-_0x336528;}export function toZoneStartMs(_0x487f4a,_0x43dda2){const [_0x1de0f5,_0x2283f6,_0x14852c]=_0x487f4a[_0x2591(0x153)]('-')[_0x2591(0x132)](Number),_0x358848=Date[_0x2591(0x143)](_0x1de0f5,_0x2283f6-0x1,_0x14852c,0x0,0x0,0x0),_0x58ddfd=tzOffsetMs(_0x358848,_0x43dda2),_0x42bdad=Date[_0x2591(0x143)](_0x1de0f5,_0x2283f6-0x1,_0x14852c,0x0,0x0,0x0)-_0x58ddfd,_0xfc5e80=tzOffsetMs(_0x42bdad,_0x43dda2);return Date[_0x2591(0x143)](_0x1de0f5,_0x2283f6-0x1,_0x14852c,0x0,0x0,0x0)-_0xfc5e80;}function _0x2c9e(){const _0xf0d3a9=['DateTimeFormat','test','numeric','3132qUPfFG','976431TVbgaT','000','DD_MM_YYYY_HH_MM_24','en-US','Sun','start','isFinite','UTC','match','max','number','type','length','3498362jVfUia','last_week','minute','2-digit','string','slice','timeZone','format','value','Tue','split','this_week','1221JIuryn','sv-SE','year','hour','980634sUvzNr','223310xnYwQN','getUTCDay','date','DD_MMM_YYYY_H_MM_SS_AMPM','Sat','second','timeRange','DD_MM_YYYY_HH_MM_SS','392140UhYxrm','days','4mzTlsr','map','9136iYTfRv','Thu','42VAPpzH','992282WlsCni','trim'];_0x2c9e=function(){return _0xf0d3a9;};return _0x2c9e();}export function toZoneEndMs(_0xe6b63e,_0x4c3e75){return toZoneStartMs(addDaysYmd(_0xe6b63e,0x1),_0x4c3e75)-0x1;}export function formatYmdByPattern(_0x518f5c,_0x2aa80b){const [_0x553670,_0x269da3,_0x1bbd34]=_0x518f5c[_0x2591(0x153)]('-');switch(_0x2aa80b){case'MM_DD_YYYY_H_MM_AMPM':return _0x269da3+'/'+_0x1bbd34+'/'+_0x553670;case _0x2591(0x13e):case _0x2591(0x161):case _0x2591(0x15d):return _0x1bbd34+'/'+_0x269da3+'/'+_0x553670;default:return _0x553670+'/'+_0x269da3+'/'+_0x1bbd34;}}function _0x2591(_0x5a2f52,_0x1d04d9){const _0x2c9e7c=_0x2c9e();return _0x2591=function(_0x2591a4,_0x526545){_0x2591a4=_0x2591a4-0x131;let _0x5f3208=_0x2c9e7c[_0x2591a4];return _0x5f3208;},_0x2591(_0x5a2f52,_0x1d04d9);}export function isHighlightWeekend(_0x16a7b3,_0x424d93){const [_0x10069c,_0x132697,_0x12c774]=_0x16a7b3[_0x2591(0x153)]('-')[_0x2591(0x132)](Number),_0x2de036=new Date(Date[_0x2591(0x143)](_0x10069c,_0x132697-0x1,_0x12c774,0xc,0x0,0x0))[_0x2591(0x15b)]();if(_0x424d93===0x1)return _0x2de036===0x5||_0x2de036===0x6;return _0x2de036===0x6||_0x2de036===0x0;}export function weekdayShort(_0x6efb6d){const [_0xc6434b,_0x2e662b,_0x1e1fd7]=_0x6efb6d[_0x2591(0x153)]('-')[_0x2591(0x132)](Number),_0x18d254=[_0x2591(0x140),'Mon',_0x2591(0x152),'Wed',_0x2591(0x134),'Fri',_0x2591(0x15e)];return _0x18d254[new Date(Date['UTC'](_0xc6434b,_0x2e662b-0x1,_0x1e1fd7,0xc,0x0,0x0))['getUTCDay']()];}export function formatApiDate(_0x37d77f,_0x1b4acb){if(_0x37d77f==null||_0x37d77f==='')return'-';if(typeof _0x37d77f===_0x2591(0x14d)){const _0x1f559b=_0x37d77f[_0x2591(0x137)]();if(!_0x1f559b)return'-';if(/^\d{13}$/['test'](_0x1f559b)||/^\d{10}$/[_0x2591(0x139)](_0x1f559b))return formatApiDate(Number(_0x1f559b[_0x2591(0x148)]===0xa?_0x1f559b+_0x2591(0x13d):_0x1f559b),_0x1b4acb);return _0x1f559b;}if(typeof _0x37d77f===_0x2591(0x146)&&Number[_0x2591(0x142)](_0x37d77f)){const _0x4745b3=_0x37d77f<0xe8d4a51000?_0x37d77f*0x3e8:_0x37d77f;return new Intl[(_0x2591(0x138))](_0x2591(0x156),{'timeZone':_0x1b4acb,'year':_0x2591(0x13a),'month':_0x2591(0x14c),'day':'2-digit','hour':'2-digit','minute':_0x2591(0x14c),'hour12':![]})[_0x2591(0x150)](new Date(_0x4745b3));}return String(_0x37d77f);}export function apiDateToYmd(_0x447205,_0x2b58d7){if(_0x447205==null||_0x447205==='')return undefined;if(typeof _0x447205===_0x2591(0x14d)){const _0x3422b6=_0x447205[_0x2591(0x144)](/^(\d{4}-\d{2}-\d{2})/);if(_0x3422b6)return _0x3422b6[0x1];if(/^\d{13}$/['test'](_0x447205)||/^\d{10}$/['test'](_0x447205))return apiDateToYmd(Number(_0x447205[_0x2591(0x148)]===0xa?_0x447205+_0x2591(0x13d):_0x447205),_0x2b58d7);}if(typeof _0x447205===_0x2591(0x146)&&Number['isFinite'](_0x447205)){const _0x19d17f=_0x447205<0xe8d4a51000?_0x447205*0x3e8:_0x447205;return new Date(_0x19d17f)['toLocaleDateString']('sv',{'timeZone':_0x2b58d7});}return undefined;}
1
+ (function(_0x125da6,_0x997a49){const _0x1cbf2e=_0x125da6();while(!![]){try{const _0x5182a0=-parseInt(_0x42dc(0xb8))/0x1+parseInt(_0x42dc(0xd0))/0x2+parseInt(_0x42dc(0xbb))/0x3+-parseInt(_0x42dc(0xae))/0x4*(-parseInt(_0x42dc(0xa4))/0x5)+-parseInt(_0x42dc(0xbc))/0x6*(parseInt(_0x42dc(0xc0))/0x7)+parseInt(_0x42dc(0xa0))/0x8*(parseInt(_0x42dc(0xb3))/0x9)+parseInt(_0x42dc(0xa9))/0xa*(-parseInt(_0x42dc(0xc2))/0xb);if(_0x5182a0===_0x997a49)break;else _0x1cbf2e['push'](_0x1cbf2e['shift']());}catch(_0x578185){_0x1cbf2e['push'](_0x1cbf2e['shift']());}}}(_0x1502,0x3994b));export function getTodayYmd(_0x24b4fb){return new Date()[_0x42dc(0xce)]('sv',{'timeZone':_0x24b4fb});}export function addDaysYmd(_0x4ff280,_0xc5421a){const [_0x3e16c3,_0x1dd1cd,_0x5aa268]=_0x4ff280[_0x42dc(0xa8)]('-')[_0x42dc(0xcb)](Number),_0x1880aa=Date[_0x42dc(0xc4)](_0x3e16c3,_0x1dd1cd-0x1,_0x5aa268)+_0xc5421a*0x5265c00;return new Date(_0x1880aa)['toISOString']()[_0x42dc(0xbd)](0x0,0xa);}export function getMondayOfWeekContaining(_0x4d140e){const [_0x3c7c83,_0x26c071,_0x4d57e5]=_0x4d140e[_0x42dc(0xa8)]('-')[_0x42dc(0xcb)](Number),_0x38e3fb=new Date(Date[_0x42dc(0xc4)](_0x3c7c83,_0x26c071-0x1,_0x4d57e5,0xc,0x0,0x0))[_0x42dc(0xbf)](),_0x4bb191=(_0x38e3fb+0x6)%0x7;return addDaysYmd(_0x4d140e,-_0x4bb191);}export function getThisWeekRange(_0x348433){const _0x444e61=getMondayOfWeekContaining(_0x348433);return{'start':_0x444e61,'end':addDaysYmd(_0x444e61,0x6)};}export function getLastWeekRange(_0x20a186){const _0x1375fd=getMondayOfWeekContaining(_0x20a186),_0x3a7833=addDaysYmd(_0x1375fd,-0x7);return{'start':_0x3a7833,'end':addDaysYmd(_0x3a7833,0x6)};}export function toOverseasDays(_0xcb3f07){return Math['max'](Math[_0x42dc(0xad)](_0xcb3f07,0x5b)-0x1,0x0);}export function resolveNaturalWeek(_0x1ee131){const _0x515f82=_0x1ee131[_0x42dc(0xaa)]??getTodayYmd(_0x1ee131[_0x42dc(0xb2)]);if(_0x1ee131[_0x42dc(0xa2)]===_0x42dc(0xcf)){const _0x42398a=getThisWeekRange(_0x515f82);return{'date':_0x42398a[_0x42dc(0xc6)],'days':0x7,'anchor':_0x515f82};}if(_0x1ee131[_0x42dc(0xa2)]===_0x42dc(0xa6)){const _0x318828=getLastWeekRange(_0x515f82);return{'date':_0x318828[_0x42dc(0xc6)],'days':0x7,'anchor':_0x515f82};}return{'date':_0x515f82,'days':_0x1ee131['days'],'anchor':_0x515f82};}function tzOffsetMs(_0x128a21,_0x361fb7){const _0x2507fe=new Intl['DateTimeFormat'](_0x42dc(0xbe),{'timeZone':_0x361fb7,'hour12':![],'year':_0x42dc(0xb5),'month':_0x42dc(0xd1),'day':_0x42dc(0xd1),'hour':_0x42dc(0xd1),'minute':_0x42dc(0xd1),'second':_0x42dc(0xd1)}),_0x1721db=Object[_0x42dc(0xba)](_0x2507fe['formatToParts'](new Date(_0x128a21))[_0x42dc(0xcb)](_0x13a14e=>[_0x13a14e[_0x42dc(0xca)],_0x13a14e[_0x42dc(0xc3)]])),_0x176538=Number(_0x1721db['hour'])%0x18,_0x208948=Date[_0x42dc(0xc4)](Number(_0x1721db[_0x42dc(0xcd)]),Number(_0x1721db[_0x42dc(0xb7)])-0x1,Number(_0x1721db['day']),_0x176538,Number(_0x1721db['minute']),Number(_0x1721db[_0x42dc(0xa3)]));return _0x208948-_0x128a21;}export function toZoneStartMs(_0x29571c,_0xdb829d){const [_0x47e69d,_0x183ed4,_0x7265b8]=_0x29571c[_0x42dc(0xa8)]('-')[_0x42dc(0xcb)](Number),_0x3e2d03=Date[_0x42dc(0xc4)](_0x47e69d,_0x183ed4-0x1,_0x7265b8,0x0,0x0,0x0),_0x4b9e96=tzOffsetMs(_0x3e2d03,_0xdb829d),_0x349d0d=Date[_0x42dc(0xc4)](_0x47e69d,_0x183ed4-0x1,_0x7265b8,0x0,0x0,0x0)-_0x4b9e96,_0x519328=tzOffsetMs(_0x349d0d,_0xdb829d);return Date['UTC'](_0x47e69d,_0x183ed4-0x1,_0x7265b8,0x0,0x0,0x0)-_0x519328;}export function toZoneEndMs(_0x4c824d,_0x542c8a){return toZoneStartMs(addDaysYmd(_0x4c824d,0x1),_0x542c8a)-0x1;}export function formatYmdByPattern(_0x334338,_0x56d130){const [_0x2a0783,_0x152613,_0x56f7f7]=_0x334338[_0x42dc(0xa8)]('-');switch(_0x56d130){case'MM_DD_YYYY_H_MM_AMPM':return _0x152613+'/'+_0x56f7f7+'/'+_0x2a0783;case _0x42dc(0xc5):case _0x42dc(0xa1):case'DD_MMM_YYYY_H_MM_SS_AMPM':return _0x56f7f7+'/'+_0x152613+'/'+_0x2a0783;default:return _0x2a0783+'/'+_0x152613+'/'+_0x56f7f7;}}function _0x42dc(_0x2b01b8,_0x539a77){const _0x1502da=_0x1502();return _0x42dc=function(_0x42dc14,_0xccc3e1){_0x42dc14=_0x42dc14-0x9f;let _0x426adb=_0x1502da[_0x42dc14];return _0x426adb;},_0x42dc(_0x2b01b8,_0x539a77);}export function isHighlightWeekend(_0x4fbc99,_0x3dc735){const [_0x42b27f,_0x25b6d8,_0x56be2d]=_0x4fbc99[_0x42dc(0xa8)]('-')['map'](Number),_0x30814a=new Date(Date[_0x42dc(0xc4)](_0x42b27f,_0x25b6d8-0x1,_0x56be2d,0xc,0x0,0x0))[_0x42dc(0xbf)]();if(_0x3dc735===0x1)return _0x30814a===0x5||_0x30814a===0x6;return _0x30814a===0x6||_0x30814a===0x0;}export function weekdayShort(_0x5731fa){const [_0xd819ce,_0x446b80,_0x491527]=_0x5731fa[_0x42dc(0xa8)]('-')[_0x42dc(0xcb)](Number),_0x283bba=['Sun',_0x42dc(0xc7),_0x42dc(0xaf),_0x42dc(0xcc),_0x42dc(0x9f),_0x42dc(0xc1),'Sat'];return _0x283bba[new Date(Date[_0x42dc(0xc4)](_0xd819ce,_0x446b80-0x1,_0x491527,0xc,0x0,0x0))[_0x42dc(0xbf)]()];}export function formatApiDate(_0x14261f,_0x16756f){if(_0x14261f==null||_0x14261f==='')return'-';if(typeof _0x14261f===_0x42dc(0xa7)){const _0x1c4f90=_0x14261f[_0x42dc(0xb1)]();if(!_0x1c4f90)return'-';if(/^\d{13}$/[_0x42dc(0xac)](_0x1c4f90)||/^\d{10}$/[_0x42dc(0xac)](_0x1c4f90))return formatApiDate(Number(_0x1c4f90[_0x42dc(0xc8)]===0xa?_0x1c4f90+_0x42dc(0xa5):_0x1c4f90),_0x16756f);return _0x1c4f90;}if(typeof _0x14261f===_0x42dc(0xb4)&&Number['isFinite'](_0x14261f)){const _0x58021e=_0x14261f<0xe8d4a51000?_0x14261f*0x3e8:_0x14261f;return new Intl[(_0x42dc(0xab))](_0x42dc(0xb0),{'timeZone':_0x16756f,'year':'numeric','month':_0x42dc(0xd1),'day':_0x42dc(0xd1),'hour':'2-digit','minute':'2-digit','hour12':![]})[_0x42dc(0xb9)](new Date(_0x58021e));}return String(_0x14261f);}export function apiDateToYmd(_0x4ab8a2,_0x56e926){if(_0x4ab8a2==null||_0x4ab8a2==='')return undefined;if(typeof _0x4ab8a2===_0x42dc(0xa7)){const _0x5a5edb=_0x4ab8a2[_0x42dc(0xb6)](/^(\d{4}-\d{2}-\d{2})/);if(_0x5a5edb)return _0x5a5edb[0x1];if(/^\d{13}$/['test'](_0x4ab8a2)||/^\d{10}$/[_0x42dc(0xac)](_0x4ab8a2))return apiDateToYmd(Number(_0x4ab8a2[_0x42dc(0xc8)]===0xa?_0x4ab8a2+_0x42dc(0xa5):_0x4ab8a2),_0x56e926);}if(typeof _0x4ab8a2===_0x42dc(0xb4)&&Number[_0x42dc(0xc9)](_0x4ab8a2)){const _0x414d37=_0x4ab8a2<0xe8d4a51000?_0x4ab8a2*0x3e8:_0x4ab8a2;return new Date(_0x414d37)['toLocaleDateString']('sv',{'timeZone':_0x56e926});}return undefined;}function _0x1502(){const _0x4d6746=['1006200gqsalq','1240296wSbjwK','slice','en-US','getUTCDay','14YKcHkQ','Fri','5532263lJUUSd','value','UTC','DD_MM_YYYY_HH_MM_24','start','Mon','length','isFinite','type','map','Wed','year','toLocaleDateString','this_week','809396TQTSHk','2-digit','Thu','492696fAErLp','DD_MM_YYYY_HH_MM_SS','timeRange','second','4280SzMecU','000','last_week','string','split','10BUEKZo','date','DateTimeFormat','test','min','1752ohHpAC','Tue','sv-SE','trim','timeZone','27iCnNad','number','numeric','match','month','147571TXLGBf','format','fromEntries'];_0x1502=function(){return _0x4d6746;};return _0x1502();}