@cristian.aragao/milharis-core 1.30.48 → 1.30.50

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/dist/index.d.mts CHANGED
@@ -1842,7 +1842,11 @@ type TypeNumero = TypeMetaData & {
1842
1842
  updated: number;
1843
1843
  };
1844
1844
  type TypeNumeros = {
1845
- [id: string]: TypeNumero;
1845
+ [id: TypeNumero["id"]]: TypeNumero;
1846
+ };
1847
+ type TypeResultadoNumeroComDiferenca = {
1848
+ numero: TypeNumero;
1849
+ diferenca: number;
1846
1850
  };
1847
1851
 
1848
1852
  /**
@@ -2237,6 +2241,52 @@ type TypeDescarga = TypeMetaData & {
2237
2241
  type TypeDescargas = {
2238
2242
  [id: TypeDescarga["id"]]: TypeDescarga;
2239
2243
  };
2244
+ type TypeTotalGeral = {
2245
+ /**
2246
+ * @description Jogos da descarga
2247
+ * @example {
2248
+ * "milhar": {
2249
+ * totalEnviado: 100,
2250
+ * ordem: 1,
2251
+ * tipo: "milhar",
2252
+ * label: "Milhar"
2253
+ * }
2254
+ * }
2255
+ */
2256
+ jogos: Record<string, {
2257
+ totalEnviado: number;
2258
+ ordem: number;
2259
+ tipo: keyof typeof COMISSOES_PADRAO;
2260
+ label: string;
2261
+ }>;
2262
+ /**
2263
+ * @description Total bruto da descarga
2264
+ * @example 100
2265
+ */
2266
+ totalBruto: number;
2267
+ /**
2268
+ * @description Total comissão da descarga
2269
+ * @example 20
2270
+ */
2271
+ totalComissao: number;
2272
+ /**
2273
+ * @description Total líquido da descarga
2274
+ * @example 80
2275
+ */
2276
+ totalLiquido: number;
2277
+ };
2278
+ type TypeResultadoDescargaComDiferenca = {
2279
+ descarga: TypeDescarga;
2280
+ diferenca: number;
2281
+ };
2282
+ type TypeProps = {
2283
+ [prop: string]: number;
2284
+ };
2285
+ type TypePropsPrefix = {
2286
+ [PREFIX_NUMBER]: TypeProps;
2287
+ [PREFIX_ENVIO]: TypeProps;
2288
+ [PREFIX_ENVIO_OLD]: TypeProps;
2289
+ };
2240
2290
 
2241
2291
  type TypePDFDescargas = TypeMetaData & {
2242
2292
  /**
@@ -3413,24 +3463,12 @@ declare const calculaValoresDosNumeros: (game: TypeGame) => {
3413
3463
  numeros: TypeNumeros;
3414
3464
  };
3415
3465
 
3416
- type ResultadoNumeroComDiferenca = {
3417
- numero: TypeNumero;
3418
- diferenca: number;
3419
- };
3420
- declare const getNumerosAcimaDoLimite: (numeros: TypeNumero[], valoresJogos: TypeValueGames, limitesJogos: TypeLimitGames) => ResultadoNumeroComDiferenca[];
3466
+ declare const getNumerosAcimaDoLimite: (numeros: TypeNumero[], valoresJogos: TypeValueGames, limitesJogos: TypeLimitGames) => TypeResultadoNumeroComDiferenca[];
3421
3467
 
3422
3468
  declare const arredondarParaCima: (valor: number) => number;
3423
3469
 
3424
3470
  declare const sortNumeros: (numeros: TypeNumeros) => TypeNumeros;
3425
3471
 
3426
- type TypeProps = {
3427
- [prop: string]: number;
3428
- };
3429
- type TypePropsPrefix = {
3430
- [PREFIX_NUMBER]: TypeProps;
3431
- [PREFIX_ENVIO]: TypeProps;
3432
- [PREFIX_ENVIO_OLD]: TypeProps;
3433
- };
3434
3472
  declare const getPropsPrefix: (numero: Partial<TypeNumero>) => TypePropsPrefix;
3435
3473
 
3436
3474
  declare const getPropsEnvioId$1: (numero: Partial<TypeNumero>) => {
@@ -3677,11 +3715,7 @@ declare const getDescargaIdPeloNumero: (numero: TypeNumero, getByProperty?: stri
3677
3715
 
3678
3716
  declare const sortDescargas: (descargas: TypeDescargas) => TypeDescargas;
3679
3717
 
3680
- type ResultadoDescargaComDiferenca = {
3681
- descarga: TypeDescarga;
3682
- diferenca: number;
3683
- };
3684
- declare const getDescargasAcimaDoLimite: (descargas: TypeDescarga[], valoresJogos: TypeValueGames, limitesJogos: TypeLimitGames) => ResultadoDescargaComDiferenca[];
3718
+ declare const getDescargasAcimaDoLimite: (descargas: TypeDescarga[], valoresJogos: TypeValueGames, limitesJogos: TypeLimitGames) => TypeResultadoDescargaComDiferenca[];
3685
3719
 
3686
3720
  declare const getPropsVPDescarga: (descarga: Partial<TypeDescarga>) => {
3687
3721
  [props: string]: number;
@@ -3722,17 +3756,6 @@ declare const getPropsEnvioIdOldDescarga: (descarga: Partial<TypeDescarga>) => {
3722
3756
  */
3723
3757
  declare const getDescargaIdPeloEnvio: (numero: TypeNumero, envioId: string) => string;
3724
3758
 
3725
- type TypeTotalGeral = {
3726
- jogos: Record<string, {
3727
- totalEnviado: number;
3728
- ordem: number;
3729
- tipo: keyof typeof COMISSOES_PADRAO;
3730
- label: string;
3731
- }>;
3732
- totalBruto: number;
3733
- totalLiquido: number;
3734
- totalComissao: number;
3735
- };
3736
3759
  /**
3737
3760
  * @description Calcula o total geral de uma descarga
3738
3761
  * @param totalBrutoJogos - Total bruto dos jogos
@@ -3741,8 +3764,6 @@ type TypeTotalGeral = {
3741
3764
  */
3742
3765
  declare const getTotalGeralDescarga: (totalBrutoJogos: TypeEnvioDescarga["totalGeralJogos"], comissoes: TypeComissoesDescarga) => TypeTotalGeral;
3743
3766
 
3744
- type descarga_ResultadoDescargaComDiferenca = ResultadoDescargaComDiferenca;
3745
- type descarga_TypeTotalGeral = TypeTotalGeral;
3746
3767
  declare const descarga_generateDescarga: typeof generateDescarga;
3747
3768
  declare const descarga_generateDescargas: typeof generateDescargas;
3748
3769
  declare const descarga_getDescargaIdPeloEnvio: typeof getDescargaIdPeloEnvio;
@@ -3754,7 +3775,7 @@ declare const descarga_getPropsVPDescarga: typeof getPropsVPDescarga;
3754
3775
  declare const descarga_getTotalGeralDescarga: typeof getTotalGeralDescarga;
3755
3776
  declare const descarga_sortDescargas: typeof sortDescargas;
3756
3777
  declare namespace descarga {
3757
- export { type descarga_ResultadoDescargaComDiferenca as ResultadoDescargaComDiferenca, type descarga_TypeTotalGeral as TypeTotalGeral, descarga_generateDescarga as generateDescarga, descarga_generateDescargas as generateDescargas, descarga_getDescargaIdPeloEnvio as getDescargaIdPeloEnvio, descarga_getDescargaIdPeloNumero as getDescargaIdPeloNumero, descarga_getDescargasAcimaDoLimite as getDescargasAcimaDoLimite, descarga_getPropsEnvioId as getPropsEnvioId, descarga_getPropsEnvioIdOldDescarga as getPropsEnvioIdOldDescarga, descarga_getPropsVPDescarga as getPropsVPDescarga, descarga_getTotalGeralDescarga as getTotalGeralDescarga, descarga_sortDescargas as sortDescargas };
3778
+ export { descarga_generateDescarga as generateDescarga, descarga_generateDescargas as generateDescargas, descarga_getDescargaIdPeloEnvio as getDescargaIdPeloEnvio, descarga_getDescargaIdPeloNumero as getDescargaIdPeloNumero, descarga_getDescargasAcimaDoLimite as getDescargasAcimaDoLimite, descarga_getPropsEnvioId as getPropsEnvioId, descarga_getPropsEnvioIdOldDescarga as getPropsEnvioIdOldDescarga, descarga_getPropsVPDescarga as getPropsVPDescarga, descarga_getTotalGeralDescarga as getTotalGeralDescarga, descarga_sortDescargas as sortDescargas };
3758
3779
  }
3759
3780
 
3760
3781
  /**
@@ -4015,4 +4036,4 @@ declare const functionsCore: {
4015
4036
  utils: typeof utils;
4016
4037
  };
4017
4038
 
4018
- export { AuditLogModel, type AuthorizationConfig, BancaModel, BetModel, COMISSOES_PADRAO, type CacheConfig, ComissaoDescargaModel, DescargaModel, DeviceModel, EXTRACAO, type EnvioAssociacaoFilters, type EnvioAssociacaoParams, type EnvioAssociacaoResponse, EnvioDescargaModel, ExtracaoModel, type FirebaseAdapter, type FirebaseVersion, GAMES, GRUPOS_BICHOS, GameModel, type GenericRepo, type IdSearchStrategy, type IsolationConfig, KEYBOARD, LimitGameModel, MESSAGES, MessageModel, NumberModel, type OperationType, type OrderByCondition, PDFModel, PREFIX_ENVIO, PREFIX_ENVIO_OLD, PREFIX_NUMBER, PREMIOS, PremiacaoAssociacaoModel, PremiacaoModel, ROLES, type RepoCollections, type RepoConfig, type RepoFactoryConfig, type RepoQueryOptions, ResultadoModel, RouteModel, STATUS_DESCARGA, STATUS_DEVICE, STATUS_PULE, TIPO_VISUALIZACAO, type TypeAuditLog, type TypeAuditLogs, type TypeBanca, type TypeBancas, type TypeBet, type TypeCartDescargas, type TypeCartDescargasProps, type TypeCartList, type TypeCartListProps, type TypeComissaoDescarga, type TypeComissoesDescarga, type TypeDescarga, type TypeDescargas, type TypeDevice, type TypeDevices, type TypeEnvioDescarga, type TypeEnvioDescargas, type TypeExtracao, type TypeExtracoes, type TypeGame, type TypeGames, type TypeLimitGame, type TypeLimitGames, type TypeMessage, type TypeMessages, type TypeMetaData, type TypeNumero, type TypeNumeros, type TypePDFDescargas, type TypePDFsDescargas, type TypePremiacao, type TypePremiacaoAssociacao, type TypePremiacaoItem, type TypePremiacoes, type TypePremiacoesAssociacao, type TypePrize, type TypeResultado, type TypeResultados, type TypeRoute, type TypeRoutes, type TypeUser, type TypeUsers, type TypeValueGame, type TypeValueGames, UserModel, VISUALIZACAO, ValueGameModel, type WhereCondition, arredondarParaCima, calculaValoresDosNumeros, calcularValorDeNumero, calcularValorJogoPeloLimite, calculateAmount, calculateAmountGame, clone, collections, combineDateTime, createAutoRepo, createGenericRepo, createReactNativeAdapter, createReactNativeRepoFactory, createRepoFactory, createV8Adapter, createV9ModularAdapter, createWebAdapter, createWebRepoFactory, dateToNumber, delay, detectFirebaseVersion, dividirArray, extracaoEstaAtivaBoolean, extracaoEstaAtivaTryCatch, fazerJogo, formatPuleId, formatarNumero, formatterBRL, formatterPercentage, formatterPercentageDecimal, functionsCore, generateDescargas, generateId, gerarDezenas, getAllCombinations, getAvailableTimes, getBetDateToNumber, getCodigoAuth, getCreatedBySystem, getDataInicioFim, getFormattedPuleId, getGamesUnicosList, getGamesUnicosObjeto, getInitials, getLimiteJogoPeloTipoJogo, getLimiteSimulado, getLimitsRest, getNumeroId, getNumerosAcimaDoLimite, getPermission, getPremioFormato, getPropsEnvioId$1 as getPropsEnvioId, getPropsEnvioIdOld, getPropsPrefix, getPropsVP, getSomaEnvio, getSomaProps, getSomaVP, getTiposJogos, getValorJogoPeloTipoJogo, invertGame, isAdm, isAdmOrSubAdm, isAssociacao, isCambista, isCambistaTalao, isDigitador, isDigitadorAdm, isDigitadorOrDigitadorAdm, isSuperAdm, matchNormalized, normalize, numberToDate, numbersSelectedFormated, parserBRL, parserPercentage, parserPercentageDecimal, pegarExtracoes, pegarHorarioSaoPaulo, removerLetters, showFormatDate, sortNumeros };
4039
+ export { AuditLogModel, type AuthorizationConfig, BancaModel, BetModel, COMISSOES_PADRAO, type CacheConfig, ComissaoDescargaModel, DescargaModel, DeviceModel, EXTRACAO, type EnvioAssociacaoFilters, type EnvioAssociacaoParams, type EnvioAssociacaoResponse, EnvioDescargaModel, ExtracaoModel, type FirebaseAdapter, type FirebaseVersion, GAMES, GRUPOS_BICHOS, GameModel, type GenericRepo, type IdSearchStrategy, type IsolationConfig, KEYBOARD, LimitGameModel, MESSAGES, MessageModel, NumberModel, type OperationType, type OrderByCondition, PDFModel, PREFIX_ENVIO, PREFIX_ENVIO_OLD, PREFIX_NUMBER, PREMIOS, PremiacaoAssociacaoModel, PremiacaoModel, ROLES, type RepoCollections, type RepoConfig, type RepoFactoryConfig, type RepoQueryOptions, ResultadoModel, RouteModel, STATUS_DESCARGA, STATUS_DEVICE, STATUS_PULE, TIPO_VISUALIZACAO, type TypeAuditLog, type TypeAuditLogs, type TypeBanca, type TypeBancas, type TypeBet, type TypeCartDescargas, type TypeCartDescargasProps, type TypeCartList, type TypeCartListProps, type TypeComissaoDescarga, type TypeComissoesDescarga, type TypeDescarga, type TypeDescargas, type TypeDevice, type TypeDevices, type TypeEnvioDescarga, type TypeEnvioDescargas, type TypeExtracao, type TypeExtracoes, type TypeGame, type TypeGames, type TypeLimitGame, type TypeLimitGames, type TypeMessage, type TypeMessages, type TypeMetaData, type TypeNumero, type TypeNumeros, type TypePDFDescargas, type TypePDFsDescargas, type TypePremiacao, type TypePremiacaoAssociacao, type TypePremiacaoItem, type TypePremiacoes, type TypePremiacoesAssociacao, type TypePrize, type TypeProps, type TypePropsPrefix, type TypeResultado, type TypeResultadoDescargaComDiferenca, type TypeResultadoNumeroComDiferenca, type TypeResultados, type TypeRoute, type TypeRoutes, type TypeTotalGeral, type TypeUser, type TypeUsers, type TypeValueGame, type TypeValueGames, UserModel, VISUALIZACAO, ValueGameModel, type WhereCondition, arredondarParaCima, calculaValoresDosNumeros, calcularValorDeNumero, calcularValorJogoPeloLimite, calculateAmount, calculateAmountGame, clone, collections, combineDateTime, createAutoRepo, createGenericRepo, createReactNativeAdapter, createReactNativeRepoFactory, createRepoFactory, createV8Adapter, createV9ModularAdapter, createWebAdapter, createWebRepoFactory, dateToNumber, delay, detectFirebaseVersion, dividirArray, extracaoEstaAtivaBoolean, extracaoEstaAtivaTryCatch, fazerJogo, formatPuleId, formatarNumero, formatterBRL, formatterPercentage, formatterPercentageDecimal, functionsCore, generateDescargas, generateId, gerarDezenas, getAllCombinations, getAvailableTimes, getBetDateToNumber, getCodigoAuth, getCreatedBySystem, getDataInicioFim, getFormattedPuleId, getGamesUnicosList, getGamesUnicosObjeto, getInitials, getLimiteJogoPeloTipoJogo, getLimiteSimulado, getLimitsRest, getNumeroId, getNumerosAcimaDoLimite, getPermission, getPremioFormato, getPropsEnvioId$1 as getPropsEnvioId, getPropsEnvioIdOld, getPropsPrefix, getPropsVP, getSomaEnvio, getSomaProps, getSomaVP, getTiposJogos, getValorJogoPeloTipoJogo, invertGame, isAdm, isAdmOrSubAdm, isAssociacao, isCambista, isCambistaTalao, isDigitador, isDigitadorAdm, isDigitadorOrDigitadorAdm, isSuperAdm, matchNormalized, normalize, numberToDate, numbersSelectedFormated, parserBRL, parserPercentage, parserPercentageDecimal, pegarExtracoes, pegarHorarioSaoPaulo, removerLetters, showFormatDate, sortNumeros };
package/dist/index.d.ts CHANGED
@@ -1842,7 +1842,11 @@ type TypeNumero = TypeMetaData & {
1842
1842
  updated: number;
1843
1843
  };
1844
1844
  type TypeNumeros = {
1845
- [id: string]: TypeNumero;
1845
+ [id: TypeNumero["id"]]: TypeNumero;
1846
+ };
1847
+ type TypeResultadoNumeroComDiferenca = {
1848
+ numero: TypeNumero;
1849
+ diferenca: number;
1846
1850
  };
1847
1851
 
1848
1852
  /**
@@ -2237,6 +2241,52 @@ type TypeDescarga = TypeMetaData & {
2237
2241
  type TypeDescargas = {
2238
2242
  [id: TypeDescarga["id"]]: TypeDescarga;
2239
2243
  };
2244
+ type TypeTotalGeral = {
2245
+ /**
2246
+ * @description Jogos da descarga
2247
+ * @example {
2248
+ * "milhar": {
2249
+ * totalEnviado: 100,
2250
+ * ordem: 1,
2251
+ * tipo: "milhar",
2252
+ * label: "Milhar"
2253
+ * }
2254
+ * }
2255
+ */
2256
+ jogos: Record<string, {
2257
+ totalEnviado: number;
2258
+ ordem: number;
2259
+ tipo: keyof typeof COMISSOES_PADRAO;
2260
+ label: string;
2261
+ }>;
2262
+ /**
2263
+ * @description Total bruto da descarga
2264
+ * @example 100
2265
+ */
2266
+ totalBruto: number;
2267
+ /**
2268
+ * @description Total comissão da descarga
2269
+ * @example 20
2270
+ */
2271
+ totalComissao: number;
2272
+ /**
2273
+ * @description Total líquido da descarga
2274
+ * @example 80
2275
+ */
2276
+ totalLiquido: number;
2277
+ };
2278
+ type TypeResultadoDescargaComDiferenca = {
2279
+ descarga: TypeDescarga;
2280
+ diferenca: number;
2281
+ };
2282
+ type TypeProps = {
2283
+ [prop: string]: number;
2284
+ };
2285
+ type TypePropsPrefix = {
2286
+ [PREFIX_NUMBER]: TypeProps;
2287
+ [PREFIX_ENVIO]: TypeProps;
2288
+ [PREFIX_ENVIO_OLD]: TypeProps;
2289
+ };
2240
2290
 
