@8sheets/data-grid 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/README.md +1 -1
  2. package/api/serialize.js +1 -1
  3. package/calc/engine.js +1 -1
  4. package/calc/functions/array.js +1 -1
  5. package/calc/functions/lookup.js +1 -1
  6. package/calc/parser.js +3 -3
  7. package/cells/axis-ops.js +1 -1
  8. package/cells/goto.js +1 -1
  9. package/cells/options.js +1 -1
  10. package/cells/view-options.js +1 -1
  11. package/charts/chartex.js +3 -3
  12. package/core/default-names.js +1 -1
  13. package/core/formula-refs.js +1 -1
  14. package/core/input.js +1 -1
  15. package/core/numfmt.js +1 -1
  16. package/core/sheet-group.js +1 -0
  17. package/core/tables.js +2 -2
  18. package/core/whatif.js +1 -1
  19. package/core/workbook.js +1 -1
  20. package/extras/getdata/persist.js +2 -2
  21. package/extras/getdata/steps.js +1 -1
  22. package/i18n/en/cells.js +1 -1
  23. package/i18n/en/charts.js +1 -1
  24. package/i18n/en/misc.js +1 -1
  25. package/i18n/en/pivot.js +1 -1
  26. package/i18n/en/ribbon.js +1 -1
  27. package/i18n/en/shell.js +1 -1
  28. package/i18n/pl/cells.js +1 -1
  29. package/i18n/pl/charts.js +1 -1
  30. package/i18n/pl/misc.js +1 -1
  31. package/i18n/pl/pivot.js +1 -1
  32. package/i18n/pl/ribbon.js +1 -1
  33. package/i18n/pl/shell.js +1 -1
  34. package/io/client.js +1 -1
  35. package/io/csv.js +8 -5
  36. package/io/export-blocks.js +1 -1
  37. package/io/plan.js +1 -1
  38. package/io/text-split.js +3 -0
  39. package/io/xlsx-read.js +1 -1
  40. package/io/xlsx-tail.js +1 -1
  41. package/io/xlsx-write.js +2 -2
  42. package/objects/chart-model.js +1 -1
  43. package/package.json +1 -1
  44. package/pivot/engine.js +1 -1
  45. package/pivot/xml.js +2 -2
  46. package/print/page-setup.js +1 -1
  47. package/slicers/custom-styles.js +1 -1
  48. package/slicers/table-file.js +1 -1
  49. package/table-view/files.js +1 -1
  50. package/table-view/labels.js +1 -1
  51. package/table-view/version.js +1 -1
  52. package/ui/protection-ui.js +1 -1
