�
B�gz� � � � d Z ddlmZ ddlmZ ddlZddlZddlmZ ddlm Z m
Z
mZ ddlZddl
mZ ddlmZ dd lmZmZ dd
lmZ ddlmZ ddlmZ dd
lmZ ddlmZ ddlmZ ddl m!Z! ddl"m#Z# ddl$m%Z% ddl&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z- ddl.m/Z/ ddl0m1Z1 e rddl2m3Z3m4Z4 ddl5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z; ddlm<Z< ej= d� � Z>e>fdbd�Z?dcd#�Z@ddd+�ZA G d,� d-� � ZB G d.� d/eB� � ZCded0�ZDd1d2iZE G d3� d4eB� � ZFdfd6�ZGd7� ZHeFeFeCeCd8�ZIdgd<�ZJded=�ZKd>� ZLd?� ZM ee%d( �@� � dAddddddBdCddDdddEdEdejN ddF�dhda�� � ZOdS )izW
:mod:`pandas.io.html` is a module containing functionality for dealing with
HTML IO.
� )�annotations)�abcN)�Pattern)�
TYPE_CHECKING�Literal�cast)�lib)�import_optional_dependency)�AbstractMethodError�EmptyDataError)�doc)�find_stack_level)�check_dtype_backend)�is_list_like��isna)�Index)�
MultiIndex)�Series)�_shared_docs)�file_exists�
get_handle�is_file_like�
is_fsspec_url�is_url�stringify_path�validate_header_arg��pprint_thing)�
TextParser)�Iterable�Sequence)�
BaseBuffer�DtypeBackend�FilePath�HTMLFlavors�
ReadBuffer�StorageOptions)� DataFramez[\r\n]+|\s{2,}�s�str�regexr �returnc �R � |� d| � � � � � S )a�
Replace extra whitespace inside of a string with a single space.
Parameters
----------
s : str or unicode
The string from which to remove extra whitespace.
regex : re.Pattern
The regular expression to use to remove extra whitespace.
Returns
-------
subd : str or unicode
`s` with all extra whitespace replaced with a single space.
� )�sub�strip)r* r, s �^/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/pandas/io/html.py�_remove_whitespacer3 I s � � �9�9�S�!�'�'�)�)�$�$�$� �skiprows�"int | Sequence[int] | slice | None�int | Sequence[int]c �X � t | t � � r5| j pd| j pd}}t t || j |� � � � S t | t j � � st | � � rt d| � � S | �dS t t | � � j
� d�� � �)a�
Get an iterator given an integer, slice or container.
Parameters
----------
skiprows : int, slice, container
The iterator to use to skip rows; can also be a slice.
Raises
------
TypeError
* If `skiprows` is not a slice, integer, or Container
Returns
-------
it : iterable
A proper iterator to use to skip rows of a DataFrame.
r � r7 Nz& is not a valid type for skipping rows)�
isinstance�slice�start�step�list�range�stop�numbers�Integralr r � TypeError�type�__name__)r5 r<