@admin-layout/tailwind-design-pro 12.0.16-alpha.92 → 12.2.1-alpha.0
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.
- package/README.md +40 -0
- package/lib/components/LanguageMenu/LanguageMenu.d.ts +2 -1
- package/lib/components/LanguageMenu/LanguageMenu.d.ts.map +1 -1
- package/lib/components/LanguageMenu/LanguageMenu.js +25 -32
- package/lib/components/LanguageMenu/LanguageMenu.js.map +1 -1
- package/lib/components/Layout/BasicLayout/index.d.ts +1 -1
- package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/index.js +96 -103
- package/lib/components/Layout/BasicLayout/index.js.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.d.ts +2 -2
- package/lib/components/Layout/BasicLayout/utils.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.js +69 -88
- package/lib/components/Layout/BasicLayout/utils.js.map +1 -1
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js +25 -30
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalFooter/Copyright.d.ts +2 -1
- package/lib/components/Layout/GlobalFooter/Copyright.d.ts.map +1 -1
- package/lib/components/Layout/GlobalFooter/Footer.d.ts +2 -1
- package/lib/components/Layout/GlobalFooter/Footer.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.js +32 -43
- package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/MainHeader.js +71 -81
- package/lib/components/Layout/GlobalHeader/MainHeader.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js +26 -30
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.js +25 -29
- package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightMenu.js +112 -136
- package/lib/components/Layout/GlobalHeader/RightMenu.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/SearchBar.js +36 -45
- package/lib/components/Layout/GlobalHeader/SearchBar.js.map +1 -1
- package/lib/components/Layout/ProTailwindLayout.js +1 -2
- package/lib/components/Layout/ProTailwindLayout.js.map +1 -1
- package/lib/components/Layout/Sidebar/BottomMenu.js +148 -184
- package/lib/components/Layout/Sidebar/BottomMenu.js.map +1 -1
- package/lib/components/Layout/Sidebar/Divider.d.ts +2 -1
- package/lib/components/Layout/Sidebar/Divider.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/Divider.js +26 -28
- package/lib/components/Layout/Sidebar/Divider.js.map +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.d.ts +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.js +10 -11
- package/lib/components/Layout/Sidebar/DynamicIcon.js.map +1 -1
- package/lib/components/Layout/Sidebar/MainSidebar.js +75 -97
- package/lib/components/Layout/Sidebar/MainSidebar.js.map +1 -1
- package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts +1 -1
- package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/MainSidebarMenu.js +113 -129
- package/lib/components/Layout/Sidebar/MainSidebarMenu.js.map +1 -1
- package/lib/components/Layout/Sidebar/PerplexSidebar.js +108 -133
- package/lib/components/Layout/Sidebar/PerplexSidebar.js.map +1 -1
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js +71 -85
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js.map +1 -1
- package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/TailwindLayout.js +13 -19
- package/lib/components/Layout/TailwindLayout.js.map +1 -1
- package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts +3 -2
- package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/AdditionalSettings.js +2 -2
- package/lib/components/Layout/slot-fill/AdditionalSettings.js.map +1 -1
- package/lib/components/Layout/slot-fill/Footer.d.ts +3 -2
- package/lib/components/Layout/slot-fill/Footer.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/Footer.js +2 -2
- package/lib/components/Layout/slot-fill/Footer.js.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderNotice.d.ts +3 -2
- package/lib/components/Layout/slot-fill/HeaderNotice.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderNotice.js +2 -2
- package/lib/components/Layout/slot-fill/HeaderNotice.js.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts +2 -1
- package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchBar.js +2 -2
- package/lib/components/Layout/slot-fill/HeaderSearchBar.js.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts +2 -1
- package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchButton.js +2 -2
- package/lib/components/Layout/slot-fill/HeaderSearchButton.js.map +1 -1
- package/lib/components/Layout/slot-fill/Logo.d.ts +3 -2
- package/lib/components/Layout/slot-fill/Logo.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/Logo.js +2 -2
- package/lib/components/Layout/slot-fill/Logo.js.map +1 -1
- package/lib/components/Layout/slot-fill/RightContent.d.ts +2 -1
- package/lib/components/Layout/slot-fill/RightContent.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/RightContent.js +2 -2
- package/lib/components/Layout/slot-fill/RightContent.js.map +1 -1
- package/lib/components/Layout/slot-fill/SideMenuLogo.d.ts +3 -2
- package/lib/components/Layout/slot-fill/SideMenuLogo.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/SideMenuLogo.js +2 -2
- package/lib/components/Layout/slot-fill/SideMenuLogo.js.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.d.ts +2 -1
- package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.js +117 -144
- package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts +2 -1
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js +17 -23
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js.map +1 -1
- package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts +2 -1
- package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/CheckBoxTheme.js +85 -97
- package/lib/components/SettingDrawer/components/CheckBoxTheme.js.map +1 -1
- package/lib/components/SettingDrawer/components/DeviceTabs.d.ts +2 -1
- package/lib/components/SettingDrawer/components/DeviceTabs.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/DeviceTabs.js +67 -75
- package/lib/components/SettingDrawer/components/DeviceTabs.js.map +1 -1
- package/lib/components/SettingDrawer/components/InvitationSettings.d.ts +2 -1
- package/lib/components/SettingDrawer/components/InvitationSettings.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/InvitationSettings.js +41 -52
- package/lib/components/SettingDrawer/components/InvitationSettings.js.map +1 -1
- package/lib/components/SettingDrawer/components/LayoutChange.d.ts +2 -1
- package/lib/components/SettingDrawer/components/LayoutChange.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/LayoutChange.js +75 -94
- package/lib/components/SettingDrawer/components/LayoutChange.js.map +1 -1
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts +2 -1
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js +50 -63
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js.map +1 -1
- package/lib/components/SettingDrawer/components/NavigationsModes.d.ts +2 -1
- package/lib/components/SettingDrawer/components/NavigationsModes.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/NavigationsModes.js +272 -290
- package/lib/components/SettingDrawer/components/NavigationsModes.js.map +1 -1
- package/lib/components/SettingDrawer/components/RegionalSettings.d.ts +2 -1
- package/lib/components/SettingDrawer/components/RegionalSettings.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/RegionalSettings.js +437 -535
- package/lib/components/SettingDrawer/components/RegionalSettings.js.map +1 -1
- package/lib/components/SettingDrawer/components/SettingsActions.d.ts +2 -1
- package/lib/components/SettingDrawer/components/SettingsActions.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/SettingsActions.js +29 -56
- package/lib/components/SettingDrawer/components/SettingsActions.js.map +1 -1
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts +2 -1
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js +13 -16
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js.map +1 -1
- package/lib/components/SettingDrawer/components/Switch.d.ts +2 -1
- package/lib/components/SettingDrawer/components/Switch.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/Switch.js +8 -10
- package/lib/components/SettingDrawer/components/Switch.js.map +1 -1
- package/lib/components/SettingDrawer/components/ThemeColor.d.ts +2 -1
- package/lib/components/SettingDrawer/components/ThemeColor.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/ThemeColor.js +24 -26
- package/lib/components/SettingDrawer/components/ThemeColor.js.map +1 -1
- package/lib/components/SettingDrawer/components/ThemeSelector.d.ts +2 -1
- package/lib/components/SettingDrawer/components/ThemeSelector.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/ThemeSelector.js +11 -13
- package/lib/components/SettingDrawer/components/ThemeSelector.js.map +1 -1
- package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts +1 -0
- package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/WebFontsSelector.js +17 -19
- package/lib/components/SettingDrawer/components/WebFontsSelector.js.map +1 -1
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.d.ts.map +1 -1
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.js +0 -4
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.js.map +1 -1
- package/lib/components/SettingDrawer/utils/transformers.d.ts.map +1 -1
- package/lib/components/SettingDrawer/utils/transformers.js +0 -3
- package/lib/components/SettingDrawer/utils/transformers.js.map +1 -1
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +3 -3
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts.map +1 -1
- package/lib/helpers/DynamicIcon.d.ts +1 -1
- package/lib/helpers/DynamicIcon.d.ts.map +1 -1
- package/lib/helpers/DynamicIcon.js +16 -17
- package/lib/helpers/DynamicIcon.js.map +1 -1
- package/lib/machines/settingsMachine.d.ts.map +1 -1
- package/lib/machines/settingsMachine.js +0 -6
- package/lib/machines/settingsMachine.js.map +1 -1
- package/lib/utils/__tests__/analytics-utils.test.d.ts +2 -0
- package/lib/utils/__tests__/analytics-utils.test.d.ts.map +1 -0
- package/lib/utils/__tests__/menu.test.d.ts +2 -0
- package/lib/utils/__tests__/menu.test.d.ts.map +1 -0
- package/lib/utils/__tests__/selectors.test.d.ts +2 -0
- package/lib/utils/__tests__/selectors.test.d.ts.map +1 -0
- package/lib/utils/__tests__/settingsMachine.test.d.ts.map +1 -0
- package/lib/utils/__tests__/settingsUtils.test.d.ts +2 -0
- package/lib/utils/__tests__/settingsUtils.test.d.ts.map +1 -0
- package/package.json +6 -6
- package/lib/machines/settingsMachine.test.d.ts.map +0 -1
- /package/lib/{machines → utils/__tests__}/settingsMachine.test.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProTailwindLayout.js","sources":["../../../src/components/Layout/ProTailwindLayout.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"ProTailwindLayout.js","sources":["../../../src/components/Layout/ProTailwindLayout.tsx"],"sourcesContent":[null],"names":["TailwindLayout"],"mappings":"4qBAyBA,MAAM,aAAa,GAAG,KAAC,IAAO,KAAG,CAAA,QAAM,CAAA,OAAS;AAChD,MAAM,cAAc,GAAG,KAAC,SAAU,CAAA,QAAM;AAExC,MAAM,QAAQ,GAAG,cAAc,CAAC,CAAC,aAAa,EAAE,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,MAAM;AAEzF,EAAA,OAAA;;AAEG,CAAA,CAAA,CAAA;AACH;;AAC+C;AAE3C,SAAA,2BAA6B,CAAA,QAAU,EAAA,QAAA,EAAA;MACvC,CAAA,QAAA,IAAA,CAAA,KAAA,CAAA,OAAA,CAAA,QAAA,CAAA,EAAA,OAAA,EAAA;QACA,oBAAuB,GAAA,QAAU,EAAA,oBAAuB,IAAK;;QAG7D,cAAM,GAAA,QAAuB,EAAA,cAAgB,GAAC,KAAM,CAAE,IAAE,CAAA,IAAA,GAAA,CAAA,QAAA,CAAA,cAAA,CAAA,CAAA,GAAA,EAAA;AACpD;QACA,uBAAA,GAAA,QAAA,CAAA,GAAA,CAAA,IAAyC,KAAA;AACzC,IAAA,GAAA,IAAA;;YAEG,MAAO,CAAA,QAAO,IAAK,SAAU;AACnC;IAED,GAAA,EAAA,IAAA,CAAA,GAAA,IAAA,IAAA,CAAA,IAAA,IAAA;AACA,GAAA,CAAA,CAAA;;QAKI,mBAAkB,GAAG,sBAAuB,CAAC,uBAAA,CAAA;QAC7C,iBAAiB,GAAC,mCAAqC,IAAG,CAAA,oBAAA,CAAA,QAAA,CAAA,QAAA,CAAA,WAAA,EAAA,CAAA,CAAA;wBAC1D,GAAA,uBAAA;AACA,EAAA,IAAA,iBAAa,CAAG,MAAA,KAAA,mBAAA,CAAA,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AAE;AAC9D,EAAA,OAAA;AACJ,IAAE,WAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default,{useState,useRef,useEffect}from'react';import {Link}from'@remix-run/react';import {useAppSelector}from'@admin-layout/client';import {generateMenuPath}from'../util.js';import {renderDynamicIcon}from'../../../helpers/DynamicIcon.js';import switchDialogs from'@app/dialog/WrappedDialogsSwitch';const DialogComponent = ({
|
|
2
2
|
path,
|
|
3
3
|
onClose
|
|
4
4
|
}) => {
|
|
@@ -10,11 +10,9 @@ import {jsxs,Fragment,jsx}from'react/jsx-runtime';import React__default,{useStat
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
}, []);
|
|
13
|
-
return dialog ?
|
|
13
|
+
return dialog ? React__default.createElement(dialog.default, {
|
|
14
14
|
onClose: onClose
|
|
15
|
-
}) :
|
|
16
|
-
children: "Loading..."
|
|
17
|
-
});
|
|
15
|
+
}) : React__default.createElement("div", null, "Loading...");
|
|
18
16
|
};
|
|
19
17
|
const BottomMenu = ({
|
|
20
18
|
menuData,
|
|
@@ -98,18 +96,16 @@ const BottomMenu = ({
|
|
|
98
96
|
name,
|
|
99
97
|
icon
|
|
100
98
|
} = item;
|
|
101
|
-
return
|
|
99
|
+
return React__default.createElement("button", {
|
|
102
100
|
onClick: () => {
|
|
103
101
|
setOpenedModalKey(key);
|
|
104
102
|
setIsOpen(false); // Close the dropdown when opening a modal
|
|
105
103
|
},
|
|
106
104
|
className: "flex items-center w-full px-3 py-2 text-left text-foreground hover:bg-muted",
|
|
107
|
-
role: "menuitem"
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}), t(name)]
|
|
112
|
-
});
|
|
105
|
+
role: "menuitem"
|
|
106
|
+
}, React__default.createElement("div", {
|
|
107
|
+
className: "mr-3"
|
|
108
|
+
}, renderDynamicIcon(icon)), t(name));
|
|
113
109
|
};
|
|
114
110
|
/**
|
|
115
111
|
* Judge whether it is http link.return or a Link
|
|
@@ -126,31 +122,26 @@ const BottomMenu = ({
|
|
|
126
122
|
} = item;
|
|
127
123
|
// Is it a http link
|
|
128
124
|
if (/^https?:\/\//.test(itemPath)) {
|
|
129
|
-
return
|
|
125
|
+
return React__default.createElement("a", {
|
|
130
126
|
href: itemPath,
|
|
131
127
|
target: target,
|
|
132
128
|
onClick: onClose,
|
|
133
129
|
className: "flex items-center w-full p-3 text-foreground hover:bg-muted",
|
|
134
|
-
role: "menuitem"
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
children: name
|
|
141
|
-
})]
|
|
142
|
-
});
|
|
130
|
+
role: "menuitem"
|
|
131
|
+
}, React__default.createElement("div", {
|
|
132
|
+
className: "mr-3"
|
|
133
|
+
}, renderDynamicIcon(icon), " "), React__default.createElement("span", {
|
|
134
|
+
className: "ml-1"
|
|
135
|
+
}, name));
|
|
143
136
|
}
|
|
144
|
-
return
|
|
137
|
+
return React__default.createElement(Link, {
|
|
145
138
|
to: itemPath,
|
|
146
139
|
onClick: onClose,
|
|
147
140
|
className: "flex items-center w-full px-3 py-2 text-left text-foreground hover:bg-muted",
|
|
148
|
-
role: "menuitem"
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}), name]
|
|
153
|
-
});
|
|
141
|
+
role: "menuitem"
|
|
142
|
+
}, React__default.createElement("div", {
|
|
143
|
+
className: "mr-3"
|
|
144
|
+
}, renderDynamicIcon(icon)), name);
|
|
154
145
|
};
|
|
155
146
|
const getMenuModals = () => {
|
|
156
147
|
let dialogMenus = [];
|
|
@@ -168,163 +159,136 @@ const BottomMenu = ({
|
|
|
168
159
|
key,
|
|
169
160
|
name
|
|
170
161
|
} = item;
|
|
171
|
-
return key === openedModalKey &&
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
onClose: () => {
|
|
228
|
-
onClose();
|
|
229
|
-
setOpenedModalKey(null);
|
|
230
|
-
}
|
|
231
|
-
})
|
|
232
|
-
})]
|
|
233
|
-
})
|
|
234
|
-
})]
|
|
235
|
-
})
|
|
236
|
-
}, k);
|
|
162
|
+
return key === openedModalKey && React__default.createElement("div", {
|
|
163
|
+
key: k,
|
|
164
|
+
className: "fixed inset-0 z-50 overflow-y-auto"
|
|
165
|
+
}, React__default.createElement("div", {
|
|
166
|
+
className: "flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"
|
|
167
|
+
}, React__default.createElement("div", {
|
|
168
|
+
className: "fixed inset-0 transition-opacity",
|
|
169
|
+
"aria-hidden": "true"
|
|
170
|
+
}, React__default.createElement("div", {
|
|
171
|
+
className: "absolute inset-0 bg-black bg-opacity-50",
|
|
172
|
+
onClick: () => {
|
|
173
|
+
onClose();
|
|
174
|
+
setOpenedModalKey(null);
|
|
175
|
+
}
|
|
176
|
+
})), React__default.createElement("span", {
|
|
177
|
+
className: "hidden sm:inline-block sm:align-middle sm:h-screen",
|
|
178
|
+
"aria-hidden": "true"
|
|
179
|
+
}, "\u200B"), React__default.createElement("div", {
|
|
180
|
+
className: "inline-block align-bottom rounded-themed-lg text-left overflow-hidden shadow-themed-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full themed-modal",
|
|
181
|
+
role: "dialog",
|
|
182
|
+
"aria-modal": "true",
|
|
183
|
+
"aria-labelledby": "modal-headline"
|
|
184
|
+
}, React__default.createElement("div", {
|
|
185
|
+
className: "px-4 pt-5 pb-4 sm:p-6 sm:pb-4"
|
|
186
|
+
}, React__default.createElement("div", {
|
|
187
|
+
className: "flex justify-end"
|
|
188
|
+
}, React__default.createElement("button", {
|
|
189
|
+
type: "button",
|
|
190
|
+
className: "rounded-themed text-muted-foreground hover:text-foreground focus-themed",
|
|
191
|
+
onClick: () => {
|
|
192
|
+
onClose();
|
|
193
|
+
setOpenedModalKey(null);
|
|
194
|
+
}
|
|
195
|
+
}, React__default.createElement("span", {
|
|
196
|
+
className: "sr-only"
|
|
197
|
+
}, "Close"), React__default.createElement("svg", {
|
|
198
|
+
className: "h-6 w-6",
|
|
199
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
200
|
+
fill: "none",
|
|
201
|
+
viewBox: "0 0 24 24",
|
|
202
|
+
stroke: "currentColor",
|
|
203
|
+
"aria-hidden": "true"
|
|
204
|
+
}, React__default.createElement("path", {
|
|
205
|
+
strokeLinecap: "round",
|
|
206
|
+
strokeLinejoin: "round",
|
|
207
|
+
strokeWidth: "2",
|
|
208
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
209
|
+
})))), React__default.createElement("div", {
|
|
210
|
+
className: "mt-2"
|
|
211
|
+
}, React__default.createElement(DialogComponent, {
|
|
212
|
+
path: dialogPath,
|
|
213
|
+
onClose: () => {
|
|
214
|
+
onClose();
|
|
215
|
+
setOpenedModalKey(null);
|
|
216
|
+
}
|
|
217
|
+
}))))));
|
|
237
218
|
});
|
|
238
219
|
};
|
|
239
|
-
return
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
className: `
|
|
220
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
221
|
+
className: "relative",
|
|
222
|
+
ref: menuRef,
|
|
223
|
+
onMouseEnter: onOpen
|
|
224
|
+
}, React__default.createElement("div", {
|
|
225
|
+
className: "flex items-center gap-2",
|
|
226
|
+
onClick: toggleMenu
|
|
227
|
+
}, React__default.createElement("button", {
|
|
228
|
+
className: `
|
|
249
229
|
inline-flex items-center justify-center bg-muted hover:bg-muted-foreground text-foreground rounded-full h-12 w-12 min-w-[48px] outline-none transform transition-colors duration-200
|
|
250
230
|
`,
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
className: "text-white text-sm font-medium",
|
|
315
|
-
children: (nickname || 'Guest').charAt(0).toUpperCase()
|
|
316
|
-
})
|
|
317
|
-
}), jsx("span", {
|
|
318
|
-
className: "text-sm font-medium",
|
|
319
|
-
children: nickname || 'Guest'
|
|
320
|
-
})]
|
|
321
|
-
}), logoutMenuItems?.length > 0 && jsx("hr", {
|
|
322
|
-
className: "border-border my-1"
|
|
323
|
-
}), logoutMenuItems?.map((item, k) => jsx("div", {
|
|
324
|
-
className: "px-1 py-1",
|
|
325
|
-
children: item.modal ? getMenuItemModal(item) : getMenuItemPath(item)
|
|
326
|
-
}, k))]
|
|
327
|
-
})]
|
|
328
|
-
}), getMenuModals()]
|
|
329
|
-
});
|
|
231
|
+
"aria-expanded": "false"
|
|
232
|
+
}, picture ? React__default.createElement("img", {
|
|
233
|
+
src: picture,
|
|
234
|
+
className: "rounded-full",
|
|
235
|
+
alt: "User"
|
|
236
|
+
}) : React__default.createElement("svg", {
|
|
237
|
+
className: "h-6 w-6 text-foreground",
|
|
238
|
+
fill: "none",
|
|
239
|
+
stroke: "currentColor",
|
|
240
|
+
viewBox: "0 0 24 24",
|
|
241
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
242
|
+
}, React__default.createElement("path", {
|
|
243
|
+
strokeLinecap: "round",
|
|
244
|
+
strokeLinejoin: "round",
|
|
245
|
+
strokeWidth: "2",
|
|
246
|
+
d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
|
|
247
|
+
}))), isMobile && React__default.createElement("span", {
|
|
248
|
+
className: "text-lg font-medium"
|
|
249
|
+
}, t(nickname))), isOpen && React__default.createElement("div", {
|
|
250
|
+
className: "bg-background absolute bottom-full mb-2 w-72 rounded-themed shadow-themed-lg py-1 themed-dropdown ring-1 ring-border focus:outline-none z-40",
|
|
251
|
+
role: "menu",
|
|
252
|
+
"aria-orientation": "vertical",
|
|
253
|
+
"aria-labelledby": "user-menu"
|
|
254
|
+
}, MenusList?.upperMenus?.map((item, k) => React__default.createElement("div", {
|
|
255
|
+
key: k,
|
|
256
|
+
className: "px-1 py-1"
|
|
257
|
+
}, item.modal ? getMenuItemModal(item) : getMenuItemPath(item))), MenusList?.upperMenus?.length > 0 && MenusList?.middleMenus?.length > 0 && React__default.createElement("hr", {
|
|
258
|
+
className: "border-border my-1"
|
|
259
|
+
}), MenusList?.middleMenus?.map((item, k) => React__default.createElement("div", {
|
|
260
|
+
key: k,
|
|
261
|
+
className: "px-1 py-1"
|
|
262
|
+
}, item.modal ? getMenuItemModal(item) : getMenuItemPath(item))), profile && accountMenuItems?.children && React__default.createElement("div", {
|
|
263
|
+
className: "py-2"
|
|
264
|
+
}, accountMenuItems.children.map(item => React__default.createElement(Link, {
|
|
265
|
+
key: item.key,
|
|
266
|
+
className: "flex items-center justify-between px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer transition-colors",
|
|
267
|
+
to: generateMenuPath(item.path, routeParams)
|
|
268
|
+
}, React__default.createElement("div", {
|
|
269
|
+
className: "flex items-center"
|
|
270
|
+
}, React__default.createElement("span", {
|
|
271
|
+
className: "mr-3 text-base"
|
|
272
|
+
}, item.icon), React__default.createElement("span", null, item.name)), item.hasNotification && React__default.createElement("div", {
|
|
273
|
+
className: "w-2 h-2 bg-blue-500 rounded-full"
|
|
274
|
+
})))), profile && React__default.createElement("hr", {
|
|
275
|
+
className: "border-border my-1"
|
|
276
|
+
}), profile && React__default.createElement("div", {
|
|
277
|
+
className: "flex items-center px-4 py-2"
|
|
278
|
+
}, React__default.createElement("div", {
|
|
279
|
+
className: "w-8 h-8 rounded-full bg-red-500 flex items-center justify-center overflow-hidden mr-3"
|
|
280
|
+
}, picture ? React__default.createElement("img", {
|
|
281
|
+
src: picture,
|
|
282
|
+
alt: nickname || 'Guest',
|
|
283
|
+
className: "w-full h-full object-cover"
|
|
284
|
+
}) : React__default.createElement("span", {
|
|
285
|
+
className: "text-white text-sm font-medium"
|
|
286
|
+
}, (nickname || 'Guest').charAt(0).toUpperCase())), React__default.createElement("span", {
|
|
287
|
+
className: "text-sm font-medium"
|
|
288
|
+
}, nickname || 'Guest')), logoutMenuItems?.length > 0 && React__default.createElement("hr", {
|
|
289
|
+
className: "border-border my-1"
|
|
290
|
+
}), logoutMenuItems?.map((item, k) => React__default.createElement("div", {
|
|
291
|
+
key: k,
|
|
292
|
+
className: "px-1 py-1"
|
|
293
|
+
}, item.modal ? getMenuItemModal(item) : getMenuItemPath(item))))), getMenuModals());
|
|
330
294
|
};export{BottomMenu};//# sourceMappingURL=BottomMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomMenu.js","sources":["../../../../src/components/Layout/Sidebar/BottomMenu.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"BottomMenu.js","sources":["../../../../src/components/Layout/Sidebar/BottomMenu.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"yTASA,MAAM,eAAe,GAAkB,CAAC;MACpC;;;eAIQ,EAAA,SAAc,IAAI,QAAQ,CAAA,IAAA,CAAA;kBACtB;AACJ,IAAA,IAAA,CAAA,MAAG,EAAA;mBACN,CAAA,IAAA,CAAA,CAAA,IAAA,CAAA,SAAA,IAAA;QACF,SAAI,CAAA,SAAA,CAAA;AAEP,MAAA,CAAA,CAAA;AACJ,IAAE;AAEF,EAAA,CAAA,EAAA,EAAO;SAUH,uBAAkB,CAAA,aAAa,CAAG,MAAA,CAAA,OAA+B,EAAA;IACjE,OAAO,EAAA;AACP,GAAA,CAAA,GAAAA,cAAO,CAAA,aAAc,CAAE,KAAA,EAAA,IAAA,EAAA,YAAqB,CAAK;AACjD,CAAA;AACQ,MAAC,UAAU,GAAC,CAAG;UACvB;AAEA,EAAA,WAAQ;mBACA;UAEF;UACA;aACA;AACN,EAAA,QAAM;AACN,EAAA;MAEA;QACA,CAAA,SAAa,EAAE,YAAA,CAAA,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WAAc,OAAC,CAAA,GAAA,WAAmB,CAAA;AAC9B,IAAA,IAAA,UAAA,EAAA,MAAA,GAAA,CAAA,EAAA,WAAA,GAAA,kBAAe,CAAC,GAAA,UAAA,CAAA;AAChB,IAAA,IAAA,WAAA,EAAA,MAAA,GAAA,CAAA,EAAA,WAAA,GAAA,WAAO,CAAA,MAAK,CAAA,GACV,WAAA,CAAA;AACL,IAAA,OAAA,WAAA,CAAA,GAAK,CAAA,CAAA,IAAA,EAAA,CAAA,KAAe;AAQpC,MAAA,MAAA;AAEA,QAAA,UAAA;;;;AAsBA,MAAA,OAAA,GAAA,KAAA,cAAiB,IAAKA,cAAM,CAAC,aAC1B,CAAA,KAAA,EAAA;QAOf,GAAA,EAAA,CAAA;AAGb,QAAE,SAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { DividerProps } from '../../typings';
|
|
2
|
-
export declare function Divider({ children, orientation, plain, className, style, align, ...props }: DividerProps):
|
|
3
|
+
export declare function Divider({ children, orientation, plain, className, style, align, ...props }: DividerProps): React.JSX.Element;
|
|
3
4
|
//# sourceMappingURL=Divider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Sidebar/Divider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Sidebar/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,wBAAgB,OAAO,CAAC,EACpB,QAAQ,EACR,WAA0B,EAC1B,KAAa,EACb,SAAS,EACT,KAAK,EACL,KAAgB,EAChB,GAAG,KAAK,EACX,EAAE,YAAY,qBAgEd"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from'react';import {cn}from'../../../utils/utils/index.js';function Divider({
|
|
2
2
|
children,
|
|
3
3
|
orientation = 'horizontal',
|
|
4
4
|
plain = false,
|
|
@@ -9,39 +9,37 @@ import {jsx,jsxs}from'react/jsx-runtime';import {cn}from'../../../utils/utils/in
|
|
|
9
9
|
}) {
|
|
10
10
|
// If there's no children, render a simple divider
|
|
11
11
|
if (!children) {
|
|
12
|
-
return
|
|
12
|
+
return React__default.createElement("div", {
|
|
13
13
|
className: cn(orientation === 'horizontal' ? 'w-full border-t' : 'h-full border-l', 'border-gray-200 dark:border-gray-700', className),
|
|
14
14
|
style: style,
|
|
15
15
|
...props
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
// With children, render a divider with text
|
|
19
|
-
return
|
|
19
|
+
return React__default.createElement("div", {
|
|
20
20
|
className: cn('flex items-center w-full', orientation === 'vertical' && 'flex-col h-full', className),
|
|
21
21
|
style: style,
|
|
22
|
-
...props
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
})]
|
|
46
|
-
});
|
|
22
|
+
...props
|
|
23
|
+
}, React__default.createElement("div", {
|
|
24
|
+
className: cn('border-gray-200 dark:border-gray-700', orientation === 'horizontal' ? 'border-t flex-grow' : 'border-l h-full', {
|
|
25
|
+
'flex-[30%]': align === 'left' && orientation === 'horizontal',
|
|
26
|
+
'flex-[70%]': align === 'right' && orientation === 'horizontal'
|
|
27
|
+
}),
|
|
28
|
+
style: {
|
|
29
|
+
borderColor: style?.borderColor
|
|
30
|
+
}
|
|
31
|
+
}), React__default.createElement("div", {
|
|
32
|
+
className: cn('px-4', orientation === 'vertical' && 'py-4', plain ? 'text-gray-500 font-normal' : 'text-gray-900 font-medium', 'dark:text-gray-300'),
|
|
33
|
+
style: {
|
|
34
|
+
color: style?.color
|
|
35
|
+
}
|
|
36
|
+
}, children), React__default.createElement("div", {
|
|
37
|
+
className: cn('border-gray-200 dark:border-gray-700', orientation === 'horizontal' ? 'border-t flex-grow' : 'border-l h-full', {
|
|
38
|
+
'flex-[70%]': align === 'left' && orientation === 'horizontal',
|
|
39
|
+
'flex-[30%]': align === 'right' && orientation === 'horizontal'
|
|
40
|
+
}),
|
|
41
|
+
style: {
|
|
42
|
+
borderColor: style?.borderColor
|
|
43
|
+
}
|
|
44
|
+
}));
|
|
47
45
|
}export{Divider};//# sourceMappingURL=Divider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.js","sources":["../../../../src/components/Layout/Sidebar/Divider.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"Divider.js","sources":["../../../../src/components/Layout/Sidebar/Divider.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"iFAIM,SAAU,OAAO,CAAC;UASpB;aACK,GAAA,YAAW;AACZ,EAAA,KAAA,GAAA,KAAO;WAWV;OAED;OACA,GAAA;AAMQ,EAAA,GAAA;AAKY,CAAA,EAAA;AACA;eAEP;yBAEG,CAAA,aAAa,CAAA,KAAO,EAAA;eACvB,EACH,EAAA,CAAA,WAAA,KAAA,YAAA,GAAA,iBAAA,GAAA,iBAAA,EAAA,sCAAA,EAAA,SAAA,CAAA;WACF,EAAA,KAAA;;AASK,KAAA,CAAA;AAIL,EAAA;AAKY;AACA,EAAA,OAAAA,cAAA,CAAA,aAAY,MAAE,EAAK;aACtB,EACJ,6BACM,EAAA,WAAA,KAAA,UAAA,IAAA,iBAAA,EAAA,SAAA,CAAA;gBACH;;AAKpB,GAAC,EAAAA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DynamicTypeIconsProps } from '../../typings';
|
|
3
|
-
export declare const renderDynamicIcon: (icon: any) =>
|
|
3
|
+
export declare const renderDynamicIcon: (icon: any) => React.JSX.Element;
|
|
4
4
|
export declare const DynamicIcon: React.FC<DynamicTypeIconsProps>;
|
|
5
5
|
//# sourceMappingURL=DynamicIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Sidebar/DynamicIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEtD,eAAO,MAAM,iBAAiB,GAAI,SAAI,
|
|
1
|
+
{"version":3,"file":"DynamicIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Sidebar/DynamicIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEtD,eAAO,MAAM,iBAAiB,GAAI,SAAI,sBAQrC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAuCvD,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default,{useState,useEffect}from'react';import selectiveIcons from'@app/selectiveIcons';const renderDynamicIcon = icon => {
|
|
2
2
|
if (typeof icon === 'object') {
|
|
3
|
-
return
|
|
3
|
+
return React__default.createElement(DynamicIcon, {
|
|
4
4
|
icon: icon.name,
|
|
5
5
|
iconStyle: icon.style
|
|
6
6
|
});
|
|
7
7
|
} else if (typeof icon === 'string') {
|
|
8
|
-
return
|
|
8
|
+
return React__default.createElement(DynamicIcon, {
|
|
9
9
|
icon: icon
|
|
10
10
|
});
|
|
11
11
|
} else {
|
|
@@ -36,16 +36,15 @@ const DynamicIcon = React__default.memo(({
|
|
|
36
36
|
loadIcon();
|
|
37
37
|
}, []);
|
|
38
38
|
if (!IconComponent) return null;
|
|
39
|
-
return
|
|
39
|
+
return React__default.createElement("div", {
|
|
40
40
|
style: {
|
|
41
41
|
margin: '0px',
|
|
42
42
|
display: 'flex'
|
|
43
|
+
}
|
|
44
|
+
}, IconComponent && React__default.createElement(IconComponent, {
|
|
45
|
+
style: {
|
|
46
|
+
...iconStyle
|
|
43
47
|
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
...iconStyle
|
|
47
|
-
},
|
|
48
|
-
...props
|
|
49
|
-
})
|
|
50
|
-
});
|
|
48
|
+
...props
|
|
49
|
+
}));
|
|
51
50
|
}, (prevProps, nextProps) => prevProps.icon === nextProps.icon);export{DynamicIcon,renderDynamicIcon};//# sourceMappingURL=DynamicIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicIcon.js","sources":["../../../../src/components/Layout/Sidebar/DynamicIcon.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"DynamicIcon.js","sources":["../../../../src/components/Layout/Sidebar/DynamicIcon.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"sGAKO,MAAM,iBAAiB,GAAG,IAAC,IAAM;AACpC,EAAA,IAAA,OAAI,IAAO,KAAI,QAAK,EAAQ;AACxB,IAAA,OAAAA,cAAO,CAAA,aAAA,CAAA,WAAC,EAAA;MACX,IAAA,EAAA,IAAA,CAAA,IAAA;AAAM,MAAA,SAAI,EAAA,IAAO,CAAA;AACd,KAAA,CAAA;SACH,IAAA,OAAA,IAAA,KAAA,QAAA,EAAA;WAAOA,cAAA,CAA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