package/i18n/pl/shell.js CHANGED
@@ -1 +1 @@
1
- var e={"Excel Workbook":"Skoroszyt programu Excel","Excel Macro-Enabled Workbook":"Skoroszyt programu Excel z obsługą makr","Text files":"Pliki tekstowe","Circular reference: the formula refers to its own cell":"Odwołanie cykliczne: formuła odwołuje się do własnej komórki","Preparing formulas…":"Przygotowywanie formuł…","Calculating: {pct}%":"Obliczanie: {pct}%",'Recovered "{name}" from {when}.':"Odzyskano plik „{name}” (stan z {when}).",Restore:"Przywróć",Discard:"Odrzuć","Opening {name}…":"Otwieranie pliku {name}…","Opening… {count} cells":"Otwieranie… (komórki: {count})","Ready (opened {count} cells in {secs} s)":"Gotowy (otwarte komórki: {count}, czas: {secs} s)","The file reader didn't start. Check the connection and try again.":"Nie udało się uruchomić czytnika plików. Sprawdź połączenie i spróbuj ponownie.","Couldn't open {name}: {error}":"Nie można otworzyć pliku {name}: {error}","Saved {name}":"Zapisano plik {name}","Couldn't save: {error}":"Nie można zapisać: {error}",'"{text}" is not a valid reference':"„{text}” nie jest prawidłowym odwołaniem","Couldn't open the file: {error}":"Nie można otworzyć pliku: {error}","Unsaved Changes":"Niezapisane zmiany","Discard unsaved changes in this workbook?":"Czy odrzucić niezapisane zmiany w tym skoroszycie?",'That password is not correct. "{name}" is protected. Enter its password.':"Hasło jest nieprawidłowe. Plik „{name}” jest chroniony. Wprowadź jego hasło.",'"{name}" is protected. Enter its password.':"Plik „{name}” jest chroniony. Wprowadź jego hasło.","Didn't open {name}":"Nie otwarto pliku {name}","Couldn't open {name}":"Nie udało się otworzyć pliku {name}","The file couldn't be downloaded ({reason}).":"Nie udało się pobrać pliku ({reason}).","The file couldn't be read.":"Nie udało się odczytać pliku.","Try again":"Spróbuj ponownie","Use an empty workbook":"Użyj pustego skoroszytu","Password to Open":"Hasło do otwarcia","Enter a new password, or leave it empty to remove the password.":"Wprowadź nowe hasło lub pozostaw pole puste, aby usunąć hasło.","Enter a password. If you lose it, the workbook cannot be recovered.":"Wprowadź hasło. Jeśli je zgubisz, nie będzie można odzyskać skoroszytu.","Enter the password again.":"Wprowadź ponownie hasło.","The password was not changed":"Hasło nie zostało zmienione","The passwords did not match, so it was not changed":"Hasła nie są zgodne, więc hasło nie zostało zmienione","The password applies from the next save":"Hasło będzie obowiązywać od następnego zapisu","The password is removed from the next save":"Hasło zostanie usunięte przy następnym zapisie","Saving…":"Zapisywanie…","Saving… {pct}%":"Zapisywanie… {pct}%","Saved ({size} MB in {secs} s)":"Zapisano ({size} MB w {secs} s)","The browser blocked clipboard access. Press ⌘V to paste.":"Przeglądarka zablokowała dostęp do schowka. Naciśnij ⌘V, aby wkleić.","Clear All":"Wyczyść wszystko","Clear Formats":"Wyczyść formaty","Clear Contents":"Wyczyść zawartość","Clear Comments and Notes":"Wyczyść komentarze i notatki","Clear Hyperlinks":"Wyczyść hiperlinki","Remove Hyperlinks":"Usuń hiperlinki","Clear Series":"Wyczyść serię","Find Next":"Znajdź następny","Find Previous":"Znajdź poprzedni","Rename Sheet":"Zmień nazwę arkusza","Hide Sheet":"Ukryj arkusz","Unhide Sheet…":"Odkryj arkusz…","Background…":"Tło…","About 8sheets":"8sheets — informacje","A spreadsheet that runs in the browser and keeps your files on your computer.":"Arkusz kalkulacyjny, który działa w przeglądarce i przechowuje pliki na Twoim komputerze.","What's new in this version":"Co nowego w tej wersji","Excel is a trademark of Microsoft. This app isn't made by or connected to Microsoft.":"Excel jest znakiem towarowym firmy Microsoft. Ta aplikacja nie została utworzona przez firmę Microsoft ani nie jest z nią powiązana.","View…":"Widok…","Calculation…":"Obliczanie…","AutoCorrect…":"Autokorekta…","Custom Lists…":"Listy niestandardowe…","Keyboard…":"Klawiatura…","The document is renamed. Save puts it under the new name; the old file stays where it was.":"Zmieniono nazwę dokumentu. Polecenie Zapisz zapisze go pod nową nazwą; stary plik pozostanie na swoim miejscu.","This browser has no share sheet, so {name} was downloaded to attach yourself.":"Ta przeglądarka nie ma arkusza udostępniania, więc plik {name} został pobrany, aby można go było samodzielnie załączyć.","From the next save, this workbook suggests opening read-only.":"Od następnego zapisu ten skoroszyt będzie sugerować otwieranie tylko do odczytu.","The workbook no longer suggests opening read-only.":"Skoroszyt nie sugeruje już otwierania tylko do odczytu.","Password to modify":"Hasło ochrony przed zmianami","Password to modify:":"Hasło ochrony przed zmianami:",Unchanged:"Bez zmian","Read-only recommended":"Zalecane tylko do odczytu","Remove the password to modify":"Usuń hasło ochrony przed zmianami",Passwords:"Hasła","Password to Open…":"Hasło do otwarcia…","Passwords and sharing apply from the next save.":"Hasła i ustawienia udostępniania będą obowiązywać od następnego zapisu.","{name} is reserved by {user}. Enter the password for write access, or leave it empty and open read-only.":"Plik {name} jest zastrzeżony przez użytkownika {user}. Wprowadź hasło, aby uzyskać prawo zapisu, lub pozostaw pole puste i otwórz plik tylko do odczytu.","{name} is reserved by its author. Enter the password for write access, or leave it empty and open read-only.":"Plik {name} jest zastrzeżony przez autora. Wprowadź hasło, aby uzyskać prawo zapisu, lub pozostaw pole puste i otwórz plik tylko do odczytu.","Opened read-only: Save asks for a new file.":"Otwarto tylko do odczytu: polecenie Zapisz poprosi o nowy plik.",'The author would like you to open "{name}" as read-only unless you need to make changes. Open as read-only?':"Autor chciałby, aby plik „{name}” był otwierany tylko do odczytu, chyba że musisz wprowadzić zmiany. Czy otworzyć tylko do odczytu?","Read-Only":"Tylko do odczytu","Set Print Area":"Ustaw obszar wydruku","Add to Print Area":"Dodaj do obszaru wydruku","Clear Print Area":"Wyczyść obszar wydruku","Excel Template":"Szablon programu Excel","New from Template…":"Nowy z szablonu…","Open Recent":"Otwórz ostatnie","Save As…":"Zapisz jako…","Save as Template…":"Zapisz jako szablon…","Export Sheet as CSV…":"Eksportuj arkusz jako CSV…","Move…":"Przenieś…","Choose the new place. A browser can't remove the old file, so delete it yourself if you want it gone.":"Wybierz nowe miejsce. Przeglądarka nie może usunąć starego pliku, więc usuń go samodzielnie, jeśli nie jest już potrzebny.",Import:"Importuj","Share…":"Udostępnij…","Send Workbook":"Wyślij skoroszyt","Send PDF":"Wyślij plik PDF","Always Open Read-Only":"Zawsze otwieraj tylko do odczytu","Passwords…":"Hasła…","Reduce File Size…":"Zmniejsz rozmiar pliku…","Page Setup…":"Ustawienia strony…","Print Area":"Obszar wydruku","About 8sheets…":"8sheets — informacje…","That file has no tables to import.":"Ten plik nie zawiera tabel do zaimportowania.","Imported {count} rows from {name}.":{one:"Zaimportowano {count} wiersz z pliku {name}.",few:"Zaimportowano {count} wiersze z pliku {name}.",many:"Zaimportowano {count} wierszy z pliku {name}.",other:"Zaimportowano {count} wiersza z pliku {name}."},"Table {n}: {caption}":"Tabela {n}: {caption}","From HTML":"Z pliku HTML","Choose a table:":"Wybierz tabelę:","From HTML…":"Z pliku HTML…","Bring to Front":"Przesuń na wierzch","Bring Forward":"Przesuń do przodu","Send Backward":"Przesuń do tyłu","Send to Back":"Przesuń na spód","Paste Special…":"Wklej specjalnie…","Insert Rows":"Wstaw wiersze","Insert Columns":"Wstaw kolumny","Delete Rows":"Usuń wiersze","Delete Columns":"Usuń kolumny","Column Width…":"Szerokość kolumny…","Row Height…":"Wysokość wiersza…","Rich Text…":"Tekst sformatowany…","Default Value…":"Wartość domyślna…","No recent files":"Brak ostatnio używanych plików","Clear Recent":"Wyczyść ostatnio używane","Freeze Panes isn't available in Page Layout view.":"Polecenie Zablokuj okienka jest niedostępne w widoku układu strony.","There is no room: data would be pushed off the end of the sheet.":"Brak miejsca: dane zostałyby wypchnięte poza koniec arkusza.","AutoSum needs empty cells next to the selection for the totals.":"Autosumowanie potrzebuje pustych komórek obok zaznaczenia na sumy.","This can't be applied to the selected range. Select a single cell in a range and try again.":"Nie można zastosować tego do zaznaczonego zakresu. Zaznacz jedną komórkę w zakresie i spróbuj ponownie.","Copy cells in this workbook first, then use Paste Special.":"Najpierw skopiuj komórki w tym skoroszycie, a następnie użyj polecenia Wklej specjalnie.","(No items)":"(Brak elementów)","This cell doesn't allow editing.":"Ta komórka nie zezwala na edycję.","You can't change part of a data table.":"Nie można zmienić części tabeli danych.","There's a problem with this formula. Fix it or press Esc to cancel.":"Wystąpił problem z tą formułą. Popraw ją lub naciśnij Esc, aby anulować.","{rows}R x {cols}C":"{rows}W x {cols}K","That selection is too large to copy to the clipboard":"To zaznaczenie jest zbyt duże, aby skopiować je do schowka",Allow:"Dozwolone","Any value":"Dowolna wartość","Whole number":"Pełna liczba",Decimal:"Dziesiętne",List:"Lista","Text length":"Długość tekstu",Custom:"Niestandardowe","dv|Data":"Wartości",between:"między","not between":"nie między","equal to":"równa","not equal to":"różna od","greater than":"większa niż","less than":"mniejsza niż","greater than or equal to":"większa lub równa","less than or equal to":"mniejsza lub równa","Minimum, source or formula":"Minimum, źródło lub formuła","Maximum:":"Maksimum:","Ignore blank":"Ignoruj puste","In-cell dropdown":"Rozwinięcie w komórce","Apply these changes to all other cells with the same settings":"Zastosuj te zmiany do wszystkich innych komórek z tymi samymi ustawieniami","Show input message when cell is selected":"Pokaż komunikat wejściowy, jeśli komórka jest zaznaczona","Input title":"Tytuł komunikatu wejściowego","Input message":"Komunikat wejściowy","Show error alert after invalid data is entered":"Pokazuj alerty o błędach po wprowadzeniu nieprawidłowych danych","Error style":"Styl błędu",Stop:"Zatrzymaj","Error title":"Tytuł błędu","Error message":"Komunikat o błędzie","Source:":"Źródło:","Formula:":"Formuła:","Minimum:":"Minimum:","Value:":"Wartość:","Validation criteria":"Kryteria poprawności","Allow:":"Dozwolone:","Data:":"Wartości:","When cell is selected, show this input message:":"Po zaznaczeniu komórki pokaż ten komunikat wejściowy:","Title:":"Tytuł:","Input message:":"Komunikat wejściowy:","When user enters invalid data, show this error alert:":"Po wprowadzeniu nieprawidłowych danych pokaż ten alert o błędzie:","Style:":"Styl:","Error message:":"Komunikat o błędzie:","Input Message":"Komunikat wejściowy","Error Alert":"Alert o błędzie","window|Data Validation":"Sprawdzanie poprawności danych","This sheet is protected with a password, which this app can't check yet.":"Ten arkusz jest chroniony hasłem, którego ta aplikacja nie może jeszcze sprawdzić.","Sheet unprotected.":"Usunięto ochronę arkusza.","Sheet protected. Locked cells can't be changed.":"Arkusz jest chroniony. Nie można zmieniać zablokowanych komórek.","The active cell has no formula to trace.":"Aktywna komórka nie zawiera formuły do śledzenia.","Data Range":"Zakres danych","Location Range":"Zakres lokalizacji","Data Range:":"Zakres danych:","Location Range:":"Zakres lokalizacji:","Choose the data that you want":"Wybierz odpowiednie dane","Choose where you want the sparklines to be placed":"Wybierz, gdzie mają zostać umieszczone wykresy przebiegu w czasie","Create Sparklines":"Tworzenie wykresów przebiegu w czasie","Data Reference is not valid.":"Odwołanie do danych jest nieprawidłowe.","Location reference is not valid because the cells are not all in the same column or same row. Select cells that are all in a single column or row.":"Odwołanie do lokalizacji jest nieprawidłowe, ponieważ komórki nie znajdują się w tej samej kolumnie lub w tym samym wierszu. Zaznacz komórki znajdujące się w jednej kolumnie lub w jednym wierszu.","Data Reference is not valid because the dimensions of the data range and the location range don't match.":"Odwołanie do danych jest nieprawidłowe, ponieważ wymiary zakresu danych i zakresu lokalizacji nie są zgodne.","A table can't overlap another table.":"Tabela nie może nakładać się na inną tabelę.","Light Style {n}":"Jasny styl {n}","Medium Style {n}":"Średni styl {n}","Dark Style {n}":"Ciemny styl {n}",Light:"Jasny",Medium:"Średni",Dark:"Ciemny","New Table Style…":"Nowy styl tabeli…","Flash Fill needs data in the column to the left.":"Wypełnianie błyskawiczne wymaga danych w kolumnie po lewej stronie.","Type an example of the pattern first, then use Flash Fill.":"Najpierw wpisz przykład wzorca, a następnie użyj wypełniania błyskawicznego.","Flash Fill couldn't find a pattern. Type another example.":"Wypełnianie błyskawiczne nie znalazło wzorca. Wpisz inny przykład.","Flash Fill filled {count} cells.":"Wypełnianie błyskawiczne wypełniło komórki: {count}.","Set cell":"Ustaw komórkę","To value":"Wartość docelowa","By changing cell":"Zmieniając komórkę","Set cell:":"Ustaw komórkę:","To value:":"Wartość docelowa:","By changing cell:":"Zmieniając komórkę:","Goal Seek":"Szukanie wyniku","Goal Seek needs a formula cell, a target value and an input cell.":"Szukanie wyniku wymaga komórki z formułą, wartości docelowej i komórki wejściowej.","Goal Seek Status":"Stan szukania wyniku","Goal Seeking with Cell {name} found a solution.":"Szukanie wyniku dla komórki {name} pozwoliło znaleźć rozwiązanie.","Goal Seeking with Cell {name} may not have found a solution.":"Szukanie wyniku dla komórki {name} mogło nie znaleźć rozwiązania.","Target value:":"Wartość docelowa:","Current value:":"Wartość bieżąca:","Removed {count} duplicate rows.":"Usunięte zduplikowane wiersze: {count}.","No duplicate values found.":"Nie znaleziono zduplikowanych wartości.","Text to Columns can only convert one column at a time.":"Funkcja Tekst jako kolumny może konwertować tylko jedną kolumnę naraz.","Choose the file type that best describes your data:":"Wybierz typ pliku, który najlepiej opisuje dane:",Delimited:"Rozdzielany","Fixed width":"Stała szerokość",Delimiters:"Ograniczniki","delimiter|Tab":"Tabulator",Semicolon:"Średnik",Comma:"Przecinek",Space:"Spacja","Other delimiter":"Inny ogranicznik","Other:":"Inny:","Treat consecutive delimiters as one":"Traktuj kolejne ograniczniki jako jeden","Text qualifier":"Kwalifikator tekstu","Text qualifier:":"Kwalifikator tekstu:","qualifier|none":"brak","Break lines":"Linie podziału","e.g. 5, 12":"np. 5, 12","Break lines after character:":"Linie podziału po znaku:","Column data format":"Format danych w kolumnie","Do not import column (skip)":"Nie importuj kolumny (pomiń)",Destination:"Miejsce docelowe","Destination:":"Miejsce docelowe:","Step {step} of {count}":"Krok {step} z {count}","Preview of selected data:":"Podgląd zaznaczonych danych:","Convert Text to Columns Wizard":"Kreator konwersji tekstu na kolumny","My data has headers":"Moje dane mają nagłówki","Column {name}":"Kolumna {name}","To delete duplicate values, select one or more columns that contain duplicates.":"Aby usunąć zduplikowane wartości, zaznacz co najmniej jedną kolumnę zawierającą duplikaty.","Unselect All":"Usuń zaznaczenie wszystkich","Remove Duplicates":"Usuń duplikaty","{removed} duplicate values found and removed; {left} unique values remain.":"Znalezione i usunięte zduplikowane wartości: {removed}; pozostałe wartości unikatowe: {left}.","The name that you entered is not valid. Use letters, numbers, periods and underscores, start with a letter or underscore, and don't use a cell reference.":"Wprowadzona nazwa jest nieprawidłowa. Użyj liter, cyfr, kropek i podkreśleń, zacznij od litery lub podkreślenia i nie używaj odwołania do komórki.",Scope:"Zakres","Refers to":"Odwołuje się do","Edit Name":"Edytowanie nazwy","New Name":"Nowa nazwa","Scope:":"Zakres:","Comment:":"Komentarz:","Refers to:":"Odwołuje się do:","Enter what the name refers to.":"Wprowadź, do czego odwołuje się nazwa.","The name already exists. Enter a unique name.":"Nazwa już istnieje. Wprowadź unikatową nazwę.","Changed {name}.":"Zmieniono nazwę {name}.","Defined {name}.":"Zdefiniowano nazwę {name}.","Name Manager":"Menedżer nazw","Refers To":"Odwołuje się do","Paste name":"Wklej nazwę","Paste List":"Wklej listę","Paste Name":"Wklejanie nazwy","Apply names":"Zastosuj nazwy","Ignore Relative/Absolute":"Ignoruj względne/bezwzględne","Names of whole rows and columns are applied only when they match exactly":"Nazwy całych wierszy i kolumn są stosowane tylko wtedy, gdy są dokładnie dopasowane","Use row and column names":"Użyj nazw wierszy i kolumn","Apply Names":"Stosowanie nazw","Names applied in {count} formulas.":"Zastosowano nazwy w formułach: {count}.","No references matched the names.":"Żadne odwołanie nie pasuje do nazw.","No formula on this sheet reads the active cell.":"Żadna formuła w tym arkuszu nie odczytuje aktywnej komórki.","{count} dependent cells.":"Komórki zależne: {count}.","The active cell has no formula to evaluate.":"Aktywna komórka nie zawiera formuły do oszacowania.","Next: {piece}":"Następny krok: {piece}","This step can't be shown: {error}":"Nie można pokazać tego kroku: {error}",Evaluate:"Szacuj",Restart:"Uruchom ponownie","That is the final result.":"To jest wynik końcowy.","Evaluate Formula":"Szacowanie formuły","No formula errors on this sheet.":"W tym arkuszu nie ma błędów formuł.","Error {n} of {count} in {cell}: {code}":"Błąd {n} z {count} w komórce {cell}: {code}","Error Checking":"Sprawdzanie błędów",Previous:"Poprzedni","Add Watch":"Dodaj czujkę","Watch Window":"Okno czujki","Remove watch on {cell}":"Usuń czujkę komórki {cell}","calc|Automatic":"Automatyczne","calc|Automatic Except for Data Tables":"Automatyczne z wyjątkiem tabel danych","calc|Manual":"Ręczne","Top row":"Górnym wierszu","Left column":"Lewej kolumnie","Bottom row":"Dolnym wierszu","Right column":"Prawej kolumnie","Create Names from Selection":"Tworzenie nazw z zaznaczenia","Created {count} names.":"Utworzone nazwy: {count}.","No names defined":"Brak zdefiniowanych nazw","Page {n}":"Strona {n}",Percent:"Procent","Sheet name":"Nazwa arkusza","Merged cells":"Scalone komórki","Missing alternative text":"Brak tekstu alternatywnego","Check Accessibility":"Sprawdzanie ułatwień dostępu","{count} things to review.":"Elementy do przejrzenia: {count}.","Row input cell":"Komórka wejściowa wiersza","Column input cell":"Komórka wejściowa kolumny","Row input cell:":"Komórka wejściowa wiersza:","Column input cell:":"Komórka wejściowa kolumny:","Data Table":"Tabela danych","Enter a row input cell, a column input cell, or both.":"Wprowadź komórkę wejściową wiersza, komórkę wejściową kolumny lub obie.","Select the whole table first, with its input values and formulas.":"Najpierw zaznacz całą tabelę z wartościami wejściowymi i formułami.","Data table created.":"Utworzono tabelę danych.","Scenario name":"Nazwa scenariusza","Changing cells":"Komórki zmieniane","Edit Scenario":"Edytowanie scenariusza","Add Scenario":"Dodawanie scenariusza","Scenario name:":"Nazwa scenariusza:","Changing cells:":"Komórki zmieniane:","Ctrl+click cells to select non-adjacent changing cells.":"Aby zaznaczyć nieprzylegające komórki zmieniane, klikaj je z naciśniętym klawiszem Ctrl.",Protection:"Ochrona","Prevent changes":"Zapobiegaj zmianom","Type a name for the scenario.":"Wpisz nazwę scenariusza.","Scenario name already exists. Type a different name for the scenario.":"Nazwa scenariusza już istnieje. Wpisz inną nazwę scenariusza.","The changing cells reference isn't valid.":"Odwołanie do komórek zmienianych jest nieprawidłowe.","Value of {cell}":"Wartość komórki {cell}","Scenario Values":"Wartości scenariusza","Enter values for each of the changing cells.":"Wprowadź wartości dla każdej z komórek zmienianych.",Scenarios:"Scenariusze","No Scenarios defined. Choose Add to add scenarios.":"Nie zdefiniowano scenariuszy. Wybierz przycisk Dodaj, aby dodać scenariusze.","Summary…":"Podsumowanie…","Scenario Manager":"Menedżer scenariuszy","Scenarios:":"Scenariusze:","Result cells":"Komórki wynikowe","A scenario PivotTable report isn't available here":"Raport tabeli przestawnej scenariusza nie jest tu dostępny","Scenario Summary":"Podsumowanie scenariusza","Report type":"Typ raportu","Scenario summary":"Podsumowanie scenariusza","Scenario PivotTable report":"Raport tabeli przestawnej scenariusza","Result cells:":"Komórki wynikowe:","fn|Sum":"Suma","fn|Count":"Licznik","fn|Average":"Średnia","fn|Max":"Maksimum","fn|Min":"Minimum","fn|Product":"Iloczyn","fn|Count Numbers":"Licznik liczb","fn|StdDev":"Odch.Std","fn|StdDevp":"Odch.StdPopul","fn|Var":"Wariancja","fn|Varp":"WariancjaPopul",Reference:"Odwołanie","All references":"Wszystkie odwołania","Reference isn't valid.":"Odwołanie jest nieprawidłowe.","window|Consolidate":"Konsolidowanie","Select…":"Zaznacz…","Create links to source data":"Utwórz łącza z danymi źródłowymi","Function:":"Funkcja:","Reference:":"Odwołanie:","All references:":"Wszystkie odwołania:","Use labels in:":"Użyj etykiet w:","Consolidated with links into {cell}: {rows} rows, {cols} columns.":"Skonsolidowano z łączami do komórki {cell} (wiersze: {rows}, kolumny: {cols}).","Consolidated into {cell}: {rows} rows, {cols} columns.":"Skonsolidowano do komórki {cell} (wiersze: {rows}, kolumny: {cols}).","The cell or chart you're trying to change is on a protected sheet. To make a change, unprotect the sheet.":"Komórka lub wykres, który próbujesz zmienić, znajduje się w chronionym arkuszu. Aby wprowadzić zmianę, usuń ochronę arkusza.",Protected:"Chronione","The workbook is protected, so sheets can't be added, moved, renamed, hidden or deleted.":"Skoroszyt jest chroniony, więc nie można dodawać, przenosić, ukrywać ani usuwać arkuszy ani zmieniać ich nazw.","Confirm password":"Potwierdź hasło","Confirm password:":"Potwierdź hasło:","The passwords don't match.":"Hasła nie są zgodne.","Unprotect Sheet":"Nie chroń arkusza","The password you supplied is not correct.":"Podane hasło jest nieprawidłowe.","Password to unprotect (optional):":"Hasło do usunięcia ochrony (opcjonalne):","protect|Select locked cells":"Zaznaczanie zablokowanych komórek","protect|Select unlocked cells":"Zaznaczanie odblokowanych komórek","protect|Format cells":"Formatowanie komórek","protect|Format columns":"Formatowanie kolumn","protect|Format rows":"Formatowanie wierszy","protect|Insert columns":"Wstawianie kolumn","protect|Insert rows":"Wstawianie wierszy","protect|Insert hyperlinks":"Wstawianie hiperlinków","protect|Delete columns":"Usuwanie kolumn","protect|Delete rows":"Usuwanie wierszy","protect|Sort":"Sortowanie","protect|Use AutoFilter":"Używanie autofiltru","protect|Use PivotTable reports":"Używanie raportów tabeli przestawnej","protect|Edit objects":"Edytowanie obiektów","protect|Edit scenarios":"Edytowanie scenariuszy","Protect Sheet":"Chroń arkusz","Allow all users of this worksheet to:":"Zezwalaj wszystkim użytkownikom tego arkusza na:","Sheet protected.":"Arkusz jest chroniony.","Workbook unprotected.":"Usunięto ochronę skoroszytu.","Unprotect Workbook":"Nie chroń skoroszytu","Password (optional):":"Hasło (opcjonalne):","Protect Workbook":"Chroń skoroszyt","Protects the structure: sheets can't be added, moved, renamed, hidden or deleted.":"Chroni strukturę: nie można dodawać, przenosić, ukrywać ani usuwać arkuszy ani zmieniać ich nazw.","Workbook protected.":"Skoroszyt jest chroniony.","{shown} of {count} records found":"Znalezione rekordy: {shown} z {count}","{copied} of {count} records copied":"Skopiowane rekordy: {copied} z {count}","The extract range is full: the rest of the records were not copied.":"Zakres wyodrębniania jest pełny: pozostałe rekordy nie zostały skopiowane.","The extract range has a missing or invalid field name.":"W zakresie wyodrębniania brakuje nazwy pola lub jest ona nieprawidłowa.","Filter the list, in-place":"Filtruj listę na miejscu","Copy to another location":"Kopiuj w inne miejsce","List range":"Zakres listy","Criteria range":"Zakres kryteriów","Copy to":"Kopiuj do","Unique records only":"Tylko unikatowe rekordy","Copy to:":"Kopiuj do:","List range:":"Zakres listy:","Criteria range:":"Zakres kryteriów:","The list range isn't valid.":"Zakres listy jest nieprawidłowy.","The list range needs a row of field names and at least one row of data.":"Zakres listy wymaga wiersza nazw pól i co najmniej jednego wiersza danych.","The criteria range isn't valid.":"Zakres kryteriów jest nieprawidłowy.","Enter where to copy to.":"Wprowadź miejsce, do którego chcesz kopiować.","The Copy to range isn't valid.":"Zakres „Kopiuj do” jest nieprawidłowy.","You can only copy filtered data to the active sheet.":"Przefiltrowane dane można kopiować tylko do aktywnego arkusza.","The Copy to range can't overlap the list.":"Zakres „Kopiuj do” nie może nakładać się na listę.","To filter in place, the list must be on the active sheet.":"Aby filtrować na miejscu, lista musi znajdować się w aktywnym arkuszu.","Advanced Filter":"Filtr zaawansowany","This workbook has no links to other workbooks.":"Ten skoroszyt nie zawiera linków do innych skoroszytów.","Edit Links":"Edytuj linki","(unknown)":"(nieznany)",Worksheet:"Arkusz",Unknown:"Nieznany","Error: Source not found":"Błąd: nie znaleziono źródła","Error: Sheet not found":"Błąd: nie znaleziono arkusza","links|Source":"Źródło","links|Type":"Typ","links|Update":"Aktualizacja","links|Status":"Stan","A browser can't open a path by itself, so Update Values, Change Source, Open Source and Check Status ask you for the file.":"Przeglądarka nie może sama otworzyć ścieżki, dlatego polecenia Aktualizuj wartości, Zmień źródło, Otwórz źródło i Sprawdź stan proszą o wskazanie pliku.","Update Values":"Aktualizuj wartości","Change Source…":"Zmień źródło…","Open Source":"Otwórz źródło","Break Link":"Przerwij link","Breaking links permanently converts formulas and external references to their existing values. Break the link?":"Przerwanie linków trwale konwertuje formuły i odwołania zewnętrzne na ich bieżące wartości. Czy przerwać link?","Break Links":"Przerwij linki","Check Status":"Sprawdź stan","Print settings":"Ustawienia wydruku","Hidden rows, columns and filter settings":"Ukryte wiersze, kolumny i ustawienia filtru","Add View":"Dodawanie widoku","Include in view":"Uwzględnij w widoku","Enter a name for the view.":"Wprowadź nazwę widoku.",Views:"Widoki","Custom Views":"Widoki niestandardowe","Views:":"Widoki:","Delete the view {name}?":"Czy usunąć widok {name}?","Bad cell reference: {ref}":"Nieprawidłowe odwołanie do komórki: {ref}","Bad range: {ref}":"Nieprawidłowy zakres: {ref}","No sheet named {name}":"Brak arkusza o nazwie {name}","Script finished.":"Skrypt zakończył działanie.","Script error: {error}":"Błąd skryptu: {error}",Scripts:"Skrypty","Script name":"Nazwa skryptu","Script code":"Kod skryptu","Script {n}":"Skrypt {n}",Run:"Uruchom","Error: {error}":"Błąd: {error}","Finished.":"Zakończono.","Recording stopped.":"Zatrzymano rejestrowanie.","Recorded {time}":"Zarejestrowano {time}","Recording. Edits and formats are written to a script.":"Rejestrowanie. Zmiany i formaty są zapisywane w skrypcie.","Cells with data":"Komórki z danymi",Tables:"Tabele","Defined names":"Nazwy zdefiniowane","Last cell on this sheet":"Ostatnia komórka w tym arkuszu","Merged areas on this sheet":"Scalone obszary w tym arkuszu","Notes on this sheet":"Notatki w tym arkuszu","Workbook Statistics":"Statystyki skoroszytu","block|Punctuation":"Interpunkcja ogólna","block|Latin-1 Supplement":"Łaciński-1 — uzupełnienie","block|Latin Extended-A":"Łaciński rozszerzony-A","block|Greek":"Grecki","block|Currency":"Symbole walut","block|Letterlike":"Symbole literopodobne","block|Number Forms":"Formy liczbowe","block|Arrows":"Strzałki","block|Mathematical Operators":"Operatory matematyczne","block|Box Drawing":"Elementy ramek","block|Geometric Shapes":"Kształty geometryczne","block|Miscellaneous Symbols":"Różne symbole","block|Dingbats":"Dingbaty",Subset:"Podzbiór","Subset:":"Podzbiór:",Symbols:"Symbole","Character code: {code}":"Kod znaku: {code}",Symbol:"Symbol","(None yet)":"(Jeszcze brak)","Search for a function":"Wyszukaj funkcję",Category:"Kategoria","Category:":"Kategoria:","fncat|Financial":"Finansowe","fncat|Logical":"Logiczne","fncat|Text":"Tekstowe","fncat|Date & Time":"Daty i godziny","fncat|Lookup & Reference":"Wyszukiwanie i odwołania","fncat|Math & Trig":"Matematyczne i trygonometryczne","fncat|Statistical":"Statystyczne","fncat|Engineering":"Inżynierskie","fncat|Information":"Informacyjne","fncat|Database":"Bazy danych","fncat|Barcode":"Kody kreskowe","fncat|Sparkline":"Wykresy przebiegu w czasie","No functions match.":"Brak pasujących funkcji.","window|Insert Function":"Wstawianie funkcji","Your Name":"Twoje imię i nazwisko","Name shown on your comments:":"Nazwa wyświetlana przy Twoich komentarzach:","This cell has no comment.":"Ta komórka nie zawiera komentarza.","This sheet has no comments.":"Ten arkusz nie zawiera komentarzy.","Start a conversation":"Rozpocznij konwersację","New comment":"Nowy komentarz",Post:"Opublikuj","Edit comment":"Edytuj komentarz",Reply:"Odpowiedz","Reply on {cell}":"Odpowiedz w komórce {cell}",Reopen:"Otwórz ponownie",Resolve:"Rozwiąż","Today, {time}":"Dzisiaj, {time}","Comments are read-only in this workbook.":"Komentarze w tym skoroszycie są tylko do odczytu.","This cell has a note. A cell has either a note or a comment; delete the note to add a comment.":"Ta komórka zawiera notatkę. Komórka może zawierać notatkę albo komentarz; usuń notatkę, aby dodać komentarz.","Comment on {cell}":"Komentarz w komórce {cell}",Resolved:"Rozwiązany","Resolve thread":"Rozwiąż wątek","More thread actions":"Więcej akcji wątku","More actions":"Więcej akcji","Reopen Thread":"Otwórz ponownie wątek","Resolve Thread":"Rozwiąż wątek","Delete Thread":"Usuń wątek","Reply…":"Odpowiedz…","New comment on {cell}":"Nowy komentarz w komórce {cell}","Post (⌘Enter)":"Opublikuj (⌘Enter)",You:"Ty","Chart data range":"Zakres danych wykresu","Legend entries (Series)":"Wpisy legendy (serie)","Y values":"Wartości Y","Horizontal (Category) axis labels":"Etykiety osi poziomej (kategorii)","Series{n}":"Seria{n}","The Y values reference isn't valid.":"Odwołanie do wartości Y jest nieprawidłowe.","Switch Row/Column":"Przełącz wiersz/kolumnę","Show empty cells as":"Pokaż puste komórki jako",Gaps:"Przerwy",Zero:"Zero","Connect data points with line":"Połącz punkty danych linią","Select Data Source":"Wybieranie źródła danych","Chart data range:":"Zakres danych wykresu:","Legend entries (Series):":"Wpisy legendy (serie):","Y values:":"Wartości Y:","Horizontal (Category) axis labels:":"Etykiety osi poziomej (kategorii):","Hidden and Empty Cells":"Ukryte i puste komórki","Show empty cells as:":"Pokaż puste komórki jako:","Show data in hidden rows and columns":"Pokaż dane w ukrytych wierszach i kolumnach","The chart data range isn't valid.":"Zakres danych wykresu jest nieprawidłowy.","A chart needs at least one series.":"Wykres wymaga co najmniej jednej serii.","Range:":"Zakres:","window|Add Data":"Dodawanie danych","That range isn't valid.":"Ten zakres jest nieprawidłowy.","Save as Template":"Zapisz jako szablon","Template name:":"Nazwa szablonu:","Chart Template":"Szablon wykresu","Saved the chart template {name}.":"Zapisano szablon wykresu {name}.","Apply Template":"Zastosuj szablon","No templates":"Brak szablonów","Manage Templates…":"Zarządzaj szablonami…","Chart templates":"Szablony wykresów","Chart Templates":"Szablony wykresów","Templates are kept in this browser.":"Szablony są przechowywane w tej przeglądarce.","No more precedents to trace.":"Brak kolejnych poprzedników do śledzenia.","The active cell doesn't show an error.":"Aktywna komórka nie zawiera błędu.","The error doesn't come from another cell on this sheet.":"Błąd nie pochodzi z innej komórki w tym arkuszu.","English (United States)":"Angielski (Stany Zjednoczone)","English (United Kingdom)":"Angielski (Wielka Brytania)","Polish (Poland)":"Polski (Polska)","German (Germany)":"Niemiecki (Niemcy)","French (France)":"Francuski (Francja)","Spanish (Spain)":"Hiszpański (Hiszpania)","Italian (Italy)":"Włoski (Włochy)","Dutch (Netherlands)":"Holenderski (Holandia)","Portuguese (Brazil)":"Portugalski (Brazylia)","Czech (Czechia)":"Czeski (Czechy)","Swedish (Sweden)":"Szwedzki (Szwecja)","Ukrainian (Ukraine)":"Ukraiński (Ukraina)","Turkish (Türkiye)":"Turecki (Turcja)","Japanese (Japan)":"Japoński (Japonia)","Chinese (China)":"Chiński (Chiny)","Korean (Korea)":"Koreański (Korea)","Arabic (Saudi Arabia)":"Arabski (Arabia Saudyjska)","Hebrew (Israel)":"Hebrajski (Izrael)","Number: {number} Date: {date} List separator: {separator}":"Liczba: {number} Data: {date} Separator listy: {separator}","Text/Background - Dark 1":"Tekst/tło — ciemny 1","Text/Background - Light 1":"Tekst/tło — jasny 1","Text/Background - Dark 2":"Tekst/tło — ciemny 2","Text/Background - Light 2":"Tekst/tło — jasny 2","Accent 1":"Akcent 1","Accent 2":"Akcent 2","Accent 3":"Akcent 3","Accent 4":"Akcent 4","Accent 5":"Akcent 5","Accent 6":"Akcent 6","Followed Hyperlink":"Użyty hiperlink","Custom Theme…":"Motyw niestandardowy…","Custom Theme":"Motyw niestandardowy","Heading font":"Czcionka nagłówków","Body font":"Czcionka tekstu podstawowego","Theme name":"Nazwa motywu"};export{e as default};
1
+ var e={"Excel Workbook":"Skoroszyt programu Excel","Excel Macro-Enabled Workbook":"Skoroszyt programu Excel z obsługą makr","Text files":"Pliki tekstowe","Circular reference: the formula refers to its own cell":"Odwołanie cykliczne: formuła odwołuje się do własnej komórki","Preparing formulas…":"Przygotowywanie formuł…","Calculating: {pct}%":"Obliczanie: {pct}%",'Recovered "{name}" from {when}.':"Odzyskano plik „{name}” (stan z {when}).",Restore:"Przywróć",Discard:"Odrzuć","Opening {name}…":"Otwieranie pliku {name}…","Opening… {count} cells":"Otwieranie… (komórki: {count})","Ready (opened {count} cells in {secs} s)":"Gotowy (otwarte komórki: {count}, czas: {secs} s)","The file reader didn't start. Check the connection and try again.":"Nie udało się uruchomić czytnika plików. Sprawdź połączenie i spróbuj ponownie.","Couldn't open {name}: {error}":"Nie można otworzyć pliku {name}: {error}","Saved {name}":"Zapisano plik {name}","Couldn't save: {error}":"Nie można zapisać: {error}",'"{text}" is not a valid reference':"„{text}” nie jest prawidłowym odwołaniem","Couldn't open the file: {error}":"Nie można otworzyć pliku: {error}","Unsaved Changes":"Niezapisane zmiany","Discard unsaved changes in this workbook?":"Czy odrzucić niezapisane zmiany w tym skoroszycie?",'That password is not correct. "{name}" is protected. Enter its password.':"Hasło jest nieprawidłowe. Plik „{name}” jest chroniony. Wprowadź jego hasło.",'"{name}" is protected. Enter its password.':"Plik „{name}” jest chroniony. Wprowadź jego hasło.","Didn't open {name}":"Nie otwarto pliku {name}","Couldn't open {name}":"Nie udało się otworzyć pliku {name}","The file couldn't be downloaded ({reason}).":"Nie udało się pobrać pliku ({reason}).","The file couldn't be read.":"Nie udało się odczytać pliku.","Try again":"Spróbuj ponownie","Use an empty workbook":"Użyj pustego skoroszytu","Password to Open":"Hasło do otwarcia","Enter a new password, or leave it empty to remove the password.":"Wprowadź nowe hasło lub pozostaw pole puste, aby usunąć hasło.","Enter a password. If you lose it, the workbook cannot be recovered.":"Wprowadź hasło. Jeśli je zgubisz, nie będzie można odzyskać skoroszytu.","Enter the password again.":"Wprowadź ponownie hasło.","The password was not changed":"Hasło nie zostało zmienione","The passwords did not match, so it was not changed":"Hasła nie są zgodne, więc hasło nie zostało zmienione","The password applies from the next save":"Hasło będzie obowiązywać od następnego zapisu","The password is removed from the next save":"Hasło zostanie usunięte przy następnym zapisie","Saving…":"Zapisywanie…","Saving… {pct}%":"Zapisywanie… {pct}%","Saved ({size} MB in {secs} s)":"Zapisano ({size} MB w {secs} s)","The browser blocked clipboard access. Press ⌘V to paste.":"Przeglądarka zablokowała dostęp do schowka. Naciśnij ⌘V, aby wkleić.","Clear All":"Wyczyść wszystko","Clear Formats":"Wyczyść formaty","Clear Contents":"Wyczyść zawartość","Clear Comments and Notes":"Wyczyść komentarze i notatki","Clear Hyperlinks":"Wyczyść hiperlinki","Remove Hyperlinks":"Usuń hiperlinki","Clear Series":"Wyczyść serię","Find Next":"Znajdź następny","Find Previous":"Znajdź poprzedni","Rename Sheet":"Zmień nazwę arkusza","Hide Sheet":"Ukryj arkusz","Unhide Sheet…":"Odkryj arkusz…","Background…":"Tło…","About 8sheets":"8sheets — informacje","A spreadsheet that runs in the browser and keeps your files on your computer.":"Arkusz kalkulacyjny, który działa w przeglądarce i przechowuje pliki na Twoim komputerze.","What's new in this version":"Co nowego w tej wersji","Excel is a trademark of Microsoft. This app isn't made by or connected to Microsoft.":"Excel jest znakiem towarowym firmy Microsoft. Ta aplikacja nie została utworzona przez firmę Microsoft ani nie jest z nią powiązana.","View…":"Widok…","Calculation…":"Obliczanie…","AutoCorrect…":"Autokorekta…","Custom Lists…":"Listy niestandardowe…","Keyboard…":"Klawiatura…","The document is renamed. Save puts it under the new name; the old file stays where it was.":"Zmieniono nazwę dokumentu. Polecenie Zapisz zapisze go pod nową nazwą; stary plik pozostanie na swoim miejscu.","This browser has no share sheet, so {name} was downloaded to attach yourself.":"Ta przeglądarka nie ma arkusza udostępniania, więc plik {name} został pobrany, aby można go było samodzielnie załączyć.","From the next save, this workbook suggests opening read-only.":"Od następnego zapisu ten skoroszyt będzie sugerować otwieranie tylko do odczytu.","The workbook no longer suggests opening read-only.":"Skoroszyt nie sugeruje już otwierania tylko do odczytu.","Password to modify":"Hasło ochrony przed zmianami","Password to modify:":"Hasło ochrony przed zmianami:",Unchanged:"Bez zmian","Read-only recommended":"Zalecane tylko do odczytu","Remove the password to modify":"Usuń hasło ochrony przed zmianami",Passwords:"Hasła","Password to Open…":"Hasło do otwarcia…","Passwords and sharing apply from the next save.":"Hasła i ustawienia udostępniania będą obowiązywać od następnego zapisu.","{name} is reserved by {user}. Enter the password for write access, or leave it empty and open read-only.":"Plik {name} jest zastrzeżony przez użytkownika {user}. Wprowadź hasło, aby uzyskać prawo zapisu, lub pozostaw pole puste i otwórz plik tylko do odczytu.","{name} is reserved by its author. Enter the password for write access, or leave it empty and open read-only.":"Plik {name} jest zastrzeżony przez autora. Wprowadź hasło, aby uzyskać prawo zapisu, lub pozostaw pole puste i otwórz plik tylko do odczytu.","Opened read-only: Save asks for a new file.":"Otwarto tylko do odczytu: polecenie Zapisz poprosi o nowy plik.",'The author would like you to open "{name}" as read-only unless you need to make changes. Open as read-only?':"Autor chciałby, aby plik „{name}” był otwierany tylko do odczytu, chyba że musisz wprowadzić zmiany. Czy otworzyć tylko do odczytu?","Read-Only":"Tylko do odczytu","Set Print Area":"Ustaw obszar wydruku","Add to Print Area":"Dodaj do obszaru wydruku","Clear Print Area":"Wyczyść obszar wydruku","Excel Template":"Szablon programu Excel","New from Template…":"Nowy z szablonu…","Open Recent":"Otwórz ostatnie","Save As…":"Zapisz jako…","Save as Template…":"Zapisz jako szablon…","Export Sheet as CSV…":"Eksportuj arkusz jako CSV…","Move…":"Przenieś…","Choose the new place. A browser can't remove the old file, so delete it yourself if you want it gone.":"Wybierz nowe miejsce. Przeglądarka nie może usunąć starego pliku, więc usuń go samodzielnie, jeśli nie jest już potrzebny.",Import:"Importuj","Share…":"Udostępnij…","Send Workbook":"Wyślij skoroszyt","Send PDF":"Wyślij plik PDF","Always Open Read-Only":"Zawsze otwieraj tylko do odczytu","Passwords…":"Hasła…","Reduce File Size…":"Zmniejsz rozmiar pliku…","Page Setup…":"Ustawienia strony…","Print Area":"Obszar wydruku","About 8sheets…":"8sheets — informacje…","That file has no tables to import.":"Ten plik nie zawiera tabel do zaimportowania.","Imported {count} rows from {name}.":{one:"Zaimportowano {count} wiersz z pliku {name}.",few:"Zaimportowano {count} wiersze z pliku {name}.",many:"Zaimportowano {count} wierszy z pliku {name}.",other:"Zaimportowano {count} wiersza z pliku {name}."},"Table {n}: {caption}":"Tabela {n}: {caption}","From HTML":"Z pliku HTML","Choose a table:":"Wybierz tabelę:","From HTML…":"Z pliku HTML…","Bring to Front":"Przesuń na wierzch","Bring Forward":"Przesuń do przodu","Send Backward":"Przesuń do tyłu","Send to Back":"Przesuń na spód","Paste Special…":"Wklej specjalnie…","Insert Rows":"Wstaw wiersze","Insert Columns":"Wstaw kolumny","Delete Rows":"Usuń wiersze","Delete Columns":"Usuń kolumny","Column Width…":"Szerokość kolumny…","Row Height…":"Wysokość wiersza…","Rich Text…":"Tekst sformatowany…","Default Value…":"Wartość domyślna…","No recent files":"Brak ostatnio używanych plików","Clear Recent":"Wyczyść ostatnio używane","Freeze Panes isn't available in Page Layout view.":"Polecenie Zablokuj okienka jest niedostępne w widoku układu strony.","There is no room: data would be pushed off the end of the sheet.":"Brak miejsca: dane zostałyby wypchnięte poza koniec arkusza.","AutoSum needs empty cells next to the selection for the totals.":"Autosumowanie potrzebuje pustych komórek obok zaznaczenia na sumy.","The number must be between 1 and 409.":"Liczba musi należeć do zakresu od 1 do 409.","Type a font name.":"Wpisz nazwę czcionki.","Replace the existing definition of {names}?":"Zastąpić istniejącą definicję nazwy {names}?","This can't be applied to the selected range. Select a single cell in a range and try again.":"Nie można zastosować tego do zaznaczonego zakresu. Zaznacz jedną komórkę w zakresie i spróbuj ponownie.","Copy cells in this workbook first, then use Paste Special.":"Najpierw skopiuj komórki w tym skoroszycie, a następnie użyj polecenia Wklej specjalnie.","(No items)":"(Brak elementów)","This cell doesn't allow editing.":"Ta komórka nie zezwala na edycję.","You can't change part of a data table.":"Nie można zmienić części tabeli danych.","There's a problem with this formula. Fix it or press Esc to cancel.":"Wystąpił problem z tą formułą. Popraw ją lub naciśnij Esc, aby anulować.","{rows}R x {cols}C":"{rows}W x {cols}K","That selection is too large to copy to the clipboard":"To zaznaczenie jest zbyt duże, aby skopiować je do schowka",Allow:"Dozwolone","Any value":"Dowolna wartość","Whole number":"Pełna liczba",Decimal:"Dziesiętne",List:"Lista","Text length":"Długość tekstu",Custom:"Niestandardowe","dv|Data":"Wartości",between:"między","not between":"nie między","equal to":"równa","not equal to":"różna od","greater than":"większa niż","less than":"mniejsza niż","greater than or equal to":"większa lub równa","less than or equal to":"mniejsza lub równa","Minimum, source or formula":"Minimum, źródło lub formuła","Maximum:":"Maksimum:","Ignore blank":"Ignoruj puste","In-cell dropdown":"Rozwinięcie w komórce","Apply these changes to all other cells with the same settings":"Zastosuj te zmiany do wszystkich innych komórek z tymi samymi ustawieniami","Show input message when cell is selected":"Pokaż komunikat wejściowy, jeśli komórka jest zaznaczona","Input title":"Tytuł komunikatu wejściowego","Input message":"Komunikat wejściowy","Show error alert after invalid data is entered":"Pokazuj alerty o błędach po wprowadzeniu nieprawidłowych danych","Error style":"Styl błędu",Stop:"Zatrzymaj","Error title":"Tytuł błędu","Error message":"Komunikat o błędzie","Source:":"Źródło:","Formula:":"Formuła:","Minimum:":"Minimum:","Value:":"Wartość:","Validation criteria":"Kryteria poprawności","Allow:":"Dozwolone:","Data:":"Wartości:","When cell is selected, show this input message:":"Po zaznaczeniu komórki pokaż ten komunikat wejściowy:","Title:":"Tytuł:","Input message:":"Komunikat wejściowy:","When user enters invalid data, show this error alert:":"Po wprowadzeniu nieprawidłowych danych pokaż ten alert o błędzie:","Style:":"Styl:","Error message:":"Komunikat o błędzie:","Input Message":"Komunikat wejściowy","Error Alert":"Alert o błędzie","window|Data Validation":"Sprawdzanie poprawności danych","This sheet is protected with a password, which this app can't check yet.":"Ten arkusz jest chroniony hasłem, którego ta aplikacja nie może jeszcze sprawdzić.","Sheet unprotected.":"Usunięto ochronę arkusza.","Sheet protected. Locked cells can't be changed.":"Arkusz jest chroniony. Nie można zmieniać zablokowanych komórek.","The active cell has no formula to trace.":"Aktywna komórka nie zawiera formuły do śledzenia.","Data Range":"Zakres danych","Location Range":"Zakres lokalizacji","Data Range:":"Zakres danych:","Location Range:":"Zakres lokalizacji:","Choose the data that you want":"Wybierz odpowiednie dane","Choose where you want the sparklines to be placed":"Wybierz, gdzie mają zostać umieszczone wykresy przebiegu w czasie","Create Sparklines":"Tworzenie wykresów przebiegu w czasie","Data Reference is not valid.":"Odwołanie do danych jest nieprawidłowe.","Location reference is not valid because the cells are not all in the same column or same row. Select cells that are all in a single column or row.":"Odwołanie do lokalizacji jest nieprawidłowe, ponieważ komórki nie znajdują się w tej samej kolumnie lub w tym samym wierszu. Zaznacz komórki znajdujące się w jednej kolumnie lub w jednym wierszu.","Data Reference is not valid because the dimensions of the data range and the location range don't match.":"Odwołanie do danych jest nieprawidłowe, ponieważ wymiary zakresu danych i zakresu lokalizacji nie są zgodne.","A table can't overlap another table.":"Tabela nie może nakładać się na inną tabelę.","Light Style {n}":"Jasny styl {n}","Medium Style {n}":"Średni styl {n}","Dark Style {n}":"Ciemny styl {n}",Light:"Jasny",Medium:"Średni",Dark:"Ciemny","New Table Style…":"Nowy styl tabeli…","Set As Default":"Ustaw jako domyślny","Set as default table style for this document":"Ustaw jako domyślny styl tabeli dla tego dokumentu","Flash Fill needs data in the column to the left.":"Wypełnianie błyskawiczne wymaga danych w kolumnie po lewej stronie.","Type an example of the pattern first, then use Flash Fill.":"Najpierw wpisz przykład wzorca, a następnie użyj wypełniania błyskawicznego.","Flash Fill couldn't find a pattern. Type another example.":"Wypełnianie błyskawiczne nie znalazło wzorca. Wpisz inny przykład.","Flash Fill filled {count} cells.":"Wypełnianie błyskawiczne wypełniło komórki: {count}.","Set cell":"Ustaw komórkę","To value":"Wartość docelowa","By changing cell":"Zmieniając komórkę","Set cell:":"Ustaw komórkę:","To value:":"Wartość docelowa:","By changing cell:":"Zmieniając komórkę:","Goal Seek":"Szukanie wyniku","Goal Seek needs a formula cell, a target value and an input cell.":"Szukanie wyniku wymaga komórki z formułą, wartości docelowej i komórki wejściowej.","Goal Seek Status":"Stan szukania wyniku","Goal Seeking with Cell {name} found a solution.":"Szukanie wyniku dla komórki {name} pozwoliło znaleźć rozwiązanie.","Goal Seeking with Cell {name} may not have found a solution.":"Szukanie wyniku dla komórki {name} mogło nie znaleźć rozwiązania.","Target value:":"Wartość docelowa:","Current value:":"Wartość bieżąca:","Removed {count} duplicate rows.":"Usunięte zduplikowane wiersze: {count}.","No duplicate values found.":"Nie znaleziono zduplikowanych wartości.","Text to Columns can only convert one column at a time.":"Funkcja Tekst jako kolumny może konwertować tylko jedną kolumnę naraz.","Choose the file type that best describes your data:":"Wybierz typ pliku, który najlepiej opisuje dane:",Delimited:"Rozdzielany","Fixed width":"Stała szerokość",Delimiters:"Ograniczniki","delimiter|Tab":"Tabulator",Semicolon:"Średnik",Comma:"Przecinek",Space:"Spacja","Other delimiter":"Inny ogranicznik","Other:":"Inny:","Treat consecutive delimiters as one":"Traktuj kolejne ograniczniki jako jeden","Text qualifier":"Kwalifikator tekstu","Text qualifier:":"Kwalifikator tekstu:","qualifier|none":"brak","Break lines":"Linie podziału","e.g. 5, 12":"np. 5, 12","Break lines after character:":"Linie podziału po znaku:","Column data format":"Format danych w kolumnie","Do not import column (skip)":"Nie importuj kolumny (pomiń)",Destination:"Miejsce docelowe","Destination:":"Miejsce docelowe:","Step {step} of {count}":"Krok {step} z {count}","Preview of selected data:":"Podgląd zaznaczonych danych:","Convert Text to Columns Wizard":"Kreator konwersji tekstu na kolumny","My data has headers":"Moje dane mają nagłówki","Column {name}":"Kolumna {name}","To delete duplicate values, select one or more columns that contain duplicates.":"Aby usunąć zduplikowane wartości, zaznacz co najmniej jedną kolumnę zawierającą duplikaty.","Unselect All":"Usuń zaznaczenie wszystkich","Remove Duplicates":"Usuń duplikaty","{removed} duplicate values found and removed; {left} unique values remain.":"Znalezione i usunięte zduplikowane wartości: {removed}; pozostałe wartości unikatowe: {left}.","The name that you entered is not valid. Use letters, numbers, periods and underscores, start with a letter or underscore, and don't use a cell reference.":"Wprowadzona nazwa jest nieprawidłowa. Użyj liter, cyfr, kropek i podkreśleń, zacznij od litery lub podkreślenia i nie używaj odwołania do komórki.",Scope:"Zakres","Refers to":"Odwołuje się do","Edit Name":"Edytowanie nazwy","New Name":"Nowa nazwa","Scope:":"Zakres:","Comment:":"Komentarz:","Refers to:":"Odwołuje się do:","Enter what the name refers to.":"Wprowadź, do czego odwołuje się nazwa.","The name already exists. Enter a unique name.":"Nazwa już istnieje. Wprowadź unikatową nazwę.","Changed {name}.":"Zmieniono nazwę {name}.","Defined {name}.":"Zdefiniowano nazwę {name}.","Name Manager":"Menedżer nazw","Refers To":"Odwołuje się do","Paste name":"Wklej nazwę","Paste List":"Wklej listę","Paste Name":"Wklejanie nazwy","Apply names":"Zastosuj nazwy","Ignore Relative/Absolute":"Ignoruj względne/bezwzględne","Names of whole rows and columns are applied only when they match exactly":"Nazwy całych wierszy i kolumn są stosowane tylko wtedy, gdy są dokładnie dopasowane","Use row and column names":"Użyj nazw wierszy i kolumn","Apply Names":"Stosowanie nazw","Names applied in {count} formulas.":"Zastosowano nazwy w formułach: {count}.","No references matched the names.":"Żadne odwołanie nie pasuje do nazw.","No formula on this sheet reads the active cell.":"Żadna formuła w tym arkuszu nie odczytuje aktywnej komórki.","{count} dependent cells.":"Komórki zależne: {count}.","The active cell has no formula to evaluate.":"Aktywna komórka nie zawiera formuły do oszacowania.","Next: {piece}":"Następny krok: {piece}","This step can't be shown: {error}":"Nie można pokazać tego kroku: {error}",Evaluate:"Szacuj",Restart:"Uruchom ponownie","That is the final result.":"To jest wynik końcowy.","Evaluate Formula":"Szacowanie formuły","No formula errors on this sheet.":"W tym arkuszu nie ma błędów formuł.","Error {n} of {count} in {cell}: {code}":"Błąd {n} z {count} w komórce {cell}: {code}","Error Checking":"Sprawdzanie błędów",Previous:"Poprzedni","Add Watch":"Dodaj czujkę","Watch Window":"Okno czujki","Remove watch on {cell}":"Usuń czujkę komórki {cell}","calc|Automatic":"Automatyczne","calc|Automatic Except for Data Tables":"Automatyczne z wyjątkiem tabel danych","calc|Manual":"Ręczne","Top row":"Górnym wierszu","Left column":"Lewej kolumnie","Bottom row":"Dolnym wierszu","Right column":"Prawej kolumnie","Create Names from Selection":"Tworzenie nazw z zaznaczenia","Created {count} names.":"Utworzone nazwy: {count}.","No names defined":"Brak zdefiniowanych nazw","Page {n}":"Strona {n}",Percent:"Procent","Sheet name":"Nazwa arkusza","Merged cells":"Scalone komórki","Missing alternative text":"Brak tekstu alternatywnego","Check Accessibility":"Sprawdzanie ułatwień dostępu","{count} things to review.":"Elementy do przejrzenia: {count}.","Row input cell":"Komórka wejściowa wiersza","Column input cell":"Komórka wejściowa kolumny","Row input cell:":"Komórka wejściowa wiersza:","Column input cell:":"Komórka wejściowa kolumny:","Data Table":"Tabela danych","Enter a row input cell, a column input cell, or both.":"Wprowadź komórkę wejściową wiersza, komórkę wejściową kolumny lub obie.","Select the whole table first, with its input values and formulas.":"Najpierw zaznacz całą tabelę z wartościami wejściowymi i formułami.","Data table created.":"Utworzono tabelę danych.","Scenario name":"Nazwa scenariusza","Changing cells":"Komórki zmieniane","Edit Scenario":"Edytowanie scenariusza","Add Scenario":"Dodawanie scenariusza","Scenario name:":"Nazwa scenariusza:","Changing cells:":"Komórki zmieniane:","Ctrl+click cells to select non-adjacent changing cells.":"Aby zaznaczyć nieprzylegające komórki zmieniane, klikaj je z naciśniętym klawiszem Ctrl.",Protection:"Ochrona","Prevent changes":"Zapobiegaj zmianom","Type a name for the scenario.":"Wpisz nazwę scenariusza.","Scenario name already exists. Type a different name for the scenario.":"Nazwa scenariusza już istnieje. Wpisz inną nazwę scenariusza.","The changing cells reference isn't valid.":"Odwołanie do komórek zmienianych jest nieprawidłowe.","Value of {cell}":"Wartość komórki {cell}","Scenario Values":"Wartości scenariusza","Enter values for each of the changing cells.":"Wprowadź wartości dla każdej z komórek zmienianych.",Scenarios:"Scenariusze","No Scenarios defined. Choose Add to add scenarios.":"Nie zdefiniowano scenariuszy. Wybierz przycisk Dodaj, aby dodać scenariusze.","Summary…":"Podsumowanie…","Scenario Manager":"Menedżer scenariuszy","Scenarios:":"Scenariusze:","Result cells":"Komórki wynikowe","A scenario PivotTable report isn't available here":"Raport tabeli przestawnej scenariusza nie jest tu dostępny","Scenario Summary":"Podsumowanie scenariusza","Report type":"Typ raportu","Scenario summary":"Podsumowanie scenariusza","Scenario PivotTable report":"Raport tabeli przestawnej scenariusza","Result cells:":"Komórki wynikowe:","fn|Sum":"Suma","fn|Count":"Licznik","fn|Average":"Średnia","fn|Max":"Maksimum","fn|Min":"Minimum","fn|Product":"Iloczyn","fn|Count Numbers":"Licznik liczb","fn|StdDev":"Odch.Std","fn|StdDevp":"Odch.StdPopul","fn|Var":"Wariancja","fn|Varp":"WariancjaPopul",Reference:"Odwołanie","All references":"Wszystkie odwołania","Reference isn't valid.":"Odwołanie jest nieprawidłowe.","window|Consolidate":"Konsolidowanie","Select…":"Zaznacz…","Create links to source data":"Utwórz łącza z danymi źródłowymi","Function:":"Funkcja:","Reference:":"Odwołanie:","All references:":"Wszystkie odwołania:","Use labels in:":"Użyj etykiet w:","Consolidated with links into {cell}: {rows} rows, {cols} columns.":"Skonsolidowano z łączami do komórki {cell} (wiersze: {rows}, kolumny: {cols}).","Consolidated into {cell}: {rows} rows, {cols} columns.":"Skonsolidowano do komórki {cell} (wiersze: {rows}, kolumny: {cols}).","The cell or chart you're trying to change is on a protected sheet. To make a change, unprotect the sheet.":"Komórka lub wykres, który próbujesz zmienić, znajduje się w chronionym arkuszu. Aby wprowadzić zmianę, usuń ochronę arkusza.",Protected:"Chronione","The workbook is protected, so sheets can't be added, moved, renamed, hidden or deleted.":"Skoroszyt jest chroniony, więc nie można dodawać, przenosić, ukrywać ani usuwać arkuszy ani zmieniać ich nazw.","Confirm password":"Potwierdź hasło","Confirm password:":"Potwierdź hasło:","The passwords don't match.":"Hasła nie są zgodne.","Unprotect Sheet":"Nie chroń arkusza","The password you supplied is not correct.":"Podane hasło jest nieprawidłowe.","Password to unprotect (optional):":"Hasło do usunięcia ochrony (opcjonalne):","protect|Select locked cells":"Zaznaczanie zablokowanych komórek","protect|Select unlocked cells":"Zaznaczanie odblokowanych komórek","protect|Format cells":"Formatowanie komórek","protect|Format columns":"Formatowanie kolumn","protect|Format rows":"Formatowanie wierszy","protect|Insert columns":"Wstawianie kolumn","protect|Insert rows":"Wstawianie wierszy","protect|Insert hyperlinks":"Wstawianie hiperlinków","protect|Delete columns":"Usuwanie kolumn","protect|Delete rows":"Usuwanie wierszy","protect|Sort":"Sortowanie","protect|Use AutoFilter":"Używanie autofiltru","protect|Use PivotTable reports":"Używanie raportów tabeli przestawnej","protect|Edit objects":"Edytowanie obiektów","protect|Edit scenarios":"Edytowanie scenariuszy","Protect Sheet":"Chroń arkusz","Allow all users of this worksheet to:":"Zezwalaj wszystkim użytkownikom tego arkusza na:","Sheet protected.":"Arkusz jest chroniony.","Workbook unprotected.":"Usunięto ochronę skoroszytu.","Unprotect Workbook":"Nie chroń skoroszytu","Password (optional):":"Hasło (opcjonalne):","Protect Workbook":"Chroń skoroszyt","Protects the structure: sheets can't be added, moved, renamed, hidden or deleted.":"Chroni strukturę: nie można dodawać, przenosić, ukrywać ani usuwać arkuszy ani zmieniać ich nazw.","Workbook protected.":"Skoroszyt jest chroniony.","{shown} of {count} records found":"Znalezione rekordy: {shown} z {count}","{copied} of {count} records copied":"Skopiowane rekordy: {copied} z {count}","The extract range is full: the rest of the records were not copied.":"Zakres wyodrębniania jest pełny: pozostałe rekordy nie zostały skopiowane.","The extract range has a missing or invalid field name.":"W zakresie wyodrębniania brakuje nazwy pola lub jest ona nieprawidłowa.","Filter the list, in-place":"Filtruj listę na miejscu","Copy to another location":"Kopiuj w inne miejsce","List range":"Zakres listy","Criteria range":"Zakres kryteriów","Copy to":"Kopiuj do","Unique records only":"Tylko unikatowe rekordy","Copy to:":"Kopiuj do:","List range:":"Zakres listy:","Criteria range:":"Zakres kryteriów:","The list range isn't valid.":"Zakres listy jest nieprawidłowy.","The list range needs a row of field names and at least one row of data.":"Zakres listy wymaga wiersza nazw pól i co najmniej jednego wiersza danych.","The criteria range isn't valid.":"Zakres kryteriów jest nieprawidłowy.","Enter where to copy to.":"Wprowadź miejsce, do którego chcesz kopiować.","The Copy to range isn't valid.":"Zakres „Kopiuj do” jest nieprawidłowy.","You can only copy filtered data to the active sheet.":"Przefiltrowane dane można kopiować tylko do aktywnego arkusza.","The Copy to range can't overlap the list.":"Zakres „Kopiuj do” nie może nakładać się na listę.","To filter in place, the list must be on the active sheet.":"Aby filtrować na miejscu, lista musi znajdować się w aktywnym arkuszu.","Advanced Filter":"Filtr zaawansowany","This workbook has no links to other workbooks.":"Ten skoroszyt nie zawiera linków do innych skoroszytów.","Edit Links":"Edytuj linki","(unknown)":"(nieznany)",Worksheet:"Arkusz",Unknown:"Nieznany","Error: Source not found":"Błąd: nie znaleziono źródła","Error: Sheet not found":"Błąd: nie znaleziono arkusza","links|Source":"Źródło","links|Type":"Typ","links|Update":"Aktualizacja","links|Status":"Stan","A browser can't open a path by itself, so Update Values, Change Source, Open Source and Check Status ask you for the file.":"Przeglądarka nie może sama otworzyć ścieżki, dlatego polecenia Aktualizuj wartości, Zmień źródło, Otwórz źródło i Sprawdź stan proszą o wskazanie pliku.","Update Values":"Aktualizuj wartości","Change Source…":"Zmień źródło…","Open Source":"Otwórz źródło","Break Link":"Przerwij link","Breaking links permanently converts formulas and external references to their existing values. Break the link?":"Przerwanie linków trwale konwertuje formuły i odwołania zewnętrzne na ich bieżące wartości. Czy przerwać link?","Break Links":"Przerwij linki","Check Status":"Sprawdź stan","Print settings":"Ustawienia wydruku","Hidden rows, columns and filter settings":"Ukryte wiersze, kolumny i ustawienia filtru","Add View":"Dodawanie widoku","Include in view":"Uwzględnij w widoku","Enter a name for the view.":"Wprowadź nazwę widoku.",Views:"Widoki","Custom Views":"Widoki niestandardowe","Views:":"Widoki:","Delete the view {name}?":"Czy usunąć widok {name}?","Bad cell reference: {ref}":"Nieprawidłowe odwołanie do komórki: {ref}","Bad range: {ref}":"Nieprawidłowy zakres: {ref}","No sheet named {name}":"Brak arkusza o nazwie {name}","Script finished.":"Skrypt zakończył działanie.","Script error: {error}":"Błąd skryptu: {error}",Scripts:"Skrypty","Script name":"Nazwa skryptu","Script code":"Kod skryptu","Script {n}":"Skrypt {n}",Run:"Uruchom","Error: {error}":"Błąd: {error}","Finished.":"Zakończono.","Recording stopped.":"Zatrzymano rejestrowanie.","Recorded {time}":"Zarejestrowano {time}","Recording. Edits and formats are written to a script.":"Rejestrowanie. Zmiany i formaty są zapisywane w skrypcie.","Cells with data":"Komórki z danymi",Tables:"Tabele","Defined names":"Nazwy zdefiniowane","Last cell on this sheet":"Ostatnia komórka w tym arkuszu","Merged areas on this sheet":"Scalone obszary w tym arkuszu","Notes on this sheet":"Notatki w tym arkuszu","Workbook Statistics":"Statystyki skoroszytu","block|Punctuation":"Interpunkcja ogólna","block|Latin-1 Supplement":"Łaciński-1 — uzupełnienie","block|Latin Extended-A":"Łaciński rozszerzony-A","block|Greek":"Grecki","block|Currency":"Symbole walut","block|Letterlike":"Symbole literopodobne","block|Number Forms":"Formy liczbowe","block|Arrows":"Strzałki","block|Mathematical Operators":"Operatory matematyczne","block|Box Drawing":"Elementy ramek","block|Geometric Shapes":"Kształty geometryczne","block|Miscellaneous Symbols":"Różne symbole","block|Dingbats":"Dingbaty",Subset:"Podzbiór","Subset:":"Podzbiór:",Symbols:"Symbole","Character code: {code}":"Kod znaku: {code}",Symbol:"Symbol","(None yet)":"(Jeszcze brak)","Search for a function":"Wyszukaj funkcję",Category:"Kategoria","Category:":"Kategoria:","fncat|Financial":"Finansowe","fncat|Logical":"Logiczne","fncat|Text":"Tekstowe","fncat|Date & Time":"Daty i godziny","fncat|Lookup & Reference":"Wyszukiwanie i odwołania","fncat|Math & Trig":"Matematyczne i trygonometryczne","fncat|Statistical":"Statystyczne","fncat|Engineering":"Inżynierskie","fncat|Information":"Informacyjne","fncat|Database":"Bazy danych","fncat|Barcode":"Kody kreskowe","fncat|Sparkline":"Wykresy przebiegu w czasie","No functions match.":"Brak pasujących funkcji.","window|Insert Function":"Wstawianie funkcji","Your Name":"Twoje imię i nazwisko","Name shown on your comments:":"Nazwa wyświetlana przy Twoich komentarzach:","This cell has no comment.":"Ta komórka nie zawiera komentarza.","This sheet has no comments.":"Ten arkusz nie zawiera komentarzy.","Start a conversation":"Rozpocznij konwersację","New comment":"Nowy komentarz",Post:"Opublikuj","Edit comment":"Edytuj komentarz",Reply:"Odpowiedz","Reply on {cell}":"Odpowiedz w komórce {cell}",Reopen:"Otwórz ponownie",Resolve:"Rozwiąż","Today, {time}":"Dzisiaj, {time}","Comments are read-only in this workbook.":"Komentarze w tym skoroszycie są tylko do odczytu.","This cell has a note. A cell has either a note or a comment; delete the note to add a comment.":"Ta komórka zawiera notatkę. Komórka może zawierać notatkę albo komentarz; usuń notatkę, aby dodać komentarz.","Comment on {cell}":"Komentarz w komórce {cell}",Resolved:"Rozwiązany","Resolve thread":"Rozwiąż wątek","More thread actions":"Więcej akcji wątku","More actions":"Więcej akcji","Reopen Thread":"Otwórz ponownie wątek","Resolve Thread":"Rozwiąż wątek","Delete Thread":"Usuń wątek","Reply…":"Odpowiedz…","New comment on {cell}":"Nowy komentarz w komórce {cell}","Post (⌘Enter)":"Opublikuj (⌘Enter)",You:"Ty","Chart data range":"Zakres danych wykresu","Legend entries (Series)":"Wpisy legendy (serie)","Y values":"Wartości Y","Horizontal (Category) axis labels":"Etykiety osi poziomej (kategorii)","Series{n}":"Seria{n}","The Y values reference isn't valid.":"Odwołanie do wartości Y jest nieprawidłowe.","Switch Row/Column":"Przełącz wiersz/kolumnę","Show empty cells as":"Pokaż puste komórki jako",Gaps:"Przerwy",Zero:"Zero","Connect data points with line":"Połącz punkty danych linią","Select Data Source":"Wybieranie źródła danych","Chart data range:":"Zakres danych wykresu:","Legend entries (Series):":"Wpisy legendy (serie):","Y values:":"Wartości Y:","Horizontal (Category) axis labels:":"Etykiety osi poziomej (kategorii):","Hidden and Empty Cells":"Ukryte i puste komórki","Show empty cells as:":"Pokaż puste komórki jako:","Show data in hidden rows and columns":"Pokaż dane w ukrytych wierszach i kolumnach","The chart data range isn't valid.":"Zakres danych wykresu jest nieprawidłowy.","A chart needs at least one series.":"Wykres wymaga co najmniej jednej serii.","Range:":"Zakres:","window|Add Data":"Dodawanie danych","That range isn't valid.":"Ten zakres jest nieprawidłowy.","Save as Template":"Zapisz jako szablon","Template name:":"Nazwa szablonu:","Chart Template":"Szablon wykresu","Saved the chart template {name}.":"Zapisano szablon wykresu {name}.","Apply Template":"Zastosuj szablon","No templates":"Brak szablonów","Manage Templates…":"Zarządzaj szablonami…","Chart templates":"Szablony wykresów","Chart Templates":"Szablony wykresów","Templates are kept in this browser.":"Szablony są przechowywane w tej przeglądarce.","No more precedents to trace.":"Brak kolejnych poprzedników do śledzenia.","The active cell doesn't show an error.":"Aktywna komórka nie zawiera błędu.","The error doesn't come from another cell on this sheet.":"Błąd nie pochodzi z innej komórki w tym arkuszu.","English (United States)":"Angielski (Stany Zjednoczone)","English (United Kingdom)":"Angielski (Wielka Brytania)","Polish (Poland)":"Polski (Polska)","German (Germany)":"Niemiecki (Niemcy)","French (France)":"Francuski (Francja)","Spanish (Spain)":"Hiszpański (Hiszpania)","Italian (Italy)":"Włoski (Włochy)","Dutch (Netherlands)":"Holenderski (Holandia)","Portuguese (Brazil)":"Portugalski (Brazylia)","Czech (Czechia)":"Czeski (Czechy)","Swedish (Sweden)":"Szwedzki (Szwecja)","Ukrainian (Ukraine)":"Ukraiński (Ukraina)","Turkish (Türkiye)":"Turecki (Turcja)","Japanese (Japan)":"Japoński (Japonia)","Chinese (China)":"Chiński (Chiny)","Korean (Korea)":"Koreański (Korea)","Arabic (Saudi Arabia)":"Arabski (Arabia Saudyjska)","Hebrew (Israel)":"Hebrajski (Izrael)","Number: {number} Date: {date} List separator: {separator}":"Liczba: {number} Data: {date} Separator listy: {separator}","Text/Background - Dark 1":"Tekst/tło — ciemny 1","Text/Background - Light 1":"Tekst/tło — jasny 1","Text/Background - Dark 2":"Tekst/tło — ciemny 2","Text/Background - Light 2":"Tekst/tło — jasny 2","Accent 1":"Akcent 1","Accent 2":"Akcent 2","Accent 3":"Akcent 3","Accent 4":"Akcent 4","Accent 5":"Akcent 5","Accent 6":"Akcent 6","Followed Hyperlink":"Użyty hiperlink","Custom Theme…":"Motyw niestandardowy…","Custom Theme":"Motyw niestandardowy","Heading font":"Czcionka nagłówków","Body font":"Czcionka tekstu podstawowego","Theme name":"Nazwa motywu","Table Rows Above":"Wiersze tabeli powyżej","Table Rows Below":"Wiersze tabeli poniżej","Table Columns to the Left":"Kolumny tabeli z lewej","Table Columns to the Right":"Kolumny tabeli z prawej","Table Rows":"Wiersze tabeli","Table Columns":"Kolumny tabeli","Tables can't be sorted left to right.":"Tabel nie można sortować od lewej do prawej.","Export Sheet as Text (Tab delimited)…":"Eksportuj arkusz jako tekst (rozdzielany znakami tabulacji)…","Saved {name}: only the active sheet goes in this format.":"Zapisano {name}: w tym formacie zapisuje się tylko aktywny arkusz.","Start date:":"Data rozpoczęcia:","End date:":"Data zakończenia:","Start time:":"Godzina rozpoczęcia:","End time:":"Godzina zakończenia:","Time:":"Godzina:","Length:":"Długość:","Always show the ribbon":"Zawsze pokazuj wstążkę","Quick Access Toolbar":"Pasek narzędzi Szybki dostęp","Customize Quick Access Toolbar":"Dostosuj pasek narzędzi Szybki dostęp","That command isn't available here.":"To polecenie nie jest tu dostępne.","Remove from Quick Access Toolbar":"Usuń z paska narzędzi Szybki dostęp","Add to Quick Access Toolbar":"Dodaj do paska narzędzi Szybki dostęp","Customize the Ribbon…":"Dostosuj wstążkę…","Customize the Ribbon":"Dostosowywanie wstążki","Right-click a ribbon command to add it here":"Kliknij polecenie wstążki prawym przyciskiem, aby je tu dodać","Reset Quick Access Toolbar":"Resetuj pasek narzędzi Szybki dostęp","Collapse the Ribbon":"Zwiń wstążkę","Main Tabs":"Karty główne","The choice is kept in this browser. Right-click a command to add it to the Quick Access Toolbar.":"Wybór jest zapamiętywany w tej przeglądarce. Kliknij polecenie prawym przyciskiem, aby dodać je do paska narzędzi Szybki dostęp.","That command can't be used now.":"Tego polecenia nie można teraz użyć.","Keep at least one tab.":"Zostaw co najmniej jedną kartę.","A new version of 8sheets is ready.":"Nowa wersja 8sheets jest gotowa.",Later:"Później","8sheets was updated in another tab. Save your work, then reload to use the new version.":"Aplikacja 8sheets została zaktualizowana w innej karcie. Zapisz pracę, a potem wczytaj stronę ponownie, aby użyć nowej wersji."};export{e as default};
package/io/client.js CHANGED
@@ -1 +1 @@
1
- import{getDataPackage as S}from"../extras/getdata/persist.js";import{cellTypesPackage as k}from"../celltypes/cell-types.js";import{Sheet as v}from"../core/sheet.js";import{Workbook as P}from"../core/workbook.js";import{buildBlock as x,newBlockBuffers as C}from"./export-blocks.js";import{buildPlan as b}from"./plan.js";import{applySheetFilter as I}from"../cells/filter-file.js";import{applySheetViewInfo as M}from"../cells/view-xml.js";import{docPropsCommitted as R}from"../cells/docprops-xml.js";import{namedStylesCommitted as _}from"../cells/cell-styles-xml.js";import{buildPivotPackage as E}from"../pivot/xml.js";import{resolveColor as z}from"./xlsx-styles.js";import{applyPrintNames as F}from"../print/page-setup.js";import{MAX_COLS as T,parseCellRef as N}from"../core/address.js";const q="The file reader didn't start. Check the connection and try again.";class Z{constructor(){this.worker=new Worker(new URL("./io.worker.js",import.meta.url),{type:"module"}),this.worker.onmessage=e=>this._on(e.data),this.worker.onerror=e=>this._fail(new Error(e.message||q)),this.book=null,this.onProgress=null,this.opening=null,this.saving=null,this.queue=Promise.resolve(),this.retired=!1,this.closed=!1,this.cellsRead=0,this.sourceStrings=0,this.sourceStyles=0,this.sheetSourceCount=0,this.unlockState=null,this.hasPassword=!1,this.onIntegrityFailed=null,this.partNames=new Set,this.nextPivotCacheId=1,this.numFmtIds=new Map}async packageOf(e){if(!this.unlockState)return e;const{openUnlocked:s}=await import("./crypto/index.js");return(await s(e,this.unlockState)).package}setPassword(e){this.hasPassword=!!e,this.worker.postMessage({op:"setPassword",password:e||null})}_enqueue(e){if(this.retired)return Promise.reject(new Error("This file's Worker was closed."));const s=()=>this.closed?Promise.reject(new Error("The workbook was destroyed.")):e(),t=this.queue.then(s,s);return this.queue=t.catch(()=>{}),t}retire(){this.retired=!0,this.queue.then(()=>this.worker.terminate())}close(){this.retired=!0,this.closed=!0,this.worker.terminate(),(this.opening||this.saving||this.uploading)&&this._fail(new Error("The workbook was destroyed."))}open(e,s={}){return this._enqueue(()=>this._open(e,s))}_open(e,{onReady:s,onProgress:t,password:r}={}){const l=new P;return this.book=l,this.cellsRead=0,this.onProgress=t,this.onReady=s,new Promise((o,u)=>{this.opening={resolve:o,reject:u},this.worker.postMessage({op:"open",file:e,password:r})})}save(e,s,t={}){return this._enqueue(()=>this._save(e,s,t))}async _save(e,s,{onProgress:t,objects:r,pivots:l,slicers:o,dataSheets:u,chartExtras:g,commit:c=s!==null,markSaved:h=!0}={}){this.book=e;const n=e.edits;this.onProgress=t,await r?.prepareSave?.(e),u?.prepareSave();const a=b(e,{strings:this.sourceStrings,styles:this.sourceStyles,sheets:this.sheetSourceCount}),f={edits:e.edits,strings:e.strings.size,styles:e.styles.list.length,dxfs:e.dxfs?.length??0,sheets:[...e.sheets],tables:[...e.engine?.tables.values()??[]]};a.sheets.forEach((d,m)=>{d.objects=r?.serialize(e.sheets[m])??null}),a.cellTypes=[...r?.extrasPackage?.(e)??[],...k(e),...S(e),...g??[]],a.cellTypes.some(d=>d.path==="xl/metadata.xml")&&(a.dynamicArrays=!1),a.errorVms=e.errorVms??null;const p=l?this._pivotPlan(e,l,a):null,w=o?.savePlan(a)??null;a.dataSheets=await u?.savePackage()??null,a.foreign=e.source===null&&e.collabPackage&&e.packageInfo?.kept===!0?{...e.collabPackage,expected:!0}:null;let y;try{y=await new Promise((d,m)=>{this.saving={resolve:d,reject:m,edits:f.edits},this.worker.postMessage({op:"save",plan:a,handle:s,commit:c})})}catch(d){throw p?.restore(),w?.restore(),d}finally{u?.finishSave()}if(h&&e.edits===n&&(e.dirty=!1),c){const d=e.edits===f.edits;this._commit(e,f,a,d),R(e,a.docProps,d),_(e,a.namedStyles,d),p?.commit(d),w?.commit(d)}else p?.restore(),w?.restore();return y}uploadPackage({url:e,key:s}){return this._enqueue(()=>new Promise(t=>{this.uploading=t,this.worker.postMessage({op:"uploadPackage",url:e,key:s})}))}_pivotPlan(e,s,t){const r=s.pivots,l=s.removedParts??[];if(r.length===0&&l.length===0)return null;const o=r.map(h=>[h,h.part,h.cache,h.cache.part,h.cache.id]),u=new Map;let g=Math.max(163,...this.numFmtIds.values())+1;const c=E(r,{existing:[...this.partNames],saveRecords:!1,firstCacheId:this.nextPivotCacheId,numFmtId:h=>{const n=this.numFmtIds.get(h)??u.get(h);return n!==void 0?n:(u.set(h,g),g++)}});if(t.pivotNumFmts=[...u].map(([h,n])=>({id:n,code:h})),c.parts.length>0||l.length>0){const h=n=>`rIdPivotCache${n.cacheId}`;t.pivots={parts:c.parts.map(({name:n,contentType:a,xml:f})=>({name:n,contentType:a,xml:f})),contentTypes:c.contentTypes,replaced:[...c.replaced,...l],relationships:c.relationships.map(({from:n,id:a,type:f,target:p,sheet:w})=>({from:n,id:a,type:f,target:p,sheetIndex:n===null?e.sheets.indexOf(w):-1})),caches:c.workbook.pivotCaches.map(n=>({cacheId:n.cacheId,type:n.type,target:n.target,relId:h(n)}))}}return{restore:()=>{for(const[h,n,a,f,p]of o)h.part=n,a.part=f,a.id=p},commit:h=>{h&&(s.removedParts=[]);for(const n of c.parts)this.partNames.add(n.name);if(this.nextPivotCacheId+=c.workbook.pivotCaches.length,h)for(const n of r)n.dirty=!1;for(const n of c.relationships){if(n.from===null||!/\/pivotCacheDefinition$/.test(n.type))continue;const a=r.find(f=>f.part===n.from);a&&(a.cache.part=n.target.replace(/^\//,""))}}}}_commit(e,s,t,r){e.source={},this.sourceStrings=s.strings,this.sourceStyles=s.styles,this.sheetSourceCount=s.sheets.length,e.sourceDxfs=s.dxfs;const l=new Set(t.removedTables);e.removedTables=(e.removedTables??[]).filter(o=>!l.has(o)),r&&(e.protectionChanged=!1,e.calcModeChanged=!1,e.personsChanged=!1,e.formulasEdited=!1,e.namesChanged=!1),s.sheets.forEach((o,u)=>{o.sourceIndex=u;const g=new Set(t.sheets[u].structureOps);o.structureOps=(o.structureOps??[]).filter(c=>!g.has(c)),r&&(o.colsChanged=!1,o.viewChanged=!1,o.defaultsChanged=!1,o.filterChanged=!1,o.cfChanged=!1,o.validationsChanged=!1,o.hyperlinksChanged=!1,o.protectionChanged=!1,o.scenariosChanged=!1,o.threadsChanged=!1,o.commentsChanged=!1,o.sparklinesChanged=!1,o.pageSetupChanged=!1,o.tabColorChanged=!1)});for(const o of s.tables)o.isNew=!1,o.source=!0,r&&(o.dirty=!1,o.columnsChanged=!1)}_on(e){const s=this.book;switch(e.op){case"meta":{s.sheets=e.info.sheets.map((t,r)=>{const l=new v(t.name);return l.hidden=t.hidden,l.sourceIndex=r,l}),s.sheets.length===0&&(s.sheets=[new v("Sheet1")]),s.activeSheet=Math.min(e.info.activeTab,s.sheets.length-1),s.styles.load(e.info.styles),this.sourceStyles=e.info.styles.length,this.sheetSourceCount=e.info.sheets.length,this.meta=e.info,s.protection=e.info.workbookProtection,s.persons=e.info.persons??[],this.nextPivotCacheId=(e.info.maxPivotCacheId??0)+1,this.numFmtIds=new Map(Object.entries(e.info.numFmts??{}).map(([t,r])=>[r,Number(t)])),s.theme=e.info.theme,s.themeName=e.info.themeName??null,s.dxfs=e.info.dxfs,s.sourceDxfs=e.info.dxfs.length,s.source={},this.onReady?.(s);break}case"strings":if(s.strings.addPage(e.bytes,e.offsets),e.rich){s.strings.rich??=new Map;for(const[t,r]of e.rich){for(const l of r)l.color&&(l.color=z({a:l.color},s.theme??[]));s.strings.rich.set(t,r)}}break;case"stringsEnd":this.sourceStrings=e.count;break;case"sheetStart":if(D(s.sheets[e.index],e.info),e.info.chartSheet){const t=s.sheets[e.index];t.isChartSheet=!0,t.hideHeadings=!0,t.showGridlines=!1}break;case"cells":{const t=s.sheets[e.index],r=e.batch;t.applyBatch(r),r.rowMeta!==null&&A(t,r.rowMeta),this.cellsRead+=r.count,this.onProgress?.({cells:this.cellsRead,sheet:e.index,sheets:s.sheets.length}),r.formulas=null,r.valueMeta=null,this.worker.postMessage({op:"ack",batch:r},[r.rows.buffer,r.cols.buffer,r.kinds.buffer,r.values.buffer,r.styles.buffer]);break}case"sheetEnd":{const t=s.sheets[e.index];t.merges=e.merges,t.mergeIndex=null,O(t,e.features,e.comments),e.pageSetup&&(t.pageSetup=F(e.pageSetup,this.meta.printNames,e.index)),t.revision++,this.onProgress?.({cells:this.cellsRead,sheet:e.index,sheets:s.sheets.length,sheetDone:!0});break}case"opened":{s.dirty=!1;const t=this.opening;this.opening=null,t?.resolve(s);break}case"blockRequest":{if(s.edits!==this.saving?.edits){this.worker.postMessage({op:"block",id:e.id,error:"The workbook changed during the save. Save again to include your edits."});break}const t=e.recycled??C(),r=x(s.sheets[e.sheet],s.strings,e.from,t);this.worker.postMessage({op:"block",id:e.id,block:r},[r.rows.buffer,r.cols.buffer,r.kinds.buffer,r.values.buffer,r.styles.buffer]),this.onProgress?.({saving:!0,sheet:e.sheet,row:e.from,sheets:s.sheets.length,maxRow:s.sheets[e.sheet].maxRow});break}case"uploaded":{const t=this.uploading;this.uploading=null,t?.(e.status);break}case"saved":{for(const[l,o]of e.numFmts??[])this.numFmtIds.set(l,o);const t=s.source===null,r=this.saving;this.saving=null,r?.resolve({size:e.size,blob:e.blob??null,hadNoSource:t});break}case"unlocked":this.unlockState=e.state,this.hasPassword=e.state!==null;break;case"integrity":this.onIntegrityFailed?.(e.message);break;case"error":this._fail(Object.assign(new Error(e.message),{code:e.code}));break;default:}}_fail(e){const s=this.opening??this.saving,t=this.uploading;this.opening=null,this.saving=null,this.uploading=null,s?s.reject(e):t?t(`failed: ${e.message}`):console.error(e)}}function O(i,e,s){e&&(e.pictureRid&&(i.backgroundRid=e.pictureRid),e.headerPictureRid&&(i.headerPictureRid=e.headerPictureRid),I(i,e.filter),e.cf.length&&(i.cf=e.cf),e.validations.length&&(i.validations=e.validations),e.hyperlinks.length&&(i.hyperlinks=e.hyperlinks),e.protection&&(i.protection=e.protection),e.customSheetViews&&(i.fileSheetViews=e.customSheetViews),e.scenarios&&(i.scenarios=e.scenarios),e.threads?.length&&(i.threads=e.threads),e.sparklines?.length&&(i.sparklines=e.sparklines)),s?.length&&(i.comments=new Map(s.map(t=>{const r=N(t.ref);return[r.row*T+r.col,t]})))}function D(i,e){i.summaryAbove=e.summaryAbove===!0,i.outlineAutoStyles=e.outlineAutoStyles===!0,i.summaryLeft=e.summaryLeft===!0,i.rows.setDefaultSize(e.defaultHeight),i.cols.setDefaultSize(e.defaultWidth),i.tabColor=e.tabColor,i.frozenRows=e.frozenRows,i.frozenCols=e.frozenCols,i.showGridlines=e.showGridlines,i.zoom=e.zoom,i.rtl=e.rtl===!0,M(i,e);for(const s of e.cols)for(let t=s.min;t<=s.max;t++)s.width>=0&&s.width!==e.defaultWidth&&i.cols.setSize(t,s.width),s.hidden&&i.cols.setHidden(t,!0),s.style&&(i.colStyles===null&&(i.colStyles=new Map),i.colStyles.set(t,s.style)),s.extra&&(i.colExtras===null&&(i.colExtras=new Map),i.colExtras.set(t,s.extra))}function A(i,e){for(let s=0;s<e.length;s+=6){const t=e[s];e[s+1]>=0&&i.rows.setSize(t,e[s+1],e[s+4]===0),e[s+2]&&i.rows.setHidden(t,!0),e[s+3]&&(i.rowStyles===null&&(i.rowStyles=new Map),i.rowStyles.set(t,e[s+3])),e[s+5]&&(i.rowExtras===null&&(i.rowExtras=new Map),i.rowExtras.set(t,e[s+5]))}}export{Z as IoClient,q as WORKER_FAILED};
1
+ import{getDataPackage as S}from"../extras/getdata/persist.js";import{cellTypesPackage as k}from"../celltypes/cell-types.js";import{Sheet as v}from"../core/sheet.js";import{Workbook as P}from"../core/workbook.js";import{buildBlock as x,newBlockBuffers as C}from"./export-blocks.js";import{buildPlan as b}from"./plan.js";import{applySheetFilter as I}from"../cells/filter-file.js";import{applySheetViewInfo as M}from"../cells/view-xml.js";import{docPropsCommitted as R}from"../cells/docprops-xml.js";import{namedStylesCommitted as E}from"../cells/cell-styles-xml.js";import{buildPivotPackage as _}from"../pivot/xml.js";import{resolveColor as z}from"./xlsx-styles.js";import{applyPrintNames as F}from"../print/page-setup.js";import{MAX_COLS as T,parseCellRef as N}from"../core/address.js";const q="The file reader didn't start. Check the connection and try again.";class Z{constructor(){this.worker=new Worker(new URL("./io.worker.js",import.meta.url),{type:"module"}),this.worker.onmessage=e=>this._on(e.data),this.worker.onerror=e=>this._fail(new Error(e.message||q)),this.book=null,this.onProgress=null,this.opening=null,this.saving=null,this.queue=Promise.resolve(),this.retired=!1,this.closed=!1,this.cellsRead=0,this.sourceStrings=0,this.sourceStyles=0,this.sheetSourceCount=0,this.unlockState=null,this.hasPassword=!1,this.onIntegrityFailed=null,this.partNames=new Set,this.nextPivotCacheId=1,this.numFmtIds=new Map}async packageOf(e){if(!this.unlockState)return e;const{openUnlocked:s}=await import("./crypto/index.js");return(await s(e,this.unlockState)).package}setPassword(e){this.hasPassword=!!e,this.worker.postMessage({op:"setPassword",password:e||null})}_enqueue(e){if(this.retired)return Promise.reject(new Error("This file's Worker was closed."));const s=()=>this.closed?Promise.reject(new Error("The workbook was destroyed.")):e(),t=this.queue.then(s,s);return this.queue=t.catch(()=>{}),t}retire(){this.retired=!0,this.queue.then(()=>this.worker.terminate())}close(){this.retired=!0,this.closed=!0,this.worker.terminate(),(this.opening||this.saving||this.uploading)&&this._fail(new Error("The workbook was destroyed."))}open(e,s={}){return this._enqueue(()=>this._open(e,s))}_open(e,{onReady:s,onProgress:t,password:r}={}){const l=new P;return this.book=l,this.cellsRead=0,this.onProgress=t,this.onReady=s,new Promise((o,u)=>{this.opening={resolve:o,reject:u},this.worker.postMessage({op:"open",file:e,password:r})})}save(e,s,t={}){return this._enqueue(()=>this._save(e,s,t))}async _save(e,s,{onProgress:t,objects:r,pivots:l,slicers:o,dataSheets:u,chartExtras:g,commit:c=s!==null,markSaved:h=!0}={}){this.book=e;const n=e.edits;this.onProgress=t,await r?.prepareSave?.(e),u?.prepareSave();const a=b(e,{strings:this.sourceStrings,styles:this.sourceStyles,sheets:this.sheetSourceCount}),f={edits:e.edits,strings:e.strings.size,styles:e.styles.list.length,dxfs:e.dxfs?.length??0,sheets:[...e.sheets],tables:[...e.engine?.tables.values()??[]]};a.sheets.forEach((d,m)=>{d.objects=r?.serialize(e.sheets[m])??null}),a.cellTypes=[...r?.extrasPackage?.(e)??[],...k(e),...S(e),...g??[]],a.cellTypes.some(d=>d.path==="xl/metadata.xml")&&(a.dynamicArrays=!1),a.errorVms=e.errorVms??null;const p=l?this._pivotPlan(e,l,a):null,w=o?.savePlan(a)??null;a.dataSheets=await u?.savePackage()??null,a.foreign=e.source===null&&e.collabPackage&&e.packageInfo?.kept===!0?{...e.collabPackage,expected:!0}:null;let y;try{y=await new Promise((d,m)=>{this.saving={resolve:d,reject:m,edits:f.edits},this.worker.postMessage({op:"save",plan:a,handle:s,commit:c})})}catch(d){throw p?.restore(),w?.restore(),d}finally{u?.finishSave()}if(h&&e.edits===n&&(e.dirty=!1),c){const d=e.edits===f.edits;this._commit(e,f,a,d),R(e,a.docProps,d),E(e,a.namedStyles,d),p?.commit(d),w?.commit(d)}else p?.restore(),w?.restore();return y}uploadPackage({url:e,key:s}){return this._enqueue(()=>new Promise(t=>{this.uploading=t,this.worker.postMessage({op:"uploadPackage",url:e,key:s})}))}_pivotPlan(e,s,t){const r=s.pivots,l=s.removedParts??[];if(r.length===0&&l.length===0)return null;const o=r.map(h=>[h,h.part,h.cache,h.cache.part,h.cache.id]),u=new Map;let g=Math.max(163,...this.numFmtIds.values())+1;const c=_(r,{existing:[...this.partNames],saveRecords:!1,firstCacheId:this.nextPivotCacheId,numFmtId:h=>{const n=this.numFmtIds.get(h)??u.get(h);return n!==void 0?n:(u.set(h,g),g++)}});if(t.pivotNumFmts=[...u].map(([h,n])=>({id:n,code:h})),c.parts.length>0||l.length>0){const h=n=>`rIdPivotCache${n.cacheId}`;t.pivots={parts:c.parts.map(({name:n,contentType:a,xml:f})=>({name:n,contentType:a,xml:f})),contentTypes:c.contentTypes,replaced:[...c.replaced,...l],relationships:c.relationships.map(({from:n,id:a,type:f,target:p,sheet:w})=>({from:n,id:a,type:f,target:p,sheetIndex:n===null?e.sheets.indexOf(w):-1})),caches:c.workbook.pivotCaches.map(n=>({cacheId:n.cacheId,type:n.type,target:n.target,relId:h(n)}))}}return{restore:()=>{for(const[h,n,a,f,p]of o)h.part=n,a.part=f,a.id=p},commit:h=>{h&&(s.removedParts=[]);for(const n of c.parts)this.partNames.add(n.name);if(this.nextPivotCacheId+=c.workbook.pivotCaches.length,h)for(const n of r)n.dirty=!1;for(const n of c.relationships){if(n.from===null||!/\/pivotCacheDefinition$/.test(n.type))continue;const a=r.find(f=>f.part===n.from);a&&(a.cache.part=n.target.replace(/^\//,""))}}}}_commit(e,s,t,r){e.source={},this.sourceStrings=s.strings,this.sourceStyles=s.styles,this.sheetSourceCount=s.sheets.length,e.sourceDxfs=s.dxfs;const l=new Set(t.removedTables);e.removedTables=(e.removedTables??[]).filter(o=>!l.has(o)),r&&(e.protectionChanged=!1,e.calcModeChanged=!1,e.personsChanged=!1,e.formulasEdited=!1,e.namesChanged=!1),s.sheets.forEach((o,u)=>{o.sourceIndex=u;const g=new Set(t.sheets[u].structureOps);o.structureOps=(o.structureOps??[]).filter(c=>!g.has(c)),r&&(o.colsChanged=!1,o.viewChanged=!1,o.defaultsChanged=!1,o.filterChanged=!1,o.cfChanged=!1,o.validationsChanged=!1,o.hyperlinksChanged=!1,o.protectionChanged=!1,o.scenariosChanged=!1,o.threadsChanged=!1,o.commentsChanged=!1,o.sparklinesChanged=!1,o.pageSetupChanged=!1,o.tabColorChanged=!1)});for(const o of s.tables)o.isNew=!1,o.source=!0,r&&(o.dirty=!1,o.columnsChanged=!1)}_on(e){const s=this.book;switch(e.op){case"meta":{s.sheets=e.info.sheets.map((t,r)=>{const l=new v(t.name);return l.hidden=t.hidden,t.veryHidden&&(l.veryHidden=!0),l.sourceIndex=r,l}),s.sheets.length===0&&(s.sheets=[new v("Sheet1")]),s.activeSheet=Math.min(e.info.activeTab,s.sheets.length-1),s.styles.load(e.info.styles),this.sourceStyles=e.info.styles.length,this.sheetSourceCount=e.info.sheets.length,this.meta=e.info,s.protection=e.info.workbookProtection,s.persons=e.info.persons??[],this.nextPivotCacheId=(e.info.maxPivotCacheId??0)+1,this.numFmtIds=new Map(Object.entries(e.info.numFmts??{}).map(([t,r])=>[r,Number(t)])),s.theme=e.info.theme,s.themeName=e.info.themeName??null,s.dxfs=e.info.dxfs,s.sourceDxfs=e.info.dxfs.length,s.source={},this.onReady?.(s);break}case"strings":if(s.strings.addPage(e.bytes,e.offsets),e.rich){s.strings.rich??=new Map;for(const[t,r]of e.rich){for(const l of r)l.color&&(l.color=z({a:l.color},s.theme??[]));s.strings.rich.set(t,r)}}break;case"stringsEnd":this.sourceStrings=e.count;break;case"sheetStart":if(D(s.sheets[e.index],e.info),e.info.chartSheet){const t=s.sheets[e.index];t.isChartSheet=!0,t.hideHeadings=!0,t.showGridlines=!1}break;case"cells":{const t=s.sheets[e.index],r=e.batch;t.applyBatch(r),r.rowMeta!==null&&A(t,r.rowMeta),this.cellsRead+=r.count,this.onProgress?.({cells:this.cellsRead,sheet:e.index,sheets:s.sheets.length}),r.formulas=null,r.valueMeta=null,this.worker.postMessage({op:"ack",batch:r},[r.rows.buffer,r.cols.buffer,r.kinds.buffer,r.values.buffer,r.styles.buffer]);break}case"sheetEnd":{const t=s.sheets[e.index];t.merges=e.merges,t.mergeIndex=null,O(t,e.features,e.comments),e.pageSetup&&(t.pageSetup=F(e.pageSetup,this.meta.printNames,e.index)),t.revision++,this.onProgress?.({cells:this.cellsRead,sheet:e.index,sheets:s.sheets.length,sheetDone:!0});break}case"opened":{s.dirty=!1;const t=this.opening;this.opening=null,t?.resolve(s);break}case"blockRequest":{if(s.edits!==this.saving?.edits){this.worker.postMessage({op:"block",id:e.id,error:"The workbook changed during the save. Save again to include your edits."});break}const t=e.recycled??C(),r=x(s.sheets[e.sheet],s.strings,e.from,t);this.worker.postMessage({op:"block",id:e.id,block:r},[r.rows.buffer,r.cols.buffer,r.kinds.buffer,r.values.buffer,r.styles.buffer]),this.onProgress?.({saving:!0,sheet:e.sheet,row:e.from,sheets:s.sheets.length,maxRow:s.sheets[e.sheet].maxRow});break}case"uploaded":{const t=this.uploading;this.uploading=null,t?.(e.status);break}case"saved":{for(const[l,o]of e.numFmts??[])this.numFmtIds.set(l,o);const t=s.source===null,r=this.saving;this.saving=null,r?.resolve({size:e.size,blob:e.blob??null,hadNoSource:t});break}case"unlocked":this.unlockState=e.state,this.hasPassword=e.state!==null;break;case"integrity":this.onIntegrityFailed?.(e.message);break;case"error":this._fail(Object.assign(new Error(e.message),{code:e.code}));break;default:}}_fail(e){const s=this.opening??this.saving,t=this.uploading;this.opening=null,this.saving=null,this.uploading=null,s?s.reject(e):t?t(`failed: ${e.message}`):console.error(e)}}function O(i,e,s){e&&(e.pictureRid&&(i.backgroundRid=e.pictureRid),e.headerPictureRid&&(i.headerPictureRid=e.headerPictureRid),I(i,e.filter),e.cf.length&&(i.cf=e.cf),e.validations.length&&(i.validations=e.validations),e.hyperlinks.length&&(i.hyperlinks=e.hyperlinks),e.protection&&(i.protection=e.protection),e.customSheetViews&&(i.fileSheetViews=e.customSheetViews),e.scenarios&&(i.scenarios=e.scenarios),e.ignoredErrors&&(i.ignoredErrors=e.ignoredErrors),e.threads?.length&&(i.threads=e.threads),e.sparklines?.length&&(i.sparklines=e.sparklines)),s?.length&&(i.comments=new Map(s.map(t=>{const r=N(t.ref);return[r.row*T+r.col,t]})))}function D(i,e){i.summaryAbove=e.summaryAbove===!0,i.outlineAutoStyles=e.outlineAutoStyles===!0,i.summaryLeft=e.summaryLeft===!0,i.rows.setDefaultSize(e.defaultHeight),i.cols.setDefaultSize(e.defaultWidth),i.tabColor=e.tabColor,i.frozenRows=e.frozenRows,i.frozenCols=e.frozenCols,i.showGridlines=e.showGridlines,i.zoom=e.zoom,i.rtl=e.rtl===!0,M(i,e);for(const s of e.cols)for(let t=s.min;t<=s.max;t++)s.width>=0&&s.width!==e.defaultWidth&&i.cols.setSize(t,s.width),s.hidden&&i.cols.setHidden(t,!0),s.style&&(i.colStyles===null&&(i.colStyles=new Map),i.colStyles.set(t,s.style)),s.extra&&(i.colExtras===null&&(i.colExtras=new Map),i.colExtras.set(t,s.extra))}function A(i,e){for(let s=0;s<e.length;s+=6){const t=e[s];e[s+1]>=0&&i.rows.setSize(t,e[s+1],e[s+4]===0),e[s+2]&&i.rows.setHidden(t,!0),e[s+3]&&(i.rowStyles===null&&(i.rowStyles=new Map),i.rowStyles.set(t,e[s+3])),e[s+5]&&(i.rowExtras===null&&(i.rowExtras=new Map),i.rowExtras.set(t,e[s+5]))}}export{Z as IoClient,q as WORKER_FAILED};
package/io/csv.js CHANGED
@@ -1,5 +1,8 @@
1
- import{BATCH_CELLS as y}from"./xlsx-read.js";import{BOOL as B,CHUNK_BITS as H,CHUNK_SIZE as b,EMPTY as I,NUM as E,STR as N}from"../core/sheet.js";import{parseInput as R}from"../core/input.js";import{formatGeneral as _}from"../core/numfmt.js";function L(){return{count:0,rows:new Uint32Array(y),cols:new Uint16Array(y),kinds:new Uint8Array(y),values:new Float64Array(y),styles:new Uint16Array(y),formulas:null,valueMeta:null,rowMeta:null}}function $(r){const l=r.replace(/"(?:[^"]|"")*(?:"|$)/g,"").split(/\r\n|[\r\n]/).slice(0,10);let i=",",c=0;for(const a of[",",";"," ","|"]){const f=l.map(h=>h.split(a).length-1),p=Math.min(...f.slice(0,Math.max(1,f.length-1)));p>c&&(i=a,c=p)}return i}async function G(r,{delimiter:l,addString:i,styleFor:c,onBatch:a,onProgress:f,preserveIdentifiers:p=!1,textColumns:h}){const g=r.stream().pipeThrough(new TextDecoderStream).getReader();let t=L(),u=0,w=0,o="",d=!1,A=!1,v=l,S=!1;v===void 0&&r.slice&&(v=$(await r.slice(0,65536).text()));let T=!0,x="";if(v===void 0){for(;x.length<65536;){const{done:k,value:e}=await g.read();if(k)break;x+=e}v=$(x.slice(0,65536))}const U=async()=>{t.count>0&&(await a(t),t=L())},M=()=>{if(o!==""){const k=h?.has(w)||o[0]==="="||p&&/^0\d+$/.test(o),e=R(k?`'${o}`:o),s=t.count++;t.rows[s]=u,t.cols[s]=w,e.kind===E?(t.kinds[s]=E,t.values[s]=e.value,t.styles[s]=e.format?c(e.format):0):e.kind===B?(t.kinds[s]=B,t.values[s]=e.value,t.styles[s]=0):e.kind===I?t.count--:(t.kinds[s]=N,t.values[s]=i(e.text??o),t.styles[s]=0)}o="",w++};for(;;){const k=x?{value:x}:await g.read();if(x="",k.done)break;let e=k.value;T&&e.charCodeAt(0)===65279&&(e=e.slice(1)),T=!1,S&&e.length&&(e[0]===`
2
- `&&(e=e.slice(1)),S=!1);let s=0;for(let n=0;n<e.length;n++){const m=e.charCodeAt(n);if(d){m===34&&(o+=e.slice(s,n),e.charCodeAt(n+1)===34?(o+='"',n++,s=n+1):n+1>=e.length?(A=!0,d=!1,s=n+1):(d=!1,s=n+1));continue}if(A&&(A=!1,m===34)){o+='"',d=!0,s=n+1;continue}m===34&&o===""&&s===n?(d=!0,s=n+1):m===v.charCodeAt(0)?(o+=e.slice(s,n),M(),s=n+1):(m===10||m===13)&&(o+=e.slice(s,n),M(),m===13&&(e.charCodeAt(n+1)===10?n++:n+1===e.length&&(S=!0)),u++,w=0,s=n+1,t.count>=y-16384&&await U())}o+=e.slice(s),f?.(u)}return(o!==""||w>0)&&M(),await U(),{rows:u+1}}const D=(r,l)=>r.includes(l)||r.includes('"')||r.includes(`
3
- `)||r.includes("\r");function*F(r,l){let i=[],c=0;const{maxRow:a,maxCol:f,columns:p}=r;for(let h=0;h<=a;h+=b){const C=[];for(let t=0;t<=f;t++){const u=p[t]?.[h>>>H];u&&C.push([t,u])}const g=Math.min(b,a-h+1);for(let t=0;t<g;t++)for(const[u,w]of C){if(!w.kinds[t])continue;const o=h+t,d=l(r,o,u);i.push([o,u,d]),c+=d.length,(i.length>=2048||c>=262144)&&(yield i,i=[],c=0)}yield i,i=[],c=0}}class K{constructor(l,i=","){this.sink=l,this.delimiter=i,this.row=0,this.col=0,this.encoder=new TextEncoder}async batch(l){let i="";for(const[c,a,f]of l)c>this.row&&(i+=`\r
4
- `.repeat(c-this.row),this.row=c,this.col=0),i+=this.delimiter.repeat(a-this.col),i+=D(f,this.delimiter)?`"${f.replace(/"/g,'""')}"`:f,this.col=a,i.length>=1<<20&&(await this.sink.write(this.encoder.encode(i)),i="");i&&await this.sink.write(this.encoder.encode(i))}async finish(l){l>=this.row&&await this.sink.write(this.encoder.encode(`\r
5
- `.repeat(l-this.row+1)))}}async function P(r,l,i,c=","){const a=new K(i,c);for(const f of F(r,l))await a.batch(f);await a.finish(r.maxRow)}export{K as CsvWriter,F as csvBatches,_ as formatGeneral,G as readCsv,$ as sniffDelimiter,P as writeCsv};
1
+ import{BATCH_CELLS as C}from"./xlsx-read.js";import{BOOL as O,CHUNK_BITS as Z,CHUNK_SIZE as Q,EMPTY as j,NUM as N,STR as J}from"../core/sheet.js";import{parseInput as P}from"../core/input.js";import{dateSerial as V,formatGeneral as X}from"../core/numfmt.js";import{cutFixed as q,fixedCuts as tt,sniffDelimiter as z}from"./text-split.js";function G(){return{count:0,rows:new Uint32Array(C),cols:new Uint16Array(C),kinds:new Uint8Array(C),values:new Float64Array(C),styles:new Uint16Array(C),formulas:null,valueMeta:null,rowMeta:null}}async function ft(h,{delimiter:n,addString:s,styleFor:o,onBatch:f,onProgress:w,preserveIdentifiers:M=!1,textColumns:x,delimiters:v,consecutive:$=!1,qualifier:u='"',fixed:d=null,startRow:g=0,skipColumns:A=null,dateColumns:S=null}){v?.length&&(n=v[0]),d&&(n=`
2
+ `);const W=new Set((v?.length?v:[]).map(c=>c.charCodeAt(0))),U=u?u.charCodeAt(0):-1;let K=c=>c;if(A?.size){const c=Math.max(...A),i=new Int32Array(c+1);let a=0;for(let t=0;t<=c;t++)A.has(t)?(i[t]=-1,a++):i[t]=t-a;K=t=>t<=c?i[t]:t-a}const E=h.stream().pipeThrough(new TextDecoderStream).getReader();let l=G(),m=0,p=0,r="",b=!1,F=!1,T=n,_=!1;T===void 0&&h.slice&&(T=z(await h.slice(0,65536).text()));let B=!0,k="";if(T===void 0){for(;k.length<65536;){const{done:c,value:i}=await E.read();if(c)break;k+=i}T=z(k.slice(0,65536))}const L=async()=>{l.count>0&&(await f(l),l=G())},R=()=>{const c=r!==""&&m>=g?K(p):-1;if(c>=0){const i=x?.has(p)||r[0]==="="||M&&/^0\d+$/.test(r),a=S?.has(p)?V(r,S.get(p)):null,t=a!==null?{kind:N,value:a,format:"m/d/yyyy"}:P(i?`'${r}`:r),e=l.count++;l.rows[e]=m-g,l.cols[e]=c,t.kind===N?(l.kinds[e]=N,l.values[e]=t.value,l.styles[e]=t.format?o(t.format):0):t.kind===O?(l.kinds[e]=O,l.values[e]=t.value,l.styles[e]=0):t.kind===j?l.count--:(l.kinds[e]=J,l.values[e]=s(t.text??r),l.styles[e]=0)}r="",p++};if(d)return Y();let I=!1;for(;;){const c=k?{value:k}:await E.read();if(k="",c.done)break;let i=c.value;B&&i.charCodeAt(0)===65279&&(i=i.slice(1)),B=!1,_&&i.length&&(i[0]===`
3
+ `&&(i=i.slice(1)),_=!1);let a=0;for(let t=0;t<i.length;t++){const e=i.charCodeAt(t);if(b){e===U&&(r+=i.slice(a,t),i.charCodeAt(t+1)===U?(r+=u,t++,a=t+1):t+1>=i.length?(F=!0,b=!1,a=t+1):(b=!1,a=t+1));continue}if(F&&(F=!1,e===U)){r+=u,b=!0,a=t+1;continue}if(e===U&&r===""&&a===t)b=!0,a=t+1;else if(e===T.charCodeAt(0)||W.has(e)){if($&&I&&r===""&&a===t){a=t+1;continue}r+=i.slice(a,t),R(),a=t+1,I=!0}else(e===10||e===13)&&(I=!1,r+=i.slice(a,t),R(),e===13&&(i.charCodeAt(t+1)===10?t++:t+1===i.length&&(_=!0)),m++,p=0,a=t+1,l.count>=C-16384&&await L())}r+=i.slice(a),w?.(m)}return(r!==""||p>0)&&R(),await L(),{rows:Math.max(0,m+1-g)};async function Y(){const c=tt(d);let i="";const a=async()=>{for(const t of q(i,c))r=t,R();m++,p=0,i="",l.count>=C-16384&&await L()};for(;;){const t=await E.read();if(t.done)break;let e=t.value;B&&e.charCodeAt(0)===65279&&(e=e.slice(1)),B=!1,_&&e.length&&(e[0]===`
4
+ `&&(e=e.slice(1)),_=!1);let D=0;for(let y=0;y<e.length;y++){const H=e.charCodeAt(y);H!==10&&H!==13||(i+=e.slice(D,y),await a(),H===13&&(e.charCodeAt(y+1)===10?y++:y+1===e.length&&(_=!0)),D=y+1)}i+=e.slice(D),w?.(m)}return i!==""&&await a(),await L(),{rows:Math.max(0,m-g)}}}const et=(h,n)=>h.includes(n)||h.includes('"')||h.includes(`
5
+ `)||h.includes("\r");function*it(h,n){let s=[],o=0;const{maxRow:f,maxCol:w,columns:M}=h;for(let x=0;x<=f;x+=Q){const v=[];for(let u=0;u<=w;u++){const d=M[u]?.[x>>>Z];d&&v.push([u,d])}const $=Math.min(Q,f-x+1);for(let u=0;u<$;u++)for(const[d,g]of v){if(!g.kinds[u])continue;const A=x+u,S=n(h,A,d);s.push([A,d,S]),o+=S.length,(s.length>=2048||o>=262144)&&(yield s,s=[],o=0)}yield s,s=[],o=0}}class st{constructor(n,s=",",{bom:o=!1,width:f=0}={}){this.sink=n,this.delimiter=s,this.row=0,this.col=0,this.encoder=new TextEncoder,this.bom=o,this.width=f,this.emptyRow=s.repeat(Math.max(0,f-1))}_pad(){return this.delimiter.repeat(Math.max(0,this.width-1-this.col))}async _write(n){this.bom&&(n=`\uFEFF${n}`,this.bom=!1),await this.sink.write(this.encoder.encode(n))}async batch(n){let s="";for(const[o,f,w]of n)o>this.row&&(s+=this._pad(),o-this.row>1&&(await this._write(s),s="",await this._emptyRows(o-this.row-1)),s+=`\r
6
+ `,this.row=o,this.col=0),s+=this.delimiter.repeat(f-this.col),s+=et(w,this.delimiter)?`"${w.replace(/"/g,'""')}"`:w,this.col=f,s.length>=1<<20&&(await this._write(s),s="");s&&await this._write(s)}async _emptyRows(n){const s=`\r
7
+ ${this.emptyRow}`,o=Math.max(1,Math.floor((1<<20)/s.length));for(let f=n;f>0;f-=o)await this._write(s.repeat(Math.min(f,o)))}async finish(n){if(n<this.row){this.bom&&await this._write("");return}await this._write(this._pad()),await this._emptyRows(n-this.row),await this._write(`\r
8
+ `)}}async function ht(h,n,s,o=",",f={}){const w=new st(s,o,f);for(const M of it(h,n))await w.batch(M);await w.finish(h.maxRow)}export{st as CsvWriter,it as csvBatches,X as formatGeneral,ft as readCsv,z as sniffDelimiter,ht as writeCsv};
@@ -1 +1 @@
1
- import{CHUNK_BITS as L,CHUNK_MASK as E,CHUNK_SIZE as _,DIRTY as O,EVALUATING as T,FORMULA as B,KIND_MASK as H,SPILL as D,STR as G}from"../core/sheet.js";import{cellRef as V,MAX_COLS as g}from"../core/address.js";const M=65536;function P(){return{count:0,rows:new Uint32Array(M),cols:new Uint16Array(M),kinds:new Uint8Array(M),values:new Float64Array(M),styles:new Uint16Array(M),formulas:null,valueMeta:null,rowMeta:null,nextRow:-1}}const X=~(D|O|T);function F(n,r,u){if(n.typed&&n.t===void 0&&n.tpl?.mayArray){const s=V(r,u);return{f:n.f,t:"array",ref:s,cm:1}}const e={};n.f!==void 0&&(e.f=n.f),n.t!==void 0&&(e.t=n.t),n.si!==void 0&&(e.si=n.si),n.ref!==void 0&&(e.ref=n.ref),n.ca!==void 0&&(e.ca=n.ca),n.cm!==void 0&&(e.cm=n.cm),n.raw!==void 0&&(e.raw=n.raw);for(const s of["dt2D","dtr","r1","r2","del1","del2"])n[s]!==void 0&&(e[s]=n[s]);return e}function q(n,r,u,e=P()){e.count=0,e.formulas=null,e.valueMeta=null,e.rowMeta=null,e.nextRow=-1;const s=Y(n);if(u>s)return e;let t=u,l=0;const{rows:i,cols:w,kinds:m,values:a,styles:y}=e,d=new Map,A=n.columns.length;for(;t<=s;){const z=t>>>L,x=[],C=[];for(let c=0;c<A;c++){const f=n.columns[c];if(f===void 0)continue;const p=f[z];p!==void 0&&(x.push(c),C.push(p))}const K=Math.min((z<<L)+E,s),R=x.length;for(;t<=K;){if(l+R>M)return e.count=l,e.nextRow=t,e.rowMeta=I(n,u,t-1),e;const c=t&E;for(let f=0;f<R;f++){const p=C[f];let v=p.kinds[c],U=p.values[c];if(v===0&&n.defaultsForSave){const o=n.defaultsForSave.get(t*g+x[f]);o!==void 0&&(v=o.kind,U=o.value)}const h=p.styles===null?0:p.styles[c];if(!(v===0&&h===0)){if(i[l]=t,w[l]=x[f],m[l]=v&X,a[l]=U,y[l]=h,v&B){e.formulas===null&&(e.formulas=[]);const o=n.formula(t,x[f]),N=(v&H)===G?r.get(p.values[c]):void 0;let S;o===void 0?S={f:""}:o.t==="shared"&&o.f===void 0?(S=d.get(o),S===void 0&&(S=F(o,t,x[f]),d.set(o,S))):S=F(o,t,x[f]),e.formulas.push([l,S,N])}if(n.valueMeta!==null){const o=n.valueMeta.get(t*g+x[f]);o!==void 0&&(e.valueMeta===null&&(e.valueMeta=[]),e.valueMeta.push([l,o]))}l++}}t++}if(l>=M>>1)break}return e.count=l,e.nextRow=t<=s?t:-1,e.rowMeta=I(n,u,t-1),e}function Y(n){let r=n.maxRow;if(n.rows.sizes!==null){for(let u=n.rows.count-1;u>r;u--)if(n.rows.isCustom(u)){r=u;break}}if(n.rowStyles!==null)for(const u of n.rowStyles.keys())u>r&&(r=u);if(n.rowExtras!==null)for(const u of n.rowExtras.keys())u>r&&(r=u);return r}function I(n,r,u){const{rows:e,rowStyles:s,rowExtras:t}=n;if(e.sizes===null&&s===null&&t===null)return null;let l=null;for(let i=r;i<=u;i++){const w=e.sizes!==null&&e.isCustom(i),m=s===null?void 0:s.get(i),a=t===null?void 0:t.get(i);if(!w&&m===void 0&&a===void 0)continue;l===null&&(l=[]);const y=e.isHidden(i);let d=-1;if(y){const A=e.hiddenSizes.get(i);d=A<0?-1:A}else w&&(d=e.sizeOf(i));l.push(i,d,y?1:0,m??0,e.isAuto(i)?0:1,a??null)}return l}function J(n){const r=[],{cols:u,colStyles:e,colExtras:s}=n;if(u.sizes===null&&e===null&&s===null)return r;let t=null;for(let l=0;l<g;l++){const i=u.sizes!==null&&u.isCustom(l),w=e===null?0:e.get(l)??0,m=s===null?null:s.get(l)??null;if(!i&&!w&&m===null){t=null;continue}const a=u.isHidden(l);let y=u.sizeOf(l);if(a){const d=u.hiddenSizes.get(l);y=d<0?u.defaultSize:d}t&&t.px===y&&t.hidden===a&&t.style===w&&t.extra===m&&t.max===l-1?t.max=l:(t={min:l,max:l,px:y,hidden:a,style:w,extra:m,custom:i&&!a?!0:a},r.push(t))}return r}export{M as BLOCK_CELLS,_ as CHUNK_SIZE,q as buildBlock,J as colRecords,P as newBlockBuffers};
1
+ import{CHUNK_BITS as h,CHUNK_MASK as L,CHUNK_SIZE as H,DIRTY as D,EVALUATING as G,FORMULA as E,KIND_MASK as F,SPILL as I,STR as K}from"../core/sheet.js";import{cellRef as V,MAX_COLS as T}from"../core/address.js";const v=65536;function P(){return{count:0,rows:new Uint32Array(v),cols:new Uint16Array(v),kinds:new Uint8Array(v),values:new Float64Array(v),styles:new Uint16Array(v),formulas:null,inlineText:null,valueMeta:null,rowMeta:null,nextRow:-1}}const X=~(I|D|G);function N(e,s,u){if(e.typed&&e.t===void 0&&e.tpl?.mayArray){const i=V(s,u);return{f:e.f,t:"array",ref:i,cm:1}}const n={};e.f!==void 0&&(n.f=e.f),e.t!==void 0&&(n.t=e.t),e.si!==void 0&&(n.si=e.si),e.ref!==void 0&&(n.ref=e.ref),e.ca!==void 0&&(n.ca=e.ca),e.cm!==void 0&&(n.cm=e.cm),e.raw!==void 0&&(n.raw=e.raw);for(const i of["dt2D","dtr","r1","r2","del1","del2"])e[i]!==void 0&&(n[i]=e[i]);return n}function q(e,s,u,n=P()){n.count=0,n.formulas=null,n.inlineText=null,n.valueMeta=null,n.rowMeta=null,n.nextRow=-1;const i=Y(e);if(u>i)return n;let t=u,l=0;const{rows:r,cols:m,kinds:x,values:a,styles:y}=n,d=new Map,A=e.columns.length;for(;t<=i;){const z=t>>>h,p=[],C=[];for(let c=0;c<A;c++){const o=e.columns[c];if(o===void 0)continue;const M=o[z];M!==void 0&&(p.push(c),C.push(M))}const O=Math.min((z<<h)+L,i),R=p.length;for(;t<=O;){if(l+R>v)return n.count=l,n.nextRow=t,n.rowMeta=_(e,u,t-1),n;const c=t&L;for(let o=0;o<R;o++){const M=C[o];let w=M.kinds[c],g=M.values[c];if(w===0&&e.defaultsForSave){const f=e.defaultsForSave.get(t*T+p[o]);f!==void 0&&(w=f.kind,g=f.value)}const U=M.styles===null?0:M.styles[c];if(!(w===0&&U===0)){if(r[l]=t,m[l]=p[o],x[l]=w&X,a[l]=g,y[l]=U,w&I&&!(w&E)&&(w&F)===K&&(n.inlineText===null&&(n.inlineText=new Map),n.inlineText.set(l,s.get(g))),w&E){n.formulas===null&&(n.formulas=[]);const f=e.formula(t,p[o]),B=(w&F)===K?s.get(M.values[c]):void 0;let S;f===void 0?S={f:""}:f.t==="shared"&&f.f===void 0?(S=d.get(f),S===void 0&&(S=N(f,t,p[o]),d.set(f,S))):S=N(f,t,p[o]),n.formulas.push([l,S,B])}if(e.valueMeta!==null){const f=e.valueMeta.get(t*T+p[o]);f!==void 0&&(n.valueMeta===null&&(n.valueMeta=[]),n.valueMeta.push([l,f]))}l++}}t++}if(l>=v>>1)break}return n.count=l,n.nextRow=t<=i?t:-1,n.rowMeta=_(e,u,t-1),n}function Y(e){let s=e.maxRow;if(e.rows.sizes!==null){for(let u=e.rows.count-1;u>s;u--)if(e.rows.isCustom(u)){s=u;break}}if(e.rowStyles!==null)for(const u of e.rowStyles.keys())u>s&&(s=u);if(e.rowExtras!==null)for(const u of e.rowExtras.keys())u>s&&(s=u);return s}function _(e,s,u){const{rows:n,rowStyles:i,rowExtras:t}=e;if(n.sizes===null&&i===null&&t===null)return null;let l=null;for(let r=s;r<=u;r++){const m=n.sizes!==null&&n.isCustom(r),x=i===null?void 0:i.get(r),a=t===null?void 0:t.get(r);if(!m&&x===void 0&&a===void 0)continue;l===null&&(l=[]);const y=n.isHidden(r);let d=-1;if(y){const A=n.hiddenSizes.get(r);d=A<0?-1:A}else m&&(d=n.sizeOf(r));l.push(r,d,y?1:0,x??0,n.isAuto(r)?0:1,a??null)}return l}function J(e){const s=[],{cols:u,colStyles:n,colExtras:i}=e;if(u.sizes===null&&n===null&&i===null)return s;let t=null;for(let l=0;l<T;l++){const r=u.sizes!==null&&u.isCustom(l),m=n===null?0:n.get(l)??0,x=i===null?null:i.get(l)??null;if(!r&&!m&&x===null){t=null;continue}const a=u.isHidden(l);let y=u.sizeOf(l);if(a){const d=u.hiddenSizes.get(l);y=d<0?u.defaultSize:d}t&&t.px===y&&t.hidden===a&&t.style===m&&t.extra===x&&t.max===l-1?t.max=l:(t={min:l,max:l,px:y,hidden:a,style:m,extra:x,custom:r&&!a?!0:a},s.push(t))}return s}export{v as BLOCK_CELLS,H as CHUNK_SIZE,q as buildBlock,J as colRecords,P as newBlockBuffers};
package/io/plan.js CHANGED
@@ -1 +1 @@
1
- import{colRecords as o}from"./export-blocks.js";import"../core/address.js";import{richExtras as u}from"../cells/rich-xml.js";import{prepareDefaultsForSave as h}from"../cells/cell-defaults.js";import{tablePatch as f,tableXml as p}from"../core/tables.js";import{printNameEntries as g}from"../print/page-setup.js";import{notesWithAnchors as C}from"../cells/note-xml.js";import{autoFilterXml as w,filterNameEntries as x,sheetFilterXml as S,sheetProps as P}from"../cells/filter-file.js";import{bookViewPlan as y,sheetViewPlan as v}from"../cells/view-xml.js";import{backgroundPlan as N}from"../cells/background-xml.js";import{watermarkPlan as V}from"../api/watermark-xml.js";import{docPropsPlan as X}from"../cells/docprops-xml.js";import{namedStylesPlan as z}from"../cells/cell-styles-xml.js";import{dataConsolidateXml as R}from"../cells/consolidate-links.js";import{customSheetViewsXml as E,customWorkbookViewsXml as I,viewNameEntries as O}from"../core/custom-views.js";import{externalLinkPlan as A}from"../calcx/external-write.js";const c=e=>e.map(r=>{const a={};for(const l of Object.keys(r))l[0]!=="_"&&(a[l]=r[l]);return a});function D(e){for(const r of e.formulas.descriptors())if(r.typed&&(r.cm||r.tpl?.mayArray))return!0;return!1}function F(e){const r={};for(const a of Object.keys(e))a[0]!=="_"&&(r[a]=e[a]);return r}function M(e){return[...e.engine.names].map(([r,a])=>{const l=r.indexOf("!");return{name:a.name??(l>=0?r.slice(l+1):r),localSheetId:l>=0?Number(r.slice(0,l)):void 0,text:a.text,hidden:a.hidden,comment:a.comment}})}function T(e){if(!e.engine)return[];const r=[],a=[...e.engine.tables.values()];let l=a.reduce((n,i)=>Math.max(n,i.id??0),0)+1,s=1e3;const t=new Set([...a.map(n=>n.part),...(e.removedTables??[]).map(n=>n.part)]),m=()=>{let n;do n=`xl/tables/table${s++}.xml`;while(t.has(n));return t.add(n),n};for(const n of a){if(!n.dirty)continue;const i=e.sheets.indexOf(n.sheet);if(i<0)continue;n.id===void 0&&(n.id=l++);const d=n.part??m();n.part=d,r.push({part:d,sheetIndex:i,isNew:n.isNew===!0,xml:n.source&&!n.columnsChanged?null:p(n,n.id),patch:f(n)})}return r}function ee(e,r){h(e);const a=[];for(let t=r.strings;t<e.strings.size;t++)a.push(e.strings.get(t));const s=e.source!==null?e.styles.list.slice(r.styles):e.styles.list;return{bookView:y(e),docProps:X(e),namedStyles:z(e),activeSheet:e.activeSheet,formulasEdited:e.formulasEdited,dynamicArrays:e.sheets.some(t=>D(t)),newDxfs:(e.dxfs??[]).slice(e.sourceDxfs??0),definedNames:e.namesChanged?M(e):null,calcMode:e.calcModeChanged?e.calcMode:null,calcSettings:e.calcSettingsChanged?e.calcSettings:null,persons:e.personsChanged?e.persons:null,workbookProtection:e.protectionChanged?e.protection??{}:null,fileSharing:e.fileSharingChanged?e.fileSharing??{}:null,externalLinks:A(e),customViews:e.customViewsChanged||e.namesChanged&&e.customViews?.length?{workbookXml:I(e),names:O(e)}:null,workbookType:e.fileKind??null,tables:T(e),removedTables:e.removedTables??[],printNames:g(e.sheets),filterNames:x(e.sheets),themeXml:e.themeChanged?e.themeXml:null,extraStrings:a,extraRich:u(e.strings,r.strings),styles:s.map(F),sheets:e.sheets.map((t,m)=>({name:t.name,chartSheet:t.isChartSheet===!0,sourceIndex:t.sourceIndex!==void 0?t.sourceIndex:-1,tabColor:t.tabColorChanged?t.tabColor??"":null,hidden:t.hidden===!0,cols:o(t),colsChanged:t.colsChanged===!0,structureOps:t.structureOps??[],autoFilter:t.filterChanged?S(t):null,sheetProps:P(t),cf:t.cfChanged?c(t.cf??[]):null,validations:t.validationsChanged?c(t.validations??[]):null,hyperlinks:t.hyperlinksChanged?(t.hyperlinks??[]).map(({_ranges:n,...i})=>i):null,protection:t.protectionChanged?t.protection??!1:null,scenarios:t.scenariosChanged?t.scenarios??{items:[]}:null,dataConsolidate:t.dataConsolidateChanged?R(t.dataConsolidate):null,customSheetViews:e.customViewsChanged?E(e,t,n=>w(n,!1)):null,threads:t.threadsChanged?t.threads??[]:null,comments:t.commentsChanged?C(t):null,sparklines:t.sparklinesChanged?t.sparklines??[]:null,pageSetup:t.pageSetupChanged?t.pageSetup:null,viewChanged:t.viewChanged===!0,merges:t.merges,defaultHeight:t.rows.defaultSize,defaultsChanged:t.defaultsChanged===!0,frozenRows:t.frozenRows,frozenCols:t.frozenCols,showGridlines:t.showGridlines,rtl:t.rtl===!0,...v(t,e),sheetPicture:N(t,e),headerPicture:V(t,m),zoom:t.zoom,maxRow:t.maxRow,maxCol:t.maxCol,cellEstimate:(t.maxRow+1)*(t.maxCol+1)}))}}export{ee as buildPlan};
1
+ import{ignoredErrorsXml as c}from"./xlsx-tail.js";import{colRecords as u}from"./export-blocks.js";import"../core/address.js";import{richExtras as h}from"../cells/rich-xml.js";import{prepareDefaultsForSave as f}from"../cells/cell-defaults.js";import{tablePatch as p,tableXml as g}from"../core/tables.js";import{printNameEntries as C}from"../print/page-setup.js";import{notesWithAnchors as w}from"../cells/note-xml.js";import{autoFilterXml as x,filterNameEntries as S,sheetFilterXml as P,sheetProps as y}from"../cells/filter-file.js";import{bookViewPlan as v,sheetViewPlan as E}from"../cells/view-xml.js";import{backgroundPlan as N}from"../cells/background-xml.js";import{watermarkPlan as V}from"../api/watermark-xml.js";import{docPropsPlan as X}from"../cells/docprops-xml.js";import{namedStylesPlan as z}from"../cells/cell-styles-xml.js";import{dataConsolidateXml as R}from"../cells/consolidate-links.js";import{customSheetViewsXml as I,customWorkbookViewsXml as O,viewNameEntries as A}from"../core/custom-views.js";import{externalLinkPlan as D}from"../calcx/external-write.js";const o=t=>t.map(r=>{const a={};for(const l of Object.keys(r))l[0]!=="_"&&(a[l]=r[l]);return a});function F(t){for(const r of t.formulas.descriptors())if(r.typed&&(r.cm||r.tpl?.mayArray))return!0;return!1}function M(t){const r={};for(const a of Object.keys(t))a[0]!=="_"&&(r[a]=t[a]);return r}function T(t){return[...t.engine.names].map(([r,a])=>{const l=r.indexOf("!");return{name:a.name??(l>=0?r.slice(l+1):r),localSheetId:l>=0?Number(r.slice(0,l)):void 0,text:a.text,hidden:a.hidden,comment:a.comment}})}function H(t){if(!t.engine)return[];const r=[],a=[...t.engine.tables.values()];let l=a.reduce((n,i)=>Math.max(n,i.id??0),0)+1,s=1e3;const e=new Set([...a.map(n=>n.part),...(t.removedTables??[]).map(n=>n.part)]),d=()=>{let n;do n=`xl/tables/table${s++}.xml`;while(e.has(n));return e.add(n),n};for(const n of a){if(!n.dirty)continue;const i=t.sheets.indexOf(n.sheet);if(i<0)continue;n.id===void 0&&(n.id=l++);const m=n.part??d();n.part=m,r.push({part:m,sheetIndex:i,isNew:n.isNew===!0,xml:n.source&&!n.columnsChanged?null:g(n,n.id),patch:p(n)})}return r}function ne(t,r){f(t);const a=[];for(let e=r.strings;e<t.strings.size;e++)a.push(t.strings.get(e));const s=t.source!==null?t.styles.list.slice(r.styles):t.styles.list;return{bookView:v(t),docProps:X(t),namedStyles:z(t),activeSheet:t.activeSheet,formulasEdited:t.formulasEdited,dynamicArrays:t.sheets.some(e=>F(e)),newDxfs:(t.dxfs??[]).slice(t.sourceDxfs??0),definedNames:t.namesChanged?T(t):null,calcMode:t.calcModeChanged?t.calcMode:null,calcSettings:t.calcSettingsChanged?t.calcSettings:null,persons:t.personsChanged?t.persons:null,workbookProtection:t.protectionChanged?t.protection??{}:null,fileSharing:t.fileSharingChanged?t.fileSharing??{}:null,externalLinks:D(t),customViews:t.customViewsChanged||t.namesChanged&&t.customViews?.length?{workbookXml:O(t),names:A(t)}:null,workbookType:t.fileKind??null,tables:H(t),removedTables:t.removedTables??[],printNames:C(t.sheets),filterNames:S(t.sheets),themeXml:t.themeChanged?t.themeXml:null,extraStrings:a,extraRich:h(t.strings,r.strings),styles:s.map(M),sheets:t.sheets.map((e,d)=>({name:e.name,chartSheet:e.isChartSheet===!0,sourceIndex:e.sourceIndex!==void 0?e.sourceIndex:-1,tabColor:e.tabColorChanged?e.tabColor??"":null,hidden:e.hidden===!0,veryHidden:e.hidden===!0&&e.veryHidden===!0,cols:u(e),colsChanged:e.colsChanged===!0,structureOps:e.structureOps??[],autoFilter:e.filterChanged?P(e):null,sheetProps:y(e),cf:e.cfChanged?o(e.cf??[]):null,validations:e.validationsChanged?o(e.validations??[]):null,hyperlinks:e.hyperlinksChanged?(e.hyperlinks??[]).map(({_ranges:n,...i})=>i):null,protection:e.protectionChanged?e.protection??!1:null,scenarios:e.scenariosChanged?e.scenarios??{items:[]}:null,ignoredErrors:e.ignoredErrorsChanged?c(e.ignoredErrors):null,dataConsolidate:e.dataConsolidateChanged?R(e.dataConsolidate):null,customSheetViews:t.customViewsChanged?I(t,e,n=>x(n,!1)):null,threads:e.threadsChanged?e.threads??[]:null,comments:e.commentsChanged?w(e):null,sparklines:e.sparklinesChanged?e.sparklines??[]:null,pageSetup:e.pageSetupChanged?e.pageSetup:null,viewChanged:e.viewChanged===!0,merges:e.merges,defaultHeight:e.rows.defaultSize,defaultsChanged:e.defaultsChanged===!0,frozenRows:e.frozenRows,frozenCols:e.frozenCols,showGridlines:e.showGridlines,rtl:e.rtl===!0,...E(e,t),sheetPicture:N(e,t),headerPicture:V(e,d),zoom:e.zoom,maxRow:e.maxRow,maxCol:e.maxCol,cellEstimate:(e.maxRow+1)*(e.maxCol+1)}))}}export{ne as buildPlan};
@@ -0,0 +1,3 @@
1
+ function c(e){const n=e.replace(/"(?:[^"]|"")*(?:"|$)/g,"").split(/\r\n|[\r\n]/).slice(0,10);let r=",",t=0;for(const i of[",",";"," ","|"]){const o=n.map(l=>l.split(i).length-1),s=Math.min(...o.slice(0,Math.max(1,o.length-1)));s>t&&(r=i,t=s)}return r}function f(e){return[0,...e.filter(n=>n>0).sort((n,r)=>n-r)]}function u(e,n){const r=[];for(let t=0;t<n.length&&!(t>0&&n[t]>=e.length);t++)r.push(e.slice(n[t],n[t+1]).trim());return r}function h(e,n='"'){const r=[];let t=0,i=!1;for(let o=0;o<e.length;o++){const s=e[o];n&&s===n?i=!i:!i&&(s===`
2
+ `||s==="\r")&&(r.push(e.slice(t,o)),s==="\r"&&e[o+1]===`
3
+ `&&o++,t=o+1)}return t<e.length&&r.push(e.slice(t)),r}export{u as cutFixed,f as fixedCuts,c as sniffDelimiter,h as splitRecords};
package/io/xlsx-read.js CHANGED
@@ -1 +1 @@
1
- import{openZip as ce}from"./zip-reader.js";import{child as T,children as S,decodeRange as R,indexOfSeq as de,nameIs as x,parseAttrs as C,parseTree as P,unescapeOoxml as M,unescapeXml as L,XmlScanner as H}from"./xml-scan.js";import{relsPathOf as X,resolveTarget as A}from"./package-paths.js";import{parseStyles as fe,parseTheme as K,resolveColor as G}from"./xlsx-styles.js";import{parseComments as me,parseDxfs as ue,parseSheetFeatures as pe}from"./xlsx-tail.js";import{readSplitPane as we}from"../cells/view-xml.js";import{parseSparklines as ye}from"../core/sparklines.js";import{readSheetFilter as ge,readTableFilter as xe}from"../cells/filter-file.js";import{readRunProp as Te}from"../cells/rich-xml.js";import{applyCfExt as Se}from"../cells/cf-file.js";import{readSheetViewAttrs as Ne}from"../cells/view-xml.js";import{readExternalLinks as ve}from"../calcx/external-read.js";import{BOOL as Ie,EMPTY as Z,ERR as _e,ERRORS as Re,FORMULA as ke,NUM as Q,STR as ee}from"../core/sheet.js";import{parseRangeRef as te,MAX_COLS as $}from"../core/address.js";const F=65536,Pe=16384,se=65536,B=6,U=new TextEncoder;async function ie(c,e){const s=c.getReader();for(;;){const{done:t,value:n}=await s.read();if(t)return;const i=e(n);i!==void 0&&await i}}const j=new Float64Array(23);for(let c=0,e=1;c<23;c++,e*=10)j[c]=e;function O(c,e,s){let t=e,n=!1;c[t]===45?(n=!0,t++):c[t]===43&&t++;let i=0,o=0,l=0,a=t<s;for(;t<s;t++){const h=c[t]-48;if(h>=0&&h<=9)i=i*10+h,i!==0&&o++;else break}if(t<s&&c[t]===46)for(t++;t<s;t++){const h=c[t]-48;if(h>=0&&h<=9)i=i*10+h,i!==0&&o++,l++;else break}let u=0;if(t<s&&(c[t]===69||c[t]===101)){t++;let h=!1;for(c[t]===45?(h=!0,t++):c[t]===43&&t++;t<s;t++){const f=c[t]-48;if(f>=0&&f<=9)u=u*10+f;else{a=!1;break}}h&&(u=-u)}else t<s&&(a=!1);const d=u-l;if(a&&o<=15&&d>=-22&&d<=22){const h=d<0?i/j[-d]:i*j[d];return n?-h:h}return Number(R(c,e,s))}class Ce{constructor(e){this.sink=e,this.bytes=new Uint8Array(1<<20),this.len=0,this.offsets=new Uint32Array(se+1),this.count=0,this.total=0,this.rich=null}addRich(e,s){const t=this.bytes.subarray(this.offsets[this.count-1],this.offsets[this.count]),n=new TextDecoder;for(const i of s)i.at=n.decode(t.subarray(0,i.at)).length;(this.rich??=[]).push([e,s])}_reserve(e){if(this.len+e>this.bytes.length){const s=new Uint8Array(Math.max(this.bytes.length*2,this.len+e));s.set(this.bytes.subarray(0,this.len)),this.bytes=s}}appendXml(e,s,t){let n=!0;for(let i=s;i<t;i++){const o=e[i];if(o===38||o===95&&e[i+1]===120){n=!1;break}}if(n)this._reserve(t-s),this.bytes.set(e.subarray(s,t),this.len),this.len+=t-s;else{const i=U.encode(M(L(R(e,s,t))));this._reserve(i.length),this.bytes.set(i,this.len),this.len+=i.length}}appendText(e){const s=U.encode(e);this._reserve(s.length),this.bytes.set(s,this.len),this.len+=s.length}finish(){const e=this.total++;if(this.count++,this.count>=this.offsets.length){const s=new Uint32Array(this.offsets.length*2);s.set(this.offsets),this.offsets=s}return this.offsets[this.count]=this.len,e}get pending(){return this.count}flush(){if(this.count===0)return;const e=this.bytes.slice(0,this.len),s=this.offsets.slice(0,this.count+1);this.len=0,this.count=0,this.offsets[0]=0;const{rich:t}=this;return this.rich=null,this.sink.strings(e,s,t)}}const ae=new TextDecoder;class Me{constructor(e){this.pages=e,this.inT=!1,this.phonetic=0,this.runs=null,this.run=null,this.inProps=!1}_finish(){const e=this.pages.finish();this.runs!==null&&(this.pages.addRich(e,this.runs),this.runs=null)}open(e,s,t,n,i,o){const l=t-s;this.inProps?this._runProp(e,s,t,n,i):l===1&&e[s]===116?this.inT=!o&&this.phonetic===0:l===1&&e[s]===114&&!o&&this.phonetic===0?(this.run={at:this.pages.len-this.pages.offsets[this.pages.count]},(this.runs??=[]).push(this.run)):l===3&&x(e,s,t,"rPh")&&!o?this.phonetic++:l===3&&x(e,s,t,"rPr")&&!o&&this.run!==null?this.inProps=!0:l===2&&o&&x(e,s,t,"si")&&this._finish()}_runProp(e,s,t,n,i){const o=ae.decode(e.subarray(s,t)),l={};for(const a of ae.decode(e.subarray(n,i)).matchAll(/([\w:]+)="([^"]*)"/g))l[a[1]]=a[2];Te(this.run,o,l)}close(e,s,t){const n=t-s;n===1&&e[s]===116?this.inT=!1:n===2&&x(e,s,t,"si")?this._finish():n===3&&x(e,s,t,"rPh")?this.phonetic--:n===3&&x(e,s,t,"rPr")&&(this.inProps=!1)}text(e,s,t){this.inT&&this.pages.appendXml(e,s,t)}}function Ae(){return{count:0,rows:new Uint32Array(F),cols:new Uint16Array(F),kinds:new Uint8Array(F),values:new Float64Array(F),styles:new Uint16Array(F),formulas:null,valueMeta:null,rowMeta:null}}class be{constructor(e){this.ctx=e,this.scanner=null,this.batch=e.nextBatch(),this.row=-1,this.col=-1,this.style=0,this.type=0,this.typeLong=!1,this.kind=Z,this.value=0,this.inV=!1,this.inF=!1,this.inT=!1,this.inIs=!1,this.phonetic=0,this.formula=null,this.formulaText="",this.pendingText=null,this.flushes=[],this.sharedByIndex=new Map}open(e,s,t,n,i,o){const l=t-s;if(l===1){const a=e[s];a===99?this._cellOpen(e,n,i,o):a===118?this.inV=!o:a===102?this._formulaOpen(e,n,i,o):a===116&&this.inIs&&this.phonetic===0&&(this.inT=!o)}else l===3&&e[s]===114&&e[s+1]===111?this._rowOpen(e,n,i):l===2&&e[s]===105&&e[s+1]===115?(this.inIs=!o,this.pendingText=""):l===3&&x(e,s,t,"rPh")&&!o?this.phonetic++:l===9&&o&&x(e,s,t,"sheetData")&&(this.scanner.stopped=!0)}close(e,s,t){const n=t-s;if(n===1){const i=e[s];i===99?this._commit():i===118?this.inV=!1:i===102?this._formulaClose():i===116&&(this.inT=!1)}else n===2&&e[s]===105&&e[s+1]===115?this.inIs=!1:n===3&&x(e,s,t,"rPh")?this.phonetic--:n===9&&x(e,s,t,"sheetData")&&(this.scanner.stopped=!0)}text(e,s,t){this.inV?this._value(e,s,t):this.inF?this.formulaText+=R(e,s,t):this.inT&&(this.pendingText+=L(R(e,s,t)))}_rowOpen(e,s,t){let n=-1,i=0,o=0,l=!1,a=!1,u=null,d=s,h=-1;for(;d<t;){for(;d<t&&e[d]<=32;)d++;if(d>=t)break;const f=d;for(;d<t&&e[d]!==61;)d++;const g=d;d+=2;const p=d;for(;d<t&&e[d]!==34&&e[d]!==39;)d++;const w=d;d++;const m=g-f;if(m===1&&e[f]===114)h=O(e,p,w)-1;else if(m===1&&e[f]===115)o=O(e,p,w);else if(m===2&&e[f]===104&&e[f+1]===116)n=O(e,p,w);else if(m===6&&x(e,f,g,"hidden"))i=e[p]===49||e[p]===116?1:0;else if(m===12&&x(e,f,g,"customFormat"))l=e[p]===49||e[p]===116;else if(m===12&&x(e,f,g,"customHeight"))a=e[p]===49||e[p]===116;else if(!(m===5&&x(e,f,g,"spans"))){const I=R(e,f,w+1);u=u===null?I:`${u} ${I}`}}if(this.row=h>=0?h:this.row+1,this.col=-1,i||u!==null||l&&o||n>=0&&n!==this.ctx.defaultHeight){const f=this.batch;f.rowMeta===null&&(f.rowMeta=[]),f.rowMeta.push(this.row,n>=0?n:-1,i,l?o:0,a?1:0,u)}}_cellOpen(e,s,t,n){let i=-1,o=0,l=0,a=!1,u=0,d=0,h=s;for(;h<t;){for(;h<t&&e[h]<=32;)h++;if(h>=t)break;const f=e[h],g=e[h+1]===61,p=e[h+1]===109&&e[h+2]===61&&(f===99||f===118);for(;h<t&&e[h]!==61;)h++;if(h+=2,g&&f===114){let w=0,m=e[h];for(;m>=65&&m<=90;)w=w*26+m-64,m=e[++h];i=w-1;let I=0;for(;m>=48&&m<=57;)I=I*10+m-48,m=e[++h];I>0&&(this.row=I-1)}else if(g&&f===115){let w=0,m=e[h];for(;m>=48&&m<=57;)w=w*10+m-48,m=e[++h];o=w}else if(g&&f===116)l=e[h],a=e[h+1]!==34&&e[h+1]!==39;else if(p){let w=0,m=e[h];for(;m>=48&&m<=57;)w=w*10+m-48,m=e[++h];f===99?u=w:d=w}for(;h<t&&e[h]!==34&&e[h]!==39;)h++;h++}this.col=i>=0?i:this.col+1,this.style=o,this.type=l,this.typeLong=a,this.cm=u,this.vm=d,this.kind=Z,this.value=0,this.formula=null,this.pendingText=null,n&&this._commit()}_value(e,s,t){if(s!==t)switch(this.type){case 0:case 110:this.kind=Q,this.value=O(e,s,t);break;case 115:this.typeLong?this.pendingText=(this.pendingText??"")+L(R(e,s,t)):(this.kind=ee,this.value=O(e,s,t));break;case 98:this.kind=Ie,this.value=e[s]===49||e[s]===116?1:0;break;case 101:{const n=Re.indexOf(R(e,s,t));this.kind=_e,this.value=n<0?6:n;break}case 100:{const n=Date.parse(R(e,s,t));this.kind=Q,this.value=n/864e5+25569;break}default:{const n=R(e,s,t);this.pendingText=(this.pendingText??"")+L(n)}}}_formulaOpen(e,s,t,n){const i=C(e,s,t),o={};if(i.t&&(o.t=i.t),i.si!==void 0&&(o.si=Number(i.si)),i.ref&&(o.ref=i.ref),i.ca&&(o.ca=i.ca),i.t==="dataTable")for(const l of["dt2D","dtr","r1","r2","del1","del2"])i[l]!==void 0&&(o[l]=i[l]);else{const l=R(e,s,t).trim();l&&(o.raw=l)}this.formula=o,this.formulaText="",this.inF=!n,n&&o.t==="shared"&&this._resolveShared(o)}_formulaClose(){this.inF=!1;const e=this.formula;e!==null&&(this.formulaText&&(e.f=L(this.formulaText)),e.t==="shared"&&this._resolveShared(e))}_resolveShared(e){if(e.f!==void 0)e.base=this.row*$+this.col,this.sharedByIndex.set(e.si,e);else{const s=this.sharedByIndex.get(e.si);s!==void 0&&(s.child===void 0&&(s.child={t:"shared",si:e.si,sf:s.f,base:s.base}),this.formula=s.child)}}_commit(){let e=this.kind,s=this.value;this.pendingText!==null&&(s=this.ctx.addString(M(this.pendingText)),e=ee,this.pendingText=null);const t=this.batch,n=this.formula;if(n!==null)e|=ke,this.cm!==0&&(n.cm=this.cm),t.formulas===null&&(t.formulas=[]),t.formulas.push([this.row*$+this.col,n]);else if(e===Z&&this.style===0)return;this.vm!==0&&(t.valueMeta===null&&(t.valueMeta=[]),t.valueMeta.push([this.row*$+this.col,this.vm]));const i=t.count++;t.rows[i]=this.row,t.cols[i]=this.col,t.kinds[i]=e,t.values[i]=s,t.styles[i]=this.style,this.formula=null,(t.count===F||t.formulas!==null&&t.formulas.length>=Pe)&&(this.flushes.push(t),this.batch=this.ctx.nextBatch())}}function V(c){const e={defaultHeight:16,defaultWidth:65,cols:[],frozenRows:0,frozenCols:0,showGridlines:!0,zoom:1,tabColor:null};return new H({open(t,n,i,o,l){if(x(t,n,i,"outlinePr")){const a=C(t,o,l);e.summaryAbove=a.summaryBelow==="0"||a.summaryBelow==="false",e.outlineAutoStyles=a.applyStyles==="1"||a.applyStyles==="true",e.summaryLeft=a.summaryRight==="0"||a.summaryRight==="false"}else if(x(t,n,i,"tabColor")){const a=C(t,o,l);a.rgb?e.tabColor=`#${a.rgb.slice(-6)}`:e.tabColorRef=a}else if(x(t,n,i,"sheetFormatPr")){const a=C(t,o,l);a.defaultRowHeight&&(e.defaultHeight=Math.round(Number(a.defaultRowHeight))),a.defaultColWidth?e.defaultWidth=ne(Number(a.defaultColWidth)):e.defaultWidth=Number(a.baseColWidth??8)*B+5}else if(x(t,n,i,"col")){const a=C(t,o,l),u=[];for(const d of["bestFit","outlineLevel","collapsed","phonetic"])a[d]!==void 0&&u.push(`${d}="${a[d]}"`);e.cols.push({min:Number(a.min)-1,max:Math.min(Number(a.max)-1,$-1),width:a.width!==void 0?ne(Number(a.width)):-1,hidden:a.hidden==="1"||a.hidden==="true",style:Number(a.style??0),extra:u.length?u.join(" "):null})}else if(x(t,n,i,"sheetView")){const a=C(t,o,l);(a.showGridLines==="0"||a.showGridLines==="false")&&(e.showGridlines=!1),a.tabSelected==="1"&&(e.tabSelected=!0),(a.rightToLeft==="1"||a.rightToLeft==="true")&&(e.rtl=!0),a.zoomScale&&(e.zoom=Number(a.zoomScale)/100),Ne(a,e)}else if(x(t,n,i,"pane")){const a=C(t,o,l);a.state==="frozen"||a.state==="frozenSplit"?(e.frozenRows=Number(a.ySplit??0),e.frozenCols=Number(a.xSplit??0)):we(a,e)}},close(){},text(){}}).feed(U.encode(c)),e}function ne(c){return Math.trunc((256*c+Math.trunc(128/B))/256*B)}function Qe(c){return Math.trunc(c/B*256)/256}function Fe(c){const e=[];return c.indexOf("mergeCell")<0||new H({open(t,n,i,o,l){if(x(t,n,i,"mergeCell")){const a=te(C(t,o,l).ref??"");a&&e.push(a)}},close(){},text(){}}).feed(U.encode(c)),e}const Le=[..."sheetData"].map(c=>c.charCodeAt(0));async function Oe(c,e,s,t,n){let i=[],o=!1,l=null,a=null,u=null;const d=new TextDecoder,h=y=>{const v=V(y);return t.defaultHeight=v.defaultHeight,a=new be(t),u=new H(a),a.scanner=u,v},f=async()=>{if(a.flushes.length===0)return;const y=a.flushes;a.flushes=[];for(const v of y)await t.sendCells(s,v)};if(await ie(await c.stream(e),async y=>{if(l!==null){l.push(y);return}if(!o){i.push(y);const v=z(i),E=de(v,Le,0);if(E<0){i=[v];return}let b=E;for(;b>0&&v[b]!==60;)b--;const D=d.decode(v.subarray(0,b)),W=h(D);await n.sheetStart(s,{...W,head:D}),o=!0,y=v.subarray(b)}u.feed(y),await f(),u.stopped&&(l=[u.rest.slice()])}),o)await f();else{const y=d.decode(z(i));h(y),await n.sheetStart(s,{...V(y),head:y})}(a.batch.count>0||a.batch.rowMeta!==null)&&await t.sendCells(s,a.batch);const g=l===null?"":d.decode(z(l)),p=pe(g);p.sparklines=ye(g,y=>G(y,t.theme)),p.filter=ge(g),Se(p,g,y=>G(y,t.theme));const{comments:w,links:m,threads:I}=await Ee(c,e);p.threads=I;for(const y of p.hyperlinks)y.rid&&m.has(y.rid)&&(y.target=m.get(y.rid));await n.sheetEnd(s,{merges:Fe(g),tail:g,features:p,comments:w})}function z(c){if(c.length===1)return c[0];let e=0;for(const n of c)e+=n.length;const s=new Uint8Array(e);let t=0;for(const n of c)s.set(n,t),t+=n.length;return s}async function Ee(c,e){const s={comments:[],links:new Map,threads:[]},t=X(e);if(!c.has(t))return s;const n=P(await c.bytes(t));for(const i of S(n,"Relationship"))if(/\/hyperlink$/.test(i.a.Type))s.links.set(i.a.Id,i.a.Target);else if(/\/threadedComment$/.test(i.a.Type)){const o=A(e,i.a.Target);c.has(o)&&(s.threads=S(P(await c.bytes(o)),"threadedComment").map(l=>({id:l.a.id,ref:l.a.ref,personId:l.a.personId,date:l.a.dT??"",text:M(T(l,"text")?.t??""),parentId:l.a.parentId??null,done:l.a.done==="1",mentions:S(T(l,"mentions"),"mention").map(a=>({personId:a.a.mentionpersonId,id:a.a.mentionId,start:Number(a.a.startIndex),length:Number(a.a.length)}))})))}else if(/\/comments$/.test(i.a.Type)){const o=A(e,i.a.Target);c.has(o)&&(s.comments=me(await c.bytes(o)))}return s}async function De(c,e){const s=[];for(let t=0;t<e.length;t++){const n=e[t].part;if(!n)continue;const i=X(n);if(!c.has(i))continue;const o=P(await c.bytes(i));for(const l of S(o,"Relationship")){if(!/\/table$/.test(l.a.Type))continue;const a=A(n,l.a.Target);if(!c.has(a))continue;const u=await c.bytes(a),d=P(u),h=te(d.a.ref??"");if(!h)continue;const f=T(d,"tableStyleInfo")?.a??{};s.push({id:Number(d.a.id),part:a,source:!0,styleName:M(f.name??null),showRowStripes:f.showRowStripes!=="0",showColumnStripes:f.showColumnStripes==="1",showFirstColumn:f.showFirstColumn==="1",showLastColumn:f.showLastColumn==="1",hasFilter:T(d,"autoFilter")!==void 0,fileFilter:xe(u),name:d.a.displayName??d.a.name,sheetIndex:t,...h,headerRows:d.a.headerRowCount!==void 0?Number(d.a.headerRowCount):1,totalsRows:Number(d.a.totalsRowCount??0),columns:S(T(d,"tableColumns"),"tableColumn").map(g=>M(g.a.name))})}}return s}async function et(c,e){const s=await ce(c),t=P(await s.bytes("_rels/.rels")),n=S(t,"Relationship").find(r=>/officeDocument$/.test(r.a.Type));if(!n)throw new Error("This file has no workbook part");const i=A("",n.a.Target),o=P(await s.bytes(i)),l=X(i),a=P(await s.bytes(l)),u=new Map,d=new Set;let h=null,f=null,g=null;for(const r of S(a,"Relationship")){const N=A(i,r.a.Target);u.set(r.a.Id,N),/\/chartsheet$/.test(r.a.Type)&&d.add(r.a.Id),/\/sharedStrings$/.test(r.a.Type)?h=N:/\/styles$/.test(r.a.Type)?f=N:/\/theme$/.test(r.a.Type)&&(g=N)}const p=S(T(o,"sheets"),"sheet").map(r=>({name:M(r.a.name),rid:r.a.id,part:u.get(r.a.id),hidden:r.a.state==="hidden"||r.a.state==="veryHidden",sheetId:r.a.sheetId,chart:d.has(r.a.id)})),w=g&&s.has(g)?K(await s.bytes(g)):K(new TextEncoder().encode("<a/>")),m=f&&s.has(f)?fe(await s.bytes(f),w):[],I=Number(T(T(o,"bookViews"),"workbookView")?.a.activeTab??0),y=r=>/^Z_.*\.wvu\.[A-Za-z]+$/.test(r.a.name),v=S(T(o,"definedNames"),"definedName").filter(y).map(r=>({name:r.a.name,text:r.t,localSheetId:Number(r.a.localSheetId)})),E=S(T(o,"customWorkbookViews"),"customWorkbookView").map(r=>({...r.a})),b=S(T(o,"definedNames"),"definedName").filter(r=>!r.a.name.startsWith("_xlnm.")&&!y(r)).map(r=>({name:r.a.name,text:r.t,localSheetId:r.a.localSheetId!==void 0?Number(r.a.localSheetId):void 0,hidden:r.a.hidden==="1"||void 0,comment:M(r.a.comment)})),D=S(T(o,"definedNames"),"definedName").filter(r=>r.a.name==="_xlnm.Print_Area"||r.a.name==="_xlnm.Print_Titles").map(r=>({name:r.a.name,text:r.t,localSheetId:Number(r.a.localSheetId)})),W=S(T(o,"definedNames"),"definedName").filter(r=>r.a.name==="_xlnm._FilterDatabase"||r.a.name==="_xlnm.Criteria"||r.a.name==="_xlnm.Extract").map(r=>({name:r.a.name,text:r.t,localSheetId:Number(r.a.localSheetId)})),_=T(o,"calcPr")?.a??{},re=S(T(o,"pivotCaches"),"pivotCache").reduce((r,N)=>Math.max(r,Number(N.a.cacheId??0)),0),q={};if(f&&s.has(f))for(const r of S(T(P(await s.bytes(f)),"numFmts"),"numFmt"))q[r.a.numFmtId]=r.a.formatCode;const oe=await De(s,p),le=f&&s.has(f)?ue(await s.bytes(f),r=>G(r,w)):[];await e.meta({sheets:p,styles:m,activeTab:I,workbookPart:i,stringsPart:h,stylesPart:f,names:b,maxPivotCacheId:re,numFmts:q,workbookProtection:T(o,"workbookProtection")?.a??null,fileSharing:T(o,"fileSharing")?.a??null,persons:await He(s,a,i),printNames:D,filterNames:W,viewNames:v,customViews:E,tables:oe,theme:w,themeName:w.themeName,dxfs:le,fullCalcOnLoad:_.fullCalcOnLoad==="1"||_.fullCalcOnLoad==="true",manualCalc:_.calcMode==="manual",calcMode:_.calcMode??"auto",iterate:_.iterate==="1"||_.iterate==="true",iterateCount:_.iterateCount!==void 0?Number(_.iterateCount):100,iterateDelta:_.iterateDelta!==void 0?Number(_.iterateDelta):.001,externalLinks:await ve(s,o,a,i,{child:T,children:S,resolveTarget:A})});const k=new Ce(e);if(h&&s.has(h)){const r=new H(new Me(k));await ie(await s.stream(h),N=>{if(r.feed(N),k.pending>=se||k.len>=1<<22)return k.flush()})}await k.flush(),await e.stringsEnd?.(k.total);const Y=new Map,he={theme:w,defaultHeight:16,nextBatch:()=>e.recycle?.()??Ae(),addString(r){let N=Y.get(r);return N===void 0&&(k.appendText(r),N=k.finish(),Y.set(r,N)),N},async sendCells(r,N){await k.flush(),await e.cells(r,N)}};let J=0;for(let r=0;r<p.length;r++){if(p[r].chart){await e.sheetStart(r,{...V(""),head:"",chartSheet:!0}),await e.sheetEnd(r,{merges:[],tail:s.has(p[r].part)?new TextDecoder().decode(await s.bytes(p[r].part)):""});continue}if(!p[r].part||!s.has(p[r].part)){await e.sheetStart(r,{...V(""),head:""}),await e.sheetEnd(r,{merges:[],tail:""});continue}await Oe(s,p[r].part,r,he,e),J++}return{zip:s,sheets:p,workbookPart:i,wbRelsPath:l,stringsPart:h,stylesPart:f,sheetsRead:J}}async function He(c,e,s){const t=e?S(e,"Relationship").find(i=>/\/person$/.test(i.a.Type)):null,n=t?A(s,t.a.Target):"xl/persons/person.xml";return c.has(n)?S(P(await c.bytes(n)),"person").map(i=>{const o=M(i.a.displayName);return{displayName:o,id:i.a.id,userId:i.a.userId??o,providerId:i.a.providerId??"None"}}):[]}export{F as BATCH_CELLS,ie as pump,Qe as pxToWidth,et as readXlsx,A as resolveTarget,ne as widthToPx};
1
+ import{openZip as ce}from"./zip-reader.js";import{child as T,children as S,decodeRange as R,indexOfSeq as de,nameIs as x,parseAttrs as C,parseTree as P,unescapeOoxml as M,unescapeXml as L,XmlScanner as D}from"./xml-scan.js";import{relsPathOf as X,resolveTarget as A}from"./package-paths.js";import{parseStyles as fe,parseTheme as K,resolveColor as G}from"./xlsx-styles.js";import{parseComments as me,parseDxfs as ue,parseSheetFeatures as pe}from"./xlsx-tail.js";import{readSplitPane as we}from"../cells/view-xml.js";import{parseSparklines as ye}from"../core/sparklines.js";import{readSheetFilter as ge,readTableFilter as xe}from"../cells/filter-file.js";import{readRunProp as Te}from"../cells/rich-xml.js";import{applyCfExt as Se}from"../cells/cf-file.js";import{readSheetViewAttrs as Ne}from"../cells/view-xml.js";import{readExternalLinks as ve}from"../calcx/external-read.js";import{BOOL as Ie,EMPTY as Z,ERR as _e,ERRORS as Re,FORMULA as ke,NUM as Q,STR as ee}from"../core/sheet.js";import{parseRangeRef as te,MAX_COLS as $}from"../core/address.js";const F=65536,Pe=16384,se=65536,B=6,U=new TextEncoder;async function ie(c,e){const s=c.getReader();for(;;){const{done:t,value:r}=await s.read();if(t)return;const i=e(r);i!==void 0&&await i}}const j=new Float64Array(23);for(let c=0,e=1;c<23;c++,e*=10)j[c]=e;function O(c,e,s){let t=e,r=!1;c[t]===45?(r=!0,t++):c[t]===43&&t++;let i=0,o=0,l=0,a=t<s;for(;t<s;t++){const h=c[t]-48;if(h>=0&&h<=9)i=i*10+h,i!==0&&o++;else break}if(t<s&&c[t]===46)for(t++;t<s;t++){const h=c[t]-48;if(h>=0&&h<=9)i=i*10+h,i!==0&&o++,l++;else break}let u=0;if(t<s&&(c[t]===69||c[t]===101)){t++;let h=!1;for(c[t]===45?(h=!0,t++):c[t]===43&&t++;t<s;t++){const f=c[t]-48;if(f>=0&&f<=9)u=u*10+f;else{a=!1;break}}h&&(u=-u)}else t<s&&(a=!1);const d=u-l;if(a&&o<=15&&d>=-22&&d<=22){const h=d<0?i/j[-d]:i*j[d];return r?-h:h}return Number(R(c,e,s))}class Ce{constructor(e){this.sink=e,this.bytes=new Uint8Array(1<<20),this.len=0,this.offsets=new Uint32Array(se+1),this.count=0,this.total=0,this.rich=null}addRich(e,s){const t=this.bytes.subarray(this.offsets[this.count-1],this.offsets[this.count]),r=new TextDecoder;for(const i of s)i.at=r.decode(t.subarray(0,i.at)).length;(this.rich??=[]).push([e,s])}_reserve(e){if(this.len+e>this.bytes.length){const s=new Uint8Array(Math.max(this.bytes.length*2,this.len+e));s.set(this.bytes.subarray(0,this.len)),this.bytes=s}}appendXml(e,s,t){let r=!0;for(let i=s;i<t;i++){const o=e[i];if(o===38||o===95&&e[i+1]===120){r=!1;break}}if(r)this._reserve(t-s),this.bytes.set(e.subarray(s,t),this.len),this.len+=t-s;else{const i=U.encode(M(L(R(e,s,t))));this._reserve(i.length),this.bytes.set(i,this.len),this.len+=i.length}}appendText(e){const s=U.encode(e);this._reserve(s.length),this.bytes.set(s,this.len),this.len+=s.length}finish(){const e=this.total++;if(this.count++,this.count>=this.offsets.length){const s=new Uint32Array(this.offsets.length*2);s.set(this.offsets),this.offsets=s}return this.offsets[this.count]=this.len,e}get pending(){return this.count}flush(){if(this.count===0)return;const e=this.bytes.slice(0,this.len),s=this.offsets.slice(0,this.count+1);this.len=0,this.count=0,this.offsets[0]=0;const{rich:t}=this;return this.rich=null,this.sink.strings(e,s,t)}}const ae=new TextDecoder;class Me{constructor(e){this.pages=e,this.inT=!1,this.phonetic=0,this.runs=null,this.run=null,this.inProps=!1}_finish(){const e=this.pages.finish();this.runs!==null&&(this.pages.addRich(e,this.runs),this.runs=null)}open(e,s,t,r,i,o){const l=t-s;this.inProps?this._runProp(e,s,t,r,i):l===1&&e[s]===116?this.inT=!o&&this.phonetic===0:l===1&&e[s]===114&&!o&&this.phonetic===0?(this.run={at:this.pages.len-this.pages.offsets[this.pages.count]},(this.runs??=[]).push(this.run)):l===3&&x(e,s,t,"rPh")&&!o?this.phonetic++:l===3&&x(e,s,t,"rPr")&&!o&&this.run!==null?this.inProps=!0:l===2&&o&&x(e,s,t,"si")&&this._finish()}_runProp(e,s,t,r,i){const o=ae.decode(e.subarray(s,t)),l={};for(const a of ae.decode(e.subarray(r,i)).matchAll(/([\w:]+)="([^"]*)"/g))l[a[1]]=a[2];Te(this.run,o,l)}close(e,s,t){const r=t-s;r===1&&e[s]===116?this.inT=!1:r===2&&x(e,s,t,"si")?this._finish():r===3&&x(e,s,t,"rPh")?this.phonetic--:r===3&&x(e,s,t,"rPr")&&(this.inProps=!1)}text(e,s,t){this.inT&&this.pages.appendXml(e,s,t)}}function Ae(){return{count:0,rows:new Uint32Array(F),cols:new Uint16Array(F),kinds:new Uint8Array(F),values:new Float64Array(F),styles:new Uint16Array(F),formulas:null,valueMeta:null,rowMeta:null}}class be{constructor(e){this.ctx=e,this.scanner=null,this.batch=e.nextBatch(),this.row=-1,this.col=-1,this.style=0,this.type=0,this.typeLong=!1,this.kind=Z,this.value=0,this.inV=!1,this.inF=!1,this.inT=!1,this.inIs=!1,this.phonetic=0,this.formula=null,this.formulaText="",this.pendingText=null,this.flushes=[],this.sharedByIndex=new Map}open(e,s,t,r,i,o){const l=t-s;if(l===1){const a=e[s];a===99?this._cellOpen(e,r,i,o):a===118?this.inV=!o:a===102?this._formulaOpen(e,r,i,o):a===116&&this.inIs&&this.phonetic===0&&(this.inT=!o)}else l===3&&e[s]===114&&e[s+1]===111?this._rowOpen(e,r,i):l===2&&e[s]===105&&e[s+1]===115?(this.inIs=!o,this.pendingText=""):l===3&&x(e,s,t,"rPh")&&!o?this.phonetic++:l===9&&o&&x(e,s,t,"sheetData")&&(this.scanner.stopped=!0)}close(e,s,t){const r=t-s;if(r===1){const i=e[s];i===99?this._commit():i===118?this.inV=!1:i===102?this._formulaClose():i===116&&(this.inT=!1)}else r===2&&e[s]===105&&e[s+1]===115?this.inIs=!1:r===3&&x(e,s,t,"rPh")?this.phonetic--:r===9&&x(e,s,t,"sheetData")&&(this.scanner.stopped=!0)}text(e,s,t){this.inV?this._value(e,s,t):this.inF?this.formulaText+=R(e,s,t):this.inT&&(this.pendingText+=L(R(e,s,t)))}_rowOpen(e,s,t){let r=-1,i=0,o=0,l=!1,a=!1,u=null,d=s,h=-1;for(;d<t;){for(;d<t&&e[d]<=32;)d++;if(d>=t)break;const f=d;for(;d<t&&e[d]!==61;)d++;const g=d;d+=2;const p=d;for(;d<t&&e[d]!==34&&e[d]!==39;)d++;const w=d;d++;const m=g-f;if(m===1&&e[f]===114)h=O(e,p,w)-1;else if(m===1&&e[f]===115)o=O(e,p,w);else if(m===2&&e[f]===104&&e[f+1]===116)r=O(e,p,w);else if(m===6&&x(e,f,g,"hidden"))i=e[p]===49||e[p]===116?1:0;else if(m===12&&x(e,f,g,"customFormat"))l=e[p]===49||e[p]===116;else if(m===12&&x(e,f,g,"customHeight"))a=e[p]===49||e[p]===116;else if(!(m===5&&x(e,f,g,"spans"))){const I=R(e,f,w+1);u=u===null?I:`${u} ${I}`}}if(this.row=h>=0?h:this.row+1,this.col=-1,i||u!==null||l&&o||r>=0&&r!==this.ctx.defaultHeight){const f=this.batch;f.rowMeta===null&&(f.rowMeta=[]),f.rowMeta.push(this.row,r>=0?r:-1,i,l?o:0,a?1:0,u)}}_cellOpen(e,s,t,r){let i=-1,o=0,l=0,a=!1,u=0,d=0,h=s;for(;h<t;){for(;h<t&&e[h]<=32;)h++;if(h>=t)break;const f=e[h],g=e[h+1]===61,p=e[h+1]===109&&e[h+2]===61&&(f===99||f===118);for(;h<t&&e[h]!==61;)h++;if(h+=2,g&&f===114){let w=0,m=e[h];for(;m>=65&&m<=90;)w=w*26+m-64,m=e[++h];i=w-1;let I=0;for(;m>=48&&m<=57;)I=I*10+m-48,m=e[++h];I>0&&(this.row=I-1)}else if(g&&f===115){let w=0,m=e[h];for(;m>=48&&m<=57;)w=w*10+m-48,m=e[++h];o=w}else if(g&&f===116)l=e[h],a=e[h+1]!==34&&e[h+1]!==39;else if(p){let w=0,m=e[h];for(;m>=48&&m<=57;)w=w*10+m-48,m=e[++h];f===99?u=w:d=w}for(;h<t&&e[h]!==34&&e[h]!==39;)h++;h++}this.col=i>=0?i:this.col+1,this.style=o,this.type=l,this.typeLong=a,this.cm=u,this.vm=d,this.kind=Z,this.value=0,this.formula=null,this.pendingText=null,r&&this._commit()}_value(e,s,t){if(s!==t)switch(this.type){case 0:case 110:this.kind=Q,this.value=O(e,s,t);break;case 115:this.typeLong?this.pendingText=(this.pendingText??"")+L(R(e,s,t)):(this.kind=ee,this.value=O(e,s,t));break;case 98:this.kind=Ie,this.value=e[s]===49||e[s]===116?1:0;break;case 101:{const r=Re.indexOf(R(e,s,t));this.kind=_e,this.value=r<0?6:r;break}case 100:{const r=Date.parse(R(e,s,t));this.kind=Q,this.value=r/864e5+25569;break}default:{const r=R(e,s,t);this.pendingText=(this.pendingText??"")+L(r)}}}_formulaOpen(e,s,t,r){const i=C(e,s,t),o={};if(i.t&&(o.t=i.t),i.si!==void 0&&(o.si=Number(i.si)),i.ref&&(o.ref=i.ref),i.ca&&(o.ca=i.ca),i.t==="dataTable")for(const l of["dt2D","dtr","r1","r2","del1","del2"])i[l]!==void 0&&(o[l]=i[l]);else{const l=R(e,s,t).trim();l&&(o.raw=l)}this.formula=o,this.formulaText="",this.inF=!r,r&&o.t==="shared"&&this._resolveShared(o)}_formulaClose(){this.inF=!1;const e=this.formula;e!==null&&(this.formulaText&&(e.f=L(this.formulaText)),e.t==="shared"&&this._resolveShared(e))}_resolveShared(e){if(e.f!==void 0)e.base=this.row*$+this.col,this.sharedByIndex.set(e.si,e);else{const s=this.sharedByIndex.get(e.si);s!==void 0&&(s.child===void 0&&(s.child={t:"shared",si:e.si,sf:s.f,base:s.base}),this.formula=s.child)}}_commit(){let e=this.kind,s=this.value;this.pendingText!==null&&(s=this.ctx.addString(M(this.pendingText)),e=ee,this.pendingText=null);const t=this.batch,r=this.formula;if(r!==null)e|=ke,this.cm!==0&&(r.cm=this.cm),t.formulas===null&&(t.formulas=[]),t.formulas.push([this.row*$+this.col,r]);else if(e===Z&&this.style===0)return;this.vm!==0&&(t.valueMeta===null&&(t.valueMeta=[]),t.valueMeta.push([this.row*$+this.col,this.vm]));const i=t.count++;t.rows[i]=this.row,t.cols[i]=this.col,t.kinds[i]=e,t.values[i]=s,t.styles[i]=this.style,this.formula=null,(t.count===F||t.formulas!==null&&t.formulas.length>=Pe)&&(this.flushes.push(t),this.batch=this.ctx.nextBatch())}}function V(c){const e={defaultHeight:16,defaultWidth:65,cols:[],frozenRows:0,frozenCols:0,showGridlines:!0,zoom:1,tabColor:null};return new D({open(t,r,i,o,l){if(x(t,r,i,"outlinePr")){const a=C(t,o,l);e.summaryAbove=a.summaryBelow==="0"||a.summaryBelow==="false",e.outlineAutoStyles=a.applyStyles==="1"||a.applyStyles==="true",e.summaryLeft=a.summaryRight==="0"||a.summaryRight==="false"}else if(x(t,r,i,"tabColor")){const a=C(t,o,l);a.rgb?e.tabColor=`#${a.rgb.slice(-6)}`:e.tabColorRef=a}else if(x(t,r,i,"sheetFormatPr")){const a=C(t,o,l);a.defaultRowHeight&&(e.defaultHeight=Math.round(Number(a.defaultRowHeight))),a.defaultColWidth?e.defaultWidth=ne(Number(a.defaultColWidth)):e.defaultWidth=Number(a.baseColWidth??8)*B+5}else if(x(t,r,i,"col")){const a=C(t,o,l),u=[];for(const d of["bestFit","outlineLevel","collapsed","phonetic"])a[d]!==void 0&&u.push(`${d}="${a[d]}"`);e.cols.push({min:Number(a.min)-1,max:Math.min(Number(a.max)-1,$-1),width:a.width!==void 0?ne(Number(a.width)):-1,hidden:a.hidden==="1"||a.hidden==="true",style:Number(a.style??0),extra:u.length?u.join(" "):null})}else if(x(t,r,i,"sheetView")){const a=C(t,o,l);(a.showGridLines==="0"||a.showGridLines==="false")&&(e.showGridlines=!1),a.tabSelected==="1"&&(e.tabSelected=!0),(a.rightToLeft==="1"||a.rightToLeft==="true")&&(e.rtl=!0),a.zoomScale&&(e.zoom=Number(a.zoomScale)/100),Ne(a,e)}else if(x(t,r,i,"pane")){const a=C(t,o,l);a.state==="frozen"||a.state==="frozenSplit"?(e.frozenRows=Number(a.ySplit??0),e.frozenCols=Number(a.xSplit??0)):we(a,e)}},close(){},text(){}}).feed(U.encode(c)),e}function ne(c){return Math.trunc((256*c+Math.trunc(128/B))/256*B)}function Qe(c){return Math.trunc(c/B*256)/256}function Fe(c){const e=[];return c.indexOf("mergeCell")<0||new D({open(t,r,i,o,l){if(x(t,r,i,"mergeCell")){const a=te(C(t,o,l).ref??"");a&&e.push(a)}},close(){},text(){}}).feed(U.encode(c)),e}const Le=[..."sheetData"].map(c=>c.charCodeAt(0));async function Oe(c,e,s,t,r){let i=[],o=!1,l=null,a=null,u=null;const d=new TextDecoder,h=y=>{const v=V(y);return t.defaultHeight=v.defaultHeight,a=new be(t),u=new D(a),a.scanner=u,v},f=async()=>{if(a.flushes.length===0)return;const y=a.flushes;a.flushes=[];for(const v of y)await t.sendCells(s,v)};if(await ie(await c.stream(e),async y=>{if(l!==null){l.push(y);return}if(!o){i.push(y);const v=z(i),E=de(v,Le,0);if(E<0){i=[v];return}let b=E;for(;b>0&&v[b]!==60;)b--;const H=d.decode(v.subarray(0,b)),W=h(H);await r.sheetStart(s,{...W,head:H}),o=!0,y=v.subarray(b)}u.feed(y),await f(),u.stopped&&(l=[u.rest.slice()])}),o)await f();else{const y=d.decode(z(i));h(y),await r.sheetStart(s,{...V(y),head:y})}(a.batch.count>0||a.batch.rowMeta!==null)&&await t.sendCells(s,a.batch);const g=l===null?"":d.decode(z(l)),p=pe(g);p.sparklines=ye(g,y=>G(y,t.theme)),p.filter=ge(g),Se(p,g,y=>G(y,t.theme));const{comments:w,links:m,threads:I}=await Ee(c,e);p.threads=I;for(const y of p.hyperlinks)y.rid&&m.has(y.rid)&&(y.target=m.get(y.rid));await r.sheetEnd(s,{merges:Fe(g),tail:g,features:p,comments:w})}function z(c){if(c.length===1)return c[0];let e=0;for(const r of c)e+=r.length;const s=new Uint8Array(e);let t=0;for(const r of c)s.set(r,t),t+=r.length;return s}async function Ee(c,e){const s={comments:[],links:new Map,threads:[]},t=X(e);if(!c.has(t))return s;const r=P(await c.bytes(t));for(const i of S(r,"Relationship"))if(/\/hyperlink$/.test(i.a.Type))s.links.set(i.a.Id,i.a.Target);else if(/\/threadedComment$/.test(i.a.Type)){const o=A(e,i.a.Target);c.has(o)&&(s.threads=S(P(await c.bytes(o)),"threadedComment").map(l=>({id:l.a.id,ref:l.a.ref,personId:l.a.personId,date:l.a.dT??"",text:M(T(l,"text")?.t??""),parentId:l.a.parentId??null,done:l.a.done==="1",mentions:S(T(l,"mentions"),"mention").map(a=>({personId:a.a.mentionpersonId,id:a.a.mentionId,start:Number(a.a.startIndex),length:Number(a.a.length)}))})))}else if(/\/comments$/.test(i.a.Type)){const o=A(e,i.a.Target);c.has(o)&&(s.comments=me(await c.bytes(o)))}return s}async function He(c,e){const s=[];for(let t=0;t<e.length;t++){const r=e[t].part;if(!r)continue;const i=X(r);if(!c.has(i))continue;const o=P(await c.bytes(i));for(const l of S(o,"Relationship")){if(!/\/table$/.test(l.a.Type))continue;const a=A(r,l.a.Target);if(!c.has(a))continue;const u=await c.bytes(a),d=P(u),h=te(d.a.ref??"");if(!h)continue;const f=T(d,"tableStyleInfo")?.a??{};s.push({id:Number(d.a.id),part:a,source:!0,styleName:M(f.name??null),showRowStripes:f.showRowStripes!=="0",showColumnStripes:f.showColumnStripes==="1",showFirstColumn:f.showFirstColumn==="1",showLastColumn:f.showLastColumn==="1",hasFilter:T(d,"autoFilter")!==void 0,fileFilter:xe(u),name:d.a.displayName??d.a.name,sheetIndex:t,...h,headerRows:d.a.headerRowCount!==void 0?Number(d.a.headerRowCount):1,totalsRows:Number(d.a.totalsRowCount??0),columns:S(T(d,"tableColumns"),"tableColumn").map(g=>M(g.a.name))})}}return s}async function et(c,e){const s=await ce(c),t=P(await s.bytes("_rels/.rels")),r=S(t,"Relationship").find(n=>/officeDocument$/.test(n.a.Type));if(!r)throw new Error("This file has no workbook part");const i=A("",r.a.Target),o=P(await s.bytes(i)),l=X(i),a=P(await s.bytes(l)),u=new Map,d=new Set;let h=null,f=null,g=null;for(const n of S(a,"Relationship")){const N=A(i,n.a.Target);u.set(n.a.Id,N),/\/chartsheet$/.test(n.a.Type)&&d.add(n.a.Id),/\/sharedStrings$/.test(n.a.Type)?h=N:/\/styles$/.test(n.a.Type)?f=N:/\/theme$/.test(n.a.Type)&&(g=N)}const p=S(T(o,"sheets"),"sheet").map(n=>({name:M(n.a.name),rid:n.a.id,part:u.get(n.a.id),hidden:n.a.state==="hidden"||n.a.state==="veryHidden",veryHidden:n.a.state==="veryHidden",sheetId:n.a.sheetId,chart:d.has(n.a.id)})),w=g&&s.has(g)?K(await s.bytes(g)):K(new TextEncoder().encode("<a/>")),m=f&&s.has(f)?fe(await s.bytes(f),w):[],I=Number(T(T(o,"bookViews"),"workbookView")?.a.activeTab??0),y=n=>/^Z_.*\.wvu\.[A-Za-z]+$/.test(n.a.name),v=S(T(o,"definedNames"),"definedName").filter(y).map(n=>({name:n.a.name,text:n.t,localSheetId:Number(n.a.localSheetId)})),E=S(T(o,"customWorkbookViews"),"customWorkbookView").map(n=>({...n.a})),b=S(T(o,"definedNames"),"definedName").filter(n=>!n.a.name.startsWith("_xlnm.")&&!y(n)).map(n=>({name:n.a.name,text:n.t,localSheetId:n.a.localSheetId!==void 0?Number(n.a.localSheetId):void 0,hidden:n.a.hidden==="1"||void 0,comment:M(n.a.comment)})),H=S(T(o,"definedNames"),"definedName").filter(n=>n.a.name==="_xlnm.Print_Area"||n.a.name==="_xlnm.Print_Titles").map(n=>({name:n.a.name,text:n.t,localSheetId:Number(n.a.localSheetId)})),W=S(T(o,"definedNames"),"definedName").filter(n=>n.a.name==="_xlnm._FilterDatabase"||n.a.name==="_xlnm.Criteria"||n.a.name==="_xlnm.Extract").map(n=>({name:n.a.name,text:n.t,localSheetId:Number(n.a.localSheetId)})),_=T(o,"calcPr")?.a??{},re=S(T(o,"pivotCaches"),"pivotCache").reduce((n,N)=>Math.max(n,Number(N.a.cacheId??0)),0),q={};if(f&&s.has(f))for(const n of S(T(P(await s.bytes(f)),"numFmts"),"numFmt"))q[n.a.numFmtId]=n.a.formatCode;const oe=await He(s,p),le=f&&s.has(f)?ue(await s.bytes(f),n=>G(n,w)):[];await e.meta({sheets:p,styles:m,activeTab:I,workbookPart:i,stringsPart:h,stylesPart:f,names:b,maxPivotCacheId:re,numFmts:q,workbookProtection:T(o,"workbookProtection")?.a??null,fileSharing:T(o,"fileSharing")?.a??null,persons:await De(s,a,i),printNames:H,filterNames:W,viewNames:v,customViews:E,tables:oe,theme:w,themeName:w.themeName,dxfs:le,fullCalcOnLoad:_.fullCalcOnLoad==="1"||_.fullCalcOnLoad==="true",manualCalc:_.calcMode==="manual",calcMode:_.calcMode??"auto",iterate:_.iterate==="1"||_.iterate==="true",iterateCount:_.iterateCount!==void 0?Number(_.iterateCount):100,iterateDelta:_.iterateDelta!==void 0?Number(_.iterateDelta):.001,externalLinks:await ve(s,o,a,i,{child:T,children:S,resolveTarget:A})});const k=new Ce(e);if(h&&s.has(h)){const n=new D(new Me(k));await ie(await s.stream(h),N=>{if(n.feed(N),k.pending>=se||k.len>=1<<22)return k.flush()})}await k.flush(),await e.stringsEnd?.(k.total);const Y=new Map,he={theme:w,defaultHeight:16,nextBatch:()=>e.recycle?.()??Ae(),addString(n){let N=Y.get(n);return N===void 0&&(k.appendText(n),N=k.finish(),Y.set(n,N)),N},async sendCells(n,N){await k.flush(),await e.cells(n,N)}};let J=0;for(let n=0;n<p.length;n++){if(p[n].chart){await e.sheetStart(n,{...V(""),head:"",chartSheet:!0}),await e.sheetEnd(n,{merges:[],tail:s.has(p[n].part)?new TextDecoder().decode(await s.bytes(p[n].part)):""});continue}if(!p[n].part||!s.has(p[n].part)){await e.sheetStart(n,{...V(""),head:""}),await e.sheetEnd(n,{merges:[],tail:""});continue}await Oe(s,p[n].part,n,he,e),J++}return{zip:s,sheets:p,workbookPart:i,wbRelsPath:l,stringsPart:h,stylesPart:f,sheetsRead:J}}async function De(c,e,s){const t=e?S(e,"Relationship").find(i=>/\/person$/.test(i.a.Type)):null,r=t?A(s,t.a.Target):"xl/persons/person.xml";return c.has(r)?S(P(await c.bytes(r)),"person").map(i=>{const o=M(i.a.displayName);return{displayName:o,id:i.a.id,userId:i.a.userId??o,providerId:i.a.providerId??"None"}}):[]}export{F as BATCH_CELLS,ie as pump,Qe as pxToWidth,et as readXlsx,A as resolveTarget,ne as widthToPx};
package/io/xlsx-tail.js CHANGED
@@ -1 +1 @@
1
- import{child as n,children as m,parseTree as g,unescapeOoxml as c}from"./xml-scan.js";import{escapeMarkup as $,xmlAttr as d}from"./xml-escape.js";import{cfvoXml as y,colorAttrs as x,dxfToXml as b,extendRule as k,maskCfBlocks as v,parseDxfList as V}from"../cells/cf-file.js";const D=new TextEncoder,p=e=>e==="1"||e==="true";function T(e){const o=e.replace(/<\/(?:\w+:)?worksheet>\s*$/,"");return g(D.encode(`<root xmlns:r="r" xmlns:x14="x" xmlns:mc="m" xmlns:xm="m" xmlns:xr="x">${o}</root>`))}function A(e){const o={cf:[],validations:[],hyperlinks:[],protection:null};if(!e)return o;let t;try{t=T(e)}catch{return o}for(const a of m(t,"conditionalFormatting")){const h=m(a,"cfRule").map(w=>k(P(w),w));o.cf.push({sqref:a.a.sqref??"",rules:h,...p(a.a.pivot)?{pivot:!0}:{}})}const r=n(t,"dataValidations");for(const a of m(r,"dataValidation"))o.validations.push({sqref:a.a.sqref??"",type:a.a.type??"none",operator:a.a.operator??"between",formula1:n(a,"formula1")?.t??"",formula2:n(a,"formula2")?.t??"",allowBlank:p(a.a.allowBlank),showDropDown:!p(a.a.showDropDown),showError:p(a.a.showErrorMessage),showPrompt:p(a.a.showInputMessage),errorStyle:a.a.errorStyle??"stop",errorTitle:c(a.a.errorTitle??""),error:c(a.a.error??""),promptTitle:c(a.a.promptTitle??""),prompt:c(a.a.prompt??"")});for(const a of m(n(t,"hyperlinks"),"hyperlink"))o.hyperlinks.push({ref:a.a.ref,rid:a.a.id??null,location:a.a.location??null,display:c(a.a.display??null),tooltip:c(a.a.tooltip??null)});const i=n(t,"sheetProtection");i&&(o.protection={...i.a});const l=m(n(t,"customSheetViews"),"customSheetView");l.length&&(o.customSheetViews=l.map(a=>{const h=n(a,"pane"),w=n(a,"selection");return{...a.a,xSplit:h?.a.state==="frozen"?h.a.xSplit:void 0,ySplit:h?.a.state==="frozen"?h.a.ySplit:void 0,activeCell:w?.a.activeCell,sqref:w?.a.sqref}}));const s=n(t,"picture");s&&(o.pictureRid=s.a["r:id"]??s.a.id??null);const f=n(t,"legacyDrawingHF");f&&(o.headerPictureRid=f.a["r:id"]??f.a.id??null);const u=n(t,"scenarios");return u&&(o.scenarios={current:Number(u.a.current??0),show:Number(u.a.show??0),items:m(u,"scenario").map(a=>({name:c(a.a.name),user:c(a.a.user??""),comment:c(a.a.comment??""),locked:a.a.locked==="1",hidden:a.a.hidden==="1",cells:m(a,"inputCells").map(h=>({r:h.a.r,val:c(h.a.val??"")}))}))}),o}function P(e){const o=e.a,t={type:o.type,priority:Number(o.priority??0),dxfId:o.dxfId!==void 0?Number(o.dxfId):null,operator:o.operator??null,formulas:m(e,"formula").map(f=>f.t),text:c(o.text??null),rank:o.rank!==void 0?Number(o.rank):null,percent:p(o.percent),bottom:p(o.bottom),aboveAverage:o.aboveAverage===void 0?!0:p(o.aboveAverage),equalAverage:p(o.equalAverage),stdDev:o.stdDev!==void 0?Number(o.stdDev):0,stopIfTrue:p(o.stopIfTrue),timePeriod:o.timePeriod??null},r=f=>m(f,"cfvo").map(u=>({type:u.a.type,val:u.a.val??null,gte:u.a.gte===void 0?!0:p(u.a.gte)})),i=n(e,"colorScale");i&&(t.colorScale={cfvo:r(i),colors:m(i,"color").map(f=>f.a)});const l=n(e,"dataBar");l&&(t.dataBar={cfvo:r(l),color:n(l,"color")?.a??null,showValue:l.a.showValue===void 0?!0:p(l.a.showValue)});const s=n(e,"iconSet");return s&&(t.iconSet={name:s.a.iconSet??"3TrafficLights1",cfvo:r(s),reverse:p(s.a.reverse),showValue:s.a.showValue===void 0?!0:p(s.a.showValue)}),t}function B(e){let o=`type="${e.type}" priority="${e.priority}"`;e.dxfId!==null&&e.dxfId!==void 0&&(o+=` dxfId="${e.dxfId}"`),e.stopIfTrue&&(o+=' stopIfTrue="1"'),e.operator&&(o+=` operator="${e.operator}"`),e.text!==null&&e.text!==void 0&&(o+=` text="${d(e.text)}"`),e.rank!==null&&e.rank!==void 0&&(o+=` rank="${e.rank}"`),e.percent&&(o+=' percent="1"'),e.bottom&&(o+=' bottom="1"'),e.type==="aboveAverage"&&(e.aboveAverage===!1&&(o+=' aboveAverage="0"'),e.equalAverage&&(o+=' equalAverage="1"'),e.stdDev&&(o+=` stdDev="${e.stdDev}"`)),e.timePeriod&&(o+=` timePeriod="${e.timePeriod}"`);let t=(e.formulas??[]).map(r=>`<formula>${$(r)}</formula>`).join("");return e.colorScale&&(t+=`<colorScale>${y(e.colorScale.cfvo)}${e.colorScale.colors.map(r=>`<color ${x(r)}/>`).join("")}</colorScale>`),e.dataBar&&(t+=`<dataBar${e.dataBar.showValue?"":' showValue="0"'}>${y(e.dataBar.cfvo)}<color ${x(e.dataBar.color)}/></dataBar>`),e.iconSet&&(t+=`<iconSet iconSet="${e.iconSet.name}"${e.iconSet.reverse?' reverse="1"':""}${e.iconSet.showValue?"":' showValue="0"'}>${y(e.iconSet.cfvo)}</iconSet>`),`<cfRule ${o}>${t}</cfRule>`}const F=e=>e.map(o=>`<conditionalFormatting${o.pivot?' pivot="1"':""} sqref="${$(o.sqref)}">${o.rules.map(B).join("")}</conditionalFormatting>`).join("");function E(e){if(e.length===0)return"";const o=e.map(t=>{let r=`type="${t.type}"`;return t.errorStyle&&t.errorStyle!=="stop"&&(r+=` errorStyle="${t.errorStyle}"`),t.operator&&t.operator!=="between"&&(r+=` operator="${t.operator}"`),t.allowBlank&&(r+=' allowBlank="1"'),t.showDropDown===!1&&(r+=' showDropDown="1"'),t.showPrompt&&(r+=' showInputMessage="1"'),t.showError&&(r+=' showErrorMessage="1"'),t.errorTitle&&(r+=` errorTitle="${d(t.errorTitle)}"`),t.error&&(r+=` error="${d(t.error)}"`),t.promptTitle&&(r+=` promptTitle="${d(t.promptTitle)}"`),t.prompt&&(r+=` prompt="${d(t.prompt)}"`),r+=` sqref="${$(t.sqref)}"`,`<dataValidation ${r}>${t.formula1?`<formula1>${$(t.formula1)}</formula1>`:""}${t.formula2?`<formula2>${$(t.formula2)}</formula2>`:""}</dataValidation>`});return`<dataValidations count="${e.length}">${o.join("")}</dataValidations>`}const C=e=>e.length===0?"":`<hyperlinks>${e.map(o=>{let t=`ref="${$(o.ref)}"`;return o.rid&&(t+=` r:id="${$(o.rid)}"`),o.location&&(t+=` location="${$(o.location)}"`),o.display&&(t+=` display="${d(o.display)}"`),o.tooltip&&(t+=` tooltip="${d(o.tooltip)}"`),`<hyperlink ${t}/>`}).join("")}</hyperlinks>`;function N(e){if(!e||e.items.length===0)return"";const o=e.items.map(t=>`<scenario name="${d(t.name)}"${t.locked?' locked="1"':""}${t.hidden?' hidden="1"':""} count="${t.cells.length}" user="${d(t.user||"User")}"${t.comment?` comment="${d(t.comment)}"`:""}>${t.cells.map(r=>`<inputCells r="${r.r}" val="${d(r.val)}"/>`).join("")}</scenario>`).join("");return`<scenarios current="${e.current??0}" show="${e.show??0}">${o}</scenarios>`}function X(e){return e?`<sheetProtection ${Object.entries(e).map(([o,t])=>`${o}="${$(t)}"`).join(" ")}/>`:""}const S=["sheetCalcPr","sheetProtection","protectedRanges","scenarios","autoFilter","sortState","dataConsolidate","customSheetViews","mergeCells","phoneticPr","conditionalFormatting","dataValidations","hyperlinks","printOptions","pageMargins","pageSetup","headerFooter","rowBreaks","colBreaks","customProperties","cellWatches","ignoredErrors","smartTags","drawing","legacyDrawing","legacyDrawingHF","drawingHF","picture","oleObjects","controls","webPublishItems","tableParts","extLst"];function O(e,o,t){const r=new RegExp(`<${o}\\b[^>]*?(?:/>|>[\\s\\S]*?</${o}>)`,"g");let i=e.replace(r,"");if(!t)return i;const l=S.slice(S.indexOf(o)+1).join("|"),s=new RegExp(`<(?:${l})\\b|</worksheet>`).exec(v(i)),f=s?s.index:i.length;return i=i.slice(0,f)+t+i.slice(f),i}function I(e){const o=n(n(e,"r"),"rPr");if(!o)return{};const t={},r=n(o,"sz")?.a.val;r&&r!=="9"&&r!=="10"&&(t.fontSize=Number(r));const i=n(o,"rFont")?.a.val;i&&i!=="Tahoma"&&(t.fontName=i);const l=n(o,"color")?.a.rgb;return l&&(t.color=`#${l.slice(-6)}`),Object.keys(t).length?{style:t}:{}}function M(e){const o=g(e),t=m(n(o,"authors"),"author").map(r=>c(r.t));return m(n(o,"commentList"),"comment").map(r=>{const i=n(r,"text");let l="";for(const s of i.c)s.n==="t"?l+=c(s.t):s.n==="r"&&(l+=c(n(s,"t")?.t??""));return{ref:r.a.ref,author:t[Number(r.a.authorId??0)]??"",text:l,...I(i)}})}const z=(e,o)=>V(g(e),o),L=e=>e.raw??b(e);export{F as cfXml,L as dxfXml,C as hyperlinksXml,M as parseComments,z as parseDxfs,A as parseSheetFeatures,X as protectionXml,O as replaceElement,B as ruleXml,N as scenariosXml,E as validationsXml};
1
+ import{child as n,children as f,parseTree as y,unescapeOoxml as c}from"./xml-scan.js";import{escapeMarkup as h,xmlAttr as d}from"./xml-escape.js";import{cfvoXml as x,colorAttrs as S,dxfToXml as k,extendRule as v,maskCfBlocks as V,parseDxfList as D}from"../cells/cf-file.js";const T=new TextEncoder,p=e=>e==="1"||e==="true";function P(e){const o=e.replace(/<\/(?:\w+:)?worksheet>\s*$/,"");return y(T.encode(`<root xmlns:r="r" xmlns:x14="x" xmlns:mc="m" xmlns:xm="m" xmlns:xr="x">${o}</root>`))}function A(e){if(!e?.length)return"";const o=t=>String(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;");return`<ignoredErrors>${e.map(t=>`<ignoredError${Object.entries(t).map(([r,i])=>` ${r}="${o(i===!0?"1":i)}"`).join("")}/>`).join("")}</ignoredErrors>`}function F(e){const o={cf:[],validations:[],hyperlinks:[],protection:null};if(!e)return o;let t;try{t=P(e)}catch{return o}for(const a of f(t,"conditionalFormatting")){const u=f(a,"cfRule").map(g=>v(E(g),g));o.cf.push({sqref:a.a.sqref??"",rules:u,...p(a.a.pivot)?{pivot:!0}:{}})}const r=n(t,"dataValidations");for(const a of f(r,"dataValidation"))o.validations.push({sqref:a.a.sqref??"",type:a.a.type??"none",operator:a.a.operator??"between",formula1:n(a,"formula1")?.t??"",formula2:n(a,"formula2")?.t??"",allowBlank:p(a.a.allowBlank),showDropDown:!p(a.a.showDropDown),showError:p(a.a.showErrorMessage),showPrompt:p(a.a.showInputMessage),errorStyle:a.a.errorStyle??"stop",errorTitle:c(a.a.errorTitle??""),error:c(a.a.error??""),promptTitle:c(a.a.promptTitle??""),prompt:c(a.a.prompt??"")});for(const a of f(n(t,"hyperlinks"),"hyperlink"))o.hyperlinks.push({ref:a.a.ref,rid:a.a.id??null,location:a.a.location??null,display:c(a.a.display??null),tooltip:c(a.a.tooltip??null)});const i=n(t,"sheetProtection");i&&(o.protection={...i.a});const l=f(n(t,"customSheetViews"),"customSheetView");l.length&&(o.customSheetViews=l.map(a=>{const u=n(a,"pane"),g=n(a,"selection");return{...a.a,xSplit:u?.a.state==="frozen"?u.a.xSplit:void 0,ySplit:u?.a.state==="frozen"?u.a.ySplit:void 0,activeCell:g?.a.activeCell,sqref:g?.a.sqref}}));const s=n(t,"picture");s&&(o.pictureRid=s.a["r:id"]??s.a.id??null);const m=n(t,"legacyDrawingHF");m&&(o.headerPictureRid=m.a["r:id"]??m.a.id??null);const $=f(n(t,"ignoredErrors"),"ignoredError");$.length&&(o.ignoredErrors=$.map(a=>({...a.a})));const w=n(t,"scenarios");return w&&(o.scenarios={current:Number(w.a.current??0),show:Number(w.a.show??0),items:f(w,"scenario").map(a=>({name:c(a.a.name),user:c(a.a.user??""),comment:c(a.a.comment??""),locked:a.a.locked==="1",hidden:a.a.hidden==="1",cells:f(a,"inputCells").map(u=>({r:u.a.r,val:c(u.a.val??"")}))}))}),o}function E(e){const o=e.a,t={type:o.type,priority:Number(o.priority??0),dxfId:o.dxfId!==void 0?Number(o.dxfId):null,operator:o.operator??null,formulas:f(e,"formula").map(m=>m.t),text:c(o.text??null),rank:o.rank!==void 0?Number(o.rank):null,percent:p(o.percent),bottom:p(o.bottom),aboveAverage:o.aboveAverage===void 0?!0:p(o.aboveAverage),equalAverage:p(o.equalAverage),stdDev:o.stdDev!==void 0?Number(o.stdDev):0,stopIfTrue:p(o.stopIfTrue),timePeriod:o.timePeriod??null},r=m=>f(m,"cfvo").map($=>({type:$.a.type,val:$.a.val??null,gte:$.a.gte===void 0?!0:p($.a.gte)})),i=n(e,"colorScale");i&&(t.colorScale={cfvo:r(i),colors:f(i,"color").map(m=>m.a)});const l=n(e,"dataBar");l&&(t.dataBar={cfvo:r(l),color:n(l,"color")?.a??null,showValue:l.a.showValue===void 0?!0:p(l.a.showValue)});const s=n(e,"iconSet");return s&&(t.iconSet={name:s.a.iconSet??"3TrafficLights1",cfvo:r(s),reverse:p(s.a.reverse),showValue:s.a.showValue===void 0?!0:p(s.a.showValue)}),t}function j(e){let o=`type="${e.type}" priority="${e.priority}"`;e.dxfId!==null&&e.dxfId!==void 0&&(o+=` dxfId="${e.dxfId}"`),e.stopIfTrue&&(o+=' stopIfTrue="1"'),e.operator&&(o+=` operator="${e.operator}"`),e.text!==null&&e.text!==void 0&&(o+=` text="${d(e.text)}"`),e.rank!==null&&e.rank!==void 0&&(o+=` rank="${e.rank}"`),e.percent&&(o+=' percent="1"'),e.bottom&&(o+=' bottom="1"'),e.type==="aboveAverage"&&(e.aboveAverage===!1&&(o+=' aboveAverage="0"'),e.equalAverage&&(o+=' equalAverage="1"'),e.stdDev&&(o+=` stdDev="${e.stdDev}"`)),e.timePeriod&&(o+=` timePeriod="${e.timePeriod}"`);let t=(e.formulas??[]).map(r=>`<formula>${h(r)}</formula>`).join("");return e.colorScale&&(t+=`<colorScale>${x(e.colorScale.cfvo)}${e.colorScale.colors.map(r=>`<color ${S(r)}/>`).join("")}</colorScale>`),e.dataBar&&(t+=`<dataBar${e.dataBar.showValue?"":' showValue="0"'}>${x(e.dataBar.cfvo)}<color ${S(e.dataBar.color)}/></dataBar>`),e.iconSet&&(t+=`<iconSet iconSet="${e.iconSet.name}"${e.iconSet.reverse?' reverse="1"':""}${e.iconSet.showValue?"":' showValue="0"'}>${x(e.iconSet.cfvo)}</iconSet>`),`<cfRule ${o}>${t}</cfRule>`}const X=e=>e.map(o=>`<conditionalFormatting${o.pivot?' pivot="1"':""} sqref="${h(o.sqref)}">${o.rules.map(j).join("")}</conditionalFormatting>`).join("");function C(e){if(e.length===0)return"";const o=e.map(t=>{let r=`type="${t.type}"`;return t.errorStyle&&t.errorStyle!=="stop"&&(r+=` errorStyle="${t.errorStyle}"`),t.operator&&t.operator!=="between"&&(r+=` operator="${t.operator}"`),t.allowBlank&&(r+=' allowBlank="1"'),t.showDropDown===!1&&(r+=' showDropDown="1"'),t.showPrompt&&(r+=' showInputMessage="1"'),t.showError&&(r+=' showErrorMessage="1"'),t.errorTitle&&(r+=` errorTitle="${d(t.errorTitle)}"`),t.error&&(r+=` error="${d(t.error)}"`),t.promptTitle&&(r+=` promptTitle="${d(t.promptTitle)}"`),t.prompt&&(r+=` prompt="${d(t.prompt)}"`),r+=` sqref="${h(t.sqref)}"`,`<dataValidation ${r}>${t.formula1?`<formula1>${h(t.formula1)}</formula1>`:""}${t.formula2?`<formula2>${h(t.formula2)}</formula2>`:""}</dataValidation>`});return`<dataValidations count="${e.length}">${o.join("")}</dataValidations>`}const N=e=>e.length===0?"":`<hyperlinks>${e.map(o=>{let t=`ref="${h(o.ref)}"`;return o.rid&&(t+=` r:id="${h(o.rid)}"`),o.location&&(t+=` location="${h(o.location)}"`),o.display&&(t+=` display="${d(o.display)}"`),o.tooltip&&(t+=` tooltip="${d(o.tooltip)}"`),`<hyperlink ${t}/>`}).join("")}</hyperlinks>`;function O(e){if(!e||e.items.length===0)return"";const o=e.items.map(t=>`<scenario name="${d(t.name)}"${t.locked?' locked="1"':""}${t.hidden?' hidden="1"':""} count="${t.cells.length}" user="${d(t.user||"User")}"${t.comment?` comment="${d(t.comment)}"`:""}>${t.cells.map(r=>`<inputCells r="${r.r}" val="${d(r.val)}"/>`).join("")}</scenario>`).join("");return`<scenarios current="${e.current??0}" show="${e.show??0}">${o}</scenarios>`}function M(e){return e?`<sheetProtection ${Object.entries(e).map(([o,t])=>`${o}="${h(t)}"`).join(" ")}/>`:""}const b=["sheetCalcPr","sheetProtection","protectedRanges","scenarios","autoFilter","sortState","dataConsolidate","customSheetViews","mergeCells","phoneticPr","conditionalFormatting","dataValidations","hyperlinks","printOptions","pageMargins","pageSetup","headerFooter","rowBreaks","colBreaks","customProperties","cellWatches","ignoredErrors","smartTags","drawing","legacyDrawing","legacyDrawingHF","drawingHF","picture","oleObjects","controls","webPublishItems","tableParts","extLst"];function z(e,o,t){const r=new RegExp(`<${o}\\b[^>]*?(?:/>|>[\\s\\S]*?</${o}>)`,"g");let i=e.replace(r,"");if(!t)return i;const l=b.slice(b.indexOf(o)+1).join("|"),s=new RegExp(`<(?:${l})\\b|</worksheet>`).exec(V(i)),m=s?s.index:i.length;return i=i.slice(0,m)+t+i.slice(m),i}function q(e){const o=n(n(e,"r"),"rPr");if(!o)return{};const t={},r=n(o,"sz")?.a.val;r&&r!=="9"&&r!=="10"&&(t.fontSize=Number(r));const i=n(o,"rFont")?.a.val;i&&i!=="Tahoma"&&(t.fontName=i);const l=n(o,"color")?.a.rgb;return l&&(t.color=`#${l.slice(-6)}`),Object.keys(t).length?{style:t}:{}}function L(e){const o=y(e),t=f(n(o,"authors"),"author").map(r=>c(r.t));return f(n(o,"commentList"),"comment").map(r=>{const i=n(r,"text");let l="";for(const s of i.c)s.n==="t"?l+=c(s.t):s.n==="r"&&(l+=c(n(s,"t")?.t??""));return{ref:r.a.ref,author:t[Number(r.a.authorId??0)]??"",text:l,...q(i)}})}const H=(e,o)=>D(y(e),o),U=e=>e.raw??k(e);export{X as cfXml,U as dxfXml,N as hyperlinksXml,A as ignoredErrorsXml,L as parseComments,H as parseDxfs,F as parseSheetFeatures,M as protectionXml,z as replaceElement,j as ruleXml,O as scenariosXml,C as validationsXml};