2241
2291
  type TypePDFDescargas = TypeMetaData & {
2242
2292
  /**
@@ -3413,24 +3463,12 @@ declare const calculaValoresDosNumeros: (game: TypeGame) => {
3413
3463
  numeros: TypeNumeros;
3414
3464
  };
3415
3465
 
3416
- type ResultadoNumeroComDiferenca = {
3417
- numero: TypeNumero;
3418
- diferenca: number;
3419
- };
3420
- declare const getNumerosAcimaDoLimite: (numeros: TypeNumero[], valoresJogos: TypeValueGames, limitesJogos: TypeLimitGames) => ResultadoNumeroComDiferenca[];
3466
+ declare const getNumerosAcimaDoLimite: (numeros: TypeNumero[], valoresJogos: TypeValueGames, limitesJogos: TypeLimitGames) => TypeResultadoNumeroComDiferenca[];
3421
3467
 
3422
3468
  declare const arredondarParaCima: (valor: number) => number;
3423
3469
 
3424
3470
  declare const sortNumeros: (numeros: TypeNumeros) => TypeNumeros;
3425
3471
 
3426
- type TypeProps = {
3427
- [prop: string]: number;
3428
- };
3429
- type TypePropsPrefix = {
3430
- [PREFIX_NUMBER]: TypeProps;
3431
- [PREFIX_ENVIO]: TypeProps;
3432
- [PREFIX_ENVIO_OLD]: TypeProps;
3433
- };
3434
3472
  declare const getPropsPrefix: (numero: Partial<TypeNumero>) => TypePropsPrefix;
3435
3473
 
3436
3474
  declare const getPropsEnvioId$1: (numero: Partial<TypeNumero>) => {
@@ -3677,11 +3715,7 @@ declare const getDescargaIdPeloNumero: (numero: TypeNumero, getByProperty?: stri
3677
3715
 
3678
3716
  declare const sortDescargas: (descargas: TypeDescargas) => TypeDescargas;
3679
3717
 
3680
- type ResultadoDescargaComDiferenca = {
3681
- descarga: TypeDescarga;
3682
- diferenca: number;
3683
- };
3684
- declare const getDescargasAcimaDoLimite: (descargas: TypeDescarga[], valoresJogos: TypeValueGames, limitesJogos: TypeLimitGames) => ResultadoDescargaComDiferenca[];
3718
+ declare const getDescargasAcimaDoLimite: (descargas: TypeDescarga[], valoresJogos: TypeValueGames, limitesJogos: TypeLimitGames) => TypeResultadoDescargaComDiferenca[];
3685
3719
 
3686
3720
  declare const getPropsVPDescarga: (descarga: Partial<TypeDescarga>) => {
3687
3721
  [props: string]: number;
@@ -3722,17 +3756,6 @@ declare const getPropsEnvioIdOldDescarga: (descarga: Partial<TypeDescarga>) => {
3722
3756
  */
3723
3757
  declare const getDescargaIdPeloEnvio: (numero: TypeNumero, envioId: string) => string;
3724
3758
 
3725
- type TypeTotalGeral = {
3726
- jogos: Record<string, {
3727
- totalEnviado: number;
3728
- ordem: number;
3729
- tipo: keyof typeof COMISSOES_PADRAO;
3730
- label: string;
3731
- }>;
3732
- totalBruto: number;
3733
- totalLiquido: number;
3734
- totalComissao: number;
3735
- };
3736
3759
  /**
3737
3760
  * @description Calcula o total geral de uma descarga
3738
3761
  * @param totalBrutoJogos - Total bruto dos jogos
@@ -3741,8 +3764,6 @@ type TypeTotalGeral = {
3741
3764
  */
3742
3765
  declare const getTotalGeralDescarga: (totalBrutoJogos: TypeEnvioDescarga["totalGeralJogos"], comissoes: TypeComissoesDescarga) => TypeTotalGeral;
3743
3766
 
3744
- type descarga_ResultadoDescargaComDiferenca = ResultadoDescargaComDiferenca;
3745
- type descarga_TypeTotalGeral = TypeTotalGeral;
3746
3767
  declare const descarga_generateDescarga: typeof generateDescarga;
3747
3768
  declare const descarga_generateDescargas: typeof generateDescargas;
3748
3769
  declare const descarga_getDescargaIdPeloEnvio: typeof getDescargaIdPeloEnvio;
@@ -3754,7 +3775,7 @@ declare const descarga_getPropsVPDescarga: typeof getPropsVPDescarga;
3754
3775
  declare const descarga_getTotalGeralDescarga: typeof getTotalGeralDescarga;
3755
3776
  declare const descarga_sortDescargas: typeof sortDescargas;
3756
3777
  declare namespace descarga {
3757
- export { type descarga_ResultadoDescargaComDiferenca as ResultadoDescargaComDiferenca, type descarga_TypeTotalGeral as TypeTotalGeral, descarga_generateDescarga as generateDescarga, descarga_generateDescargas as generateDescargas, descarga_getDescargaIdPeloEnvio as getDescargaIdPeloEnvio, descarga_getDescargaIdPeloNumero as getDescargaIdPeloNumero, descarga_getDescargasAcimaDoLimite as getDescargasAcimaDoLimite, descarga_getPropsEnvioId as getPropsEnvioId, descarga_getPropsEnvioIdOldDescarga as getPropsEnvioIdOldDescarga, descarga_getPropsVPDescarga as getPropsVPDescarga, descarga_getTotalGeralDescarga as getTotalGeralDescarga, descarga_sortDescargas as sortDescargas };
3778
+ export { descarga_generateDescarga as generateDescarga, descarga_generateDescargas as generateDescargas, descarga_getDescargaIdPeloEnvio as getDescargaIdPeloEnvio, descarga_getDescargaIdPeloNumero as getDescargaIdPeloNumero, descarga_getDescargasAcimaDoLimite as getDescargasAcimaDoLimite, descarga_getPropsEnvioId as getPropsEnvioId, descarga_getPropsEnvioIdOldDescarga as getPropsEnvioIdOldDescarga, descarga_getPropsVPDescarga as getPropsVPDescarga, descarga_getTotalGeralDescarga as getTotalGeralDescarga, descarga_sortDescargas as sortDescargas };
3758
3779
  }
3759
3780
 
3760
3781
  /**
@@ -4015,4 +4036,4 @@ declare const functionsCore: {
4015
4036
  utils: typeof utils;
4016
4037
  };
4017
4038
 
4018
- export { AuditLogModel, type AuthorizationConfig, BancaModel, BetModel, COMISSOES_PADRAO, type CacheConfig, ComissaoDescargaModel, DescargaModel, DeviceModel, EXTRACAO, type EnvioAssociacaoFilters, type EnvioAssociacaoParams, type EnvioAssociacaoResponse, EnvioDescargaModel, ExtracaoModel, type FirebaseAdapter, type FirebaseVersion, GAMES, GRUPOS_BICHOS, GameModel, type GenericRepo, type IdSearchStrategy, type IsolationConfig, KEYBOARD, LimitGameModel, MESSAGES, MessageModel, NumberModel, type OperationType, type OrderByCondition, PDFModel, PREFIX_ENVIO, PREFIX_ENVIO_OLD, PREFIX_NUMBER, PREMIOS, PremiacaoAssociacaoModel, PremiacaoModel, ROLES, type RepoCollections, type RepoConfig, type RepoFactoryConfig, type RepoQueryOptions, ResultadoModel, RouteModel, STATUS_DESCARGA, STATUS_DEVICE, STATUS_PULE, TIPO_VISUALIZACAO, type TypeAuditLog, type TypeAuditLogs, type TypeBanca, type TypeBancas, type TypeBet, type TypeCartDescargas, type TypeCartDescargasProps, type TypeCartList, type TypeCartListProps, type TypeComissaoDescarga, type TypeComissoesDescarga, type TypeDescarga, type TypeDescargas, type TypeDevice, type TypeDevices, type TypeEnvioDescarga, type TypeEnvioDescargas, type TypeExtracao, type TypeExtracoes, type TypeGame, type TypeGames, type TypeLimitGame, type TypeLimitGames, type TypeMessage, type TypeMessages, type TypeMetaData, type TypeNumero, type TypeNumeros, type TypePDFDescargas, type TypePDFsDescargas, type TypePremiacao, type TypePremiacaoAssociacao, type TypePremiacaoItem, type TypePremiacoes, type TypePremiacoesAssociacao, type TypePrize, type TypeResultado, type TypeResultados, type TypeRoute, type TypeRoutes, type TypeUser, type TypeUsers, type TypeValueGame, type TypeValueGames, UserModel, VISUALIZACAO, ValueGameModel, type WhereCondition, arredondarParaCima, calculaValoresDosNumeros, calcularValorDeNumero, calcularValorJogoPeloLimite, calculateAmount, calculateAmountGame, clone, collections, combineDateTime, createAutoRepo, createGenericRepo, createReactNativeAdapter, createReactNativeRepoFactory, createRepoFactory, createV8Adapter, createV9ModularAdapter, createWebAdapter, createWebRepoFactory, dateToNumber, delay, detectFirebaseVersion, dividirArray, extracaoEstaAtivaBoolean, extracaoEstaAtivaTryCatch, fazerJogo, formatPuleId, formatarNumero, formatterBRL, formatterPercentage, formatterPercentageDecimal, functionsCore, generateDescargas, generateId, gerarDezenas, getAllCombinations, getAvailableTimes, getBetDateToNumber, getCodigoAuth, getCreatedBySystem, getDataInicioFim, getFormattedPuleId, getGamesUnicosList, getGamesUnicosObjeto, getInitials, getLimiteJogoPeloTipoJogo, getLimiteSimulado, getLimitsRest, getNumeroId, getNumerosAcimaDoLimite, getPermission, getPremioFormato, getPropsEnvioId$1 as getPropsEnvioId, getPropsEnvioIdOld, getPropsPrefix, getPropsVP, getSomaEnvio, getSomaProps, getSomaVP, getTiposJogos, getValorJogoPeloTipoJogo, invertGame, isAdm, isAdmOrSubAdm, isAssociacao, isCambista, isCambistaTalao, isDigitador, isDigitadorAdm, isDigitadorOrDigitadorAdm, isSuperAdm, matchNormalized, normalize, numberToDate, numbersSelectedFormated, parserBRL, parserPercentage, parserPercentageDecimal, pegarExtracoes, pegarHorarioSaoPaulo, removerLetters, showFormatDate, sortNumeros };
4039
+ export { AuditLogModel, type AuthorizationConfig, BancaModel, BetModel, COMISSOES_PADRAO, type CacheConfig, ComissaoDescargaModel, DescargaModel, DeviceModel, EXTRACAO, type EnvioAssociacaoFilters, type EnvioAssociacaoParams, type EnvioAssociacaoResponse, EnvioDescargaModel, ExtracaoModel, type FirebaseAdapter, type FirebaseVersion, GAMES, GRUPOS_BICHOS, GameModel, type GenericRepo, type IdSearchStrategy, type IsolationConfig, KEYBOARD, LimitGameModel, MESSAGES, MessageModel, NumberModel, type OperationType, type OrderByCondition, PDFModel, PREFIX_ENVIO, PREFIX_ENVIO_OLD, PREFIX_NUMBER, PREMIOS, PremiacaoAssociacaoModel, PremiacaoModel, ROLES, type RepoCollections, type RepoConfig, type RepoFactoryConfig, type RepoQueryOptions, ResultadoModel, RouteModel, STATUS_DESCARGA, STATUS_DEVICE, STATUS_PULE, TIPO_VISUALIZACAO, type TypeAuditLog, type TypeAuditLogs, type TypeBanca, type TypeBancas, type TypeBet, type TypeCartDescargas, type TypeCartDescargasProps, type TypeCartList, type TypeCartListProps, type TypeComissaoDescarga, type TypeComissoesDescarga, type TypeDescarga, type TypeDescargas, type TypeDevice, type TypeDevices, type TypeEnvioDescarga, type TypeEnvioDescargas, type TypeExtracao, type TypeExtracoes, type TypeGame, type TypeGames, type TypeLimitGame, type TypeLimitGames, type TypeMessage, type TypeMessages, type TypeMetaData, type TypeNumero, type TypeNumeros, type TypePDFDescargas, type TypePDFsDescargas, type TypePremiacao, type TypePremiacaoAssociacao, type TypePremiacaoItem, type TypePremiacoes, type TypePremiacoesAssociacao, type TypePrize, type TypeProps, type TypePropsPrefix, type TypeResultado, type TypeResultadoDescargaComDiferenca, type TypeResultadoNumeroComDiferenca, type TypeResultados, type TypeRoute, type TypeRoutes, type TypeTotalGeral, type TypeUser, type TypeUsers, type TypeValueGame, type TypeValueGames, UserModel, VISUALIZACAO, ValueGameModel, type WhereCondition, arredondarParaCima, calculaValoresDosNumeros, calcularValorDeNumero, calcularValorJogoPeloLimite, calculateAmount, calculateAmountGame, clone, collections, combineDateTime, createAutoRepo, createGenericRepo, createReactNativeAdapter, createReactNativeRepoFactory, createRepoFactory, createV8Adapter, createV9ModularAdapter, createWebAdapter, createWebRepoFactory, dateToNumber, delay, detectFirebaseVersion, dividirArray, extracaoEstaAtivaBoolean, extracaoEstaAtivaTryCatch, fazerJogo, formatPuleId, formatarNumero, formatterBRL, formatterPercentage, formatterPercentageDecimal, functionsCore, generateDescargas, generateId, gerarDezenas, getAllCombinations, getAvailableTimes, getBetDateToNumber, getCodigoAuth, getCreatedBySystem, getDataInicioFim, getFormattedPuleId, getGamesUnicosList, getGamesUnicosObjeto, getInitials, getLimiteJogoPeloTipoJogo, getLimiteSimulado, getLimitsRest, getNumeroId, getNumerosAcimaDoLimite, getPermission, getPremioFormato, getPropsEnvioId$1 as getPropsEnvioId, getPropsEnvioIdOld, getPropsPrefix, getPropsVP, getSomaEnvio, getSomaProps, getSomaVP, getTiposJogos, getValorJogoPeloTipoJogo, invertGame, isAdm, isAdmOrSubAdm, isAssociacao, isCambista, isCambistaTalao, isDigitador, isDigitadorAdm, isDigitadorOrDigitadorAdm, isSuperAdm, matchNormalized, normalize, numberToDate, numbersSelectedFormated, parserBRL, parserPercentage, parserPercentageDecimal, pegarExtracoes, pegarHorarioSaoPaulo, removerLetters, showFormatDate, sortNumeros };
package/dist/index.esm.js CHANGED
@@ -1,2 +1,2 @@
1
- var ko=Object.defineProperty;var z=(e,o)=>{for(var r in o)ko(e,r,{get:o[r],enumerable:!0})};var qo=[13,16,19];var u={milhar:{id:"milhar",label:"Milhar",sigla:"M",format:"####",formatDigitar:"####",markAll:!1,max:0,order:1,showPerLine:6},centena:{id:"centena",label:"Centena",sigla:"C",format:"###",formatDigitar:"###",markAll:!1,max:0,order:2,showPerLine:7},dezena:{id:"dezena",label:"Dezena",sigla:"D",format:"##",formatDigitar:"##",markAll:!1,max:0,order:3,showPerLine:0},grupo:{id:"grupo",label:"Grupo",sigla:"G",max:25,format:"##",formatDigitar:"##",markAll:!1,order:4,showPerLine:0},"terno.dezena":{id:"terno.dezena",label:"Terno de Dezena",sigla:"TD",format:"##-##-##",formatDigitar:"######",markAll:!0,max:0,order:5,showPerLine:3},"terno.grupo":{id:"terno.grupo",label:"Terno de Grupo",sigla:"TG",max:25,format:"##-##-##",formatDigitar:"######",markAll:!0,order:6,showPerLine:3},"duque.dezena":{id:"duque.dezena",label:"Duque de Dezena",sigla:"DD",format:"##-##",formatDigitar:"####",markAll:!0,max:0,order:7,showPerLine:5},"duque.grupo":{id:"duque.grupo",label:"Duque de Grupo",sigla:"DG",max:25,format:"##-##",formatDigitar:"####",markAll:!0,order:8,showPerLine:5},"milhar.invertida":{id:"milhar.invertida",label:"Milhar Invertida",sigla:"MI",format:"####",formatDigitar:"####",markAll:!1,max:0,order:0,showPerLine:6},"centena.invertida":{id:"centena.invertida",label:"Centena Invertida",sigla:"CI",format:"###",formatDigitar:"###",markAll:!1,max:0,order:0,showPerLine:7},"milhar@centena":{id:"milhar@centena",label:"Milhar Centena",sigla:"MC",format:"####",formatDigitar:"####",markAll:!1,max:0,order:0,showPerLine:6},"milhar.invertida@centena.invertida":{id:"milhar.invertida@centena.invertida",label:"Milhar e Centena Invertidas",sigla:"MCI",format:"####",formatDigitar:"####",markAll:!1,max:0,order:0,showPerLine:6},"milhar@dezena":{id:"milhar@dezena",label:"Milhar e Dezena",sigla:"MD",format:"####",formatDigitar:"####",markAll:!1,max:0,order:0,showPerLine:6},"milhar@centena@dezena":{id:"milhar@centena@dezena",label:"Milhar, Centena e Dezena",sigla:"MCD",format:"####",formatDigitar:"####",markAll:!1,max:0,order:0,showPerLine:6},"centena@dezena":{id:"centena@dezena",label:"Centena Dezena",sigla:"CD",format:"###",formatDigitar:"###",markAll:!1,max:0,order:0,showPerLine:7}};var i={"01":"Avestruz","02":"\xC1guia","03":"Burro","04":"Borboleta","05":"Cachorro","06":"Cabra","07":"Carneiro","08":"Camelo","09":"Cobra",10:"Coelho",11:"Cavalo",12:"Elefante",13:"Galo",14:"Gato",15:"Jacar\xE9",16:"Le\xE3o",17:"Macaco",18:"Porco",19:"Pav\xE3o",20:"Peru",21:"Touro",22:"Tigre",23:"Urso",24:"Veado",25:"Vaca"},Ho={"01":{grupo:"01",bicho:i["01"]},"02":{grupo:"01",bicho:i["01"]},"03":{grupo:"01",bicho:i["01"]},"04":{grupo:"01",bicho:i["01"]},"05":{grupo:"02",bicho:i["02"]},"06":{grupo:"02",bicho:i["02"]},"07":{grupo:"02",bicho:i["02"]},"08":{grupo:"02",bicho:i["02"]},"09":{grupo:"03",bicho:i["03"]},10:{grupo:"03",bicho:i["03"]},11:{grupo:"03",bicho:i["03"]},12:{grupo:"03",bicho:i["03"]},13:{grupo:"04",bicho:i["04"]},14:{grupo:"04",bicho:i["04"]},15:{grupo:"04",bicho:i["04"]},16:{grupo:"04",bicho:i["04"]},17:{grupo:"05",bicho:i["05"]},18:{grupo:"05",bicho:i["05"]},19:{grupo:"05",bicho:i["05"]},20:{grupo:"05",bicho:i["05"]},21:{grupo:"06",bicho:i["06"]},22:{grupo:"06",bicho:i["06"]},23:{grupo:"06",bicho:i["06"]},24:{grupo:"06",bicho:i["06"]},25:{grupo:"07",bicho:i["07"]},26:{grupo:"07",bicho:i["07"]},27:{grupo:"07",bicho:i["07"]},28:{grupo:"07",bicho:i["07"]},29:{grupo:"08",bicho:i["08"]},30:{grupo:"08",bicho:i["08"]},31:{grupo:"08",bicho:i["08"]},32:{grupo:"08",bicho:i["08"]},33:{grupo:"09",bicho:i["09"]},34:{grupo:"09",bicho:i["09"]},35:{grupo:"09",bicho:i["09"]},36:{grupo:"09",bicho:i["09"]},37:{grupo:"10",bicho:i[10]},38:{grupo:"10",bicho:i[10]},39:{grupo:"10",bicho:i[10]},40:{grupo:"10",bicho:i[10]},41:{grupo:"11",bicho:i[11]},42:{grupo:"11",bicho:i[11]},43:{grupo:"11",bicho:i[11]},44:{grupo:"11",bicho:i[11]},45:{grupo:"12",bicho:i[12]},46:{grupo:"12",bicho:i[12]},47:{grupo:"12",bicho:i[12]},48:{grupo:"12",bicho:i[12]},49:{grupo:"13",bicho:i[13]},50:{grupo:"13",bicho:i[13]},51:{grupo:"13",bicho:i[13]},52:{grupo:"13",bicho:i[13]},53:{grupo:"14",bicho:i[14]},54:{grupo:"14",bicho:i[14]},55:{grupo:"14",bicho:i[14]},56:{grupo:"14",bicho:i[14]},57:{grupo:"15",bicho:i[15]},58:{grupo:"15",bicho:i[15]},59:{grupo:"15",bicho:i[15]},60:{grupo:"15",bicho:i[15]},61:{grupo:"16",bicho:i[16]},62:{grupo:"16",bicho:i[16]},63:{grupo:"16",bicho:i[16]},64:{grupo:"16",bicho:i[16]},65:{grupo:"17",bicho:i[17]},66:{grupo:"17",bicho:i[17]},67:{grupo:"17",bicho:i[17]},68:{grupo:"17",bicho:i[17]},69:{grupo:"18",bicho:i[18]},70:{grupo:"18",bicho:i[18]},71:{grupo:"18",bicho:i[18]},72:{grupo:"18",bicho:i[18]},73:{grupo:"19",bicho:i[19]},74:{grupo:"19",bicho:i[19]},75:{grupo:"19",bicho:i[19]},76:{grupo:"19",bicho:i[19]},77:{grupo:"20",bicho:i[20]},78:{grupo:"20",bicho:i[20]},79:{grupo:"20",bicho:i[20]},80:{grupo:"20",bicho:i[20]},81:{grupo:"21",bicho:i[21]},82:{grupo:"21",bicho:i[21]},83:{grupo:"21",bicho:i[21]},84:{grupo:"21",bicho:i[21]},85:{grupo:"22",bicho:i[22]},86:{grupo:"22",bicho:i[22]},87:{grupo:"22",bicho:i[22]},88:{grupo:"22",bicho:i[22]},89:{grupo:"23",bicho:i[23]},90:{grupo:"23",bicho:i[23]},91:{grupo:"23",bicho:i[23]},92:{grupo:"23",bicho:i[23]},93:{grupo:"24",bicho:i[24]},94:{grupo:"24",bicho:i[24]},95:{grupo:"24",bicho:i[24]},96:{grupo:"24",bicho:i[24]},97:{grupo:"25",bicho:i[25]},98:{grupo:"25",bicho:i[25]},99:{grupo:"25",bicho:i[25]},"00":{grupo:"25",bicho:i[25]}};var Qo={required:"Obrigat\xF3rio.",list_length_zero:"Selecione pelo menos um item.",incorrect_login:"Usu\xE1rio e/ou senha incorretos!",incorrect_password:"Senha incorreta.",email_already_in_use:"Este login j\xE1 est\xE1 sendo usado!",invalid_device:"Este login j\xE1 est\xE1 sendo usado em outro dispositivo!"};var Xo={super_admin:{id:"super_admin",label:"Super Administrador"},associacao:{id:"associacao",label:"Associa\xE7\xE3o"},admin:{id:"admin",label:"Administrador"},sub_admin:{id:"sub_admin",label:"Sub-administrador"},digitador_adm:{id:"digitador_adm",label:"Digitador Administrador"},digitador:{id:"digitador",label:"Digitador"},cambista_talao:{id:"cambista_talao",label:"Cambista de tal\xE3o"},cambista:{id:"cambista",label:"Cambista"}};var Pe={PROCESSANDO:{id:"PROCESSANDO",label:"PROCESSANDO",color:"green",showSite:!1,ordem:0},JOGADA:{id:"JOGADA",label:"PULES JOGADAS",color:"green",showSite:!0,ordem:1},AGUARDANDO_CANCELAMENTO:{id:"AGUARDANDO_CANCELAMENTO",label:"AGUARDANDO CANCELAMENTO",color:"yellow",showSite:!0,ordem:3},CANCELADA:{id:"CANCELADA",label:"CANCELADAS",color:"red",showSite:!0,ordem:4}};var Wo={notificacao:{id:"notificacao",label:"Notifica\xE7\xE3o"},impressao:{id:"impressao",label:"Impress\xE3o"}};var Ko={agora:{id:"agora",label:"Agora"},jogo_hoje:{id:"jogo_hoje",label:"Jogo Hoje"},jogo_pre_datado:{id:"jogo_pre_datado",label:"Jogo Pr\xE9-Datado"},resultado:{id:"resultado",label:"Resultado"}};var E="vp_";var C="envio_old_";var w="envio_";var Ne={ENVIANDO:{id:"ENVIANDO",labelBanca:"ENVIANDO",labelAssociacao:"RECEBENDO",color:"blue",showSiteBanca:!0,showSiteAssociacao:!1,order:1},DEVOLVENDO:{id:"DEVOLVENDO",labelBanca:"RECEBENDO",labelAssociacao:"DEVOLVENDO",color:"blue",showSiteBanca:!1,showSiteAssociacao:!1,order:1},ENVIADA:{id:"ENVIADA",labelBanca:"ENVIADA",labelAssociacao:"RECEBIDA",color:"green",showSiteBanca:!0,showSiteAssociacao:!0,order:2},DEVOLVIDA:{id:"DEVOLVIDA",labelBanca:"DEVOLVIDA",labelAssociacao:"DEVOLVIDA",color:"orange",showSiteBanca:!0,showSiteAssociacao:!0,order:3},ERRO:{id:"ERRO",labelBanca:"ERRO",labelAssociacao:"ERRO",color:"red",showSiteBanca:!1,showSiteAssociacao:!1,order:4}};var Yo={Enter:{label:"Enter",value:"enter"},Ctrl:{label:"Ctrl",value:"ctrl"},Tab:{label:"Tab",value:"tab"},Space:{label:"\u23B5",value:"space"},Backspace:{label:"Backspace",value:"backspace"},Escape:{label:"Esc",value:"escape"},Delete:{label:"Del",value:"delete"},Backslash:{label:"\\",value:"backslash"},Semicolon:{label:";",value:"semicolon"},CapsLock:{label:"CapsLock",value:"capslock"},Quote:{label:"'",value:"quote"},Comma:{label:",",value:"decimal,comma"},Insert:{label:"Insert",value:"insert"},Home:{label:"Home",value:"home"},End:{label:"End",value:"end"},PageUp:{label:"Page Up",value:"pageup"},PageDown:{label:"Page Down",value:"pagedown"},ArrowUp:{label:"\u2191",value:"arrowup"},ArrowDown:{label:"\u2193",value:"arrowdown"},ArrowLeft:{label:"\u2190",value:"arrowleft"},ArrowRight:{label:"\u2192",value:"arrowright"},NumLock:{label:"Num Lock",value:"numlock"},Dot:{label:".",value:"period,comma"},Divide:{label:"/",value:"slash,divide"},Subtract:{label:"-",value:"minus,subtract"},Multiply:{label:"*",value:"multiply,shift+8"},Add:{label:"+",value:"add,shift+equal"},Equal:{id:"Equal",label:"=",value:"equal"},F1:{label:"F1",value:"f1"},F2:{label:"F2",value:"f2"},F3:{label:"F3",value:"f3"},F4:{label:"F4",value:"f4"},F5:{label:"F5",value:"f5"},F6:{label:"F6",value:"f6"},F7:{label:"F7",value:"f7"},F8:{label:"F8",value:"f8"},F9:{label:"F9",value:"f9"},F10:{label:"F10",value:"f10"},F11:{label:"F11",value:"f11"},F12:{label:"F12",value:"f12"},0:{label:"0",value:"0"},1:{label:"1",value:"1"},2:{label:"2",value:"2"},3:{label:"3",value:"3"},4:{label:"4",value:"4"},5:{label:"5",value:"5"},6:{label:"6",value:"6"},7:{label:"7",value:"7"},8:{label:"8",value:"8"},9:{label:"9",value:"9"},A:{label:"A",value:"a"},B:{label:"B",value:"b"},C:{label:"C",value:"c"},D:{label:"D",value:"d"},E:{label:"E",value:"e"},F:{label:"F",value:"f"},G:{label:"G",value:"g"},H:{label:"H",value:"h"},I:{label:"I",value:"i"},J:{label:"J",value:"j"},K:{label:"K",value:"k"},L:{label:"L",value:"l"},M:{label:"M",value:"m"},N:{label:"N",value:"n"},O:{label:"O",value:"o"},P:{label:"P",value:"p"},Q:{label:"Q",value:"q"},R:{label:"R",value:"r"},S:{label:"S",value:"s"},T:{label:"T",value:"t"},U:{label:"U",value:"u"},V:{label:"V",value:"v"},W:{label:"W",value:"w"},X:{label:"X",value:"x"},Y:{label:"Y",value:"y"},Z:{label:"Z",value:"z"}};var Zo={EM_ESPERA:{id:"EM_ESPERA",label:"Esperando aprova\xE7\xE3o",color:"orange"},APROVADO:{id:"APROVADO",label:"Aprovado",color:"green"},BLOQUEADO:{id:"BLOQUEADO",label:"Bloqueado",color:"red"}};var P={1:{id:"1",order:1,label:"1\xBA Pr\xEAmio",labelShort:"1\xBA"},2:{id:"2",order:2,label:"2\xBA Pr\xEAmio",labelShort:"2\xBA"},3:{id:"3",order:3,label:"3\xBA Pr\xEAmio",labelShort:"3\xBA"},4:{id:"4",order:4,label:"4\xBA Pr\xEAmio",labelShort:"4\xBA"},5:{id:"5",order:5,label:"5\xBA Pr\xEAmio",labelShort:"5\xBA"},"1-5":{id:"1-5",order:6,label:"1\xBA ao 5\xBA Pr\xEAmio",labelShort:"1\xBA ao 5\xBA"}};var Re={[u.milhar.id]:{id:u.milhar.id,label:u.milhar.label,order:1},[u.centena.id]:{id:u.centena.id,label:u.centena.label,order:2},[u.dezena.id]:{id:u.dezena.id,label:u.dezena.label,order:3},[u.grupo.id]:{id:u.grupo.id,label:u.grupo.label,order:4},[u["terno.dezena"].id]:{id:u["terno.dezena"].id,label:u["terno.dezena"].label,order:5},[u["terno.grupo"].id]:{id:u["terno.grupo"].id,label:u["terno.grupo"].label,order:6},[u["duque.dezena"].id]:{id:u["duque.dezena"].id,label:u["duque.dezena"].label,order:7},[u["duque.grupo"].id]:{id:u["duque.grupo"].id,label:u["duque.grupo"].label,order:8},restante:{id:"restante",label:"Restante",order:9}};var y=e=>({id:e?.id||"system",id_integer:e?.id_integer||"system",role:e?.role||"super_admin",name:e?.name||"Gerado automaticamente pelo sistema",login:e?.login||"system"});var Ie={};z(Ie,{clone:()=>N,combineDateTime:()=>oo,dateToNumber:()=>c,delay:()=>po,dividirArray:()=>lo,formatterBRL:()=>so,formatterPercentage:()=>fo,formatterPercentageDecimal:()=>To,generateId:()=>k,getAllCombinations:()=>ce,getCodigoAuth:()=>me,getDataInicioFim:()=>io,getInitials:()=>go,matchNormalized:()=>uo,normalize:()=>W,numberToDate:()=>b,numbersSelectedFormated:()=>mo,parserBRL:()=>no,parserPercentage:()=>yo,parserPercentageDecimal:()=>ho,pegarHorarioSaoPaulo:()=>m,removerLetters:()=>xo,showFormatDate:()=>I});import jo from"clone-deep";var N=e=>jo(e);import{isValid as er}from"date-fns";var c=e=>{if(!e||!er(e))return 0;let o=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),t=String(e.getDate()).padStart(2,"0"),a=String(e.getHours()).padStart(2,"0"),n=String(e.getMinutes()).padStart(2,"0"),s=String(e.getSeconds()).padStart(2,"0");return+`${o}${r}${t}${a}${n}${s}`};import{parse as rr,isValid as tr}from"date-fns";import or from"moment-timezone";var m=()=>{let e=or.tz(new Date,"America/Sao_Paulo").format("DD_MM_YYYY_HH_mm_ss_SSS"),[o,r,t,a,n,s,f]=e.split("_");return new Date(Number(t),Number(r)-1,Number(o),Number(a),Number(n),Number(s),Number(f))};var b=e=>{if(!e)return;let o=e.toString(),r=o.slice(0,4),t=o.slice(4,6),a=o.slice(6,8),n=o.slice(8,10),s=o.slice(10,12),f=o.slice(12,14),g=`${r}-${t}-${a} ${n}:${s}:${f}`,h=m(),d=rr(g,"yyyy-MM-dd HH:mm:ss",h);return tr(d)?d:void 0};var oo=(e,o)=>{let r=b(e),t=b(o);if(!r||!t)return 0;let a=r.getFullYear(),n=r.getMonth(),s=r.getDate(),f=t.getHours(),g=t.getMinutes(),h=t.getSeconds(),d=new Date(a,n,s,f,g,h,0);return c(d)};import{setHours as ro,setMinutes as to,setSeconds as ao}from"date-fns";var io=({dataAposta:e})=>{let o=ao(to(ro(b(e)||m(),0),0),0),r=ao(to(ro(b(e)||m(),23),59),59);return{dataInicio:c(o),dataFim:c(r)}};var so=e=>{let o=e;return new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(o||0)},no=e=>{let o=e;o=o.replace(/\D/g,"");let r=parseFloat(o||"0");return r/=100,r};var co=e=>{if(e.length===0)return[[]];let o=new Set;for(let r=0;r<e.length;r++){let t=e[r],a=[...e.slice(0,r),...e.slice(r+1)],n=co(a);for(let s of n)o.add([t,...s])}return Array.from(o)},ce=e=>{let o=e.toString().split(""),r=co(o),t=new Set(r.map(a=>a.join("")));return Array.from(t)};import{format as ar}from"date-fns";var I=(e,o)=>{if(!e)return"N/A";let r=b(e);return r?ar(r,o||"dd/MM/yyyy"):"N/A"};var mo=e=>{let o=e.map(Number);if(o.length===0)return"";o.sort((n,s)=>n-s);let r="",t=o[0],a=t;for(let n=1;n<=o.length;n++)n<o.length&&o[n]===a+1?a=o[n]:(t===a?r+=t:r+=`${t} ao ${a}`,n<o.length&&(r+=", ",t=o[n],a=t));return r};var k=e=>{let o=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1);return`${e?`${e}-`:""}${o()+o()}-${o()}-${o()}-${o()}-${o()}${o()}${o()}`};var me=(e,o)=>(e=Math.ceil(e),o=Math.floor(o),Math.floor(Math.random()*(o-e+1))+e);var lo=(e,o=1e3)=>{let r=[];for(let t=0;t<e.length;t+=o){let a=e.slice(t,t+o);r.push(a)}return r};var po=e=>new Promise(o=>setTimeout(o,e));var W=e=>e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");var uo=(e,o)=>W(e).includes(W(o));var go=e=>e?e.trim().split(/\s+/).filter(t=>t.length>=2).slice(0,2).map(t=>t[0].toUpperCase()).join(""):"";var fo=e=>`${new Intl.NumberFormat("pt-BR",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(e||0)} %`;var yo=(e,o)=>(e=e.replace(/\D/g,""),o=o?.replace(/\D/g,""),o?(Number(o)===Number(e)&&(o=o.slice(0,-1)),Number(Number(o||"0").toFixed(2))):Number(Number(e||"0").toFixed(2)));var To=e=>(e*=100,`${new Intl.NumberFormat("pt-BR",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(e||0)} %`),ho=(e,o)=>(e=e.replace(/\D/g,""),o=o?.replace(/\D/g,""),o?(Number(o)===Number(e)&&(o=o.slice(0,-1)),Number(Number(o||"0").toFixed(2))/100):Number(Number(e||"0").toFixed(2))/100);var xo=e=>e.replace(/[^0-9]/g,"");var K=e=>({id:e?.id||"",id_integer:e?.id_integer||"",horario:e?.horario||0,bloqueio:e?.bloqueio||0,bancaId:e?.bancaId||"",ativo:e?.ativo??!0,inativo_no_dia:e?.inativo_no_dia||[],description:e?.description||"",somente_no_feriado:e?.somente_no_feriado||0,createdBy:y(e?.createdBy),updated:e?.updated||c(m()),created:e?.created||c(m()),days:{0:e?.days?.[0]??!1,1:e?.days?.[1]??!1,2:e?.days?.[2]??!1,3:e?.days?.[3]??!1,4:e?.days?.[4]??!1,5:e?.days?.[5]??!1,6:e?.days?.[6]??!1}});var Ge={};z(Ge,{arredondarParaCima:()=>U,calculaValoresDosNumeros:()=>ge,calcularValorDeNumero:()=>pe,formatarNumero:()=>B,generateDescargas:()=>Be,gerarDezenas:()=>Ao,getCreatedBySystem:()=>y,getLimiteSimulado:()=>Po,getNumeroId:()=>de,getNumerosAcimaDoLimite:()=>bo,getPremioFormato:()=>ue,getPropsEnvioId:()=>fe,getPropsEnvioIdOld:()=>ye,getPropsPrefix:()=>Q,getPropsVP:()=>Te,getSomaEnvio:()=>le,getSomaProps:()=>Eo,getSomaVP:()=>vo,getTiposJogos:()=>q,sortNumeros:()=>So});var B=(e,o)=>{let r="",t=e.length-1,a=o.length-1;for(;a>=0;)o[a]==="#"?(r=e[t]+r,t--):o[a]==="-"&&(r="-"+r),a--;return r};var Ce=(e,o)=>{let r=o,t=e?.envioIds?.length>0?e.envioIds[e.envioIds.length-1]:"";return O({...e,id:r,premio:e.premio,amount:e.amount,numeros:[e.numero],amountEnviadoParaAssociacao:e.amountEnviadoParaAssociacao,valorAEnviarParaAssociacao:e.valorAEnviarParaAssociacao,envioId:t,dataAposta:e.dataAposta,bancaId:e.bancaId,valorArredondado:e.valorArredondado,limiteJogoReal:e.limiteJogoReal,limiteJogoSimulado:e.limiteJogoSimulado,valorJogo:e.valorJogo})};var Me=(e,o)=>{let r=o?U(Number(e[o])):U(e.amount);return`${e?.bancaId?`${e?.bancaId}_`:""}${e.dataAposta}_${e.tipo_jogo}_${e.premio}_${r}`};var Be=(e,o)=>{let r={};return Object.entries(e).forEach(([,t])=>{let a=Me(t,o);r[a]?r[a].numeros.push(t.numero):r[a]=Ce(t,a)}),r};var Ao=e=>{let o=[];e.forEach(a=>{let n=u[a.name];a.numbers.forEach(s=>{if(n.id==="dezena"){let h=s.split("-");for(let d of h){if(d.length<n.format.length)continue;let D=B(d,n.format);o.push(D)}return}let f=s.replaceAll("-","");if(f.length<n.format.replaceAll("-","").length)return;let g=B(f,n.format);o.push(g)})});let r=new Set(o);return Array.from(r)};var le=e=>{let o=0;return Object.entries(e).forEach(([r,t])=>{let a=r.split("_");a.includes("envio")&&!a.includes("old")&&typeof t=="number"&&(o+=t)}),o};var vo=e=>{let o=0,r=0;Object.entries(e).forEach(([a,n])=>{a.startsWith("vp_")&&typeof n=="number"&&(o+=n,n>0&&(r+=1))});let t=le(e);return o-=t,{soma:o,quantidadeDePulesMaiorQueZero:r,somaEnviadoParaAssociacao:t}};var de=e=>{let{dataAposta:o,jogo:r,numero:t,bancaId:a,premio:n,descarregado:s}=e,f=u[r],g=f.markAll?t:B(t,f.format),h=s?"true":"false";return(a?`${a}_`:"")+`${o}_${r}_${n}_${g}_${h}`};var q=e=>e.replaceAll(".invertida","").split("@");var pe=({quantidadeDeNumeros:e,tipoJogo:o,valorPremio:r,quantidadeDePremios:t})=>{let a=u[o],n=q(o),s=r/(n.length||1);return s/=e,a.markAll||(s/=t||1),t===0&&(s=0),s};var ue=e=>e===1?P[1].id:e===2?P[2].id:e===3?P[3].id:e===4?P[4].id:e===5?P[5].id:P["1-5"].id;var ge=e=>{let o={},r=m(),t=c(r);for(let a of e.bets){let n=q(a.name),s=a.numbers.length;for(let f of n)for(let g of a.numbers)for(let h of a.prizes)for(let d of h.prizes){let D=u[f],L=pe({valorPremio:h.value,tipoJogo:a.name,quantidadeDeNumeros:s,quantidadeDePremios:h.prizes.length}),R=ue(d),V=g;D.markAll?R="1-5":V=B(g,D.format);let A=de({numero:g,bancaId:e.bancaId,dataAposta:e.dateBet,jogo:f,premio:R});o?.[A]||(o[A]=G({id:A,numero:V,premio:R,created:t,bancaId:e.bancaId,amount:0,dataAposta:e.dateBet,tipo_jogo:f,[`${"vp_"}${e.id}`]:0})),D.markAll?o[A][`${"vp_"}${e.id}`]=Number(L.toFixed(3)):o[A][`${"vp_"}${e.id}`]+=Number(L.toFixed(3))}}return{numeros:o}};var Do=2,bo=(e,o,r)=>e.map(t=>{let a=H.limite_jogos.getValorJogoPeloTipoJogo(o,t.tipo_jogo),n=Object.values(r).find(d=>d.type_game===t.tipo_jogo),s=H.limite_jogos.calcularValorJogoPeloLimite(n?.limit||0,a?.value||0),f=Number(t.amount.toFixed(Do)),g=Number(s.toFixed(Do)),h=f-g;return f>g?{numero:t,diferenca:h}:null}).filter(Boolean);var U=e=>{let o=Math.round(e*100),r=o%5;return r!==0&&(o+=5-r),o/100};var So=e=>{let o=Object.values(e).sort((r,t)=>{let a=u[r.tipo_jogo].order,n=u[t.tipo_jogo].order;return a<n?-1:a>n?1:r.premio<t.premio?-1:r.premio>t.premio?1:r.amount>t.amount?-1:1});return Object.fromEntries(o.map(r=>[r.id,r]))};var fe=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{let a=r.split("_");a.includes("envio")&&!a.includes("old")&&typeof t=="number"&&(o[r]=t)}),o};var ye=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{let a=r.split("_");a.includes("envio")&&a.includes("old")&&typeof t=="number"&&(o[r]=t)}),o};var Te=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{r.startsWith("vp_")&&typeof t=="number"&&(o[r]=t)}),o};var Q=e=>{let o={vp_:{},[w]:{},[C]:{}},r=N(Te(e)),t=N(fe(e)),a=N(ye(e));return o["vp_"]=N(r),o[w]=N(t),o[C]=N(a),o};var Eo=e=>{let o=0;return Object.values(e).forEach(r=>{o+=r}),o};var he=(e,o)=>Object.values(e).find(r=>r.type_game===o);var Oe={};z(Oe,{calcularValorJogoPeloLimite:()=>_o,getLimiteJogoPeloTipoJogo:()=>he,getValorJogoPeloTipoJogo:()=>xe});var _o=(e,o)=>e/(o||1);var xe=(e,o)=>Object.values(e).find(r=>r.type_game===o);var Po=(e,o,r)=>{let t=xe(o,e);return(he(r,e)?.limit||0)/(t?.value||1)};var Le={};z(Le,{extracaoEstaAtivaBoolean:()=>wo,extracaoEstaAtivaTryCatch:()=>be,getAvailableTimes:()=>Bo,pegarExtracoes:()=>Go});import{format as we,getDay as cr}from"date-fns";var Fe={};z(Fe,{calculateAmount:()=>Ae,calculateAmountGame:()=>ve,fazerJogo:()=>Io,formatPuleId:()=>No,getBetDateToNumber:()=>F,getFormattedPuleId:()=>Ro,getGamesUnicosList:()=>Co,getGamesUnicosObjeto:()=>Mo,invertGame:()=>De});var Ae=e=>{let o=0;return e.forEach(r=>{o+=r.value}),o};var ve=e=>{let o=0;return e.forEach(r=>{o+=Ae(r.prizes)}),o};import{setHours as ir,setMinutes as sr,setSeconds as nr}from"date-fns";var F=(e,o)=>{let t=b(o),a=b(e);return!a||!t?0:(a=ir(a,t.getHours()),a=sr(a,t.getMinutes()),a=nr(a,0),c(a))};var No=e=>e<1e3?e.toString().padStart(4,"0"):e.toString();var Ro=e=>{let o=e.split("-");return o[o.length-1]};var De=e=>{let o=N(e);for(let r=0;r<o.bets.length;r++){let t=o.bets[r];if(t.name==="milhar.invertida"||t.name==="centena.invertida"||t.name==="milhar.invertida@centena.invertida"){let a=t.numbers,n=[];for(let s of a){let f=ce(s);n.push(...f)}t={...t,numbers:N(n)},o.bets[r]=t}}return o};var Io=(e,o,r,t,a)=>{let n=J({...e,id:a,creator:o,dateBet:F(r,t.horario),totalAmount:ve(e.bets),extracao:t}),s=De(n),{numeros:f}=ge(s);return{numeros:f,game:n}};var Co=()=>Object.values(u).filter(e=>!e.id.includes("@")&&!e.id.includes("invertida")),Mo=()=>Object.values(u).filter(r=>!r.id.includes("@")&&!r.id.includes("invertida")).reduce((r,t)=>(r[t.id]=t,r),{});var Bo=(e,o,r,t,a)=>{let n=F(o,20241001e6),s=e.filter(d=>d.ativo&&!d.inativo_no_dia.includes(n)),f=b(n),g=[],h=s.filter(d=>d.somente_no_feriado===n);return h.length>0?g=[...h]:g=s.filter(d=>f&&d.days[cr(f)]&&d.somente_no_feriado===0),r&&(g=[...s]),t&&f&&a&&we(a,"dd/MM/yyyy")===we(f,"dd/MM/yyyy")&&(g=g.filter(d=>Number(we(a,"HHmm"))<Number(I(d.bloqueio,"HHmm")))),g.sort((d,D)=>Number(I(d.horario,"HHmm"))<Number(I(D.horario,"HHmm"))?-1:1)};import{format as mr,getDay as lr}from"date-fns";var Go=({extracoes:e,dataAposta:o=c(m()),dataAgora:r=c(m()),retornar:t="do_dia",pegar:a="bloqueio"})=>{let n=A=>a==="horario"?A.horario:a==="bloqueio"?A.bloqueio:0,s=F(o,20241001e6),f=F(r,20241001e6),g=b(s);if(!g)throw new Error("dataApostaDate \xE9 obrigat\xF3ria!");let h=e.filter(A=>A.ativo&&!A.inativo_no_dia.includes(s)),d=h.filter(A=>A.somente_no_feriado===s),D=d.length>0?d:h.filter(A=>A.days[lr(g)]&&A.somente_no_feriado===0);if(t==="do_dia")return D.sort(Oo);let L=b(r);if(!L)throw new Error("dataAgoraDate \xE9 obrigat\xF3ria!");let R=Number(mr(L,"HHmm"));return(t==="proximas"?D.filter(A=>s===f?R<Number(I(n(A),"HHmm")):s>f):t==="anteriores"?D.filter(A=>f===s?R>=Number(I(n(A),"HHmm")):s<f):[]).sort(Oo)},Oo=(e,o)=>Number(I(e.horario,"HHmm"))-Number(I(o.horario,"HHmm"));import{getDay as Fo}from"date-fns";var be=(e,o)=>{if(!o.ativo)throw new Error("Extra\xE7\xE3o n\xE3o est\xE1 ativa.");if(o.inativo_no_dia.includes(e))throw new Error("Extra\xE7\xE3o est\xE1 inativa no dia da aposta.");if(o.somente_no_feriado!==0&&o.somente_no_feriado!==e)throw new Error("Extra\xE7\xE3o n\xE3o funciona neste feriado.");let r=b(e);if(!r)throw new Error("Data da aposta inv\xE1lida.");if(!o.days[Fo(r)]){let a=["domingo","segunda-feira","ter\xE7a-feira","quarta-feira","quinta-feira","sexta-feira","s\xE1bado"][Fo(r)];throw new Error(`Extra\xE7\xE3o n\xE3o funciona neste dia da semana (${a}).`)}};var wo=(e,o)=>{try{return be(e,o),!0}catch{return!1}};var Xe={};z(Xe,{getLimitsRest:()=>Vo,getPermission:()=>Lo,isAdm:()=>Ve,isAdmOrSubAdm:()=>Je,isAssociacao:()=>ze,isCambista:()=>ke,isCambistaTalao:()=>$e,isDigitador:()=>He,isDigitadorAdm:()=>qe,isDigitadorOrDigitadorAdm:()=>Qe,isSuperAdm:()=>Ue});var dr=["admin"],pr=["admin","sub_admin"],ur=["associacao"],gr=["super_admin"],fr=["cambista_talao"],yr=["cambista"],Tr=["digitador_adm"],hr=["digitador"],xr=["digitador","digitador_adm"],Ve=e=>dr.includes(e.role),ze=e=>ur.includes(e.role),Ue=e=>gr.includes(e.role),Je=e=>pr.includes(e.role),$e=e=>fr.includes(e.role),ke=e=>yr.includes(e.role),qe=e=>Tr.includes(e.role),He=e=>hr.includes(e.role),Qe=e=>xr.includes(e.role),Lo={isAdm:Ve,isAssociacao:ze,isSuperAdm:Ue,isAdmOrSubAdm:Je,isCambistaTalao:$e,isCambista:ke,isDigitadorAdm:qe,isDigitador:He,isDigitadorOrDigitadorAdm:Qe};var Vo=e=>{let o=0,r=0;return Object.values(e.jogos.hoje).forEach(t=>o+=t),Object.values(e.jogos.pre).forEach(t=>r+=t),{hoje:o,pre:r}};var We={};z(We,{generateDescarga:()=>Ce,generateDescargas:()=>Be,getDescargaIdPeloEnvio:()=>Er,getDescargaIdPeloNumero:()=>Me,getDescargasAcimaDoLimite:()=>vr,getPropsEnvioId:()=>br,getPropsEnvioIdOldDescarga:()=>Sr,getPropsVPDescarga:()=>Dr,getTotalGeralDescarga:()=>_r,sortDescargas:()=>Ar});var Ar=e=>{let o=Object.values(e).sort((r,t)=>{let a=u[r.tipo_jogo].order,n=u[t.tipo_jogo].order;return a<n?-1:a>n?1:r.premio<t.premio?-1:r.premio>t.premio?1:t.amount-r.amount});return Object.fromEntries(o.map(r=>[r.id,r]))};var zo=2,vr=(e,o,r)=>e.map(t=>{let a=H.limite_jogos.getValorJogoPeloTipoJogo(o,t.tipo_jogo),n=Object.values(r).find(d=>d.type_game===t.tipo_jogo),s=H.limite_jogos.calcularValorJogoPeloLimite(n?.limit||0,a?.value||0),f=Number(t.amount.toFixed(zo)),g=Number(s.toFixed(zo)),h=f-g;return f>g?{descarga:t,diferenca:h}:null}).filter(Boolean);var Dr=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{r.split("_").includes("vp_")&&typeof t=="number"&&(o[r]=t)}),o};var br=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{let a=r.split("_");a.includes("envio")&&!a.includes("old")&&typeof t=="number"&&(o[r]=t)}),o};var Sr=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{let a=r.split("_");a.includes("envio")&&a.includes("old")&&typeof t=="number"&&(o[r]=t)}),o};var Er=(e,o)=>{let r=`${C}${o}`,t=e[r];if(t==null)throw new Error(`Valor do envio '${o}' n\xE3o encontrado no n\xFAmero.`);if(typeof t!="number")throw new Error(`Valor do envio '${o}' deve ser um n\xFAmero.`);let a=U(t);return`${e?.bancaId?`${e?.bancaId}_`:""}${e.dataAposta}_${e.tipo_jogo}_${e.premio}_${a}_envio_${o}`};var _r=(e,o)=>{let r={jogos:{},totalBruto:0,totalLiquido:0,totalComissao:0},t=Object.entries(e),a=Object.values(o),n=a.find(s=>s.type_game==="restante");for(let[s,f]of t){let g=f??0,h=a.find(d=>s===d.type_game);if(r.totalBruto+=g,h){let d=Re[s];r.jogos[s]={totalEnviado:g,ordem:d?.order||0,tipo:s,label:d?.label||s};let D=g*(h.porcentagem/100);r.totalLiquido+=g-D,r.totalComissao+=D}else if(r.jogos.restante||(r.jogos.restante={totalEnviado:0,ordem:9,tipo:"restante",label:"Restante"}),r.jogos.restante.totalEnviado+=g,n){let d=g*(n.porcentagem/100);r.totalLiquido+=g-d,r.totalComissao+=d}else r.totalLiquido+=g}return r};var H={numbers:Ge,extracao:Le,descarga:We,games:Fe,users:Xe,limite_jogos:Oe,utils:Ie};var Y=e=>({id:e?.id||"",id_integer:e?.id_integer||"",extracaoIds:e?.extracaoIds||[],content:e?.content||"",visualizacao:e?.visualizacao||"jogo_hoje",bancaId:e?.bancaId||"",createdBy:y(e?.createdBy),date:{from:e?.date?.from||0,to:e?.date?.to||0},fixa:e?.date?.to===0||e?.date?.from===0,tipo:e?.tipo||[],updated:e?.updated||c(m()),created:e?.created||c(m())});var Z=e=>({id:e?.id||"",id_integer:e?.id_integer||"",createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m()),bancaId:e?.bancaId||"",extracao:{id:e?.extracao?.id||"",id_integer:e?.extracao?.id_integer||"",horario:e?.extracao?.horario||0,description:e?.extracao?.description||""},milhares:{1:e?.milhares?.[1]??"",2:e?.milhares?.[2]??"",3:e?.milhares?.[3]??"",4:e?.milhares?.[4]??"",5:e?.milhares?.[5]??""},grupos:{1:e?.grupos?.[1]??"",2:e?.grupos?.[2]??"",3:e?.grupos?.[3]??"",4:e?.grupos?.[4]??"",5:e?.grupos?.[5]??""},bichos:{1:e?.bichos?.[1]??"",2:e?.bichos?.[2]??"",3:e?.bichos?.[3]??"",4:e?.bichos?.[4]??"",5:e?.bichos?.[5]??""},liberado:e?.liberado??!1,dataSorteio:e?.dataSorteio||0});var j=e=>({id:e?.id||"",id_integer:e?.id_integer||"",comission:e?.comission??0,name:e?.name||"",responsible:e?.responsible||"",codigo_rota:e?.codigo_rota||"",tipo:e?.tipo||"cambista",bancaId:e?.bancaId||"",createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var X=e=>({id:e?.id??"",id_integer:e?.id_integer||"",active:e?.active??!0,bet_limit:e?.bet_limit??0,comission:e?.comission??0,bancaId:e?.bancaId||"",photoURL:e?.photoURL||"",name:e?.name||"",sessionId:e?.sessionId||"",codigo_cambista:e?.codigo_cambista||"",deviceId:e?.deviceId||"",role:e?.role||"cambista",pre_date_limit:e?.pre_date_limit||0,dispositivos:{dispositivoIdAtual:e?.dispositivos?.dispositivoIdAtual||"",listaDispositivosConectados:e?.dispositivos?.listaDispositivosConectados||[]},route:{id:e?.route?.id||"",name:e?.route?.name||"",tipo:e?.route?.tipo||"cambista"},type_games:e?.type_games?e?.type_games.filter(o=>u?.[o]?.id):[],login:e?.login||"",jogos:{hoje:e?.jogos?.hoje||{},pre:e?.jogos?.pre||{}},preferences:{pdfLegado:e?.preferences?.pdfLegado??!1},permissoes:{podeCancelarPule:e?.permissoes?.podeCancelarPule??!1,podeReservar:e?.permissoes?.podeReservar??!1,podeJogarSurpresinha:e?.permissoes?.podeJogarSurpresinha??!0},createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var ee=e=>({id:e?.id||"",id_integer:e?.id_integer||"",type_game:e?.type_game||"milhar",bancaId:e?.bancaId||"",value:e?.value??0,createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var J=(e={})=>({id:e?.id||"",id_integer:e?.id_integer||"",origem_pule_id:e?.origem_pule_id||"",bets:e.bets||[],creator:{id:e?.creator?.id||"",id_integer:e?.creator?.id_integer||"",codigo_cambista:e?.creator?.codigo_cambista||"",name:e?.creator?.name||"",role:e?.creator?.role||"cambista",login:e?.creator?.login||"",comission:e?.creator?.comission||0,route:{id:e?.creator?.route?.id||"",name:e?.creator?.route?.name||"",tipo:e?.creator?.route?.tipo||"cambista"}},createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m()),totalAmount:e?.totalAmount||0,bancaId:e?.bancaId||"",codigoAuth:e?.codigoAuth||me(1e5,999999).toString(),cancel:{canceled:e?.cancel?.canceled??!1,canceledAt:e?.cancel?.canceledAt||0,reason:e?.cancel?.reason||""},valorNumerosNaPule:e?.valorNumerosNaPule||{},infoJogos:e?.infoJogos||[],tiposJogos:e?.tiposJogos||{},reservada:e?.reservada||!1,dias_disponiveis:e?.dias_disponiveis||[],dateBet:e?.dateBet||0,status:e.status||Pe.JOGADA.id,statusReason:e?.statusReason||"",extracao:{id:e?.extracao?.id||"",id_integer:e?.extracao?.id_integer||"",description:e?.extracao?.description||"",bloqueio:e?.extracao?.bloqueio||0,horario:e?.extracao?.horario||0}});var G=(e={})=>{let o=P[e?.premio||"1"].order,r=u[e?.tipo_jogo||"milhar"].order,t={id:e?.id||"",id_integer:e?.id_integer||"",envioIds:e?.envioIds||[],ordemPremioExibicao:o,ordemJogoExibicao:r,numero:e?.numero||"",amount:e?.amount||0,premio:e?.premio||"1",bancaId:e?.bancaId||"",valorArredondado:e?.valorArredondado||0,limiteJogoReal:e?.limiteJogoReal||0,limiteJogoSimulado:e?.limiteJogoSimulado||0,valorJogo:e?.valorJogo||0,amountEnviadoParaAssociacao:e?.amountEnviadoParaAssociacao||0,valorAEnviarParaAssociacao:e?.valorAEnviarParaAssociacao||0,tipo_jogo:e?.tipo_jogo||"milhar",createdBy:y(e?.createdBy),updated:e?.updated||c(m()),created:e?.created||c(m()),descarregado:e?.descarregado??!1,dataAposta:e?.dataAposta||0},a=Q(e);return t={...t,...a["vp_"],...a[w],...a[C]},t};var Pr=(e={})=>({name:e?.name||"milhar",numbers:e?.numbers||[],prizes:e?.prizes||[]});var oe=(e={})=>({id:e?.id||"",id_integer:e?.id_integer||"",dataAposta:e?.dataAposta||0,bancaId:e?.bancaId||"",pule:{id:e?.pule?.id||"",id_integer:e?.pule?.id_integer||"",created:e?.pule?.created||0,cancel:{canceled:e?.pule?.cancel?.canceled||!1,canceledAt:e?.pule?.cancel?.canceledAt||0,reason:e?.pule?.cancel?.reason||""},createdBy:{id:e?.pule?.createdBy?.id||"",id_integer:e?.pule?.createdBy?.id_integer||"",role:e?.pule?.createdBy?.role||"cambista",name:e?.pule?.createdBy?.name||"",login:e?.pule?.createdBy?.login||""},creator:{id:e?.pule?.creator?.id||"",id_integer:e?.pule?.creator?.id_integer||"",codigo_cambista:e?.pule?.creator?.codigo_cambista||"",login:e?.pule?.creator?.login||"",name:e?.pule?.creator?.name||"",role:e?.pule?.creator?.role||"cambista",comission:e?.pule?.creator?.comission||0,route:{id:e?.pule?.creator?.route?.id||"",name:e?.pule?.creator?.route?.name||"",tipo:e?.pule?.creator?.route?.tipo||"cambista"}}},premiosItems:e?.premiosItems||[],valorTotalPremio:e?.valorTotalPremio||0,valorTotalPremioBanca:e?.valorTotalPremioBanca||0,valorTotalPremioAssociacao:e?.valorTotalPremioAssociacao||0,createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var $=(e={})=>({id:e?.id||"",id_integer:e?.id_integer||"",dataAposta:e?.dataAposta||0,descargas:e?.descargas||{},link_pdf:e?.link_pdf||"",bancaId:e.bancaId||"",visualizado:e?.visualizado||!1,createdBy:y(e?.createdBy),created:e?.created||0,updated:e?.updated||0});var re=(e={})=>({id:e?.id||"",nome:e?.nome||"",settings:{urlLogo:e?.settings?.urlLogo||"",urlLogoImpressao:e?.settings?.urlLogoImpressao||"",urlBackground:e?.settings?.urlBackground||"",backgroundColor:e?.settings?.backgroundColor||""},endereco:{cep:e?.endereco?.cep||"",logradouro:e?.endereco?.logradouro||"",numero:e?.endereco?.numero||"",bairro:e?.endereco?.bairro||"",cidade:e?.endereco?.cidade||"",estado:e?.endereco?.estado||""},createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var te=(e={})=>({id:e?.id||"",tipo:e?.tipo||"add",bancaId:e?.bancaId||"",message:e?.message||"",colecao:e?.colecao||"",documentId:e?.documentId||"",author:y(e?.author),document:e?.document||{},updated:e?.updated||c(m()),created:e?.created||c(m())});var ae=e=>({id:e?.id||"",id_integer:e?.id_integer||"",type_game:e?.type_game||"milhar",bancaId:e?.bancaId||"",limit:e?.limit??0,createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var ie=e=>({id:e?.id||"",id_integer:e?.id_integer||"",visualizado:e?.visualizado||!1,banca:{id:e?.banca?.id||"",nome:e?.banca?.nome||""},dataAposta:e?.dataAposta||0,totalGeralJogos:{milhar:e?.totalGeralJogos?.milhar||0,centena:e?.totalGeralJogos?.centena||0,dezena:e?.totalGeralJogos?.dezena||0,grupo:e?.totalGeralJogos?.grupo||0,"terno.dezena":e?.totalGeralJogos?.["terno.dezena"]||0,"terno.grupo":e?.totalGeralJogos?.["terno.grupo"]||0,"duque.dezena":e?.totalGeralJogos?.["duque.dezena"]||0,"duque.grupo":e?.totalGeralJogos?.["duque.grupo"]||0},extracao:{id:e?.extracao?.id||"",id_integer:e?.extracao?.id_integer||"",description:e?.extracao?.description||"",bloqueio:e?.extracao?.bloqueio||0,horario:e?.extracao?.horario||0},devolvidoPor:{id:e?.devolvidoPor?.id||"",id_integer:e?.devolvidoPor?.id_integer||"",name:e?.devolvidoPor?.name||"",login:e?.devolvidoPor?.login||""},bancaId:e?.bancaId||"",description:e?.description||"",createdBy:y(e?.createdBy),updated:e?.updated||c(m()),created:e?.created||c(m()),status:e?.status||Ne.ENVIANDO.id,totalEnviados:e?.totalEnviados||0,totalRegistros:e?.totalRegistros||0,progresso:e?.progresso||0,mensagem:e?.mensagem||"",concluidoEm:e?.concluidoEm||0,ultimaAtualizacao:e?.ultimaAtualizacao||0,metricas:{tempoMinimo:e?.metricas?.tempoMinimo||0,tempoMaximo:e?.metricas?.tempoMaximo||0,tempoMedio:e?.metricas?.tempoMedio||0,duracaoTotal:e?.metricas?.duracaoTotal||0,tempoEstimado:e?.metricas?.tempoEstimado||0,velocidadeProcessamento:e?.metricas?.velocidadeProcessamento||0,textosFormatados:{duracaoTotalText:e?.metricas?.textosFormatados?.duracaoTotalText||"",tempoMinimoText:e?.metricas?.textosFormatados?.tempoMinimoText||"",tempoMaximoText:e?.metricas?.textosFormatados?.tempoMaximoText||"",tempoMedioText:e?.metricas?.textosFormatados?.tempoMedioText||"",tempoEstimadoText:e?.metricas?.textosFormatados?.tempoEstimadoText||""}},atualizadoEm:e?.atualizadoEm||0,erro:e?.erro||"",iniciadoEm:e?.iniciadoEm||0,user:{id:e?.user?.id||"",id_integer:e?.user?.id_integer||"",name:e?.user?.name||"",login:e?.user?.login||""},valoresJogos:e?.valoresJogos||[],limitesJogos:e?.limitesJogos||[],comissoesDescarga:e?.comissoesDescarga||[]});var O=(e={})=>{let o=P[e?.premio||"1"].order,r=u[e?.tipo_jogo||"milhar"].order,t={id:e?.id||"",ordemJogoExibicao:r,ordemPremioExibicao:o,numeros:e?.numeros||[],quantidadeDeNumeros:e?.quantidadeDeNumeros||0,bancaId:e?.bancaId||"",amountEnviadoParaAssociacao:e?.amountEnviadoParaAssociacao||0,valorAEnviarParaAssociacao:e?.valorAEnviarParaAssociacao||0,envioId:e?.envioId||"",amount:e?.amount||0,limiteJogoReal:e?.limiteJogoReal||0,limiteJogoSimulado:e?.limiteJogoSimulado||0,valorJogo:e?.valorJogo||0,valorArredondado:e?.valorArredondado||0,dataAposta:e?.dataAposta||0,premio:e?.premio||"1",tipo_jogo:e?.tipo_jogo||"milhar",createdBy:y(e?.createdBy),updated:e?.updated||c(m()),created:e?.created||c(m())},a=Q(e);return t={...t,...a["vp_"],...a[w],...a[C]},t};var se=(e={})=>({id:e?.id||"",userId:e?.userId||"",createdBy:e?.createdBy||y(),created:e?.created||c(m()),updated:e?.updated||c(m()),deviceId:e?.deviceId||"",deviceName:e?.deviceName||"",status:e?.status||"EM_ESPERA",ultimoLogin:e?.ultimoLogin||0,plataforma:e?.plataforma||"mobile",ip:e?.ip||"",versaoApp:e?.versaoApp||""});var ne=(e={})=>({id:e?.id||"",id_integer:e?.id_integer||"",dataAposta:e?.dataAposta||0,bancaId:e?.bancaId||"",numero:e?.numero||"",premio:e?.premio||"",tipo_jogo:e?.tipo_jogo||"milhar",valorPremioAReceber:e?.valorPremioAReceber||0,valorEnviadoParaAssociacao:e?.valorEnviadoParaAssociacao||0,limiteTipoJogo:e?.limiteTipoJogo||0,valorTipoJogo:e?.valorTipoJogo||0,pulesGanhadoras:e?.pulesGanhadoras||{},createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var Ke=(e={})=>({id:e?.id||"",id_integer:e?.id_integer||"",type_game:e?.type_game||"milhar",bancaId:e?.bancaId||"",porcentagem:e?.porcentagem||0,createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var Nr={mensagens:Y,users:X,valores_jogos:ee,limites_jogos:ae,pules:J,extracoes:K,resultados:Z,rotas:j,envios_descarga:ie,numeros:G,numeros_enviados:G,descargas:O,descargas_associacao:O,premiacoes:oe,premiacoes_associacao:ne,pdf_descargas:$,pdf_descargas_associacao:$,bancas:re,auditLogs:te,dispositivos:se,comissoes_descarga:Ke};var Ye=class{cache=new Map;ttl;maxSize;constructor(o=3e5,r=1e3){this.ttl=o,this.maxSize=r}get(o){let r=this.cache.get(o);return r?Date.now()-r.timestamp>this.ttl?(this.cache.delete(o),null):r.data:null}set(o,r){if(this.cache.size>=this.maxSize){let t=this.cache.keys().next().value;t&&this.cache.delete(t)}this.cache.set(o,{data:r,timestamp:Date.now()})}delete(o){this.cache.delete(o)}clear(){this.cache.clear()}};function v(e,o,r){let{collectionName:t,model:a,idSearchStrategy:n,isolation:s,cache:f,authorization:g,generateId:h}=r,d=f?.enabled?new Ye(f.ttl,f.maxSize):null,D=l=>{if(!g?.enabled)return;let p=g.getUserRole(),T=g.allowedRoles[l];if(!(!T||T.length===0)){if(!p)throw g.onUnauthorized?.(l,p),new Error(`\u274C N\xE3o autorizado: Opera\xE7\xE3o '${l}' requer autentica\xE7\xE3o na cole\xE7\xE3o '${t}'`);if(!T.includes(p))throw g.onUnauthorized?.(l,p),new Error(`\u274C N\xE3o autorizado: Role '${p}' n\xE3o tem permiss\xE3o para '${l}' na cole\xE7\xE3o '${t}'. Roles permitidas: ${T.join(", ")}`)}},L=()=>{if(!s?.enabled)return[];let l=s.getValue();return l?[{field:s.fieldName,operator:"==",value:l}]:[]},R=l=>{let p=[];L().forEach(({field:S,operator:_,value:M})=>{p.push(o.where(S.toString(),_,M))}),l?.where?.forEach(({field:S,operator:_,value:M})=>{p.push(o.where(S.toString(),_,M))}),l?.orderBy?.forEach(({field:S,direction:_})=>{p.push(o.orderBy(S.toString(),_))}),l?.limit&&p.push(o.limit(l.limit)),l?.startAfter!==void 0&&p.push(o.startAfter(l.startAfter)),l?.startAt!==void 0&&p.push(o.startAt(l.startAt)),l?.endBefore!==void 0&&p.push(o.endBefore(l.endBefore)),l?.endAt!==void 0&&p.push(o.endAt(l.endAt));let x=o.collection(e,t);return o.query(x,...p)},V=async l=>{switch(n.type){case"documentId":return o.doc(e,t,l);case"field":let p=R({where:[{field:n.fieldName,operator:"==",value:l}],limit:1}),T=await o.getDocs(p);if(T.empty)throw new Error(`Document not found with ${String(n.fieldName)}: ${l}`);return T.docs[0].ref;case"custom":return n.resolver(l);default:throw new Error(`Unknown idSearchStrategy: ${n.type}`)}},A=(l,...p)=>{let T=s?.enabled?`_${s.getValue()}`:"";return`${t}${T}_${l}_${JSON.stringify(p)}`};return{get:async l=>{try{if(D("read"),d){let x=A("get",l),S=d.get(x);if(S)return S}let p;if(n.type==="documentId"){let x=o.doc(e,t,l);p=await o.getDoc(x)}else if(n.type==="field"){let x=R({where:[{field:n.fieldName,operator:"==",value:l}],limit:1});p=(await o.getDocs(x)).docs[0]||null}else{let x=await V(l);p=await o.getDoc(x)}if(!p?.exists())return null;let T=a(p.data());if(d){let x=A("get",l);d.set(x,T)}return T}catch(p){return console.error(`Error getting document ${l}:`,p),null}},getAll:async l=>{try{D("read");let p=R(l),T=await o.getDocs(p),x={};return T.forEach(S=>{let _=a(S.data());x[_.id]=_}),x}catch(p){return console.error("Error getting all documents:",p),{}}},listen:(l,p)=>{D("read");let T=R(l);return o.onSnapshot(T,x=>{let S={};x.forEach(_=>{let M=a(_.data());S[M.id]=M}),p(S)})},add:async l=>{try{D("write");let p=l.id||h?.()||o.generateId(),T={...l,id:p};s?.enabled&&s.getValue()&&(T[s.fieldName]=s.getValue());let x=o.doc(e,t,p),S=a(T);return await o.setDoc(x,S),d&&d.delete(A("get",p)),p}catch(p){throw console.error("Error adding document:",p),p}},update:async(l,p)=>{try{D("write");let T=await V(l),x={...p};s?.enabled&&s.getValue()&&(x[s.fieldName]=s.getValue()),await o.updateDoc(T,x),d&&d.delete(A("get",l))}catch(T){throw console.error(`Error updating document ${l}:`,T),T}},remove:async l=>{try{D("delete");let p=await V(l);await o.deleteDoc(p),d&&d.delete(A("get",l))}catch(p){throw console.error(`Error removing document ${l}:`,p),p}},batch:async l=>{try{new Set(l.map(x=>x.operation)).forEach(x=>{D(x==="delete"?"delete":"write")});let T=o.writeBatch(e);for(let{id:x,data:S,operation:_}of l){let M=x||h?.()||o.generateId(),Ee=o.doc(e,t,M),_e={...S,id:M};s?.enabled&&s.getValue()&&(_e[s.fieldName]=s.getValue());let $o=a(_e);switch(_){case"add":o.batchSet(T,Ee,$o);break;case"update":o.batchUpdate(T,Ee,_e);break;case"delete":o.batchDelete(T,Ee);break}}await o.batchCommit(T),d&&d.clear()}catch(p){throw console.error("Error in batch operation:",p),p}},clearCache:()=>d?.clear(),getCacheSize:()=>d?.cache.size||0}}var Uo=e=>{try{return e&&typeof e.getFirestore=="function"||e&&typeof e.collection=="function"&&typeof e.doc=="function"&&typeof e.query=="function"&&typeof e.where=="function"?"v9-modular":e&&typeof e.firestore=="function"||e&&typeof e.collection=="function"&&typeof e.doc=="function"&&typeof e.batch=="function"?"v8":e&&e.initializeApp&&typeof e.initializeApp=="function"?"v9-modular":"unknown"}catch(o){return console.warn("Erro ao detectar vers\xE3o do Firebase:",o),"unknown"}},Jo=e=>({collection:(o,r)=>e.collection(o,r),doc:(o,r,...t)=>e.doc(o,r,...t),query:(o,...r)=>e.query(o,...r),where:(o,r,t)=>e.where(o,r,t),orderBy:(o,r="asc")=>e.orderBy(o,r),limit:o=>e.limit(o),startAfter:(...o)=>e.startAfter(...o),startAt:(...o)=>e.startAt(...o),endBefore:(...o)=>e.endBefore(...o),endAt:(...o)=>e.endAt(...o),getDocs:e.getDocs,getDoc:e.getDoc,setDoc:e.setDoc,updateDoc:e.updateDoc,deleteDoc:e.deleteDoc,writeBatch:e.writeBatch,batchSet:(o,r,t)=>o.set(r,t),batchUpdate:(o,r,t)=>o.update(r,t),batchDelete:(o,r)=>o.delete(r),batchCommit:o=>o.commit(),onSnapshot:e.onSnapshot,generateId:()=>k()}),Ze=()=>({collection:(e,o)=>e.collection(o),doc:(e,o,...r)=>e.collection(o).doc(r.join("/")),query:(e,...o)=>{let r=e;return o.forEach(t=>{t.type==="where"?r=r.where(t.field,t.opStr,t.value):t.type==="orderBy"?r=r.orderBy(t.field,t.direction):t.type==="limit"?r=r.limit(t.limit):t.type==="startAfter"?r=r.startAfter(...t.values):t.type==="startAt"?r=r.startAt(...t.values):t.type==="endBefore"?r=r.endBefore(...t.values):t.type==="endAt"&&(r=r.endAt(...t.values))}),r},where:(e,o,r)=>({type:"where",field:e,opStr:o,value:r}),orderBy:(e,o="asc")=>({type:"orderBy",field:e,direction:o}),limit:e=>({type:"limit",limit:e}),startAfter:(...e)=>({type:"startAfter",values:e}),startAt:(...e)=>({type:"startAt",values:e}),endBefore:(...e)=>({type:"endBefore",values:e}),endAt:(...e)=>({type:"endAt",values:e}),getDocs:e=>e.get(),getDoc:e=>e.get(),setDoc:(e,o,r)=>e.set(o,r),updateDoc:(e,o)=>e.update(o),deleteDoc:e=>e.delete(),writeBatch:e=>e.batch(),batchSet:(e,o,r)=>e.set(o,r),batchUpdate:(e,o,r)=>e.update(o,r),batchDelete:(e,o)=>e.delete(o),batchCommit:e=>e.commit(),onSnapshot:(e,o)=>e.onSnapshot(o),generateId:()=>k()}),Se=e=>{let o=Uo(e);switch(console.log(`\u{1F525} Firebase version detected: ${o}`),o){case"v9-modular":return Jo(e);case"v8":return Ze();default:return console.warn("\u26A0\uFE0F Firebase version not detected, falling back to v8 adapter"),Ze()}},Rr=(e,o,r)=>{let t=Se(e);return v(o,t,r)},je=()=>({collection:(e,o)=>e.collection(o),doc:(e,o,...r)=>e.collection(o).doc(r.join("/")),query:(e,...o)=>{let r=e;return o.forEach(t=>{t.type==="where"?r=r.where(t.field,t.opStr,t.value):t.type==="orderBy"?r=r.orderBy(t.field,t.direction):t.type==="limit"?r=r.limit(t.limit):t.type==="startAfter"?r=r.startAfter(...t.values):t.type==="startAt"?r=r.startAt(...t.values):t.type==="endBefore"?r=r.endBefore(...t.values):t.type==="endAt"&&(r=r.endAt(...t.values))}),r},where:(e,o,r)=>({type:"where",field:e,opStr:o,value:r}),orderBy:(e,o="asc")=>({type:"orderBy",field:e,direction:o}),limit:e=>({type:"limit",limit:e}),startAfter:(...e)=>({type:"startAfter",values:e}),startAt:(...e)=>({type:"startAt",values:e}),endBefore:(...e)=>({type:"endBefore",values:e}),endAt:(...e)=>({type:"endAt",values:e}),getDocs:e=>e.get(),getDoc:e=>e.get(),setDoc:(e,o,r)=>e.set(o,r),updateDoc:(e,o)=>e.update(o),deleteDoc:e=>e.delete(),writeBatch:e=>e.batch(),batchSet:(e,o,r)=>e.set(o,r),batchUpdate:(e,o,r)=>e.update(o,r),batchDelete:(e,o)=>e.delete(o),batchCommit:e=>e.commit(),onSnapshot:(e,o)=>e.onSnapshot(o),generateId:()=>k()});var Ir=(e,o={enabled:!0,ttl:3e5,maxSize:1e3},r)=>{let t=n=>({...n,isolation:e?{enabled:!0,fieldName:"bancaId",getValue:e}:void 0,cache:o,authorization:r?.[n.collectionName]}),a=n=>({...n,cache:o,authorization:r?.[n.collectionName]});return{users_associacao:a({collectionName:"users",model:X,idSearchStrategy:{type:"documentId"}}),users:t({collectionName:"users",model:X,idSearchStrategy:{type:"documentId"}}),bancas:a({collectionName:"bancas",model:re,idSearchStrategy:{type:"documentId"}}),extracoes:t({collectionName:"extracoes",model:K,idSearchStrategy:{type:"documentId"}}),resultados:t({collectionName:"resultados",model:Z,idSearchStrategy:{type:"documentId"}}),mensagens:t({collectionName:"mensagens",model:Y,idSearchStrategy:{type:"documentId"}}),rotas:t({collectionName:"rotas",model:j,idSearchStrategy:{type:"documentId"}}),valores_jogos:t({collectionName:"valores_jogos",model:ee,idSearchStrategy:{type:"documentId"}}),limites_jogos:t({collectionName:"limites_jogos",model:ae,idSearchStrategy:{type:"documentId"}}),pules:t({collectionName:"pules",model:J,idSearchStrategy:{type:"documentId"}}),numeros:t({collectionName:"numeros",model:G,idSearchStrategy:{type:"documentId"}}),numeros_enviados:t({collectionName:"numeros_enviados",model:G,idSearchStrategy:{type:"documentId"}}),descargas:t({collectionName:"descargas",model:O,idSearchStrategy:{type:"documentId"}}),descargas_associacao:t({collectionName:"descargas_associacao",model:O,idSearchStrategy:{type:"documentId"}}),premiacoes:t({collectionName:"premiacoes",model:oe,idSearchStrategy:{type:"documentId"}}),premiacoes_associacao:t({collectionName:"premiacoes_associacao",model:ne,idSearchStrategy:{type:"documentId"}}),pdf_descargas:t({collectionName:"pdf_descargas",model:$,idSearchStrategy:{type:"documentId"}}),pdf_descargas_associacao:t({collectionName:"pdf_descargas_associacao",model:$,idSearchStrategy:{type:"documentId"}}),auditLogs:t({collectionName:"auditLogs",model:te,idSearchStrategy:{type:"documentId"}}),envios_descarga:t({collectionName:"envios_descarga",model:ie,idSearchStrategy:{type:"documentId"}}),dispositivos:t({collectionName:"dispositivos",model:se,idSearchStrategy:{type:"documentId"}})}};function eo(e){let{db:o,adapter:r,getBancaId:t,cacheConfig:a,authorizationConfigs:n}=e,s=Ir(t,a,n);return{users_associacao:v(o,r,s.users_associacao),users:v(o,r,s.users),bancas:v(o,r,s.bancas),extracoes:v(o,r,s.extracoes),resultados:v(o,r,s.resultados),mensagens:v(o,r,s.mensagens),rotas:v(o,r,s.rotas),valores_jogos:v(o,r,s.valores_jogos),limites_jogos:v(o,r,s.limites_jogos),pules:v(o,r,s.pules),numeros:v(o,r,s.numeros),numeros_enviados:v(o,r,s.numeros_enviados),descargas:v(o,r,s.descargas),descargas_associacao:v(o,r,s.descargas_associacao),premiacoes:v(o,r,s.premiacoes),premiacoes_associacao:v(o,r,s.premiacoes_associacao),pdf_descargas:v(o,r,s.pdf_descargas),pdf_descargas_associacao:v(o,r,s.pdf_descargas_associacao),auditLogs:v(o,r,s.auditLogs),envios_descarga:v(o,r,s.envios_descarga),dispositivos:v(o,r,s.dispositivos)}}function Cr(e){return eo({...e,adapter:Se(e.firebaseInstance)})}function Mr(e){return eo({...e,adapter:je()})}export{te as AuditLogModel,re as BancaModel,Pr as BetModel,Re as COMISSOES_PADRAO,Ke as ComissaoDescargaModel,O as DescargaModel,se as DeviceModel,qo as EXTRACAO,ie as EnvioDescargaModel,K as ExtracaoModel,u as GAMES,Ho as GRUPOS_BICHOS,J as GameModel,Yo as KEYBOARD,ae as LimitGameModel,Qo as MESSAGES,Y as MessageModel,G as NumberModel,$ as PDFModel,w as PREFIX_ENVIO,C as PREFIX_ENVIO_OLD,E as PREFIX_NUMBER,P as PREMIOS,ne as PremiacaoAssociacaoModel,oe as PremiacaoModel,Xo as ROLES,Z as ResultadoModel,j as RouteModel,Ne as STATUS_DESCARGA,Zo as STATUS_DEVICE,Pe as STATUS_PULE,Wo as TIPO_VISUALIZACAO,X as UserModel,Ko as VISUALIZACAO,ee as ValueGameModel,U as arredondarParaCima,ge as calculaValoresDosNumeros,pe as calcularValorDeNumero,_o as calcularValorJogoPeloLimite,Ae as calculateAmount,ve as calculateAmountGame,N as clone,Nr as collections,oo as combineDateTime,Rr as createAutoRepo,v as createGenericRepo,je as createReactNativeAdapter,Mr as createReactNativeRepoFactory,eo as createRepoFactory,Ze as createV8Adapter,Jo as createV9ModularAdapter,Se as createWebAdapter,Cr as createWebRepoFactory,c as dateToNumber,po as delay,Uo as detectFirebaseVersion,lo as dividirArray,wo as extracaoEstaAtivaBoolean,be as extracaoEstaAtivaTryCatch,Io as fazerJogo,No as formatPuleId,B as formatarNumero,so as formatterBRL,fo as formatterPercentage,To as formatterPercentageDecimal,H as functionsCore,Be as generateDescargas,k as generateId,Ao as gerarDezenas,ce as getAllCombinations,Bo as getAvailableTimes,F as getBetDateToNumber,me as getCodigoAuth,y as getCreatedBySystem,io as getDataInicioFim,Ro as getFormattedPuleId,Co as getGamesUnicosList,Mo as getGamesUnicosObjeto,go as getInitials,he as getLimiteJogoPeloTipoJogo,Po as getLimiteSimulado,Vo as getLimitsRest,de as getNumeroId,bo as getNumerosAcimaDoLimite,Lo as getPermission,ue as getPremioFormato,fe as getPropsEnvioId,ye as getPropsEnvioIdOld,Q as getPropsPrefix,Te as getPropsVP,le as getSomaEnvio,Eo as getSomaProps,vo as getSomaVP,q as getTiposJogos,xe as getValorJogoPeloTipoJogo,De as invertGame,Ve as isAdm,Je as isAdmOrSubAdm,ze as isAssociacao,ke as isCambista,$e as isCambistaTalao,He as isDigitador,qe as isDigitadorAdm,Qe as isDigitadorOrDigitadorAdm,Ue as isSuperAdm,uo as matchNormalized,W as normalize,b as numberToDate,mo as numbersSelectedFormated,no as parserBRL,yo as parserPercentage,ho as parserPercentageDecimal,Go as pegarExtracoes,m as pegarHorarioSaoPaulo,xo as removerLetters,I as showFormatDate,So as sortNumeros};
1
+ var ko=Object.defineProperty;var z=(e,o)=>{for(var r in o)ko(e,r,{get:o[r],enumerable:!0})};var qo=[13,16,19];var u={milhar:{id:"milhar",label:"Milhar",sigla:"M",format:"####",formatDigitar:"####",markAll:!1,max:0,order:1,showPerLine:6},centena:{id:"centena",label:"Centena",sigla:"C",format:"###",formatDigitar:"###",markAll:!1,max:0,order:2,showPerLine:7},dezena:{id:"dezena",label:"Dezena",sigla:"D",format:"##",formatDigitar:"##",markAll:!1,max:0,order:3,showPerLine:0},grupo:{id:"grupo",label:"Grupo",sigla:"G",max:25,format:"##",formatDigitar:"##",markAll:!1,order:4,showPerLine:0},"terno.dezena":{id:"terno.dezena",label:"Terno de Dezena",sigla:"TD",format:"##-##-##",formatDigitar:"######",markAll:!0,max:0,order:5,showPerLine:3},"terno.grupo":{id:"terno.grupo",label:"Terno de Grupo",sigla:"TG",max:25,format:"##-##-##",formatDigitar:"######",markAll:!0,order:6,showPerLine:3},"duque.dezena":{id:"duque.dezena",label:"Duque de Dezena",sigla:"DD",format:"##-##",formatDigitar:"####",markAll:!0,max:0,order:7,showPerLine:5},"duque.grupo":{id:"duque.grupo",label:"Duque de Grupo",sigla:"DG",max:25,format:"##-##",formatDigitar:"####",markAll:!0,order:8,showPerLine:5},"milhar.invertida":{id:"milhar.invertida",label:"Milhar Invertida",sigla:"MI",format:"####",formatDigitar:"####",markAll:!1,max:0,order:0,showPerLine:6},"centena.invertida":{id:"centena.invertida",label:"Centena Invertida",sigla:"CI",format:"###",formatDigitar:"###",markAll:!1,max:0,order:0,showPerLine:7},"milhar@centena":{id:"milhar@centena",label:"Milhar Centena",sigla:"MC",format:"####",formatDigitar:"####",markAll:!1,max:0,order:0,showPerLine:6},"milhar.invertida@centena.invertida":{id:"milhar.invertida@centena.invertida",label:"Milhar e Centena Invertidas",sigla:"MCI",format:"####",formatDigitar:"####",markAll:!1,max:0,order:0,showPerLine:6},"milhar@dezena":{id:"milhar@dezena",label:"Milhar e Dezena",sigla:"MD",format:"####",formatDigitar:"####",markAll:!1,max:0,order:0,showPerLine:6},"milhar@centena@dezena":{id:"milhar@centena@dezena",label:"Milhar, Centena e Dezena",sigla:"MCD",format:"####",formatDigitar:"####",markAll:!1,max:0,order:0,showPerLine:6},"centena@dezena":{id:"centena@dezena",label:"Centena Dezena",sigla:"CD",format:"###",formatDigitar:"###",markAll:!1,max:0,order:0,showPerLine:7}};var i={"01":"Avestruz","02":"\xC1guia","03":"Burro","04":"Borboleta","05":"Cachorro","06":"Cabra","07":"Carneiro","08":"Camelo","09":"Cobra",10:"Coelho",11:"Cavalo",12:"Elefante",13:"Galo",14:"Gato",15:"Jacar\xE9",16:"Le\xE3o",17:"Macaco",18:"Porco",19:"Pav\xE3o",20:"Peru",21:"Touro",22:"Tigre",23:"Urso",24:"Veado",25:"Vaca"},Ho={"01":{grupo:"01",bicho:i["01"]},"02":{grupo:"01",bicho:i["01"]},"03":{grupo:"01",bicho:i["01"]},"04":{grupo:"01",bicho:i["01"]},"05":{grupo:"02",bicho:i["02"]},"06":{grupo:"02",bicho:i["02"]},"07":{grupo:"02",bicho:i["02"]},"08":{grupo:"02",bicho:i["02"]},"09":{grupo:"03",bicho:i["03"]},10:{grupo:"03",bicho:i["03"]},11:{grupo:"03",bicho:i["03"]},12:{grupo:"03",bicho:i["03"]},13:{grupo:"04",bicho:i["04"]},14:{grupo:"04",bicho:i["04"]},15:{grupo:"04",bicho:i["04"]},16:{grupo:"04",bicho:i["04"]},17:{grupo:"05",bicho:i["05"]},18:{grupo:"05",bicho:i["05"]},19:{grupo:"05",bicho:i["05"]},20:{grupo:"05",bicho:i["05"]},21:{grupo:"06",bicho:i["06"]},22:{grupo:"06",bicho:i["06"]},23:{grupo:"06",bicho:i["06"]},24:{grupo:"06",bicho:i["06"]},25:{grupo:"07",bicho:i["07"]},26:{grupo:"07",bicho:i["07"]},27:{grupo:"07",bicho:i["07"]},28:{grupo:"07",bicho:i["07"]},29:{grupo:"08",bicho:i["08"]},30:{grupo:"08",bicho:i["08"]},31:{grupo:"08",bicho:i["08"]},32:{grupo:"08",bicho:i["08"]},33:{grupo:"09",bicho:i["09"]},34:{grupo:"09",bicho:i["09"]},35:{grupo:"09",bicho:i["09"]},36:{grupo:"09",bicho:i["09"]},37:{grupo:"10",bicho:i[10]},38:{grupo:"10",bicho:i[10]},39:{grupo:"10",bicho:i[10]},40:{grupo:"10",bicho:i[10]},41:{grupo:"11",bicho:i[11]},42:{grupo:"11",bicho:i[11]},43:{grupo:"11",bicho:i[11]},44:{grupo:"11",bicho:i[11]},45:{grupo:"12",bicho:i[12]},46:{grupo:"12",bicho:i[12]},47:{grupo:"12",bicho:i[12]},48:{grupo:"12",bicho:i[12]},49:{grupo:"13",bicho:i[13]},50:{grupo:"13",bicho:i[13]},51:{grupo:"13",bicho:i[13]},52:{grupo:"13",bicho:i[13]},53:{grupo:"14",bicho:i[14]},54:{grupo:"14",bicho:i[14]},55:{grupo:"14",bicho:i[14]},56:{grupo:"14",bicho:i[14]},57:{grupo:"15",bicho:i[15]},58:{grupo:"15",bicho:i[15]},59:{grupo:"15",bicho:i[15]},60:{grupo:"15",bicho:i[15]},61:{grupo:"16",bicho:i[16]},62:{grupo:"16",bicho:i[16]},63:{grupo:"16",bicho:i[16]},64:{grupo:"16",bicho:i[16]},65:{grupo:"17",bicho:i[17]},66:{grupo:"17",bicho:i[17]},67:{grupo:"17",bicho:i[17]},68:{grupo:"17",bicho:i[17]},69:{grupo:"18",bicho:i[18]},70:{grupo:"18",bicho:i[18]},71:{grupo:"18",bicho:i[18]},72:{grupo:"18",bicho:i[18]},73:{grupo:"19",bicho:i[19]},74:{grupo:"19",bicho:i[19]},75:{grupo:"19",bicho:i[19]},76:{grupo:"19",bicho:i[19]},77:{grupo:"20",bicho:i[20]},78:{grupo:"20",bicho:i[20]},79:{grupo:"20",bicho:i[20]},80:{grupo:"20",bicho:i[20]},81:{grupo:"21",bicho:i[21]},82:{grupo:"21",bicho:i[21]},83:{grupo:"21",bicho:i[21]},84:{grupo:"21",bicho:i[21]},85:{grupo:"22",bicho:i[22]},86:{grupo:"22",bicho:i[22]},87:{grupo:"22",bicho:i[22]},88:{grupo:"22",bicho:i[22]},89:{grupo:"23",bicho:i[23]},90:{grupo:"23",bicho:i[23]},91:{grupo:"23",bicho:i[23]},92:{grupo:"23",bicho:i[23]},93:{grupo:"24",bicho:i[24]},94:{grupo:"24",bicho:i[24]},95:{grupo:"24",bicho:i[24]},96:{grupo:"24",bicho:i[24]},97:{grupo:"25",bicho:i[25]},98:{grupo:"25",bicho:i[25]},99:{grupo:"25",bicho:i[25]},"00":{grupo:"25",bicho:i[25]}};var Qo={required:"Obrigat\xF3rio.",list_length_zero:"Selecione pelo menos um item.",incorrect_login:"Usu\xE1rio e/ou senha incorretos!",incorrect_password:"Senha incorreta.",email_already_in_use:"Este login j\xE1 est\xE1 sendo usado!",invalid_device:"Este login j\xE1 est\xE1 sendo usado em outro dispositivo!"};var Xo={super_admin:{id:"super_admin",label:"Super Administrador"},associacao:{id:"associacao",label:"Associa\xE7\xE3o"},admin:{id:"admin",label:"Administrador"},sub_admin:{id:"sub_admin",label:"Sub-administrador"},digitador_adm:{id:"digitador_adm",label:"Digitador Administrador"},digitador:{id:"digitador",label:"Digitador"},cambista_talao:{id:"cambista_talao",label:"Cambista de tal\xE3o"},cambista:{id:"cambista",label:"Cambista"}};var Pe={PROCESSANDO:{id:"PROCESSANDO",label:"PROCESSANDO",color:"green",showSite:!1,ordem:0},JOGADA:{id:"JOGADA",label:"PULES JOGADAS",color:"green",showSite:!0,ordem:1},AGUARDANDO_CANCELAMENTO:{id:"AGUARDANDO_CANCELAMENTO",label:"AGUARDANDO CANCELAMENTO",color:"yellow",showSite:!0,ordem:3},CANCELADA:{id:"CANCELADA",label:"CANCELADAS",color:"red",showSite:!0,ordem:4}};var Wo={notificacao:{id:"notificacao",label:"Notifica\xE7\xE3o"},impressao:{id:"impressao",label:"Impress\xE3o"}};var Ko={agora:{id:"agora",label:"Agora"},jogo_hoje:{id:"jogo_hoje",label:"Jogo Hoje"},jogo_pre_datado:{id:"jogo_pre_datado",label:"Jogo Pr\xE9-Datado"},resultado:{id:"resultado",label:"Resultado"}};var E="vp_";var C="envio_old_";var w="envio_";var Ne={ENVIANDO:{id:"ENVIANDO",labelBanca:"ENVIANDO",labelAssociacao:"RECEBENDO",color:"blue",showSiteBanca:!0,showSiteAssociacao:!1,order:1},DEVOLVENDO:{id:"DEVOLVENDO",labelBanca:"RECEBENDO",labelAssociacao:"DEVOLVENDO",color:"blue",showSiteBanca:!1,showSiteAssociacao:!1,order:1},ENVIADA:{id:"ENVIADA",labelBanca:"ENVIADA",labelAssociacao:"RECEBIDA",color:"green",showSiteBanca:!0,showSiteAssociacao:!0,order:2},DEVOLVIDA:{id:"DEVOLVIDA",labelBanca:"DEVOLVIDA",labelAssociacao:"DEVOLVIDA",color:"orange",showSiteBanca:!0,showSiteAssociacao:!0,order:3},ERRO:{id:"ERRO",labelBanca:"ERRO",labelAssociacao:"ERRO",color:"red",showSiteBanca:!1,showSiteAssociacao:!1,order:4}};var Yo={Enter:{label:"Enter",value:"enter"},Ctrl:{label:"Ctrl",value:"ctrl"},Tab:{label:"Tab",value:"tab"},Space:{label:"\u23B5",value:"space"},Backspace:{label:"Backspace",value:"backspace"},Escape:{label:"Esc",value:"escape"},Delete:{label:"Del",value:"delete"},Backslash:{label:"\\",value:"backslash"},Semicolon:{label:";",value:"semicolon"},CapsLock:{label:"CapsLock",value:"capslock"},Quote:{label:"'",value:"quote"},Comma:{label:",",value:"decimal,comma"},Insert:{label:"Insert",value:"insert"},Home:{label:"Home",value:"home"},End:{label:"End",value:"end"},PageUp:{label:"Page Up",value:"pageup"},PageDown:{label:"Page Down",value:"pagedown"},ArrowUp:{label:"\u2191",value:"arrowup"},ArrowDown:{label:"\u2193",value:"arrowdown"},ArrowLeft:{label:"\u2190",value:"arrowleft"},ArrowRight:{label:"\u2192",value:"arrowright"},NumLock:{label:"Num Lock",value:"numlock"},Dot:{label:".",value:"period,comma"},Divide:{label:"/",value:"slash,divide"},Subtract:{label:"-",value:"minus,subtract"},Multiply:{label:"*",value:"multiply,shift+8"},Add:{label:"+",value:"add,shift+equal"},Equal:{id:"Equal",label:"=",value:"equal"},F1:{label:"F1",value:"f1"},F2:{label:"F2",value:"f2"},F3:{label:"F3",value:"f3"},F4:{label:"F4",value:"f4"},F5:{label:"F5",value:"f5"},F6:{label:"F6",value:"f6"},F7:{label:"F7",value:"f7"},F8:{label:"F8",value:"f8"},F9:{label:"F9",value:"f9"},F10:{label:"F10",value:"f10"},F11:{label:"F11",value:"f11"},F12:{label:"F12",value:"f12"},0:{label:"0",value:"0"},1:{label:"1",value:"1"},2:{label:"2",value:"2"},3:{label:"3",value:"3"},4:{label:"4",value:"4"},5:{label:"5",value:"5"},6:{label:"6",value:"6"},7:{label:"7",value:"7"},8:{label:"8",value:"8"},9:{label:"9",value:"9"},A:{label:"A",value:"a"},B:{label:"B",value:"b"},C:{label:"C",value:"c"},D:{label:"D",value:"d"},E:{label:"E",value:"e"},F:{label:"F",value:"f"},G:{label:"G",value:"g"},H:{label:"H",value:"h"},I:{label:"I",value:"i"},J:{label:"J",value:"j"},K:{label:"K",value:"k"},L:{label:"L",value:"l"},M:{label:"M",value:"m"},N:{label:"N",value:"n"},O:{label:"O",value:"o"},P:{label:"P",value:"p"},Q:{label:"Q",value:"q"},R:{label:"R",value:"r"},S:{label:"S",value:"s"},T:{label:"T",value:"t"},U:{label:"U",value:"u"},V:{label:"V",value:"v"},W:{label:"W",value:"w"},X:{label:"X",value:"x"},Y:{label:"Y",value:"y"},Z:{label:"Z",value:"z"}};var Zo={EM_ESPERA:{id:"EM_ESPERA",label:"Esperando aprova\xE7\xE3o",color:"orange"},APROVADO:{id:"APROVADO",label:"Aprovado",color:"green"},BLOQUEADO:{id:"BLOQUEADO",label:"Bloqueado",color:"red"}};var P={1:{id:"1",order:1,label:"1\xBA Pr\xEAmio",labelShort:"1\xBA"},2:{id:"2",order:2,label:"2\xBA Pr\xEAmio",labelShort:"2\xBA"},3:{id:"3",order:3,label:"3\xBA Pr\xEAmio",labelShort:"3\xBA"},4:{id:"4",order:4,label:"4\xBA Pr\xEAmio",labelShort:"4\xBA"},5:{id:"5",order:5,label:"5\xBA Pr\xEAmio",labelShort:"5\xBA"},"1-5":{id:"1-5",order:6,label:"1\xBA ao 5\xBA Pr\xEAmio",labelShort:"1\xBA ao 5\xBA"}};var Re={[u.milhar.id]:{id:u.milhar.id,label:u.milhar.label,order:1},[u.centena.id]:{id:u.centena.id,label:u.centena.label,order:2},[u.dezena.id]:{id:u.dezena.id,label:u.dezena.label,order:3},[u.grupo.id]:{id:u.grupo.id,label:u.grupo.label,order:4},[u["terno.dezena"].id]:{id:u["terno.dezena"].id,label:u["terno.dezena"].label,order:5},[u["terno.grupo"].id]:{id:u["terno.grupo"].id,label:u["terno.grupo"].label,order:6},[u["duque.dezena"].id]:{id:u["duque.dezena"].id,label:u["duque.dezena"].label,order:7},[u["duque.grupo"].id]:{id:u["duque.grupo"].id,label:u["duque.grupo"].label,order:8},restante:{id:"restante",label:"Restante",order:9}};var y=e=>({id:e?.id||"system",id_integer:e?.id_integer||"system",role:e?.role||"super_admin",name:e?.name||"Gerado automaticamente pelo sistema",login:e?.login||"system"});var Ie={};z(Ie,{clone:()=>N,combineDateTime:()=>oo,dateToNumber:()=>c,delay:()=>po,dividirArray:()=>lo,formatterBRL:()=>so,formatterPercentage:()=>fo,formatterPercentageDecimal:()=>To,generateId:()=>k,getAllCombinations:()=>ce,getCodigoAuth:()=>me,getDataInicioFim:()=>io,getInitials:()=>go,matchNormalized:()=>uo,normalize:()=>W,numberToDate:()=>b,numbersSelectedFormated:()=>mo,parserBRL:()=>no,parserPercentage:()=>yo,parserPercentageDecimal:()=>ho,pegarHorarioSaoPaulo:()=>m,removerLetters:()=>xo,showFormatDate:()=>I});import jo from"clone-deep";var N=e=>jo(e);import{isValid as er}from"date-fns";var c=e=>{if(!e||!er(e))return 0;let o=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),t=String(e.getDate()).padStart(2,"0"),a=String(e.getHours()).padStart(2,"0"),n=String(e.getMinutes()).padStart(2,"0"),s=String(e.getSeconds()).padStart(2,"0");return+`${o}${r}${t}${a}${n}${s}`};import{parse as rr,isValid as tr}from"date-fns";import or from"moment-timezone";var m=()=>{let e=or.tz(new Date,"America/Sao_Paulo").format("DD_MM_YYYY_HH_mm_ss_SSS"),[o,r,t,a,n,s,f]=e.split("_");return new Date(Number(t),Number(r)-1,Number(o),Number(a),Number(n),Number(s),Number(f))};var b=e=>{if(!e)return;let o=e.toString(),r=o.slice(0,4),t=o.slice(4,6),a=o.slice(6,8),n=o.slice(8,10),s=o.slice(10,12),f=o.slice(12,14),g=`${r}-${t}-${a} ${n}:${s}:${f}`,h=m(),d=rr(g,"yyyy-MM-dd HH:mm:ss",h);return tr(d)?d:void 0};var oo=(e,o)=>{let r=b(e),t=b(o);if(!r||!t)return 0;let a=r.getFullYear(),n=r.getMonth(),s=r.getDate(),f=t.getHours(),g=t.getMinutes(),h=t.getSeconds(),d=new Date(a,n,s,f,g,h,0);return c(d)};import{setHours as ro,setMinutes as to,setSeconds as ao}from"date-fns";var io=({dataAposta:e})=>{let o=ao(to(ro(b(e)||m(),0),0),0),r=ao(to(ro(b(e)||m(),23),59),59);return{dataInicio:c(o),dataFim:c(r)}};var so=e=>{let o=e;return new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(o||0)},no=e=>{let o=e;o=o.replace(/\D/g,"");let r=parseFloat(o||"0");return r/=100,r};var co=e=>{if(e.length===0)return[[]];let o=new Set;for(let r=0;r<e.length;r++){let t=e[r],a=[...e.slice(0,r),...e.slice(r+1)],n=co(a);for(let s of n)o.add([t,...s])}return Array.from(o)},ce=e=>{let o=e.toString().split(""),r=co(o),t=new Set(r.map(a=>a.join("")));return Array.from(t)};import{format as ar}from"date-fns";var I=(e,o)=>{if(!e)return"N/A";let r=b(e);return r?ar(r,o||"dd/MM/yyyy"):"N/A"};var mo=e=>{let o=e.map(Number);if(o.length===0)return"";o.sort((n,s)=>n-s);let r="",t=o[0],a=t;for(let n=1;n<=o.length;n++)n<o.length&&o[n]===a+1?a=o[n]:(t===a?r+=t:r+=`${t} ao ${a}`,n<o.length&&(r+=", ",t=o[n],a=t));return r};var k=e=>{let o=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1);return`${e?`${e}-`:""}${o()+o()}-${o()}-${o()}-${o()}-${o()}${o()}${o()}`};var me=(e,o)=>(e=Math.ceil(e),o=Math.floor(o),Math.floor(Math.random()*(o-e+1))+e);var lo=(e,o=1e3)=>{let r=[];for(let t=0;t<e.length;t+=o){let a=e.slice(t,t+o);r.push(a)}return r};var po=e=>new Promise(o=>setTimeout(o,e));var W=e=>e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"");var uo=(e,o)=>W(e).includes(W(o));var go=e=>e?e.trim().split(/\s+/).filter(t=>t.length>=2).slice(0,2).map(t=>t[0].toUpperCase()).join(""):"";var fo=e=>`${new Intl.NumberFormat("pt-BR",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(e||0)} %`;var yo=(e,o)=>(e=e.replace(/\D/g,""),o=o?.replace(/\D/g,""),o?(Number(o)===Number(e)&&(o=o.slice(0,-1)),Number(Number(o||"0").toFixed(2))):Number(Number(e||"0").toFixed(2)));var To=e=>(e*=100,`${new Intl.NumberFormat("pt-BR",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(e||0)} %`),ho=(e,o)=>(e=e.replace(/\D/g,""),o=o?.replace(/\D/g,""),o?(Number(o)===Number(e)&&(o=o.slice(0,-1)),Number(Number(o||"0").toFixed(2))/100):Number(Number(e||"0").toFixed(2))/100);var xo=e=>e.replace(/[^0-9]/g,"");var K=e=>({id:e?.id||"",id_integer:e?.id_integer||"",horario:e?.horario||0,bloqueio:e?.bloqueio||0,bancaId:e?.bancaId||"",ativo:e?.ativo??!0,inativo_no_dia:e?.inativo_no_dia||[],description:e?.description||"",somente_no_feriado:e?.somente_no_feriado||0,createdBy:y(e?.createdBy),updated:e?.updated||c(m()),created:e?.created||c(m()),days:{0:e?.days?.[0]??!1,1:e?.days?.[1]??!1,2:e?.days?.[2]??!1,3:e?.days?.[3]??!1,4:e?.days?.[4]??!1,5:e?.days?.[5]??!1,6:e?.days?.[6]??!1}});var Oe={};z(Oe,{arredondarParaCima:()=>U,calculaValoresDosNumeros:()=>ge,calcularValorDeNumero:()=>pe,formatarNumero:()=>B,generateDescargas:()=>Be,gerarDezenas:()=>Ao,getCreatedBySystem:()=>y,getLimiteSimulado:()=>Po,getNumeroId:()=>de,getNumerosAcimaDoLimite:()=>bo,getPremioFormato:()=>ue,getPropsEnvioId:()=>fe,getPropsEnvioIdOld:()=>ye,getPropsPrefix:()=>Q,getPropsVP:()=>Te,getSomaEnvio:()=>le,getSomaProps:()=>Eo,getSomaVP:()=>vo,getTiposJogos:()=>q,sortNumeros:()=>So});var B=(e,o)=>{let r="",t=e.length-1,a=o.length-1;for(;a>=0;)o[a]==="#"?(r=e[t]+r,t--):o[a]==="-"&&(r="-"+r),a--;return r};var Ce=(e,o)=>{let r=o,t=e?.envioIds?.length>0?e.envioIds[e.envioIds.length-1]:"";return G({...e,id:r,premio:e.premio,amount:e.amount,numeros:[e.numero],amountEnviadoParaAssociacao:e.amountEnviadoParaAssociacao,valorAEnviarParaAssociacao:e.valorAEnviarParaAssociacao,envioId:t,dataAposta:e.dataAposta,bancaId:e.bancaId,valorArredondado:e.valorArredondado,limiteJogoReal:e.limiteJogoReal,limiteJogoSimulado:e.limiteJogoSimulado,valorJogo:e.valorJogo})};var Me=(e,o)=>{let r=o?U(Number(e[o])):U(e.amount);return`${e?.bancaId?`${e?.bancaId}_`:""}${e.dataAposta}_${e.tipo_jogo}_${e.premio}_${r}`};var Be=(e,o)=>{let r={};return Object.entries(e).forEach(([,t])=>{let a=Me(t,o);r[a]?r[a].numeros.push(t.numero):r[a]=Ce(t,a)}),r};var Ao=e=>{let o=[];e.forEach(a=>{let n=u[a.name];a.numbers.forEach(s=>{if(n.id==="dezena"){let h=s.split("-");for(let d of h){if(d.length<n.format.length)continue;let D=B(d,n.format);o.push(D)}return}let f=s.replaceAll("-","");if(f.length<n.format.replaceAll("-","").length)return;let g=B(f,n.format);o.push(g)})});let r=new Set(o);return Array.from(r)};var le=e=>{let o=0;return Object.entries(e).forEach(([r,t])=>{let a=r.split("_");a.includes("envio")&&!a.includes("old")&&typeof t=="number"&&(o+=t)}),o};var vo=e=>{let o=0,r=0;Object.entries(e).forEach(([a,n])=>{a.startsWith("vp_")&&typeof n=="number"&&(o+=n,n>0&&(r+=1))});let t=le(e);return o-=t,{soma:o,quantidadeDePulesMaiorQueZero:r,somaEnviadoParaAssociacao:t}};var de=e=>{let{dataAposta:o,jogo:r,numero:t,bancaId:a,premio:n,descarregado:s}=e,f=u[r],g=f.markAll?t:B(t,f.format),h=s?"true":"false";return(a?`${a}_`:"")+`${o}_${r}_${n}_${g}_${h}`};var q=e=>e.replaceAll(".invertida","").split("@");var pe=({quantidadeDeNumeros:e,tipoJogo:o,valorPremio:r,quantidadeDePremios:t})=>{let a=u[o],n=q(o),s=r/(n.length||1);return s/=e,a.markAll||(s/=t||1),t===0&&(s=0),s};var ue=e=>e===1?P[1].id:e===2?P[2].id:e===3?P[3].id:e===4?P[4].id:e===5?P[5].id:P["1-5"].id;var ge=e=>{let o={},r=m(),t=c(r);for(let a of e.bets){let n=q(a.name),s=a.numbers.length;for(let f of n)for(let g of a.numbers)for(let h of a.prizes)for(let d of h.prizes){let D=u[f],L=pe({valorPremio:h.value,tipoJogo:a.name,quantidadeDeNumeros:s,quantidadeDePremios:h.prizes.length}),R=ue(d),V=g;D.markAll?R="1-5":V=B(g,D.format);let A=de({numero:g,bancaId:e.bancaId,dataAposta:e.dateBet,jogo:f,premio:R});o?.[A]||(o[A]=O({id:A,numero:V,premio:R,created:t,bancaId:e.bancaId,amount:0,dataAposta:e.dateBet,tipo_jogo:f,[`${"vp_"}${e.id}`]:0})),D.markAll?o[A][`${"vp_"}${e.id}`]=Number(L.toFixed(3)):o[A][`${"vp_"}${e.id}`]+=Number(L.toFixed(3))}}return{numeros:o}};var Do=2,bo=(e,o,r)=>e.map(t=>{let a=H.limite_jogos.getValorJogoPeloTipoJogo(o,t.tipo_jogo),n=Object.values(r).find(d=>d.type_game===t.tipo_jogo),s=H.limite_jogos.calcularValorJogoPeloLimite(n?.limit||0,a?.value||0),f=Number(t.amount.toFixed(Do)),g=Number(s.toFixed(Do)),h=f-g;return f>g?{numero:t,diferenca:h}:null}).filter(Boolean);var U=e=>{let o=Math.round(e*100),r=o%5;return r!==0&&(o+=5-r),o/100};var So=e=>{let o=Object.values(e).sort((r,t)=>{let a=u[r.tipo_jogo].order,n=u[t.tipo_jogo].order;return a<n?-1:a>n?1:r.premio<t.premio?-1:r.premio>t.premio?1:r.amount>t.amount?-1:1});return Object.fromEntries(o.map(r=>[r.id,r]))};var fe=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{let a=r.split("_");a.includes("envio")&&!a.includes("old")&&typeof t=="number"&&(o[r]=t)}),o};var ye=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{let a=r.split("_");a.includes("envio")&&a.includes("old")&&typeof t=="number"&&(o[r]=t)}),o};var Te=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{r.startsWith("vp_")&&typeof t=="number"&&(o[r]=t)}),o};var Q=e=>{let o={vp_:{},[w]:{},[C]:{}},r=N(Te(e)),t=N(fe(e)),a=N(ye(e));return o["vp_"]=N(r),o[w]=N(t),o[C]=N(a),o};var Eo=e=>{let o=0;return Object.values(e).forEach(r=>{o+=r}),o};var he=(e,o)=>Object.values(e).find(r=>r.type_game===o);var Ge={};z(Ge,{calcularValorJogoPeloLimite:()=>_o,getLimiteJogoPeloTipoJogo:()=>he,getValorJogoPeloTipoJogo:()=>xe});var _o=(e,o)=>e/(o||1);var xe=(e,o)=>Object.values(e).find(r=>r.type_game===o);var Po=(e,o,r)=>{let t=xe(o,e),n=(he(r,e)?.limit||0)/(t?.value||1);return Number(n.toFixed(2))};var Le={};z(Le,{extracaoEstaAtivaBoolean:()=>wo,extracaoEstaAtivaTryCatch:()=>be,getAvailableTimes:()=>Bo,pegarExtracoes:()=>Oo});import{format as we,getDay as cr}from"date-fns";var Fe={};z(Fe,{calculateAmount:()=>Ae,calculateAmountGame:()=>ve,fazerJogo:()=>Io,formatPuleId:()=>No,getBetDateToNumber:()=>F,getFormattedPuleId:()=>Ro,getGamesUnicosList:()=>Co,getGamesUnicosObjeto:()=>Mo,invertGame:()=>De});var Ae=e=>{let o=0;return e.forEach(r=>{o+=r.value}),o};var ve=e=>{let o=0;return e.forEach(r=>{o+=Ae(r.prizes)}),o};import{setHours as ir,setMinutes as sr,setSeconds as nr}from"date-fns";var F=(e,o)=>{let t=b(o),a=b(e);return!a||!t?0:(a=ir(a,t.getHours()),a=sr(a,t.getMinutes()),a=nr(a,0),c(a))};var No=e=>e<1e3?e.toString().padStart(4,"0"):e.toString();var Ro=e=>{let o=e.split("-");return o[o.length-1]};var De=e=>{let o=N(e);for(let r=0;r<o.bets.length;r++){let t=o.bets[r];if(t.name==="milhar.invertida"||t.name==="centena.invertida"||t.name==="milhar.invertida@centena.invertida"){let a=t.numbers,n=[];for(let s of a){let f=ce(s);n.push(...f)}t={...t,numbers:N(n)},o.bets[r]=t}}return o};var Io=(e,o,r,t,a)=>{let n=J({...e,id:a,creator:o,dateBet:F(r,t.horario),totalAmount:ve(e.bets),extracao:t}),s=De(n),{numeros:f}=ge(s);return{numeros:f,game:n}};var Co=()=>Object.values(u).filter(e=>!e.id.includes("@")&&!e.id.includes("invertida")),Mo=()=>Object.values(u).filter(r=>!r.id.includes("@")&&!r.id.includes("invertida")).reduce((r,t)=>(r[t.id]=t,r),{});var Bo=(e,o,r,t,a)=>{let n=F(o,20241001e6),s=e.filter(d=>d.ativo&&!d.inativo_no_dia.includes(n)),f=b(n),g=[],h=s.filter(d=>d.somente_no_feriado===n);return h.length>0?g=[...h]:g=s.filter(d=>f&&d.days[cr(f)]&&d.somente_no_feriado===0),r&&(g=[...s]),t&&f&&a&&we(a,"dd/MM/yyyy")===we(f,"dd/MM/yyyy")&&(g=g.filter(d=>Number(we(a,"HHmm"))<Number(I(d.bloqueio,"HHmm")))),g.sort((d,D)=>Number(I(d.horario,"HHmm"))<Number(I(D.horario,"HHmm"))?-1:1)};import{format as mr,getDay as lr}from"date-fns";var Oo=({extracoes:e,dataAposta:o=c(m()),dataAgora:r=c(m()),retornar:t="do_dia",pegar:a="bloqueio"})=>{let n=A=>a==="horario"?A.horario:a==="bloqueio"?A.bloqueio:0,s=F(o,20241001e6),f=F(r,20241001e6),g=b(s);if(!g)throw new Error("dataApostaDate \xE9 obrigat\xF3ria!");let h=e.filter(A=>A.ativo&&!A.inativo_no_dia.includes(s)),d=h.filter(A=>A.somente_no_feriado===s),D=d.length>0?d:h.filter(A=>A.days[lr(g)]&&A.somente_no_feriado===0);if(t==="do_dia")return D.sort(Go);let L=b(r);if(!L)throw new Error("dataAgoraDate \xE9 obrigat\xF3ria!");let R=Number(mr(L,"HHmm"));return(t==="proximas"?D.filter(A=>s===f?R<Number(I(n(A),"HHmm")):s>f):t==="anteriores"?D.filter(A=>f===s?R>=Number(I(n(A),"HHmm")):s<f):[]).sort(Go)},Go=(e,o)=>Number(I(e.horario,"HHmm"))-Number(I(o.horario,"HHmm"));import{getDay as Fo}from"date-fns";var be=(e,o)=>{if(!o.ativo)throw new Error("Extra\xE7\xE3o n\xE3o est\xE1 ativa.");if(o.inativo_no_dia.includes(e))throw new Error("Extra\xE7\xE3o est\xE1 inativa no dia da aposta.");if(o.somente_no_feriado!==0&&o.somente_no_feriado!==e)throw new Error("Extra\xE7\xE3o n\xE3o funciona neste feriado.");let r=b(e);if(!r)throw new Error("Data da aposta inv\xE1lida.");if(!o.days[Fo(r)]){let a=["domingo","segunda-feira","ter\xE7a-feira","quarta-feira","quinta-feira","sexta-feira","s\xE1bado"][Fo(r)];throw new Error(`Extra\xE7\xE3o n\xE3o funciona neste dia da semana (${a}).`)}};var wo=(e,o)=>{try{return be(e,o),!0}catch{return!1}};var Xe={};z(Xe,{getLimitsRest:()=>Vo,getPermission:()=>Lo,isAdm:()=>Ve,isAdmOrSubAdm:()=>Je,isAssociacao:()=>ze,isCambista:()=>ke,isCambistaTalao:()=>$e,isDigitador:()=>He,isDigitadorAdm:()=>qe,isDigitadorOrDigitadorAdm:()=>Qe,isSuperAdm:()=>Ue});var dr=["admin"],pr=["admin","sub_admin"],ur=["associacao"],gr=["super_admin"],fr=["cambista_talao"],yr=["cambista"],Tr=["digitador_adm"],hr=["digitador"],xr=["digitador","digitador_adm"],Ve=e=>dr.includes(e.role),ze=e=>ur.includes(e.role),Ue=e=>gr.includes(e.role),Je=e=>pr.includes(e.role),$e=e=>fr.includes(e.role),ke=e=>yr.includes(e.role),qe=e=>Tr.includes(e.role),He=e=>hr.includes(e.role),Qe=e=>xr.includes(e.role),Lo={isAdm:Ve,isAssociacao:ze,isSuperAdm:Ue,isAdmOrSubAdm:Je,isCambistaTalao:$e,isCambista:ke,isDigitadorAdm:qe,isDigitador:He,isDigitadorOrDigitadorAdm:Qe};var Vo=e=>{let o=0,r=0;return Object.values(e.jogos.hoje).forEach(t=>o+=t),Object.values(e.jogos.pre).forEach(t=>r+=t),{hoje:o,pre:r}};var We={};z(We,{generateDescarga:()=>Ce,generateDescargas:()=>Be,getDescargaIdPeloEnvio:()=>Er,getDescargaIdPeloNumero:()=>Me,getDescargasAcimaDoLimite:()=>vr,getPropsEnvioId:()=>br,getPropsEnvioIdOldDescarga:()=>Sr,getPropsVPDescarga:()=>Dr,getTotalGeralDescarga:()=>_r,sortDescargas:()=>Ar});var Ar=e=>{let o=Object.values(e).sort((r,t)=>{let a=u[r.tipo_jogo].order,n=u[t.tipo_jogo].order;return a<n?-1:a>n?1:r.premio<t.premio?-1:r.premio>t.premio?1:t.amount-r.amount});return Object.fromEntries(o.map(r=>[r.id,r]))};var zo=2,vr=(e,o,r)=>e.map(t=>{let a=H.limite_jogos.getValorJogoPeloTipoJogo(o,t.tipo_jogo),n=Object.values(r).find(d=>d.type_game===t.tipo_jogo),s=H.limite_jogos.calcularValorJogoPeloLimite(n?.limit||0,a?.value||0),f=Number(t.amount.toFixed(zo)),g=Number(s.toFixed(zo)),h=f-g;return f>g?{descarga:t,diferenca:h}:null}).filter(Boolean);var Dr=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{r.split("_").includes("vp_")&&typeof t=="number"&&(o[r]=t)}),o};var br=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{let a=r.split("_");a.includes("envio")&&!a.includes("old")&&typeof t=="number"&&(o[r]=t)}),o};var Sr=e=>{let o={};return Object.entries(e).forEach(([r,t])=>{let a=r.split("_");a.includes("envio")&&a.includes("old")&&typeof t=="number"&&(o[r]=t)}),o};var Er=(e,o)=>{let r=`${C}${o}`,t=e[r];if(t==null)throw new Error(`Valor do envio '${o}' n\xE3o encontrado no n\xFAmero.`);if(typeof t!="number")throw new Error(`Valor do envio '${o}' deve ser um n\xFAmero.`);let a=U(t);return`${e?.bancaId?`${e?.bancaId}_`:""}${e.dataAposta}_${e.tipo_jogo}_${e.premio}_${a}_envio_${o}`};var _r=(e,o)=>{let r={jogos:{},totalBruto:0,totalLiquido:0,totalComissao:0},t=Object.entries(e),a=Object.values(o),n=a.find(s=>s.type_game==="restante");for(let[s,f]of t){let g=f??0,h=a.find(d=>s===d.type_game);if(r.totalBruto+=g,h){let d=Re[s];r.jogos[s]={totalEnviado:g,ordem:d?.order||0,tipo:s,label:d?.label||s};let D=g*(h.porcentagem/100);r.totalLiquido+=g-D,r.totalComissao+=D}else if(r.jogos.restante||(r.jogos.restante={totalEnviado:0,ordem:9,tipo:"restante",label:"Restante"}),r.jogos.restante.totalEnviado+=g,n){let d=g*(n.porcentagem/100);r.totalLiquido+=g-d,r.totalComissao+=d}else r.totalLiquido+=g}return r};var H={numbers:Oe,extracao:Le,descarga:We,games:Fe,users:Xe,limite_jogos:Ge,utils:Ie};var Y=e=>({id:e?.id||"",id_integer:e?.id_integer||"",extracaoIds:e?.extracaoIds||[],content:e?.content||"",visualizacao:e?.visualizacao||"jogo_hoje",bancaId:e?.bancaId||"",createdBy:y(e?.createdBy),date:{from:e?.date?.from||0,to:e?.date?.to||0},fixa:e?.date?.to===0||e?.date?.from===0,tipo:e?.tipo||[],updated:e?.updated||c(m()),created:e?.created||c(m())});var Z=e=>({id:e?.id||"",id_integer:e?.id_integer||"",createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m()),bancaId:e?.bancaId||"",extracao:{id:e?.extracao?.id||"",id_integer:e?.extracao?.id_integer||"",horario:e?.extracao?.horario||0,description:e?.extracao?.description||""},milhares:{1:e?.milhares?.[1]??"",2:e?.milhares?.[2]??"",3:e?.milhares?.[3]??"",4:e?.milhares?.[4]??"",5:e?.milhares?.[5]??""},grupos:{1:e?.grupos?.[1]??"",2:e?.grupos?.[2]??"",3:e?.grupos?.[3]??"",4:e?.grupos?.[4]??"",5:e?.grupos?.[5]??""},bichos:{1:e?.bichos?.[1]??"",2:e?.bichos?.[2]??"",3:e?.bichos?.[3]??"",4:e?.bichos?.[4]??"",5:e?.bichos?.[5]??""},liberado:e?.liberado??!1,dataSorteio:e?.dataSorteio||0});var j=e=>({id:e?.id||"",id_integer:e?.id_integer||"",comission:e?.comission??0,name:e?.name||"",responsible:e?.responsible||"",codigo_rota:e?.codigo_rota||"",tipo:e?.tipo||"cambista",bancaId:e?.bancaId||"",createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var X=e=>({id:e?.id??"",id_integer:e?.id_integer||"",active:e?.active??!0,bet_limit:e?.bet_limit??0,comission:e?.comission??0,bancaId:e?.bancaId||"",photoURL:e?.photoURL||"",name:e?.name||"",sessionId:e?.sessionId||"",codigo_cambista:e?.codigo_cambista||"",deviceId:e?.deviceId||"",role:e?.role||"cambista",pre_date_limit:e?.pre_date_limit||0,dispositivos:{dispositivoIdAtual:e?.dispositivos?.dispositivoIdAtual||"",listaDispositivosConectados:e?.dispositivos?.listaDispositivosConectados||[]},route:{id:e?.route?.id||"",name:e?.route?.name||"",tipo:e?.route?.tipo||"cambista"},type_games:e?.type_games?e?.type_games.filter(o=>u?.[o]?.id):[],login:e?.login||"",jogos:{hoje:e?.jogos?.hoje||{},pre:e?.jogos?.pre||{}},preferences:{pdfLegado:e?.preferences?.pdfLegado??!1},permissoes:{podeCancelarPule:e?.permissoes?.podeCancelarPule??!1,podeReservar:e?.permissoes?.podeReservar??!1,podeJogarSurpresinha:e?.permissoes?.podeJogarSurpresinha??!0},createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var ee=e=>({id:e?.id||"",id_integer:e?.id_integer||"",type_game:e?.type_game||"milhar",bancaId:e?.bancaId||"",value:e?.value??0,createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var J=(e={})=>({id:e?.id||"",id_integer:e?.id_integer||"",origem_pule_id:e?.origem_pule_id||"",bets:e.bets||[],creator:{id:e?.creator?.id||"",id_integer:e?.creator?.id_integer||"",codigo_cambista:e?.creator?.codigo_cambista||"",name:e?.creator?.name||"",role:e?.creator?.role||"cambista",login:e?.creator?.login||"",comission:e?.creator?.comission||0,route:{id:e?.creator?.route?.id||"",name:e?.creator?.route?.name||"",tipo:e?.creator?.route?.tipo||"cambista"}},createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m()),totalAmount:e?.totalAmount||0,bancaId:e?.bancaId||"",codigoAuth:e?.codigoAuth||me(1e5,999999).toString(),cancel:{canceled:e?.cancel?.canceled??!1,canceledAt:e?.cancel?.canceledAt||0,reason:e?.cancel?.reason||""},valorNumerosNaPule:e?.valorNumerosNaPule||{},infoJogos:e?.infoJogos||[],tiposJogos:e?.tiposJogos||{},reservada:e?.reservada||!1,dias_disponiveis:e?.dias_disponiveis||[],dateBet:e?.dateBet||0,status:e.status||Pe.JOGADA.id,statusReason:e?.statusReason||"",extracao:{id:e?.extracao?.id||"",id_integer:e?.extracao?.id_integer||"",description:e?.extracao?.description||"",bloqueio:e?.extracao?.bloqueio||0,horario:e?.extracao?.horario||0}});var O=(e={})=>{let o=P[e?.premio||"1"].order,r=u[e?.tipo_jogo||"milhar"].order,t={id:e?.id||"",id_integer:e?.id_integer||"",envioIds:e?.envioIds||[],ordemPremioExibicao:o,ordemJogoExibicao:r,numero:e?.numero||"",amount:e?.amount||0,premio:e?.premio||"1",bancaId:e?.bancaId||"",valorArredondado:e?.valorArredondado||0,limiteJogoReal:e?.limiteJogoReal||0,limiteJogoSimulado:e?.limiteJogoSimulado||0,valorJogo:e?.valorJogo||0,amountEnviadoParaAssociacao:e?.amountEnviadoParaAssociacao||0,valorAEnviarParaAssociacao:e?.valorAEnviarParaAssociacao||0,tipo_jogo:e?.tipo_jogo||"milhar",createdBy:y(e?.createdBy),updated:e?.updated||c(m()),created:e?.created||c(m()),descarregado:e?.descarregado??!1,dataAposta:e?.dataAposta||0},a=Q(e);return t={...t,...a["vp_"],...a[w],...a[C]},t};var Pr=(e={})=>({name:e?.name||"milhar",numbers:e?.numbers||[],prizes:e?.prizes||[]});var oe=(e={})=>({id:e?.id||"",id_integer:e?.id_integer||"",dataAposta:e?.dataAposta||0,bancaId:e?.bancaId||"",pule:{id:e?.pule?.id||"",id_integer:e?.pule?.id_integer||"",created:e?.pule?.created||0,cancel:{canceled:e?.pule?.cancel?.canceled||!1,canceledAt:e?.pule?.cancel?.canceledAt||0,reason:e?.pule?.cancel?.reason||""},createdBy:{id:e?.pule?.createdBy?.id||"",id_integer:e?.pule?.createdBy?.id_integer||"",role:e?.pule?.createdBy?.role||"cambista",name:e?.pule?.createdBy?.name||"",login:e?.pule?.createdBy?.login||""},creator:{id:e?.pule?.creator?.id||"",id_integer:e?.pule?.creator?.id_integer||"",codigo_cambista:e?.pule?.creator?.codigo_cambista||"",login:e?.pule?.creator?.login||"",name:e?.pule?.creator?.name||"",role:e?.pule?.creator?.role||"cambista",comission:e?.pule?.creator?.comission||0,route:{id:e?.pule?.creator?.route?.id||"",name:e?.pule?.creator?.route?.name||"",tipo:e?.pule?.creator?.route?.tipo||"cambista"}}},premiosItems:e?.premiosItems||[],valorTotalPremio:e?.valorTotalPremio||0,valorTotalPremioBanca:e?.valorTotalPremioBanca||0,valorTotalPremioAssociacao:e?.valorTotalPremioAssociacao||0,createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var $=(e={})=>({id:e?.id||"",id_integer:e?.id_integer||"",dataAposta:e?.dataAposta||0,descargas:e?.descargas||{},link_pdf:e?.link_pdf||"",bancaId:e.bancaId||"",visualizado:e?.visualizado||!1,createdBy:y(e?.createdBy),created:e?.created||0,updated:e?.updated||0});var re=(e={})=>({id:e?.id||"",nome:e?.nome||"",settings:{urlLogo:e?.settings?.urlLogo||"",urlLogoImpressao:e?.settings?.urlLogoImpressao||"",urlBackground:e?.settings?.urlBackground||"",backgroundColor:e?.settings?.backgroundColor||""},endereco:{cep:e?.endereco?.cep||"",logradouro:e?.endereco?.logradouro||"",numero:e?.endereco?.numero||"",bairro:e?.endereco?.bairro||"",cidade:e?.endereco?.cidade||"",estado:e?.endereco?.estado||""},createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var te=(e={})=>({id:e?.id||"",tipo:e?.tipo||"add",bancaId:e?.bancaId||"",message:e?.message||"",colecao:e?.colecao||"",documentId:e?.documentId||"",author:y(e?.author),document:e?.document||{},updated:e?.updated||c(m()),created:e?.created||c(m())});var ae=e=>({id:e?.id||"",id_integer:e?.id_integer||"",type_game:e?.type_game||"milhar",bancaId:e?.bancaId||"",limit:e?.limit??0,createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var ie=e=>({id:e?.id||"",id_integer:e?.id_integer||"",visualizado:e?.visualizado||!1,banca:{id:e?.banca?.id||"",nome:e?.banca?.nome||""},dataAposta:e?.dataAposta||0,totalGeralJogos:{milhar:e?.totalGeralJogos?.milhar||0,centena:e?.totalGeralJogos?.centena||0,dezena:e?.totalGeralJogos?.dezena||0,grupo:e?.totalGeralJogos?.grupo||0,"terno.dezena":e?.totalGeralJogos?.["terno.dezena"]||0,"terno.grupo":e?.totalGeralJogos?.["terno.grupo"]||0,"duque.dezena":e?.totalGeralJogos?.["duque.dezena"]||0,"duque.grupo":e?.totalGeralJogos?.["duque.grupo"]||0},extracao:{id:e?.extracao?.id||"",id_integer:e?.extracao?.id_integer||"",description:e?.extracao?.description||"",bloqueio:e?.extracao?.bloqueio||0,horario:e?.extracao?.horario||0},devolvidoPor:{id:e?.devolvidoPor?.id||"",id_integer:e?.devolvidoPor?.id_integer||"",name:e?.devolvidoPor?.name||"",login:e?.devolvidoPor?.login||""},bancaId:e?.bancaId||"",description:e?.description||"",createdBy:y(e?.createdBy),updated:e?.updated||c(m()),created:e?.created||c(m()),status:e?.status||Ne.ENVIANDO.id,totalEnviados:e?.totalEnviados||0,totalRegistros:e?.totalRegistros||0,progresso:e?.progresso||0,mensagem:e?.mensagem||"",concluidoEm:e?.concluidoEm||0,ultimaAtualizacao:e?.ultimaAtualizacao||0,metricas:{tempoMinimo:e?.metricas?.tempoMinimo||0,tempoMaximo:e?.metricas?.tempoMaximo||0,tempoMedio:e?.metricas?.tempoMedio||0,duracaoTotal:e?.metricas?.duracaoTotal||0,tempoEstimado:e?.metricas?.tempoEstimado||0,velocidadeProcessamento:e?.metricas?.velocidadeProcessamento||0,textosFormatados:{duracaoTotalText:e?.metricas?.textosFormatados?.duracaoTotalText||"",tempoMinimoText:e?.metricas?.textosFormatados?.tempoMinimoText||"",tempoMaximoText:e?.metricas?.textosFormatados?.tempoMaximoText||"",tempoMedioText:e?.metricas?.textosFormatados?.tempoMedioText||"",tempoEstimadoText:e?.metricas?.textosFormatados?.tempoEstimadoText||""}},atualizadoEm:e?.atualizadoEm||0,erro:e?.erro||"",iniciadoEm:e?.iniciadoEm||0,user:{id:e?.user?.id||"",id_integer:e?.user?.id_integer||"",name:e?.user?.name||"",login:e?.user?.login||""},valoresJogos:e?.valoresJogos||[],limitesJogos:e?.limitesJogos||[],comissoesDescarga:e?.comissoesDescarga||[]});var G=(e={})=>{let o=P[e?.premio||"1"].order,r=u[e?.tipo_jogo||"milhar"].order,t={id:e?.id||"",ordemJogoExibicao:r,ordemPremioExibicao:o,numeros:e?.numeros||[],quantidadeDeNumeros:e?.quantidadeDeNumeros||0,bancaId:e?.bancaId||"",amountEnviadoParaAssociacao:e?.amountEnviadoParaAssociacao||0,valorAEnviarParaAssociacao:e?.valorAEnviarParaAssociacao||0,envioId:e?.envioId||"",amount:e?.amount||0,limiteJogoReal:e?.limiteJogoReal||0,limiteJogoSimulado:e?.limiteJogoSimulado||0,valorJogo:e?.valorJogo||0,valorArredondado:e?.valorArredondado||0,dataAposta:e?.dataAposta||0,premio:e?.premio||"1",tipo_jogo:e?.tipo_jogo||"milhar",createdBy:y(e?.createdBy),updated:e?.updated||c(m()),created:e?.created||c(m())},a=Q(e);return t={...t,...a["vp_"],...a[w],...a[C]},t};var se=(e={})=>({id:e?.id||"",userId:e?.userId||"",createdBy:e?.createdBy||y(),created:e?.created||c(m()),updated:e?.updated||c(m()),deviceId:e?.deviceId||"",deviceName:e?.deviceName||"",status:e?.status||"EM_ESPERA",ultimoLogin:e?.ultimoLogin||0,plataforma:e?.plataforma||"mobile",ip:e?.ip||"",versaoApp:e?.versaoApp||""});var ne=(e={})=>({id:e?.id||"",id_integer:e?.id_integer||"",dataAposta:e?.dataAposta||0,bancaId:e?.bancaId||"",numero:e?.numero||"",premio:e?.premio||"",tipo_jogo:e?.tipo_jogo||"milhar",valorPremioAReceber:e?.valorPremioAReceber||0,valorEnviadoParaAssociacao:e?.valorEnviadoParaAssociacao||0,limiteTipoJogo:e?.limiteTipoJogo||0,valorTipoJogo:e?.valorTipoJogo||0,pulesGanhadoras:e?.pulesGanhadoras||{},createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var Ke=(e={})=>({id:e?.id||"",id_integer:e?.id_integer||"",type_game:e?.type_game||"milhar",bancaId:e?.bancaId||"",porcentagem:e?.porcentagem||0,createdBy:y(e?.createdBy),created:e?.created||c(m()),updated:e?.updated||c(m())});var Nr={mensagens:Y,users:X,valores_jogos:ee,limites_jogos:ae,pules:J,extracoes:K,resultados:Z,rotas:j,envios_descarga:ie,numeros:O,numeros_enviados:O,descargas:G,descargas_associacao:G,premiacoes:oe,premiacoes_associacao:ne,pdf_descargas:$,pdf_descargas_associacao:$,bancas:re,auditLogs:te,dispositivos:se,comissoes_descarga:Ke};var Ye=class{cache=new Map;ttl;maxSize;constructor(o=3e5,r=1e3){this.ttl=o,this.maxSize=r}get(o){let r=this.cache.get(o);return r?Date.now()-r.timestamp>this.ttl?(this.cache.delete(o),null):r.data:null}set(o,r){if(this.cache.size>=this.maxSize){let t=this.cache.keys().next().value;t&&this.cache.delete(t)}this.cache.set(o,{data:r,timestamp:Date.now()})}delete(o){this.cache.delete(o)}clear(){this.cache.clear()}};function v(e,o,r){let{collectionName:t,model:a,idSearchStrategy:n,isolation:s,cache:f,authorization:g,generateId:h}=r,d=f?.enabled?new Ye(f.ttl,f.maxSize):null,D=l=>{if(!g?.enabled)return;let p=g.getUserRole(),T=g.allowedRoles[l];if(!(!T||T.length===0)){if(!p)throw g.onUnauthorized?.(l,p),new Error(`\u274C N\xE3o autorizado: Opera\xE7\xE3o '${l}' requer autentica\xE7\xE3o na cole\xE7\xE3o '${t}'`);if(!T.includes(p))throw g.onUnauthorized?.(l,p),new Error(`\u274C N\xE3o autorizado: Role '${p}' n\xE3o tem permiss\xE3o para '${l}' na cole\xE7\xE3o '${t}'. Roles permitidas: ${T.join(", ")}`)}},L=()=>{if(!s?.enabled)return[];let l=s.getValue();return l?[{field:s.fieldName,operator:"==",value:l}]:[]},R=l=>{let p=[];L().forEach(({field:S,operator:_,value:M})=>{p.push(o.where(S.toString(),_,M))}),l?.where?.forEach(({field:S,operator:_,value:M})=>{p.push(o.where(S.toString(),_,M))}),l?.orderBy?.forEach(({field:S,direction:_})=>{p.push(o.orderBy(S.toString(),_))}),l?.limit&&p.push(o.limit(l.limit)),l?.startAfter!==void 0&&p.push(o.startAfter(l.startAfter)),l?.startAt!==void 0&&p.push(o.startAt(l.startAt)),l?.endBefore!==void 0&&p.push(o.endBefore(l.endBefore)),l?.endAt!==void 0&&p.push(o.endAt(l.endAt));let x=o.collection(e,t);return o.query(x,...p)},V=async l=>{switch(n.type){case"documentId":return o.doc(e,t,l);case"field":let p=R({where:[{field:n.fieldName,operator:"==",value:l}],limit:1}),T=await o.getDocs(p);if(T.empty)throw new Error(`Document not found with ${String(n.fieldName)}: ${l}`);return T.docs[0].ref;case"custom":return n.resolver(l);default:throw new Error(`Unknown idSearchStrategy: ${n.type}`)}},A=(l,...p)=>{let T=s?.enabled?`_${s.getValue()}`:"";return`${t}${T}_${l}_${JSON.stringify(p)}`};return{get:async l=>{try{if(D("read"),d){let x=A("get",l),S=d.get(x);if(S)return S}let p;if(n.type==="documentId"){let x=o.doc(e,t,l);p=await o.getDoc(x)}else if(n.type==="field"){let x=R({where:[{field:n.fieldName,operator:"==",value:l}],limit:1});p=(await o.getDocs(x)).docs[0]||null}else{let x=await V(l);p=await o.getDoc(x)}if(!p?.exists())return null;let T=a(p.data());if(d){let x=A("get",l);d.set(x,T)}return T}catch(p){return console.error(`Error getting document ${l}:`,p),null}},getAll:async l=>{try{D("read");let p=R(l),T=await o.getDocs(p),x={};return T.forEach(S=>{let _=a(S.data());x[_.id]=_}),x}catch(p){return console.error("Error getting all documents:",p),{}}},listen:(l,p)=>{D("read");let T=R(l);return o.onSnapshot(T,x=>{let S={};x.forEach(_=>{let M=a(_.data());S[M.id]=M}),p(S)})},add:async l=>{try{D("write");let p=l.id||h?.()||o.generateId(),T={...l,id:p};s?.enabled&&s.getValue()&&(T[s.fieldName]=s.getValue());let x=o.doc(e,t,p),S=a(T);return await o.setDoc(x,S),d&&d.delete(A("get",p)),p}catch(p){throw console.error("Error adding document:",p),p}},update:async(l,p)=>{try{D("write");let T=await V(l),x={...p};s?.enabled&&s.getValue()&&(x[s.fieldName]=s.getValue()),await o.updateDoc(T,x),d&&d.delete(A("get",l))}catch(T){throw console.error(`Error updating document ${l}:`,T),T}},remove:async l=>{try{D("delete");let p=await V(l);await o.deleteDoc(p),d&&d.delete(A("get",l))}catch(p){throw console.error(`Error removing document ${l}:`,p),p}},batch:async l=>{try{new Set(l.map(x=>x.operation)).forEach(x=>{D(x==="delete"?"delete":"write")});let T=o.writeBatch(e);for(let{id:x,data:S,operation:_}of l){let M=x||h?.()||o.generateId(),Ee=o.doc(e,t,M),_e={...S,id:M};s?.enabled&&s.getValue()&&(_e[s.fieldName]=s.getValue());let $o=a(_e);switch(_){case"add":o.batchSet(T,Ee,$o);break;case"update":o.batchUpdate(T,Ee,_e);break;case"delete":o.batchDelete(T,Ee);break}}await o.batchCommit(T),d&&d.clear()}catch(p){throw console.error("Error in batch operation:",p),p}},clearCache:()=>d?.clear(),getCacheSize:()=>d?.cache.size||0}}var Uo=e=>{try{return e&&typeof e.getFirestore=="function"||e&&typeof e.collection=="function"&&typeof e.doc=="function"&&typeof e.query=="function"&&typeof e.where=="function"?"v9-modular":e&&typeof e.firestore=="function"||e&&typeof e.collection=="function"&&typeof e.doc=="function"&&typeof e.batch=="function"?"v8":e&&e.initializeApp&&typeof e.initializeApp=="function"?"v9-modular":"unknown"}catch(o){return console.warn("Erro ao detectar vers\xE3o do Firebase:",o),"unknown"}},Jo=e=>({collection:(o,r)=>e.collection(o,r),doc:(o,r,...t)=>e.doc(o,r,...t),query:(o,...r)=>e.query(o,...r),where:(o,r,t)=>e.where(o,r,t),orderBy:(o,r="asc")=>e.orderBy(o,r),limit:o=>e.limit(o),startAfter:(...o)=>e.startAfter(...o),startAt:(...o)=>e.startAt(...o),endBefore:(...o)=>e.endBefore(...o),endAt:(...o)=>e.endAt(...o),getDocs:e.getDocs,getDoc:e.getDoc,setDoc:e.setDoc,updateDoc:e.updateDoc,deleteDoc:e.deleteDoc,writeBatch:e.writeBatch,batchSet:(o,r,t)=>o.set(r,t),batchUpdate:(o,r,t)=>o.update(r,t),batchDelete:(o,r)=>o.delete(r),batchCommit:o=>o.commit(),onSnapshot:e.onSnapshot,generateId:()=>k()}),Ze=()=>({collection:(e,o)=>e.collection(o),doc:(e,o,...r)=>e.collection(o).doc(r.join("/")),query:(e,...o)=>{let r=e;return o.forEach(t=>{t.type==="where"?r=r.where(t.field,t.opStr,t.value):t.type==="orderBy"?r=r.orderBy(t.field,t.direction):t.type==="limit"?r=r.limit(t.limit):t.type==="startAfter"?r=r.startAfter(...t.values):t.type==="startAt"?r=r.startAt(...t.values):t.type==="endBefore"?r=r.endBefore(...t.values):t.type==="endAt"&&(r=r.endAt(...t.values))}),r},where:(e,o,r)=>({type:"where",field:e,opStr:o,value:r}),orderBy:(e,o="asc")=>({type:"orderBy",field:e,direction:o}),limit:e=>({type:"limit",limit:e}),startAfter:(...e)=>({type:"startAfter",values:e}),startAt:(...e)=>({type:"startAt",values:e}),endBefore:(...e)=>({type:"endBefore",values:e}),endAt:(...e)=>({type:"endAt",values:e}),getDocs:e=>e.get(),getDoc:e=>e.get(),setDoc:(e,o,r)=>e.set(o,r),updateDoc:(e,o)=>e.update(o),deleteDoc:e=>e.delete(),writeBatch:e=>e.batch(),batchSet:(e,o,r)=>e.set(o,r),batchUpdate:(e,o,r)=>e.update(o,r),batchDelete:(e,o)=>e.delete(o),batchCommit:e=>e.commit(),onSnapshot:(e,o)=>e.onSnapshot(o),generateId:()=>k()}),Se=e=>{let o=Uo(e);switch(console.log(`\u{1F525} Firebase version detected: ${o}`),o){case"v9-modular":return Jo(e);case"v8":return Ze();default:return console.warn("\u26A0\uFE0F Firebase version not detected, falling back to v8 adapter"),Ze()}},Rr=(e,o,r)=>{let t=Se(e);return v(o,t,r)},je=()=>({collection:(e,o)=>e.collection(o),doc:(e,o,...r)=>e.collection(o).doc(r.join("/")),query:(e,...o)=>{let r=e;return o.forEach(t=>{t.type==="where"?r=r.where(t.field,t.opStr,t.value):t.type==="orderBy"?r=r.orderBy(t.field,t.direction):t.type==="limit"?r=r.limit(t.limit):t.type==="startAfter"?r=r.startAfter(...t.values):t.type==="startAt"?r=r.startAt(...t.values):t.type==="endBefore"?r=r.endBefore(...t.values):t.type==="endAt"&&(r=r.endAt(...t.values))}),r},where:(e,o,r)=>({type:"where",field:e,opStr:o,value:r}),orderBy:(e,o="asc")=>({type:"orderBy",field:e,direction:o}),limit:e=>({type:"limit",limit:e}),startAfter:(...e)=>({type:"startAfter",values:e}),startAt:(...e)=>({type:"startAt",values:e}),endBefore:(...e)=>({type:"endBefore",values:e}),endAt:(...e)=>({type:"endAt",values:e}),getDocs:e=>e.get(),getDoc:e=>e.get(),setDoc:(e,o,r)=>e.set(o,r),updateDoc:(e,o)=>e.update(o),deleteDoc:e=>e.delete(),writeBatch:e=>e.batch(),batchSet:(e,o,r)=>e.set(o,r),batchUpdate:(e,o,r)=>e.update(o,r),batchDelete:(e,o)=>e.delete(o),batchCommit:e=>e.commit(),onSnapshot:(e,o)=>e.onSnapshot(o),generateId:()=>k()});var Ir=(e,o={enabled:!0,ttl:3e5,maxSize:1e3},r)=>{let t=n=>({...n,isolation:e?{enabled:!0,fieldName:"bancaId",getValue:e}:void 0,cache:o,authorization:r?.[n.collectionName]}),a=n=>({...n,cache:o,authorization:r?.[n.collectionName]});return{users_associacao:a({collectionName:"users",model:X,idSearchStrategy:{type:"documentId"}}),users:t({collectionName:"users",model:X,idSearchStrategy:{type:"documentId"}}),bancas:a({collectionName:"bancas",model:re,idSearchStrategy:{type:"documentId"}}),extracoes:t({collectionName:"extracoes",model:K,idSearchStrategy:{type:"documentId"}}),resultados:t({collectionName:"resultados",model:Z,idSearchStrategy:{type:"documentId"}}),mensagens:t({collectionName:"mensagens",model:Y,idSearchStrategy:{type:"documentId"}}),rotas:t({collectionName:"rotas",model:j,idSearchStrategy:{type:"documentId"}}),valores_jogos:t({collectionName:"valores_jogos",model:ee,idSearchStrategy:{type:"documentId"}}),limites_jogos:t({collectionName:"limites_jogos",model:ae,idSearchStrategy:{type:"documentId"}}),pules:t({collectionName:"pules",model:J,idSearchStrategy:{type:"documentId"}}),numeros:t({collectionName:"numeros",model:O,idSearchStrategy:{type:"documentId"}}),numeros_enviados:t({collectionName:"numeros_enviados",model:O,idSearchStrategy:{type:"documentId"}}),descargas:t({collectionName:"descargas",model:G,idSearchStrategy:{type:"documentId"}}),descargas_associacao:t({collectionName:"descargas_associacao",model:G,idSearchStrategy:{type:"documentId"}}),premiacoes:t({collectionName:"premiacoes",model:oe,idSearchStrategy:{type:"documentId"}}),premiacoes_associacao:t({collectionName:"premiacoes_associacao",model:ne,idSearchStrategy:{type:"documentId"}}),pdf_descargas:t({collectionName:"pdf_descargas",model:$,idSearchStrategy:{type:"documentId"}}),pdf_descargas_associacao:t({collectionName:"pdf_descargas_associacao",model:$,idSearchStrategy:{type:"documentId"}}),auditLogs:t({collectionName:"auditLogs",model:te,idSearchStrategy:{type:"documentId"}}),envios_descarga:t({collectionName:"envios_descarga",model:ie,idSearchStrategy:{type:"documentId"}}),dispositivos:t({collectionName:"dispositivos",model:se,idSearchStrategy:{type:"documentId"}})}};function eo(e){let{db:o,adapter:r,getBancaId:t,cacheConfig:a,authorizationConfigs:n}=e,s=Ir(t,a,n);return{users_associacao:v(o,r,s.users_associacao),users:v(o,r,s.users),bancas:v(o,r,s.bancas),extracoes:v(o,r,s.extracoes),resultados:v(o,r,s.resultados),mensagens:v(o,r,s.mensagens),rotas:v(o,r,s.rotas),valores_jogos:v(o,r,s.valores_jogos),limites_jogos:v(o,r,s.limites_jogos),pules:v(o,r,s.pules),numeros:v(o,r,s.numeros),numeros_enviados:v(o,r,s.numeros_enviados),descargas:v(o,r,s.descargas),descargas_associacao:v(o,r,s.descargas_associacao),premiacoes:v(o,r,s.premiacoes),premiacoes_associacao:v(o,r,s.premiacoes_associacao),pdf_descargas:v(o,r,s.pdf_descargas),pdf_descargas_associacao:v(o,r,s.pdf_descargas_associacao),auditLogs:v(o,r,s.auditLogs),envios_descarga:v(o,r,s.envios_descarga),dispositivos:v(o,r,s.dispositivos)}}function Cr(e){return eo({...e,adapter:Se(e.firebaseInstance)})}function Mr(e){return eo({...e,adapter:je()})}export{te as AuditLogModel,re as BancaModel,Pr as BetModel,Re as COMISSOES_PADRAO,Ke as ComissaoDescargaModel,G as DescargaModel,se as DeviceModel,qo as EXTRACAO,ie as EnvioDescargaModel,K as ExtracaoModel,u as GAMES,Ho as GRUPOS_BICHOS,J as GameModel,Yo as KEYBOARD,ae as LimitGameModel,Qo as MESSAGES,Y as MessageModel,O as NumberModel,$ as PDFModel,w as PREFIX_ENVIO,C as PREFIX_ENVIO_OLD,E as PREFIX_NUMBER,P as PREMIOS,ne as PremiacaoAssociacaoModel,oe as PremiacaoModel,Xo as ROLES,Z as ResultadoModel,j as RouteModel,Ne as STATUS_DESCARGA,Zo as STATUS_DEVICE,Pe as STATUS_PULE,Wo as TIPO_VISUALIZACAO,X as UserModel,Ko as VISUALIZACAO,ee as ValueGameModel,U as arredondarParaCima,ge as calculaValoresDosNumeros,pe as calcularValorDeNumero,_o as calcularValorJogoPeloLimite,Ae as calculateAmount,ve as calculateAmountGame,N as clone,Nr as collections,oo as combineDateTime,Rr as createAutoRepo,v as createGenericRepo,je as createReactNativeAdapter,Mr as createReactNativeRepoFactory,eo as createRepoFactory,Ze as createV8Adapter,Jo as createV9ModularAdapter,Se as createWebAdapter,Cr as createWebRepoFactory,c as dateToNumber,po as delay,Uo as detectFirebaseVersion,lo as dividirArray,wo as extracaoEstaAtivaBoolean,be as extracaoEstaAtivaTryCatch,Io as fazerJogo,No as formatPuleId,B as formatarNumero,so as formatterBRL,fo as formatterPercentage,To as formatterPercentageDecimal,H as functionsCore,Be as generateDescargas,k as generateId,Ao as gerarDezenas,ce as getAllCombinations,Bo as getAvailableTimes,F as getBetDateToNumber,me as getCodigoAuth,y as getCreatedBySystem,io as getDataInicioFim,Ro as getFormattedPuleId,Co as getGamesUnicosList,Mo as getGamesUnicosObjeto,go as getInitials,he as getLimiteJogoPeloTipoJogo,Po as getLimiteSimulado,Vo as getLimitsRest,de as getNumeroId,bo as getNumerosAcimaDoLimite,Lo as getPermission,ue as getPremioFormato,fe as getPropsEnvioId,ye as getPropsEnvioIdOld,Q as getPropsPrefix,Te as getPropsVP,le as getSomaEnvio,Eo as getSomaProps,vo as getSomaVP,q as getTiposJogos,xe as getValorJogoPeloTipoJogo,De as invertGame,Ve as isAdm,Je as isAdmOrSubAdm,ze as isAssociacao,ke as isCambista,$e as isCambistaTalao,He as isDigitador,qe as isDigitadorAdm,Qe as isDigitadorOrDigitadorAdm,Ue as isSuperAdm,uo as matchNormalized,W as normalize,b as numberToDate,mo as numbersSelectedFormated,no as parserBRL,yo as parserPercentage,ho as parserPercentageDecimal,Oo as pegarExtracoes,m as pegarHorarioSaoPaulo,xo as removerLetters,I as showFormatDate,So as sortNumeros};
2
2
  //# sourceMappingURL=index.esm.js.map