@cyberskill/shared 1.209.0 → 1.211.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.
Files changed (358) hide show
  1. package/dist/config/commitlint/index.cjs +1 -0
  2. package/dist/config/config.type.cjs +1 -0
  3. package/dist/config/config.type.js +4 -0
  4. package/dist/config/config.util.cjs +1 -0
  5. package/dist/config/config.util.js +58 -0
  6. package/dist/config/env/env.constant.cjs +1 -0
  7. package/dist/config/env/env.util.cjs +1 -0
  8. package/dist/config/env/env.util.js +29 -0
  9. package/dist/config/env/index.cjs +1 -0
  10. package/dist/config/eslint/index.cjs +1 -0
  11. package/dist/config/eslint/index.js +26 -0
  12. package/dist/config/graphql-codegen/graphql-codegen.util.cjs +1 -0
  13. package/dist/config/graphql-codegen/graphql-codegen.util.js +42 -0
  14. package/dist/config/graphql-codegen/index.cjs +1 -0
  15. package/dist/config/index.cjs +1 -0
  16. package/dist/config/index.js +6 -0
  17. package/dist/config/lint-staged/index.cjs +1 -0
  18. package/dist/config/vitest/index.cjs +1 -0
  19. package/dist/config/vitest/vitest.e2e.cjs +1 -0
  20. package/dist/config/vitest/vitest.e2e.js +30 -0
  21. package/dist/config/vitest/vitest.unit.cjs +1 -0
  22. package/dist/config/vitest/vitest.unit.js +26 -0
  23. package/dist/constant/common.cjs +1 -0
  24. package/dist/constant/common.js +4 -0
  25. package/dist/constant/index.cjs +1 -0
  26. package/dist/constant/response-status.cjs +1 -0
  27. package/dist/node/apollo-server/apollo-server.util.cjs +1 -0
  28. package/dist/node/apollo-server/apollo-server.util.js +56 -0
  29. package/dist/node/apollo-server/index.cjs +1 -0
  30. package/dist/node/cli/index.cjs +6 -0
  31. package/dist/node/cli/index.js +160 -0
  32. package/dist/node/command/command.type.cjs +1 -0
  33. package/dist/node/command/command.type.js +4 -0
  34. package/dist/node/command/command.util.cjs +2 -0
  35. package/dist/node/command/command.util.js +175 -0
  36. package/dist/node/command/index.cjs +1 -0
  37. package/dist/node/command/index.js +11 -0
  38. package/dist/node/express/express.util.cjs +1 -0
  39. package/dist/node/express/express.util.js +81 -0
  40. package/dist/node/express/index.cjs +1 -0
  41. package/dist/node/fs/fs.util.cjs +1 -0
  42. package/dist/node/fs/fs.util.js +63 -0
  43. package/dist/node/fs/index.cjs +1 -0
  44. package/dist/node/log/index.cjs +1 -0
  45. package/dist/node/log/index.js +8 -0
  46. package/dist/node/log/log.type.cjs +1 -0
  47. package/dist/node/log/log.type.js +4 -0
  48. package/dist/node/log/log.util.cjs +1 -0
  49. package/dist/node/log/log.util.js +60 -0
  50. package/dist/node/mongo/index.cjs +1 -0
  51. package/dist/node/mongo/index.js +17 -0
  52. package/dist/node/mongo/mongo.constant.cjs +1 -0
  53. package/dist/node/mongo/mongo.type.cjs +1 -0
  54. package/dist/node/mongo/mongo.type.js +16 -0
  55. package/dist/node/mongo/mongo.util.cjs +5 -0
  56. package/dist/node/mongo/mongo.util.js +556 -0
  57. package/dist/node/package/index.cjs +1 -0
  58. package/dist/node/package/index.js +10 -0
  59. package/dist/node/package/package.type.cjs +1 -0
  60. package/dist/node/package/package.type.js +4 -0
  61. package/dist/node/package/package.util.cjs +1 -0
  62. package/dist/node/package/package.util.js +254 -0
  63. package/dist/node/path/index.cjs +1 -0
  64. package/dist/node/path/index.js +52 -0
  65. package/dist/node/path/path.constant.cjs +1 -0
  66. package/dist/node/path/path.constant.js +295 -0
  67. package/dist/node/path/path.util.cjs +1 -0
  68. package/dist/node/storage/index.cjs +1 -0
  69. package/dist/node/storage/storage.util.cjs +1 -0
  70. package/dist/node/storage/storage.util.js +81 -0
  71. package/dist/node/upload/index.cjs +1 -0
  72. package/dist/node/upload/index.js +7 -0
  73. package/dist/node/upload/upload.type.cjs +1 -0
  74. package/dist/node/upload/upload.type.js +4 -0
  75. package/dist/node/upload/upload.util.cjs +1 -0
  76. package/dist/node/upload/upload.util.js +154 -0
  77. package/dist/node/ws/index.cjs +1 -0
  78. package/dist/node/ws/ts.util.cjs +1 -0
  79. package/dist/node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.13_@vitest_browser@3.2.4_jiti@2.4.2_j_cac3da623d5688a51c0b1a2270e144db/node_modules/vitest/dist/config.cjs +1 -0
  80. package/dist/{config-CwzVfkkX.js → node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.13_@vitest_browser@3.2.4_jiti@2.4.2_j_cac3da623d5688a51c0b1a2270e144db/node_modules/vitest/dist/config.js} +1 -1
  81. package/dist/react/apollo-client/apollo-client.component.cjs +1 -0
  82. package/dist/{src/react → react}/apollo-client/apollo-client.component.js +9 -12
  83. package/dist/react/apollo-client/apollo-client.constant.cjs +1 -0
  84. package/dist/react/apollo-client/apollo-client.context.cjs +1 -0
  85. package/dist/{src/react → react}/apollo-client/apollo-client.context.js +2 -2
  86. package/dist/react/apollo-client/apollo-client.util.cjs +1 -0
  87. package/dist/react/apollo-client/apollo-client.util.js +111 -0
  88. package/dist/react/apollo-client/index.cjs +1 -0
  89. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.component.cjs +1 -0
  90. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.rsc.cjs +1 -0
  91. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.util.cjs +1 -0
  92. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.util.js +21 -0
  93. package/dist/react/apollo-client-nextjs/index.cjs +1 -0
  94. package/dist/react/apollo-error/apollo-error.component.cjs +1 -0
  95. package/dist/{src/react → react}/apollo-error/apollo-error.component.js +5 -12
  96. package/dist/react/apollo-error/apollo-error.context.cjs +1 -0
  97. package/dist/react/apollo-error/apollo-error.hook.cjs +1 -0
  98. package/dist/react/apollo-error/apollo-error.module.scss.cjs +1 -0
  99. package/dist/react/apollo-error/apollo-error.module.scss.js +11 -0
  100. package/dist/react/apollo-error/apollo-error.provider.cjs +1 -0
  101. package/dist/{src/react → react}/apollo-error/apollo-error.provider.js +2 -2
  102. package/dist/react/apollo-error/apollo-error.util.cjs +1 -0
  103. package/dist/{src/react → react}/apollo-error/apollo-error.util.js +1 -1
  104. package/dist/react/apollo-error/index.cjs +1 -0
  105. package/dist/react/i18next/i18next.hook.cjs +1 -0
  106. package/dist/react/i18next/i18next.util.cjs +1 -0
  107. package/dist/react/i18next/index.cjs +1 -0
  108. package/dist/react/loading/index.cjs +1 -0
  109. package/dist/react/loading/loading.component.cjs +6 -0
  110. package/dist/react/loading/loading.component.js +51 -0
  111. package/dist/react/loading/loading.context.cjs +1 -0
  112. package/dist/react/loading/loading.hook.cjs +1 -0
  113. package/dist/react/loading/loading.module.scss.cjs +1 -0
  114. package/dist/react/loading/loading.module.scss.js +15 -0
  115. package/dist/react/loading/loading.provider.cjs +1 -0
  116. package/dist/react/loading/loading.provider.js +17 -0
  117. package/dist/react/log/index.cjs +1 -0
  118. package/dist/react/log/log.util.cjs +1 -0
  119. package/dist/{src/react → react}/log/log.util.js +4 -4
  120. package/dist/react/next-intl/index.cjs +1 -0
  121. package/dist/react/next-intl/next-intl.constant.cjs +1 -0
  122. package/dist/react/next-intl/next-intl.context.cjs +1 -0
  123. package/dist/react/next-intl/next-intl.hoc.cjs +1 -0
  124. package/dist/react/next-intl/next-intl.hoc.js +32 -0
  125. package/dist/react/next-intl/next-intl.hook.cjs +1 -0
  126. package/dist/react/next-intl/next-intl.provider.cjs +1 -0
  127. package/dist/react/next-intl/next-intl.provider.js +23 -0
  128. package/dist/react/storage/index.cjs +1 -0
  129. package/dist/react/storage/storage.hook.cjs +1 -0
  130. package/dist/react/storage/storage.hook.js +77 -0
  131. package/dist/react/storage/storage.util.cjs +1 -0
  132. package/dist/react/storage/storage.util.js +60 -0
  133. package/dist/react/toast/index.cjs +1 -0
  134. package/dist/react/userback/index.cjs +1 -0
  135. package/dist/react/userback/userback.component.cjs +1 -0
  136. package/dist/react/userback/userback.component.js +51 -0
  137. package/dist/style.css +1 -1
  138. package/dist/typescript/common.type.cjs +1 -0
  139. package/dist/typescript/index.cjs +1 -0
  140. package/dist/typescript/index.js +4 -0
  141. package/dist/util/common/common.util.cjs +1 -0
  142. package/dist/util/common/common.util.js +56 -0
  143. package/dist/util/common/index.cjs +1 -0
  144. package/dist/util/index.cjs +1 -0
  145. package/dist/util/object/index.cjs +1 -0
  146. package/dist/util/object/object.util.cjs +1 -0
  147. package/dist/util/object/object.util.js +73 -0
  148. package/dist/util/serializer/index.cjs +1 -0
  149. package/dist/util/serializer/serializer.util.cjs +1 -0
  150. package/dist/util/string/index.cjs +1 -0
  151. package/dist/util/string/string.util.cjs +1 -0
  152. package/dist/util/string/string.util.js +61 -0
  153. package/dist/util/validate/index.cjs +1 -0
  154. package/dist/util/validate/validate.util.cjs +1 -0
  155. package/package.json +103 -69
  156. package/dist/index-BG1UznTl.js +0 -628
  157. package/dist/magic-string.es-BQ9KnLz-.js +0 -659
  158. package/dist/src/config/config.util.js +0 -50
  159. package/dist/src/config/env/env.util.js +0 -29
  160. package/dist/src/config/eslint/index.js +0 -18
  161. package/dist/src/config/graphql-codegen/graphql-codegen.util.js +0 -37
  162. package/dist/src/config/index.js +0 -5
  163. package/dist/src/config/vitest/vitest.e2e.js +0 -23
  164. package/dist/src/config/vitest/vitest.unit.js +0 -19
  165. package/dist/src/config/vitest/vitest.unit.setup.js +0 -30990
  166. package/dist/src/constant/common.js +0 -4
  167. package/dist/src/node/apollo-server/apollo-server.util.js +0 -31
  168. package/dist/src/node/cli/index.js +0 -108
  169. package/dist/src/node/command/command.util.js +0 -16
  170. package/dist/src/node/command/index.js +0 -10
  171. package/dist/src/node/express/express.util.js +0 -50
  172. package/dist/src/node/fs/fs.util.js +0 -48
  173. package/dist/src/node/log/index.js +0 -8
  174. package/dist/src/node/log/log.util.js +0 -59
  175. package/dist/src/node/mongo/index.js +0 -26
  176. package/dist/src/node/mongo/mongo.util.js +0 -488
  177. package/dist/src/node/package/index.js +0 -9
  178. package/dist/src/node/package/package.util.js +0 -13
  179. package/dist/src/node/path/index.js +0 -52
  180. package/dist/src/node/path/path.constant.js +0 -49
  181. package/dist/src/node/storage/storage.util.js +0 -51
  182. package/dist/src/node/upload/index.js +0 -6
  183. package/dist/src/node/upload/upload.util.js +0 -127
  184. package/dist/src/react/apollo-client/apollo-client.hook.js +0 -11
  185. package/dist/src/react/apollo-client/apollo-client.util.js +0 -101
  186. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.util.js +0 -14
  187. package/dist/src/react/loading/loading.component.js +0 -40
  188. package/dist/src/react/loading/loading.provider.js +0 -17
  189. package/dist/src/react/next-intl/next-intl.hoc.js +0 -23
  190. package/dist/src/react/next-intl/next-intl.provider.js +0 -24
  191. package/dist/src/react/storage/storage.hook.js +0 -61
  192. package/dist/src/react/storage/storage.util.js +0 -35
  193. package/dist/src/react/userback/userback.component.js +0 -27
  194. package/dist/src/typescript/style.d.js +0 -1
  195. package/dist/src/util/common/common.util.js +0 -48
  196. package/dist/src/util/object/object.util.js +0 -67
  197. package/dist/src/util/string/string.util.js +0 -51
  198. /package/dist/{src/config → config}/commitlint/index.d.ts +0 -0
  199. /package/dist/{src/config → config}/commitlint/index.js +0 -0
  200. /package/dist/{src/config → config}/config.type.d.ts +0 -0
  201. /package/dist/{src/config → config}/config.util.d.ts +0 -0
  202. /package/dist/{src/config → config}/env/env.constant.d.ts +0 -0
  203. /package/dist/{src/config → config}/env/env.constant.js +0 -0
  204. /package/dist/{src/config → config}/env/env.type.d.ts +0 -0
  205. /package/dist/{src/config → config}/env/env.util.d.ts +0 -0
  206. /package/dist/{src/config → config}/env/index.d.ts +0 -0
  207. /package/dist/{src/config → config}/env/index.js +0 -0
  208. /package/dist/{src/config → config}/eslint/index.d.ts +0 -0
  209. /package/dist/{src/config → config}/graphql-codegen/graphql-codegen.type.d.ts +0 -0
  210. /package/dist/{src/config → config}/graphql-codegen/graphql-codegen.util.d.ts +0 -0
  211. /package/dist/{src/config → config}/graphql-codegen/index.d.ts +0 -0
  212. /package/dist/{src/config → config}/graphql-codegen/index.js +0 -0
  213. /package/dist/{src/config → config}/index.d.ts +0 -0
  214. /package/dist/{src/config → config}/lint-staged/index.d.ts +0 -0
  215. /package/dist/{src/config → config}/lint-staged/index.js +0 -0
  216. /package/dist/{src/config → config}/vitest/index.d.ts +0 -0
  217. /package/dist/{src/config → config}/vitest/index.js +0 -0
  218. /package/dist/{src/config → config}/vitest/vitest.e2e.d.ts +0 -0
  219. /package/dist/{src/config → config}/vitest/vitest.unit.d.ts +0 -0
  220. /package/dist/{src/constant → constant}/common.d.ts +0 -0
  221. /package/dist/{src/constant → constant}/index.d.ts +0 -0
  222. /package/dist/{src/constant → constant}/index.js +0 -0
  223. /package/dist/{src/constant → constant}/response-status.d.ts +0 -0
  224. /package/dist/{src/constant → constant}/response-status.js +0 -0
  225. /package/dist/{src/node → node}/apollo-server/apollo-server.type.d.ts +0 -0
  226. /package/dist/{src/node → node}/apollo-server/apollo-server.util.d.ts +0 -0
  227. /package/dist/{src/node → node}/apollo-server/index.d.ts +0 -0
  228. /package/dist/{src/node → node}/apollo-server/index.js +0 -0
  229. /package/dist/{src/node → node}/cli/index.d.ts +0 -0
  230. /package/dist/{src/node → node}/command/command.type.d.ts +0 -0
  231. /package/dist/{src/node → node}/command/command.util.d.ts +0 -0
  232. /package/dist/{src/node → node}/command/index.d.ts +0 -0
  233. /package/dist/{src/node → node}/express/express.type.d.ts +0 -0
  234. /package/dist/{src/node → node}/express/express.util.d.ts +0 -0
  235. /package/dist/{src/node → node}/express/index.d.ts +0 -0
  236. /package/dist/{src/node → node}/express/index.js +0 -0
  237. /package/dist/{src/node → node}/fs/fs.type.d.ts +0 -0
  238. /package/dist/{src/node → node}/fs/fs.util.d.ts +0 -0
  239. /package/dist/{src/node → node}/fs/index.d.ts +0 -0
  240. /package/dist/{src/node → node}/fs/index.js +0 -0
  241. /package/dist/{src/node → node}/log/index.d.ts +0 -0
  242. /package/dist/{src/node → node}/log/log.type.d.ts +0 -0
  243. /package/dist/{src/node → node}/log/log.util.d.ts +0 -0
  244. /package/dist/{src/node → node}/mongo/index.d.ts +0 -0
  245. /package/dist/{src/node → node}/mongo/mongo.constant.d.ts +0 -0
  246. /package/dist/{src/node → node}/mongo/mongo.constant.js +0 -0
  247. /package/dist/{src/node → node}/mongo/mongo.type.d.ts +0 -0
  248. /package/dist/{src/node → node}/mongo/mongo.util.d.ts +0 -0
  249. /package/dist/{src/node → node}/package/index.d.ts +0 -0
  250. /package/dist/{src/node → node}/package/package.type.d.ts +0 -0
  251. /package/dist/{src/node → node}/package/package.util.d.ts +0 -0
  252. /package/dist/{src/node → node}/path/index.d.ts +0 -0
  253. /package/dist/{src/node → node}/path/path.constant.d.ts +0 -0
  254. /package/dist/{src/node → node}/path/path.util.d.ts +0 -0
  255. /package/dist/{src/node → node}/path/path.util.js +0 -0
  256. /package/dist/{src/node → node}/storage/index.d.ts +0 -0
  257. /package/dist/{src/node → node}/storage/index.js +0 -0
  258. /package/dist/{src/node → node}/storage/storage.util.d.ts +0 -0
  259. /package/dist/{src/node → node}/upload/index.d.ts +0 -0
  260. /package/dist/{src/node → node}/upload/upload.type.d.ts +0 -0
  261. /package/dist/{src/node → node}/upload/upload.util.d.ts +0 -0
  262. /package/dist/{src/node → node}/ws/index.d.ts +0 -0
  263. /package/dist/{src/node → node}/ws/index.js +0 -0
  264. /package/dist/{src/node → node}/ws/ts.util.d.ts +0 -0
  265. /package/dist/{src/node → node}/ws/ts.util.js +0 -0
  266. /package/dist/{src/node → node}/ws/ws.type.d.ts +0 -0
  267. /package/dist/{src/react → react}/apollo-client/apollo-client.component.d.ts +0 -0
  268. /package/dist/{src/react → react}/apollo-client/apollo-client.constant.d.ts +0 -0
  269. /package/dist/{src/react → react}/apollo-client/apollo-client.constant.js +0 -0
  270. /package/dist/{src/react → react}/apollo-client/apollo-client.context.d.ts +0 -0
  271. /package/dist/{src/react → react}/apollo-client/apollo-client.hook.d.ts +0 -0
  272. /package/dist/{src/react → react}/apollo-client/apollo-client.type.d.ts +0 -0
  273. /package/dist/{src/react → react}/apollo-client/apollo-client.util.d.ts +0 -0
  274. /package/dist/{src/react → react}/apollo-client/index.d.ts +0 -0
  275. /package/dist/{src/react → react}/apollo-client/index.js +0 -0
  276. /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.component.d.ts +0 -0
  277. /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.component.js +0 -0
  278. /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.rsc.d.ts +0 -0
  279. /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.rsc.js +0 -0
  280. /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.util.d.ts +0 -0
  281. /package/dist/{src/react → react}/apollo-client-nextjs/index.d.ts +0 -0
  282. /package/dist/{src/react → react}/apollo-client-nextjs/index.js +0 -0
  283. /package/dist/{src/react → react}/apollo-error/apollo-error.component.d.ts +0 -0
  284. /package/dist/{src/react → react}/apollo-error/apollo-error.context.d.ts +0 -0
  285. /package/dist/{src/react → react}/apollo-error/apollo-error.context.js +0 -0
  286. /package/dist/{src/react → react}/apollo-error/apollo-error.hook.d.ts +0 -0
  287. /package/dist/{src/react → react}/apollo-error/apollo-error.hook.js +0 -0
  288. /package/dist/{src/react → react}/apollo-error/apollo-error.provider.d.ts +0 -0
  289. /package/dist/{src/react → react}/apollo-error/apollo-error.type.d.ts +0 -0
  290. /package/dist/{src/react → react}/apollo-error/apollo-error.util.d.ts +0 -0
  291. /package/dist/{src/react → react}/apollo-error/index.d.ts +0 -0
  292. /package/dist/{src/react → react}/apollo-error/index.js +0 -0
  293. /package/dist/{src/react → react}/i18next/i18next.hook.d.ts +0 -0
  294. /package/dist/{src/react → react}/i18next/i18next.hook.js +0 -0
  295. /package/dist/{src/react → react}/i18next/i18next.util.d.ts +0 -0
  296. /package/dist/{src/react → react}/i18next/i18next.util.js +0 -0
  297. /package/dist/{src/react → react}/i18next/index.d.ts +0 -0
  298. /package/dist/{src/react → react}/i18next/index.js +0 -0
  299. /package/dist/{src/react → react}/loading/index.d.ts +0 -0
  300. /package/dist/{src/react → react}/loading/index.js +0 -0
  301. /package/dist/{src/react → react}/loading/loading.component.d.ts +0 -0
  302. /package/dist/{src/react → react}/loading/loading.context.d.ts +0 -0
  303. /package/dist/{src/react → react}/loading/loading.context.js +0 -0
  304. /package/dist/{src/react → react}/loading/loading.hook.d.ts +0 -0
  305. /package/dist/{src/react → react}/loading/loading.hook.js +0 -0
  306. /package/dist/{src/react → react}/loading/loading.provider.d.ts +0 -0
  307. /package/dist/{src/react → react}/loading/loading.type.d.ts +0 -0
  308. /package/dist/{src/react → react}/log/index.d.ts +0 -0
  309. /package/dist/{src/react → react}/log/index.js +0 -0
  310. /package/dist/{src/react → react}/log/log.type.d.ts +0 -0
  311. /package/dist/{src/react → react}/log/log.util.d.ts +0 -0
  312. /package/dist/{src/react → react}/next-intl/index.d.ts +0 -0
  313. /package/dist/{src/react → react}/next-intl/index.js +0 -0
  314. /package/dist/{src/react → react}/next-intl/next-intl.constant.d.ts +0 -0
  315. /package/dist/{src/react → react}/next-intl/next-intl.constant.js +0 -0
  316. /package/dist/{src/react → react}/next-intl/next-intl.context.d.ts +0 -0
  317. /package/dist/{src/react → react}/next-intl/next-intl.context.js +0 -0
  318. /package/dist/{src/react → react}/next-intl/next-intl.hoc.d.ts +0 -0
  319. /package/dist/{src/react → react}/next-intl/next-intl.hook.d.ts +0 -0
  320. /package/dist/{src/react → react}/next-intl/next-intl.hook.js +0 -0
  321. /package/dist/{src/react → react}/next-intl/next-intl.provider.d.ts +0 -0
  322. /package/dist/{src/react → react}/next-intl/next-intl.type.d.ts +0 -0
  323. /package/dist/{src/react → react}/storage/index.d.ts +0 -0
  324. /package/dist/{src/react → react}/storage/index.js +0 -0
  325. /package/dist/{src/react → react}/storage/storage.hook.d.ts +0 -0
  326. /package/dist/{src/react → react}/storage/storage.util.d.ts +0 -0
  327. /package/dist/{src/react → react}/toast/index.d.ts +0 -0
  328. /package/dist/{src/react → react}/toast/index.js +0 -0
  329. /package/dist/{src/react → react}/userback/index.d.ts +0 -0
  330. /package/dist/{src/react → react}/userback/index.js +0 -0
  331. /package/dist/{src/react → react}/userback/userback.component.d.ts +0 -0
  332. /package/dist/{src/react → react}/userback/userback.type.d.ts +0 -0
  333. /package/dist/{src/typescript → typescript}/common.type.d.ts +0 -0
  334. /package/dist/{src/typescript/index.js → typescript/common.type.js} +0 -0
  335. /package/dist/{src/typescript → typescript}/index.d.ts +0 -0
  336. /package/dist/{src/typescript → typescript}/react.type.d.ts +0 -0
  337. /package/dist/{src/util → util}/common/common.type.d.ts +0 -0
  338. /package/dist/{src/util → util}/common/common.util.d.ts +0 -0
  339. /package/dist/{src/util → util}/common/index.d.ts +0 -0
  340. /package/dist/{src/util → util}/common/index.js +0 -0
  341. /package/dist/{src/util → util}/index.d.ts +0 -0
  342. /package/dist/{src/util → util}/index.js +0 -0
  343. /package/dist/{src/util → util}/object/index.d.ts +0 -0
  344. /package/dist/{src/util → util}/object/index.js +0 -0
  345. /package/dist/{src/util → util}/object/object.util.d.ts +0 -0
  346. /package/dist/{src/util → util}/serializer/index.d.ts +0 -0
  347. /package/dist/{src/util → util}/serializer/index.js +0 -0
  348. /package/dist/{src/util → util}/serializer/serializer.type.d.ts +0 -0
  349. /package/dist/{src/util → util}/serializer/serializer.util.d.ts +0 -0
  350. /package/dist/{src/util → util}/serializer/serializer.util.js +0 -0
  351. /package/dist/{src/util → util}/string/index.d.ts +0 -0
  352. /package/dist/{src/util → util}/string/index.js +0 -0
  353. /package/dist/{src/util → util}/string/string.type.d.ts +0 -0
  354. /package/dist/{src/util → util}/string/string.util.d.ts +0 -0
  355. /package/dist/{src/util → util}/validate/index.d.ts +0 -0
  356. /package/dist/{src/util → util}/validate/index.js +0 -0
  357. /package/dist/{src/util → util}/validate/validate.util.d.ts +0 -0
  358. /package/dist/{src/util → util}/validate/validate.util.js +0 -0
