Sindbad~EG File Manager
�
(ٜg� �
� � d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZ d dl Z d dl
mZmZm
Z
mZmZ d dlmZ e� \ ZZdedefd �Zdd
eddfd�Zdd�Zd
ededdfd�Zded
ed
eddfd�Zdeddfd�Zdeded
ed
eddf
d�Zy)� N)�system)�quote)�open)�click�hotkey�press�size� typewrite)�InternetException�number�returnc � � d| v xs d| v S )z5Checks the Number to see if contains the Country Code�+�_� �r s �>/usr/local/lib/python3.12/site-packages/pywhatkit/core/core.py�check_numberr s � � �&�=�)�C�6�M�)� � wait_timec �* � t j | � t � j � dv r
t dd� nLt � j � dk( r
t dd� n$t t � j � � d�� �t
d� y) z'Closes the Currently Opened Browser Tab)�windows�linux�ctrl�w�darwin�commandz not supported!�enterN)�time�sleepr �lowerr �Warningr )r s r � close_tabr# sj � � �J�J�y��
�x�~�~��/�/��v�s�� ���� �X� %��y�#�������)�*�/�:�;�;� �'�Nr c �t � t j d� y# t j $ r t d� �w xY w)z1Check the Internet connection of the Host Machinezhttps://google.comzTError while connecting to the Internet. Make sure you are connected to the Internet!N)�requests�get�RequestExceptionr r r r �check_connectionr( # s9 � �
����)�*���$�$�
��b�
�
�
�s � �7�receiver�messagec �t � t | �� rt d| z dz t |� z � yt d| z � y)z(Opens WhatsApp Web based on the Receiverr z$https://web.whatsapp.com/send?phone=z&text=z%https://web.whatsapp.com/accept?code=N)r r r �r) r* s r �_webr- . sC � ��8�$��2��
��
� �G�n�
�
�
�
4�x�
?�@r c �" � t || �� t j d� t t dz t
dz � t j |dz
� t
|�� s$| D ] }|dk( r
t dd� �t |� �! t d� y) zParses and Sends the Messager, � � r �
�shiftr N)
r- r r r �WIDTH�HEIGHTr r r
r )r* r) r �chars r �send_messager6 ; sn � � �(�G�,��J�J�q�M� �%�!�)�V�a�Z� ��J�J�y�1�}���x�(��D��t�|��w��(��$�� �
�'�Nr �pathc �l � t � j � dk( r�t j | � j dv rt j d| � �� yt j | � j dv rt j d| � �� yt
dt j | � j � d�� �t � j � dk( r�d d
lm} d dl }d dl
m} |j | � } |� }|j d
� j |d� |j � dd }|j! � |j# � |j% � |j'