@@ -1,659 +0,0 @@
1
- var x = 44, E = 59, m = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", S = new Uint8Array(64), k = new Uint8Array(128);
2
- for (let u = 0; u < m.length; u++) {
3
- const t = m.charCodeAt(u);
4
- S[u] = t, k[t] = u;
5
- }
6
- function c(u, t, e) {
7
- let i = t - e;
8
- i = i < 0 ? -i << 1 | 1 : i << 1;
9
- do {
10
- let n = i & 31;
11
- i >>>= 5, i > 0 && (n |= 32), u.write(S[n]);
12
- } while (i > 0);
13
- return t;
14
- }
15
- var b = 1024 * 16, C = typeof TextDecoder < "u" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer < "u" ? {
16
- decode(u) {
17
- return Buffer.from(u.buffer, u.byteOffset, u.byteLength).toString();
18
- }
19
- } : {
20
- decode(u) {
21
- let t = "";
22
- for (let e = 0; e < u.length; e++)
23
- t += String.fromCharCode(u[e]);
24
- return t;
25
- }
26
- }, L = class {
27
- constructor() {
28
- this.pos = 0, this.out = "", this.buffer = new Uint8Array(b);
29
- }
30
- write(u) {
31
- const { buffer: t } = this;
32
- t[this.pos++] = u, this.pos === b && (this.out += C.decode(t), this.pos = 0);
33
- }
34
- flush() {
35
- const { buffer: u, out: t, pos: e } = this;
36
- return e > 0 ? t + C.decode(u.subarray(0, e)) : t;
37
- }
38
- };
39
- function R(u) {
40
- const t = new L();
41
- let e = 0, i = 0, n = 0, r = 0;
42
- for (let s = 0; s < u.length; s++) {
43
- const h = u[s];
44
- if (s > 0 && t.write(E), h.length === 0) continue;
45
- let o = 0;
46
- for (let l = 0; l < h.length; l++) {
47
- const a = h[l];
48
- l > 0 && t.write(x), o = c(t, a[0], o), a.length !== 1 && (e = c(t, a[1], e), i = c(t, a[2], i), n = c(t, a[3], n), a.length !== 4 && (r = c(t, a[4], r)));
49
- }
50
- }
51
- return t.flush();
52
- }
53
- class p {
54
- constructor(t) {
55
- this.bits = t instanceof p ? t.bits.slice() : [];
56
- }
57
- add(t) {
58
- this.bits[t >> 5] |= 1 << (t & 31);
59
- }
60
- has(t) {
61
- return !!(this.bits[t >> 5] & 1 << (t & 31));
62
- }
63
- }
64
- class g {
65
- constructor(t, e, i) {
66
- this.start = t, this.end = e, this.original = i, this.intro = "", this.outro = "", this.content = i, this.storeName = !1, this.edited = !1, this.previous = null, this.next = null;
67
- }
68
- appendLeft(t) {
69
- this.outro += t;
70
- }
71
- appendRight(t) {
72
- this.intro = this.intro + t;
73
- }
74
- clone() {
75
- const t = new g(this.start, this.end, this.original);
76
- return t.intro = this.intro, t.outro = this.outro, t.content = this.content, t.storeName = this.storeName, t.edited = this.edited, t;
77
- }
78
- contains(t) {
79
- return this.start < t && t < this.end;
80
- }
81
- eachNext(t) {
82
- let e = this;
83
- for (; e; )
84
- t(e), e = e.next;
85
- }
86
- eachPrevious(t) {
87
- let e = this;
88
- for (; e; )
89
- t(e), e = e.previous;
90
- }
91
- edit(t, e, i) {
92
- return this.content = t, i || (this.intro = "", this.outro = ""), this.storeName = e, this.edited = !0, this;
93
- }
94
- prependLeft(t) {
95
- this.outro = t + this.outro;
96
- }
97
- prependRight(t) {
98
- this.intro = t + this.intro;
99
- }
100
- reset() {
101
- this.intro = "", this.outro = "", this.edited && (this.content = this.original, this.storeName = !1, this.edited = !1);
102
- }
103
- split(t) {
104
- const e = t - this.start, i = this.original.slice(0, e), n = this.original.slice(e);
105
- this.original = i;
106
- const r = new g(t, this.end, n);
107
- return r.outro = this.outro, this.outro = "", this.end = t, this.edited ? (r.edit("", !1), this.content = "") : this.content = i, r.next = this.next, r.next && (r.next.previous = r), r.previous = this, this.next = r, r;
108
- }
109
- toString() {
110
- return this.intro + this.content + this.outro;
111
- }
112
- trimEnd(t) {
113
- if (this.outro = this.outro.replace(t, ""), this.outro.length) return !0;
114
- const e = this.content.replace(t, "");
115
- if (e.length)
116
- return e !== this.content && (this.split(this.start + e.length).edit("", void 0, !0), this.edited && this.edit(e, this.storeName, !0)), !0;
117
- if (this.edit("", void 0, !0), this.intro = this.intro.replace(t, ""), this.intro.length) return !0;
118
- }
119
- trimStart(t) {
120
- if (this.intro = this.intro.replace(t, ""), this.intro.length) return !0;
121
- const e = this.content.replace(t, "");
122
- if (e.length) {
123
- if (e !== this.content) {
124
- const i = this.split(this.end - e.length);
125
- this.edited && i.edit(e, this.storeName, !0), this.edit("", void 0, !0);
126
- }
127
- return !0;
128
- } else if (this.edit("", void 0, !0), this.outro = this.outro.replace(t, ""), this.outro.length) return !0;
129
- }
130
- }
131
- function _() {
132
- return typeof globalThis < "u" && typeof globalThis.btoa == "function" ? (u) => globalThis.btoa(unescape(encodeURIComponent(u))) : typeof Buffer == "function" ? (u) => Buffer.from(u, "utf-8").toString("base64") : () => {
133
- throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.");
134
- };
135
- }
136
- const O = /* @__PURE__ */ _();
137
- class N {
138
- constructor(t) {
139
- this.version = 3, this.file = t.file, this.sources = t.sources, this.sourcesContent = t.sourcesContent, this.names = t.names, this.mappings = R(t.mappings), typeof t.x_google_ignoreList < "u" && (this.x_google_ignoreList = t.x_google_ignoreList), typeof t.debugId < "u" && (this.debugId = t.debugId);
140
- }
141
- toString() {
142
- return JSON.stringify(this);
143
- }
144
- toUrl() {
145
- return "data:application/json;charset=utf-8;base64," + O(this.toString());
146
- }
147
- }
148
- function I(u) {
149
- const t = u.split(`
150
- `), e = t.filter((r) => /^\t+/.test(r)), i = t.filter((r) => /^ {2,}/.test(r));
151
- if (e.length === 0 && i.length === 0)
152
- return null;
153
- if (e.length >= i.length)
154
- return " ";
155
- const n = i.reduce((r, s) => {
156
- const h = /^ +/.exec(s)[0].length;
157
- return Math.min(h, r);
158
- }, 1 / 0);
159
- return new Array(n + 1).join(" ");
160
- }
161
- function A(u, t) {
162
- const e = u.split(/[/\\]/), i = t.split(/[/\\]/);
163
- for (e.pop(); e[0] === i[0]; )
164
- e.shift(), i.shift();
165
- if (e.length) {
166
- let n = e.length;
167
- for (; n--; ) e[n] = "..";
168
- }
169
- return e.concat(i).join("/");
170
- }
171
- const T = Object.prototype.toString;
172
- function j(u) {
173
- return T.call(u) === "[object Object]";
174
- }
175
- function y(u) {
176
- const t = u.split(`
177
- `), e = [];
178
- for (let i = 0, n = 0; i < t.length; i++)
179
- e.push(n), n += t[i].length + 1;
180
- return function(n) {
181
- let r = 0, s = e.length;
182
- for (; r < s; ) {
183
- const l = r + s >> 1;
184
- n < e[l] ? s = l : r = l + 1;
185
- }
186
- const h = r - 1, o = n - e[h];
187
- return { line: h, column: o };
188
- };
189
- }
190
- const $ = /\w/;
191
- class U {
192
- constructor(t) {
193
- this.hires = t, this.generatedCodeLine = 0, this.generatedCodeColumn = 0, this.raw = [], this.rawSegments = this.raw[this.generatedCodeLine] = [], this.pending = null;
194
- }
195
- addEdit(t, e, i, n) {
196
- if (e.length) {
197
- const r = e.length - 1;
198
- let s = e.indexOf(`
199
- `, 0), h = -1;
200
- for (; s >= 0 && r > s; ) {
201
- const l = [this.generatedCodeColumn, t, i.line, i.column];
202
- n >= 0 && l.push(n), this.rawSegments.push(l), this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, h = s, s = e.indexOf(`
203
- `, s + 1);
204
- }
205
- const o = [this.generatedCodeColumn, t, i.line, i.column];
206
- n >= 0 && o.push(n), this.rawSegments.push(o), this.advance(e.slice(h + 1));
207
- } else this.pending && (this.rawSegments.push(this.pending), this.advance(e));
208
- this.pending = null;
209
- }
210
- addUneditedChunk(t, e, i, n, r) {
211
- let s = e.start, h = !0, o = !1;
212
- for (; s < e.end; ) {
213
- if (i[s] === `
214
- `)
215
- n.line += 1, n.column = 0, this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, h = !0, o = !1;
216
- else {
217
- if (this.hires || h || r.has(s)) {
218
- const l = [this.generatedCodeColumn, t, n.line, n.column];
219
- this.hires === "boundary" ? $.test(i[s]) ? o || (this.rawSegments.push(l), o = !0) : (this.rawSegments.push(l), o = !1) : this.rawSegments.push(l);
220
- }
221
- n.column += 1, this.generatedCodeColumn += 1, h = !1;
222
- }
223
- s += 1;
224
- }
225
- this.pending = null;
226
- }
227
- advance(t) {
228
- if (!t) return;
229
- const e = t.split(`
230
- `);
231
- if (e.length > 1) {
232
- for (let i = 0; i < e.length - 1; i++)
233
- this.generatedCodeLine++, this.raw[this.generatedCodeLine] = this.rawSegments = [];
234
- this.generatedCodeColumn = 0;
235
- }
236
- this.generatedCodeColumn += e[e.length - 1].length;
237
- }
238
- }
239
- const d = `
240
- `, f = {
241
- insertLeft: !1,
242
- insertRight: !1,
243
- storeName: !1
244
- };
245
- class v {
246
- constructor(t, e = {}) {
247
- const i = new g(0, t.length, t);
248
- Object.defineProperties(this, {
249
- original: { writable: !0, value: t },
250
- outro: { writable: !0, value: "" },
251
- intro: { writable: !0, value: "" },
252
- firstChunk: { writable: !0, value: i },
253
- lastChunk: { writable: !0, value: i },
254
- lastSearchedChunk: { writable: !0, value: i },
255
- byStart: { writable: !0, value: {} },
256
- byEnd: { writable: !0, value: {} },
257
- filename: { writable: !0, value: e.filename },
258
- indentExclusionRanges: { writable: !0, value: e.indentExclusionRanges },
259
- sourcemapLocations: { writable: !0, value: new p() },
260
- storedNames: { writable: !0, value: {} },
261
- indentStr: { writable: !0, value: void 0 },
262
- ignoreList: { writable: !0, value: e.ignoreList },
263
- offset: { writable: !0, value: e.offset || 0 }
264
- }), this.byStart[0] = i, this.byEnd[t.length] = i;
265
- }
266
- addSourcemapLocation(t) {
267
- this.sourcemapLocations.add(t);
268
- }
269
- append(t) {
270
- if (typeof t != "string") throw new TypeError("outro content must be a string");
271
- return this.outro += t, this;
272
- }
273
- appendLeft(t, e) {
274
- if (t = t + this.offset, typeof e != "string") throw new TypeError("inserted content must be a string");
275
- this._split(t);
276
- const i = this.byEnd[t];
277
- return i ? i.appendLeft(e) : this.intro += e, this;
278
- }
279
- appendRight(t, e) {
280
- if (t = t + this.offset, typeof e != "string") throw new TypeError("inserted content must be a string");
281
- this._split(t);
282
- const i = this.byStart[t];
283
- return i ? i.appendRight(e) : this.outro += e, this;
284
- }
285
- clone() {
286
- const t = new v(this.original, { filename: this.filename, offset: this.offset });
287
- let e = this.firstChunk, i = t.firstChunk = t.lastSearchedChunk = e.clone();
288
- for (; e; ) {
289
- t.byStart[i.start] = i, t.byEnd[i.end] = i;
290
- const n = e.next, r = n && n.clone();
291
- r && (i.next = r, r.previous = i, i = r), e = n;
292
- }
293
- return t.lastChunk = i, this.indentExclusionRanges && (t.indentExclusionRanges = this.indentExclusionRanges.slice()), t.sourcemapLocations = new p(this.sourcemapLocations), t.intro = this.intro, t.outro = this.outro, t;
294
- }
295
- generateDecodedMap(t) {
296
- t = t || {};
297
- const e = 0, i = Object.keys(this.storedNames), n = new U(t.hires), r = y(this.original);
298
- return this.intro && n.advance(this.intro), this.firstChunk.eachNext((s) => {
299
- const h = r(s.start);
300
- s.intro.length && n.advance(s.intro), s.edited ? n.addEdit(
301
- e,
302
- s.content,
303
- h,
304
- s.storeName ? i.indexOf(s.original) : -1
305
- ) : n.addUneditedChunk(e, s, this.original, h, this.sourcemapLocations), s.outro.length && n.advance(s.outro);
306
- }), {
307
- file: t.file ? t.file.split(/[/\\]/).pop() : void 0,
308
- sources: [
309
- t.source ? A(t.file || "", t.source) : t.file || ""
310
- ],
311
- sourcesContent: t.includeContent ? [this.original] : void 0,
312
- names: i,
313
- mappings: n.raw,
314
- x_google_ignoreList: this.ignoreList ? [e] : void 0
315
- };
316
- }
317
- generateMap(t) {
318
- return new N(this.generateDecodedMap(t));
319
- }
320
- _ensureindentStr() {
321
- this.indentStr === void 0 && (this.indentStr = I(this.original));
322
- }
323
- _getRawIndentString() {
324
- return this._ensureindentStr(), this.indentStr;
325
- }
326
- getIndentString() {
327
- return this._ensureindentStr(), this.indentStr === null ? " " : this.indentStr;
328
- }
329
- indent(t, e) {
330
- const i = /^[^\r\n]/gm;
331
- if (j(t) && (e = t, t = void 0), t === void 0 && (this._ensureindentStr(), t = this.indentStr || " "), t === "") return this;
332
- e = e || {};
333
- const n = {};
334
- e.exclude && (typeof e.exclude[0] == "number" ? [e.exclude] : e.exclude).forEach((a) => {
335
- for (let w = a[0]; w < a[1]; w += 1)
336
- n[w] = !0;
337
- });
338
- let r = e.indentStart !== !1;
339
- const s = (l) => r ? `${t}${l}` : (r = !0, l);
340
- this.intro = this.intro.replace(i, s);
341
- let h = 0, o = this.firstChunk;
342
- for (; o; ) {
343
- const l = o.end;
344
- if (o.edited)
345
- n[h] || (o.content = o.content.replace(i, s), o.content.length && (r = o.content[o.content.length - 1] === `
346
- `));
347
- else
348
- for (h = o.start; h < l; ) {
349
- if (!n[h]) {
350
- const a = this.original[h];
351
- a === `
352
- ` ? r = !0 : a !== "\r" && r && (r = !1, h === o.start || (this._splitChunk(o, h), o = o.next), o.prependRight(t));
353
- }
354
- h += 1;
355
- }
356
- h = o.end, o = o.next;
357
- }
358
- return this.outro = this.outro.replace(i, s), this;
359
- }
360
- insert() {
361
- throw new Error(
362
- "magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)"
363
- );
364
- }
365
- insertLeft(t, e) {
366
- return f.insertLeft || (console.warn(
367
- "magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"
368
- ), f.insertLeft = !0), this.appendLeft(t, e);
369
- }
370
- insertRight(t, e) {
371
- return f.insertRight || (console.warn(
372
- "magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"
373
- ), f.insertRight = !0), this.prependRight(t, e);
374
- }
375
- move(t, e, i) {
376
- if (t = t + this.offset, e = e + this.offset, i = i + this.offset, i >= t && i <= e) throw new Error("Cannot move a selection inside itself");
377
- this._split(t), this._split(e), this._split(i);
378
- const n = this.byStart[t], r = this.byEnd[e], s = n.previous, h = r.next, o = this.byStart[i];
379
- if (!o && r === this.lastChunk) return this;
380
- const l = o ? o.previous : this.lastChunk;
381
- return s && (s.next = h), h && (h.previous = s), l && (l.next = n), o && (o.previous = r), n.previous || (this.firstChunk = r.next), r.next || (this.lastChunk = n.previous, this.lastChunk.next = null), n.previous = l, r.next = o || null, l || (this.firstChunk = n), o || (this.lastChunk = r), this;
382
- }
383
- overwrite(t, e, i, n) {
384
- return n = n || {}, this.update(t, e, i, { ...n, overwrite: !n.contentOnly });
385
- }
386
- update(t, e, i, n) {
387
- if (t = t + this.offset, e = e + this.offset, typeof i != "string") throw new TypeError("replacement content must be a string");
388
- if (this.original.length !== 0) {
389
- for (; t < 0; ) t += this.original.length;
390
- for (; e < 0; ) e += this.original.length;
391
- }
392
- if (e > this.original.length) throw new Error("end is out of bounds");
393
- if (t === e)
394
- throw new Error(
395
- "Cannot overwrite a zero-length range – use appendLeft or prependRight instead"
396
- );
397
- this._split(t), this._split(e), n === !0 && (f.storeName || (console.warn(
398
- "The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"
399
- ), f.storeName = !0), n = { storeName: !0 });
400
- const r = n !== void 0 ? n.storeName : !1, s = n !== void 0 ? n.overwrite : !1;
401
- if (r) {
402
- const l = this.original.slice(t, e);
403
- Object.defineProperty(this.storedNames, l, {
404
- writable: !0,
405
- value: !0,
406
- enumerable: !0
407
- });
408
- }
409
- const h = this.byStart[t], o = this.byEnd[e];
410
- if (h) {
411
- let l = h;
412
- for (; l !== o; ) {
413
- if (l.next !== this.byStart[l.end])
414
- throw new Error("Cannot overwrite across a split point");
415
- l = l.next, l.edit("", !1);
416
- }
417
- h.edit(i, r, !s);
418
- } else {
419
- const l = new g(t, e, "").edit(i, r);
420
- o.next = l, l.previous = o;
421
- }
422
- return this;
423
- }
424
- prepend(t) {
425
- if (typeof t != "string") throw new TypeError("outro content must be a string");
426
- return this.intro = t + this.intro, this;
427
- }
428
- prependLeft(t, e) {
429
- if (t = t + this.offset, typeof e != "string") throw new TypeError("inserted content must be a string");
430
- this._split(t);
431
- const i = this.byEnd[t];
432
- return i ? i.prependLeft(e) : this.intro = e + this.intro, this;
433
- }
434
- prependRight(t, e) {
435
- if (t = t + this.offset, typeof e != "string") throw new TypeError("inserted content must be a string");
436
- this._split(t);
437
- const i = this.byStart[t];
438
- return i ? i.prependRight(e) : this.outro = e + this.outro, this;
439
- }
440
- remove(t, e) {
441
- if (t = t + this.offset, e = e + this.offset, this.original.length !== 0) {
442
- for (; t < 0; ) t += this.original.length;
443
- for (; e < 0; ) e += this.original.length;
444
- }
445
- if (t === e) return this;
446
- if (t < 0 || e > this.original.length) throw new Error("Character is out of bounds");
447
- if (t > e) throw new Error("end must be greater than start");
448
- this._split(t), this._split(e);
449
- let i = this.byStart[t];
450
- for (; i; )
451
- i.intro = "", i.outro = "", i.edit(""), i = e > i.end ? this.byStart[i.end] : null;
452
- return this;
453
- }
454
- reset(t, e) {
455
- if (t = t + this.offset, e = e + this.offset, this.original.length !== 0) {
456
- for (; t < 0; ) t += this.original.length;
457
- for (; e < 0; ) e += this.original.length;
458
- }
459
- if (t === e) return this;
460
- if (t < 0 || e > this.original.length) throw new Error("Character is out of bounds");
461
- if (t > e) throw new Error("end must be greater than start");
462
- this._split(t), this._split(e);
463
- let i = this.byStart[t];
464
- for (; i; )
465
- i.reset(), i = e > i.end ? this.byStart[i.end] : null;
466
- return this;
467
- }
468
- lastChar() {
469
- if (this.outro.length) return this.outro[this.outro.length - 1];
470
- let t = this.lastChunk;
471
- do {
472
- if (t.outro.length) return t.outro[t.outro.length - 1];
473
- if (t.content.length) return t.content[t.content.length - 1];
474
- if (t.intro.length) return t.intro[t.intro.length - 1];
475
- } while (t = t.previous);
476
- return this.intro.length ? this.intro[this.intro.length - 1] : "";
477
- }
478
- lastLine() {
479
- let t = this.outro.lastIndexOf(d);
480
- if (t !== -1) return this.outro.substr(t + 1);
481
- let e = this.outro, i = this.lastChunk;
482
- do {
483
- if (i.outro.length > 0) {
484
- if (t = i.outro.lastIndexOf(d), t !== -1) return i.outro.substr(t + 1) + e;
485
- e = i.outro + e;
486
- }
487
- if (i.content.length > 0) {
488
- if (t = i.content.lastIndexOf(d), t !== -1) return i.content.substr(t + 1) + e;
489
- e = i.content + e;
490
- }
491
- if (i.intro.length > 0) {
492
- if (t = i.intro.lastIndexOf(d), t !== -1) return i.intro.substr(t + 1) + e;
493
- e = i.intro + e;
494
- }
495
- } while (i = i.previous);
496
- return t = this.intro.lastIndexOf(d), t !== -1 ? this.intro.substr(t + 1) + e : this.intro + e;
497
- }
498
- slice(t = 0, e = this.original.length - this.offset) {
499
- if (t = t + this.offset, e = e + this.offset, this.original.length !== 0) {
500
- for (; t < 0; ) t += this.original.length;
501
- for (; e < 0; ) e += this.original.length;
502
- }
503
- let i = "", n = this.firstChunk;
504
- for (; n && (n.start > t || n.end <= t); ) {
505
- if (n.start < e && n.end >= e)
506
- return i;
507
- n = n.next;
508
- }
509
- if (n && n.edited && n.start !== t)
510
- throw new Error(`Cannot use replaced character ${t} as slice start anchor.`);
511
- const r = n;
512
- for (; n; ) {
513
- n.intro && (r !== n || n.start === t) && (i += n.intro);
514
- const s = n.start < e && n.end >= e;
515
- if (s && n.edited && n.end !== e)
516
- throw new Error(`Cannot use replaced character ${e} as slice end anchor.`);
517
- const h = r === n ? t - n.start : 0, o = s ? n.content.length + e - n.end : n.content.length;
518
- if (i += n.content.slice(h, o), n.outro && (!s || n.end === e) && (i += n.outro), s)
519
- break;
520
- n = n.next;
521
- }
522
- return i;
523
- }
524
- // TODO deprecate this? not really very useful
525
- snip(t, e) {
526
- const i = this.clone();
527
- return i.remove(0, t), i.remove(e, i.original.length), i;
528
- }
529
- _split(t) {
530
- if (this.byStart[t] || this.byEnd[t]) return;
531
- let e = this.lastSearchedChunk;
532
- const i = t > e.end;
533
- for (; e; ) {
534
- if (e.contains(t)) return this._splitChunk(e, t);
535
- e = i ? this.byStart[e.end] : this.byEnd[e.start];
536
- }
537
- }
538
- _splitChunk(t, e) {
539
- if (t.edited && t.content.length) {
540
- const n = y(this.original)(e);
541
- throw new Error(
542
- `Cannot split a chunk that has already been edited (${n.line}:${n.column} – "${t.original}")`
543
- );
544
- }
545
- const i = t.split(e);
546
- return this.byEnd[e] = t, this.byStart[e] = i, this.byEnd[i.end] = i, t === this.lastChunk && (this.lastChunk = i), this.lastSearchedChunk = t, !0;
547
- }
548
- toString() {
549
- let t = this.intro, e = this.firstChunk;
550
- for (; e; )
551
- t += e.toString(), e = e.next;
552
- return t + this.outro;
553
- }
554
- isEmpty() {
555
- let t = this.firstChunk;
556
- do
557
- if (t.intro.length && t.intro.trim() || t.content.length && t.content.trim() || t.outro.length && t.outro.trim())
558
- return !1;
559
- while (t = t.next);
560
- return !0;
561
- }
562
- length() {
563
- let t = this.firstChunk, e = 0;
564
- do
565
- e += t.intro.length + t.content.length + t.outro.length;
566
- while (t = t.next);
567
- return e;
568
- }
569
- trimLines() {
570
- return this.trim("[\\r\\n]");
571
- }
572
- trim(t) {
573
- return this.trimStart(t).trimEnd(t);
574
- }
575
- trimEndAborted(t) {
576
- const e = new RegExp((t || "\\s") + "+$");
577
- if (this.outro = this.outro.replace(e, ""), this.outro.length) return !0;
578
- let i = this.lastChunk;
579
- do {
580
- const n = i.end, r = i.trimEnd(e);
581
- if (i.end !== n && (this.lastChunk === i && (this.lastChunk = i.next), this.byEnd[i.end] = i, this.byStart[i.next.start] = i.next, this.byEnd[i.next.end] = i.next), r) return !0;
582
- i = i.previous;
583
- } while (i);
584
- return !1;
585
- }
586
- trimEnd(t) {
587
- return this.trimEndAborted(t), this;
588
- }
589
- trimStartAborted(t) {
590
- const e = new RegExp("^" + (t || "\\s") + "+");
591
- if (this.intro = this.intro.replace(e, ""), this.intro.length) return !0;
592
- let i = this.firstChunk;
593
- do {
594
- const n = i.end, r = i.trimStart(e);
595
- if (i.end !== n && (i === this.lastChunk && (this.lastChunk = i.next), this.byEnd[i.end] = i, this.byStart[i.next.start] = i.next, this.byEnd[i.next.end] = i.next), r) return !0;
596
- i = i.next;
597
- } while (i);
598
- return !1;
599
- }
600
- trimStart(t) {
601
- return this.trimStartAborted(t), this;
602
- }
603
- hasChanged() {
604
- return this.original !== this.toString();
605
- }
606
- _replaceRegexp(t, e) {
607
- function i(r, s) {
608
- return typeof e == "string" ? e.replace(/\$(\$|&|\d+)/g, (h, o) => o === "$" ? "$" : o === "&" ? r[0] : +o < r.length ? r[+o] : `$${o}`) : e(...r, r.index, s, r.groups);
609
- }
610
- function n(r, s) {
611
- let h;
612
- const o = [];
613
- for (; h = r.exec(s); )
614
- o.push(h);
615
- return o;
616
- }
617
- if (t.global)
618
- n(t, this.original).forEach((s) => {
619
- if (s.index != null) {
620
- const h = i(s, this.original);
621
- h !== s[0] && this.overwrite(s.index, s.index + s[0].length, h);
622
- }
623
- });
624
- else {
625
- const r = this.original.match(t);
626
- if (r && r.index != null) {
627
- const s = i(r, this.original);
628
- s !== r[0] && this.overwrite(r.index, r.index + r[0].length, s);
629
- }
630
- }
631
- return this;
632
- }
633
- _replaceString(t, e) {
634
- const { original: i } = this, n = i.indexOf(t);
635
- return n !== -1 && this.overwrite(n, n + t.length, e), this;
636
- }
637
- replace(t, e) {
638
- return typeof t == "string" ? this._replaceString(t, e) : this._replaceRegexp(t, e);
639
- }
640
- _replaceAllString(t, e) {
641
- const { original: i } = this, n = t.length;
642
- for (let r = i.indexOf(t); r !== -1; r = i.indexOf(t, r + n))
643
- i.slice(r, r + n) !== e && this.overwrite(r, r + n, e);
644
- return this;
645
- }
646
- replaceAll(t, e) {
647
- if (typeof t == "string")
648
- return this._replaceAllString(t, e);
649
- if (!t.global)
650
- throw new TypeError(
651
- "MagicString.prototype.replaceAll called with a non-global RegExp argument"
652
- );
653
- return this._replaceRegexp(t, e);
654
- }
655
- }
656
- export {
657
- N as SourceMap,
658
- v as default
659
- };
@@ -1,50 +0,0 @@
1
- import T from "@antfu/eslint-config";
2
- import E from "./eslint/index.js";
3
- import { vitestE2E as c } from "./vitest/vitest.e2e.js";
4
- import { vitestUnit as I } from "./vitest/vitest.unit.js";
5
- import { deepMerge as i } from "../util/object/object.util.js";
6
- var e = /* @__PURE__ */ ((t) => (t.ESLINT = "eslint", t.COMMITLINT = "commitlint", t.LINT_STAGED = "lint-staged", t.VITEST_REACT_E2E = "vitest-react-e2e", t.VITEST_REACT_UNIT = "vitest-react-unit", t))(e || {});
7
- const l = (...t) => {
8
- const n = i(
9
- E,
10
- ...t.map((s) => s)
11
- ), { ignores: r, ...m } = n, o = Array.isArray(r) && r.every((s) => typeof s == "string") ? { ignores: r } : void 0, a = [
12
- m,
13
- ...o ? [o] : []
14
- ];
15
- return T(
16
- {
17
- stylistic: {
18
- semi: !0,
19
- indent: 4,
20
- quotes: "single"
21
- },
22
- formatters: {
23
- css: !0,
24
- html: !0,
25
- markdown: "prettier"
26
- },
27
- yaml: !1,
28
- react: !0
29
- },
30
- ...a
31
- );
32
- }, f = {
33
- [e.ESLINT]: (t) => l(t),
34
- [e.COMMITLINT]: (t) => i(t),
35
- [e.LINT_STAGED]: (t) => i(t),
36
- [e.VITEST_REACT_UNIT]: (t) => I(t),
37
- [e.VITEST_REACT_E2E]: (t) => c(t)
38
- };
39
- function N(t, ...n) {
40
- const r = f[t];
41
- if (!n || n.length === 0)
42
- return r({});
43
- if (!r)
44
- throw new Error(`Unknown config type: ${t}`);
45
- return r(...n);
46
- }
47
- export {
48
- e as E,
49
- N as mergeConfigs
50
- };